we-report-angular 0.6.0 → 0.7.0
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/esm2022/lib/designer/bindable-input.component.mjs +12 -10
- package/esm2022/lib/designer/control-factory.mjs +27 -2
- package/esm2022/lib/designer/data-sources-dialog.component.mjs +99 -6
- package/esm2022/lib/designer/database-source-editor.component.mjs +3 -3
- package/esm2022/lib/designer/design-surface.component.mjs +269 -44
- package/esm2022/lib/designer/designer-fields.mjs +21 -4
- package/esm2022/lib/designer/designer-state.mjs +57 -3
- package/esm2022/lib/designer/expression-editor.component.mjs +9 -3
- package/esm2022/lib/designer/property-panel.component.mjs +115 -5
- package/esm2022/lib/designer/we-report-designer.component.mjs +172 -12
- package/esm2022/lib/locales/de.mjs +85 -2
- package/esm2022/lib/locales/es.mjs +85 -2
- package/esm2022/lib/locales/fr.mjs +85 -2
- package/esm2022/lib/viewer/page-canvas.mjs +151 -0
- package/esm2022/lib/viewer/we-report-page.component.mjs +5 -1
- package/esm2022/lib/viewer/we-report-viewer.component.mjs +293 -33
- package/esm2022/lib/we-report-icons.mjs +4 -1
- package/esm2022/lib/we-report-locale.mjs +169 -3
- package/fesm2022/we-report-angular.mjs +1630 -110
- package/fesm2022/we-report-angular.mjs.map +1 -1
- package/lib/designer/bindable-input.component.d.ts +3 -1
- package/lib/designer/data-sources-dialog.component.d.ts +24 -1
- package/lib/designer/database-source-editor.component.d.ts +1 -1
- package/lib/designer/design-surface.component.d.ts +21 -1
- package/lib/designer/designer-fields.d.ts +3 -1
- package/lib/designer/designer-state.d.ts +8 -0
- package/lib/designer/property-panel.component.d.ts +31 -3
- package/lib/designer/we-report-designer.component.d.ts +29 -1
- package/lib/viewer/page-canvas.d.ts +8 -0
- package/lib/viewer/we-report-viewer.component.d.ts +45 -2
- package/lib/we-report-icons.d.ts +3 -0
- package/lib/we-report-locale.d.ts +72 -0
- package/package.json +2 -2
- package/styles/we-report-theme.scss +6 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, makeEnvironmentProviders, inject, Pipe, Injectable, signal, input, Component, ChangeDetectionStrategy, output, computed, effect, untracked, viewChild, HostListener, ElementRef, model } from '@angular/core';
|
|
3
|
-
import { DEFAULT_FONT_FAMILY, FontRegistry, parseHexColor, loadReportData, layoutReport, renderPdf, reportTable, writeXlsx,
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, inject, Pipe, Injectable, signal, input, Component, ChangeDetectionStrategy, output, computed, effect, untracked, viewChild, afterNextRender, Injector, HostListener, ElementRef, model } from '@angular/core';
|
|
3
|
+
import { DEFAULT_FONT_FAMILY, FontRegistry, parseHexColor, parameterChoices, allDataSources, loadReportData, layoutReport, renderPdf, reportTable, writeXlsx, storedZip, toMonoBitmap, zplFromBitmaps, escPosFromBitmaps, writeCsv, createBlankReport, DEFAULT_TABLE_BORDER_COLOR, DEFAULT_STYLE, EXPRESSION_FUNCTIONS, evaluate, resolveParameters, formatValue, isSummableField, isExpression, resolveStyle, fitLines, resolvePageGeometry, parseRichText, DEFAULT_WATERMARK_COLOR, readImage, captionFor, resolveReportData, inferSchema, calculatedFieldMap, PAPER_SIZES, BARCODE_SYMBOLOGIES, LABEL_SHEETS, applyLabelSheet, importReport, backendClient, fetchDatabase, findListPaths, sourceValue, toRows, readPath, csvToObjects, fetchWebService, checkReport, generateListReport } from 'we-report-core';
|
|
4
4
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
5
5
|
import { DOCUMENT } from '@angular/common';
|
|
6
6
|
|
|
@@ -28,12 +28,21 @@ const weReportLocaleEn = {
|
|
|
28
28
|
checkbox: 'Checkbox',
|
|
29
29
|
chart: 'Chart',
|
|
30
30
|
table: 'Table',
|
|
31
|
+
crosstab: 'Cross table',
|
|
32
|
+
subreport: 'Sub-report',
|
|
31
33
|
},
|
|
32
34
|
zoomIn: 'Zoom in',
|
|
33
35
|
zoomOut: 'Zoom out',
|
|
34
36
|
print: 'Print',
|
|
35
37
|
downloadPdf: 'Download PDF',
|
|
36
38
|
downloadExcel: 'Excel',
|
|
39
|
+
documentMap: 'Document map',
|
|
40
|
+
downloadPng: 'PNG',
|
|
41
|
+
pngAllPages: 'PNG, every page (ZIP)',
|
|
42
|
+
printerOutput: 'More formats',
|
|
43
|
+
printerOutputHint: 'CSV for spreadsheets; files for label and receipt printers (the pages as an image the printer prints directly).',
|
|
44
|
+
printerZpl: 'Label printer (ZPL, 203 dpi)',
|
|
45
|
+
printerEscPos: 'Receipt printer (ESC/POS)',
|
|
37
46
|
pageCount: '{0} page(s)',
|
|
38
47
|
problems: 'Problems',
|
|
39
48
|
loading: 'Preparing preview…',
|
|
@@ -84,6 +93,8 @@ const weReportLocaleEn = {
|
|
|
84
93
|
removeBand: 'Remove section',
|
|
85
94
|
groupBy: 'Group by',
|
|
86
95
|
newText: 'Text',
|
|
96
|
+
signature: 'Signature',
|
|
97
|
+
signatureCaption: 'Name · Signature',
|
|
87
98
|
showData: 'Show data',
|
|
88
99
|
groupLayout: 'Position and size',
|
|
89
100
|
groupContent: 'Content',
|
|
@@ -104,6 +115,9 @@ const weReportLocaleEn = {
|
|
|
104
115
|
marginRight: 'Right',
|
|
105
116
|
marginBottom: 'Bottom',
|
|
106
117
|
marginLeft: 'Left',
|
|
118
|
+
pageColor: 'Page colour',
|
|
119
|
+
mirrorMargins: 'Mirror margins',
|
|
120
|
+
mirrorMarginsHint: 'For booklets: on even pages the left and right margins swap.',
|
|
107
121
|
left: 'From left',
|
|
108
122
|
top: 'From top',
|
|
109
123
|
content: 'Content',
|
|
@@ -119,6 +133,8 @@ const weReportLocaleEn = {
|
|
|
119
133
|
formatPercent: 'Percent',
|
|
120
134
|
formatDate: 'Date',
|
|
121
135
|
formatDateTime: 'Date and time',
|
|
136
|
+
formatLongDate: 'Long date (5 January 2026)',
|
|
137
|
+
formatDayDate: 'With the day (Monday, 5 January 2026)',
|
|
122
138
|
font: 'Font',
|
|
123
139
|
fontSize: 'Size',
|
|
124
140
|
bold: 'Bold',
|
|
@@ -141,6 +157,8 @@ const weReportLocaleEn = {
|
|
|
141
157
|
padding: 'Inner spacing',
|
|
142
158
|
canGrow: 'Grow to fit text',
|
|
143
159
|
canGrowHint: 'Long text makes the row taller instead of being cut off.',
|
|
160
|
+
richText: 'Rich text',
|
|
161
|
+
richTextHint: '**bold**, *italic*, __underline__ and data inside the text: Dear {[name]}',
|
|
144
162
|
visibleWhen: 'Show only when',
|
|
145
163
|
visibleWhenHint: 'A formula; the item is hidden when it is false, e.g. [Total] > 0',
|
|
146
164
|
symbology: 'Barcode type',
|
|
@@ -178,11 +196,28 @@ const weReportLocaleEn = {
|
|
|
178
196
|
sortNone: 'As in data',
|
|
179
197
|
keepTogether: 'Keep group on one page',
|
|
180
198
|
keepTogetherHint: 'Moves the whole group to the next page instead of splitting it.',
|
|
199
|
+
groupTop: 'Only the first … groups',
|
|
200
|
+
groupOrderBy: 'Order groups by',
|
|
201
|
+
groupOrderByHint: 'A formula over each group, e.g. Sum([amount]): the biggest customers first.',
|
|
202
|
+
largestFirst: 'Largest first',
|
|
203
|
+
keepWithFirstRow: 'Keep the header with the first row',
|
|
204
|
+
printAtBottom: 'At the bottom of the last page',
|
|
205
|
+
printAtBottomHint: 'Totals and signatures sit just above the page footer, however short the list.',
|
|
206
|
+
printOnFirstPage: 'Print on the first page',
|
|
207
|
+
printOnLastPage: 'Print on the last page',
|
|
208
|
+
bookmark: 'Bookmark',
|
|
209
|
+
bookmarkHint: 'An entry in the PDF bookmarks and the preview’s document map, e.g. the customer’s name.',
|
|
210
|
+
alternateBackground: 'Every second row',
|
|
211
|
+
bandVisible: 'Print only when',
|
|
212
|
+
bandVisibleHint: 'A formula, e.g. [Discount] > 0: otherwise the section is left out (its rows still count in totals).',
|
|
213
|
+
resetPageNumber: 'New page and page numbers per group',
|
|
214
|
+
resetPageNumberHint: 'Each group starts on a new page counted from 1 — e.g. one statement per customer, each “page 1 of 2”.',
|
|
181
215
|
repeatOnEveryPage: 'Repeat on every page',
|
|
182
216
|
pageBreakBefore: 'Start on a new page',
|
|
183
217
|
pageBreakAfter: 'New page after',
|
|
184
218
|
dataRows: 'Rows come from',
|
|
185
219
|
dataRowsHint: 'Path to the list inside the data, e.g. lines',
|
|
220
|
+
hostDataNote: 'The report\'s rows come from the app; this data is used only when the app gives none.',
|
|
186
221
|
dataSources: 'Data sources',
|
|
187
222
|
close: 'Close',
|
|
188
223
|
rowsSource: 'rows',
|
|
@@ -194,6 +229,13 @@ const weReportLocaleEn = {
|
|
|
194
229
|
parameterType: 'Type',
|
|
195
230
|
parameterLabel: 'Label shown to the user',
|
|
196
231
|
defaultValue: 'Default value',
|
|
232
|
+
calculatedFields: 'Calculated fields',
|
|
233
|
+
calculatedFieldsHint: 'A formula worked out for every row and used like a data field, e.g. total = [qty] * [price], then [total] anywhere.',
|
|
234
|
+
calculatedFieldName: 'Field name',
|
|
235
|
+
addCalculatedField: 'Add calculated field',
|
|
236
|
+
parameterChoices: 'Choices: A, B, C (optional)',
|
|
237
|
+
parameterChoicesFrom: 'List from a data field',
|
|
238
|
+
parameterNoList: 'Free entry',
|
|
197
239
|
addParameter: 'Add parameter',
|
|
198
240
|
sourceName: 'Name',
|
|
199
241
|
wholeData: '(the whole data)',
|
|
@@ -238,6 +280,9 @@ const weReportLocaleEn = {
|
|
|
238
280
|
rowLimitReached: '(row limit reached — more rows exist)',
|
|
239
281
|
viaBackend: 'Call through the data backend',
|
|
240
282
|
viaBackendHint: 'Use this when the service blocks browser calls (CORS) or needs a secret key the browser must not see.',
|
|
283
|
+
paging: 'Paged API',
|
|
284
|
+
pagingHint: 'Loads every page: write {{page}} (1, 2, 3 …) or {{offset}} and {{size}} in the address.',
|
|
285
|
+
pageSize: 'Rows per page',
|
|
241
286
|
autoDesign: 'Design from data',
|
|
242
287
|
autoDesignHint: 'Builds a tidy list of your data with headers, totals and page numbers. Undo brings your design back.',
|
|
243
288
|
newReportTitle: 'Report',
|
|
@@ -249,6 +294,7 @@ const weReportLocaleEn = {
|
|
|
249
294
|
issueEmptyFormula: 'has an empty formula',
|
|
250
295
|
issueOverlap: 'overlaps {0}',
|
|
251
296
|
issueOutsideColumn: 'goes past its column into the next label',
|
|
297
|
+
issueCheckDigit: 'has a wrong check digit (the last digit should be {0}); it will not scan',
|
|
252
298
|
fixIt: 'Fix',
|
|
253
299
|
noProblems: 'No problems found.',
|
|
254
300
|
chartType: 'Chart type',
|
|
@@ -257,6 +303,12 @@ const weReportLocaleEn = {
|
|
|
257
303
|
chartLine: 'Line',
|
|
258
304
|
chartPie: 'Pie',
|
|
259
305
|
chartDoughnut: 'Doughnut',
|
|
306
|
+
chartMax: 'Full at',
|
|
307
|
+
chartDataBar: 'Data bar',
|
|
308
|
+
chartGauge: 'Gauge',
|
|
309
|
+
chartSparkline: 'Sparkline',
|
|
310
|
+
chartRows: 'Rows from a list in each row',
|
|
311
|
+
chartRowsHint: 'E.g. [months]: a small chart in every detail row, from that row’s own list. Pick its fields as Group by / Value (or leave Group by empty for a sparkline).',
|
|
260
312
|
chartCategory: 'Group by',
|
|
261
313
|
chartValue: 'Value',
|
|
262
314
|
chartAggregate: 'Calculation',
|
|
@@ -269,6 +321,24 @@ const weReportLocaleEn = {
|
|
|
269
321
|
showValues: 'Show values',
|
|
270
322
|
showLegend: 'Show legend',
|
|
271
323
|
chartHint: 'A chart shows the rows of its section: every row in a report header or footer, the group’s rows in a group footer.',
|
|
324
|
+
crosstabHint: 'A cross table sums the rows of its section: one row per value of one field, one column per value of another. In a report header or footer it shows every row, in a group footer the group’s rows.',
|
|
325
|
+
crosstabRows: 'Rows',
|
|
326
|
+
crosstabColumns: 'Columns',
|
|
327
|
+
crosstabValue: 'Value',
|
|
328
|
+
crosstabTotals: 'Totals row and column',
|
|
329
|
+
crosstabTitle: 'Corner text',
|
|
330
|
+
subreportHint: 'A separate report printed inside this box, e.g. the orders under each customer. The box grows to fit its rows.',
|
|
331
|
+
subreportEdit: 'Edit sub-report…',
|
|
332
|
+
subreportLoad: 'Use a saved report…',
|
|
333
|
+
subreportLoadFailed: 'The file is not a we-report report (.wrpt.json).',
|
|
334
|
+
subreportRows: 'Its rows come from',
|
|
335
|
+
subreportRowsHint: 'Empty: the sub-report’s own data. For a list inside each row write e.g. [orders].',
|
|
336
|
+
subreportFilter: 'Show only rows where',
|
|
337
|
+
subreportFilterHint: 'E.g. [CustomerId] = [^.Id] — [^.field] reads the row around the box.',
|
|
338
|
+
subreportParams: 'Parameter values',
|
|
339
|
+
subreportTitle: 'Sub-report: {0}',
|
|
340
|
+
subreportDone: 'Done',
|
|
341
|
+
subreportPageHint: 'A sub-report is as wide as its box; paper and margins come from the report around it.',
|
|
272
342
|
conditionalFormatting: 'Conditional formatting',
|
|
273
343
|
watermark: 'Watermark',
|
|
274
344
|
firstPage: 'First page',
|
|
@@ -297,10 +367,12 @@ const weReportLocaleEn = {
|
|
|
297
367
|
wizardTotals: 'Totals of number columns',
|
|
298
368
|
automatic: 'Automatic',
|
|
299
369
|
createReport: 'Create report',
|
|
300
|
-
issueTextCut: 'The text does not fit in its box and is cut off.',
|
|
370
|
+
issueTextCut: 'The text does not fit in its box and is cut off (a number is printed smaller).',
|
|
301
371
|
stretch: 'Extend to the bottom when the section grows',
|
|
302
372
|
stretchHint: 'For cell borders and column lines next to a text that grows.',
|
|
303
373
|
fitToText: 'Fit size to text',
|
|
374
|
+
tidyUp: 'Tidy up',
|
|
375
|
+
tidyUpHint: 'Puts the items on the grid and lines up those that are nearly in a row or a column.',
|
|
304
376
|
collapseBand: 'Collapse section',
|
|
305
377
|
expandBand: 'Expand section',
|
|
306
378
|
groupByThis: 'Group rows by this value',
|
|
@@ -369,6 +441,8 @@ const weReportLocaleEn = {
|
|
|
369
441
|
functionHelp: {
|
|
370
442
|
Iif: 'Chooses between two values: the first when the condition is true, otherwise the second.',
|
|
371
443
|
IsNull: 'The value, or the fallback when it is empty.',
|
|
444
|
+
Switch: 'Picks the result for the first match, e.g. Switch([Status], 1, \'Open\', 2, \'Closed\', \'Other\').',
|
|
445
|
+
In: 'True when the value is one of the others, e.g. In([City], \'Ankara\', \'İzmir\').',
|
|
372
446
|
Concat: 'Joins texts together.',
|
|
373
447
|
Len: 'Number of characters.',
|
|
374
448
|
Upper: 'CAPITAL LETTERS (Turkish İ/ı handled).',
|
|
@@ -394,8 +468,17 @@ const weReportLocaleEn = {
|
|
|
394
468
|
Month: 'Month of a date (1–12).',
|
|
395
469
|
Day: 'Day of the month.',
|
|
396
470
|
AddDays: 'A date moved by a number of days, e.g. a due date.',
|
|
471
|
+
AddMonths: 'A date moved by months; the 31st becomes the last day of a shorter month.',
|
|
472
|
+
AddYears: 'A date moved by years.',
|
|
473
|
+
DateDiff: 'Whole days, months or years between two dates, e.g. days overdue: DateDiff(\'day\', [due], Today()).',
|
|
474
|
+
Left: 'The first characters of a text.',
|
|
475
|
+
Right: 'The last characters of a text.',
|
|
476
|
+
PadLeft: 'Fills a text from the left up to a length, e.g. PadLeft([no], 6, \'0\') → 000042.',
|
|
397
477
|
Sum: 'Total over the rows in scope (group, page or report).',
|
|
398
478
|
RowNumber: 'Position of the row: 1, 2, 3 … (restarts in every group).',
|
|
479
|
+
RunningSum: 'Total so far: in a row, of the rows up to it (restarts in every group); in a page footer, of every row up to the end of the page (carried forward).',
|
|
480
|
+
CarriedSum: 'Total of the rows on the pages before this one — “brought forward” in a page header.',
|
|
481
|
+
SumAll: 'Total of the value over every row of the report, wherever it is used: [Amount] / SumAll([Amount]) is the share of the grand total.',
|
|
399
482
|
Count: 'Number of rows in scope.',
|
|
400
483
|
Avg: 'Average over the rows in scope.',
|
|
401
484
|
Min: 'Smallest value over the rows in scope (or of two values).',
|
|
@@ -435,12 +518,21 @@ const weReportLocaleTr = {
|
|
|
435
518
|
checkbox: 'Onay kutusu',
|
|
436
519
|
chart: 'Grafik',
|
|
437
520
|
table: 'Tablo',
|
|
521
|
+
crosstab: 'Çapraz tablo',
|
|
522
|
+
subreport: 'Alt rapor',
|
|
438
523
|
},
|
|
439
524
|
zoomIn: 'Yakınlaştır',
|
|
440
525
|
zoomOut: 'Uzaklaştır',
|
|
441
526
|
print: 'Yazdır',
|
|
442
527
|
downloadPdf: 'PDF indir',
|
|
443
528
|
downloadExcel: 'Excel',
|
|
529
|
+
documentMap: 'Belge haritası',
|
|
530
|
+
downloadPng: 'PNG',
|
|
531
|
+
pngAllPages: 'PNG, tüm sayfalar (ZIP)',
|
|
532
|
+
printerOutput: 'Diğer biçimler',
|
|
533
|
+
printerOutputHint: 'Tablolar için CSV; etiket ve fiş yazıcıları için dosyalar (sayfalar yazıcının doğrudan bastığı bir görüntü olarak).',
|
|
534
|
+
printerZpl: 'Etiket yazıcısı (ZPL, 203 dpi)',
|
|
535
|
+
printerEscPos: 'Fiş yazıcısı (ESC/POS)',
|
|
444
536
|
pageCount: '{0} sayfa',
|
|
445
537
|
problems: 'Sorunlar',
|
|
446
538
|
loading: 'Önizleme hazırlanıyor…',
|
|
@@ -491,6 +583,8 @@ const weReportLocaleTr = {
|
|
|
491
583
|
removeBand: 'Bölümü kaldır',
|
|
492
584
|
groupBy: 'Grupla',
|
|
493
585
|
newText: 'Metin',
|
|
586
|
+
signature: 'İmza',
|
|
587
|
+
signatureCaption: 'Ad Soyad · İmza',
|
|
494
588
|
showData: 'Veriyi göster',
|
|
495
589
|
groupLayout: 'Konum ve boyut',
|
|
496
590
|
groupContent: 'İçerik',
|
|
@@ -511,6 +605,9 @@ const weReportLocaleTr = {
|
|
|
511
605
|
marginRight: 'Sağ',
|
|
512
606
|
marginBottom: 'Alt',
|
|
513
607
|
marginLeft: 'Sol',
|
|
608
|
+
pageColor: 'Sayfa rengi',
|
|
609
|
+
mirrorMargins: 'Ayna kenar boşlukları',
|
|
610
|
+
mirrorMarginsHint: 'Kitapçık için: çift sayfalarda sol ve sağ boşluk yer değiştirir.',
|
|
514
611
|
left: 'Soldan',
|
|
515
612
|
top: 'Üstten',
|
|
516
613
|
content: 'İçerik',
|
|
@@ -526,6 +623,8 @@ const weReportLocaleTr = {
|
|
|
526
623
|
formatPercent: 'Yüzde',
|
|
527
624
|
formatDate: 'Tarih',
|
|
528
625
|
formatDateTime: 'Tarih ve saat',
|
|
626
|
+
formatLongDate: 'Uzun tarih (5 Ocak 2026)',
|
|
627
|
+
formatDayDate: 'Gün adıyla (Pazartesi, 5 Ocak 2026)',
|
|
529
628
|
font: 'Yazı tipi',
|
|
530
629
|
fontSize: 'Boyut',
|
|
531
630
|
bold: 'Kalın',
|
|
@@ -548,6 +647,8 @@ const weReportLocaleTr = {
|
|
|
548
647
|
padding: 'İç boşluk',
|
|
549
648
|
canGrow: 'Metne göre uzasın',
|
|
550
649
|
canGrowHint: 'Uzun metin kesilmek yerine satırı uzatır.',
|
|
650
|
+
richText: 'Zengin metin',
|
|
651
|
+
richTextHint: 'Metnin içinde **kalın**, *italik*, __altı çizili__ ve veri: Sayın {[ad]}',
|
|
551
652
|
visibleWhen: 'Yalnızca şu durumda göster',
|
|
552
653
|
visibleWhenHint: 'Bir formül; yanlışsa öğe gizlenir, örn. [Toplam] > 0',
|
|
553
654
|
symbology: 'Barkod türü',
|
|
@@ -585,11 +686,28 @@ const weReportLocaleTr = {
|
|
|
585
686
|
sortNone: 'Verideki sırayla',
|
|
586
687
|
keepTogether: 'Grubu tek sayfada tut',
|
|
587
688
|
keepTogetherHint: 'Grup bölünecekse tamamını sonraki sayfaya taşır.',
|
|
689
|
+
groupTop: 'Yalnızca ilk … grup',
|
|
690
|
+
groupOrderBy: 'Grupları şuna göre sırala',
|
|
691
|
+
groupOrderByHint: 'Her grubun üzerinde bir formül; örn. Sum([tutar]): en büyük müşteriler önce.',
|
|
692
|
+
largestFirst: 'Büyükten küçüğe',
|
|
693
|
+
keepWithFirstRow: 'Başlığı ilk satırla birlikte tut',
|
|
694
|
+
printAtBottom: 'Son sayfanın en altında',
|
|
695
|
+
printAtBottomHint: 'Toplamlar ve imzalar, liste ne kadar kısa olursa olsun sayfa altlığının hemen üstünde durur.',
|
|
696
|
+
printOnFirstPage: 'İlk sayfada bas',
|
|
697
|
+
printOnLastPage: 'Son sayfada bas',
|
|
698
|
+
bookmark: 'Yer imi',
|
|
699
|
+
bookmarkHint: 'PDF yer imlerinde ve önizlemenin belge haritasında bir satır; örn. müşterinin adı.',
|
|
700
|
+
alternateBackground: 'Her ikinci satır',
|
|
701
|
+
bandVisible: 'Yalnızca şu durumda yazdır',
|
|
702
|
+
bandVisibleHint: 'Bir formül, örn. [Indirim] > 0; değilse bölüm basılmaz (satırları toplamlarda yine sayılır).',
|
|
703
|
+
resetPageNumber: 'Her grup yeni sayfada, kendi sayfa numarasıyla',
|
|
704
|
+
resetPageNumberHint: 'Her grup yeni sayfada başlar ve 1’den numaralanır; örn. her müşteriye ayrı ekstre, her biri “sayfa 1 / 2”.',
|
|
588
705
|
repeatOnEveryPage: 'Her sayfada tekrarla',
|
|
589
706
|
pageBreakBefore: 'Yeni sayfada başlasın',
|
|
590
707
|
pageBreakAfter: 'Sonrasında yeni sayfa',
|
|
591
708
|
dataRows: 'Satırlar nereden gelsin',
|
|
592
709
|
dataRowsHint: 'Veri içindeki listenin yolu, örn. lines',
|
|
710
|
+
hostDataNote: 'Raporun satırları uygulamadan geliyor; buradaki veri yalnızca uygulama veri vermediğinde kullanılır.',
|
|
593
711
|
dataSources: 'Veri kaynakları',
|
|
594
712
|
close: 'Kapat',
|
|
595
713
|
rowsSource: 'satırlar',
|
|
@@ -601,6 +719,13 @@ const weReportLocaleTr = {
|
|
|
601
719
|
parameterType: 'Tür',
|
|
602
720
|
parameterLabel: 'Kullanıcıya görünen ad',
|
|
603
721
|
defaultValue: 'Varsayılan değer',
|
|
722
|
+
calculatedFields: 'Hesaplanan alanlar',
|
|
723
|
+
calculatedFieldsHint: 'Her satır için hesaplanıp veri alanı gibi kullanılan formül; örn. toplam = [miktar] * [fiyat], sonra her yerde [toplam].',
|
|
724
|
+
calculatedFieldName: 'Alan adı',
|
|
725
|
+
addCalculatedField: 'Hesaplanan alan ekle',
|
|
726
|
+
parameterChoices: 'Seçenekler: A, B, C (isteğe bağlı)',
|
|
727
|
+
parameterChoicesFrom: 'Listeyi bir veri alanından al',
|
|
728
|
+
parameterNoList: 'Serbest giriş',
|
|
604
729
|
addParameter: 'Parametre ekle',
|
|
605
730
|
sourceName: 'Ad',
|
|
606
731
|
wholeData: '(verinin tamamı)',
|
|
@@ -645,6 +770,9 @@ const weReportLocaleTr = {
|
|
|
645
770
|
rowLimitReached: '(satır sınırına ulaşıldı — daha fazla satır var)',
|
|
646
771
|
viaBackend: 'Veri backend’i üzerinden çağır',
|
|
647
772
|
viaBackendHint: 'Servis tarayıcıdan çağrılmaya izin vermiyorsa (CORS) ya da tarayıcının görmemesi gereken gizli bir anahtar gerekiyorsa kullanın.',
|
|
773
|
+
paging: 'Sayfalı API',
|
|
774
|
+
pagingHint: 'Tüm sayfaları yükler: adrese {{page}} (1, 2, 3 …) ya da {{offset}} ve {{size}} yazın.',
|
|
775
|
+
pageSize: 'Sayfa başına satır',
|
|
648
776
|
autoDesign: 'Veriden otomatik tasarla',
|
|
649
777
|
autoDesignHint: 'Verinizden başlıklı, toplamlı ve sayfa numaralı düzenli bir liste oluşturur. Geri al ile eski tasarımınıza dönersiniz.',
|
|
650
778
|
newReportTitle: 'Rapor',
|
|
@@ -656,6 +784,7 @@ const weReportLocaleTr = {
|
|
|
656
784
|
issueEmptyFormula: 'formülü boş',
|
|
657
785
|
issueOverlap: '{0} ile üst üste biniyor',
|
|
658
786
|
issueOutsideColumn: 'sütununu aşıp yandaki etikete taşıyor',
|
|
787
|
+
issueCheckDigit: 'kontrol hanesi yanlış (son hane {0} olmalı); okunmaz',
|
|
659
788
|
fixIt: 'Düzelt',
|
|
660
789
|
noProblems: 'Sorun bulunamadı.',
|
|
661
790
|
chartType: 'Grafik türü',
|
|
@@ -664,6 +793,12 @@ const weReportLocaleTr = {
|
|
|
664
793
|
chartLine: 'Çizgi',
|
|
665
794
|
chartPie: 'Pasta',
|
|
666
795
|
chartDoughnut: 'Halka',
|
|
796
|
+
chartMax: 'Dolu olduğu değer',
|
|
797
|
+
chartDataBar: 'Veri çubuğu',
|
|
798
|
+
chartGauge: 'Gösterge',
|
|
799
|
+
chartSparkline: 'Mini çizgi',
|
|
800
|
+
chartRows: 'Satırdaki listeden',
|
|
801
|
+
chartRowsHint: 'Örn. [aylar]: her detay satırında o satırın kendi listesinden küçük bir grafik. Listenin alanlarını Gruplama / Değer olarak yazın (mini çizgide gruplama boş kalabilir).',
|
|
667
802
|
chartCategory: 'Gruplama alanı',
|
|
668
803
|
chartValue: 'Değer',
|
|
669
804
|
chartAggregate: 'Hesaplama',
|
|
@@ -676,6 +811,24 @@ const weReportLocaleTr = {
|
|
|
676
811
|
showValues: 'Değerleri göster',
|
|
677
812
|
showLegend: 'Açıklamayı göster',
|
|
678
813
|
chartHint: 'Grafik bulunduğu bölümün satırlarını gösterir: rapor başlığı veya altlığında tüm satırları, grup altlığında grubun satırlarını.',
|
|
814
|
+
crosstabHint: 'Çapraz tablo bulunduğu bölümün satırlarını özetler: bir alanın her değeri bir satır, diğerinin her değeri bir sütun olur. Rapor başlığı veya altlığında tüm satırları, grup altlığında grubun satırlarını gösterir.',
|
|
815
|
+
crosstabRows: 'Satırlar',
|
|
816
|
+
crosstabColumns: 'Sütunlar',
|
|
817
|
+
crosstabValue: 'Değer',
|
|
818
|
+
crosstabTotals: 'Toplam satırı ve sütunu',
|
|
819
|
+
crosstabTitle: 'Köşe yazısı',
|
|
820
|
+
subreportHint: 'Bu kutunun içine basılan ayrı bir rapor; örneğin her müşterinin altında siparişleri. Kutu satırlarına göre uzar.',
|
|
821
|
+
subreportEdit: 'Alt raporu düzenle…',
|
|
822
|
+
subreportLoad: 'Kayıtlı bir raporu kullan…',
|
|
823
|
+
subreportLoadFailed: 'Dosya bir we-report raporu (.wrpt.json) değil.',
|
|
824
|
+
subreportRows: 'Satırları nereden gelir',
|
|
825
|
+
subreportRowsHint: 'Boş: alt raporun kendi verisi. Her satırın içindeki liste için örneğin [orders] yazın.',
|
|
826
|
+
subreportFilter: 'Yalnızca şu satırları göster',
|
|
827
|
+
subreportFilterHint: 'Örn. [MusteriId] = [^.Id] — [^.alan] kutuyu çevreleyen satırı okur.',
|
|
828
|
+
subreportParams: 'Parametre değerleri',
|
|
829
|
+
subreportTitle: 'Alt rapor: {0}',
|
|
830
|
+
subreportDone: 'Tamam',
|
|
831
|
+
subreportPageHint: 'Alt rapor kutusu kadar geniştir; kağıt ve kenar boşlukları dıştaki rapordan gelir.',
|
|
679
832
|
conditionalFormatting: 'Koşullu biçim',
|
|
680
833
|
watermark: 'Filigran',
|
|
681
834
|
firstPage: 'İlk sayfa',
|
|
@@ -704,10 +857,12 @@ const weReportLocaleTr = {
|
|
|
704
857
|
wizardTotals: 'Sayı sütunlarının toplamı',
|
|
705
858
|
automatic: 'Otomatik',
|
|
706
859
|
createReport: 'Raporu oluştur',
|
|
707
|
-
issueTextCut: 'Metin kutusuna sığmıyor, kesiliyor.',
|
|
860
|
+
issueTextCut: 'Metin kutusuna sığmıyor, kesiliyor (sayı ise küçük yazılır).',
|
|
708
861
|
stretch: 'Bölüm uzayınca alta kadar uzat',
|
|
709
862
|
stretchHint: 'Uzayan bir metnin yanındaki hücre kenarlıkları ve sütun çizgileri için.',
|
|
710
863
|
fitToText: 'Boyutu metne sığdır',
|
|
864
|
+
tidyUp: 'Toparla',
|
|
865
|
+
tidyUpHint: 'Öğeleri ızgaraya oturtur, neredeyse aynı satır ya da sütunda olanları hizalar.',
|
|
711
866
|
collapseBand: 'Bölümü daralt',
|
|
712
867
|
expandBand: 'Bölümü genişlet',
|
|
713
868
|
groupByThis: 'Satırları bu değere göre grupla',
|
|
@@ -776,6 +931,8 @@ const weReportLocaleTr = {
|
|
|
776
931
|
functionHelp: {
|
|
777
932
|
Iif: 'İki değer arasında seçer: koşul doğruysa ilki, değilse ikincisi.',
|
|
778
933
|
IsNull: 'Değer boşsa yerine konacak değeri verir.',
|
|
934
|
+
Switch: 'İlk eşleşenin sonucunu verir; örn. Switch([Durum], 1, \'Açık\', 2, \'Kapalı\', \'Diğer\').',
|
|
935
|
+
In: 'Değer diğerlerinden biriyse doğru; örn. In([Sehir], \'Ankara\', \'İzmir\').',
|
|
779
936
|
Concat: 'Metinleri birleştirir.',
|
|
780
937
|
Len: 'Karakter sayısı.',
|
|
781
938
|
Upper: 'BÜYÜK HARF (Türkçe İ/ı doğru).',
|
|
@@ -801,8 +958,17 @@ const weReportLocaleTr = {
|
|
|
801
958
|
Month: 'Tarihin ayı (1–12).',
|
|
802
959
|
Day: 'Ayın günü.',
|
|
803
960
|
AddDays: 'Tarihe gün ekler; örn. vade tarihi.',
|
|
961
|
+
AddMonths: 'Tarihe ay ekler; ayın 31’i kısa ayda ayın son günü olur.',
|
|
962
|
+
AddYears: 'Tarihe yıl ekler.',
|
|
963
|
+
DateDiff: 'İki tarih arasındaki tam gün, ay veya yıl; örn. geciken gün: DateDiff(\'day\', [vade], Today()).',
|
|
964
|
+
Left: 'Metnin baştaki karakterleri.',
|
|
965
|
+
Right: 'Metnin sondaki karakterleri.',
|
|
966
|
+
PadLeft: 'Metni soldan belirli uzunluğa tamamlar; örn. PadLeft([no], 6, \'0\') → 000042.',
|
|
804
967
|
Sum: 'Kapsamdaki satırların toplamı (grup, sayfa veya rapor).',
|
|
805
968
|
RowNumber: 'Satırın sıra numarası: 1, 2, 3 … (her grupta yeniden başlar).',
|
|
969
|
+
RunningSum: 'Şimdiye kadarki toplam: satırda o satıra kadarki (her grupta yeniden başlar), sayfa altlığında sayfa sonuna kadarki tüm satırların toplamı (nakli yekün).',
|
|
970
|
+
CarriedSum: 'Önceki sayfalardaki satırların toplamı — sayfa başlığında “devreden”.',
|
|
971
|
+
SumAll: 'Değerin raporun tüm satırlarındaki toplamı, nerede kullanılırsa kullanılsın: [Tutar] / SumAll([Tutar]) genel toplamdaki paydır.',
|
|
806
972
|
Count: 'Kapsamdaki satır sayısı.',
|
|
807
973
|
Avg: 'Kapsamdaki satırların ortalaması.',
|
|
808
974
|
Min: 'Kapsamdaki en küçük değer (veya iki değerden küçüğü).',
|
|
@@ -848,12 +1014,21 @@ const weReportLocaleDe = {
|
|
|
848
1014
|
checkbox: 'Kontrollkästchen',
|
|
849
1015
|
chart: 'Diagramm',
|
|
850
1016
|
table: 'Tabelle',
|
|
1017
|
+
crosstab: 'Kreuztabelle',
|
|
1018
|
+
subreport: 'Unterbericht',
|
|
851
1019
|
},
|
|
852
1020
|
zoomIn: 'Vergrößern',
|
|
853
1021
|
zoomOut: 'Verkleinern',
|
|
854
1022
|
print: 'Drucken',
|
|
855
1023
|
downloadPdf: 'PDF herunterladen',
|
|
856
1024
|
downloadExcel: 'Excel',
|
|
1025
|
+
documentMap: 'Dokumentstruktur',
|
|
1026
|
+
downloadPng: 'PNG',
|
|
1027
|
+
pngAllPages: 'PNG, alle Seiten (ZIP)',
|
|
1028
|
+
printerOutput: 'Weitere Formate',
|
|
1029
|
+
printerOutputHint: 'CSV für Tabellen; Dateien für Etiketten- und Bondrucker (die Seiten als Bild, das der Drucker direkt druckt).',
|
|
1030
|
+
printerZpl: 'Etikettendrucker (ZPL, 203 dpi)',
|
|
1031
|
+
printerEscPos: 'Bondrucker (ESC/POS)',
|
|
857
1032
|
pageCount: '{0} Seite(n)',
|
|
858
1033
|
problems: 'Probleme',
|
|
859
1034
|
loading: 'Vorschau wird erstellt…',
|
|
@@ -904,6 +1079,8 @@ const weReportLocaleDe = {
|
|
|
904
1079
|
removeBand: 'Abschnitt entfernen',
|
|
905
1080
|
groupBy: 'Gruppieren nach',
|
|
906
1081
|
newText: 'Text',
|
|
1082
|
+
signature: 'Unterschrift',
|
|
1083
|
+
signatureCaption: 'Name · Unterschrift',
|
|
907
1084
|
showData: 'Daten anzeigen',
|
|
908
1085
|
groupLayout: 'Position und Größe',
|
|
909
1086
|
groupContent: 'Inhalt',
|
|
@@ -924,6 +1101,9 @@ const weReportLocaleDe = {
|
|
|
924
1101
|
marginRight: 'Rechts',
|
|
925
1102
|
marginBottom: 'Unten',
|
|
926
1103
|
marginLeft: 'Links',
|
|
1104
|
+
pageColor: 'Seitenfarbe',
|
|
1105
|
+
mirrorMargins: 'Gespiegelte Ränder',
|
|
1106
|
+
mirrorMarginsHint: 'Für Broschüren: auf geraden Seiten tauschen linker und rechter Rand.',
|
|
927
1107
|
left: 'Von links',
|
|
928
1108
|
top: 'Von oben',
|
|
929
1109
|
content: 'Inhalt',
|
|
@@ -939,6 +1119,8 @@ const weReportLocaleDe = {
|
|
|
939
1119
|
formatPercent: 'Prozent',
|
|
940
1120
|
formatDate: 'Datum',
|
|
941
1121
|
formatDateTime: 'Datum und Uhrzeit',
|
|
1122
|
+
formatLongDate: 'Langes Datum (5. Januar 2026)',
|
|
1123
|
+
formatDayDate: 'Mit Wochentag (Montag, 5. Januar 2026)',
|
|
942
1124
|
font: 'Schrift',
|
|
943
1125
|
fontSize: 'Größe',
|
|
944
1126
|
bold: 'Fett',
|
|
@@ -961,6 +1143,8 @@ const weReportLocaleDe = {
|
|
|
961
1143
|
padding: 'Innenabstand',
|
|
962
1144
|
canGrow: 'An Text anpassen',
|
|
963
1145
|
canGrowHint: 'Langer Text macht die Zeile höher, statt abgeschnitten zu werden.',
|
|
1146
|
+
richText: 'Formatierter Text',
|
|
1147
|
+
richTextHint: '**fett**, *kursiv*, __unterstrichen__ und Daten im Text: Sehr geehrte(r) {[name]}',
|
|
964
1148
|
visibleWhen: 'Nur anzeigen, wenn',
|
|
965
1149
|
visibleWhenHint: 'Eine Formel; das Element wird ausgeblendet, wenn sie falsch ist, z. B. [Summe] > 0',
|
|
966
1150
|
symbology: 'Barcode-Typ',
|
|
@@ -998,11 +1182,28 @@ const weReportLocaleDe = {
|
|
|
998
1182
|
sortNone: 'Wie in den Daten',
|
|
999
1183
|
keepTogether: 'Gruppe auf einer Seite halten',
|
|
1000
1184
|
keepTogetherHint: 'Verschiebt die ganze Gruppe auf die nächste Seite, statt sie zu teilen.',
|
|
1185
|
+
groupTop: 'Nur die ersten … Gruppen',
|
|
1186
|
+
groupOrderBy: 'Gruppen ordnen nach',
|
|
1187
|
+
groupOrderByHint: 'Eine Formel je Gruppe, z. B. Sum([amount]): die größten Kunden zuerst.',
|
|
1188
|
+
largestFirst: 'Größte zuerst',
|
|
1189
|
+
keepWithFirstRow: 'Kopf mit der ersten Zeile zusammenhalten',
|
|
1190
|
+
printAtBottom: 'Unten auf der letzten Seite',
|
|
1191
|
+
printAtBottomHint: 'Summen und Unterschriften stehen direkt über dem Seitenfuß, wie kurz die Liste auch ist.',
|
|
1192
|
+
printOnFirstPage: 'Auf der ersten Seite drucken',
|
|
1193
|
+
printOnLastPage: 'Auf der letzten Seite drucken',
|
|
1194
|
+
bookmark: 'Lesezeichen',
|
|
1195
|
+
bookmarkHint: 'Ein Eintrag in den PDF-Lesezeichen und der Dokumentstruktur der Vorschau, z. B. der Kundenname.',
|
|
1196
|
+
alternateBackground: 'Jede zweite Zeile',
|
|
1197
|
+
bandVisible: 'Nur drucken, wenn',
|
|
1198
|
+
bandVisibleHint: 'Eine Formel, z. B. [Discount] > 0; sonst entfällt der Abschnitt (seine Zeilen zählen in Summen weiter).',
|
|
1199
|
+
resetPageNumber: 'Neue Seite und Seitenzahlen je Gruppe',
|
|
1200
|
+
resetPageNumberHint: 'Jede Gruppe beginnt auf einer neuen Seite, gezählt ab 1 – z. B. ein Kontoauszug je Kunde, jeweils „Seite 1 von 2“.',
|
|
1001
1201
|
repeatOnEveryPage: 'Auf jeder Seite wiederholen',
|
|
1002
1202
|
pageBreakBefore: 'Auf neuer Seite beginnen',
|
|
1003
1203
|
pageBreakAfter: 'Danach neue Seite',
|
|
1004
1204
|
dataRows: 'Zeilen kommen aus',
|
|
1005
1205
|
dataRowsHint: 'Pfad zur Liste in den Daten, z. B. lines',
|
|
1206
|
+
hostDataNote: 'Die Zeilen des Berichts kommen aus der Anwendung; diese Daten gelten nur, wenn sie keine liefert.',
|
|
1006
1207
|
dataSources: 'Datenquellen',
|
|
1007
1208
|
close: 'Schließen',
|
|
1008
1209
|
rowsSource: 'Zeilen',
|
|
@@ -1014,6 +1215,13 @@ const weReportLocaleDe = {
|
|
|
1014
1215
|
parameterType: 'Typ',
|
|
1015
1216
|
parameterLabel: 'Angezeigte Beschriftung',
|
|
1016
1217
|
defaultValue: 'Standardwert',
|
|
1218
|
+
calculatedFields: 'Berechnete Felder',
|
|
1219
|
+
calculatedFieldsHint: 'Eine Formel je Zeile, die wie ein Datenfeld benutzt wird, z. B. total = [qty] * [price], dann überall [total].',
|
|
1220
|
+
calculatedFieldName: 'Feldname',
|
|
1221
|
+
addCalculatedField: 'Berechnetes Feld hinzufügen',
|
|
1222
|
+
parameterChoices: 'Auswahl: A, B, C (optional)',
|
|
1223
|
+
parameterChoicesFrom: 'Liste aus einem Datenfeld',
|
|
1224
|
+
parameterNoList: 'Freie Eingabe',
|
|
1017
1225
|
addParameter: 'Parameter hinzufügen',
|
|
1018
1226
|
sourceName: 'Name',
|
|
1019
1227
|
wholeData: '(die gesamten Daten)',
|
|
@@ -1058,6 +1266,9 @@ const weReportLocaleDe = {
|
|
|
1058
1266
|
rowLimitReached: '(Zeilenlimit erreicht – es gibt weitere Zeilen)',
|
|
1059
1267
|
viaBackend: 'Über das Daten-Backend aufrufen',
|
|
1060
1268
|
viaBackendHint: 'Verwenden, wenn der Dienst Browser-Aufrufe blockiert (CORS) oder einen geheimen Schlüssel braucht.',
|
|
1269
|
+
paging: 'Seitenweise API',
|
|
1270
|
+
pagingHint: 'Lädt alle Seiten: {{page}} (1, 2, 3 …) oder {{offset}} und {{size}} in die Adresse schreiben.',
|
|
1271
|
+
pageSize: 'Zeilen pro Seite',
|
|
1061
1272
|
autoDesign: 'Aus Daten entwerfen',
|
|
1062
1273
|
autoDesignHint: 'Erstellt eine übersichtliche Liste Ihrer Daten mit Überschriften, Summen und Seitenzahlen. Rückgängig stellt Ihren Entwurf wieder her.',
|
|
1063
1274
|
newReportTitle: 'Bericht',
|
|
@@ -1069,6 +1280,7 @@ const weReportLocaleDe = {
|
|
|
1069
1280
|
issueEmptyFormula: 'hat eine leere Formel',
|
|
1070
1281
|
issueOverlap: 'überlappt {0}',
|
|
1071
1282
|
issueOutsideColumn: 'ragt über seine Spalte ins nächste Etikett',
|
|
1283
|
+
issueCheckDigit: 'hat eine falsche Prüfziffer (die letzte Ziffer muss {0} sein); nicht lesbar',
|
|
1072
1284
|
fixIt: 'Beheben',
|
|
1073
1285
|
noProblems: 'Keine Probleme gefunden.',
|
|
1074
1286
|
chartType: 'Diagrammtyp',
|
|
@@ -1077,6 +1289,12 @@ const weReportLocaleDe = {
|
|
|
1077
1289
|
chartLine: 'Linie',
|
|
1078
1290
|
chartPie: 'Kreis',
|
|
1079
1291
|
chartDoughnut: 'Ring',
|
|
1292
|
+
chartMax: 'Voll bei',
|
|
1293
|
+
chartDataBar: 'Datenbalken',
|
|
1294
|
+
chartGauge: 'Tacho',
|
|
1295
|
+
chartSparkline: 'Sparkline',
|
|
1296
|
+
chartRows: 'Zeilen aus einer Liste der Zeile',
|
|
1297
|
+
chartRowsHint: 'Z. B. [months]: ein kleines Diagramm in jeder Detailzeile aus deren eigener Liste. Felder als Gruppierung / Wert (bei Sparkline darf Gruppierung leer sein).',
|
|
1080
1298
|
chartCategory: 'Gruppieren nach',
|
|
1081
1299
|
chartValue: 'Wert',
|
|
1082
1300
|
chartAggregate: 'Berechnung',
|
|
@@ -1089,6 +1307,24 @@ const weReportLocaleDe = {
|
|
|
1089
1307
|
showValues: 'Werte anzeigen',
|
|
1090
1308
|
showLegend: 'Legende anzeigen',
|
|
1091
1309
|
chartHint: 'Ein Diagramm zeigt die Zeilen seines Abschnitts: alle Zeilen im Berichtskopf oder -fuß, die Zeilen der Gruppe im Gruppenfuß.',
|
|
1310
|
+
crosstabHint: 'Eine Kreuztabelle fasst die Zeilen ihres Abschnitts zusammen: eine Zeile je Wert eines Feldes, eine Spalte je Wert eines anderen. Im Berichtskopf oder -fuß alle Zeilen, im Gruppenfuß die der Gruppe.',
|
|
1311
|
+
crosstabRows: 'Zeilen',
|
|
1312
|
+
crosstabColumns: 'Spalten',
|
|
1313
|
+
crosstabValue: 'Wert',
|
|
1314
|
+
crosstabTotals: 'Summenzeile und -spalte',
|
|
1315
|
+
crosstabTitle: 'Ecktext',
|
|
1316
|
+
subreportHint: 'Ein eigener Bericht in diesem Feld, z. B. die Bestellungen unter jedem Kunden. Das Feld wächst mit seinen Zeilen.',
|
|
1317
|
+
subreportEdit: 'Unterbericht bearbeiten…',
|
|
1318
|
+
subreportLoad: 'Gespeicherten Bericht verwenden…',
|
|
1319
|
+
subreportLoadFailed: 'Die Datei ist kein we-report-Bericht (.wrpt.json).',
|
|
1320
|
+
subreportRows: 'Seine Zeilen kommen aus',
|
|
1321
|
+
subreportRowsHint: 'Leer: die eigenen Daten des Unterberichts. Für eine Liste in jeder Zeile z. B. [orders].',
|
|
1322
|
+
subreportFilter: 'Nur Zeilen zeigen, bei denen',
|
|
1323
|
+
subreportFilterHint: 'Z. B. [CustomerId] = [^.Id] — [^.feld] liest die Zeile um das Feld.',
|
|
1324
|
+
subreportParams: 'Parameterwerte',
|
|
1325
|
+
subreportTitle: 'Unterbericht: {0}',
|
|
1326
|
+
subreportDone: 'Fertig',
|
|
1327
|
+
subreportPageHint: 'Ein Unterbericht ist so breit wie sein Feld; Papier und Ränder kommen vom umgebenden Bericht.',
|
|
1092
1328
|
conditionalFormatting: 'Bedingte Formatierung',
|
|
1093
1329
|
watermark: 'Wasserzeichen',
|
|
1094
1330
|
firstPage: 'Erste Seite',
|
|
@@ -1117,10 +1353,12 @@ const weReportLocaleDe = {
|
|
|
1117
1353
|
wizardTotals: 'Summen der Zahlenspalten',
|
|
1118
1354
|
automatic: 'Automatisch',
|
|
1119
1355
|
createReport: 'Bericht erstellen',
|
|
1120
|
-
issueTextCut: 'Der Text passt nicht in sein Feld und wird abgeschnitten.',
|
|
1356
|
+
issueTextCut: 'Der Text passt nicht in sein Feld und wird abgeschnitten (eine Zahl wird kleiner gedruckt).',
|
|
1121
1357
|
stretch: 'Bis zum unteren Rand verlängern, wenn der Bereich wächst',
|
|
1122
1358
|
stretchHint: 'Für Zellrahmen und Spaltenlinien neben einem wachsenden Text.',
|
|
1123
1359
|
fitToText: 'Größe an Text anpassen',
|
|
1360
|
+
tidyUp: 'Aufräumen',
|
|
1361
|
+
tidyUpHint: 'Legt die Elemente aufs Raster und richtet fast gleiche Zeilen und Spalten aus.',
|
|
1124
1362
|
collapseBand: 'Bereich einklappen',
|
|
1125
1363
|
expandBand: 'Bereich ausklappen',
|
|
1126
1364
|
groupByThis: 'Zeilen nach diesem Wert gruppieren',
|
|
@@ -1189,6 +1427,8 @@ const weReportLocaleDe = {
|
|
|
1189
1427
|
functionHelp: {
|
|
1190
1428
|
Iif: 'Wählt zwischen zwei Werten: den ersten, wenn die Bedingung wahr ist, sonst den zweiten.',
|
|
1191
1429
|
IsNull: 'Der Wert oder der Ersatzwert, wenn er leer ist.',
|
|
1430
|
+
Switch: 'Ergebnis des ersten Treffers, z. B. Switch([Status], 1, \'Offen\', 2, \'Geschlossen\', \'Andere\').',
|
|
1431
|
+
In: 'Wahr, wenn der Wert einer der anderen ist, z. B. In([City], \'Berlin\', \'Köln\').',
|
|
1192
1432
|
Concat: 'Verbindet Texte.',
|
|
1193
1433
|
Len: 'Anzahl der Zeichen.',
|
|
1194
1434
|
Upper: 'GROSSBUCHSTABEN (türkisches İ/ı berücksichtigt).',
|
|
@@ -1214,8 +1454,17 @@ const weReportLocaleDe = {
|
|
|
1214
1454
|
Month: 'Monat eines Datums (1–12).',
|
|
1215
1455
|
Day: 'Tag des Monats.',
|
|
1216
1456
|
AddDays: 'Ein um Tage verschobenes Datum, z. B. ein Fälligkeitsdatum.',
|
|
1457
|
+
AddMonths: 'Ein um Monate verschobenes Datum; der 31. wird in kürzeren Monaten zum Monatsletzten.',
|
|
1458
|
+
AddYears: 'Ein um Jahre verschobenes Datum.',
|
|
1459
|
+
DateDiff: 'Ganze Tage, Monate oder Jahre zwischen zwei Daten, z. B. Verzugstage: DateDiff(\'day\', [due], Today()).',
|
|
1460
|
+
Left: 'Die ersten Zeichen eines Textes.',
|
|
1461
|
+
Right: 'Die letzten Zeichen eines Textes.',
|
|
1462
|
+
PadLeft: 'Füllt einen Text links bis zu einer Länge auf, z. B. PadLeft([no], 6, \'0\') → 000042.',
|
|
1217
1463
|
Sum: 'Summe über die Zeilen im Bereich (Gruppe, Seite oder Bericht).',
|
|
1218
1464
|
RowNumber: 'Position der Zeile: 1, 2, 3 … (beginnt in jeder Gruppe neu).',
|
|
1465
|
+
RunningSum: 'Bisherige Summe: in einer Zeile bis zu dieser Zeile, im Seitenfuß bis zum Seitenende (Übertrag).',
|
|
1466
|
+
CarriedSum: 'Summe der Zeilen auf den vorigen Seiten — „Übertrag“ im Seitenkopf.',
|
|
1467
|
+
SumAll: 'Summe des Werts über alle Zeilen des Berichts, wo auch immer verwendet: [Betrag] / SumAll([Betrag]) ist der Anteil an der Gesamtsumme.',
|
|
1219
1468
|
Count: 'Anzahl der Zeilen im Bereich.',
|
|
1220
1469
|
Avg: 'Durchschnitt über die Zeilen im Bereich.',
|
|
1221
1470
|
Min: 'Kleinster Wert im Bereich (oder von zwei Werten).',
|
|
@@ -1257,12 +1506,21 @@ const weReportLocaleFr = {
|
|
|
1257
1506
|
checkbox: 'Case à cocher',
|
|
1258
1507
|
chart: 'Graphique',
|
|
1259
1508
|
table: 'Tableau',
|
|
1509
|
+
crosstab: 'Tableau croisé',
|
|
1510
|
+
subreport: 'Sous-rapport',
|
|
1260
1511
|
},
|
|
1261
1512
|
zoomIn: 'Zoom avant',
|
|
1262
1513
|
zoomOut: 'Zoom arrière',
|
|
1263
1514
|
print: 'Imprimer',
|
|
1264
1515
|
downloadPdf: 'Télécharger le PDF',
|
|
1265
1516
|
downloadExcel: 'Excel',
|
|
1517
|
+
documentMap: 'Plan du document',
|
|
1518
|
+
downloadPng: 'PNG',
|
|
1519
|
+
pngAllPages: 'PNG, toutes les pages (ZIP)',
|
|
1520
|
+
printerOutput: 'Autres formats',
|
|
1521
|
+
printerOutputHint: 'CSV pour les tableurs ; fichiers pour imprimantes d’étiquettes et de tickets (les pages en image imprimée directement).',
|
|
1522
|
+
printerZpl: 'Imprimante d’étiquettes (ZPL, 203 dpi)',
|
|
1523
|
+
printerEscPos: 'Imprimante de tickets (ESC/POS)',
|
|
1266
1524
|
pageCount: '{0} page(s)',
|
|
1267
1525
|
problems: 'Problèmes',
|
|
1268
1526
|
loading: 'Préparation de l’aperçu…',
|
|
@@ -1313,6 +1571,8 @@ const weReportLocaleFr = {
|
|
|
1313
1571
|
removeBand: 'Supprimer la section',
|
|
1314
1572
|
groupBy: 'Grouper par',
|
|
1315
1573
|
newText: 'Texte',
|
|
1574
|
+
signature: 'Signature',
|
|
1575
|
+
signatureCaption: 'Nom · Signature',
|
|
1316
1576
|
showData: 'Afficher les données',
|
|
1317
1577
|
groupLayout: 'Position et taille',
|
|
1318
1578
|
groupContent: 'Contenu',
|
|
@@ -1333,6 +1593,9 @@ const weReportLocaleFr = {
|
|
|
1333
1593
|
marginRight: 'Droite',
|
|
1334
1594
|
marginBottom: 'Bas',
|
|
1335
1595
|
marginLeft: 'Gauche',
|
|
1596
|
+
pageColor: 'Couleur de page',
|
|
1597
|
+
mirrorMargins: 'Marges en miroir',
|
|
1598
|
+
mirrorMarginsHint: 'Pour les livrets : sur les pages paires, les marges gauche et droite s’inversent.',
|
|
1336
1599
|
left: 'Depuis la gauche',
|
|
1337
1600
|
top: 'Depuis le haut',
|
|
1338
1601
|
content: 'Contenu',
|
|
@@ -1348,6 +1611,8 @@ const weReportLocaleFr = {
|
|
|
1348
1611
|
formatPercent: 'Pourcentage',
|
|
1349
1612
|
formatDate: 'Date',
|
|
1350
1613
|
formatDateTime: 'Date et heure',
|
|
1614
|
+
formatLongDate: 'Date longue (5 janvier 2026)',
|
|
1615
|
+
formatDayDate: 'Avec le jour (lundi 5 janvier 2026)',
|
|
1351
1616
|
font: 'Police',
|
|
1352
1617
|
fontSize: 'Taille',
|
|
1353
1618
|
bold: 'Gras',
|
|
@@ -1370,6 +1635,8 @@ const weReportLocaleFr = {
|
|
|
1370
1635
|
padding: 'Marge intérieure',
|
|
1371
1636
|
canGrow: 'Agrandir selon le texte',
|
|
1372
1637
|
canGrowHint: 'Un texte long agrandit la ligne au lieu d’être coupé.',
|
|
1638
|
+
richText: 'Texte enrichi',
|
|
1639
|
+
richTextHint: '**gras**, *italique*, __souligné__ et données dans le texte : Cher {[name]}',
|
|
1373
1640
|
visibleWhen: 'Afficher seulement si',
|
|
1374
1641
|
visibleWhenHint: 'Une formule ; l’élément est masqué quand elle est fausse, ex. [Total] > 0',
|
|
1375
1642
|
symbology: 'Type de code-barres',
|
|
@@ -1407,11 +1674,28 @@ const weReportLocaleFr = {
|
|
|
1407
1674
|
sortNone: 'Comme dans les données',
|
|
1408
1675
|
keepTogether: 'Garder le groupe sur une page',
|
|
1409
1676
|
keepTogetherHint: 'Déplace tout le groupe sur la page suivante au lieu de le couper.',
|
|
1677
|
+
groupTop: 'Seulement les … premiers groupes',
|
|
1678
|
+
groupOrderBy: 'Trier les groupes par',
|
|
1679
|
+
groupOrderByHint: 'Une formule par groupe, ex. Sum([amount]) : les plus gros clients d’abord.',
|
|
1680
|
+
largestFirst: 'Le plus grand d’abord',
|
|
1681
|
+
keepWithFirstRow: 'Garder l’en-tête avec la première ligne',
|
|
1682
|
+
printAtBottom: 'En bas de la dernière page',
|
|
1683
|
+
printAtBottomHint: 'Les totaux et signatures se placent juste au-dessus du pied de page, même si la liste est courte.',
|
|
1684
|
+
printOnFirstPage: 'Imprimer sur la première page',
|
|
1685
|
+
printOnLastPage: 'Imprimer sur la dernière page',
|
|
1686
|
+
bookmark: 'Signet',
|
|
1687
|
+
bookmarkHint: 'Une entrée des signets PDF et du plan du document de l’aperçu, ex. le nom du client.',
|
|
1688
|
+
alternateBackground: 'Une ligne sur deux',
|
|
1689
|
+
bandVisible: 'Imprimer seulement si',
|
|
1690
|
+
bandVisibleHint: 'Une formule, ex. [Discount] > 0 ; sinon la section est omise (ses lignes comptent toujours dans les totaux).',
|
|
1691
|
+
resetPageNumber: 'Nouvelle page et numéros par groupe',
|
|
1692
|
+
resetPageNumberHint: 'Chaque groupe commence sur une nouvelle page numérotée à partir de 1 — ex. un relevé par client, chacun « page 1 sur 2 ».',
|
|
1410
1693
|
repeatOnEveryPage: 'Répéter sur chaque page',
|
|
1411
1694
|
pageBreakBefore: 'Commencer sur une nouvelle page',
|
|
1412
1695
|
pageBreakAfter: 'Nouvelle page après',
|
|
1413
1696
|
dataRows: 'Les lignes viennent de',
|
|
1414
1697
|
dataRowsHint: 'Chemin de la liste dans les données, ex. lines',
|
|
1698
|
+
hostDataNote: 'Les lignes du rapport viennent de l\'application ; ces données ne servent que si elle n\'en fournit pas.',
|
|
1415
1699
|
dataSources: 'Sources de données',
|
|
1416
1700
|
close: 'Fermer',
|
|
1417
1701
|
rowsSource: 'lignes',
|
|
@@ -1423,6 +1707,13 @@ const weReportLocaleFr = {
|
|
|
1423
1707
|
parameterType: 'Type',
|
|
1424
1708
|
parameterLabel: 'Libellé affiché',
|
|
1425
1709
|
defaultValue: 'Valeur par défaut',
|
|
1710
|
+
calculatedFields: 'Champs calculés',
|
|
1711
|
+
calculatedFieldsHint: 'Une formule calculée pour chaque ligne et utilisée comme un champ, ex. total = [qty] * [price], puis [total] partout.',
|
|
1712
|
+
calculatedFieldName: 'Nom du champ',
|
|
1713
|
+
addCalculatedField: 'Ajouter un champ calculé',
|
|
1714
|
+
parameterChoices: 'Choix : A, B, C (facultatif)',
|
|
1715
|
+
parameterChoicesFrom: 'Liste depuis un champ de données',
|
|
1716
|
+
parameterNoList: 'Saisie libre',
|
|
1426
1717
|
addParameter: 'Ajouter un paramètre',
|
|
1427
1718
|
sourceName: 'Nom',
|
|
1428
1719
|
wholeData: '(toutes les données)',
|
|
@@ -1467,6 +1758,9 @@ const weReportLocaleFr = {
|
|
|
1467
1758
|
rowLimitReached: '(limite de lignes atteinte – il en existe d’autres)',
|
|
1468
1759
|
viaBackend: 'Appeler via le backend de données',
|
|
1469
1760
|
viaBackendHint: 'À utiliser quand le service bloque les appels du navigateur (CORS) ou exige une clé secrète.',
|
|
1761
|
+
paging: 'API paginée',
|
|
1762
|
+
pagingHint: 'Charge toutes les pages : écrivez {{page}} (1, 2, 3 …) ou {{offset}} et {{size}} dans l’adresse.',
|
|
1763
|
+
pageSize: 'Lignes par page',
|
|
1470
1764
|
autoDesign: 'Concevoir à partir des données',
|
|
1471
1765
|
autoDesignHint: 'Crée une liste claire de vos données avec en-têtes, totaux et numéros de page. Annuler rétablit votre conception.',
|
|
1472
1766
|
newReportTitle: 'Rapport',
|
|
@@ -1478,6 +1772,7 @@ const weReportLocaleFr = {
|
|
|
1478
1772
|
issueEmptyFormula: 'a une formule vide',
|
|
1479
1773
|
issueOverlap: 'chevauche {0}',
|
|
1480
1774
|
issueOutsideColumn: 'dépasse sa colonne sur l’étiquette suivante',
|
|
1775
|
+
issueCheckDigit: 'a une clé de contrôle fausse (le dernier chiffre doit être {0}) ; illisible',
|
|
1481
1776
|
fixIt: 'Corriger',
|
|
1482
1777
|
noProblems: 'Aucun problème trouvé.',
|
|
1483
1778
|
chartType: 'Type de graphique',
|
|
@@ -1486,6 +1781,12 @@ const weReportLocaleFr = {
|
|
|
1486
1781
|
chartLine: 'Ligne',
|
|
1487
1782
|
chartPie: 'Secteurs',
|
|
1488
1783
|
chartDoughnut: 'Anneau',
|
|
1784
|
+
chartMax: 'Plein à',
|
|
1785
|
+
chartDataBar: 'Barre de données',
|
|
1786
|
+
chartGauge: 'Jauge',
|
|
1787
|
+
chartSparkline: 'Sparkline',
|
|
1788
|
+
chartRows: 'Lignes depuis une liste de la ligne',
|
|
1789
|
+
chartRowsHint: 'Par ex. [months] : un petit graphique dans chaque ligne de détail, depuis sa propre liste. Ses champs en Grouper par / Valeur (vide pour une sparkline).',
|
|
1489
1790
|
chartCategory: 'Grouper par',
|
|
1490
1791
|
chartValue: 'Valeur',
|
|
1491
1792
|
chartAggregate: 'Calcul',
|
|
@@ -1498,6 +1799,24 @@ const weReportLocaleFr = {
|
|
|
1498
1799
|
showValues: 'Afficher les valeurs',
|
|
1499
1800
|
showLegend: 'Afficher la légende',
|
|
1500
1801
|
chartHint: 'Un graphique montre les lignes de sa section : toutes les lignes dans un en-tête ou pied de rapport, celles du groupe dans un pied de groupe.',
|
|
1802
|
+
crosstabHint: 'Un tableau croisé résume les lignes de sa section : une ligne par valeur d’un champ, une colonne par valeur d’un autre. Dans un en-tête ou pied de rapport toutes les lignes, dans un pied de groupe celles du groupe.',
|
|
1803
|
+
crosstabRows: 'Lignes',
|
|
1804
|
+
crosstabColumns: 'Colonnes',
|
|
1805
|
+
crosstabValue: 'Valeur',
|
|
1806
|
+
crosstabTotals: 'Ligne et colonne de totaux',
|
|
1807
|
+
crosstabTitle: 'Texte du coin',
|
|
1808
|
+
subreportHint: 'Un rapport distinct imprimé dans ce cadre, par ex. les commandes sous chaque client. Le cadre s’agrandit selon ses lignes.',
|
|
1809
|
+
subreportEdit: 'Modifier le sous-rapport…',
|
|
1810
|
+
subreportLoad: 'Utiliser un rapport enregistré…',
|
|
1811
|
+
subreportLoadFailed: 'Le fichier n’est pas un rapport we-report (.wrpt.json).',
|
|
1812
|
+
subreportRows: 'Ses lignes viennent de',
|
|
1813
|
+
subreportRowsHint: 'Vide : les données propres du sous-rapport. Pour une liste dans chaque ligne, écrivez par ex. [orders].',
|
|
1814
|
+
subreportFilter: 'Afficher seulement les lignes où',
|
|
1815
|
+
subreportFilterHint: 'Par ex. [CustomerId] = [^.Id] — [^.champ] lit la ligne autour du cadre.',
|
|
1816
|
+
subreportParams: 'Valeurs des paramètres',
|
|
1817
|
+
subreportTitle: 'Sous-rapport : {0}',
|
|
1818
|
+
subreportDone: 'Terminé',
|
|
1819
|
+
subreportPageHint: 'Un sous-rapport a la largeur de son cadre ; le papier et les marges viennent du rapport autour.',
|
|
1501
1820
|
conditionalFormatting: 'Mise en forme conditionnelle',
|
|
1502
1821
|
watermark: 'Filigrane',
|
|
1503
1822
|
firstPage: 'Première page',
|
|
@@ -1526,10 +1845,12 @@ const weReportLocaleFr = {
|
|
|
1526
1845
|
wizardTotals: 'Totaux des colonnes numériques',
|
|
1527
1846
|
automatic: 'Automatique',
|
|
1528
1847
|
createReport: 'Créer le rapport',
|
|
1529
|
-
issueTextCut: 'Le texte ne tient pas dans sa zone et est
|
|
1848
|
+
issueTextCut: 'Le texte ne tient pas dans sa zone et est coupé (un nombre est imprimé plus petit).',
|
|
1530
1849
|
stretch: 'Prolonger jusqu’en bas quand la section s’agrandit',
|
|
1531
1850
|
stretchHint: 'Pour les bordures de cellule et les lignes de colonne à côté d’un texte qui s’agrandit.',
|
|
1532
1851
|
fitToText: 'Ajuster la taille au texte',
|
|
1852
|
+
tidyUp: 'Ranger',
|
|
1853
|
+
tidyUpHint: 'Place les éléments sur la grille et aligne ceux qui sont presque sur une même ligne ou colonne.',
|
|
1533
1854
|
collapseBand: 'Réduire la section',
|
|
1534
1855
|
expandBand: 'Développer la section',
|
|
1535
1856
|
groupByThis: 'Regrouper les lignes par cette valeur',
|
|
@@ -1598,6 +1919,8 @@ const weReportLocaleFr = {
|
|
|
1598
1919
|
functionHelp: {
|
|
1599
1920
|
Iif: 'Choisit entre deux valeurs : la première si la condition est vraie, sinon la seconde.',
|
|
1600
1921
|
IsNull: 'La valeur, ou la valeur de repli si elle est vide.',
|
|
1922
|
+
Switch: 'Le résultat de la première correspondance, ex. Switch([Status], 1, \'Ouvert\', 2, \'Fermé\', \'Autre\').',
|
|
1923
|
+
In: 'Vrai si la valeur est l’une des autres, ex. In([City], \'Paris\', \'Lyon\').',
|
|
1601
1924
|
Concat: 'Assemble des textes.',
|
|
1602
1925
|
Len: 'Nombre de caractères.',
|
|
1603
1926
|
Upper: 'MAJUSCULES (İ/ı turcs gérés).',
|
|
@@ -1623,8 +1946,17 @@ const weReportLocaleFr = {
|
|
|
1623
1946
|
Month: 'Mois d’une date (1–12).',
|
|
1624
1947
|
Day: 'Jour du mois.',
|
|
1625
1948
|
AddDays: 'Une date décalée d’un nombre de jours, ex. une échéance.',
|
|
1949
|
+
AddMonths: 'Une date décalée de mois ; le 31 devient le dernier jour d’un mois plus court.',
|
|
1950
|
+
AddYears: 'Une date décalée d’années.',
|
|
1951
|
+
DateDiff: 'Jours, mois ou années entiers entre deux dates, ex. jours de retard : DateDiff(\'day\', [due], Today()).',
|
|
1952
|
+
Left: 'Les premiers caractères d’un texte.',
|
|
1953
|
+
Right: 'Les derniers caractères d’un texte.',
|
|
1954
|
+
PadLeft: 'Complète un texte à gauche jusqu’à une longueur, ex. PadLeft([no], 6, \'0\') → 000042.',
|
|
1626
1955
|
Sum: 'Total des lignes concernées (groupe, page ou rapport).',
|
|
1627
1956
|
RowNumber: 'Position de la ligne : 1, 2, 3 … (recommence dans chaque groupe).',
|
|
1957
|
+
RunningSum: 'Total cumulé : dans une ligne, jusqu’à cette ligne ; en pied de page, jusqu’à la fin de la page (à reporter).',
|
|
1958
|
+
CarriedSum: 'Total des lignes des pages précédentes — « report » en en-tête de page.',
|
|
1959
|
+
SumAll: 'Total de la valeur sur toutes les lignes du rapport, où qu\'il soit utilisé : [Montant] / SumAll([Montant]) est la part du total général.',
|
|
1628
1960
|
Count: 'Nombre de lignes concernées.',
|
|
1629
1961
|
Avg: 'Moyenne des lignes concernées.',
|
|
1630
1962
|
Min: 'Plus petite valeur des lignes concernées (ou de deux valeurs).',
|
|
@@ -1666,12 +1998,21 @@ const weReportLocaleEs = {
|
|
|
1666
1998
|
checkbox: 'Casilla',
|
|
1667
1999
|
chart: 'Gráfico',
|
|
1668
2000
|
table: 'Tabla',
|
|
2001
|
+
crosstab: 'Tabla cruzada',
|
|
2002
|
+
subreport: 'Subinforme',
|
|
1669
2003
|
},
|
|
1670
2004
|
zoomIn: 'Acercar',
|
|
1671
2005
|
zoomOut: 'Alejar',
|
|
1672
2006
|
print: 'Imprimir',
|
|
1673
2007
|
downloadPdf: 'Descargar PDF',
|
|
1674
2008
|
downloadExcel: 'Excel',
|
|
2009
|
+
documentMap: 'Mapa del documento',
|
|
2010
|
+
downloadPng: 'PNG',
|
|
2011
|
+
pngAllPages: 'PNG, todas las páginas (ZIP)',
|
|
2012
|
+
printerOutput: 'Más formatos',
|
|
2013
|
+
printerOutputHint: 'CSV para hojas de cálculo; archivos para impresoras de etiquetas y tickets (las páginas como imagen que la impresora imprime directamente).',
|
|
2014
|
+
printerZpl: 'Impresora de etiquetas (ZPL, 203 dpi)',
|
|
2015
|
+
printerEscPos: 'Impresora de tickets (ESC/POS)',
|
|
1675
2016
|
pageCount: '{0} página(s)',
|
|
1676
2017
|
problems: 'Problemas',
|
|
1677
2018
|
loading: 'Preparando la vista previa…',
|
|
@@ -1722,6 +2063,8 @@ const weReportLocaleEs = {
|
|
|
1722
2063
|
removeBand: 'Quitar sección',
|
|
1723
2064
|
groupBy: 'Agrupar por',
|
|
1724
2065
|
newText: 'Texto',
|
|
2066
|
+
signature: 'Firma',
|
|
2067
|
+
signatureCaption: 'Nombre · Firma',
|
|
1725
2068
|
showData: 'Mostrar datos',
|
|
1726
2069
|
groupLayout: 'Posición y tamaño',
|
|
1727
2070
|
groupContent: 'Contenido',
|
|
@@ -1742,6 +2085,9 @@ const weReportLocaleEs = {
|
|
|
1742
2085
|
marginRight: 'Derecho',
|
|
1743
2086
|
marginBottom: 'Inferior',
|
|
1744
2087
|
marginLeft: 'Izquierdo',
|
|
2088
|
+
pageColor: 'Color de página',
|
|
2089
|
+
mirrorMargins: 'Márgenes simétricos',
|
|
2090
|
+
mirrorMarginsHint: 'Para folletos: en las páginas pares se intercambian los márgenes izquierdo y derecho.',
|
|
1745
2091
|
left: 'Desde la izquierda',
|
|
1746
2092
|
top: 'Desde arriba',
|
|
1747
2093
|
content: 'Contenido',
|
|
@@ -1757,6 +2103,8 @@ const weReportLocaleEs = {
|
|
|
1757
2103
|
formatPercent: 'Porcentaje',
|
|
1758
2104
|
formatDate: 'Fecha',
|
|
1759
2105
|
formatDateTime: 'Fecha y hora',
|
|
2106
|
+
formatLongDate: 'Fecha larga (5 de enero de 2026)',
|
|
2107
|
+
formatDayDate: 'Con el día (lunes, 5 de enero de 2026)',
|
|
1760
2108
|
font: 'Fuente',
|
|
1761
2109
|
fontSize: 'Tamaño',
|
|
1762
2110
|
bold: 'Negrita',
|
|
@@ -1779,6 +2127,8 @@ const weReportLocaleEs = {
|
|
|
1779
2127
|
padding: 'Espaciado interior',
|
|
1780
2128
|
canGrow: 'Crecer según el texto',
|
|
1781
2129
|
canGrowHint: 'Un texto largo hace la fila más alta en lugar de cortarse.',
|
|
2130
|
+
richText: 'Texto enriquecido',
|
|
2131
|
+
richTextHint: '**negrita**, *cursiva*, __subrayado__ y datos dentro del texto: Estimado {[name]}',
|
|
1782
2132
|
visibleWhen: 'Mostrar solo si',
|
|
1783
2133
|
visibleWhenHint: 'Una fórmula; el elemento se oculta cuando es falsa, p. ej. [Total] > 0',
|
|
1784
2134
|
symbology: 'Tipo de código de barras',
|
|
@@ -1816,11 +2166,28 @@ const weReportLocaleEs = {
|
|
|
1816
2166
|
sortNone: 'Como en los datos',
|
|
1817
2167
|
keepTogether: 'Mantener el grupo en una página',
|
|
1818
2168
|
keepTogetherHint: 'Mueve todo el grupo a la página siguiente en lugar de dividirlo.',
|
|
2169
|
+
groupTop: 'Solo los primeros … grupos',
|
|
2170
|
+
groupOrderBy: 'Ordenar grupos por',
|
|
2171
|
+
groupOrderByHint: 'Una fórmula por grupo, p. ej. Sum([amount]): los mayores clientes primero.',
|
|
2172
|
+
largestFirst: 'Mayor primero',
|
|
2173
|
+
keepWithFirstRow: 'Mantener el encabezado con la primera fila',
|
|
2174
|
+
printAtBottom: 'Al pie de la última página',
|
|
2175
|
+
printAtBottomHint: 'Los totales y las firmas quedan justo encima del pie de página, por corta que sea la lista.',
|
|
2176
|
+
printOnFirstPage: 'Imprimir en la primera página',
|
|
2177
|
+
printOnLastPage: 'Imprimir en la última página',
|
|
2178
|
+
bookmark: 'Marcador',
|
|
2179
|
+
bookmarkHint: 'Una entrada en los marcadores del PDF y el mapa del documento de la vista previa, p. ej. el nombre del cliente.',
|
|
2180
|
+
alternateBackground: 'Una fila de cada dos',
|
|
2181
|
+
bandVisible: 'Imprimir solo si',
|
|
2182
|
+
bandVisibleHint: 'Una fórmula, p. ej. [Discount] > 0; si no, la sección se omite (sus filas siguen contando en los totales).',
|
|
2183
|
+
resetPageNumber: 'Página nueva y numeración por grupo',
|
|
2184
|
+
resetPageNumberHint: 'Cada grupo empieza en una página nueva numerada desde 1; p. ej. un extracto por cliente, cada uno «página 1 de 2».',
|
|
1819
2185
|
repeatOnEveryPage: 'Repetir en cada página',
|
|
1820
2186
|
pageBreakBefore: 'Empezar en una página nueva',
|
|
1821
2187
|
pageBreakAfter: 'Página nueva después',
|
|
1822
2188
|
dataRows: 'Las filas vienen de',
|
|
1823
2189
|
dataRowsHint: 'Ruta de la lista dentro de los datos, p. ej. lines',
|
|
2190
|
+
hostDataNote: 'Las filas del informe vienen de la aplicación; estos datos solo se usan si no aporta ninguna.',
|
|
1824
2191
|
dataSources: 'Orígenes de datos',
|
|
1825
2192
|
close: 'Cerrar',
|
|
1826
2193
|
rowsSource: 'filas',
|
|
@@ -1832,6 +2199,13 @@ const weReportLocaleEs = {
|
|
|
1832
2199
|
parameterType: 'Tipo',
|
|
1833
2200
|
parameterLabel: 'Etiqueta mostrada',
|
|
1834
2201
|
defaultValue: 'Valor predeterminado',
|
|
2202
|
+
calculatedFields: 'Campos calculados',
|
|
2203
|
+
calculatedFieldsHint: 'Una fórmula calculada en cada fila y usada como un campo, p. ej. total = [qty] * [price], luego [total] en cualquier lugar.',
|
|
2204
|
+
calculatedFieldName: 'Nombre del campo',
|
|
2205
|
+
addCalculatedField: 'Añadir campo calculado',
|
|
2206
|
+
parameterChoices: 'Opciones: A, B, C (opcional)',
|
|
2207
|
+
parameterChoicesFrom: 'Lista desde un campo de datos',
|
|
2208
|
+
parameterNoList: 'Entrada libre',
|
|
1835
2209
|
addParameter: 'Añadir parámetro',
|
|
1836
2210
|
sourceName: 'Nombre',
|
|
1837
2211
|
wholeData: '(todos los datos)',
|
|
@@ -1876,6 +2250,9 @@ const weReportLocaleEs = {
|
|
|
1876
2250
|
rowLimitReached: '(se alcanzó el límite de filas; hay más)',
|
|
1877
2251
|
viaBackend: 'Llamar a través del backend de datos',
|
|
1878
2252
|
viaBackendHint: 'Úselo cuando el servicio bloquea las llamadas del navegador (CORS) o necesita una clave secreta.',
|
|
2253
|
+
paging: 'API paginada',
|
|
2254
|
+
pagingHint: 'Carga todas las páginas: escriba {{page}} (1, 2, 3 …) o {{offset}} y {{size}} en la dirección.',
|
|
2255
|
+
pageSize: 'Filas por página',
|
|
1879
2256
|
autoDesign: 'Diseñar desde los datos',
|
|
1880
2257
|
autoDesignHint: 'Crea una lista ordenada de sus datos con encabezados, totales y números de página. Deshacer recupera su diseño.',
|
|
1881
2258
|
newReportTitle: 'Informe',
|
|
@@ -1887,6 +2264,7 @@ const weReportLocaleEs = {
|
|
|
1887
2264
|
issueEmptyFormula: 'tiene una fórmula vacía',
|
|
1888
2265
|
issueOverlap: 'se superpone con {0}',
|
|
1889
2266
|
issueOutsideColumn: 'sobrepasa su columna y entra en la etiqueta siguiente',
|
|
2267
|
+
issueCheckDigit: 'tiene un dígito de control incorrecto (el último debe ser {0}); no se podrá leer',
|
|
1890
2268
|
fixIt: 'Corregir',
|
|
1891
2269
|
noProblems: 'No se encontraron problemas.',
|
|
1892
2270
|
chartType: 'Tipo de gráfico',
|
|
@@ -1895,6 +2273,12 @@ const weReportLocaleEs = {
|
|
|
1895
2273
|
chartLine: 'Línea',
|
|
1896
2274
|
chartPie: 'Circular',
|
|
1897
2275
|
chartDoughnut: 'Anillo',
|
|
2276
|
+
chartMax: 'Lleno en',
|
|
2277
|
+
chartDataBar: 'Barra de datos',
|
|
2278
|
+
chartGauge: 'Indicador',
|
|
2279
|
+
chartSparkline: 'Minigráfico',
|
|
2280
|
+
chartRows: 'Filas de una lista de la fila',
|
|
2281
|
+
chartRowsHint: 'P. ej. [months]: un pequeño gráfico en cada fila de detalle, con su propia lista. Sus campos como Agrupar por / Valor (vacío en un minigráfico).',
|
|
1898
2282
|
chartCategory: 'Agrupar por',
|
|
1899
2283
|
chartValue: 'Valor',
|
|
1900
2284
|
chartAggregate: 'Cálculo',
|
|
@@ -1907,6 +2291,24 @@ const weReportLocaleEs = {
|
|
|
1907
2291
|
showValues: 'Mostrar valores',
|
|
1908
2292
|
showLegend: 'Mostrar leyenda',
|
|
1909
2293
|
chartHint: 'Un gráfico muestra las filas de su sección: todas en un encabezado o pie de informe, las del grupo en un pie de grupo.',
|
|
2294
|
+
crosstabHint: 'Una tabla cruzada resume las filas de su sección: una fila por valor de un campo, una columna por valor de otro. En un encabezado o pie de informe todas las filas, en un pie de grupo las del grupo.',
|
|
2295
|
+
crosstabRows: 'Filas',
|
|
2296
|
+
crosstabColumns: 'Columnas',
|
|
2297
|
+
crosstabValue: 'Valor',
|
|
2298
|
+
crosstabTotals: 'Fila y columna de totales',
|
|
2299
|
+
crosstabTitle: 'Texto de la esquina',
|
|
2300
|
+
subreportHint: 'Un informe aparte impreso dentro de este cuadro, p. ej. los pedidos bajo cada cliente. El cuadro crece con sus filas.',
|
|
2301
|
+
subreportEdit: 'Editar subinforme…',
|
|
2302
|
+
subreportLoad: 'Usar un informe guardado…',
|
|
2303
|
+
subreportLoadFailed: 'El archivo no es un informe de we-report (.wrpt.json).',
|
|
2304
|
+
subreportRows: 'Sus filas vienen de',
|
|
2305
|
+
subreportRowsHint: 'Vacío: los datos propios del subinforme. Para una lista dentro de cada fila escriba p. ej. [orders].',
|
|
2306
|
+
subreportFilter: 'Mostrar solo las filas donde',
|
|
2307
|
+
subreportFilterHint: 'P. ej. [CustomerId] = [^.Id] — [^.campo] lee la fila alrededor del cuadro.',
|
|
2308
|
+
subreportParams: 'Valores de parámetros',
|
|
2309
|
+
subreportTitle: 'Subinforme: {0}',
|
|
2310
|
+
subreportDone: 'Listo',
|
|
2311
|
+
subreportPageHint: 'Un subinforme es tan ancho como su cuadro; el papel y los márgenes vienen del informe que lo contiene.',
|
|
1910
2312
|
conditionalFormatting: 'Formato condicional',
|
|
1911
2313
|
watermark: 'Marca de agua',
|
|
1912
2314
|
firstPage: 'Primera página',
|
|
@@ -1935,10 +2337,12 @@ const weReportLocaleEs = {
|
|
|
1935
2337
|
wizardTotals: 'Totales de las columnas numéricas',
|
|
1936
2338
|
automatic: 'Automático',
|
|
1937
2339
|
createReport: 'Crear informe',
|
|
1938
|
-
issueTextCut: 'El texto no cabe en su cuadro y se corta.',
|
|
2340
|
+
issueTextCut: 'El texto no cabe en su cuadro y se corta (un número se imprime más pequeño).',
|
|
1939
2341
|
stretch: 'Extender hasta abajo cuando la sección crece',
|
|
1940
2342
|
stretchHint: 'Para bordes de celda y líneas de columna junto a un texto que crece.',
|
|
1941
2343
|
fitToText: 'Ajustar el tamaño al texto',
|
|
2344
|
+
tidyUp: 'Ordenar',
|
|
2345
|
+
tidyUpHint: 'Coloca los elementos en la cuadrícula y alinea los que están casi en la misma fila o columna.',
|
|
1942
2346
|
collapseBand: 'Contraer la sección',
|
|
1943
2347
|
expandBand: 'Expandir la sección',
|
|
1944
2348
|
groupByThis: 'Agrupar filas por este valor',
|
|
@@ -2007,6 +2411,8 @@ const weReportLocaleEs = {
|
|
|
2007
2411
|
functionHelp: {
|
|
2008
2412
|
Iif: 'Elige entre dos valores: el primero si la condición es verdadera, si no el segundo.',
|
|
2009
2413
|
IsNull: 'El valor, o el valor alternativo si está vacío.',
|
|
2414
|
+
Switch: 'El resultado de la primera coincidencia, p. ej. Switch([Status], 1, \'Abierto\', 2, \'Cerrado\', \'Otro\').',
|
|
2415
|
+
In: 'Verdadero si el valor es uno de los demás, p. ej. In([City], \'Madrid\', \'Sevilla\').',
|
|
2010
2416
|
Concat: 'Une textos.',
|
|
2011
2417
|
Len: 'Número de caracteres.',
|
|
2012
2418
|
Upper: 'MAYÚSCULAS (İ/ı del turco correctas).',
|
|
@@ -2032,8 +2438,17 @@ const weReportLocaleEs = {
|
|
|
2032
2438
|
Month: 'Mes de una fecha (1–12).',
|
|
2033
2439
|
Day: 'Día del mes.',
|
|
2034
2440
|
AddDays: 'Una fecha desplazada unos días, p. ej. un vencimiento.',
|
|
2441
|
+
AddMonths: 'Una fecha desplazada unos meses; el día 31 pasa al último día de un mes más corto.',
|
|
2442
|
+
AddYears: 'Una fecha desplazada unos años.',
|
|
2443
|
+
DateDiff: 'Días, meses o años completos entre dos fechas, p. ej. días de retraso: DateDiff(\'day\', [due], Today()).',
|
|
2444
|
+
Left: 'Los primeros caracteres de un texto.',
|
|
2445
|
+
Right: 'Los últimos caracteres de un texto.',
|
|
2446
|
+
PadLeft: 'Rellena un texto por la izquierda hasta una longitud, p. ej. PadLeft([no], 6, \'0\') → 000042.',
|
|
2035
2447
|
Sum: 'Total de las filas del ámbito (grupo, página o informe).',
|
|
2036
2448
|
RowNumber: 'Posición de la fila: 1, 2, 3 … (se reinicia en cada grupo).',
|
|
2449
|
+
RunningSum: 'Total acumulado: en una fila, hasta esa fila; en el pie de página, hasta el final de la página (suma y sigue).',
|
|
2450
|
+
CarriedSum: 'Total de las filas de las páginas anteriores — «suma anterior» en el encabezado de página.',
|
|
2451
|
+
SumAll: 'Total del valor en todas las filas del informe, se use donde se use: [Importe] / SumAll([Importe]) es la parte del total general.',
|
|
2037
2452
|
Count: 'Número de filas del ámbito.',
|
|
2038
2453
|
Avg: 'Promedio de las filas del ámbito.',
|
|
2039
2454
|
Min: 'Valor más pequeño del ámbito (o de dos valores).',
|
|
@@ -2109,6 +2524,7 @@ const WE_REPORT_DEFAULT_ICONS = {
|
|
|
2109
2524
|
qrcode: svg('<rect x="4" y="4" width="6" height="6"/><rect x="14" y="4" width="6" height="6"/><rect x="4" y="14" width="6" height="6"/><path d="M14 14h2v2h-2zM18 18h2v2h-2zM14 18h2M18 14h2"/>'),
|
|
2110
2525
|
pageInfo: svg('<path d="M6 3h9l4 4v14H6z"/><path d="M14 3v5h5M9 16h6"/>'),
|
|
2111
2526
|
checkbox: svg('<rect x="4" y="4" width="16" height="16" rx="2"/><path d="M8 12l3 3 5-6"/>'),
|
|
2527
|
+
signature: svg('<path d="M4 15c2-4 4-8 5-7s-2 7 0 7 3-5 5-5 1 4 3 4 2-2 3-2"/><path d="M4 20h16"/>'),
|
|
2112
2528
|
preview: svg('<path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/>'),
|
|
2113
2529
|
design: svg('<path d="M12 20h9M16.5 3.5a2.1 2.1 0 013 3L7 19l-4 1 1-4z"/>'),
|
|
2114
2530
|
textLeft: svg('<path d="M4 6h16M4 10h10M4 14h16M4 18h10"/>'),
|
|
@@ -2132,6 +2548,8 @@ const WE_REPORT_DEFAULT_ICONS = {
|
|
|
2132
2548
|
wand: svg('<path d="M4 20L15 9"/><path d="M14 4v3M18 6l-2 2M20 10h-3M17 14l-2-2"/>'),
|
|
2133
2549
|
sum: svg('<path d="M17 5H7l5 7-5 7h10"/>'),
|
|
2134
2550
|
table: svg('<rect x="3" y="5" width="18" height="14" rx="1.5"/><path d="M3 10h18M3 14.5h18M9 5v14M15 5v14"/>'),
|
|
2551
|
+
crosstab: svg('<rect x="3" y="4" width="18" height="16" rx="1.5"/><path d="M3 9h18M9 4v16M3 4l6 5"/><path d="M12.5 13h1.5M16.5 13h1.5M12.5 16.5h1.5M16.5 16.5h1.5"/>'),
|
|
2552
|
+
subreport: svg('<rect x="3" y="3" width="18" height="18" rx="1.5"/><rect x="7" y="9" width="10" height="8" rx="1"/><path d="M7 6h6M9.5 12h5M9.5 14.5h5"/>'),
|
|
2135
2553
|
chart: svg('<path d="M4 20h16"/><rect x="5" y="11" width="3" height="9" rx="0.5"/><rect x="10.5" y="6" width="3" height="14" rx="0.5"/><rect x="16" y="13" width="3" height="7" rx="0.5"/>'),
|
|
2136
2554
|
database: svg('<ellipse cx="12" cy="5" rx="8" ry="3"/><path d="M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/>'),
|
|
2137
2555
|
arrangeLeft: svg('<path d="M4 3v18"/><rect x="7" y="6" width="12" height="4" rx="1"/><rect x="7" y="14" width="7" height="4" rx="1"/>'),
|
|
@@ -2256,6 +2674,155 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2256
2674
|
args: [{ providedIn: 'root' }]
|
|
2257
2675
|
}] });
|
|
2258
2676
|
|
|
2677
|
+
const PT_TO_MM$1 = 25.4 / 72;
|
|
2678
|
+
function fontOf(item) {
|
|
2679
|
+
return `${item.italic ? 'italic ' : ''}${item.bold ? 700 : 400} ${item.size * PT_TO_MM$1}px '${WeReportFontsService.cssFamily(item.fontFamily)}'`;
|
|
2680
|
+
}
|
|
2681
|
+
function loadImage(src) {
|
|
2682
|
+
return new Promise((resolve) => {
|
|
2683
|
+
const img = new Image();
|
|
2684
|
+
img.onload = () => resolve(img);
|
|
2685
|
+
img.onerror = () => resolve(null);
|
|
2686
|
+
img.src = src;
|
|
2687
|
+
});
|
|
2688
|
+
}
|
|
2689
|
+
/** A fetched picture as a PNG/JPEG `data:` URI (other formats, e.g. WebP or SVG, are converted to PNG). */
|
|
2690
|
+
async function pictureDataUri(blob, doc = document) {
|
|
2691
|
+
const read = (b) => new Promise((resolve, reject) => {
|
|
2692
|
+
const reader = new FileReader();
|
|
2693
|
+
reader.onload = () => resolve(reader.result);
|
|
2694
|
+
reader.onerror = () => reject(reader.error);
|
|
2695
|
+
reader.readAsDataURL(b);
|
|
2696
|
+
});
|
|
2697
|
+
if (blob.type === 'image/png' || blob.type === 'image/jpeg')
|
|
2698
|
+
return read(blob);
|
|
2699
|
+
const url = URL.createObjectURL(blob);
|
|
2700
|
+
try {
|
|
2701
|
+
const img = await loadImage(url);
|
|
2702
|
+
if (!img)
|
|
2703
|
+
throw new Error('Not a picture.');
|
|
2704
|
+
const canvas = doc.createElement('canvas');
|
|
2705
|
+
canvas.width = img.naturalWidth;
|
|
2706
|
+
canvas.height = img.naturalHeight;
|
|
2707
|
+
canvas.getContext('2d').drawImage(img, 0, 0);
|
|
2708
|
+
return canvas.toDataURL('image/png');
|
|
2709
|
+
}
|
|
2710
|
+
finally {
|
|
2711
|
+
URL.revokeObjectURL(url);
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
/**
|
|
2715
|
+
* Draws a laid-out page on a canvas, `pxPerMm` pixels per millimetre, from the same positioned
|
|
2716
|
+
* items (and the same registered fonts) as the on-screen SVG and the PDF.
|
|
2717
|
+
*/
|
|
2718
|
+
async function drawPage(page, pxPerMm, doc = document) {
|
|
2719
|
+
const canvas = doc.createElement('canvas');
|
|
2720
|
+
canvas.width = Math.round(page.width * pxPerMm);
|
|
2721
|
+
canvas.height = Math.round(page.height * pxPerMm);
|
|
2722
|
+
const ctx = canvas.getContext('2d');
|
|
2723
|
+
if (!ctx)
|
|
2724
|
+
throw new Error('Canvas is not available.');
|
|
2725
|
+
const texts = page.items.filter((i) => i.kind === 'text');
|
|
2726
|
+
// Canvas text uses only fonts that are already loaded.
|
|
2727
|
+
await Promise.all([...new Set(texts.map(fontOf))].map((f) => doc.fonts?.load(f).catch(() => undefined)));
|
|
2728
|
+
const images = new Map();
|
|
2729
|
+
for (const item of page.items)
|
|
2730
|
+
if (item.kind === 'image' && !images.has(item.src))
|
|
2731
|
+
images.set(item.src, await loadImage(item.src));
|
|
2732
|
+
const hex = (c) => (parseHexColor(c) ? c : null);
|
|
2733
|
+
ctx.fillStyle = '#ffffff';
|
|
2734
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
2735
|
+
ctx.scale(pxPerMm, pxPerMm);
|
|
2736
|
+
ctx.lineCap = 'square';
|
|
2737
|
+
const paint = (fill, stroke, width, path) => {
|
|
2738
|
+
ctx.beginPath();
|
|
2739
|
+
path();
|
|
2740
|
+
if (hex(fill)) {
|
|
2741
|
+
ctx.fillStyle = fill;
|
|
2742
|
+
ctx.fill();
|
|
2743
|
+
}
|
|
2744
|
+
if (hex(stroke)) {
|
|
2745
|
+
ctx.strokeStyle = stroke;
|
|
2746
|
+
ctx.lineWidth = width ?? 0.25;
|
|
2747
|
+
ctx.stroke();
|
|
2748
|
+
}
|
|
2749
|
+
};
|
|
2750
|
+
for (const item of page.items) {
|
|
2751
|
+
switch (item.kind) {
|
|
2752
|
+
case 'rect':
|
|
2753
|
+
paint(item.fill, item.stroke, item.strokeWidth, () => item.radius ? ctx.roundRect(item.x, item.y, item.width, item.height, item.radius) : ctx.rect(item.x, item.y, item.width, item.height));
|
|
2754
|
+
break;
|
|
2755
|
+
case 'ellipse':
|
|
2756
|
+
paint(item.fill, item.stroke, item.strokeWidth, () => ctx.ellipse(item.x + item.width / 2, item.y + item.height / 2, item.width / 2, item.height / 2, 0, 0, Math.PI * 2));
|
|
2757
|
+
break;
|
|
2758
|
+
case 'line':
|
|
2759
|
+
paint(undefined, item.color, item.width, () => {
|
|
2760
|
+
ctx.moveTo(item.x1, item.y1);
|
|
2761
|
+
ctx.lineTo(item.x2, item.y2);
|
|
2762
|
+
});
|
|
2763
|
+
break;
|
|
2764
|
+
case 'text': {
|
|
2765
|
+
ctx.save();
|
|
2766
|
+
ctx.beginPath();
|
|
2767
|
+
ctx.rect(item.x, item.y, item.width, item.height);
|
|
2768
|
+
ctx.clip();
|
|
2769
|
+
ctx.font = fontOf(item);
|
|
2770
|
+
ctx.fontKerning = 'none';
|
|
2771
|
+
ctx.fillStyle = hex(item.color) ?? '#000000';
|
|
2772
|
+
for (const line of item.lines) {
|
|
2773
|
+
// Browsers draw text a little narrower or wider than the font metrics; keep the engine's width.
|
|
2774
|
+
const drawn = ctx.measureText(line.text).width;
|
|
2775
|
+
if (drawn > 0 && line.width > 0 && Math.abs(drawn - line.width) > 0.01) {
|
|
2776
|
+
ctx.save();
|
|
2777
|
+
ctx.translate(line.x, line.baseline);
|
|
2778
|
+
ctx.scale(line.width / drawn, 1);
|
|
2779
|
+
ctx.fillText(line.text, 0, 0);
|
|
2780
|
+
ctx.restore();
|
|
2781
|
+
}
|
|
2782
|
+
else {
|
|
2783
|
+
ctx.fillText(line.text, line.x, line.baseline);
|
|
2784
|
+
}
|
|
2785
|
+
if (item.underline)
|
|
2786
|
+
ctx.fillRect(line.x, line.baseline + item.size * PT_TO_MM$1 * 0.12, line.width, item.size * PT_TO_MM$1 * 0.06);
|
|
2787
|
+
}
|
|
2788
|
+
ctx.restore();
|
|
2789
|
+
break;
|
|
2790
|
+
}
|
|
2791
|
+
case 'image': {
|
|
2792
|
+
const img = images.get(item.src);
|
|
2793
|
+
if (!img)
|
|
2794
|
+
break;
|
|
2795
|
+
ctx.save();
|
|
2796
|
+
ctx.beginPath();
|
|
2797
|
+
ctx.rect(item.clip.x, item.clip.y, item.clip.width, item.clip.height);
|
|
2798
|
+
ctx.clip();
|
|
2799
|
+
ctx.drawImage(img, item.x, item.y, item.width, item.height);
|
|
2800
|
+
ctx.restore();
|
|
2801
|
+
break;
|
|
2802
|
+
}
|
|
2803
|
+
case 'path':
|
|
2804
|
+
ctx.save();
|
|
2805
|
+
ctx.translate(item.x, item.y);
|
|
2806
|
+
ctx.lineCap = 'butt';
|
|
2807
|
+
for (const p of item.paths) {
|
|
2808
|
+
const path = new Path2D(p.d);
|
|
2809
|
+
if (hex(p.fill)) {
|
|
2810
|
+
ctx.fillStyle = p.fill;
|
|
2811
|
+
ctx.fill(path);
|
|
2812
|
+
}
|
|
2813
|
+
if (hex(p.stroke)) {
|
|
2814
|
+
ctx.strokeStyle = p.stroke;
|
|
2815
|
+
ctx.lineWidth = p.strokeWidth ?? 0.25;
|
|
2816
|
+
ctx.stroke(path);
|
|
2817
|
+
}
|
|
2818
|
+
}
|
|
2819
|
+
ctx.restore();
|
|
2820
|
+
break;
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
return canvas;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2259
2826
|
const PT_TO_MM = 25.4 / 72;
|
|
2260
2827
|
/**
|
|
2261
2828
|
* Draws one laid-out page as SVG in millimetre units. It only draws what the layout engine
|
|
@@ -2363,6 +2930,8 @@ class WeReportPageComponent {
|
|
|
2363
2930
|
[attr.font-style]="text(item).italic ? 'italic' : 'normal'"
|
|
2364
2931
|
[attr.fill]="textColor(text(item).color)"
|
|
2365
2932
|
[attr.text-decoration]="text(item).underline ? 'underline' : null"
|
|
2933
|
+
[attr.textLength]="line.width > 0 ? line.width : null"
|
|
2934
|
+
lengthAdjust="spacingAndGlyphs"
|
|
2366
2935
|
>{{ line.text }}</text>
|
|
2367
2936
|
}
|
|
2368
2937
|
</svg>
|
|
@@ -2462,6 +3031,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2462
3031
|
[attr.font-style]="text(item).italic ? 'italic' : 'normal'"
|
|
2463
3032
|
[attr.fill]="textColor(text(item).color)"
|
|
2464
3033
|
[attr.text-decoration]="text(item).underline ? 'underline' : null"
|
|
3034
|
+
[attr.textLength]="line.width > 0 ? line.width : null"
|
|
3035
|
+
lengthAdjust="spacingAndGlyphs"
|
|
2465
3036
|
>{{ line.text }}</text>
|
|
2466
3037
|
}
|
|
2467
3038
|
</svg>
|
|
@@ -2491,11 +3062,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2491
3062
|
`, styles: [":host{display:block}.we-report-page{display:block;background:var(--we-report-page-bg, #fff);box-shadow:var(--we-report-page-shadow, 0 1px 3px rgba(0, 0, 0, .2))}.we-report-page__hit{fill:var(--we-report-search-highlight, rgba(255, 204, 0, .45))}.we-report-page__hit--current{stroke:var(--we-report-accent, #007aff);stroke-width:.4}.we-report-page__text{white-space:pre;font-kerning:none}\n"] }]
|
|
2492
3063
|
}] });
|
|
2493
3064
|
|
|
3065
|
+
/** Pictures from addresses: at most this many per report, each at most this big. */
|
|
3066
|
+
const MAX_PICTURES = 200;
|
|
3067
|
+
const MAX_PICTURE_BYTES = 10 * 1024 * 1024;
|
|
3068
|
+
/** A picture that has not arrived by then counts as failed, so one slow server cannot hold the preview. */
|
|
3069
|
+
const PICTURE_TIMEOUT_MS = 15_000;
|
|
2494
3070
|
/** Paged preview of a report with zoom, PDF download and print. No server involved. */
|
|
2495
3071
|
class WeReportViewerComponent {
|
|
2496
3072
|
report = input.required();
|
|
2497
3073
|
/** Rows (or an object holding them) to print; replaces the report's own data source data. */
|
|
2498
3074
|
data = input(undefined);
|
|
3075
|
+
/** The row around the report, read with `[^.field]` (e.g. previewing a sub-report on its own). */
|
|
3076
|
+
outerRow = input(undefined);
|
|
3077
|
+
/** Default 1; at 1, a page wider than the viewer (a phone) first shows at its width. */
|
|
2499
3078
|
zoom = input(1);
|
|
2500
3079
|
/** Overrides the `WE_REPORT_LOCALE` token. */
|
|
2501
3080
|
locale = input(undefined);
|
|
@@ -2503,6 +3082,8 @@ class WeReportViewerComponent {
|
|
|
2503
3082
|
printDate = input(undefined);
|
|
2504
3083
|
/** Report parameter values from the host; the user can still change them in the parameter bar. */
|
|
2505
3084
|
parameters = input({});
|
|
3085
|
+
/** Toolbar parts to leave out, e.g. `['excel', 'more']`; the methods (`toPdf()` …) stay available. */
|
|
3086
|
+
hide = input([]);
|
|
2506
3087
|
/** Fetch used for web-service data sources (add auth, or route through your backend). */
|
|
2507
3088
|
fetchFn = input(undefined);
|
|
2508
3089
|
problems = output();
|
|
@@ -2521,12 +3102,21 @@ class WeReportViewerComponent {
|
|
|
2521
3102
|
/** Values typed into the parameter bar, applied with "Run report". */
|
|
2522
3103
|
draftParams = signal({});
|
|
2523
3104
|
appliedParams = signal({});
|
|
3105
|
+
/** Web-service and database responses of the last run, for parameter lists drawn from them. */
|
|
3106
|
+
loadedSources = signal({});
|
|
3107
|
+
choices = computed(() => {
|
|
3108
|
+
const report = this.report();
|
|
3109
|
+
const sources = this.loadedSources();
|
|
3110
|
+
return Object.fromEntries((report.parameters ?? []).map((p) => [p.name, parameterChoices(report, p, sources)]));
|
|
3111
|
+
});
|
|
2524
3112
|
pageLabel = computed(() => {
|
|
2525
3113
|
const doc = this.document();
|
|
2526
3114
|
return doc ? this.strings().pageCount.replace('{0}', String(doc.pages.length)) : '';
|
|
2527
3115
|
});
|
|
2528
3116
|
fonts;
|
|
2529
3117
|
run = 0;
|
|
3118
|
+
/** Pictures fetched for image addresses (URL → data URI), kept between runs; failures are tried again next run. */
|
|
3119
|
+
pictures = new Map();
|
|
2530
3120
|
/** What the current preview was laid out from, so exports use exactly the same data. */
|
|
2531
3121
|
lastInput = { data: undefined, sources: {}, params: {} };
|
|
2532
3122
|
constructor() {
|
|
@@ -2541,6 +3131,7 @@ class WeReportViewerComponent {
|
|
|
2541
3131
|
effect(() => {
|
|
2542
3132
|
const report = this.report();
|
|
2543
3133
|
const data = this.data();
|
|
3134
|
+
this.outerRow(); // lays out again when the row around changes
|
|
2544
3135
|
const now = this.printDate();
|
|
2545
3136
|
const params = this.appliedParams();
|
|
2546
3137
|
untracked(() => this.layout(report, data, now, params));
|
|
@@ -2548,6 +3139,8 @@ class WeReportViewerComponent {
|
|
|
2548
3139
|
}
|
|
2549
3140
|
zoomSteps = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
2550
3141
|
showThumbs = signal(false);
|
|
3142
|
+
/** The document map: the bookmarked groups and rows, for jumping to them. */
|
|
3143
|
+
showMap = signal(false);
|
|
2551
3144
|
thumbZoom = 0.18;
|
|
2552
3145
|
currentPage = signal(1);
|
|
2553
3146
|
pageTotal = computed(() => this.document()?.pages.length ?? 0);
|
|
@@ -2597,6 +3190,15 @@ class WeReportViewerComponent {
|
|
|
2597
3190
|
rect?.scrollIntoView({ block: 'center', behavior: 'smooth' });
|
|
2598
3191
|
});
|
|
2599
3192
|
}
|
|
3193
|
+
/** Scrolls to a document-map entry: its page, then down to the section on it. */
|
|
3194
|
+
goToBookmark(mark) {
|
|
3195
|
+
this.goToPage(mark.pageIndex + 1);
|
|
3196
|
+
const box = this.scroller()?.nativeElement;
|
|
3197
|
+
const pageEl = box?.querySelector(`[data-page="${mark.pageIndex + 1}"]`);
|
|
3198
|
+
const page = this.document()?.pages[mark.pageIndex];
|
|
3199
|
+
if (box && pageEl && page)
|
|
3200
|
+
box.scrollTop += (mark.y / page.height) * pageEl.getBoundingClientRect().height;
|
|
3201
|
+
}
|
|
2600
3202
|
goToPage(n) {
|
|
2601
3203
|
const target = Math.min(Math.max(1, Math.round(n) || 1), this.pageTotal());
|
|
2602
3204
|
this.scroller()?.nativeElement.querySelector(`[data-page="${target}"]`)?.scrollIntoView({ block: 'start' });
|
|
@@ -2621,12 +3223,48 @@ class WeReportViewerComponent {
|
|
|
2621
3223
|
// Keep the current page's thumbnail in sight.
|
|
2622
3224
|
this.thumbs()?.nativeElement.children[page - 1]?.scrollIntoView({ block: 'nearest' });
|
|
2623
3225
|
}
|
|
3226
|
+
/** Ctrl + wheel (and a trackpad pinch) zooms around the pointer, as desktop viewers do. */
|
|
3227
|
+
onWheel(e) {
|
|
3228
|
+
if (!(e.ctrlKey || e.metaKey))
|
|
3229
|
+
return;
|
|
3230
|
+
e.preventDefault();
|
|
3231
|
+
const before = this.zoomLevel();
|
|
3232
|
+
this.setZoom(before + (e.deltaY < 0 ? 0.1 : -0.1));
|
|
3233
|
+
const box = this.scroller()?.nativeElement;
|
|
3234
|
+
const ratio = this.zoomLevel() / before;
|
|
3235
|
+
if (!box || ratio === 1)
|
|
3236
|
+
return;
|
|
3237
|
+
// The point under the pointer stays there (the gaps between pages do not scale: close enough).
|
|
3238
|
+
const rect = box.getBoundingClientRect();
|
|
3239
|
+
const x = e.clientX - rect.left;
|
|
3240
|
+
const y = e.clientY - rect.top;
|
|
3241
|
+
const left = (box.scrollLeft + x) * ratio - x;
|
|
3242
|
+
const top = (box.scrollTop + y) * ratio - y;
|
|
3243
|
+
afterNextRender(() => {
|
|
3244
|
+
box.scrollLeft = left;
|
|
3245
|
+
box.scrollTop = top;
|
|
3246
|
+
}, { injector: this.injector });
|
|
3247
|
+
}
|
|
3248
|
+
injector = inject(Injector);
|
|
3249
|
+
fittedOnce = false;
|
|
3250
|
+
/** On a screen narrower than the page (a phone), the first preview at the default zoom fits the page's width. */
|
|
3251
|
+
fitNarrowScreen(doc) {
|
|
3252
|
+
const box = this.scroller()?.nativeElement;
|
|
3253
|
+
const page = doc.pages[0];
|
|
3254
|
+
if (this.fittedOnce || !box?.clientWidth || !page)
|
|
3255
|
+
return;
|
|
3256
|
+
this.fittedOnce = true;
|
|
3257
|
+
if (this.zoomLevel() === 1 && page.width * (96 / 25.4) + 64 > box.clientWidth)
|
|
3258
|
+
this.pickZoom('width');
|
|
3259
|
+
}
|
|
2624
3260
|
pickZoom(value) {
|
|
2625
3261
|
const box = this.scroller()?.nativeElement;
|
|
2626
3262
|
const page = this.document()?.pages[0];
|
|
2627
3263
|
if ((value === 'width' || value === 'page') && box && page) {
|
|
2628
3264
|
const pxPerMm = 96 / 25.4;
|
|
2629
|
-
|
|
3265
|
+
// Room for the vertical scrollbar the zoomed pages will bring, when it is not there yet.
|
|
3266
|
+
const scrollbar = box.offsetWidth > box.clientWidth ? 0 : 16;
|
|
3267
|
+
const byWidth = (box.clientWidth - 64 - scrollbar) / (page.width * pxPerMm);
|
|
2630
3268
|
const byHeight = (box.clientHeight - 64) / (page.height * pxPerMm);
|
|
2631
3269
|
this.setZoom(value === 'width' ? byWidth : Math.min(byWidth, byHeight));
|
|
2632
3270
|
}
|
|
@@ -2644,7 +3282,9 @@ class WeReportViewerComponent {
|
|
|
2644
3282
|
}
|
|
2645
3283
|
else if (mod && e.key.toLowerCase() === 'p') {
|
|
2646
3284
|
e.preventDefault();
|
|
2647
|
-
|
|
3285
|
+
// A host that hides Print does not get it back through the shortcut.
|
|
3286
|
+
if (!this.hidden('print'))
|
|
3287
|
+
void this.print();
|
|
2648
3288
|
}
|
|
2649
3289
|
else if (mod && (e.key === '=' || e.key === '+')) {
|
|
2650
3290
|
e.preventDefault();
|
|
@@ -2663,6 +3303,9 @@ class WeReportViewerComponent {
|
|
|
2663
3303
|
this.goToPage(e.key === 'Home' ? 1 : this.pageTotal());
|
|
2664
3304
|
}
|
|
2665
3305
|
}
|
|
3306
|
+
hidden(tool) {
|
|
3307
|
+
return this.hide().includes(tool);
|
|
3308
|
+
}
|
|
2666
3309
|
setZoom(value) {
|
|
2667
3310
|
this.zoomLevel.set(Math.min(4, Math.max(0.25, Math.round(value * 100) / 100)));
|
|
2668
3311
|
}
|
|
@@ -2681,25 +3324,38 @@ class WeReportViewerComponent {
|
|
|
2681
3324
|
try {
|
|
2682
3325
|
this.fonts ??= await this.fontsService.ready();
|
|
2683
3326
|
// Host data replaces the bound source, so only call web services when there is none.
|
|
2684
|
-
const loaded = data === undefined && report.
|
|
3327
|
+
const loaded = data === undefined && allDataSources(report).some((s) => s.kind === 'webService' || s.kind === 'database')
|
|
2685
3328
|
? await loadReportData(report, { params, fetch: this.fetchFn(), backendUrl: this.backend.url() || undefined })
|
|
2686
3329
|
: { sources: {}, errors: [], warnings: [] };
|
|
2687
3330
|
if (run !== this.run)
|
|
2688
3331
|
return;
|
|
2689
3332
|
this.lastInput = { data, sources: loaded.sources, params, now };
|
|
3333
|
+
this.loadedSources.set(loaded.sources);
|
|
2690
3334
|
this.loadErrors.set(loaded.errors.map((e) => e.message));
|
|
2691
3335
|
this.loadWarnings.set(loaded.warnings.map((e) => e.message));
|
|
2692
|
-
const
|
|
3336
|
+
const failed = new Map();
|
|
3337
|
+
const lay = () => layoutReport(report, {
|
|
2693
3338
|
fonts: this.fonts,
|
|
2694
3339
|
now: now ?? new Date(),
|
|
2695
3340
|
data,
|
|
2696
3341
|
sources: loaded.sources,
|
|
2697
3342
|
params,
|
|
3343
|
+
parent: this.outerRow(),
|
|
3344
|
+
images: Object.fromEntries([...this.pictures, ...failed]),
|
|
2698
3345
|
locale: this.config.locale,
|
|
2699
3346
|
currency: this.config.currency,
|
|
2700
3347
|
});
|
|
3348
|
+
let doc = lay();
|
|
3349
|
+
// Pictures from addresses: fetch the ones the layout asked for, then lay out again.
|
|
3350
|
+
if (doc.imageUrls?.length) {
|
|
3351
|
+
await this.fetchPictures(doc.imageUrls, failed);
|
|
3352
|
+
if (run !== this.run)
|
|
3353
|
+
return;
|
|
3354
|
+
doc = lay();
|
|
3355
|
+
}
|
|
2701
3356
|
this.error.set(null);
|
|
2702
3357
|
this.document.set(doc);
|
|
3358
|
+
this.fitNarrowScreen(doc);
|
|
2703
3359
|
this.problems.emit(doc.problems);
|
|
2704
3360
|
this.rendered.emit(doc);
|
|
2705
3361
|
}
|
|
@@ -2710,12 +3366,39 @@ class WeReportViewerComponent {
|
|
|
2710
3366
|
this.error.set(e.message);
|
|
2711
3367
|
}
|
|
2712
3368
|
}
|
|
3369
|
+
async fetchPictures(urls, failed) {
|
|
3370
|
+
const fetchFn = this.fetchFn() ?? fetch;
|
|
3371
|
+
const wanted = urls.filter((u) => !this.pictures.has(u));
|
|
3372
|
+
// Beyond the limit a picture counts as failed: it shows as a problem, not as a silent gap.
|
|
3373
|
+
for (const url of wanted.slice(MAX_PICTURES))
|
|
3374
|
+
failed.set(url, '');
|
|
3375
|
+
await Promise.all(wanted.slice(0, MAX_PICTURES).map(async (url) => {
|
|
3376
|
+
try {
|
|
3377
|
+
const response = await fetchFn(url, { signal: AbortSignal.timeout(PICTURE_TIMEOUT_MS) });
|
|
3378
|
+
if (!response.ok)
|
|
3379
|
+
throw new Error(String(response.status));
|
|
3380
|
+
const blob = await response.blob();
|
|
3381
|
+
if (blob.size > MAX_PICTURE_BYTES)
|
|
3382
|
+
throw new Error('Too large.');
|
|
3383
|
+
this.pictures.set(url, await pictureDataUri(blob, this.dom));
|
|
3384
|
+
}
|
|
3385
|
+
catch {
|
|
3386
|
+
failed.set(url, '');
|
|
3387
|
+
}
|
|
3388
|
+
}));
|
|
3389
|
+
// Keep the cache to the most recent pictures (a Map keeps insertion order).
|
|
3390
|
+
for (const url of this.pictures.keys()) {
|
|
3391
|
+
if (this.pictures.size <= MAX_PICTURES * 2)
|
|
3392
|
+
break;
|
|
3393
|
+
this.pictures.delete(url);
|
|
3394
|
+
}
|
|
3395
|
+
}
|
|
2713
3396
|
/** The current preview as PDF bytes. */
|
|
2714
3397
|
async toPdf() {
|
|
2715
3398
|
const doc = this.document();
|
|
2716
3399
|
if (!doc || !this.fonts)
|
|
2717
3400
|
throw new Error('The report is not rendered yet.');
|
|
2718
|
-
return renderPdf(doc, this.fonts, { title: this.report().name, date: this.printDate() });
|
|
3401
|
+
return renderPdf(doc, this.fonts, { title: this.report().name, date: this.printDate(), lang: this.report().locale || this.config.locale });
|
|
2719
3402
|
}
|
|
2720
3403
|
/** The report's rows as an Excel workbook (one column per detail field, typed values). */
|
|
2721
3404
|
toXlsx() {
|
|
@@ -2726,6 +3409,63 @@ class WeReportViewerComponent {
|
|
|
2726
3409
|
async downloadPdf() {
|
|
2727
3410
|
this.save(new Blob([await this.toPdf()], { type: 'application/pdf' }), 'pdf');
|
|
2728
3411
|
}
|
|
3412
|
+
/** One page of the current preview as a PNG image, `dpi` dots per inch (default 200). */
|
|
3413
|
+
async toPng(pageIndex = this.currentPage() - 1, dpi = 200) {
|
|
3414
|
+
const page = this.document()?.pages[pageIndex];
|
|
3415
|
+
if (!page)
|
|
3416
|
+
throw new Error('The page is not rendered yet.');
|
|
3417
|
+
const canvas = await drawPage(page, dpi / 25.4, this.dom);
|
|
3418
|
+
return new Promise((resolve, reject) => canvas.toBlob((b) => (b ? resolve(b) : reject(new Error('The image could not be made.'))), 'image/png'));
|
|
3419
|
+
}
|
|
3420
|
+
/** Every page as a PNG (`page-1.png` …) in one ZIP file. */
|
|
3421
|
+
async toPngZip(dpi = 200) {
|
|
3422
|
+
const pages = this.document()?.pages ?? [];
|
|
3423
|
+
const files = [];
|
|
3424
|
+
for (let i = 0; i < pages.length; i++)
|
|
3425
|
+
files.push([`page-${i + 1}.png`, new Uint8Array(await (await this.toPng(i, dpi)).arrayBuffer())]);
|
|
3426
|
+
return storedZip(files);
|
|
3427
|
+
}
|
|
3428
|
+
/** Every page in black and white dots, `pxPerMm(page)` dots per millimetre. */
|
|
3429
|
+
async bitmaps(pxPerMm) {
|
|
3430
|
+
const doc = this.document();
|
|
3431
|
+
if (!doc)
|
|
3432
|
+
throw new Error('The report is not rendered yet.');
|
|
3433
|
+
const out = [];
|
|
3434
|
+
for (const page of doc.pages) {
|
|
3435
|
+
const canvas = await drawPage(page, pxPerMm(page.width), this.dom);
|
|
3436
|
+
const pixels = canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height).data;
|
|
3437
|
+
out.push(toMonoBitmap(pixels, canvas.width, canvas.height));
|
|
3438
|
+
}
|
|
3439
|
+
return out;
|
|
3440
|
+
}
|
|
3441
|
+
/** Zebra ZPL for label printers: each page as a label, at the printer's `dpi` (203 or 300). */
|
|
3442
|
+
async toZpl(dpi = 203) {
|
|
3443
|
+
return zplFromBitmaps(await this.bitmaps(() => dpi / 25.4));
|
|
3444
|
+
}
|
|
3445
|
+
/** ESC/POS for receipt printers: the page width fills `dots` (384 for 58 mm, 576 for 80 mm rolls). */
|
|
3446
|
+
async toEscPos(dots = 576) {
|
|
3447
|
+
return escPosFromBitmaps(await this.bitmaps((width) => dots / width));
|
|
3448
|
+
}
|
|
3449
|
+
/** The report's rows as CSV for spreadsheets (`;` and decimal commas in regions that write them). */
|
|
3450
|
+
toCsv() {
|
|
3451
|
+
const { data, sources, params, now } = this.lastInput;
|
|
3452
|
+
const locale = this.report().locale || this.config.locale;
|
|
3453
|
+
return writeCsv(reportTable(this.report(), { data, sources, params, now: now ?? new Date(), locale }), { locale });
|
|
3454
|
+
}
|
|
3455
|
+
async downloadForPrinter(kind) {
|
|
3456
|
+
if (kind === 'csv')
|
|
3457
|
+
this.save(new Blob([this.toCsv()], { type: 'text/csv' }), 'csv');
|
|
3458
|
+
else if (kind === 'pngzip')
|
|
3459
|
+
this.save(new Blob([await this.toPngZip()], { type: 'application/zip' }), 'zip');
|
|
3460
|
+
else if (kind === 'zpl')
|
|
3461
|
+
this.save(new Blob([await this.toZpl()], { type: 'text/plain' }), 'zpl');
|
|
3462
|
+
else if (kind === 'escpos58' || kind === 'escpos80')
|
|
3463
|
+
this.save(new Blob([await this.toEscPos(kind === 'escpos58' ? 384 : 576)], { type: 'application/octet-stream' }), 'bin');
|
|
3464
|
+
}
|
|
3465
|
+
async downloadPng() {
|
|
3466
|
+
const page = this.currentPage();
|
|
3467
|
+
this.save(await this.toPng(page - 1), this.pageTotal() > 1 ? `p${page}.png` : 'png');
|
|
3468
|
+
}
|
|
2729
3469
|
downloadExcel() {
|
|
2730
3470
|
this.save(new Blob([this.toXlsx()], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }), 'xlsx');
|
|
2731
3471
|
}
|
|
@@ -2754,7 +3494,7 @@ class WeReportViewerComponent {
|
|
|
2754
3494
|
this.dom.body.appendChild(frame);
|
|
2755
3495
|
}
|
|
2756
3496
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WeReportViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2757
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: WeReportViewerComponent, isStandalone: true, selector: "we-report-viewer", inputs: { report: { classPropertyName: "report", publicName: "report", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, zoom: { classPropertyName: "zoom", publicName: "zoom", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, printDate: { classPropertyName: "printDate", publicName: "printDate", isSignal: true, isRequired: false, transformFunction: null }, parameters: { classPropertyName: "parameters", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, fetchFn: { classPropertyName: "fetchFn", publicName: "fetchFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { problems: "problems", rendered: "rendered" }, host: { listeners: { "keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "thumbs", first: true, predicate: ["thumbs"], descendants: true, isSignal: true }, { propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3497
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: WeReportViewerComponent, isStandalone: true, selector: "we-report-viewer", inputs: { report: { classPropertyName: "report", publicName: "report", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, outerRow: { classPropertyName: "outerRow", publicName: "outerRow", isSignal: true, isRequired: false, transformFunction: null }, zoom: { classPropertyName: "zoom", publicName: "zoom", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, printDate: { classPropertyName: "printDate", publicName: "printDate", isSignal: true, isRequired: false, transformFunction: null }, parameters: { classPropertyName: "parameters", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, hide: { classPropertyName: "hide", publicName: "hide", isSignal: true, isRequired: false, transformFunction: null }, fetchFn: { classPropertyName: "fetchFn", publicName: "fetchFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { problems: "problems", rendered: "rendered" }, host: { listeners: { "keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "thumbs", first: true, predicate: ["thumbs"], descendants: true, isSignal: true }, { propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2758
3498
|
<div class="we-report-viewer__toolbar" role="toolbar">
|
|
2759
3499
|
<button type="button" class="we-report-viewer__btn" (click)="setZoom(zoomLevel() - 0.1)" [attr.aria-label]="strings().zoomOut" [title]="strings().zoomOut + ' (Ctrl+-)'" [innerHTML]="'zoomOut' | weReportIcon"></button>
|
|
2760
3500
|
<select class="we-report-viewer__zoomsel" (change)="pickZoom($any($event.target).value); $any($event.target).value = ''" [attr.aria-label]="strings().zoomLevel">
|
|
@@ -2766,9 +3506,14 @@ class WeReportViewerComponent {
|
|
|
2766
3506
|
<option value="page">{{ strings().fitPage }}</option>
|
|
2767
3507
|
</select>
|
|
2768
3508
|
<button type="button" class="we-report-viewer__btn" (click)="setZoom(zoomLevel() + 0.1)" [attr.aria-label]="strings().zoomIn" [title]="strings().zoomIn + ' (Ctrl+=)'" [innerHTML]="'zoomIn' | weReportIcon"></button>
|
|
3509
|
+
@if (document()?.bookmarks?.length && !hidden('map')) {
|
|
3510
|
+
<button type="button" class="we-report-viewer__btn" [class.we-report-viewer__btn--on]="showMap()" (click)="showMap.set(!showMap())" [title]="strings().documentMap" [attr.aria-label]="strings().documentMap" [attr.aria-pressed]="showMap()" [innerHTML]="'outline' | weReportIcon"></button>
|
|
3511
|
+
}
|
|
2769
3512
|
@if (pageTotal() > 1) {
|
|
2770
3513
|
<span class="we-report-viewer__sep"></span>
|
|
2771
|
-
|
|
3514
|
+
@if (!hidden('thumbnails')) {
|
|
3515
|
+
<button type="button" class="we-report-viewer__btn" [class.we-report-viewer__btn--on]="showThumbs()" (click)="showThumbs.set(!showThumbs())" [title]="strings().thumbnails" [attr.aria-label]="strings().thumbnails" [attr.aria-pressed]="showThumbs()" [innerHTML]="'thumbnails' | weReportIcon"></button>
|
|
3516
|
+
}
|
|
2772
3517
|
<button type="button" class="we-report-viewer__btn" [disabled]="currentPage() <= 1" (click)="goToPage(1)" [title]="strings().firstPage + ' (Home)'" [attr.aria-label]="strings().firstPage" [innerHTML]="'firstPage' | weReportIcon"></button>
|
|
2773
3518
|
<button type="button" class="we-report-viewer__btn" [disabled]="currentPage() <= 1" (click)="goToPage(currentPage() - 1)" [title]="strings().previousPage + ' (PgUp)'" [attr.aria-label]="strings().previousPage" [innerHTML]="'previousPage' | weReportIcon"></button>
|
|
2774
3519
|
<input class="we-report-viewer__pagebox" type="number" min="1" [max]="pageTotal()" [value]="currentPage()" (change)="goToPage(+$any($event.target).value)" [attr.aria-label]="strings().pageNumber" />
|
|
@@ -2778,29 +3523,61 @@ class WeReportViewerComponent {
|
|
|
2778
3523
|
} @else {
|
|
2779
3524
|
<span class="we-report-viewer__pages">{{ pageLabel() }}</span>
|
|
2780
3525
|
}
|
|
3526
|
+
@if (!hidden('search')) {
|
|
2781
3527
|
<span class="we-report-viewer__sep"></span>
|
|
2782
3528
|
<input #searchBox class="we-report-viewer__search" type="search" [placeholder]="strings().search + ' (Ctrl+F)'" [value]="query()" (input)="setQuery($any($event.target).value)" (keydown.enter)="nextMatch($any($event).shiftKey ? -1 : 1)" [attr.aria-label]="strings().search" />
|
|
3529
|
+
}
|
|
2783
3530
|
@if (query().trim()) {
|
|
2784
3531
|
<span class="we-report-viewer__pages">{{ matches().length ? strings().matches.replace('{0}', '' + (matchIndex() + 1)).replace('{1}', '' + matches().length) : strings().noMatches }}</span>
|
|
2785
3532
|
<button type="button" class="we-report-viewer__btn" [disabled]="!matches().length" (click)="nextMatch(-1)" [attr.aria-label]="strings().previousMatch" [title]="strings().previousMatch + ' (Shift+Enter)'" [innerHTML]="'chevronUp' | weReportIcon"></button>
|
|
2786
3533
|
<button type="button" class="we-report-viewer__btn" [disabled]="!matches().length" (click)="nextMatch(1)" [attr.aria-label]="strings().nextMatch" [title]="strings().nextMatch + ' (Enter)'" [innerHTML]="'chevronDown' | weReportIcon"></button>
|
|
2787
3534
|
}
|
|
2788
3535
|
<span class="we-report-viewer__spacer"></span>
|
|
2789
|
-
|
|
2790
|
-
<
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
3536
|
+
@if (!hidden('print')) {
|
|
3537
|
+
<button type="button" class="we-report-viewer__btn we-report-viewer__btn--text" (click)="print()" [disabled]="!document()">
|
|
3538
|
+
<span [innerHTML]="'print' | weReportIcon"></span>{{ strings().print }}
|
|
3539
|
+
</button>
|
|
3540
|
+
}
|
|
3541
|
+
@if (!hidden('excel')) {
|
|
3542
|
+
<button type="button" class="we-report-viewer__btn we-report-viewer__btn--text" (click)="downloadExcel()" [disabled]="!document()">
|
|
3543
|
+
<span [innerHTML]="'download' | weReportIcon"></span>{{ strings().downloadExcel }}
|
|
3544
|
+
</button>
|
|
3545
|
+
}
|
|
3546
|
+
@if (!hidden('png')) {
|
|
3547
|
+
<button type="button" class="we-report-viewer__btn we-report-viewer__btn--text" (click)="downloadPng()" [disabled]="!document()" [title]="strings().downloadPng + ' · ' + strings().pageNumber + ' ' + currentPage()">
|
|
3548
|
+
<span [innerHTML]="'download' | weReportIcon"></span>{{ strings().downloadPng }}
|
|
3549
|
+
</button>
|
|
3550
|
+
}
|
|
3551
|
+
@if (!hidden('more')) {
|
|
3552
|
+
<select class="we-report-viewer__more" [disabled]="!document()" (change)="downloadForPrinter($any($event.target).value); $any($event.target).value = ''" [attr.aria-label]="strings().printerOutput" [title]="strings().printerOutputHint">
|
|
3553
|
+
<option value="" selected>{{ strings().printerOutput }}…</option>
|
|
3554
|
+
<option value="csv">CSV</option>
|
|
3555
|
+
<option value="pngzip">{{ strings().pngAllPages }}</option>
|
|
3556
|
+
<option value="zpl">{{ strings().printerZpl }}</option>
|
|
3557
|
+
<option value="escpos58">{{ strings().printerEscPos }} · 58 mm</option>
|
|
3558
|
+
<option value="escpos80">{{ strings().printerEscPos }} · 80 mm</option>
|
|
3559
|
+
</select>
|
|
3560
|
+
}
|
|
3561
|
+
@if (!hidden('pdf')) {
|
|
3562
|
+
<button type="button" class="we-report-viewer__btn we-report-viewer__btn--text" (click)="downloadPdf()" [disabled]="!document()">
|
|
3563
|
+
<span [innerHTML]="'download' | weReportIcon"></span>{{ strings().downloadPdf }}
|
|
3564
|
+
</button>
|
|
3565
|
+
}
|
|
2798
3566
|
</div>
|
|
2799
3567
|
@if (report().parameters?.length) {
|
|
2800
3568
|
<form class="we-report-viewer__params" (submit)="$event.preventDefault(); applyParams()">
|
|
2801
3569
|
@for (p of report().parameters!; track p.name) {
|
|
2802
3570
|
<label>
|
|
2803
3571
|
<span>{{ p.label || p.name }}</span>
|
|
3572
|
+
@let options = choices()[p.name];
|
|
3573
|
+
@if (options?.length) {
|
|
3574
|
+
<select (change)="setParam(p, $any($event.target).value)">
|
|
3575
|
+
<option value="" [selected]="(paramValue(p) ?? '') === ''">—</option>
|
|
3576
|
+
@for (o of options; track o.value) {
|
|
3577
|
+
<option [value]="o.value" [selected]="'' + o.value === '' + (paramValue(p) ?? '')">{{ o.label }}</option>
|
|
3578
|
+
}
|
|
3579
|
+
</select>
|
|
3580
|
+
} @else {
|
|
2804
3581
|
@switch (p.type) {
|
|
2805
3582
|
@case ('boolean') {
|
|
2806
3583
|
<input type="checkbox" [checked]="paramValue(p) === true" (change)="setParam(p, $any($event.target).checked)" />
|
|
@@ -2815,6 +3592,7 @@ class WeReportViewerComponent {
|
|
|
2815
3592
|
<input [value]="paramValue(p) ?? ''" (input)="setParam(p, $any($event.target).value)" />
|
|
2816
3593
|
}
|
|
2817
3594
|
}
|
|
3595
|
+
}
|
|
2818
3596
|
</label>
|
|
2819
3597
|
}
|
|
2820
3598
|
<button type="submit" class="we-report-viewer__btn we-report-viewer__btn--text">{{ strings().runReport }}</button>
|
|
@@ -2840,6 +3618,13 @@ class WeReportViewerComponent {
|
|
|
2840
3618
|
</details>
|
|
2841
3619
|
}
|
|
2842
3620
|
<div class="we-report-viewer__main">
|
|
3621
|
+
@if (showMap() && document()?.bookmarks?.length) {
|
|
3622
|
+
<nav class="we-report-viewer__map" [attr.aria-label]="strings().documentMap">
|
|
3623
|
+
@for (mark of document()!.bookmarks!; track $index) {
|
|
3624
|
+
<button type="button" class="we-report-viewer__mark" [style.padding-left.px]="8 + mark.level * 14" (click)="goToBookmark(mark)">{{ mark.title }}</button>
|
|
3625
|
+
}
|
|
3626
|
+
</nav>
|
|
3627
|
+
}
|
|
2843
3628
|
@if (showThumbs() && pageTotal() > 1) {
|
|
2844
3629
|
<nav #thumbs class="we-report-viewer__thumbs" [attr.aria-label]="strings().thumbnails">
|
|
2845
3630
|
@for (page of document()!.pages; track $index; let p = $index) {
|
|
@@ -2854,7 +3639,7 @@ class WeReportViewerComponent {
|
|
|
2854
3639
|
}
|
|
2855
3640
|
</nav>
|
|
2856
3641
|
}
|
|
2857
|
-
<div #scroller class="we-report-viewer__scroll" tabindex="0" (scroll)="onScroll()">
|
|
3642
|
+
<div #scroller class="we-report-viewer__scroll" tabindex="0" (scroll)="onScroll()" (wheel)="onWheel($event)">
|
|
2858
3643
|
@if (document(); as doc) {
|
|
2859
3644
|
@for (page of doc.pages; track $index; let p = $index) {
|
|
2860
3645
|
<we-report-page
|
|
@@ -2872,7 +3657,7 @@ class WeReportViewerComponent {
|
|
|
2872
3657
|
}
|
|
2873
3658
|
</div>
|
|
2874
3659
|
</div>
|
|
2875
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;min-height:0;font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;letter-spacing:-.003em;color:var(--we-report-fg, #1d1d1f);background:var(--we-report-workspace-bg, #f2f2f7);-webkit-font-smoothing:antialiased}.we-report-viewer__toolbar,.we-report-viewer__params{position:relative;z-index:1;display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:8px 14px;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.we-report-viewer__btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:transparent;color:inherit;font:inherit;font-weight:500;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.we-report-viewer__btn--text{padding:0 10px}.we-report-viewer__btn:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.we-report-viewer__btn:focus-visible,.we-report-viewer__params input:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.we-report-viewer__btn:disabled{opacity:.3;cursor:default}.we-report-viewer__btn :is(svg){width:17px;height:17px}.we-report-viewer__zoom{min-width:44px;text-align:center;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
3660
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;min-height:0;font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;letter-spacing:-.003em;color:var(--we-report-fg, #1d1d1f);background:var(--we-report-workspace-bg, #f2f2f7);-webkit-font-smoothing:antialiased}.we-report-viewer__toolbar,.we-report-viewer__params{position:relative;z-index:1;display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:8px 14px;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.we-report-viewer__btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:transparent;color:inherit;font:inherit;font-weight:500;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.we-report-viewer__btn--text{padding:0 10px}.we-report-viewer__btn:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.we-report-viewer__btn:focus-visible,.we-report-viewer__params input:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.we-report-viewer__btn:disabled{opacity:.3;cursor:default}.we-report-viewer__btn :is(svg){width:17px;height:17px}.we-report-viewer__zoom{min-width:44px;text-align:center;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.we-report-viewer__pages{margin-left:8px;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.we-report-viewer__sep{width:.5px;height:20px;margin:0 6px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.we-report-viewer__zoomsel,.we-report-viewer__pagebox,.we-report-viewer__search{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit;font-variant-numeric:tabular-nums}.we-report-viewer__zoomsel:focus,.we-report-viewer__pagebox:focus,.we-report-viewer__search:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.we-report-viewer__pagebox{width:56px;text-align:center}.we-report-viewer__search{width:180px}.we-report-viewer__scroll:focus{outline:none}.we-report-viewer__spacer{flex:1}.we-report-viewer__main{flex:1;display:flex;min-height:0}.we-report-viewer__map{flex:none;display:flex;flex-direction:column;width:220px;overflow:auto;padding:8px 4px;border-right:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));background:var(--we-report-panel-bg, #fbfbfd)}.we-report-viewer__mark{border:0;padding:4px 8px;border-radius:6px;background:none;color:inherit;font:inherit;font-size:12px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.we-report-viewer__mark:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.we-report-viewer__thumbs{flex:none;display:flex;flex-direction:column;align-items:center;gap:12px;overflow:auto;padding:16px 12px;border-right:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));background:var(--we-report-panel-bg, #fbfbfd)}.we-report-viewer__thumb{display:flex;flex-direction:column;align-items:center;gap:4px;border:0;padding:4px;border-radius:6px;background:none;color:inherit;font:inherit;font-size:11px;cursor:pointer}.we-report-viewer__thumb--current{background:var(--we-report-selection-fill, rgba(0, 122, 255, .12))}.we-report-viewer__thumb we-report-page,.we-report-viewer__thumb-blank{background:var(--we-report-page-bg, #fff);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14));pointer-events:none}.we-report-viewer__btn--on{background:var(--we-report-selection-fill, rgba(0, 122, 255, .12))}.we-report-viewer__scroll{flex:1;overflow:auto;padding:32px;display:flex;flex-direction:column;align-items:flex-start;gap:32px}.we-report-viewer__scroll>*{margin-inline:auto}.we-report-viewer__page{border-radius:2px}.we-report-viewer__params{align-items:flex-end;gap:12px;font-size:12px}.we-report-viewer__params label{display:flex;flex-direction:column;gap:3px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.we-report-viewer__more,.we-report-viewer__params input:not([type=checkbox]),.we-report-viewer__params select{font:inherit;font-size:13px;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:var(--we-report-fg, #1d1d1f)}.we-report-viewer__params input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}.we-report-viewer__params button[type=submit]{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);padding:0 14px}.we-report-viewer__params button[type=submit]:hover{background:var(--we-report-accent, #007aff);filter:brightness(1.08)}.we-report-viewer__error,.we-report-viewer__problems{margin:10px 14px 0;padding:10px 14px;border-radius:10px;font-size:13px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400)}.we-report-viewer__problems summary{cursor:pointer;font-weight:500}.we-report-viewer__problems ul{margin:6px 0 0;padding-left:18px}.we-report-viewer__loading{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}@media (prefers-reduced-motion: reduce){.we-report-viewer__btn{transition:none}}@media print{.we-report-viewer__toolbar{display:none}}\n"], dependencies: [{ kind: "component", type: WeReportPageComponent, selector: "we-report-page", inputs: ["page", "zoom", "highlight", "current", "locale"] }, { kind: "pipe", type: WeReportIconPipe, name: "weReportIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [WeReportPageComponent]] });
|
|
2876
3661
|
}
|
|
2877
3662
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WeReportViewerComponent, decorators: [{
|
|
2878
3663
|
type: Component,
|
|
@@ -2888,9 +3673,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2888
3673
|
<option value="page">{{ strings().fitPage }}</option>
|
|
2889
3674
|
</select>
|
|
2890
3675
|
<button type="button" class="we-report-viewer__btn" (click)="setZoom(zoomLevel() + 0.1)" [attr.aria-label]="strings().zoomIn" [title]="strings().zoomIn + ' (Ctrl+=)'" [innerHTML]="'zoomIn' | weReportIcon"></button>
|
|
3676
|
+
@if (document()?.bookmarks?.length && !hidden('map')) {
|
|
3677
|
+
<button type="button" class="we-report-viewer__btn" [class.we-report-viewer__btn--on]="showMap()" (click)="showMap.set(!showMap())" [title]="strings().documentMap" [attr.aria-label]="strings().documentMap" [attr.aria-pressed]="showMap()" [innerHTML]="'outline' | weReportIcon"></button>
|
|
3678
|
+
}
|
|
2891
3679
|
@if (pageTotal() > 1) {
|
|
2892
3680
|
<span class="we-report-viewer__sep"></span>
|
|
2893
|
-
|
|
3681
|
+
@if (!hidden('thumbnails')) {
|
|
3682
|
+
<button type="button" class="we-report-viewer__btn" [class.we-report-viewer__btn--on]="showThumbs()" (click)="showThumbs.set(!showThumbs())" [title]="strings().thumbnails" [attr.aria-label]="strings().thumbnails" [attr.aria-pressed]="showThumbs()" [innerHTML]="'thumbnails' | weReportIcon"></button>
|
|
3683
|
+
}
|
|
2894
3684
|
<button type="button" class="we-report-viewer__btn" [disabled]="currentPage() <= 1" (click)="goToPage(1)" [title]="strings().firstPage + ' (Home)'" [attr.aria-label]="strings().firstPage" [innerHTML]="'firstPage' | weReportIcon"></button>
|
|
2895
3685
|
<button type="button" class="we-report-viewer__btn" [disabled]="currentPage() <= 1" (click)="goToPage(currentPage() - 1)" [title]="strings().previousPage + ' (PgUp)'" [attr.aria-label]="strings().previousPage" [innerHTML]="'previousPage' | weReportIcon"></button>
|
|
2896
3686
|
<input class="we-report-viewer__pagebox" type="number" min="1" [max]="pageTotal()" [value]="currentPage()" (change)="goToPage(+$any($event.target).value)" [attr.aria-label]="strings().pageNumber" />
|
|
@@ -2900,29 +3690,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2900
3690
|
} @else {
|
|
2901
3691
|
<span class="we-report-viewer__pages">{{ pageLabel() }}</span>
|
|
2902
3692
|
}
|
|
3693
|
+
@if (!hidden('search')) {
|
|
2903
3694
|
<span class="we-report-viewer__sep"></span>
|
|
2904
3695
|
<input #searchBox class="we-report-viewer__search" type="search" [placeholder]="strings().search + ' (Ctrl+F)'" [value]="query()" (input)="setQuery($any($event.target).value)" (keydown.enter)="nextMatch($any($event).shiftKey ? -1 : 1)" [attr.aria-label]="strings().search" />
|
|
3696
|
+
}
|
|
2905
3697
|
@if (query().trim()) {
|
|
2906
3698
|
<span class="we-report-viewer__pages">{{ matches().length ? strings().matches.replace('{0}', '' + (matchIndex() + 1)).replace('{1}', '' + matches().length) : strings().noMatches }}</span>
|
|
2907
3699
|
<button type="button" class="we-report-viewer__btn" [disabled]="!matches().length" (click)="nextMatch(-1)" [attr.aria-label]="strings().previousMatch" [title]="strings().previousMatch + ' (Shift+Enter)'" [innerHTML]="'chevronUp' | weReportIcon"></button>
|
|
2908
3700
|
<button type="button" class="we-report-viewer__btn" [disabled]="!matches().length" (click)="nextMatch(1)" [attr.aria-label]="strings().nextMatch" [title]="strings().nextMatch + ' (Enter)'" [innerHTML]="'chevronDown' | weReportIcon"></button>
|
|
2909
3701
|
}
|
|
2910
3702
|
<span class="we-report-viewer__spacer"></span>
|
|
2911
|
-
|
|
2912
|
-
<
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
3703
|
+
@if (!hidden('print')) {
|
|
3704
|
+
<button type="button" class="we-report-viewer__btn we-report-viewer__btn--text" (click)="print()" [disabled]="!document()">
|
|
3705
|
+
<span [innerHTML]="'print' | weReportIcon"></span>{{ strings().print }}
|
|
3706
|
+
</button>
|
|
3707
|
+
}
|
|
3708
|
+
@if (!hidden('excel')) {
|
|
3709
|
+
<button type="button" class="we-report-viewer__btn we-report-viewer__btn--text" (click)="downloadExcel()" [disabled]="!document()">
|
|
3710
|
+
<span [innerHTML]="'download' | weReportIcon"></span>{{ strings().downloadExcel }}
|
|
3711
|
+
</button>
|
|
3712
|
+
}
|
|
3713
|
+
@if (!hidden('png')) {
|
|
3714
|
+
<button type="button" class="we-report-viewer__btn we-report-viewer__btn--text" (click)="downloadPng()" [disabled]="!document()" [title]="strings().downloadPng + ' · ' + strings().pageNumber + ' ' + currentPage()">
|
|
3715
|
+
<span [innerHTML]="'download' | weReportIcon"></span>{{ strings().downloadPng }}
|
|
3716
|
+
</button>
|
|
3717
|
+
}
|
|
3718
|
+
@if (!hidden('more')) {
|
|
3719
|
+
<select class="we-report-viewer__more" [disabled]="!document()" (change)="downloadForPrinter($any($event.target).value); $any($event.target).value = ''" [attr.aria-label]="strings().printerOutput" [title]="strings().printerOutputHint">
|
|
3720
|
+
<option value="" selected>{{ strings().printerOutput }}…</option>
|
|
3721
|
+
<option value="csv">CSV</option>
|
|
3722
|
+
<option value="pngzip">{{ strings().pngAllPages }}</option>
|
|
3723
|
+
<option value="zpl">{{ strings().printerZpl }}</option>
|
|
3724
|
+
<option value="escpos58">{{ strings().printerEscPos }} · 58 mm</option>
|
|
3725
|
+
<option value="escpos80">{{ strings().printerEscPos }} · 80 mm</option>
|
|
3726
|
+
</select>
|
|
3727
|
+
}
|
|
3728
|
+
@if (!hidden('pdf')) {
|
|
3729
|
+
<button type="button" class="we-report-viewer__btn we-report-viewer__btn--text" (click)="downloadPdf()" [disabled]="!document()">
|
|
3730
|
+
<span [innerHTML]="'download' | weReportIcon"></span>{{ strings().downloadPdf }}
|
|
3731
|
+
</button>
|
|
3732
|
+
}
|
|
2920
3733
|
</div>
|
|
2921
3734
|
@if (report().parameters?.length) {
|
|
2922
3735
|
<form class="we-report-viewer__params" (submit)="$event.preventDefault(); applyParams()">
|
|
2923
3736
|
@for (p of report().parameters!; track p.name) {
|
|
2924
3737
|
<label>
|
|
2925
3738
|
<span>{{ p.label || p.name }}</span>
|
|
3739
|
+
@let options = choices()[p.name];
|
|
3740
|
+
@if (options?.length) {
|
|
3741
|
+
<select (change)="setParam(p, $any($event.target).value)">
|
|
3742
|
+
<option value="" [selected]="(paramValue(p) ?? '') === ''">—</option>
|
|
3743
|
+
@for (o of options; track o.value) {
|
|
3744
|
+
<option [value]="o.value" [selected]="'' + o.value === '' + (paramValue(p) ?? '')">{{ o.label }}</option>
|
|
3745
|
+
}
|
|
3746
|
+
</select>
|
|
3747
|
+
} @else {
|
|
2926
3748
|
@switch (p.type) {
|
|
2927
3749
|
@case ('boolean') {
|
|
2928
3750
|
<input type="checkbox" [checked]="paramValue(p) === true" (change)="setParam(p, $any($event.target).checked)" />
|
|
@@ -2937,6 +3759,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2937
3759
|
<input [value]="paramValue(p) ?? ''" (input)="setParam(p, $any($event.target).value)" />
|
|
2938
3760
|
}
|
|
2939
3761
|
}
|
|
3762
|
+
}
|
|
2940
3763
|
</label>
|
|
2941
3764
|
}
|
|
2942
3765
|
<button type="submit" class="we-report-viewer__btn we-report-viewer__btn--text">{{ strings().runReport }}</button>
|
|
@@ -2962,6 +3785,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2962
3785
|
</details>
|
|
2963
3786
|
}
|
|
2964
3787
|
<div class="we-report-viewer__main">
|
|
3788
|
+
@if (showMap() && document()?.bookmarks?.length) {
|
|
3789
|
+
<nav class="we-report-viewer__map" [attr.aria-label]="strings().documentMap">
|
|
3790
|
+
@for (mark of document()!.bookmarks!; track $index) {
|
|
3791
|
+
<button type="button" class="we-report-viewer__mark" [style.padding-left.px]="8 + mark.level * 14" (click)="goToBookmark(mark)">{{ mark.title }}</button>
|
|
3792
|
+
}
|
|
3793
|
+
</nav>
|
|
3794
|
+
}
|
|
2965
3795
|
@if (showThumbs() && pageTotal() > 1) {
|
|
2966
3796
|
<nav #thumbs class="we-report-viewer__thumbs" [attr.aria-label]="strings().thumbnails">
|
|
2967
3797
|
@for (page of document()!.pages; track $index; let p = $index) {
|
|
@@ -2976,7 +3806,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2976
3806
|
}
|
|
2977
3807
|
</nav>
|
|
2978
3808
|
}
|
|
2979
|
-
<div #scroller class="we-report-viewer__scroll" tabindex="0" (scroll)="onScroll()">
|
|
3809
|
+
<div #scroller class="we-report-viewer__scroll" tabindex="0" (scroll)="onScroll()" (wheel)="onWheel($event)">
|
|
2980
3810
|
@if (document(); as doc) {
|
|
2981
3811
|
@for (page of doc.pages; track $index; let p = $index) {
|
|
2982
3812
|
<we-report-page
|
|
@@ -2994,7 +3824,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
2994
3824
|
}
|
|
2995
3825
|
</div>
|
|
2996
3826
|
</div>
|
|
2997
|
-
`, styles: [":host{display:flex;flex-direction:column;min-height:0;font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;letter-spacing:-.003em;color:var(--we-report-fg, #1d1d1f);background:var(--we-report-workspace-bg, #f2f2f7);-webkit-font-smoothing:antialiased}.we-report-viewer__toolbar,.we-report-viewer__params{position:relative;z-index:1;display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:8px 14px;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.we-report-viewer__btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:transparent;color:inherit;font:inherit;font-weight:500;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.we-report-viewer__btn--text{padding:0 10px}.we-report-viewer__btn:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.we-report-viewer__btn:focus-visible,.we-report-viewer__params input:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.we-report-viewer__btn:disabled{opacity:.3;cursor:default}.we-report-viewer__btn :is(svg){width:17px;height:17px}.we-report-viewer__zoom{min-width:44px;text-align:center;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
3827
|
+
`, styles: [":host{display:flex;flex-direction:column;min-height:0;font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;letter-spacing:-.003em;color:var(--we-report-fg, #1d1d1f);background:var(--we-report-workspace-bg, #f2f2f7);-webkit-font-smoothing:antialiased}.we-report-viewer__toolbar,.we-report-viewer__params{position:relative;z-index:1;display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:8px 14px;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.we-report-viewer__btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:transparent;color:inherit;font:inherit;font-weight:500;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.we-report-viewer__btn--text{padding:0 10px}.we-report-viewer__btn:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.we-report-viewer__btn:focus-visible,.we-report-viewer__params input:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.we-report-viewer__btn:disabled{opacity:.3;cursor:default}.we-report-viewer__btn :is(svg){width:17px;height:17px}.we-report-viewer__zoom{min-width:44px;text-align:center;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.we-report-viewer__pages{margin-left:8px;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.we-report-viewer__sep{width:.5px;height:20px;margin:0 6px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.we-report-viewer__zoomsel,.we-report-viewer__pagebox,.we-report-viewer__search{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit;font-variant-numeric:tabular-nums}.we-report-viewer__zoomsel:focus,.we-report-viewer__pagebox:focus,.we-report-viewer__search:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.we-report-viewer__pagebox{width:56px;text-align:center}.we-report-viewer__search{width:180px}.we-report-viewer__scroll:focus{outline:none}.we-report-viewer__spacer{flex:1}.we-report-viewer__main{flex:1;display:flex;min-height:0}.we-report-viewer__map{flex:none;display:flex;flex-direction:column;width:220px;overflow:auto;padding:8px 4px;border-right:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));background:var(--we-report-panel-bg, #fbfbfd)}.we-report-viewer__mark{border:0;padding:4px 8px;border-radius:6px;background:none;color:inherit;font:inherit;font-size:12px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.we-report-viewer__mark:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.we-report-viewer__thumbs{flex:none;display:flex;flex-direction:column;align-items:center;gap:12px;overflow:auto;padding:16px 12px;border-right:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));background:var(--we-report-panel-bg, #fbfbfd)}.we-report-viewer__thumb{display:flex;flex-direction:column;align-items:center;gap:4px;border:0;padding:4px;border-radius:6px;background:none;color:inherit;font:inherit;font-size:11px;cursor:pointer}.we-report-viewer__thumb--current{background:var(--we-report-selection-fill, rgba(0, 122, 255, .12))}.we-report-viewer__thumb we-report-page,.we-report-viewer__thumb-blank{background:var(--we-report-page-bg, #fff);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14));pointer-events:none}.we-report-viewer__btn--on{background:var(--we-report-selection-fill, rgba(0, 122, 255, .12))}.we-report-viewer__scroll{flex:1;overflow:auto;padding:32px;display:flex;flex-direction:column;align-items:flex-start;gap:32px}.we-report-viewer__scroll>*{margin-inline:auto}.we-report-viewer__page{border-radius:2px}.we-report-viewer__params{align-items:flex-end;gap:12px;font-size:12px}.we-report-viewer__params label{display:flex;flex-direction:column;gap:3px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.we-report-viewer__more,.we-report-viewer__params input:not([type=checkbox]),.we-report-viewer__params select{font:inherit;font-size:13px;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:var(--we-report-fg, #1d1d1f)}.we-report-viewer__params input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}.we-report-viewer__params button[type=submit]{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);padding:0 14px}.we-report-viewer__params button[type=submit]:hover{background:var(--we-report-accent, #007aff);filter:brightness(1.08)}.we-report-viewer__error,.we-report-viewer__problems{margin:10px 14px 0;padding:10px 14px;border-radius:10px;font-size:13px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400)}.we-report-viewer__problems summary{cursor:pointer;font-weight:500}.we-report-viewer__problems ul{margin:6px 0 0;padding-left:18px}.we-report-viewer__loading{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}@media (prefers-reduced-motion: reduce){.we-report-viewer__btn{transition:none}}@media print{.we-report-viewer__toolbar{display:none}}\n"] }]
|
|
2998
3828
|
}], ctorParameters: () => [], propDecorators: { onKeydown: [{
|
|
2999
3829
|
type: HostListener,
|
|
3000
3830
|
args: ['keydown', ['$event']]
|
|
@@ -3010,14 +3840,22 @@ const TOOLBOX_ITEMS = [
|
|
|
3010
3840
|
{ type: 'barcode', icon: 'qrcode', variant: 'qrcode' },
|
|
3011
3841
|
{ type: 'pageInfo', icon: 'pageInfo' },
|
|
3012
3842
|
{ type: 'checkbox', icon: 'checkbox' },
|
|
3843
|
+
{ type: 'text', icon: 'signature', variant: 'signature' },
|
|
3013
3844
|
{ type: 'table', icon: 'table' },
|
|
3014
3845
|
{ type: 'chart', icon: 'chart' },
|
|
3846
|
+
{ type: 'crosstab', icon: 'crosstab' },
|
|
3847
|
+
{ type: 'subreport', icon: 'subreport' },
|
|
3015
3848
|
];
|
|
3016
3849
|
/** A new control with sensible defaults, top-left corner at (x, y) mm. */
|
|
3017
3850
|
function createControl(type, id, x, y, text, variant) {
|
|
3018
3851
|
const base = { id, x, y };
|
|
3019
3852
|
switch (type) {
|
|
3020
3853
|
case 'text':
|
|
3854
|
+
// A signature line: the caption under a line; the space above it is for the signature.
|
|
3855
|
+
if (variant === 'signature') {
|
|
3856
|
+
const line = { width: 0.3, color: DEFAULT_STYLE.color, sides: { top: true, right: false, bottom: false, left: false } };
|
|
3857
|
+
return { ...base, type, width: 50, height: 6, text, styleOverrides: { textAlign: 'center', border: line } };
|
|
3858
|
+
}
|
|
3021
3859
|
return { ...base, type, width: 40, height: 6, text };
|
|
3022
3860
|
case 'line':
|
|
3023
3861
|
return { ...base, type, width: 60, height: 2, direction: 'horizontal', lineWidth: 0.3 };
|
|
@@ -3049,6 +3887,23 @@ function createControl(type, id, x, y, text, variant) {
|
|
|
3049
3887
|
};
|
|
3050
3888
|
case 'chart':
|
|
3051
3889
|
return { ...base, type, width: 120, height: 60, chartType: 'column', category: { expression: '' }, value: { expression: '' }, showValues: true };
|
|
3890
|
+
case 'crosstab':
|
|
3891
|
+
return {
|
|
3892
|
+
...base,
|
|
3893
|
+
type,
|
|
3894
|
+
width: 120,
|
|
3895
|
+
height: 18,
|
|
3896
|
+
rows: { expression: '' },
|
|
3897
|
+
columns: { expression: '' },
|
|
3898
|
+
value: { expression: '' },
|
|
3899
|
+
styleOverrides: { border: { width: 0.25, color: DEFAULT_TABLE_BORDER_COLOR, sides: { top: true, right: true, bottom: true, left: true } } },
|
|
3900
|
+
};
|
|
3901
|
+
case 'subreport': {
|
|
3902
|
+
// An empty report with only a detail section: the box shows its rows.
|
|
3903
|
+
const report = createBlankReport(text);
|
|
3904
|
+
report.bands = [{ id: 'detail', kind: 'detail', height: 6, controls: [] }];
|
|
3905
|
+
return { ...base, type, width: 120, height: 20, report };
|
|
3906
|
+
}
|
|
3052
3907
|
}
|
|
3053
3908
|
}
|
|
3054
3909
|
/** Default display format for a data field type. */
|
|
@@ -3068,7 +3923,7 @@ const round$1 = (v) => Math.round(v * 100) / 100;
|
|
|
3068
3923
|
/** Marks designer items on the system clipboard, so they paste into another tab or window. */
|
|
3069
3924
|
const CLIPBOARD_MARKER = 'we-report/controls+json:';
|
|
3070
3925
|
const CONTROL_TYPES = {
|
|
3071
|
-
text: true, line: true, shape: true, image: true, barcode: true, pageInfo: true, checkbox: true, chart: true, table: true,
|
|
3926
|
+
text: true, line: true, shape: true, image: true, barcode: true, pageInfo: true, checkbox: true, chart: true, table: true, crosstab: true, subreport: true,
|
|
3072
3927
|
};
|
|
3073
3928
|
function isPastedControl(c) {
|
|
3074
3929
|
if (!c || typeof c !== 'object')
|
|
@@ -3079,7 +3934,8 @@ function isPastedControl(c) {
|
|
|
3079
3934
|
typeof x['type'] === 'string' &&
|
|
3080
3935
|
Object.hasOwn(CONTROL_TYPES, x['type']) &&
|
|
3081
3936
|
['x', 'y', 'width', 'height'].every((k) => finite(x[k])) &&
|
|
3082
|
-
(x['type'] !== 'table' || (Array.isArray(x['columns']) && Array.isArray(x['rows']) && x['rows'].every((r) => Array.isArray(r?.cells))))
|
|
3937
|
+
(x['type'] !== 'table' || (Array.isArray(x['columns']) && Array.isArray(x['rows']) && x['rows'].every((r) => Array.isArray(r?.cells)))) &&
|
|
3938
|
+
(x['type'] !== 'subreport' || Array.isArray(x['report']?.bands)));
|
|
3083
3939
|
}
|
|
3084
3940
|
const HISTORY_LIMIT = 200;
|
|
3085
3941
|
const COALESCE_MS = 800;
|
|
@@ -3116,6 +3972,8 @@ class DesignerState {
|
|
|
3116
3972
|
/** Format painter: the look picked up from one item, applied to the next item clicked. */
|
|
3117
3973
|
painter = signal(null);
|
|
3118
3974
|
/** Text being typed on the page (double-click / F2): a text control, or a cell of a table. */
|
|
3975
|
+
/** Id of the sub-report whose design is open in its own designer window. */
|
|
3976
|
+
subreportOpen = signal(null);
|
|
3119
3977
|
editing = signal(null);
|
|
3120
3978
|
/** Where the pointer is on the page, for the status bar: band and mm inside it. */
|
|
3121
3979
|
pointer = signal(null);
|
|
@@ -3346,6 +4204,57 @@ class DesignerState {
|
|
|
3346
4204
|
c.y = Math.max(0, c.y);
|
|
3347
4205
|
});
|
|
3348
4206
|
}
|
|
4207
|
+
/**
|
|
4208
|
+
* "Tidy up": puts the items on the grid (`step` mm), lines up those that are nearly in a row
|
|
4209
|
+
* (same top) or a column (same left), and gives the texts of a row one height. One undo step.
|
|
4210
|
+
*/
|
|
4211
|
+
tidy(ids, step) {
|
|
4212
|
+
const grid = step > 0 ? step : 1;
|
|
4213
|
+
// Sloppy placement (under 2 mm) counts as one row or column; a whole grid step apart never does.
|
|
4214
|
+
const near = Math.min(2, Math.max(grid * 0.9, 1.5));
|
|
4215
|
+
const snap = (v) => round$1(Math.round(v / grid) * grid);
|
|
4216
|
+
/** Clusters values that lie within `near` of the cluster's first one; maps each id to its cluster's smallest value. */
|
|
4217
|
+
const cluster = (items) => {
|
|
4218
|
+
const out = new Map();
|
|
4219
|
+
const sorted = [...items].sort((a, b) => a.v - b.v);
|
|
4220
|
+
for (let i = 0; i < sorted.length;) {
|
|
4221
|
+
let j = i;
|
|
4222
|
+
while (j < sorted.length && sorted[j].v - sorted[i].v < near)
|
|
4223
|
+
j++;
|
|
4224
|
+
for (const it of sorted.slice(i, j))
|
|
4225
|
+
out.set(it.id, snap(sorted[i].v));
|
|
4226
|
+
i = j;
|
|
4227
|
+
}
|
|
4228
|
+
return out;
|
|
4229
|
+
};
|
|
4230
|
+
const wanted = new Set(ids);
|
|
4231
|
+
const target = new Map();
|
|
4232
|
+
for (const band of this.report().bands) {
|
|
4233
|
+
const controls = band.controls.filter((c) => wanted.has(c.id));
|
|
4234
|
+
if (!controls.length)
|
|
4235
|
+
continue;
|
|
4236
|
+
const tops = cluster(controls.map((c) => ({ id: c.id, v: c.y })));
|
|
4237
|
+
const lefts = cluster(controls.map((c) => ({ id: c.id, v: c.x })));
|
|
4238
|
+
// Texts sharing a top share the tallest (snapped) height.
|
|
4239
|
+
const rowHeight = new Map();
|
|
4240
|
+
for (const c of controls)
|
|
4241
|
+
if (c.type === 'text')
|
|
4242
|
+
rowHeight.set(tops.get(c.id), Math.max(rowHeight.get(tops.get(c.id)) ?? 0, c.height));
|
|
4243
|
+
for (const c of controls) {
|
|
4244
|
+
const thin = c.type === 'line';
|
|
4245
|
+
target.set(c.id, {
|
|
4246
|
+
x: lefts.get(c.id),
|
|
4247
|
+
y: tops.get(c.id),
|
|
4248
|
+
width: thin && c.direction === 'vertical' ? c.width : Math.max(grid, snap(c.width)),
|
|
4249
|
+
height: thin ? c.height : Math.max(grid, snap(c.type === 'text' ? rowHeight.get(tops.get(c.id)) : c.height)),
|
|
4250
|
+
});
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
this.updateControls([...target.keys()], (c, band) => {
|
|
4254
|
+
Object.assign(c, target.get(c.id));
|
|
4255
|
+
band.height = Math.max(band.height, round$1(c.y + c.height));
|
|
4256
|
+
});
|
|
4257
|
+
}
|
|
3349
4258
|
/** Equal gaps between three or more controls, keeping the outermost two in place. */
|
|
3350
4259
|
distribute(axis) {
|
|
3351
4260
|
const controls = this.selectedControls();
|
|
@@ -3547,6 +4456,8 @@ class ExpressionEditorComponent {
|
|
|
3547
4456
|
const fields = [
|
|
3548
4457
|
...this.fields().map((f) => ({ label: f.expression, insert: f.expression, back: 0, help: f.label })),
|
|
3549
4458
|
...this.parameters().map((p) => ({ label: `[?${p.name}]`, insert: `[?${p.name}]`, back: 0, help: p.label ?? '' })),
|
|
4459
|
+
{ label: '[PageNumber]', insert: '[PageNumber]', back: 0, help: this.strings().pageNumber },
|
|
4460
|
+
{ label: '[Pages]', insert: '[Pages]', back: 0, help: this.strings().pageTotal },
|
|
3550
4461
|
];
|
|
3551
4462
|
const matches = (s) => s.label.toLocaleLowerCase().replace(/^\[\??/, '').includes(q.replace(/^\[\??/, ''));
|
|
3552
4463
|
if (t.field)
|
|
@@ -3654,6 +4565,8 @@ class ExpressionEditorComponent {
|
|
|
3654
4565
|
@for (p of parameters(); track p.name) {
|
|
3655
4566
|
<li><button type="button" (click)="insert('[?' + p.name + ']')">? {{ p.label || p.name }}</button></li>
|
|
3656
4567
|
}
|
|
4568
|
+
<li><button type="button" (click)="insert('[PageNumber]')"># {{ s.pageNumber }}</button></li>
|
|
4569
|
+
<li><button type="button" (click)="insert('[Pages]')"># {{ s.pageTotal }}</button></li>
|
|
3657
4570
|
</ul>
|
|
3658
4571
|
</section>
|
|
3659
4572
|
<section>
|
|
@@ -3680,7 +4593,7 @@ class ExpressionEditorComponent {
|
|
|
3680
4593
|
<button type="button" class="xe__primary" (click)="applied.emit(draft())">{{ s.apply }}</button>
|
|
3681
4594
|
</div>
|
|
3682
4595
|
</div>
|
|
3683
|
-
`, isInline: true, styles: [".xe__backdrop{position:fixed;inset:0;z-index:150;background:var(--we-report-backdrop, rgba(0, 0, 0, .22))}.xe{position:fixed;top:50%;left:50%;z-index:151;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:10px;width:min(820px,calc(100vw - 32px));height:min(640px,calc(100vh - 32px));box-sizing:border-box;padding:20px;border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);color:var(--we-report-fg, #1d1d1f);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));font:13px var(--we-report-font-family, system-ui, sans-serif)}h2{margin:0;font-size:15px;font-weight:600}h3{margin:0 0 6px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
4596
|
+
`, isInline: true, styles: [".xe__backdrop{position:fixed;inset:0;z-index:150;background:var(--we-report-backdrop, rgba(0, 0, 0, .22))}.xe{position:fixed;top:50%;left:50%;z-index:151;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:10px;width:min(820px,calc(100vw - 32px));height:min(640px,calc(100vh - 32px));box-sizing:border-box;padding:20px;border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);color:var(--we-report-fg, #1d1d1f);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));font:13px var(--we-report-font-family, system-ui, sans-serif)}h2{margin:0;font-size:15px;font-weight:600}h3{margin:0 0 6px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__hint{margin:-6px 0 0;font-size:12px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__field{position:relative}.xe__suggest{position:absolute;left:0;right:0;top:100%;z-index:2;max-height:220px;overflow:auto;margin:4px 0 0;padding:4px;list-style:none;border-radius:10px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14))}.xe__suggest li{display:flex;align-items:baseline;gap:8px;padding:4px 8px;border-radius:6px;cursor:pointer}.xe__suggest li.xe__on{background:var(--we-report-selection-fill, rgba(0, 122, 255, .12))}.xe__suggest small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__formula{box-sizing:border-box;width:100%;padding:10px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:13px ui-monospace,SF Mono,Menlo,Consolas,monospace;resize:vertical}.xe__formula:focus,button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.xe__result{display:flex;gap:8px;align-items:baseline;padding:8px 12px;border-radius:10px;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));font-size:12px}.xe__result span{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__result output{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.xe__result--error{background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400)}.xe__lists{flex:1;min-height:0;display:grid;grid-template-columns:220px minmax(0,1fr);gap:16px}.xe__lists section{display:flex;flex-direction:column;min-height:0}ul{flex:1;overflow:auto;list-style:none;margin:0;padding:4px;border-radius:10px;background:var(--we-report-workspace-bg, #f2f2f7)}li button{display:block;width:100%;border:0;border-radius:6px;padding:5px 8px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}li button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.xe__fn code{display:block;font:12px ui-monospace,SF Mono,Menlo,Consolas,monospace;color:var(--we-report-accent, #007aff)}.xe__fn small{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__cats{display:flex;gap:2px;padding:2px;margin-bottom:6px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.xe__cats button{flex:1;border:0;border-radius:6px;padding:4px;background:transparent;color:inherit;font:inherit;font-size:12px;cursor:pointer}.xe__cats .xe__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.xe__actions{display:flex;justify-content:flex-end;gap:8px}.xe__actions button{border:0;border-radius:var(--we-report-control-radius, 7px);padding:6px 16px;background:var(--we-report-hover-bg, rgba(118, 118, 128, .12));color:inherit;font:inherit;font-weight:500;cursor:pointer}.xe__actions .xe__primary{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3684
4597
|
}
|
|
3685
4598
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ExpressionEditorComponent, decorators: [{
|
|
3686
4599
|
type: Component,
|
|
@@ -3732,6 +4645,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3732
4645
|
@for (p of parameters(); track p.name) {
|
|
3733
4646
|
<li><button type="button" (click)="insert('[?' + p.name + ']')">? {{ p.label || p.name }}</button></li>
|
|
3734
4647
|
}
|
|
4648
|
+
<li><button type="button" (click)="insert('[PageNumber]')"># {{ s.pageNumber }}</button></li>
|
|
4649
|
+
<li><button type="button" (click)="insert('[Pages]')"># {{ s.pageTotal }}</button></li>
|
|
3735
4650
|
</ul>
|
|
3736
4651
|
</section>
|
|
3737
4652
|
<section>
|
|
@@ -3758,11 +4673,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3758
4673
|
<button type="button" class="xe__primary" (click)="applied.emit(draft())">{{ s.apply }}</button>
|
|
3759
4674
|
</div>
|
|
3760
4675
|
</div>
|
|
3761
|
-
`, styles: [".xe__backdrop{position:fixed;inset:0;z-index:150;background:var(--we-report-backdrop, rgba(0, 0, 0, .22))}.xe{position:fixed;top:50%;left:50%;z-index:151;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:10px;width:min(820px,calc(100vw - 32px));height:min(640px,calc(100vh - 32px));box-sizing:border-box;padding:20px;border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);color:var(--we-report-fg, #1d1d1f);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));font:13px var(--we-report-font-family, system-ui, sans-serif)}h2{margin:0;font-size:15px;font-weight:600}h3{margin:0 0 6px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
4676
|
+
`, styles: [".xe__backdrop{position:fixed;inset:0;z-index:150;background:var(--we-report-backdrop, rgba(0, 0, 0, .22))}.xe{position:fixed;top:50%;left:50%;z-index:151;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:10px;width:min(820px,calc(100vw - 32px));height:min(640px,calc(100vh - 32px));box-sizing:border-box;padding:20px;border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);color:var(--we-report-fg, #1d1d1f);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));font:13px var(--we-report-font-family, system-ui, sans-serif)}h2{margin:0;font-size:15px;font-weight:600}h3{margin:0 0 6px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__hint{margin:-6px 0 0;font-size:12px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__field{position:relative}.xe__suggest{position:absolute;left:0;right:0;top:100%;z-index:2;max-height:220px;overflow:auto;margin:4px 0 0;padding:4px;list-style:none;border-radius:10px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14))}.xe__suggest li{display:flex;align-items:baseline;gap:8px;padding:4px 8px;border-radius:6px;cursor:pointer}.xe__suggest li.xe__on{background:var(--we-report-selection-fill, rgba(0, 122, 255, .12))}.xe__suggest small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__formula{box-sizing:border-box;width:100%;padding:10px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:13px ui-monospace,SF Mono,Menlo,Consolas,monospace;resize:vertical}.xe__formula:focus,button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.xe__result{display:flex;gap:8px;align-items:baseline;padding:8px 12px;border-radius:10px;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));font-size:12px}.xe__result span{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__result output{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.xe__result--error{background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400)}.xe__lists{flex:1;min-height:0;display:grid;grid-template-columns:220px minmax(0,1fr);gap:16px}.xe__lists section{display:flex;flex-direction:column;min-height:0}ul{flex:1;overflow:auto;list-style:none;margin:0;padding:4px;border-radius:10px;background:var(--we-report-workspace-bg, #f2f2f7)}li button{display:block;width:100%;border:0;border-radius:6px;padding:5px 8px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}li button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.xe__fn code{display:block;font:12px ui-monospace,SF Mono,Menlo,Consolas,monospace;color:var(--we-report-accent, #007aff)}.xe__fn small{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.xe__cats{display:flex;gap:2px;padding:2px;margin-bottom:6px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.xe__cats button{flex:1;border:0;border-radius:6px;padding:4px;background:transparent;color:inherit;font:inherit;font-size:12px;cursor:pointer}.xe__cats .xe__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.xe__actions{display:flex;justify-content:flex-end;gap:8px}.xe__actions button{border:0;border-radius:var(--we-report-control-radius, 7px);padding:6px 16px;background:var(--we-report-hover-bg, rgba(118, 118, 128, .12));color:inherit;font:inherit;font-weight:500;cursor:pointer}.xe__actions .xe__primary{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}\n"] }]
|
|
3762
4677
|
}] });
|
|
3763
4678
|
|
|
3764
4679
|
const DRAG_MIME = 'application/x-we-report';
|
|
3765
4680
|
const PX_PER_MM = 96 / 25.4;
|
|
4681
|
+
/**
|
|
4682
|
+
* Fields to start a chart or cross table with: text fields that repeat (fewest different values
|
|
4683
|
+
* first; a name on every row does not group) and the number field with the largest total.
|
|
4684
|
+
*/
|
|
4685
|
+
function guessBindings(rows) {
|
|
4686
|
+
const sample = rows.slice(0, 500).filter((r) => !!r && typeof r === 'object');
|
|
4687
|
+
const keys = [...new Set(sample.flatMap((r) => Object.keys(r)))];
|
|
4688
|
+
const texts = keys
|
|
4689
|
+
.filter((k) => sample.some((r) => typeof r[k] === 'string'))
|
|
4690
|
+
.map((k) => ({ k, distinct: new Set(sample.map((r) => r[k])).size }))
|
|
4691
|
+
.filter((t) => t.distinct > 1 && (t.distinct < sample.length || sample.length < 3))
|
|
4692
|
+
.sort((a, b) => a.distinct - b.distinct)
|
|
4693
|
+
.map((t) => t.k);
|
|
4694
|
+
const amount = keys
|
|
4695
|
+
.filter((k) => isSummableField(k) && sample.some((r) => typeof r[k] === 'number'))
|
|
4696
|
+
.map((k) => ({ k, total: sample.reduce((s, r) => s + Math.abs(typeof r[k] === 'number' ? r[k] : 0), 0) }))
|
|
4697
|
+
.sort((a, b) => b.total - a.total)[0]?.k;
|
|
4698
|
+
return { groups: texts, amount };
|
|
4699
|
+
}
|
|
3766
4700
|
const SNAP_DISTANCE_MM = 1.5;
|
|
3767
4701
|
const MIN_SIZE_MM = 1;
|
|
3768
4702
|
/** Gaps from `p` to the nearest rect on each side that faces it (overlaps on the other axis). */
|
|
@@ -3809,10 +4743,78 @@ class DesignSurfaceComponent {
|
|
|
3809
4743
|
fontsService = inject(WeReportFontsService);
|
|
3810
4744
|
/** Texts (without Grow to fit text) whose content does not fit, measured with the report's fonts like the print. */
|
|
3811
4745
|
cutTexts = signal(new Set());
|
|
4746
|
+
/**
|
|
4747
|
+
* Sub-reports, cross tables and charts drawn inside their box as they print, from the sample
|
|
4748
|
+
* data: a sub-report with the sample row around it, the others over all sample rows.
|
|
4749
|
+
*/
|
|
4750
|
+
previewPages = signal(new Map());
|
|
4751
|
+
previewRun = 0;
|
|
4752
|
+
previewItems = effect(() => {
|
|
4753
|
+
const report = this.state.report();
|
|
4754
|
+
const sample = this.sample();
|
|
4755
|
+
const subs = report.bands.flatMap((band) => band.controls
|
|
4756
|
+
.filter((c) => c.type === 'subreport' ||
|
|
4757
|
+
((c.type === 'crosstab' || c.type === 'chart') && sample) ||
|
|
4758
|
+
(c.type === 'barcode' && (sample || !isExpression(c.value))) ||
|
|
4759
|
+
(c.type === 'checkbox' && (sample || !isExpression(c.checked))) ||
|
|
4760
|
+
// Pictures from data (embedded ones show as an <img>; addresses are only fetched by the viewer).
|
|
4761
|
+
(c.type === 'image' && sample && isExpression(c.source)))
|
|
4762
|
+
.map((c) => ({ c, band })));
|
|
4763
|
+
const run = ++this.previewRun;
|
|
4764
|
+
if (!subs.length) {
|
|
4765
|
+
if (this.previewPages().size)
|
|
4766
|
+
setTimeout(() => run === this.previewRun && this.previewPages.set(new Map()));
|
|
4767
|
+
return;
|
|
4768
|
+
}
|
|
4769
|
+
// A moment after the last edit, so dragging and typing do not lay out on every step.
|
|
4770
|
+
void Promise.all([this.fontsService.ready(), new Promise((resolve) => setTimeout(resolve, 120))]).then(([fonts]) => {
|
|
4771
|
+
if (run !== this.previewRun)
|
|
4772
|
+
return;
|
|
4773
|
+
const pages = new Map();
|
|
4774
|
+
for (const { c, band } of subs) {
|
|
4775
|
+
const bandSample = this.sampleFor(band);
|
|
4776
|
+
const row = bandSample?.row;
|
|
4777
|
+
// A chart over a list inside the row (a sparkline) is drawn for the sample row, like a sub-report;
|
|
4778
|
+
// a data bar is the first row's bar measured against all sample rows.
|
|
4779
|
+
const ofRows = c.type === 'crosstab' || (c.type === 'chart' && !c.rows?.expression.trim() && c.chartType !== 'databar');
|
|
4780
|
+
const dataBar = c.type === 'chart' && c.chartType === 'databar';
|
|
4781
|
+
// The box alone on a page of its own width: a sub-report with the sample row around it,
|
|
4782
|
+
// a cross table or chart in a report footer over the sample rows.
|
|
4783
|
+
const def = {
|
|
4784
|
+
...createBlankReport(),
|
|
4785
|
+
page: { paper: 'custom', orientation: 'portrait', width: c.width, height: null, margins: { top: 0, right: 0, bottom: 0, left: 0 }, displayUnit: 'mm' },
|
|
4786
|
+
styles: report.styles,
|
|
4787
|
+
dataSources: report.dataSources,
|
|
4788
|
+
calculatedFields: report.calculatedFields,
|
|
4789
|
+
parameters: report.parameters,
|
|
4790
|
+
locale: report.locale,
|
|
4791
|
+
currency: report.currency,
|
|
4792
|
+
bands: [{ id: 'preview', kind: ofRows ? 'reportFooter' : 'detail', height: c.height, controls: [{ ...c, x: 0, y: 0 }] }],
|
|
4793
|
+
};
|
|
4794
|
+
try {
|
|
4795
|
+
const doc = layoutReport(def, {
|
|
4796
|
+
fonts,
|
|
4797
|
+
data: ofRows || dataBar ? [...(bandSample?.rows ?? [])] : row === undefined ? undefined : [row],
|
|
4798
|
+
now: new Date(),
|
|
4799
|
+
locale: this.config.locale,
|
|
4800
|
+
currency: this.config.currency,
|
|
4801
|
+
});
|
|
4802
|
+
// Nothing drawn (a broken sub-report, an empty value): the icon says more than a blank box.
|
|
4803
|
+
if (doc.pages[0]?.items.length)
|
|
4804
|
+
pages.set(c.id, doc.pages[0]);
|
|
4805
|
+
}
|
|
4806
|
+
catch {
|
|
4807
|
+
/* a sub-report that cannot be laid out shows its placeholder */
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4810
|
+
this.previewPages.set(pages);
|
|
4811
|
+
});
|
|
4812
|
+
});
|
|
3812
4813
|
measureRun = 0;
|
|
3813
4814
|
measureTexts = effect(() => {
|
|
3814
4815
|
const report = this.state.report();
|
|
3815
|
-
|
|
4816
|
+
// shortcut: rich texts are not checked (their pieces measure in different fonts).
|
|
4817
|
+
const texts = report.bands.flatMap((b) => b.controls.filter((c) => c.type === 'text' && !c.canGrow && !c.markup).map((c) => ({ c, text: this.caption(c, b) })));
|
|
3816
4818
|
const run = ++this.measureRun;
|
|
3817
4819
|
void this.fontsService.ready().then((fonts) => {
|
|
3818
4820
|
if (run !== this.measureRun)
|
|
@@ -3924,7 +4926,10 @@ class DesignSurfaceComponent {
|
|
|
3924
4926
|
try {
|
|
3925
4927
|
const report = this.state.report();
|
|
3926
4928
|
const options = { locale: report.locale || this.config.locale || 'en-US', currency: report.currency || this.config.currency || 'USD' };
|
|
3927
|
-
|
|
4929
|
+
// Page fields show a sample page, as the page number item does (page 1 of 9).
|
|
4930
|
+
const pageFields = /\[\s*(PageNumber|Pages)\s*\]/.test(c.text.expression);
|
|
4931
|
+
const row = pageFields ? { PageNumber: 1, Pages: 9, ...(sample.row !== null && typeof sample.row === 'object' ? sample.row : {}) } : sample.row;
|
|
4932
|
+
const value = evaluate(c.text.expression, { ...sample, row, ...options, now: new Date() });
|
|
3928
4933
|
return typeof value === 'string' && !c.format ? value : formatValue(value, c.format, options);
|
|
3929
4934
|
}
|
|
3930
4935
|
catch {
|
|
@@ -3937,6 +4942,23 @@ class DesignSurfaceComponent {
|
|
|
3937
4942
|
}
|
|
3938
4943
|
return '';
|
|
3939
4944
|
}
|
|
4945
|
+
/** A rich text's styled pieces; its `{formula}` fields show the sample data, else the formula. */
|
|
4946
|
+
richRuns(c, band) {
|
|
4947
|
+
const sample = this.sampleFor(band);
|
|
4948
|
+
const report = this.state.report();
|
|
4949
|
+
const options = { locale: report.locale || this.config.locale || 'en-US', currency: report.currency || this.config.currency || 'USD' };
|
|
4950
|
+
return parseRichText(this.caption(c, band), (expression) => {
|
|
4951
|
+
if (!sample)
|
|
4952
|
+
return `{${expression}}`;
|
|
4953
|
+
try {
|
|
4954
|
+
const v = evaluate(expression, { ...sample, ...options, now: new Date() });
|
|
4955
|
+
return v === null || v === undefined ? '' : typeof v === 'string' ? v : formatValue(v, undefined, options);
|
|
4956
|
+
}
|
|
4957
|
+
catch {
|
|
4958
|
+
return `{${expression}}`;
|
|
4959
|
+
}
|
|
4960
|
+
});
|
|
4961
|
+
}
|
|
3940
4962
|
textStyle(c) {
|
|
3941
4963
|
return this.styleOf(c.style, c.styleOverrides);
|
|
3942
4964
|
}
|
|
@@ -3979,7 +5001,7 @@ class DesignSurfaceComponent {
|
|
|
3979
5001
|
try {
|
|
3980
5002
|
const items = evaluate(`[${path}]`, { row });
|
|
3981
5003
|
if (Array.isArray(items) && items.length)
|
|
3982
|
-
return { row: items[0], rows: items, parent: row };
|
|
5004
|
+
return { row: items[0], rows: items, parent: row, calculated: sample.calculated };
|
|
3983
5005
|
}
|
|
3984
5006
|
catch {
|
|
3985
5007
|
return null;
|
|
@@ -4065,6 +5087,7 @@ class DesignSurfaceComponent {
|
|
|
4065
5087
|
return c.type === 'line' ? c.lineWidth : 0;
|
|
4066
5088
|
}
|
|
4067
5089
|
staticImage(c) {
|
|
5090
|
+
// Only embedded pictures: an address is fetched by the viewer (through the host's fetch), never by the design page.
|
|
4068
5091
|
return c.type === 'image' && typeof c.source === 'string' && c.source.startsWith('data:image/') ? c.source : null;
|
|
4069
5092
|
}
|
|
4070
5093
|
objectFit(c) {
|
|
@@ -4104,6 +5127,10 @@ class DesignSurfaceComponent {
|
|
|
4104
5127
|
}
|
|
4105
5128
|
/** Double-click / F2: fixed text is typed on the page, a formula opens the formula editor. */
|
|
4106
5129
|
startEditing(c, row, cell, seed) {
|
|
5130
|
+
if (c.type === 'subreport') {
|
|
5131
|
+
this.state.subreportOpen.set(c.id);
|
|
5132
|
+
return;
|
|
5133
|
+
}
|
|
4107
5134
|
let value;
|
|
4108
5135
|
if (c.type === 'text')
|
|
4109
5136
|
value = c.text;
|
|
@@ -4507,11 +5534,17 @@ class DesignSurfaceComponent {
|
|
|
4507
5534
|
const text = this.state.report().watermark?.text;
|
|
4508
5535
|
return text === undefined ? '' : isExpression(text) ? text.expression : text;
|
|
4509
5536
|
}
|
|
5537
|
+
crosstabLabel(c) {
|
|
5538
|
+
if (c.type !== 'crosstab')
|
|
5539
|
+
return '';
|
|
5540
|
+
const parts = [c.rows, c.columns].map((e) => e.expression.trim()).filter(Boolean);
|
|
5541
|
+
return parts.length === 2 ? `${parts[0]} × ${parts[1]}` : this.strings().controlNames.crosstab;
|
|
5542
|
+
}
|
|
4510
5543
|
chartLabel(c) {
|
|
4511
5544
|
if (c.type !== 'chart')
|
|
4512
5545
|
return '';
|
|
4513
5546
|
const s = this.strings();
|
|
4514
|
-
const type = { column: s.chartColumn, bar: s.chartBar, line: s.chartLine, pie: s.chartPie, doughnut: s.chartDoughnut }[c.chartType];
|
|
5547
|
+
const type = { column: s.chartColumn, bar: s.chartBar, line: s.chartLine, pie: s.chartPie, doughnut: s.chartDoughnut, sparkline: s.chartSparkline, databar: s.chartDataBar, gauge: s.chartGauge }[c.chartType];
|
|
4515
5548
|
return c.category.expression ? `${type}: ${c.value.expression} / ${c.category.expression}` : type;
|
|
4516
5549
|
}
|
|
4517
5550
|
readFile(file) {
|
|
@@ -4552,17 +5585,21 @@ class DesignSurfaceComponent {
|
|
|
4552
5585
|
const width = this.geometry().contentWidth;
|
|
4553
5586
|
if (data.kind === 'control') {
|
|
4554
5587
|
const s = this.strings();
|
|
4555
|
-
const control = createControl(data.type, this.state.newId(data.type), x, y, data.type === 'table' ? s.columnN : s.newText, data.variant);
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
5588
|
+
const control = createControl(data.type, this.state.newId(data.type), x, y, data.type === 'table' ? s.columnN : data.type === 'subreport' ? s.controlNames.subreport : data.variant === 'signature' ? s.signatureCaption : s.newText, data.variant);
|
|
5589
|
+
// Start bound to the data: grouped by the text fields with the fewest different values,
|
|
5590
|
+
// summing the number field with the largest total (an amount rather than a month or a count).
|
|
5591
|
+
const { groups, amount } = guessBindings(this.sample()?.rows ?? []);
|
|
5592
|
+
if (control.type === 'crosstab' && groups.length >= 2 && amount) {
|
|
5593
|
+
// The field with the fewest values goes across, so the table stays narrow; the other grows down.
|
|
5594
|
+
control.rows = { expression: `[${groups[1]}]` };
|
|
5595
|
+
control.columns = { expression: `[${groups[0]}]` };
|
|
5596
|
+
control.value = { expression: `[${amount}]` };
|
|
5597
|
+
// Totals without decimals fit the narrow cells; the format can be changed afterwards.
|
|
5598
|
+
control.format ??= 'n0';
|
|
5599
|
+
}
|
|
5600
|
+
if (control.type === 'chart' && groups.length && amount) {
|
|
5601
|
+
control.category = { expression: `[${groups[0]}]` };
|
|
5602
|
+
control.value = { expression: `[${amount}]` };
|
|
4566
5603
|
}
|
|
4567
5604
|
control.x = round(Math.max(0, Math.min(x, width - control.width)));
|
|
4568
5605
|
control.y = round(Math.max(0, y));
|
|
@@ -4646,7 +5683,7 @@ class DesignSurfaceComponent {
|
|
|
4646
5683
|
<text [attr.x]="l.x + 2" y="9">{{ l.text }}</text>
|
|
4647
5684
|
}
|
|
4648
5685
|
</svg>
|
|
4649
|
-
<div class="ds__page" (pointermove)="trackPointer($event)" (pointerleave)="state.pointer.set(null)" role="region" [attr.aria-label]="strings().designerLabel" [style.width.mm]="geometry().width * zoom()" [style.min-height.mm]="(geometry().height ?? 0) * zoom()" [style.padding]="padding()" [style.--ds-margin-right.mm]="state.report().page.margins.right * zoom()">
|
|
5686
|
+
<div class="ds__page" (pointermove)="trackPointer($event)" (pointerleave)="state.pointer.set(null)" role="region" [attr.aria-label]="strings().designerLabel" [style.width.mm]="geometry().width * zoom()" [style.min-height.mm]="(geometry().height ?? 0) * zoom()" [style.padding]="padding()" [style.--ds-margin-right.mm]="state.report().page.margins.right * zoom()" [style.background-color]="state.report().page.color || null">
|
|
4650
5687
|
@if (watermarkText(); as wm) {
|
|
4651
5688
|
<div class="ds__watermark" aria-hidden="true" [style.color]="state.report().watermark?.color ?? defaultWatermarkColor" [style.font-size.mm]="geometry().width * zoom() * 0.12" [style.transform]="'translate(-50%, -50%) rotate(' + -(state.report().watermark?.angle ?? 45) + 'deg)'">{{ wm }}</div>
|
|
4652
5689
|
}
|
|
@@ -4701,14 +5738,22 @@ class DesignSurfaceComponent {
|
|
|
4701
5738
|
@if (staticImage(c); as src) {
|
|
4702
5739
|
<img class="ds__fill ds__image" [src]="src" [style.object-fit]="objectFit(c)" alt="" />
|
|
4703
5740
|
} @else {
|
|
4704
|
-
|
|
5741
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5742
|
+
<div class="ds__subpreview"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
5743
|
+
} @else {
|
|
5744
|
+
<div class="ds__placeholder" [innerHTML]="'image' | weReportIcon"></div>
|
|
5745
|
+
}
|
|
4705
5746
|
}
|
|
4706
5747
|
}
|
|
4707
5748
|
@case ('barcode') {
|
|
4708
|
-
|
|
4709
|
-
<
|
|
4710
|
-
|
|
4711
|
-
|
|
5749
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5750
|
+
<div class="ds__subpreview" [title]="barcodeLabel(c)"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
5751
|
+
} @else {
|
|
5752
|
+
<div class="ds__placeholder">
|
|
5753
|
+
<span [innerHTML]="(isQr(c) ? 'qrcode' : 'barcode') | weReportIcon"></span>
|
|
5754
|
+
<small>{{ barcodeLabel(c) }}</small>
|
|
5755
|
+
</div>
|
|
5756
|
+
}
|
|
4712
5757
|
}
|
|
4713
5758
|
@case ('table') {
|
|
4714
5759
|
@for (cell of tableCells(c, band); track $index) {
|
|
@@ -4733,19 +5778,62 @@ class DesignSurfaceComponent {
|
|
|
4733
5778
|
}
|
|
4734
5779
|
}
|
|
4735
5780
|
@case ('chart') {
|
|
4736
|
-
|
|
4737
|
-
<
|
|
4738
|
-
|
|
4739
|
-
|
|
5781
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5782
|
+
<div class="ds__subpreview" [title]="chartLabel(c)"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
5783
|
+
} @else {
|
|
5784
|
+
<div class="ds__placeholder ds__chart">
|
|
5785
|
+
<span [innerHTML]="'chart' | weReportIcon"></span>
|
|
5786
|
+
<small>{{ chartLabel(c) }}</small>
|
|
5787
|
+
</div>
|
|
5788
|
+
}
|
|
4740
5789
|
}
|
|
4741
5790
|
@case ('checkbox') {
|
|
4742
|
-
|
|
5791
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5792
|
+
<div class="ds__subpreview"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
5793
|
+
} @else {
|
|
5794
|
+
<div class="ds__placeholder" [innerHTML]="'checkbox' | weReportIcon"></div>
|
|
5795
|
+
}
|
|
5796
|
+
}
|
|
5797
|
+
@case ('crosstab') {
|
|
5798
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5799
|
+
<div class="ds__subpreview" [title]="crosstabLabel(c)"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
5800
|
+
} @else {
|
|
5801
|
+
<div class="ds__placeholder ds__chart">
|
|
5802
|
+
<span [innerHTML]="'crosstab' | weReportIcon"></span>
|
|
5803
|
+
<small>{{ crosstabLabel(c) }}</small>
|
|
5804
|
+
</div>
|
|
5805
|
+
}
|
|
5806
|
+
}
|
|
5807
|
+
@case ('subreport') {
|
|
5808
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5809
|
+
<!-- The sub-report laid out with the sample row, as it prints; double-click edits it. -->
|
|
5810
|
+
<div class="ds__subpreview" [title]="strings().subreportEdit">
|
|
5811
|
+
<we-report-page [page]="preview" [zoom]="zoom()" />
|
|
5812
|
+
<small class="ds__subname">{{ c.report.name || strings().controlNames.subreport }}</small>
|
|
5813
|
+
</div>
|
|
5814
|
+
} @else {
|
|
5815
|
+
<div class="ds__placeholder ds__chart" [title]="strings().subreportEdit">
|
|
5816
|
+
<span [innerHTML]="'subreport' | weReportIcon"></span>
|
|
5817
|
+
<small>{{ c.report.name || strings().controlNames.subreport }}</small>
|
|
5818
|
+
</div>
|
|
5819
|
+
}
|
|
4743
5820
|
}
|
|
4744
5821
|
@default {
|
|
4745
5822
|
@if (isEditing(c.id)) {
|
|
4746
5823
|
<textarea class="ds__editor" [value]="editText()" [style]="textStyle(c)" (pointerdown)="$event.stopPropagation()" (keydown)="onEditorKey($event)" (blur)="commitEditing($event)" [attr.aria-label]="strings().content"></textarea>
|
|
4747
5824
|
} @else {
|
|
4748
|
-
|
|
5825
|
+
@if (c.type === 'text' && c.markup) {
|
|
5826
|
+
<div class="ds__text" [class.ds__text--bound]="isBound(c)" [style]="textStyle(c)" [attr.title]="isBound(c) ? boundExpression(c) : null">
|
|
5827
|
+
<!-- One flex item, so the pieces flow as one paragraph. -->
|
|
5828
|
+
<span>
|
|
5829
|
+
@for (r of richRuns(c, band); track $index) {
|
|
5830
|
+
<span [style.font-weight]="r.bold ? 700 : null" [style.font-style]="r.italic ? 'italic' : null" [style.text-decoration]="r.underline ? 'underline' : null">{{ r.text }}</span>
|
|
5831
|
+
}
|
|
5832
|
+
</span>
|
|
5833
|
+
</div>
|
|
5834
|
+
} @else {
|
|
5835
|
+
<div class="ds__text" [class.ds__text--bound]="isBound(c)" [style]="textStyle(c)" [attr.title]="isBound(c) ? boundExpression(c) : null">{{ caption(c, band) }}</div>
|
|
5836
|
+
}
|
|
4749
5837
|
}
|
|
4750
5838
|
}
|
|
4751
5839
|
}
|
|
@@ -4791,11 +5879,11 @@ class DesignSurfaceComponent {
|
|
|
4791
5879
|
@if (formulaEdit(); as f) {
|
|
4792
5880
|
<we-report-expression-editor [expression]="f.expression" [fields]="fields()" [strings]="strings()" (applied)="applyFormula($event)" (closed)="formulaEdit.set(null)" />
|
|
4793
5881
|
}
|
|
4794
|
-
`, isInline: true, styles: [":host{display:block;padding:32px 136px 32px 24px;outline:none}.ds__ruler{position:sticky;top:0;z-index:6;display:block;margin:-28px auto 8px;padding-top:6px;box-sizing:content-box;background:var(--we-report-workspace-bg, #f2f2f7);font:9px var(--we-report-font-family, system-ui, sans-serif);overflow:visible}.ds__ruler text{fill:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
5882
|
+
`, isInline: true, styles: [":host{display:block;padding:32px 136px 32px 24px;outline:none}.ds__ruler{position:sticky;top:0;z-index:6;display:block;margin:-28px auto 8px;padding-top:6px;box-sizing:content-box;background:var(--we-report-workspace-bg, #f2f2f7);font:9px var(--we-report-font-family, system-ui, sans-serif);overflow:visible}.ds__ruler text{fill:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.ds__ruler-ticks{stroke:var(--we-report-muted-fg, rgba(60, 60, 67, .75));stroke-width:1;shape-rendering:crispEdges}.ds__ruler-margin{fill:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.ds__ruler-selection{fill:var(--we-report-selection-fill, rgba(0, 122, 255, .07));stroke:var(--we-report-selection, #007aff);stroke-width:1}.ds__page{box-sizing:border-box;margin:0 auto;background:var(--we-report-page-bg, #fff);box-shadow:var(--we-report-page-shadow, 0 1px 3px rgba(0, 0, 0, .2));border-radius:2px}.ds__page{position:relative}.ds__watermark{position:absolute;top:50%;left:50%;font-weight:700;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none}.ds__band{position:relative}.ds__band+.ds__band{border-top:1px dashed var(--we-report-margin-guide, rgba(0, 122, 255, .18))}.ds__band-label{position:absolute;top:0;left:calc(100% + var(--ds-margin-right, 0mm) + 10px);z-index:5;max-width:116px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:999px;padding:2px 9px;font:500 11px var(--we-report-font-family, system-ui, sans-serif);background:var(--we-report-band-label-bg, rgba(118, 118, 128, .1));color:var(--we-report-band-label-fg, rgba(60, 60, 67, .85));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,color .15s ease}.ds__band:hover .ds__band-label{color:var(--we-report-fg, #1d1d1f)}.ds__band--selected .ds__band-label{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.ds__band--selected .ds__band-body{box-shadow:inset 0 0 0 1.5px var(--we-report-selection, #007aff)}.ds__band-label:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.ds__band--collapsed .ds__band-body{overflow:hidden;background:repeating-linear-gradient(-45deg,var(--we-report-band-label-bg, rgba(118, 118, 128, .1)) 0 4px,transparent 4px 8px)!important}.ds__band--collapsed .ds__band-body>*{display:none}.ds__band-body{position:relative;background-image:radial-gradient(circle,var(--we-report-margin-guide, rgba(0, 122, 255, .18)) .7px,transparent .7px)}.ds__columns{position:absolute;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;border-left:1px dashed var(--we-report-selection, #007aff);background:repeating-linear-gradient(-45deg,var(--we-report-selection-fill, rgba(0, 122, 255, .07)) 0 6px,transparent 6px 12px);color:var(--we-report-accent, #007aff);font:500 11px var(--we-report-font-family, system-ui, sans-serif);pointer-events:none}.ds__band-resize{position:absolute;left:0;right:0;bottom:-3px;height:6px;cursor:ns-resize;z-index:2}.ds__control{position:absolute;box-sizing:border-box;outline:1px dashed var(--we-report-control-outline, rgba(60, 60, 67, .22));outline-offset:-1px;border-radius:2px;cursor:default;touch-action:none;transition:outline-color .12s ease,background-color .12s ease}.ds__control:hover{outline:1px solid var(--we-report-selection, #007aff)}.ds__control--selected{outline:1.5px solid var(--we-report-selection, #007aff);outline-offset:0;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));cursor:move;z-index:1}:host(.ds--painting) .ds__control{cursor:copy}.ds__control--cut{box-shadow:inset 0 -2px 0 var(--we-report-warning-fg, #c93400)}.ds__editor{position:absolute;inset:0;z-index:6;box-sizing:border-box;width:100%;height:100%;margin:0;border:0;outline:2px solid var(--we-report-selection, #007aff);resize:none;overflow:hidden;background:var(--we-report-page-bg, #fff);line-height:1.36}.ds__marquee{position:absolute;z-index:7;border:1px solid var(--we-report-selection, #007aff);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));pointer-events:none}.ds__cell{position:absolute;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;white-space:pre-wrap;word-break:break-word;line-height:1.36}.ds__cell--on{outline:2px solid var(--we-report-selection, #007aff);outline-offset:-2px;z-index:1}.ds__fill{position:absolute;inset:0;width:100%;height:100%;box-sizing:border-box;pointer-events:none}.ds__image{display:block}.ds__placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--we-report-accent, #007aff);font:10px var(--we-report-font-family, system-ui, sans-serif);opacity:.8;overflow:hidden;pointer-events:none}.ds__text{position:absolute;inset:0;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;white-space:pre-wrap;word-break:break-word;line-height:1.36;pointer-events:none}.ds__subpreview{position:absolute;inset:0;overflow:hidden;pointer-events:none;--we-report-page-bg: transparent;--we-report-page-shadow: none}.ds__subname{position:absolute;top:1px;right:2px;padding:0 4px;border-radius:4px;font-size:10px;background:var(--we-report-band-label-bg, rgba(118, 118, 128, .1));color:var(--we-report-band-label-fg, rgba(60, 60, 67, .85))}.ds__text--bound{text-decoration:underline dotted var(--we-report-accent, #007aff);text-underline-offset:2px}.ds__handle{position:absolute;width:9px;height:9px;margin:-4.5px 0 0 -4.5px;box-sizing:border-box;background:var(--we-report-page-bg, #fff);border:1.5px solid var(--we-report-selection, #007aff);border-radius:50%;box-shadow:0 1px 2px #0003;z-index:3}.ds__handle[data-handle=nw]{left:0;top:0;cursor:nwse-resize}.ds__handle[data-handle=n]{left:50%;top:0;cursor:ns-resize}.ds__handle[data-handle=ne]{left:100%;top:0;cursor:nesw-resize}.ds__handle[data-handle=e]{left:100%;top:50%;cursor:ew-resize}.ds__handle[data-handle=se]{left:100%;top:100%;cursor:nwse-resize}.ds__handle[data-handle=s]{left:50%;top:100%;cursor:ns-resize}.ds__handle[data-handle=sw]{left:0;top:100%;cursor:nesw-resize}.ds__handle[data-handle=w]{left:0;top:50%;cursor:ew-resize}.ds__gap{position:absolute;z-index:4;height:0;border-top:1px dashed var(--we-report-guide, #ff375f);pointer-events:none}.ds__gap--v{width:0;border-top:0;border-left:1px dashed var(--we-report-guide, #ff375f)}.ds__gap span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:0 4px;border-radius:4px;background:var(--we-report-guide, #ff375f);color:var(--we-report-accent-fg, #fff);font:600 10px var(--we-report-font-family, system-ui, sans-serif);white-space:nowrap}.ds__guide{position:absolute;left:0;right:0;height:0;border-top:1px solid var(--we-report-guide, #ff375f);pointer-events:none;z-index:4}.ds__guide--v{top:0;bottom:0;right:auto;width:0;height:auto;border-top:0;border-left:1px solid var(--we-report-guide, #ff375f)}@media (prefers-reduced-motion: reduce){.ds__band-label,.ds__control{transition:none}}\n"], dependencies: [{ kind: "pipe", type: WeReportIconPipe, name: "weReportIcon" }, { kind: "component", type: ExpressionEditorComponent, selector: "we-report-expression-editor", inputs: ["expression", "fields", "strings"], outputs: ["applied", "closed"] }, { kind: "component", type: WeReportPageComponent, selector: "we-report-page", inputs: ["page", "zoom", "highlight", "current", "locale"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4795
5883
|
}
|
|
4796
5884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignSurfaceComponent, decorators: [{
|
|
4797
5885
|
type: Component,
|
|
4798
|
-
args: [{ selector: 'we-report-design-surface', standalone: true, imports: [WeReportIconPipe, ExpressionEditorComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { tabindex: '0', '[class.ds--painting]': '!!state.painter()' }, template: `
|
|
5886
|
+
args: [{ selector: 'we-report-design-surface', standalone: true, imports: [WeReportIconPipe, ExpressionEditorComponent, WeReportPageComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { tabindex: '0', '[class.ds--painting]': '!!state.painter()' }, template: `
|
|
4799
5887
|
@let r = ruler();
|
|
4800
5888
|
<svg class="ds__ruler" aria-hidden="true" [attr.width]="r.width" height="20" [attr.viewBox]="'0 0 ' + r.width + ' 20'">
|
|
4801
5889
|
<rect class="ds__ruler-margin" x="0" y="0" [attr.width]="r.left" height="20" />
|
|
@@ -4808,7 +5896,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4808
5896
|
<text [attr.x]="l.x + 2" y="9">{{ l.text }}</text>
|
|
4809
5897
|
}
|
|
4810
5898
|
</svg>
|
|
4811
|
-
<div class="ds__page" (pointermove)="trackPointer($event)" (pointerleave)="state.pointer.set(null)" role="region" [attr.aria-label]="strings().designerLabel" [style.width.mm]="geometry().width * zoom()" [style.min-height.mm]="(geometry().height ?? 0) * zoom()" [style.padding]="padding()" [style.--ds-margin-right.mm]="state.report().page.margins.right * zoom()">
|
|
5899
|
+
<div class="ds__page" (pointermove)="trackPointer($event)" (pointerleave)="state.pointer.set(null)" role="region" [attr.aria-label]="strings().designerLabel" [style.width.mm]="geometry().width * zoom()" [style.min-height.mm]="(geometry().height ?? 0) * zoom()" [style.padding]="padding()" [style.--ds-margin-right.mm]="state.report().page.margins.right * zoom()" [style.background-color]="state.report().page.color || null">
|
|
4812
5900
|
@if (watermarkText(); as wm) {
|
|
4813
5901
|
<div class="ds__watermark" aria-hidden="true" [style.color]="state.report().watermark?.color ?? defaultWatermarkColor" [style.font-size.mm]="geometry().width * zoom() * 0.12" [style.transform]="'translate(-50%, -50%) rotate(' + -(state.report().watermark?.angle ?? 45) + 'deg)'">{{ wm }}</div>
|
|
4814
5902
|
}
|
|
@@ -4863,14 +5951,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4863
5951
|
@if (staticImage(c); as src) {
|
|
4864
5952
|
<img class="ds__fill ds__image" [src]="src" [style.object-fit]="objectFit(c)" alt="" />
|
|
4865
5953
|
} @else {
|
|
4866
|
-
|
|
5954
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5955
|
+
<div class="ds__subpreview"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
5956
|
+
} @else {
|
|
5957
|
+
<div class="ds__placeholder" [innerHTML]="'image' | weReportIcon"></div>
|
|
5958
|
+
}
|
|
4867
5959
|
}
|
|
4868
5960
|
}
|
|
4869
5961
|
@case ('barcode') {
|
|
4870
|
-
|
|
4871
|
-
<
|
|
4872
|
-
|
|
4873
|
-
|
|
5962
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5963
|
+
<div class="ds__subpreview" [title]="barcodeLabel(c)"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
5964
|
+
} @else {
|
|
5965
|
+
<div class="ds__placeholder">
|
|
5966
|
+
<span [innerHTML]="(isQr(c) ? 'qrcode' : 'barcode') | weReportIcon"></span>
|
|
5967
|
+
<small>{{ barcodeLabel(c) }}</small>
|
|
5968
|
+
</div>
|
|
5969
|
+
}
|
|
4874
5970
|
}
|
|
4875
5971
|
@case ('table') {
|
|
4876
5972
|
@for (cell of tableCells(c, band); track $index) {
|
|
@@ -4895,19 +5991,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4895
5991
|
}
|
|
4896
5992
|
}
|
|
4897
5993
|
@case ('chart') {
|
|
4898
|
-
|
|
4899
|
-
<
|
|
4900
|
-
|
|
4901
|
-
|
|
5994
|
+
@if (previewPages().get(c.id); as preview) {
|
|
5995
|
+
<div class="ds__subpreview" [title]="chartLabel(c)"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
5996
|
+
} @else {
|
|
5997
|
+
<div class="ds__placeholder ds__chart">
|
|
5998
|
+
<span [innerHTML]="'chart' | weReportIcon"></span>
|
|
5999
|
+
<small>{{ chartLabel(c) }}</small>
|
|
6000
|
+
</div>
|
|
6001
|
+
}
|
|
4902
6002
|
}
|
|
4903
6003
|
@case ('checkbox') {
|
|
4904
|
-
|
|
6004
|
+
@if (previewPages().get(c.id); as preview) {
|
|
6005
|
+
<div class="ds__subpreview"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
6006
|
+
} @else {
|
|
6007
|
+
<div class="ds__placeholder" [innerHTML]="'checkbox' | weReportIcon"></div>
|
|
6008
|
+
}
|
|
6009
|
+
}
|
|
6010
|
+
@case ('crosstab') {
|
|
6011
|
+
@if (previewPages().get(c.id); as preview) {
|
|
6012
|
+
<div class="ds__subpreview" [title]="crosstabLabel(c)"><we-report-page [page]="preview" [zoom]="zoom()" /></div>
|
|
6013
|
+
} @else {
|
|
6014
|
+
<div class="ds__placeholder ds__chart">
|
|
6015
|
+
<span [innerHTML]="'crosstab' | weReportIcon"></span>
|
|
6016
|
+
<small>{{ crosstabLabel(c) }}</small>
|
|
6017
|
+
</div>
|
|
6018
|
+
}
|
|
6019
|
+
}
|
|
6020
|
+
@case ('subreport') {
|
|
6021
|
+
@if (previewPages().get(c.id); as preview) {
|
|
6022
|
+
<!-- The sub-report laid out with the sample row, as it prints; double-click edits it. -->
|
|
6023
|
+
<div class="ds__subpreview" [title]="strings().subreportEdit">
|
|
6024
|
+
<we-report-page [page]="preview" [zoom]="zoom()" />
|
|
6025
|
+
<small class="ds__subname">{{ c.report.name || strings().controlNames.subreport }}</small>
|
|
6026
|
+
</div>
|
|
6027
|
+
} @else {
|
|
6028
|
+
<div class="ds__placeholder ds__chart" [title]="strings().subreportEdit">
|
|
6029
|
+
<span [innerHTML]="'subreport' | weReportIcon"></span>
|
|
6030
|
+
<small>{{ c.report.name || strings().controlNames.subreport }}</small>
|
|
6031
|
+
</div>
|
|
6032
|
+
}
|
|
4905
6033
|
}
|
|
4906
6034
|
@default {
|
|
4907
6035
|
@if (isEditing(c.id)) {
|
|
4908
6036
|
<textarea class="ds__editor" [value]="editText()" [style]="textStyle(c)" (pointerdown)="$event.stopPropagation()" (keydown)="onEditorKey($event)" (blur)="commitEditing($event)" [attr.aria-label]="strings().content"></textarea>
|
|
4909
6037
|
} @else {
|
|
4910
|
-
|
|
6038
|
+
@if (c.type === 'text' && c.markup) {
|
|
6039
|
+
<div class="ds__text" [class.ds__text--bound]="isBound(c)" [style]="textStyle(c)" [attr.title]="isBound(c) ? boundExpression(c) : null">
|
|
6040
|
+
<!-- One flex item, so the pieces flow as one paragraph. -->
|
|
6041
|
+
<span>
|
|
6042
|
+
@for (r of richRuns(c, band); track $index) {
|
|
6043
|
+
<span [style.font-weight]="r.bold ? 700 : null" [style.font-style]="r.italic ? 'italic' : null" [style.text-decoration]="r.underline ? 'underline' : null">{{ r.text }}</span>
|
|
6044
|
+
}
|
|
6045
|
+
</span>
|
|
6046
|
+
</div>
|
|
6047
|
+
} @else {
|
|
6048
|
+
<div class="ds__text" [class.ds__text--bound]="isBound(c)" [style]="textStyle(c)" [attr.title]="isBound(c) ? boundExpression(c) : null">{{ caption(c, band) }}</div>
|
|
6049
|
+
}
|
|
4911
6050
|
}
|
|
4912
6051
|
}
|
|
4913
6052
|
}
|
|
@@ -4953,7 +6092,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4953
6092
|
@if (formulaEdit(); as f) {
|
|
4954
6093
|
<we-report-expression-editor [expression]="f.expression" [fields]="fields()" [strings]="strings()" (applied)="applyFormula($event)" (closed)="formulaEdit.set(null)" />
|
|
4955
6094
|
}
|
|
4956
|
-
`, styles: [":host{display:block;padding:32px 136px 32px 24px;outline:none}.ds__ruler{position:sticky;top:0;z-index:6;display:block;margin:-28px auto 8px;padding-top:6px;box-sizing:content-box;background:var(--we-report-workspace-bg, #f2f2f7);font:9px var(--we-report-font-family, system-ui, sans-serif);overflow:visible}.ds__ruler text{fill:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
6095
|
+
`, styles: [":host{display:block;padding:32px 136px 32px 24px;outline:none}.ds__ruler{position:sticky;top:0;z-index:6;display:block;margin:-28px auto 8px;padding-top:6px;box-sizing:content-box;background:var(--we-report-workspace-bg, #f2f2f7);font:9px var(--we-report-font-family, system-ui, sans-serif);overflow:visible}.ds__ruler text{fill:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.ds__ruler-ticks{stroke:var(--we-report-muted-fg, rgba(60, 60, 67, .75));stroke-width:1;shape-rendering:crispEdges}.ds__ruler-margin{fill:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.ds__ruler-selection{fill:var(--we-report-selection-fill, rgba(0, 122, 255, .07));stroke:var(--we-report-selection, #007aff);stroke-width:1}.ds__page{box-sizing:border-box;margin:0 auto;background:var(--we-report-page-bg, #fff);box-shadow:var(--we-report-page-shadow, 0 1px 3px rgba(0, 0, 0, .2));border-radius:2px}.ds__page{position:relative}.ds__watermark{position:absolute;top:50%;left:50%;font-weight:700;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none}.ds__band{position:relative}.ds__band+.ds__band{border-top:1px dashed var(--we-report-margin-guide, rgba(0, 122, 255, .18))}.ds__band-label{position:absolute;top:0;left:calc(100% + var(--ds-margin-right, 0mm) + 10px);z-index:5;max-width:116px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:999px;padding:2px 9px;font:500 11px var(--we-report-font-family, system-ui, sans-serif);background:var(--we-report-band-label-bg, rgba(118, 118, 128, .1));color:var(--we-report-band-label-fg, rgba(60, 60, 67, .85));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,color .15s ease}.ds__band:hover .ds__band-label{color:var(--we-report-fg, #1d1d1f)}.ds__band--selected .ds__band-label{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.ds__band--selected .ds__band-body{box-shadow:inset 0 0 0 1.5px var(--we-report-selection, #007aff)}.ds__band-label:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.ds__band--collapsed .ds__band-body{overflow:hidden;background:repeating-linear-gradient(-45deg,var(--we-report-band-label-bg, rgba(118, 118, 128, .1)) 0 4px,transparent 4px 8px)!important}.ds__band--collapsed .ds__band-body>*{display:none}.ds__band-body{position:relative;background-image:radial-gradient(circle,var(--we-report-margin-guide, rgba(0, 122, 255, .18)) .7px,transparent .7px)}.ds__columns{position:absolute;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;border-left:1px dashed var(--we-report-selection, #007aff);background:repeating-linear-gradient(-45deg,var(--we-report-selection-fill, rgba(0, 122, 255, .07)) 0 6px,transparent 6px 12px);color:var(--we-report-accent, #007aff);font:500 11px var(--we-report-font-family, system-ui, sans-serif);pointer-events:none}.ds__band-resize{position:absolute;left:0;right:0;bottom:-3px;height:6px;cursor:ns-resize;z-index:2}.ds__control{position:absolute;box-sizing:border-box;outline:1px dashed var(--we-report-control-outline, rgba(60, 60, 67, .22));outline-offset:-1px;border-radius:2px;cursor:default;touch-action:none;transition:outline-color .12s ease,background-color .12s ease}.ds__control:hover{outline:1px solid var(--we-report-selection, #007aff)}.ds__control--selected{outline:1.5px solid var(--we-report-selection, #007aff);outline-offset:0;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));cursor:move;z-index:1}:host(.ds--painting) .ds__control{cursor:copy}.ds__control--cut{box-shadow:inset 0 -2px 0 var(--we-report-warning-fg, #c93400)}.ds__editor{position:absolute;inset:0;z-index:6;box-sizing:border-box;width:100%;height:100%;margin:0;border:0;outline:2px solid var(--we-report-selection, #007aff);resize:none;overflow:hidden;background:var(--we-report-page-bg, #fff);line-height:1.36}.ds__marquee{position:absolute;z-index:7;border:1px solid var(--we-report-selection, #007aff);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));pointer-events:none}.ds__cell{position:absolute;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;white-space:pre-wrap;word-break:break-word;line-height:1.36}.ds__cell--on{outline:2px solid var(--we-report-selection, #007aff);outline-offset:-2px;z-index:1}.ds__fill{position:absolute;inset:0;width:100%;height:100%;box-sizing:border-box;pointer-events:none}.ds__image{display:block}.ds__placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--we-report-accent, #007aff);font:10px var(--we-report-font-family, system-ui, sans-serif);opacity:.8;overflow:hidden;pointer-events:none}.ds__text{position:absolute;inset:0;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;white-space:pre-wrap;word-break:break-word;line-height:1.36;pointer-events:none}.ds__subpreview{position:absolute;inset:0;overflow:hidden;pointer-events:none;--we-report-page-bg: transparent;--we-report-page-shadow: none}.ds__subname{position:absolute;top:1px;right:2px;padding:0 4px;border-radius:4px;font-size:10px;background:var(--we-report-band-label-bg, rgba(118, 118, 128, .1));color:var(--we-report-band-label-fg, rgba(60, 60, 67, .85))}.ds__text--bound{text-decoration:underline dotted var(--we-report-accent, #007aff);text-underline-offset:2px}.ds__handle{position:absolute;width:9px;height:9px;margin:-4.5px 0 0 -4.5px;box-sizing:border-box;background:var(--we-report-page-bg, #fff);border:1.5px solid var(--we-report-selection, #007aff);border-radius:50%;box-shadow:0 1px 2px #0003;z-index:3}.ds__handle[data-handle=nw]{left:0;top:0;cursor:nwse-resize}.ds__handle[data-handle=n]{left:50%;top:0;cursor:ns-resize}.ds__handle[data-handle=ne]{left:100%;top:0;cursor:nesw-resize}.ds__handle[data-handle=e]{left:100%;top:50%;cursor:ew-resize}.ds__handle[data-handle=se]{left:100%;top:100%;cursor:nwse-resize}.ds__handle[data-handle=s]{left:50%;top:100%;cursor:ns-resize}.ds__handle[data-handle=sw]{left:0;top:100%;cursor:nesw-resize}.ds__handle[data-handle=w]{left:0;top:50%;cursor:ew-resize}.ds__gap{position:absolute;z-index:4;height:0;border-top:1px dashed var(--we-report-guide, #ff375f);pointer-events:none}.ds__gap--v{width:0;border-top:0;border-left:1px dashed var(--we-report-guide, #ff375f)}.ds__gap span{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:0 4px;border-radius:4px;background:var(--we-report-guide, #ff375f);color:var(--we-report-accent-fg, #fff);font:600 10px var(--we-report-font-family, system-ui, sans-serif);white-space:nowrap}.ds__guide{position:absolute;left:0;right:0;height:0;border-top:1px solid var(--we-report-guide, #ff375f);pointer-events:none;z-index:4}.ds__guide--v{top:0;bottom:0;right:auto;width:0;height:auto;border-top:0;border-left:1px solid var(--we-report-guide, #ff375f)}@media (prefers-reduced-motion: reduce){.ds__band-label,.ds__control{transition:none}}\n"] }]
|
|
4957
6096
|
}] });
|
|
4958
6097
|
function round(v) {
|
|
4959
6098
|
return Math.round(v * 100) / 100;
|
|
@@ -4989,7 +6128,9 @@ function listPaths(fields, prefix = '') {
|
|
|
4989
6128
|
* Row fields, fields of the object holding the rows (when the rows are a nested list), the lists
|
|
4990
6129
|
* inside a row (for an inner list) and the fields of the inner list's items.
|
|
4991
6130
|
*/
|
|
4992
|
-
function designerFields(report, data
|
|
6131
|
+
function designerFields(report, data,
|
|
6132
|
+
/** Inside a sub-report: the row around it, whose fields `[^.field]` reads. */
|
|
6133
|
+
outerRow) {
|
|
4993
6134
|
let resolved;
|
|
4994
6135
|
try {
|
|
4995
6136
|
resolved = resolveReportData(report, data);
|
|
@@ -4999,10 +6140,25 @@ function designerFields(report, data) {
|
|
|
4999
6140
|
}
|
|
5000
6141
|
const schema = inferSchema(resolved.rows ?? []);
|
|
5001
6142
|
const rows = flatten(schema, false);
|
|
6143
|
+
// Calculated fields join the row fields, typed by their value in the first row.
|
|
6144
|
+
const calculated = calculatedFieldMap(report);
|
|
6145
|
+
for (const name of Object.keys(calculated ?? {})) {
|
|
6146
|
+
if (rows.some((f) => f.path === name))
|
|
6147
|
+
continue;
|
|
6148
|
+
let value = null;
|
|
6149
|
+
try {
|
|
6150
|
+
value = evaluate(`[${name}]`, { row: resolved.rows?.[0], rows: resolved.rows ?? [], parent: resolved.parent, calculated });
|
|
6151
|
+
}
|
|
6152
|
+
catch {
|
|
6153
|
+
/* typed as text */
|
|
6154
|
+
}
|
|
6155
|
+
const type = typeof value === 'number' ? 'number' : typeof value === 'boolean' ? 'boolean' : value instanceof Date ? 'date' : 'string';
|
|
6156
|
+
rows.push({ path: name, label: name, type, parent: false, expression: fieldExpression(name, false), depth: 0 });
|
|
6157
|
+
}
|
|
5002
6158
|
const lists = listPaths(schema);
|
|
5003
6159
|
const innerPath = report.bands.find((b) => b.kind === 'subDetail')?.rowsPath;
|
|
5004
6160
|
const inner = flatten(lists.find((l) => l.path === innerPath)?.fields ?? [], false);
|
|
5005
|
-
const parentValue = resolved.parent;
|
|
6161
|
+
const parentValue = outerRow ?? resolved.parent;
|
|
5006
6162
|
const listName = report.dataMember?.path?.split('.').pop();
|
|
5007
6163
|
const parent = parentValue && typeof parentValue === 'object' && !Array.isArray(parentValue)
|
|
5008
6164
|
? flatten(inferSchema([parentValue]), true, '', 0, listName)
|
|
@@ -5019,6 +6175,8 @@ class BindableInputComponent {
|
|
|
5019
6175
|
fields = input([]);
|
|
5020
6176
|
strings = input.required();
|
|
5021
6177
|
multiline = input(false);
|
|
6178
|
+
/** What the value is, for screen readers (the visible caption sits outside the component). */
|
|
6179
|
+
label = input(undefined);
|
|
5022
6180
|
valueChange = output();
|
|
5023
6181
|
editorOpen = signal(false);
|
|
5024
6182
|
bound = computed(() => isExpression(this.value()));
|
|
@@ -5050,14 +6208,14 @@ class BindableInputComponent {
|
|
|
5050
6208
|
this.valueChange.emit(text);
|
|
5051
6209
|
}
|
|
5052
6210
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BindableInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5053
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BindableInputComponent, isStandalone: true, selector: "we-report-bindable-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, strings: { classPropertyName: "strings", publicName: "strings", isSignal: true, isRequired: true, transformFunction: null }, multiline: { classPropertyName: "multiline", publicName: "multiline", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
6211
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BindableInputComponent, isStandalone: true, selector: "we-report-bindable-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, strings: { classPropertyName: "strings", publicName: "strings", isSignal: true, isRequired: true, transformFunction: null }, multiline: { classPropertyName: "multiline", publicName: "multiline", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
|
5054
6212
|
<div class="bi__mode" role="radiogroup">
|
|
5055
6213
|
<button type="button" role="radio" [attr.aria-checked]="!bound()" [class.bi__on]="!bound()" (click)="toFixed()">{{ strings().staticText }}</button>
|
|
5056
6214
|
<button type="button" role="radio" [attr.aria-checked]="bound()" [class.bi__on]="bound()" (click)="toBound()">{{ strings().fromData }}</button>
|
|
5057
6215
|
</div>
|
|
5058
6216
|
@if (bound()) {
|
|
5059
6217
|
@if (fields().length) {
|
|
5060
|
-
<select class="bi__input" (change)="pickField($any($event.target).value)">
|
|
6218
|
+
<select class="bi__input" [attr.aria-label]="label()" (change)="pickField($any($event.target).value)">
|
|
5061
6219
|
<option value="" [selected]="!fieldMatch()">—</option>
|
|
5062
6220
|
@for (f of fields(); track f.expression) {
|
|
5063
6221
|
<option [value]="f.expression" [selected]="f.expression === expression()">{{ f.label }}</option>
|
|
@@ -5076,11 +6234,11 @@ class BindableInputComponent {
|
|
|
5076
6234
|
}
|
|
5077
6235
|
<small class="bi__hint">{{ strings().expressionHint }}</small>
|
|
5078
6236
|
} @else if (multiline()) {
|
|
5079
|
-
<textarea class="bi__input" rows="3" [value]="fixedText()" (input)="setFixed($any($event.target).value)"></textarea>
|
|
6237
|
+
<textarea class="bi__input" rows="3" [attr.aria-label]="label()" [value]="fixedText()" (input)="setFixed($any($event.target).value)"></textarea>
|
|
5080
6238
|
} @else {
|
|
5081
|
-
<input class="bi__input" [value]="fixedText()" (input)="setFixed($any($event.target).value)" />
|
|
6239
|
+
<input class="bi__input" [attr.aria-label]="label()" [value]="fixedText()" (input)="setFixed($any($event.target).value)" />
|
|
5082
6240
|
}
|
|
5083
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:6px}.bi__mode{display:flex;padding:2px;gap:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.bi__mode button{flex:1;border:0;border-radius:6px;padding:4px 6px;font:inherit;font-size:12px;background:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.bi__mode button.bi__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.bi__mode button:focus-visible,.bi__input:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.bi__input{width:100%;box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit}@media (prefers-reduced-motion: reduce){.bi__mode button{transition:none}}.bi__row{display:flex;gap:4px}.bi__fx{flex:none;width:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font:italic 600 13px Georgia,Times New Roman,serif;cursor:pointer}.bi__fx:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.bi__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}.bi__formula{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
6241
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:6px}.bi__mode{display:flex;padding:2px;gap:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.bi__mode button{flex:1;border:0;border-radius:6px;padding:4px 6px;font:inherit;font-size:12px;background:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.bi__mode button.bi__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.bi__mode button:focus-visible,.bi__input:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.bi__input{width:100%;box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit}@media (prefers-reduced-motion: reduce){.bi__mode button{transition:none}}.bi__row{display:flex;gap:4px}.bi__fx{flex:none;width:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font:italic 600 13px Georgia,Times New Roman,serif;cursor:pointer}.bi__fx:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.bi__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}.bi__formula{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.bi__hint{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));font-size:11px}\n"], dependencies: [{ kind: "component", type: ExpressionEditorComponent, selector: "we-report-expression-editor", inputs: ["expression", "fields", "strings"], outputs: ["applied", "closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5084
6242
|
}
|
|
5085
6243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BindableInputComponent, decorators: [{
|
|
5086
6244
|
type: Component,
|
|
@@ -5091,7 +6249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5091
6249
|
</div>
|
|
5092
6250
|
@if (bound()) {
|
|
5093
6251
|
@if (fields().length) {
|
|
5094
|
-
<select class="bi__input" (change)="pickField($any($event.target).value)">
|
|
6252
|
+
<select class="bi__input" [attr.aria-label]="label()" (change)="pickField($any($event.target).value)">
|
|
5095
6253
|
<option value="" [selected]="!fieldMatch()">—</option>
|
|
5096
6254
|
@for (f of fields(); track f.expression) {
|
|
5097
6255
|
<option [value]="f.expression" [selected]="f.expression === expression()">{{ f.label }}</option>
|
|
@@ -5110,11 +6268,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5110
6268
|
}
|
|
5111
6269
|
<small class="bi__hint">{{ strings().expressionHint }}</small>
|
|
5112
6270
|
} @else if (multiline()) {
|
|
5113
|
-
<textarea class="bi__input" rows="3" [value]="fixedText()" (input)="setFixed($any($event.target).value)"></textarea>
|
|
6271
|
+
<textarea class="bi__input" rows="3" [attr.aria-label]="label()" [value]="fixedText()" (input)="setFixed($any($event.target).value)"></textarea>
|
|
5114
6272
|
} @else {
|
|
5115
|
-
<input class="bi__input" [value]="fixedText()" (input)="setFixed($any($event.target).value)" />
|
|
6273
|
+
<input class="bi__input" [attr.aria-label]="label()" [value]="fixedText()" (input)="setFixed($any($event.target).value)" />
|
|
5116
6274
|
}
|
|
5117
|
-
`, styles: [":host{display:flex;flex-direction:column;gap:6px}.bi__mode{display:flex;padding:2px;gap:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.bi__mode button{flex:1;border:0;border-radius:6px;padding:4px 6px;font:inherit;font-size:12px;background:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.bi__mode button.bi__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.bi__mode button:focus-visible,.bi__input:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.bi__input{width:100%;box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit}@media (prefers-reduced-motion: reduce){.bi__mode button{transition:none}}.bi__row{display:flex;gap:4px}.bi__fx{flex:none;width:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font:italic 600 13px Georgia,Times New Roman,serif;cursor:pointer}.bi__fx:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.bi__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}.bi__formula{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
6275
|
+
`, styles: [":host{display:flex;flex-direction:column;gap:6px}.bi__mode{display:flex;padding:2px;gap:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.bi__mode button{flex:1;border:0;border-radius:6px;padding:4px 6px;font:inherit;font-size:12px;background:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.bi__mode button.bi__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.bi__mode button:focus-visible,.bi__input:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.bi__input{width:100%;box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit}@media (prefers-reduced-motion: reduce){.bi__mode button{transition:none}}.bi__row{display:flex;gap:4px}.bi__fx{flex:none;width:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font:italic 600 13px Georgia,Times New Roman,serif;cursor:pointer}.bi__fx:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.bi__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}.bi__formula{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.bi__hint{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));font-size:11px}\n"] }]
|
|
5118
6276
|
}] });
|
|
5119
6277
|
|
|
5120
6278
|
const span = (c) => Math.max(1, c.colSpan ?? 1);
|
|
@@ -5244,6 +6402,7 @@ function parseCondition(expression) {
|
|
|
5244
6402
|
return { field: m[1], op, value: unliteral(m[3]) };
|
|
5245
6403
|
}
|
|
5246
6404
|
|
|
6405
|
+
let panelCount = 0;
|
|
5247
6406
|
const FORMATS = [
|
|
5248
6407
|
{ value: '', key: 'formatNone' },
|
|
5249
6408
|
{ value: 'n0', key: 'formatNumber0' },
|
|
@@ -5252,6 +6411,8 @@ const FORMATS = [
|
|
|
5252
6411
|
{ value: 'p0', key: 'formatPercent' },
|
|
5253
6412
|
{ value: 'dd.MM.yyyy', key: 'formatDate' },
|
|
5254
6413
|
{ value: 'dd.MM.yyyy HH:mm', key: 'formatDateTime' },
|
|
6414
|
+
{ value: 'd MMMM yyyy', key: 'formatLongDate' },
|
|
6415
|
+
{ value: 'dddd, d MMMM yyyy', key: 'formatDayDate' },
|
|
5255
6416
|
];
|
|
5256
6417
|
const CHART_TYPES = [
|
|
5257
6418
|
{ type: 'column', label: 'chartColumn' },
|
|
@@ -5259,6 +6420,9 @@ const CHART_TYPES = [
|
|
|
5259
6420
|
{ type: 'line', label: 'chartLine' },
|
|
5260
6421
|
{ type: 'pie', label: 'chartPie' },
|
|
5261
6422
|
{ type: 'doughnut', label: 'chartDoughnut' },
|
|
6423
|
+
{ type: 'sparkline', label: 'chartSparkline' },
|
|
6424
|
+
{ type: 'databar', label: 'chartDataBar' },
|
|
6425
|
+
{ type: 'gauge', label: 'chartGauge' },
|
|
5262
6426
|
];
|
|
5263
6427
|
const AGGREGATES = [
|
|
5264
6428
|
{ value: 'sum', label: 'aggSum' },
|
|
@@ -5299,7 +6463,11 @@ class PropertyPanelComponent {
|
|
|
5299
6463
|
advanced = input(false);
|
|
5300
6464
|
/** Lists inside a row that an inner list can repeat over. */
|
|
5301
6465
|
lists = input([]);
|
|
6466
|
+
/** A sub-report's design: its page comes from the box, so paper and margins are not offered. */
|
|
6467
|
+
embedded = input(false);
|
|
5302
6468
|
state = inject(DesignerState);
|
|
6469
|
+
/** Prefix of this panel's datalist ids: two designers may share a page. */
|
|
6470
|
+
listId = `we-report-pp-${++panelCount}`;
|
|
5303
6471
|
papers = PAPER_SIZES;
|
|
5304
6472
|
symbologies = BARCODE_SYMBOLOGIES;
|
|
5305
6473
|
formats = FORMATS;
|
|
@@ -5370,6 +6538,16 @@ class PropertyPanelComponent {
|
|
|
5370
6538
|
d.page.height = value === '' ? null : positive(value, 10);
|
|
5371
6539
|
}, `page-${key}`);
|
|
5372
6540
|
}
|
|
6541
|
+
setPageOption(key, value) {
|
|
6542
|
+
this.state.update((d) => {
|
|
6543
|
+
if (value === undefined || value === '')
|
|
6544
|
+
delete d.page[key];
|
|
6545
|
+
else if (key === 'color')
|
|
6546
|
+
d.page.color = String(value);
|
|
6547
|
+
else
|
|
6548
|
+
d.page.mirrorMargins = true;
|
|
6549
|
+
}, `page-${key}`);
|
|
6550
|
+
}
|
|
5373
6551
|
setMargin(side, value) {
|
|
5374
6552
|
this.state.update((d) => (d.page.margins[side] = nonNegative(value)), `margin-${side}`);
|
|
5375
6553
|
}
|
|
@@ -5393,15 +6571,46 @@ class PropertyPanelComponent {
|
|
|
5393
6571
|
b.sort = value;
|
|
5394
6572
|
else if (key === 'rowsPath')
|
|
5395
6573
|
b.rowsPath = value || undefined;
|
|
6574
|
+
else if (key === 'alternateBackgroundColor')
|
|
6575
|
+
b.alternateBackgroundColor = value || undefined;
|
|
6576
|
+
else if (key === 'visible')
|
|
6577
|
+
b.visible = value.trim() ? { expression: value } : undefined;
|
|
5396
6578
|
else
|
|
5397
6579
|
b.backgroundColor = value || undefined;
|
|
5398
6580
|
}, `band-${key}`);
|
|
5399
6581
|
}
|
|
6582
|
+
/** Groups in the order of a formula over their rows; an empty formula goes back to the key order. */
|
|
6583
|
+
setGroupOrder(expression, descending) {
|
|
6584
|
+
const band = this.band();
|
|
6585
|
+
if (band)
|
|
6586
|
+
this.state.updateBand(band.id, (b) => (b.orderBy = expression.trim() ? { expression, ...(descending ? { descending: true } : {}) } : undefined), 'band-order');
|
|
6587
|
+
}
|
|
6588
|
+
setGroupTop(value) {
|
|
6589
|
+
const band = this.band();
|
|
6590
|
+
const n = Math.floor(Number(value));
|
|
6591
|
+
if (band)
|
|
6592
|
+
this.state.updateBand(band.id, (b) => (b.top = value !== '' && n > 0 ? n : undefined), 'band-top');
|
|
6593
|
+
}
|
|
6594
|
+
bookmarkValue(b) {
|
|
6595
|
+
return b.bookmark ?? '';
|
|
6596
|
+
}
|
|
6597
|
+
setBookmark(value) {
|
|
6598
|
+
const band = this.band();
|
|
6599
|
+
const empty = isExpression(value) ? !value.expression.trim() : !value;
|
|
6600
|
+
if (band)
|
|
6601
|
+
this.state.updateBand(band.id, (b) => (b.bookmark = empty ? undefined : value), 'band-bookmark');
|
|
6602
|
+
}
|
|
5400
6603
|
toggleBand(key, value) {
|
|
5401
6604
|
const band = this.band();
|
|
5402
6605
|
if (band)
|
|
5403
6606
|
this.state.updateBand(band.id, (b) => (b[key] = value || undefined));
|
|
5404
6607
|
}
|
|
6608
|
+
/** Printed is the default, so only `false` is stored. */
|
|
6609
|
+
setPrintOn(key, value) {
|
|
6610
|
+
const band = this.band();
|
|
6611
|
+
if (band)
|
|
6612
|
+
this.state.updateBand(band.id, (b) => (b[key] = value ? undefined : false));
|
|
6613
|
+
}
|
|
5405
6614
|
labelSheetName(l) {
|
|
5406
6615
|
const count = this.strings().labelsCount.replace('{0}', String(l.columns * l.rows));
|
|
5407
6616
|
return `${l.paper} · ${count} · ${l.labelWidth} × ${l.labelHeight} mm (${l.id})`;
|
|
@@ -5470,9 +6679,68 @@ class PropertyPanelComponent {
|
|
|
5470
6679
|
c.visible = isExpression(value) && value.expression.trim() ? value : undefined;
|
|
5471
6680
|
}, 'bind-visible');
|
|
5472
6681
|
}
|
|
6682
|
+
/** A sparkline is a line-height chart: a full-size chart box shrinks to fit a row. */
|
|
6683
|
+
setChartType(type) {
|
|
6684
|
+
this.state.updateControls(this.ids(), (c) => {
|
|
6685
|
+
if (c.type !== 'chart')
|
|
6686
|
+
return;
|
|
6687
|
+
c.chartType = type;
|
|
6688
|
+
if ((type === 'sparkline' || type === 'databar') && c.height > 12) {
|
|
6689
|
+
c.height = 8;
|
|
6690
|
+
c.width = Math.min(c.width, 40);
|
|
6691
|
+
}
|
|
6692
|
+
});
|
|
6693
|
+
}
|
|
6694
|
+
setOptionalChartRows(expression) {
|
|
6695
|
+
this.set('rows', expression.trim() ? { expression } : undefined, 'chart-rows');
|
|
6696
|
+
}
|
|
5473
6697
|
setExpression(key, expression) {
|
|
5474
6698
|
this.set(key, { expression }, `chart-${key}`);
|
|
5475
6699
|
}
|
|
6700
|
+
crosstabKeys = [
|
|
6701
|
+
{ key: 'rows', label: 'crosstabRows' },
|
|
6702
|
+
{ key: 'columns', label: 'crosstabColumns' },
|
|
6703
|
+
{ key: 'value', label: 'crosstabValue' },
|
|
6704
|
+
];
|
|
6705
|
+
setCrosstab(key, expression) {
|
|
6706
|
+
this.set(key, { expression }, `crosstab-${key}`);
|
|
6707
|
+
}
|
|
6708
|
+
// ── Sub-report ─────────────────────────────────────────────────────────────
|
|
6709
|
+
/** A file chosen for "Use a saved report" could not be read. */
|
|
6710
|
+
subreportError = signal(false);
|
|
6711
|
+
/** A formula that may be left empty (then the property goes away). */
|
|
6712
|
+
setOptionalExpression(key, expression) {
|
|
6713
|
+
this.set(key, expression.trim() ? { expression } : undefined, `sub-${key}`);
|
|
6714
|
+
}
|
|
6715
|
+
/** Puts a saved report (or an RDLC / REPX one, converted) into the selected sub-report. */
|
|
6716
|
+
async chooseSubreport(event) {
|
|
6717
|
+
const input = event.target;
|
|
6718
|
+
const file = input.files?.[0];
|
|
6719
|
+
input.value = '';
|
|
6720
|
+
if (!file)
|
|
6721
|
+
return;
|
|
6722
|
+
try {
|
|
6723
|
+
const { report } = importReport(await file.text(), file.name);
|
|
6724
|
+
this.subreportError.set(false);
|
|
6725
|
+
this.set('report', report, 'sub-file');
|
|
6726
|
+
}
|
|
6727
|
+
catch {
|
|
6728
|
+
this.subreportError.set(true);
|
|
6729
|
+
}
|
|
6730
|
+
}
|
|
6731
|
+
subreportParamValue(c, name) {
|
|
6732
|
+
const value = c.type === 'subreport' ? c.parameters?.find((p) => p.name === name)?.value : undefined;
|
|
6733
|
+
return isExpression(value) ? value : value === undefined || value === null ? '' : String(value);
|
|
6734
|
+
}
|
|
6735
|
+
setSubreportParam(name, value) {
|
|
6736
|
+
this.state.updateControls(this.ids(), (c) => {
|
|
6737
|
+
if (c.type !== 'subreport')
|
|
6738
|
+
return;
|
|
6739
|
+
const rest = (c.parameters ?? []).filter((p) => p.name !== name);
|
|
6740
|
+
const empty = isExpression(value) ? !value.expression.trim() : value === '';
|
|
6741
|
+
c.parameters = empty ? (rest.length ? rest : undefined) : [...rest, { name, value }];
|
|
6742
|
+
}, `sub-param-${name}`);
|
|
6743
|
+
}
|
|
5476
6744
|
// ── Table ──────────────────────────────────────────────────────────────────
|
|
5477
6745
|
/** Row/column commands act on the clicked cell, or on the last row/column. */
|
|
5478
6746
|
tableOp(op) {
|
|
@@ -5649,11 +6917,11 @@ class PropertyPanelComponent {
|
|
|
5649
6917
|
return positive(value, fallback);
|
|
5650
6918
|
}
|
|
5651
6919
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PropertyPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5652
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PropertyPanelComponent, isStandalone: true, selector: "we-report-property-panel", inputs: { strings: { classPropertyName: "strings", publicName: "strings", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, fontFamilies: { classPropertyName: "fontFamilies", publicName: "fontFamilies", isSignal: true, isRequired: false, transformFunction: null }, advanced: { classPropertyName: "advanced", publicName: "advanced", isSignal: true, isRequired: false, transformFunction: null }, lists: { classPropertyName: "lists", publicName: "lists", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let s = strings();\n<h2 class=\"pp__title\">{{ s.properties }}</h2>\n\n@let selectedControl = control();\n@let selectedBand = band();\n@if (selectedControl) {\n <div class=\"pp__subtitle\">{{ s.controlNames[selectedControl.type] }} \u00B7 <code>{{ selectedControl.id }}</code></div>\n} @else if (controls().length > 1) {\n <div class=\"pp__subtitle\">{{ s.itemsSelected.replace('{0}', '' + controls().length) }}</div>\n} @else if (selectedBand) {\n <div class=\"pp__subtitle\">{{ s.bandNames[selectedBand.kind] }}</div>\n}\n\n<!-- \u2500\u2500 Report (nothing selected) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!controls().length && !band()) {\n <section class=\"pp__section\">\n <h3>{{ s.groupPage }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.reportName }}</span>\n <input [value]=\"report().name\" (input)=\"setReport('name', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.paper }}</span>\n <select (change)=\"setPaper($any($event.target).value)\">\n @for (p of papers; track p.id) {\n <option [value]=\"p.id\" [selected]=\"p.id === report().page.paper\">{{ p.id }} ({{ p.width }} \u00D7 {{ p.height ?? '\u221E' }} mm)</option>\n }\n <option value=\"custom\" [selected]=\"report().page.paper === 'custom'\">{{ s.customSize }}</option>\n </select>\n </label>\n @if (report().page.paper === 'custom') {\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.width }} (mm)</span>\n <input type=\"number\" min=\"10\" step=\"1\" [value]=\"num(report().page.width)\" (input)=\"setPage('width', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.height }} (mm)</span>\n <input type=\"number\" min=\"10\" step=\"1\" [value]=\"num(report().page.height)\" (input)=\"setPage('height', $any($event.target).value)\" />\n </label>\n </div>\n }\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.orientation }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"report().page.orientation === 'portrait'\" (click)=\"setPage('orientation', 'portrait')\">{{ s.portrait }}</button>\n <button type=\"button\" [class.pp__on]=\"report().page.orientation === 'landscape'\" (click)=\"setPage('orientation', 'landscape')\">{{ s.landscape }}</button>\n </div>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.margins }} (mm)</span>\n <div class=\"pp__grid pp__grid--4\">\n <label><small>{{ s.marginTop }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.top)\" (input)=\"setMargin('top', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginRight }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.right)\" (input)=\"setMargin('right', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginBottom }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.bottom)\" (input)=\"setMargin('bottom', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginLeft }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.left)\" (input)=\"setMargin('left', $any($event.target).value)\" /></label>\n </div>\n </div>\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.reportLocale }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.reportLocaleRegion }}</span>\n <select (change)=\"setCulture('locale', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!report().locale\">{{ s.reportLocaleDefault }}</option>\n @for (l of cultures; track l.id) {\n <option [value]=\"l.id\" [selected]=\"report().locale === l.id\">{{ l.name }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.reportCurrency }}</span>\n <select (change)=\"setCulture('currency', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!report().currency\">{{ s.reportLocaleDefault }}</option>\n @for (c of currencies; track c) {\n <option [value]=\"c\" [selected]=\"report().currency === c\">{{ c }}</option>\n }\n </select>\n </label>\n <small class=\"pp__hint\">{{ s.reportLocaleHint }}</small>\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.watermark }}</h3>\n @let wm = report().watermark;\n <we-report-bindable-input [value]=\"wm?.text ?? ''\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setWatermark({ text: $event })\" />\n <small class=\"pp__hint\">{{ s.watermarkHint }}</small>\n @if (wm) {\n <div class=\"pp__row\">\n <span>{{ s.color }}</span>\n <input type=\"color\" [value]=\"wm.color ?? '#e3e6ea'\" (input)=\"setWatermark({ color: $any($event.target).value })\" [attr.aria-label]=\"s.color\" />\n </div>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.watermarkAngle\">\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"(wm.angle ?? 45) === 45\" [class.pp__on]=\"(wm.angle ?? 45) === 45\" (click)=\"setWatermark({ angle: undefined })\">\u2197 45\u00B0</button>\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"wm.angle === 0\" [class.pp__on]=\"wm.angle === 0\" (click)=\"setWatermark({ angle: 0 })\">\u2192 0\u00B0</button>\n </div>\n }\n </section>\n @if (advanced() && report().dataMember) {\n <section class=\"pp__section\">\n <h3>{{ s.groupData }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.dataRows }}</span>\n <input [value]=\"report().dataMember?.path ?? ''\" (input)=\"setRowsPath($any($event.target).value)\" spellcheck=\"false\" />\n <small class=\"pp__hint\">{{ s.dataRowsHint }}</small>\n </label>\n </section>\n }\n}\n\n<!-- \u2500\u2500 Band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (band(); as b) {\n <section class=\"pp__section\">\n <h3>{{ s.groupLayout }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.bandHeight }} (mm)</span>\n <input type=\"number\" min=\"2\" step=\"1\" [value]=\"num(b.height)\" (input)=\"setBand('height', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row\">\n <span>{{ s.backgroundColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"b.backgroundColor ?? '#ffffff'\" (input)=\"setBand('backgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setBand('backgroundColor', '')\">{{ s.noColor }}</button>\n </span>\n </label>\n </section>\n @if (b.kind === 'subDetail') {\n <section class=\"pp__section\">\n <h3>{{ s.innerList }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.innerListOf }}</span>\n <select (change)=\"setBand('rowsPath', $any($event.target).value)\">\n @for (l of lists(); track l) {\n <option [value]=\"l\" [selected]=\"b.rowsPath === l\">{{ l }}</option>\n }\n @if (b.rowsPath && !lists().includes(b.rowsPath)) {\n <option [value]=\"b.rowsPath\" selected>{{ b.rowsPath }}</option>\n }\n </select>\n </label>\n <small class=\"pp__hint\">{{ s.innerListHint }}</small>\n </section>\n }\n @if (b.kind === 'detail') {\n <section class=\"pp__section\">\n <h3>{{ s.sortRows }}</h3>\n @let key = b.sortBy?.[0];\n <div class=\"pp__grid\">\n <select (change)=\"setSort($any($event.target).value, !!key?.descending)\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"\" [selected]=\"!key\">{{ s.dataOrder }}</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === key?.expression\">{{ f.label }}</option>\n }\n @if (key && !fieldExpressions().has(key.expression)) {\n <option [value]=\"key.expression\" selected>{{ key.expression }}</option>\n }\n </select>\n <select [disabled]=\"!key\" (change)=\"setSort(key?.expression ?? '', $any($event.target).value === 'desc')\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"asc\" [selected]=\"!key?.descending\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"!!key?.descending\">{{ s.sortDesc }}</option>\n </select>\n </div>\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.labelSheet }}</h3>\n <select (change)=\"applyLabelSheet($any($event.target).value); $any($event.target).value = ''\" [attr.aria-label]=\"s.labelSheet\">\n <option value=\"\" selected>{{ s.labelSheetChoose }}</option>\n @for (l of labelSheets; track l.id) {\n <option [value]=\"l.id\">{{ labelSheetName(l) }}</option>\n }\n </select>\n <small class=\"pp__hint\">{{ s.labelSheetHint }}</small>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnsCount }}</span>\n <input type=\"number\" min=\"1\" max=\"12\" step=\"1\" [value]=\"b.columns?.count ?? 1\" (input)=\"setColumns('count', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnGap }}</span>\n <input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(b.columns?.gap ?? 0)\" (input)=\"setColumns('gap', $any($event.target).value)\" />\n </label>\n </div>\n <small class=\"pp__hint\">{{ s.columnsHint }}</small>\n </section>\n }\n @if (b.kind === 'groupHeader') {\n <section class=\"pp__section\">\n <h3>{{ s.groupBy }}</h3>\n @if (fields().length) {\n <select (change)=\"setBand('groupBy', $any($event.target).value)\">\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === b.groupBy?.expression\">{{ f.label }}</option>\n }\n </select>\n }\n <input class=\"pp__mono\" [value]=\"b.groupBy?.expression ?? ''\" (input)=\"setBand('groupBy', $any($event.target).value)\" spellcheck=\"false\" />\n <label class=\"pp__row\">\n <span>{{ s.sortGroups }}</span>\n <select (change)=\"setBand('sort', $any($event.target).value)\">\n <option value=\"asc\" [selected]=\"!b.sort || b.sort === 'asc'\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"b.sort === 'desc'\">{{ s.sortDesc }}</option>\n <option value=\"none\" [selected]=\"b.sort === 'none'\">{{ s.sortNone }}</option>\n </select>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.keepTogether\" (change)=\"toggleBand('keepTogether', $any($event.target).checked)\" />\n <span>{{ s.keepTogether }}<small class=\"pp__hint\">{{ s.keepTogetherHint }}</small></span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.repeatOnEveryPage\" (change)=\"toggleBand('repeatOnEveryPage', $any($event.target).checked)\" />\n <span>{{ s.repeatOnEveryPage }}</span>\n </label>\n </section>\n }\n @if (advanced() && b.kind !== 'pageHeader' && b.kind !== 'pageFooter') {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.pageBreakBefore\" (change)=\"toggleBand('pageBreakBefore', $any($event.target).checked)\" />\n <span>{{ s.pageBreakBefore }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.pageBreakAfter\" (change)=\"toggleBand('pageBreakAfter', $any($event.target).checked)\" />\n <span>{{ s.pageBreakAfter }}</span>\n </label>\n </section>\n }\n @if (b.kind !== 'detail') {\n <button type=\"button\" class=\"pp__danger\" (click)=\"removeBand()\">{{ s.removeBand }}</button>\n }\n}\n\n<!-- \u2500\u2500 Control(s) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (controls().length) {\n @let n = controls().length;\n <section class=\"pp__section\">\n <h3>{{ s.arrange }}</h3>\n <div class=\"pp__tools\" role=\"toolbar\" [attr.aria-label]=\"s.arrange\">\n @for (a of alignActions; track a.edge) {\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.align(a.edge)\" [title]=\"s[a.label]\" [attr.aria-label]=\"s[a.label]\" [innerHTML]=\"a.icon | weReportIcon\"></button>\n }\n </div>\n <div class=\"pp__tools\" role=\"toolbar\" [attr.aria-label]=\"s.arrange\">\n <button type=\"button\" [disabled]=\"n < 3\" (click)=\"state.distribute('h')\" [title]=\"s.distributeH\" [attr.aria-label]=\"s.distributeH\" [innerHTML]=\"'distributeH' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 3\" (click)=\"state.distribute('v')\" [title]=\"s.distributeV\" [attr.aria-label]=\"s.distributeV\" [innerHTML]=\"'distributeV' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.sameSize('width')\" [title]=\"s.sameWidth\" [attr.aria-label]=\"s.sameWidth\" [innerHTML]=\"'sameWidth' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.sameSize('height')\" [title]=\"s.sameHeight\" [attr.aria-label]=\"s.sameHeight\" [innerHTML]=\"'sameHeight' | weReportIcon\"></button>\n <button type=\"button\" (click)=\"state.arrange('front')\" [title]=\"s.bringToFront\" [attr.aria-label]=\"s.bringToFront\" [innerHTML]=\"'bringToFront' | weReportIcon\"></button>\n <button type=\"button\" (click)=\"state.arrange('back')\" [title]=\"s.sendToBack\" [attr.aria-label]=\"s.sendToBack\" [innerHTML]=\"'sendToBack' | weReportIcon\"></button>\n </div>\n @if (n < 2) {\n <small class=\"pp__hint\">{{ s.arrangeHint }}</small>\n }\n </section>\n @if (control(); as c) {\n <!-- Content first: it is what people change most. -->\n @switch (c.type) {\n @case ('text') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [multiline]=\"true\" (valueChange)=\"setBindable('text', $event)\" />\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ $any(s)[f.key] }}</option>\n }\n @if (formatIsCustom()) {\n <option [value]=\"c.format\" selected>{{ c.format }}</option>\n }\n </select>\n </label>\n @if (advanced()) {\n <input class=\"pp__mono\" [value]=\"c.format ?? ''\" (input)=\"set('format', $any($event.target).value)\" spellcheck=\"false\" placeholder=\"n2 \u00B7 c2 \u00B7 dd.MM.yyyy\" />\n }\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.canGrow\" (change)=\"set('canGrow', $any($event.target).checked || undefined)\" />\n <span>{{ s.canGrow }}<small class=\"pp__hint\">{{ s.canGrowHint }}</small></span>\n </label>\n </section>\n }\n @case ('barcode') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.symbology }}</span>\n <select (change)=\"set('symbology', $any($event.target).value)\">\n @for (sym of symbologies; track sym) {\n <option [value]=\"sym\" [selected]=\"sym === c.symbology\">{{ sym }}</option>\n }\n @if (!symbologies.includes(c.symbology)) {\n <option [value]=\"c.symbology\" selected>{{ c.symbology }}</option>\n }\n </select>\n </label>\n <span class=\"pp__label\">{{ s.barcodeValue }}</span>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setBindable('value', $event)\" />\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.showText\" (change)=\"set('showText', $any($event.target).checked)\" />\n <span>{{ s.showText }}</span>\n </label>\n </section>\n }\n @case ('image') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__file\">\n <input type=\"file\" accept=\"image/png,image/jpeg\" (change)=\"chooseImage($event)\" />\n <span>{{ s.chooseImage }}</span>\n </label>\n <span class=\"pp__label\">{{ s.fromData }}</span>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setBindable('source', $event)\" />\n <label class=\"pp__row\">\n <span>{{ s.fit }}</span>\n <select (change)=\"set('fit', $any($event.target).value)\">\n <option value=\"contain\" [selected]=\"c.fit === 'contain'\">{{ s.fitContain }}</option>\n <option value=\"cover\" [selected]=\"c.fit === 'cover'\">{{ s.fitCover }}</option>\n <option value=\"stretch\" [selected]=\"c.fit === 'stretch'\">{{ s.fitStretch }}</option>\n <option value=\"none\" [selected]=\"c.fit === 'none'\">{{ s.fitNone }}</option>\n </select>\n </label>\n </section>\n }\n @case ('line') {\n <section class=\"pp__section\">\n <h3>{{ s.groupAppearance }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.lineDirection }}</span>\n <select (change)=\"set('direction', $any($event.target).value)\">\n <option value=\"horizontal\" [selected]=\"c.direction === 'horizontal'\">{{ s.horizontal }}</option>\n <option value=\"vertical\" [selected]=\"c.direction === 'vertical'\">{{ s.vertical }}</option>\n <option value=\"diagonalDown\" [selected]=\"c.direction === 'diagonalDown'\">{{ s.diagonalDown }}</option>\n <option value=\"diagonalUp\" [selected]=\"c.direction === 'diagonalUp'\">{{ s.diagonalUp }}</option>\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.lineWidth }} (mm)</span>\n <input type=\"number\" min=\"0.05\" step=\"0.05\" [value]=\"num(c.lineWidth)\" (input)=\"set('lineWidth', asNumber($any($event.target).value, 0.05))\" />\n </label>\n <label class=\"pp__row\">\n <span>{{ s.color }}</span>\n <input type=\"color\" [value]=\"c.color ?? style()?.color ?? '#000000'\" (input)=\"set('color', $any($event.target).value)\" />\n </label>\n </section>\n }\n @case ('shape') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.shape }}</span>\n <select (change)=\"set('shape', $any($event.target).value)\">\n <option value=\"rectangle\" [selected]=\"c.shape === 'rectangle'\">{{ s.rectangle }}</option>\n <option value=\"roundedRectangle\" [selected]=\"c.shape === 'roundedRectangle'\">{{ s.roundedRectangle }}</option>\n <option value=\"ellipse\" [selected]=\"c.shape === 'ellipse'\">{{ s.ellipse }}</option>\n </select>\n </label>\n @if (c.shape === 'roundedRectangle') {\n <label class=\"pp__row\">\n <span>{{ s.cornerRadius }} (mm)</span>\n <input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.cornerRadius ?? 2)\" (input)=\"set('cornerRadius', asNumber($any($event.target).value, 0))\" />\n </label>\n }\n </section>\n }\n @case ('pageInfo') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.pageInfo }}</span>\n <select (change)=\"set('info', $any($event.target).value)\">\n <option value=\"pageNumber\" [selected]=\"c.info === 'pageNumber'\">{{ s.pageNumber }}</option>\n <option value=\"pageCount\" [selected]=\"c.info === 'pageCount'\">{{ s.pageTotal }}</option>\n <option value=\"pageNofM\" [selected]=\"c.info === 'pageNofM'\">{{ s.pageNofM }}</option>\n <option value=\"printDate\" [selected]=\"c.info === 'printDate'\">{{ s.printDate }}</option>\n </select>\n </label>\n @if (c.info === 'pageNofM' || c.info === 'printDate') {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.format }}</span>\n <input class=\"pp__mono\" [value]=\"c.format ?? ''\" (input)=\"set('format', $any($event.target).value)\" [placeholder]=\"c.info === 'pageNofM' ? '{0} / {1}' : 'dd.MM.yyyy'\" spellcheck=\"false\" />\n </label>\n }\n </section>\n }\n @case ('table') {\n @let cellInfo = selectedCell();\n <section class=\"pp__section\">\n <h3>{{ s.tableSection }}</h3>\n <small class=\"pp__hint\">{{ s.tableHint }}</small>\n <div class=\"pp__buttons\">\n <button type=\"button\" (click)=\"tableOp('insertRow')\">+ {{ s.addRow }}</button>\n <button type=\"button\" (click)=\"tableOp('insertColumn')\">+ {{ s.addColumn }}</button>\n <button type=\"button\" [disabled]=\"c.rows.length < 2\" (click)=\"tableOp('deleteRow')\">\u2212 {{ s.deleteRow }}</button>\n <button type=\"button\" [disabled]=\"c.columns.length < 2\" (click)=\"tableOp('deleteColumn')\">\u2212 {{ s.deleteColumn }}</button>\n <button type=\"button\" [disabled]=\"!cellInfo || cellInfo.index >= c.rows[cellInfo.row].cells.length - 1\" (click)=\"tableOp('mergeRight')\">{{ s.mergeCells }}</button>\n <button type=\"button\" [disabled]=\"!cellInfo || (cellInfo.cell.colSpan ?? 1) < 2\" (click)=\"tableOp('splitCell')\">{{ s.splitCell }}</button>\n </div>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.canGrow\" (change)=\"set('canGrow', $any($event.target).checked || undefined)\" />\n <span>{{ s.canGrow }}<small class=\"pp__hint\">{{ s.canGrowHint }}</small></span>\n </label>\n </section>\n @if (cellInfo) {\n <section class=\"pp__section\">\n <h3>{{ s.selectedCell }}</h3>\n <we-report-bindable-input [value]=\"cellInfo.cell.text\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setCell({ text: $event })\" />\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"setCell({ format: $any($event.target).value || undefined })\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(cellInfo.cell.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.alignment\">\n @for (a of ['left', 'center', 'right']; track a) {\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"cellAlign(cellInfo.cell) === a\" [class.pp__on]=\"cellAlign(cellInfo.cell) === a\" (click)=\"setCellStyle('textAlign', $any(a))\">\n {{ a === 'left' ? s.alignLeft : a === 'center' ? s.alignCenter : s.alignRight }}\n </button>\n }\n </div>\n <div class=\"pp__rule-then\">\n <button type=\"button\" class=\"pp__chip\" [class.pp__on]=\"cellInfo.cell.styleOverrides?.bold\" (click)=\"setCellStyle('bold', cellInfo.cell.styleOverrides?.bold ? undefined : true)\">{{ s.bold }}</button>\n <span>{{ s.backgroundColor }}</span>\n <input type=\"color\" [value]=\"cellInfo.cell.styleOverrides?.backgroundColor ?? '#ffffff'\" (input)=\"setCellStyle('backgroundColor', $any($event.target).value)\" [attr.aria-label]=\"s.backgroundColor\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setCellStyle('backgroundColor', undefined)\">{{ s.noColor }}</button>\n </div>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnWidth }}</span>\n <input type=\"number\" min=\"2\" step=\"1\" [value]=\"num(c.columns[cellInfo.column])\" (input)=\"setColumnWidth(cellInfo.column, $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.rowHeight }}</span>\n <input type=\"number\" min=\"2\" step=\"0.5\" [value]=\"num(c.rows[cellInfo.row].height)\" (input)=\"setRowHeight(cellInfo.row, $any($event.target).value)\" />\n </label>\n </div>\n </section>\n }\n }\n @case ('chart') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <small class=\"pp__hint\">{{ s.chartHint }}</small>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.chartType\">\n @for (t of chartTypes; track t.type) {\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"c.chartType === t.type\" [class.pp__on]=\"c.chartType === t.type\" (click)=\"set('chartType', t.type)\">{{ s[t.label] }}</button>\n }\n </div>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartCategory }}</span>\n <select (change)=\"setExpression('category', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c.category.expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c.category.expression\">{{ f.label }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartValue }}</span>\n <select (change)=\"setExpression('value', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c.value.expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c.value.expression\">{{ f.label }}</option>\n }\n </select>\n </label>\n @if (advanced()) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.expression }}</span>\n <input class=\"pp__mono\" [value]=\"c.category.expression\" (input)=\"setExpression('category', $any($event.target).value)\" spellcheck=\"false\" />\n <input class=\"pp__mono\" [value]=\"c.value.expression\" (input)=\"setExpression('value', $any($event.target).value)\" spellcheck=\"false\" />\n </label>\n }\n <label class=\"pp__row\">\n <span>{{ s.chartAggregate }}</span>\n <select (change)=\"set('aggregate', $any($event.target).value)\">\n @for (a of aggregates; track a.value) {\n <option [value]=\"a.value\" [selected]=\"(c.aggregate ?? 'sum') === a.value\">{{ s[a.label] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartTitle }}</span>\n <input [value]=\"c.title ?? ''\" (input)=\"set('title', $any($event.target).value)\" />\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.showValues\" (change)=\"set('showValues', $any($event.target).checked || undefined)\" />\n <span>{{ s.showValues }}</span>\n </label>\n @if (c.chartType === 'pie' || c.chartType === 'doughnut') {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.showLegend !== false\" (change)=\"set('showLegend', $any($event.target).checked ? undefined : false)\" />\n <span>{{ s.showLegend }}</span>\n </label>\n }\n </section>\n }\n @case ('checkbox') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <span class=\"pp__label\">{{ s.checked }}</span>\n <we-report-bindable-input [value]=\"checkedValue(c)\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setBindable('checked', $event)\" />\n </section>\n }\n }\n\n <section class=\"pp__section\">\n <h3>{{ s.conditionalFormatting }}</h3>\n @for (rule of c.formatting ?? []; track $index; let i = $index) {\n @let cond = condition(rule.when);\n <div class=\"pp__rule\">\n <div class=\"pp__rule-head\">\n <span>{{ s.ruleWhen }}</span>\n <button type=\"button\" class=\"pp__link\" (click)=\"removeRule(i)\" [title]=\"s.removeRule\" [attr.aria-label]=\"s.removeRule\">\u2715</button>\n </div>\n @if (cond) {\n <div class=\"pp__rule-when\">\n <select (change)=\"setCondition(i, cond, 'field', $any($event.target).value)\" [attr.aria-label]=\"s.ruleWhen\">\n <option value=\"\" [selected]=\"!cond.field\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === cond.field\">{{ f.label }}</option>\n }\n </select>\n <select (change)=\"setCondition(i, cond, 'op', $any($event.target).value)\">\n @for (o of conditionOps; track o.op) {\n <option [value]=\"o.op\" [selected]=\"o.op === cond.op\">{{ o.op === 'contains' ? s.opContains : o.label }}</option>\n }\n </select>\n <input [value]=\"cond.value\" (input)=\"setCondition(i, cond, 'value', $any($event.target).value)\" [placeholder]=\"s.ruleValue\" [attr.aria-label]=\"s.ruleValue\" />\n </div>\n }\n @if (advanced() || !cond) {\n <input class=\"pp__mono\" [value]=\"rule.when\" (input)=\"setRule(i, { when: $any($event.target).value })\" spellcheck=\"false\" />\n }\n <div class=\"pp__rule-then\">\n <span>{{ s.ruleThen }}</span>\n <input type=\"color\" [value]=\"rule.style.color ?? '#000000'\" (input)=\"setRuleStyle(i, 'color', $any($event.target).value)\" [title]=\"s.textColor\" [attr.aria-label]=\"s.textColor\" />\n <input type=\"color\" [value]=\"rule.style.backgroundColor ?? '#ffffff'\" (input)=\"setRuleStyle(i, 'backgroundColor', $any($event.target).value)\" [title]=\"s.backgroundColor\" [attr.aria-label]=\"s.backgroundColor\" />\n <button type=\"button\" class=\"pp__chip\" [class.pp__on]=\"rule.style.bold\" (click)=\"setRuleStyle(i, 'bold', rule.style.bold ? undefined : true)\">{{ s.bold }}</button>\n </div>\n </div>\n } @empty {\n <small class=\"pp__hint\">{{ s.conditionalHint }}</small>\n }\n <button type=\"button\" class=\"pp__link\" (click)=\"addRule()\">+ {{ s.addRule }}</button>\n </section>\n\n <section class=\"pp__section\">\n <h3>{{ s.groupLayout }}</h3>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\"><span>{{ s.left }}</span><input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.x)\" (input)=\"setGeometry('x', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.top }}</span><input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.y)\" (input)=\"setGeometry('y', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.width }}</span><input type=\"number\" min=\"0.5\" step=\"0.5\" [value]=\"num(c.width)\" (input)=\"setGeometry('width', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.height }}</span><input type=\"number\" min=\"0.5\" step=\"0.5\" [value]=\"num(c.height)\" (input)=\"setGeometry('height', $any($event.target).value)\" /></label>\n </div>\n </section>\n }\n\n <!-- Appearance applies to every selected control at once. -->\n @if (style(); as st) {\n @if (hasText()) {\n <section class=\"pp__section\">\n <h3>{{ s.groupAppearance }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.font }}</span>\n <select (change)=\"setStyle('fontFamily', $any($event.target).value)\">\n @for (f of fontFamilies(); track f) {\n <option [value]=\"f\" [selected]=\"f === st.fontFamily\">{{ f }}</option>\n }\n @if (!fontFamilies().includes(st.fontFamily)) {\n <option [value]=\"st.fontFamily\" selected>{{ st.fontFamily }}</option>\n }\n </select>\n </label>\n <div class=\"pp__row\">\n <span>{{ s.fontSize }} (pt)</span>\n <input type=\"number\" min=\"4\" max=\"200\" step=\"0.5\" [value]=\"num(st.fontSize)\" (input)=\"setStyle('fontSize', asNumber($any($event.target).value, 4))\" />\n </div>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.bold\" (click)=\"setStyle('bold', !st.bold)\" [attr.aria-pressed]=\"st.bold\"><b>{{ s.bold }}</b></button>\n <button type=\"button\" [class.pp__on]=\"st.italic\" (click)=\"setStyle('italic', !st.italic)\" [attr.aria-pressed]=\"st.italic\"><i>{{ s.italic }}</i></button>\n <button type=\"button\" [class.pp__on]=\"st.underline\" (click)=\"setStyle('underline', !st.underline)\" [attr.aria-pressed]=\"st.underline\"><u>{{ s.underline }}</u></button>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.alignment }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'left'\" (click)=\"setStyle('textAlign', 'left')\">{{ s.alignLeft }}</button>\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'center'\" (click)=\"setStyle('textAlign', 'center')\">{{ s.alignCenter }}</button>\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'right'\" (click)=\"setStyle('textAlign', 'right')\">{{ s.alignRight }}</button>\n </div>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.verticalAlignment }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'top'\" (click)=\"setStyle('verticalAlign', 'top')\">{{ s.alignTop }}</button>\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'middle'\" (click)=\"setStyle('verticalAlign', 'middle')\">{{ s.alignMiddle }}</button>\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'bottom'\" (click)=\"setStyle('verticalAlign', 'bottom')\">{{ s.alignBottom }}</button>\n </div>\n </div>\n <label class=\"pp__row\">\n <span>{{ s.textColor }}</span>\n <input type=\"color\" [value]=\"st.color\" (input)=\"setStyle('color', $any($event.target).value)\" />\n </label>\n </section>\n }\n @if (control()?.type !== 'line') {\n <section class=\"pp__section\">\n @if (!hasText()) {\n <h3>{{ s.groupAppearance }}</h3>\n }\n <label class=\"pp__row\">\n <span>{{ s.backgroundColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"st.backgroundColor ?? '#ffffff'\" (input)=\"setStyle('backgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setStyle('backgroundColor', undefined)\">{{ s.noColor }}</button>\n </span>\n </label>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.border }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.top\" (click)=\"toggleBorderSide('top', !st.border?.sides?.top)\">{{ s.marginTop }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.right\" (click)=\"toggleBorderSide('right', !st.border?.sides?.right)\">{{ s.marginRight }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.bottom\" (click)=\"toggleBorderSide('bottom', !st.border?.sides?.bottom)\">{{ s.marginBottom }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.left\" (click)=\"toggleBorderSide('left', !st.border?.sides?.left)\">{{ s.marginLeft }}</button>\n </div>\n </div>\n @if (st.border) {\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.borderWidth }}</span>\n <input type=\"number\" min=\"0.05\" step=\"0.05\" [value]=\"num(st.border.width)\" (input)=\"setBorder({ width: asNumber($any($event.target).value, 0.05) })\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.borderColor }}</span>\n <input type=\"color\" [value]=\"st.border.color\" (input)=\"setBorder({ color: $any($event.target).value })\" />\n </label>\n </div>\n }\n @if (advanced() && hasText()) {\n <label class=\"pp__row\">\n <span>{{ s.padding }} (mm)</span>\n <input type=\"number\" min=\"0\" step=\"0.1\" [value]=\"num(st.padding)\" (input)=\"setStyle('padding', asNumber($any($event.target).value, 0))\" />\n </label>\n }\n </section>\n }\n }\n\n @if (advanced() && control(); as c) {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <span class=\"pp__label\">{{ s.visibleWhen }}</span>\n <input class=\"pp__mono\" [value]=\"$any(visibleValue(c)).expression ?? ''\" (input)=\"setVisible({ expression: $any($event.target).value })\" spellcheck=\"false\" placeholder=\"[Total] > 0\" />\n <small class=\"pp__hint\">{{ s.visibleWhenHint }}</small>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.stretch\" (change)=\"set('stretch', $any($event.target).checked || undefined)\" />\n <span>{{ s.stretch }}<small class=\"pp__hint\">{{ s.stretchHint }}</small></span>\n </label>\n </section>\n }\n}\n", styles: [":host{display:block;padding:14px 14px 32px;font-size:12.5px;color:var(--we-report-fg, #1d1d1f)}.pp__title{margin:0;font-size:15px;font-weight:600;letter-spacing:-.01em}.pp__subtitle{margin-top:2px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__subtitle code{font-size:11px}.pp__section{display:flex;flex-direction:column;gap:10px;padding:14px 0;border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.pp__section:last-of-type{border-bottom:0}.pp__section h3{margin:0;font-size:12px;font-weight:600;color:var(--we-report-fg, #1d1d1f)}.pp__row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pp__row>span:first-child{flex:1;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__row input[type=number]{width:76px;text-align:right;font-variant-numeric:tabular-nums}.pp__row select{width:auto;max-width:60%}.pp__row--stack{flex-direction:column;align-items:stretch;gap:4px}.pp__row--stack>span:first-child{font-size:11.5px}.pp__row--stack input[type=number]{width:100%;text-align:left}.pp__row--stack select{max-width:none;width:100%}.pp__grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pp__grid--4{grid-template-columns:repeat(4,1fr)}.pp__grid--4 label{display:flex;flex-direction:column;gap:3px;text-align:center}.pp__grid--4 label small{font-size:10.5px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__grid--4 label input{text-align:center!important}input:not([type=checkbox]):not([type=color]):not([type=file]),select,textarea{width:100%;box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;transition:box-shadow .15s ease}input:not([type=checkbox]):not([type=color]):not([type=file]):focus,select:focus,textarea:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff);width:14px;height:14px}input[type=color]{width:26px;height:26px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14))}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:0;border-radius:50%}input[type=color]::-moz-color-swatch{border:0;border-radius:50%}.pp__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace!important;font-size:12px!important}.pp__label{font-weight:500}.pp__hint{display:block;margin-top:2px;font-size:11px;line-height:1.35;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__check{display:flex;align-items:flex-start;gap:8px;cursor:pointer}.pp__check input{margin-top:2px}.pp__segmented{display:flex;padding:2px;gap:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.pp__segmented button{flex:1;border:0;border-radius:6px;padding:4px;font:inherit;font-size:12px;background:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.pp__segmented button.pp__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.pp__segmented button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.pp__tools{display:flex;gap:2px;padding:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.pp__tools button{flex:1;display:inline-flex;align-items:center;justify-content:center;height:26px;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer}.pp__tools button :is(svg){width:16px;height:16px}.pp__tools button:hover:not(:disabled){background:var(--we-report-segment-on-bg, #fff);box-shadow:0 1px 2px #0000001a}.pp__tools button:disabled{opacity:.3;cursor:default}.pp__tools button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.pp__buttons{display:grid;grid-template-columns:1fr 1fr;gap:4px}.pp__buttons button{border:0;border-radius:var(--we-report-control-radius, 7px);padding:5px 6px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12));color:inherit;font:inherit;font-size:12px;cursor:pointer}.pp__buttons button:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .2))}.pp__buttons button:disabled{opacity:.4;cursor:default}.pp__rule{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:10px;background:var(--we-report-workspace-bg, #f2f2f7)}.pp__rule-head,.pp__rule-then{display:flex;align-items:center;gap:8px}.pp__rule-head>span,.pp__rule-then>span{flex:1;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__rule-when{display:grid;grid-template-columns:1fr 54px 1fr;gap:4px}.pp__chip{border:0;border-radius:999px;padding:3px 10px;font:inherit;font-size:11.5px;font-weight:700;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12));color:inherit;cursor:pointer}.pp__chip.pp__on{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.pp__color{display:inline-flex;align-items:center;gap:8px}.pp__link{border:0;background:none;padding:0;font:inherit;color:var(--we-report-accent, #007aff);cursor:pointer}.pp__file{position:relative;display:block;padding:10px;border-radius:10px;border:1px dashed var(--we-report-accent, #007aff);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font-weight:500;text-align:center;cursor:pointer}.pp__file input{position:absolute;inset:0;opacity:0;cursor:pointer}.pp__danger{margin-top:14px;width:100%;padding:7px;border:0;border-radius:8px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #b25000);font:inherit;font-weight:500;cursor:pointer}@media (prefers-reduced-motion: reduce){input,select,textarea,.pp__segmented button{transition:none}}\n"], dependencies: [{ kind: "component", type: BindableInputComponent, selector: "we-report-bindable-input", inputs: ["value", "fields", "strings", "multiline"], outputs: ["valueChange"] }, { kind: "pipe", type: WeReportIconPipe, name: "weReportIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6920
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PropertyPanelComponent, isStandalone: true, selector: "we-report-property-panel", inputs: { strings: { classPropertyName: "strings", publicName: "strings", isSignal: true, isRequired: true, transformFunction: null }, fields: { classPropertyName: "fields", publicName: "fields", isSignal: true, isRequired: false, transformFunction: null }, fontFamilies: { classPropertyName: "fontFamilies", publicName: "fontFamilies", isSignal: true, isRequired: false, transformFunction: null }, advanced: { classPropertyName: "advanced", publicName: "advanced", isSignal: true, isRequired: false, transformFunction: null }, lists: { classPropertyName: "lists", publicName: "lists", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let s = strings();\n<h2 class=\"pp__title\">{{ s.properties }}</h2>\n\n@let selectedControl = control();\n@let selectedBand = band();\n@if (selectedControl) {\n <div class=\"pp__subtitle\">{{ s.controlNames[selectedControl.type] }} \u00B7 <code>{{ selectedControl.id }}</code></div>\n} @else if (controls().length > 1) {\n <div class=\"pp__subtitle\">{{ s.itemsSelected.replace('{0}', '' + controls().length) }}</div>\n} @else if (selectedBand) {\n <div class=\"pp__subtitle\">{{ s.bandNames[selectedBand.kind] }}</div>\n}\n\n<!-- \u2500\u2500 Report (nothing selected) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!controls().length && !band()) {\n <section class=\"pp__section\">\n <h3>{{ s.groupPage }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.reportName }}</span>\n <input [value]=\"report().name\" (input)=\"setReport('name', $any($event.target).value)\" />\n </label>\n @if (!embedded()) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.paper }}</span>\n <select (change)=\"setPaper($any($event.target).value)\">\n @for (p of papers; track p.id) {\n <option [value]=\"p.id\" [selected]=\"p.id === report().page.paper\">{{ p.id }} ({{ p.width }} \u00D7 {{ p.height ?? '\u221E' }} mm)</option>\n }\n <option value=\"custom\" [selected]=\"report().page.paper === 'custom'\">{{ s.customSize }}</option>\n </select>\n </label>\n @if (report().page.paper === 'custom') {\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.width }} (mm)</span>\n <input type=\"number\" min=\"10\" step=\"1\" [value]=\"num(report().page.width)\" (input)=\"setPage('width', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.height }} (mm)</span>\n <input type=\"number\" min=\"10\" step=\"1\" [value]=\"num(report().page.height)\" (input)=\"setPage('height', $any($event.target).value)\" />\n </label>\n </div>\n }\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.orientation }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"report().page.orientation === 'portrait'\" (click)=\"setPage('orientation', 'portrait')\">{{ s.portrait }}</button>\n <button type=\"button\" [class.pp__on]=\"report().page.orientation === 'landscape'\" (click)=\"setPage('orientation', 'landscape')\">{{ s.landscape }}</button>\n </div>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.margins }} (mm)</span>\n <div class=\"pp__grid pp__grid--4\">\n <label><small>{{ s.marginTop }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.top)\" (input)=\"setMargin('top', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginRight }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.right)\" (input)=\"setMargin('right', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginBottom }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.bottom)\" (input)=\"setMargin('bottom', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginLeft }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.left)\" (input)=\"setMargin('left', $any($event.target).value)\" /></label>\n </div>\n </div>\n @if (advanced()) {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!report().page.mirrorMargins\" (change)=\"setPageOption('mirrorMargins', $any($event.target).checked || undefined)\" />\n <span>{{ s.mirrorMargins }}<small class=\"pp__hint\">{{ s.mirrorMarginsHint }}</small></span>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.pageColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"report().page.color ?? '#ffffff'\" (input)=\"setPageOption('color', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setPageOption('color', undefined)\">{{ s.noColor }}</button>\n </span>\n </label>\n }\n } @else {\n <small class=\"pp__hint\">{{ s.subreportPageHint }}</small>\n }\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.reportLocale }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.reportLocaleRegion }}</span>\n <select (change)=\"setCulture('locale', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!report().locale\">{{ s.reportLocaleDefault }}</option>\n @for (l of cultures; track l.id) {\n <option [value]=\"l.id\" [selected]=\"report().locale === l.id\">{{ l.name }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.reportCurrency }}</span>\n <select (change)=\"setCulture('currency', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!report().currency\">{{ s.reportLocaleDefault }}</option>\n @for (c of currencies; track c) {\n <option [value]=\"c\" [selected]=\"report().currency === c\">{{ c }}</option>\n }\n </select>\n </label>\n <small class=\"pp__hint\">{{ s.reportLocaleHint }}</small>\n </section>\n <!-- A sub-report has no watermark of its own (the page around it does). -->\n @if (!embedded()) {\n <section class=\"pp__section\">\n <h3>{{ s.watermark }}</h3>\n @let wm = report().watermark;\n <we-report-bindable-input [value]=\"wm?.text ?? ''\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.watermark\" (valueChange)=\"setWatermark({ text: $event })\" />\n <small class=\"pp__hint\">{{ s.watermarkHint }}</small>\n @if (wm) {\n <div class=\"pp__row\">\n <span>{{ s.color }}</span>\n <input type=\"color\" [value]=\"wm.color ?? '#e3e6ea'\" (input)=\"setWatermark({ color: $any($event.target).value })\" [attr.aria-label]=\"s.color\" />\n </div>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.watermarkAngle\">\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"(wm.angle ?? 45) === 45\" [class.pp__on]=\"(wm.angle ?? 45) === 45\" (click)=\"setWatermark({ angle: undefined })\">\u2197 45\u00B0</button>\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"wm.angle === 0\" [class.pp__on]=\"wm.angle === 0\" (click)=\"setWatermark({ angle: 0 })\">\u2192 0\u00B0</button>\n </div>\n }\n </section>\n }\n @if (advanced() && report().dataMember) {\n <section class=\"pp__section\">\n <h3>{{ s.groupData }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.dataRows }}</span>\n <input [value]=\"report().dataMember?.path ?? ''\" (input)=\"setRowsPath($any($event.target).value)\" spellcheck=\"false\" />\n <small class=\"pp__hint\">{{ s.dataRowsHint }}</small>\n </label>\n </section>\n }\n}\n\n<!-- \u2500\u2500 Band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (band(); as b) {\n <section class=\"pp__section\">\n <h3>{{ s.groupLayout }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.bandHeight }} (mm)</span>\n <input type=\"number\" min=\"2\" step=\"1\" [value]=\"num(b.height)\" (input)=\"setBand('height', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row\">\n <span>{{ s.backgroundColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"b.backgroundColor ?? '#ffffff'\" (input)=\"setBand('backgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setBand('backgroundColor', '')\">{{ s.noColor }}</button>\n </span>\n </label>\n @if (b.kind === 'detail' || b.kind === 'subDetail') {\n <label class=\"pp__row\">\n <span>{{ s.alternateBackground }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"b.alternateBackgroundColor ?? '#f6f8fa'\" (input)=\"setBand('alternateBackgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setBand('alternateBackgroundColor', '')\">{{ s.noColor }}</button>\n </span>\n </label>\n }\n @if (b.kind === 'groupHeader' || b.kind === 'detail') {\n <span class=\"pp__label\">{{ s.bookmark }}</span>\n <we-report-bindable-input [value]=\"bookmarkValue(b)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.bookmark\" (valueChange)=\"setBookmark($event)\" />\n <small class=\"pp__hint\">{{ s.bookmarkHint }}</small>\n }\n @if (advanced() && b.kind !== 'pageHeader' && b.kind !== 'pageFooter') {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.bandVisible }}</span>\n <input class=\"pp__mono\" [value]=\"b.visible?.expression ?? ''\" placeholder=\"[Discount] > 0\" (input)=\"setBand('visible', $any($event.target).value)\" spellcheck=\"false\" />\n </label>\n <small class=\"pp__hint\">{{ s.bandVisibleHint }}</small>\n }\n </section>\n @if (b.kind === 'subDetail') {\n <section class=\"pp__section\">\n <h3>{{ s.innerList }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.innerListOf }}</span>\n <select (change)=\"setBand('rowsPath', $any($event.target).value)\">\n @for (l of lists(); track l) {\n <option [value]=\"l\" [selected]=\"b.rowsPath === l\">{{ l }}</option>\n }\n @if (b.rowsPath && !lists().includes(b.rowsPath)) {\n <option [value]=\"b.rowsPath\" selected>{{ b.rowsPath }}</option>\n }\n </select>\n </label>\n <small class=\"pp__hint\">{{ s.innerListHint }}</small>\n </section>\n }\n @if (b.kind === 'detail') {\n <section class=\"pp__section\">\n <h3>{{ s.sortRows }}</h3>\n @let key = b.sortBy?.[0];\n <div class=\"pp__grid\">\n <select (change)=\"setSort($any($event.target).value, !!key?.descending)\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"\" [selected]=\"!key\">{{ s.dataOrder }}</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === key?.expression\">{{ f.label }}</option>\n }\n @if (key && !fieldExpressions().has(key.expression)) {\n <option [value]=\"key.expression\" selected>{{ key.expression }}</option>\n }\n </select>\n <select [disabled]=\"!key\" (change)=\"setSort(key?.expression ?? '', $any($event.target).value === 'desc')\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"asc\" [selected]=\"!key?.descending\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"!!key?.descending\">{{ s.sortDesc }}</option>\n </select>\n </div>\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.labelSheet }}</h3>\n <select (change)=\"applyLabelSheet($any($event.target).value); $any($event.target).value = ''\" [attr.aria-label]=\"s.labelSheet\">\n <option value=\"\" selected>{{ s.labelSheetChoose }}</option>\n @for (l of labelSheets; track l.id) {\n <option [value]=\"l.id\">{{ labelSheetName(l) }}</option>\n }\n </select>\n <small class=\"pp__hint\">{{ s.labelSheetHint }}</small>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnsCount }}</span>\n <input type=\"number\" min=\"1\" max=\"12\" step=\"1\" [value]=\"b.columns?.count ?? 1\" (input)=\"setColumns('count', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnGap }}</span>\n <input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(b.columns?.gap ?? 0)\" (input)=\"setColumns('gap', $any($event.target).value)\" />\n </label>\n </div>\n <small class=\"pp__hint\">{{ s.columnsHint }}</small>\n </section>\n }\n @if (b.kind === 'groupHeader') {\n <section class=\"pp__section\">\n <h3>{{ s.groupBy }}</h3>\n @if (fields().length) {\n <select (change)=\"setBand('groupBy', $any($event.target).value)\">\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === b.groupBy?.expression\">{{ f.label }}</option>\n }\n </select>\n }\n <input class=\"pp__mono\" [value]=\"b.groupBy?.expression ?? ''\" (input)=\"setBand('groupBy', $any($event.target).value)\" spellcheck=\"false\" />\n <label class=\"pp__row\">\n <span>{{ s.sortGroups }}</span>\n <select (change)=\"setBand('sort', $any($event.target).value)\">\n <option value=\"asc\" [selected]=\"!b.sort || b.sort === 'asc'\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"b.sort === 'desc'\">{{ s.sortDesc }}</option>\n <option value=\"none\" [selected]=\"b.sort === 'none'\">{{ s.sortNone }}</option>\n </select>\n </label>\n @if (advanced() || b.orderBy) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.groupOrderBy }}</span>\n <input class=\"pp__mono\" [value]=\"b.orderBy?.expression ?? ''\" placeholder=\"Sum([amount])\" (input)=\"setGroupOrder($any($event.target).value, !!b.orderBy?.descending)\" spellcheck=\"false\" />\n </label>\n @if (b.orderBy) {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.orderBy.descending\" (change)=\"setGroupOrder(b.orderBy.expression, $any($event.target).checked)\" />\n <span>{{ s.largestFirst }}</span>\n </label>\n }\n <small class=\"pp__hint\">{{ s.groupOrderByHint }}</small>\n <label class=\"pp__row\">\n <span>{{ s.groupTop }}</span>\n <input type=\"number\" min=\"1\" step=\"1\" [value]=\"b.top ?? ''\" (input)=\"setGroupTop($any($event.target).value)\" />\n </label>\n }\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.keepTogether\" (change)=\"toggleBand('keepTogether', $any($event.target).checked)\" />\n <span>{{ s.keepTogether }}<small class=\"pp__hint\">{{ s.keepTogetherHint }}</small></span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.keepWithFirstRow\" (change)=\"toggleBand('keepWithFirstRow', $any($event.target).checked)\" />\n <span>{{ s.keepWithFirstRow }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.repeatOnEveryPage\" (change)=\"toggleBand('repeatOnEveryPage', $any($event.target).checked)\" />\n <span>{{ s.repeatOnEveryPage }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.resetPageNumber\" (change)=\"toggleBand('resetPageNumber', $any($event.target).checked)\" />\n <span>{{ s.resetPageNumber }}<small class=\"pp__hint\">{{ s.resetPageNumberHint }}</small></span>\n </label>\n </section>\n }\n @if (advanced() && b.kind !== 'pageHeader' && b.kind !== 'pageFooter') {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.pageBreakBefore\" (change)=\"toggleBand('pageBreakBefore', $any($event.target).checked)\" />\n <span>{{ s.pageBreakBefore }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.pageBreakAfter\" (change)=\"toggleBand('pageBreakAfter', $any($event.target).checked)\" />\n <span>{{ s.pageBreakAfter }}</span>\n </label>\n @if (b.kind === 'reportFooter') {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.printAtBottom\" (change)=\"toggleBand('printAtBottom', $any($event.target).checked)\" />\n <span>{{ s.printAtBottom }}<small class=\"pp__hint\">{{ s.printAtBottomHint }}</small></span>\n </label>\n }\n </section>\n }\n @if (advanced() && (b.kind === 'pageHeader' || b.kind === 'pageFooter')) {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"b.printOnFirstPage !== false\" (change)=\"setPrintOn('printOnFirstPage', $any($event.target).checked)\" />\n <span>{{ s.printOnFirstPage }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"b.printOnLastPage !== false\" (change)=\"setPrintOn('printOnLastPage', $any($event.target).checked)\" />\n <span>{{ s.printOnLastPage }}</span>\n </label>\n </section>\n }\n @if (b.kind !== 'detail') {\n <button type=\"button\" class=\"pp__danger\" (click)=\"removeBand()\">{{ s.removeBand }}</button>\n }\n}\n\n<!-- \u2500\u2500 Control(s) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (controls().length) {\n @let n = controls().length;\n <section class=\"pp__section\">\n <h3>{{ s.arrange }}</h3>\n <div class=\"pp__tools\" role=\"toolbar\" [attr.aria-label]=\"s.arrange\">\n @for (a of alignActions; track a.edge) {\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.align(a.edge)\" [title]=\"s[a.label]\" [attr.aria-label]=\"s[a.label]\" [innerHTML]=\"a.icon | weReportIcon\"></button>\n }\n </div>\n <div class=\"pp__tools\" role=\"toolbar\" [attr.aria-label]=\"s.arrange\">\n <button type=\"button\" [disabled]=\"n < 3\" (click)=\"state.distribute('h')\" [title]=\"s.distributeH\" [attr.aria-label]=\"s.distributeH\" [innerHTML]=\"'distributeH' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 3\" (click)=\"state.distribute('v')\" [title]=\"s.distributeV\" [attr.aria-label]=\"s.distributeV\" [innerHTML]=\"'distributeV' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.sameSize('width')\" [title]=\"s.sameWidth\" [attr.aria-label]=\"s.sameWidth\" [innerHTML]=\"'sameWidth' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.sameSize('height')\" [title]=\"s.sameHeight\" [attr.aria-label]=\"s.sameHeight\" [innerHTML]=\"'sameHeight' | weReportIcon\"></button>\n <button type=\"button\" (click)=\"state.arrange('front')\" [title]=\"s.bringToFront\" [attr.aria-label]=\"s.bringToFront\" [innerHTML]=\"'bringToFront' | weReportIcon\"></button>\n <button type=\"button\" (click)=\"state.arrange('back')\" [title]=\"s.sendToBack\" [attr.aria-label]=\"s.sendToBack\" [innerHTML]=\"'sendToBack' | weReportIcon\"></button>\n </div>\n @if (n < 2) {\n <small class=\"pp__hint\">{{ s.arrangeHint }}</small>\n }\n </section>\n @if (control(); as c) {\n <!-- Content first: it is what people change most. -->\n @switch (c.type) {\n @case ('text') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [multiline]=\"true\" [label]=\"s.groupContent\" (valueChange)=\"setBindable('text', $event)\" />\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ $any(s)[f.key] }}</option>\n }\n @if (formatIsCustom()) {\n <option [value]=\"c.format\" selected>{{ c.format }}</option>\n }\n </select>\n </label>\n @if (advanced()) {\n <input class=\"pp__mono\" [value]=\"c.format ?? ''\" (input)=\"set('format', $any($event.target).value)\" spellcheck=\"false\" placeholder=\"n2 \u00B7 c2 \u00B7 dd.MM.yyyy\" />\n }\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.canGrow\" (change)=\"set('canGrow', $any($event.target).checked || undefined)\" />\n <span>{{ s.canGrow }}<small class=\"pp__hint\">{{ s.canGrowHint }}</small></span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.markup\" (change)=\"set('markup', $any($event.target).checked || undefined)\" />\n <span>{{ s.richText }}<small class=\"pp__hint\">{{ s.richTextHint }}</small></span>\n </label>\n </section>\n }\n @case ('barcode') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.symbology }}</span>\n <select (change)=\"set('symbology', $any($event.target).value)\">\n @for (sym of symbologies; track sym) {\n <option [value]=\"sym\" [selected]=\"sym === c.symbology\">{{ sym }}</option>\n }\n @if (!symbologies.includes(c.symbology)) {\n <option [value]=\"c.symbology\" selected>{{ c.symbology }}</option>\n }\n </select>\n </label>\n <span class=\"pp__label\">{{ s.barcodeValue }}</span>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.barcodeValue\" (valueChange)=\"setBindable('value', $event)\" />\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.showText\" (change)=\"set('showText', $any($event.target).checked)\" />\n <span>{{ s.showText }}</span>\n </label>\n </section>\n }\n @case ('image') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__file\">\n <input type=\"file\" accept=\"image/png,image/jpeg\" (change)=\"chooseImage($event)\" />\n <span>{{ s.chooseImage }}</span>\n </label>\n <span class=\"pp__label\">{{ s.fromData }}</span>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.fromData\" (valueChange)=\"setBindable('source', $event)\" />\n <label class=\"pp__row\">\n <span>{{ s.fit }}</span>\n <select (change)=\"set('fit', $any($event.target).value)\">\n <option value=\"contain\" [selected]=\"c.fit === 'contain'\">{{ s.fitContain }}</option>\n <option value=\"cover\" [selected]=\"c.fit === 'cover'\">{{ s.fitCover }}</option>\n <option value=\"stretch\" [selected]=\"c.fit === 'stretch'\">{{ s.fitStretch }}</option>\n <option value=\"none\" [selected]=\"c.fit === 'none'\">{{ s.fitNone }}</option>\n </select>\n </label>\n </section>\n }\n @case ('line') {\n <section class=\"pp__section\">\n <h3>{{ s.groupAppearance }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.lineDirection }}</span>\n <select (change)=\"set('direction', $any($event.target).value)\">\n <option value=\"horizontal\" [selected]=\"c.direction === 'horizontal'\">{{ s.horizontal }}</option>\n <option value=\"vertical\" [selected]=\"c.direction === 'vertical'\">{{ s.vertical }}</option>\n <option value=\"diagonalDown\" [selected]=\"c.direction === 'diagonalDown'\">{{ s.diagonalDown }}</option>\n <option value=\"diagonalUp\" [selected]=\"c.direction === 'diagonalUp'\">{{ s.diagonalUp }}</option>\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.lineWidth }} (mm)</span>\n <input type=\"number\" min=\"0.05\" step=\"0.05\" [value]=\"num(c.lineWidth)\" (input)=\"set('lineWidth', asNumber($any($event.target).value, 0.05))\" />\n </label>\n <label class=\"pp__row\">\n <span>{{ s.color }}</span>\n <input type=\"color\" [value]=\"c.color ?? style()?.color ?? '#000000'\" (input)=\"set('color', $any($event.target).value)\" />\n </label>\n </section>\n }\n @case ('shape') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.shape }}</span>\n <select (change)=\"set('shape', $any($event.target).value)\">\n <option value=\"rectangle\" [selected]=\"c.shape === 'rectangle'\">{{ s.rectangle }}</option>\n <option value=\"roundedRectangle\" [selected]=\"c.shape === 'roundedRectangle'\">{{ s.roundedRectangle }}</option>\n <option value=\"ellipse\" [selected]=\"c.shape === 'ellipse'\">{{ s.ellipse }}</option>\n </select>\n </label>\n @if (c.shape === 'roundedRectangle') {\n <label class=\"pp__row\">\n <span>{{ s.cornerRadius }} (mm)</span>\n <input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.cornerRadius ?? 2)\" (input)=\"set('cornerRadius', asNumber($any($event.target).value, 0))\" />\n </label>\n }\n </section>\n }\n @case ('pageInfo') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.pageInfo }}</span>\n <select (change)=\"set('info', $any($event.target).value)\">\n <option value=\"pageNumber\" [selected]=\"c.info === 'pageNumber'\">{{ s.pageNumber }}</option>\n <option value=\"pageCount\" [selected]=\"c.info === 'pageCount'\">{{ s.pageTotal }}</option>\n <option value=\"pageNofM\" [selected]=\"c.info === 'pageNofM'\">{{ s.pageNofM }}</option>\n <option value=\"printDate\" [selected]=\"c.info === 'printDate'\">{{ s.printDate }}</option>\n </select>\n </label>\n @if (c.info === 'pageNofM' || c.info === 'printDate') {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.format }}</span>\n <input class=\"pp__mono\" [value]=\"c.format ?? ''\" (input)=\"set('format', $any($event.target).value)\" [placeholder]=\"c.info === 'pageNofM' ? '{0} / {1}' : 'dd.MM.yyyy'\" spellcheck=\"false\" />\n </label>\n }\n </section>\n }\n @case ('table') {\n @let cellInfo = selectedCell();\n <section class=\"pp__section\">\n <h3>{{ s.tableSection }}</h3>\n <small class=\"pp__hint\">{{ s.tableHint }}</small>\n <div class=\"pp__buttons\">\n <button type=\"button\" (click)=\"tableOp('insertRow')\">+ {{ s.addRow }}</button>\n <button type=\"button\" (click)=\"tableOp('insertColumn')\">+ {{ s.addColumn }}</button>\n <button type=\"button\" [disabled]=\"c.rows.length < 2\" (click)=\"tableOp('deleteRow')\">\u2212 {{ s.deleteRow }}</button>\n <button type=\"button\" [disabled]=\"c.columns.length < 2\" (click)=\"tableOp('deleteColumn')\">\u2212 {{ s.deleteColumn }}</button>\n <button type=\"button\" [disabled]=\"!cellInfo || cellInfo.index >= c.rows[cellInfo.row].cells.length - 1\" (click)=\"tableOp('mergeRight')\">{{ s.mergeCells }}</button>\n <button type=\"button\" [disabled]=\"!cellInfo || (cellInfo.cell.colSpan ?? 1) < 2\" (click)=\"tableOp('splitCell')\">{{ s.splitCell }}</button>\n </div>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.canGrow\" (change)=\"set('canGrow', $any($event.target).checked || undefined)\" />\n <span>{{ s.canGrow }}<small class=\"pp__hint\">{{ s.canGrowHint }}</small></span>\n </label>\n </section>\n @if (cellInfo) {\n <section class=\"pp__section\">\n <h3>{{ s.selectedCell }}</h3>\n <we-report-bindable-input [value]=\"cellInfo.cell.text\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.selectedCell\" (valueChange)=\"setCell({ text: $event })\" />\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"setCell({ format: $any($event.target).value || undefined })\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(cellInfo.cell.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.alignment\">\n @for (a of ['left', 'center', 'right']; track a) {\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"cellAlign(cellInfo.cell) === a\" [class.pp__on]=\"cellAlign(cellInfo.cell) === a\" (click)=\"setCellStyle('textAlign', $any(a))\">\n {{ a === 'left' ? s.alignLeft : a === 'center' ? s.alignCenter : s.alignRight }}\n </button>\n }\n </div>\n <div class=\"pp__rule-then\">\n <button type=\"button\" class=\"pp__chip\" [class.pp__on]=\"cellInfo.cell.styleOverrides?.bold\" (click)=\"setCellStyle('bold', cellInfo.cell.styleOverrides?.bold ? undefined : true)\">{{ s.bold }}</button>\n <span>{{ s.backgroundColor }}</span>\n <input type=\"color\" [value]=\"cellInfo.cell.styleOverrides?.backgroundColor ?? '#ffffff'\" (input)=\"setCellStyle('backgroundColor', $any($event.target).value)\" [attr.aria-label]=\"s.backgroundColor\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setCellStyle('backgroundColor', undefined)\">{{ s.noColor }}</button>\n </div>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnWidth }}</span>\n <input type=\"number\" min=\"2\" step=\"1\" [value]=\"num(c.columns[cellInfo.column])\" (input)=\"setColumnWidth(cellInfo.column, $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.rowHeight }}</span>\n <input type=\"number\" min=\"2\" step=\"0.5\" [value]=\"num(c.rows[cellInfo.row].height)\" (input)=\"setRowHeight(cellInfo.row, $any($event.target).value)\" />\n </label>\n </div>\n </section>\n }\n }\n @case ('chart') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <small class=\"pp__hint\">{{ s.chartHint }}</small>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.chartType\">\n @for (t of chartTypes; track t.type) {\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"c.chartType === t.type\" [class.pp__on]=\"c.chartType === t.type\" (click)=\"setChartType(t.type)\">{{ s[t.label] }}</button>\n }\n </div>\n <!-- A data bar and a gauge show one value: they have no groups. -->\n @let grouped = c.chartType !== 'databar' && c.chartType !== 'gauge';\n @if (grouped) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartCategory }}</span>\n <select (change)=\"setExpression('category', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c.category.expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c.category.expression\">{{ f.label }}</option>\n }\n </select>\n </label>\n }\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartValue }}</span>\n <select (change)=\"setExpression('value', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c.value.expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c.value.expression\">{{ f.label }}</option>\n }\n </select>\n </label>\n @if (advanced()) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.expression }}</span>\n @if (grouped) {\n <input class=\"pp__mono\" [value]=\"c.category.expression\" (input)=\"setExpression('category', $any($event.target).value)\" spellcheck=\"false\" />\n }\n <input class=\"pp__mono\" [value]=\"c.value.expression\" (input)=\"setExpression('value', $any($event.target).value)\" spellcheck=\"false\" />\n </label>\n }\n <label class=\"pp__row\">\n <span>{{ s.chartAggregate }}</span>\n <select (change)=\"set('aggregate', $any($event.target).value)\">\n @for (a of aggregates; track a.value) {\n <option [value]=\"a.value\" [selected]=\"(c.aggregate ?? 'sum') === a.value\">{{ s[a.label] }}</option>\n }\n </select>\n </label>\n @if (c.chartType === 'databar' || c.chartType === 'gauge') {\n <label class=\"pp__row\">\n <span>{{ s.chartMax }}</span>\n <input type=\"number\" [value]=\"c.max ?? ''\" (input)=\"set('max', $any($event.target).value === '' ? undefined : +$any($event.target).value)\" />\n </label>\n }\n @if (advanced() || c.rows) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartRows }}</span>\n <input class=\"pp__mono\" [attr.list]=\"listId + '-chart'\" [value]=\"c.rows?.expression ?? ''\" placeholder=\"[months]\" (input)=\"setOptionalChartRows($any($event.target).value)\" spellcheck=\"false\" />\n <datalist [id]=\"listId + '-chart'\">\n @for (l of lists(); track l) {\n <option [value]=\"'[' + l + ']'\"></option>\n }\n </datalist>\n </label>\n <small class=\"pp__hint\">{{ s.chartRowsHint }}</small>\n }\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartTitle }}</span>\n <input [value]=\"c.title ?? ''\" (input)=\"set('title', $any($event.target).value)\" />\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.showValues\" (change)=\"set('showValues', $any($event.target).checked || undefined)\" />\n <span>{{ s.showValues }}</span>\n </label>\n @if (c.chartType === 'pie' || c.chartType === 'doughnut') {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.showLegend !== false\" (change)=\"set('showLegend', $any($event.target).checked ? undefined : false)\" />\n <span>{{ s.showLegend }}</span>\n </label>\n }\n </section>\n }\n @case ('crosstab') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <small class=\"pp__hint\">{{ s.crosstabHint }}</small>\n @for (k of crosstabKeys; track k.key) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s[k.label] }}</span>\n <select (change)=\"setCrosstab(k.key, $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c[k.key].expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c[k.key].expression\">{{ f.label }}</option>\n }\n </select>\n @if (advanced()) {\n <input class=\"pp__mono\" [value]=\"c[k.key].expression\" (input)=\"setCrosstab(k.key, $any($event.target).value)\" spellcheck=\"false\" />\n }\n </label>\n }\n <label class=\"pp__row\">\n <span>{{ s.chartAggregate }}</span>\n <select (change)=\"set('aggregate', $any($event.target).value)\">\n @for (a of aggregates; track a.value) {\n <option [value]=\"a.value\" [selected]=\"(c.aggregate ?? 'sum') === a.value\">{{ s[a.label] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.crosstabTitle }}</span>\n <input [value]=\"c.title ?? ''\" (input)=\"set('title', $any($event.target).value)\" />\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.totals !== false\" (change)=\"set('totals', $any($event.target).checked ? undefined : false)\" />\n <span>{{ s.crosstabTotals }}</span>\n </label>\n </section>\n }\n @case ('subreport') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <small class=\"pp__hint\">{{ s.subreportHint }}</small>\n <div class=\"pp__buttons\">\n <button type=\"button\" (click)=\"state.subreportOpen.set(c.id)\">{{ s.subreportEdit }}</button>\n </div>\n <label class=\"pp__file\">\n <input type=\"file\" accept=\".json,.rdl,.rdlc,.repx\" (change)=\"chooseSubreport($event)\" />\n <span>{{ s.subreportLoad }}</span>\n </label>\n @if (subreportError()) {\n <small class=\"pp__hint pp__warn\" role=\"alert\">{{ s.subreportLoadFailed }}</small>\n }\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.subreportRows }}</span>\n <input class=\"pp__mono\" [attr.list]=\"listId + '-sub'\" [value]=\"c.rows?.expression ?? ''\" placeholder=\"[orders]\" (input)=\"setOptionalExpression('rows', $any($event.target).value)\" spellcheck=\"false\" />\n <datalist [id]=\"listId + '-sub'\">\n @for (l of lists(); track l) {\n <option [value]=\"'[' + l + ']'\"></option>\n }\n </datalist>\n </label>\n <small class=\"pp__hint\">{{ s.subreportRowsHint }}</small>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.subreportFilter }}</span>\n <input class=\"pp__mono\" [value]=\"c.filter?.expression ?? ''\" placeholder=\"[CustomerId] = [^.Id]\" (input)=\"setOptionalExpression('filter', $any($event.target).value)\" spellcheck=\"false\" />\n </label>\n <small class=\"pp__hint\">{{ s.subreportFilterHint }}</small>\n @if (c.report.parameters?.length) {\n <span class=\"pp__label\">{{ s.subreportParams }}</span>\n @for (p of c.report.parameters; track p.name) {\n <span class=\"pp__label\">{{ p.label || p.name }}</span>\n <we-report-bindable-input [value]=\"subreportParamValue(c, p.name)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"p.label || p.name\" (valueChange)=\"setSubreportParam(p.name, $event)\" />\n }\n }\n </section>\n }\n @case ('checkbox') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <span class=\"pp__label\">{{ s.checked }}</span>\n <we-report-bindable-input [value]=\"checkedValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.checked\" (valueChange)=\"setBindable('checked', $event)\" />\n </section>\n }\n }\n\n <section class=\"pp__section\">\n <h3>{{ s.conditionalFormatting }}</h3>\n @for (rule of c.formatting ?? []; track $index; let i = $index) {\n @let cond = condition(rule.when);\n <div class=\"pp__rule\">\n <div class=\"pp__rule-head\">\n <span>{{ s.ruleWhen }}</span>\n <button type=\"button\" class=\"pp__link\" (click)=\"removeRule(i)\" [title]=\"s.removeRule\" [attr.aria-label]=\"s.removeRule\">\u2715</button>\n </div>\n @if (cond) {\n <div class=\"pp__rule-when\">\n <select (change)=\"setCondition(i, cond, 'field', $any($event.target).value)\" [attr.aria-label]=\"s.ruleWhen\">\n <option value=\"\" [selected]=\"!cond.field\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === cond.field\">{{ f.label }}</option>\n }\n </select>\n <select (change)=\"setCondition(i, cond, 'op', $any($event.target).value)\">\n @for (o of conditionOps; track o.op) {\n <option [value]=\"o.op\" [selected]=\"o.op === cond.op\">{{ o.op === 'contains' ? s.opContains : o.label }}</option>\n }\n </select>\n <input [value]=\"cond.value\" (input)=\"setCondition(i, cond, 'value', $any($event.target).value)\" [placeholder]=\"s.ruleValue\" [attr.aria-label]=\"s.ruleValue\" />\n </div>\n }\n @if (advanced() || !cond) {\n <input class=\"pp__mono\" [value]=\"rule.when\" (input)=\"setRule(i, { when: $any($event.target).value })\" spellcheck=\"false\" />\n }\n <div class=\"pp__rule-then\">\n <span>{{ s.ruleThen }}</span>\n <input type=\"color\" [value]=\"rule.style.color ?? '#000000'\" (input)=\"setRuleStyle(i, 'color', $any($event.target).value)\" [title]=\"s.textColor\" [attr.aria-label]=\"s.textColor\" />\n <input type=\"color\" [value]=\"rule.style.backgroundColor ?? '#ffffff'\" (input)=\"setRuleStyle(i, 'backgroundColor', $any($event.target).value)\" [title]=\"s.backgroundColor\" [attr.aria-label]=\"s.backgroundColor\" />\n <button type=\"button\" class=\"pp__chip\" [class.pp__on]=\"rule.style.bold\" (click)=\"setRuleStyle(i, 'bold', rule.style.bold ? undefined : true)\">{{ s.bold }}</button>\n </div>\n </div>\n } @empty {\n <small class=\"pp__hint\">{{ s.conditionalHint }}</small>\n }\n <button type=\"button\" class=\"pp__link\" (click)=\"addRule()\">+ {{ s.addRule }}</button>\n </section>\n\n <section class=\"pp__section\">\n <h3>{{ s.groupLayout }}</h3>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\"><span>{{ s.left }}</span><input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.x)\" (input)=\"setGeometry('x', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.top }}</span><input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.y)\" (input)=\"setGeometry('y', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.width }}</span><input type=\"number\" min=\"0.5\" step=\"0.5\" [value]=\"num(c.width)\" (input)=\"setGeometry('width', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.height }}</span><input type=\"number\" min=\"0.5\" step=\"0.5\" [value]=\"num(c.height)\" (input)=\"setGeometry('height', $any($event.target).value)\" /></label>\n </div>\n </section>\n }\n\n <!-- Appearance applies to every selected control at once. -->\n @if (style(); as st) {\n @if (hasText()) {\n <section class=\"pp__section\">\n <h3>{{ s.groupAppearance }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.font }}</span>\n <select (change)=\"setStyle('fontFamily', $any($event.target).value)\">\n @for (f of fontFamilies(); track f) {\n <option [value]=\"f\" [selected]=\"f === st.fontFamily\">{{ f }}</option>\n }\n @if (!fontFamilies().includes(st.fontFamily)) {\n <option [value]=\"st.fontFamily\" selected>{{ st.fontFamily }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.fontSize }} (pt)</span>\n <input type=\"number\" min=\"4\" max=\"200\" step=\"0.5\" [value]=\"num(st.fontSize)\" (input)=\"setStyle('fontSize', asNumber($any($event.target).value, 4))\" />\n </label>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.bold\" (click)=\"setStyle('bold', !st.bold)\" [attr.aria-pressed]=\"st.bold\"><b>{{ s.bold }}</b></button>\n <button type=\"button\" [class.pp__on]=\"st.italic\" (click)=\"setStyle('italic', !st.italic)\" [attr.aria-pressed]=\"st.italic\"><i>{{ s.italic }}</i></button>\n <button type=\"button\" [class.pp__on]=\"st.underline\" (click)=\"setStyle('underline', !st.underline)\" [attr.aria-pressed]=\"st.underline\"><u>{{ s.underline }}</u></button>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.alignment }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'left'\" (click)=\"setStyle('textAlign', 'left')\">{{ s.alignLeft }}</button>\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'center'\" (click)=\"setStyle('textAlign', 'center')\">{{ s.alignCenter }}</button>\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'right'\" (click)=\"setStyle('textAlign', 'right')\">{{ s.alignRight }}</button>\n </div>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.verticalAlignment }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'top'\" (click)=\"setStyle('verticalAlign', 'top')\">{{ s.alignTop }}</button>\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'middle'\" (click)=\"setStyle('verticalAlign', 'middle')\">{{ s.alignMiddle }}</button>\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'bottom'\" (click)=\"setStyle('verticalAlign', 'bottom')\">{{ s.alignBottom }}</button>\n </div>\n </div>\n <label class=\"pp__row\">\n <span>{{ s.textColor }}</span>\n <input type=\"color\" [value]=\"st.color\" (input)=\"setStyle('color', $any($event.target).value)\" />\n </label>\n </section>\n }\n @if (control()?.type !== 'line') {\n <section class=\"pp__section\">\n @if (!hasText()) {\n <h3>{{ s.groupAppearance }}</h3>\n }\n <label class=\"pp__row\">\n <span>{{ s.backgroundColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"st.backgroundColor ?? '#ffffff'\" (input)=\"setStyle('backgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setStyle('backgroundColor', undefined)\">{{ s.noColor }}</button>\n </span>\n </label>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.border }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.top\" (click)=\"toggleBorderSide('top', !st.border?.sides?.top)\">{{ s.marginTop }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.right\" (click)=\"toggleBorderSide('right', !st.border?.sides?.right)\">{{ s.marginRight }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.bottom\" (click)=\"toggleBorderSide('bottom', !st.border?.sides?.bottom)\">{{ s.marginBottom }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.left\" (click)=\"toggleBorderSide('left', !st.border?.sides?.left)\">{{ s.marginLeft }}</button>\n </div>\n </div>\n @if (st.border) {\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.borderWidth }}</span>\n <input type=\"number\" min=\"0.05\" step=\"0.05\" [value]=\"num(st.border.width)\" (input)=\"setBorder({ width: asNumber($any($event.target).value, 0.05) })\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.borderColor }}</span>\n <input type=\"color\" [value]=\"st.border.color\" (input)=\"setBorder({ color: $any($event.target).value })\" />\n </label>\n </div>\n }\n @if (advanced() && hasText()) {\n <label class=\"pp__row\">\n <span>{{ s.padding }} (mm)</span>\n <input type=\"number\" min=\"0\" step=\"0.1\" [value]=\"num(st.padding)\" (input)=\"setStyle('padding', asNumber($any($event.target).value, 0))\" />\n </label>\n }\n </section>\n }\n }\n\n @if (advanced() && control(); as c) {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <span class=\"pp__label\">{{ s.visibleWhen }}</span>\n <input class=\"pp__mono\" [value]=\"$any(visibleValue(c)).expression ?? ''\" (input)=\"setVisible({ expression: $any($event.target).value })\" spellcheck=\"false\" placeholder=\"[Total] > 0\" />\n <small class=\"pp__hint\">{{ s.visibleWhenHint }}</small>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.stretch\" (change)=\"set('stretch', $any($event.target).checked || undefined)\" />\n <span>{{ s.stretch }}<small class=\"pp__hint\">{{ s.stretchHint }}</small></span>\n </label>\n </section>\n }\n}\n", styles: [":host{display:block;padding:14px 14px 32px;font-size:12.5px;color:var(--we-report-fg, #1d1d1f)}.pp__title{margin:0;font-size:15px;font-weight:600;letter-spacing:-.01em}.pp__subtitle{margin-top:2px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__subtitle code{font-size:11px}.pp__section{display:flex;flex-direction:column;gap:10px;padding:14px 0;border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.pp__section:last-of-type{border-bottom:0}.pp__section h3{margin:0;font-size:12px;font-weight:600;color:var(--we-report-fg, #1d1d1f)}.pp__row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pp__row>span:first-child{flex:1;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__row input[type=number]{width:76px;text-align:right;font-variant-numeric:tabular-nums}.pp__row select{width:auto;max-width:60%}.pp__row--stack{flex-direction:column;align-items:stretch;gap:4px}.pp__row--stack>span:first-child{font-size:11.5px}.pp__row--stack input[type=number]{width:100%;text-align:left}.pp__row--stack select{max-width:none;width:100%}.pp__grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pp__grid--4{grid-template-columns:repeat(4,1fr)}.pp__grid--4 label{display:flex;flex-direction:column;gap:3px;text-align:center}.pp__grid--4 label small{font-size:10.5px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__grid--4 label input{text-align:center!important}input:not([type=checkbox]):not([type=color]):not([type=file]),select,textarea{width:100%;box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;transition:box-shadow .15s ease}input:not([type=checkbox]):not([type=color]):not([type=file]):focus,select:focus,textarea:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff);width:14px;height:14px}input[type=color]{width:26px;height:26px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14))}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:0;border-radius:50%}input[type=color]::-moz-color-swatch{border:0;border-radius:50%}.pp__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace!important;font-size:12px!important}.pp__label{font-weight:500}.pp__hint{display:block;margin-top:2px;font-size:11px;line-height:1.35;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__check{display:flex;align-items:flex-start;gap:8px;cursor:pointer}.pp__check input{margin-top:2px}.pp__segmented{display:flex;padding:2px;gap:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.pp__segmented button{flex:1;border:0;border-radius:6px;padding:4px;font:inherit;font-size:12px;background:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.pp__segmented button.pp__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.pp__segmented button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.pp__tools{display:flex;gap:2px;padding:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.pp__tools button{flex:1;display:inline-flex;align-items:center;justify-content:center;height:26px;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer}.pp__tools button :is(svg){width:16px;height:16px}.pp__tools button:hover:not(:disabled){background:var(--we-report-segment-on-bg, #fff);box-shadow:0 1px 2px #0000001a}.pp__tools button:disabled{opacity:.3;cursor:default}.pp__tools button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.pp__buttons{display:grid;grid-template-columns:1fr 1fr;gap:4px}.pp__buttons button{border:0;border-radius:var(--we-report-control-radius, 7px);padding:5px 6px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12));color:inherit;font:inherit;font-size:12px;cursor:pointer}.pp__buttons button:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .2))}.pp__buttons button:disabled{opacity:.4;cursor:default}.pp__rule{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:10px;background:var(--we-report-workspace-bg, #f2f2f7)}.pp__rule-head,.pp__rule-then{display:flex;align-items:center;gap:8px}.pp__rule-head>span,.pp__rule-then>span{flex:1;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__rule-when{display:grid;grid-template-columns:1fr 54px 1fr;gap:4px}.pp__chip{border:0;border-radius:999px;padding:3px 10px;font:inherit;font-size:11.5px;font-weight:700;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12));color:inherit;cursor:pointer}.pp__chip.pp__on{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.pp__color{display:inline-flex;align-items:center;gap:8px}.pp__link{border:0;background:none;padding:0;font:inherit;color:var(--we-report-accent, #007aff);cursor:pointer}.pp__file{position:relative;display:block;padding:10px;border-radius:10px;border:1px dashed var(--we-report-accent, #007aff);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font-weight:500;text-align:center;cursor:pointer}.pp__file input{position:absolute;inset:0;opacity:0;cursor:pointer}.pp__danger{margin-top:14px;width:100%;padding:7px;border:0;border-radius:8px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400);font:inherit;font-weight:500;cursor:pointer}@media (prefers-reduced-motion: reduce){input,select,textarea,.pp__segmented button{transition:none}}.pp__warn{color:var(--we-report-warning-fg, #9a4400)}\n"], dependencies: [{ kind: "component", type: BindableInputComponent, selector: "we-report-bindable-input", inputs: ["value", "fields", "strings", "multiline", "label"], outputs: ["valueChange"] }, { kind: "pipe", type: WeReportIconPipe, name: "weReportIcon" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5653
6921
|
}
|
|
5654
6922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PropertyPanelComponent, decorators: [{
|
|
5655
6923
|
type: Component,
|
|
5656
|
-
args: [{ selector: 'we-report-property-panel', standalone: true, imports: [BindableInputComponent, WeReportIconPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let s = strings();\n<h2 class=\"pp__title\">{{ s.properties }}</h2>\n\n@let selectedControl = control();\n@let selectedBand = band();\n@if (selectedControl) {\n <div class=\"pp__subtitle\">{{ s.controlNames[selectedControl.type] }} \u00B7 <code>{{ selectedControl.id }}</code></div>\n} @else if (controls().length > 1) {\n <div class=\"pp__subtitle\">{{ s.itemsSelected.replace('{0}', '' + controls().length) }}</div>\n} @else if (selectedBand) {\n <div class=\"pp__subtitle\">{{ s.bandNames[selectedBand.kind] }}</div>\n}\n\n<!-- \u2500\u2500 Report (nothing selected) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!controls().length && !band()) {\n <section class=\"pp__section\">\n <h3>{{ s.groupPage }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.reportName }}</span>\n <input [value]=\"report().name\" (input)=\"setReport('name', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.paper }}</span>\n <select (change)=\"setPaper($any($event.target).value)\">\n @for (p of papers; track p.id) {\n <option [value]=\"p.id\" [selected]=\"p.id === report().page.paper\">{{ p.id }} ({{ p.width }} \u00D7 {{ p.height ?? '\u221E' }} mm)</option>\n }\n <option value=\"custom\" [selected]=\"report().page.paper === 'custom'\">{{ s.customSize }}</option>\n </select>\n </label>\n @if (report().page.paper === 'custom') {\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.width }} (mm)</span>\n <input type=\"number\" min=\"10\" step=\"1\" [value]=\"num(report().page.width)\" (input)=\"setPage('width', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.height }} (mm)</span>\n <input type=\"number\" min=\"10\" step=\"1\" [value]=\"num(report().page.height)\" (input)=\"setPage('height', $any($event.target).value)\" />\n </label>\n </div>\n }\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.orientation }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"report().page.orientation === 'portrait'\" (click)=\"setPage('orientation', 'portrait')\">{{ s.portrait }}</button>\n <button type=\"button\" [class.pp__on]=\"report().page.orientation === 'landscape'\" (click)=\"setPage('orientation', 'landscape')\">{{ s.landscape }}</button>\n </div>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.margins }} (mm)</span>\n <div class=\"pp__grid pp__grid--4\">\n <label><small>{{ s.marginTop }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.top)\" (input)=\"setMargin('top', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginRight }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.right)\" (input)=\"setMargin('right', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginBottom }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.bottom)\" (input)=\"setMargin('bottom', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginLeft }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.left)\" (input)=\"setMargin('left', $any($event.target).value)\" /></label>\n </div>\n </div>\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.reportLocale }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.reportLocaleRegion }}</span>\n <select (change)=\"setCulture('locale', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!report().locale\">{{ s.reportLocaleDefault }}</option>\n @for (l of cultures; track l.id) {\n <option [value]=\"l.id\" [selected]=\"report().locale === l.id\">{{ l.name }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.reportCurrency }}</span>\n <select (change)=\"setCulture('currency', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!report().currency\">{{ s.reportLocaleDefault }}</option>\n @for (c of currencies; track c) {\n <option [value]=\"c\" [selected]=\"report().currency === c\">{{ c }}</option>\n }\n </select>\n </label>\n <small class=\"pp__hint\">{{ s.reportLocaleHint }}</small>\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.watermark }}</h3>\n @let wm = report().watermark;\n <we-report-bindable-input [value]=\"wm?.text ?? ''\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setWatermark({ text: $event })\" />\n <small class=\"pp__hint\">{{ s.watermarkHint }}</small>\n @if (wm) {\n <div class=\"pp__row\">\n <span>{{ s.color }}</span>\n <input type=\"color\" [value]=\"wm.color ?? '#e3e6ea'\" (input)=\"setWatermark({ color: $any($event.target).value })\" [attr.aria-label]=\"s.color\" />\n </div>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.watermarkAngle\">\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"(wm.angle ?? 45) === 45\" [class.pp__on]=\"(wm.angle ?? 45) === 45\" (click)=\"setWatermark({ angle: undefined })\">\u2197 45\u00B0</button>\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"wm.angle === 0\" [class.pp__on]=\"wm.angle === 0\" (click)=\"setWatermark({ angle: 0 })\">\u2192 0\u00B0</button>\n </div>\n }\n </section>\n @if (advanced() && report().dataMember) {\n <section class=\"pp__section\">\n <h3>{{ s.groupData }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.dataRows }}</span>\n <input [value]=\"report().dataMember?.path ?? ''\" (input)=\"setRowsPath($any($event.target).value)\" spellcheck=\"false\" />\n <small class=\"pp__hint\">{{ s.dataRowsHint }}</small>\n </label>\n </section>\n }\n}\n\n<!-- \u2500\u2500 Band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (band(); as b) {\n <section class=\"pp__section\">\n <h3>{{ s.groupLayout }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.bandHeight }} (mm)</span>\n <input type=\"number\" min=\"2\" step=\"1\" [value]=\"num(b.height)\" (input)=\"setBand('height', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row\">\n <span>{{ s.backgroundColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"b.backgroundColor ?? '#ffffff'\" (input)=\"setBand('backgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setBand('backgroundColor', '')\">{{ s.noColor }}</button>\n </span>\n </label>\n </section>\n @if (b.kind === 'subDetail') {\n <section class=\"pp__section\">\n <h3>{{ s.innerList }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.innerListOf }}</span>\n <select (change)=\"setBand('rowsPath', $any($event.target).value)\">\n @for (l of lists(); track l) {\n <option [value]=\"l\" [selected]=\"b.rowsPath === l\">{{ l }}</option>\n }\n @if (b.rowsPath && !lists().includes(b.rowsPath)) {\n <option [value]=\"b.rowsPath\" selected>{{ b.rowsPath }}</option>\n }\n </select>\n </label>\n <small class=\"pp__hint\">{{ s.innerListHint }}</small>\n </section>\n }\n @if (b.kind === 'detail') {\n <section class=\"pp__section\">\n <h3>{{ s.sortRows }}</h3>\n @let key = b.sortBy?.[0];\n <div class=\"pp__grid\">\n <select (change)=\"setSort($any($event.target).value, !!key?.descending)\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"\" [selected]=\"!key\">{{ s.dataOrder }}</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === key?.expression\">{{ f.label }}</option>\n }\n @if (key && !fieldExpressions().has(key.expression)) {\n <option [value]=\"key.expression\" selected>{{ key.expression }}</option>\n }\n </select>\n <select [disabled]=\"!key\" (change)=\"setSort(key?.expression ?? '', $any($event.target).value === 'desc')\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"asc\" [selected]=\"!key?.descending\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"!!key?.descending\">{{ s.sortDesc }}</option>\n </select>\n </div>\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.labelSheet }}</h3>\n <select (change)=\"applyLabelSheet($any($event.target).value); $any($event.target).value = ''\" [attr.aria-label]=\"s.labelSheet\">\n <option value=\"\" selected>{{ s.labelSheetChoose }}</option>\n @for (l of labelSheets; track l.id) {\n <option [value]=\"l.id\">{{ labelSheetName(l) }}</option>\n }\n </select>\n <small class=\"pp__hint\">{{ s.labelSheetHint }}</small>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnsCount }}</span>\n <input type=\"number\" min=\"1\" max=\"12\" step=\"1\" [value]=\"b.columns?.count ?? 1\" (input)=\"setColumns('count', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnGap }}</span>\n <input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(b.columns?.gap ?? 0)\" (input)=\"setColumns('gap', $any($event.target).value)\" />\n </label>\n </div>\n <small class=\"pp__hint\">{{ s.columnsHint }}</small>\n </section>\n }\n @if (b.kind === 'groupHeader') {\n <section class=\"pp__section\">\n <h3>{{ s.groupBy }}</h3>\n @if (fields().length) {\n <select (change)=\"setBand('groupBy', $any($event.target).value)\">\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === b.groupBy?.expression\">{{ f.label }}</option>\n }\n </select>\n }\n <input class=\"pp__mono\" [value]=\"b.groupBy?.expression ?? ''\" (input)=\"setBand('groupBy', $any($event.target).value)\" spellcheck=\"false\" />\n <label class=\"pp__row\">\n <span>{{ s.sortGroups }}</span>\n <select (change)=\"setBand('sort', $any($event.target).value)\">\n <option value=\"asc\" [selected]=\"!b.sort || b.sort === 'asc'\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"b.sort === 'desc'\">{{ s.sortDesc }}</option>\n <option value=\"none\" [selected]=\"b.sort === 'none'\">{{ s.sortNone }}</option>\n </select>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.keepTogether\" (change)=\"toggleBand('keepTogether', $any($event.target).checked)\" />\n <span>{{ s.keepTogether }}<small class=\"pp__hint\">{{ s.keepTogetherHint }}</small></span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.repeatOnEveryPage\" (change)=\"toggleBand('repeatOnEveryPage', $any($event.target).checked)\" />\n <span>{{ s.repeatOnEveryPage }}</span>\n </label>\n </section>\n }\n @if (advanced() && b.kind !== 'pageHeader' && b.kind !== 'pageFooter') {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.pageBreakBefore\" (change)=\"toggleBand('pageBreakBefore', $any($event.target).checked)\" />\n <span>{{ s.pageBreakBefore }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.pageBreakAfter\" (change)=\"toggleBand('pageBreakAfter', $any($event.target).checked)\" />\n <span>{{ s.pageBreakAfter }}</span>\n </label>\n </section>\n }\n @if (b.kind !== 'detail') {\n <button type=\"button\" class=\"pp__danger\" (click)=\"removeBand()\">{{ s.removeBand }}</button>\n }\n}\n\n<!-- \u2500\u2500 Control(s) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (controls().length) {\n @let n = controls().length;\n <section class=\"pp__section\">\n <h3>{{ s.arrange }}</h3>\n <div class=\"pp__tools\" role=\"toolbar\" [attr.aria-label]=\"s.arrange\">\n @for (a of alignActions; track a.edge) {\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.align(a.edge)\" [title]=\"s[a.label]\" [attr.aria-label]=\"s[a.label]\" [innerHTML]=\"a.icon | weReportIcon\"></button>\n }\n </div>\n <div class=\"pp__tools\" role=\"toolbar\" [attr.aria-label]=\"s.arrange\">\n <button type=\"button\" [disabled]=\"n < 3\" (click)=\"state.distribute('h')\" [title]=\"s.distributeH\" [attr.aria-label]=\"s.distributeH\" [innerHTML]=\"'distributeH' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 3\" (click)=\"state.distribute('v')\" [title]=\"s.distributeV\" [attr.aria-label]=\"s.distributeV\" [innerHTML]=\"'distributeV' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.sameSize('width')\" [title]=\"s.sameWidth\" [attr.aria-label]=\"s.sameWidth\" [innerHTML]=\"'sameWidth' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.sameSize('height')\" [title]=\"s.sameHeight\" [attr.aria-label]=\"s.sameHeight\" [innerHTML]=\"'sameHeight' | weReportIcon\"></button>\n <button type=\"button\" (click)=\"state.arrange('front')\" [title]=\"s.bringToFront\" [attr.aria-label]=\"s.bringToFront\" [innerHTML]=\"'bringToFront' | weReportIcon\"></button>\n <button type=\"button\" (click)=\"state.arrange('back')\" [title]=\"s.sendToBack\" [attr.aria-label]=\"s.sendToBack\" [innerHTML]=\"'sendToBack' | weReportIcon\"></button>\n </div>\n @if (n < 2) {\n <small class=\"pp__hint\">{{ s.arrangeHint }}</small>\n }\n </section>\n @if (control(); as c) {\n <!-- Content first: it is what people change most. -->\n @switch (c.type) {\n @case ('text') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [multiline]=\"true\" (valueChange)=\"setBindable('text', $event)\" />\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ $any(s)[f.key] }}</option>\n }\n @if (formatIsCustom()) {\n <option [value]=\"c.format\" selected>{{ c.format }}</option>\n }\n </select>\n </label>\n @if (advanced()) {\n <input class=\"pp__mono\" [value]=\"c.format ?? ''\" (input)=\"set('format', $any($event.target).value)\" spellcheck=\"false\" placeholder=\"n2 \u00B7 c2 \u00B7 dd.MM.yyyy\" />\n }\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.canGrow\" (change)=\"set('canGrow', $any($event.target).checked || undefined)\" />\n <span>{{ s.canGrow }}<small class=\"pp__hint\">{{ s.canGrowHint }}</small></span>\n </label>\n </section>\n }\n @case ('barcode') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.symbology }}</span>\n <select (change)=\"set('symbology', $any($event.target).value)\">\n @for (sym of symbologies; track sym) {\n <option [value]=\"sym\" [selected]=\"sym === c.symbology\">{{ sym }}</option>\n }\n @if (!symbologies.includes(c.symbology)) {\n <option [value]=\"c.symbology\" selected>{{ c.symbology }}</option>\n }\n </select>\n </label>\n <span class=\"pp__label\">{{ s.barcodeValue }}</span>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setBindable('value', $event)\" />\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.showText\" (change)=\"set('showText', $any($event.target).checked)\" />\n <span>{{ s.showText }}</span>\n </label>\n </section>\n }\n @case ('image') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__file\">\n <input type=\"file\" accept=\"image/png,image/jpeg\" (change)=\"chooseImage($event)\" />\n <span>{{ s.chooseImage }}</span>\n </label>\n <span class=\"pp__label\">{{ s.fromData }}</span>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setBindable('source', $event)\" />\n <label class=\"pp__row\">\n <span>{{ s.fit }}</span>\n <select (change)=\"set('fit', $any($event.target).value)\">\n <option value=\"contain\" [selected]=\"c.fit === 'contain'\">{{ s.fitContain }}</option>\n <option value=\"cover\" [selected]=\"c.fit === 'cover'\">{{ s.fitCover }}</option>\n <option value=\"stretch\" [selected]=\"c.fit === 'stretch'\">{{ s.fitStretch }}</option>\n <option value=\"none\" [selected]=\"c.fit === 'none'\">{{ s.fitNone }}</option>\n </select>\n </label>\n </section>\n }\n @case ('line') {\n <section class=\"pp__section\">\n <h3>{{ s.groupAppearance }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.lineDirection }}</span>\n <select (change)=\"set('direction', $any($event.target).value)\">\n <option value=\"horizontal\" [selected]=\"c.direction === 'horizontal'\">{{ s.horizontal }}</option>\n <option value=\"vertical\" [selected]=\"c.direction === 'vertical'\">{{ s.vertical }}</option>\n <option value=\"diagonalDown\" [selected]=\"c.direction === 'diagonalDown'\">{{ s.diagonalDown }}</option>\n <option value=\"diagonalUp\" [selected]=\"c.direction === 'diagonalUp'\">{{ s.diagonalUp }}</option>\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.lineWidth }} (mm)</span>\n <input type=\"number\" min=\"0.05\" step=\"0.05\" [value]=\"num(c.lineWidth)\" (input)=\"set('lineWidth', asNumber($any($event.target).value, 0.05))\" />\n </label>\n <label class=\"pp__row\">\n <span>{{ s.color }}</span>\n <input type=\"color\" [value]=\"c.color ?? style()?.color ?? '#000000'\" (input)=\"set('color', $any($event.target).value)\" />\n </label>\n </section>\n }\n @case ('shape') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.shape }}</span>\n <select (change)=\"set('shape', $any($event.target).value)\">\n <option value=\"rectangle\" [selected]=\"c.shape === 'rectangle'\">{{ s.rectangle }}</option>\n <option value=\"roundedRectangle\" [selected]=\"c.shape === 'roundedRectangle'\">{{ s.roundedRectangle }}</option>\n <option value=\"ellipse\" [selected]=\"c.shape === 'ellipse'\">{{ s.ellipse }}</option>\n </select>\n </label>\n @if (c.shape === 'roundedRectangle') {\n <label class=\"pp__row\">\n <span>{{ s.cornerRadius }} (mm)</span>\n <input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.cornerRadius ?? 2)\" (input)=\"set('cornerRadius', asNumber($any($event.target).value, 0))\" />\n </label>\n }\n </section>\n }\n @case ('pageInfo') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.pageInfo }}</span>\n <select (change)=\"set('info', $any($event.target).value)\">\n <option value=\"pageNumber\" [selected]=\"c.info === 'pageNumber'\">{{ s.pageNumber }}</option>\n <option value=\"pageCount\" [selected]=\"c.info === 'pageCount'\">{{ s.pageTotal }}</option>\n <option value=\"pageNofM\" [selected]=\"c.info === 'pageNofM'\">{{ s.pageNofM }}</option>\n <option value=\"printDate\" [selected]=\"c.info === 'printDate'\">{{ s.printDate }}</option>\n </select>\n </label>\n @if (c.info === 'pageNofM' || c.info === 'printDate') {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.format }}</span>\n <input class=\"pp__mono\" [value]=\"c.format ?? ''\" (input)=\"set('format', $any($event.target).value)\" [placeholder]=\"c.info === 'pageNofM' ? '{0} / {1}' : 'dd.MM.yyyy'\" spellcheck=\"false\" />\n </label>\n }\n </section>\n }\n @case ('table') {\n @let cellInfo = selectedCell();\n <section class=\"pp__section\">\n <h3>{{ s.tableSection }}</h3>\n <small class=\"pp__hint\">{{ s.tableHint }}</small>\n <div class=\"pp__buttons\">\n <button type=\"button\" (click)=\"tableOp('insertRow')\">+ {{ s.addRow }}</button>\n <button type=\"button\" (click)=\"tableOp('insertColumn')\">+ {{ s.addColumn }}</button>\n <button type=\"button\" [disabled]=\"c.rows.length < 2\" (click)=\"tableOp('deleteRow')\">\u2212 {{ s.deleteRow }}</button>\n <button type=\"button\" [disabled]=\"c.columns.length < 2\" (click)=\"tableOp('deleteColumn')\">\u2212 {{ s.deleteColumn }}</button>\n <button type=\"button\" [disabled]=\"!cellInfo || cellInfo.index >= c.rows[cellInfo.row].cells.length - 1\" (click)=\"tableOp('mergeRight')\">{{ s.mergeCells }}</button>\n <button type=\"button\" [disabled]=\"!cellInfo || (cellInfo.cell.colSpan ?? 1) < 2\" (click)=\"tableOp('splitCell')\">{{ s.splitCell }}</button>\n </div>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.canGrow\" (change)=\"set('canGrow', $any($event.target).checked || undefined)\" />\n <span>{{ s.canGrow }}<small class=\"pp__hint\">{{ s.canGrowHint }}</small></span>\n </label>\n </section>\n @if (cellInfo) {\n <section class=\"pp__section\">\n <h3>{{ s.selectedCell }}</h3>\n <we-report-bindable-input [value]=\"cellInfo.cell.text\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setCell({ text: $event })\" />\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"setCell({ format: $any($event.target).value || undefined })\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(cellInfo.cell.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.alignment\">\n @for (a of ['left', 'center', 'right']; track a) {\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"cellAlign(cellInfo.cell) === a\" [class.pp__on]=\"cellAlign(cellInfo.cell) === a\" (click)=\"setCellStyle('textAlign', $any(a))\">\n {{ a === 'left' ? s.alignLeft : a === 'center' ? s.alignCenter : s.alignRight }}\n </button>\n }\n </div>\n <div class=\"pp__rule-then\">\n <button type=\"button\" class=\"pp__chip\" [class.pp__on]=\"cellInfo.cell.styleOverrides?.bold\" (click)=\"setCellStyle('bold', cellInfo.cell.styleOverrides?.bold ? undefined : true)\">{{ s.bold }}</button>\n <span>{{ s.backgroundColor }}</span>\n <input type=\"color\" [value]=\"cellInfo.cell.styleOverrides?.backgroundColor ?? '#ffffff'\" (input)=\"setCellStyle('backgroundColor', $any($event.target).value)\" [attr.aria-label]=\"s.backgroundColor\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setCellStyle('backgroundColor', undefined)\">{{ s.noColor }}</button>\n </div>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnWidth }}</span>\n <input type=\"number\" min=\"2\" step=\"1\" [value]=\"num(c.columns[cellInfo.column])\" (input)=\"setColumnWidth(cellInfo.column, $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.rowHeight }}</span>\n <input type=\"number\" min=\"2\" step=\"0.5\" [value]=\"num(c.rows[cellInfo.row].height)\" (input)=\"setRowHeight(cellInfo.row, $any($event.target).value)\" />\n </label>\n </div>\n </section>\n }\n }\n @case ('chart') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <small class=\"pp__hint\">{{ s.chartHint }}</small>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.chartType\">\n @for (t of chartTypes; track t.type) {\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"c.chartType === t.type\" [class.pp__on]=\"c.chartType === t.type\" (click)=\"set('chartType', t.type)\">{{ s[t.label] }}</button>\n }\n </div>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartCategory }}</span>\n <select (change)=\"setExpression('category', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c.category.expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c.category.expression\">{{ f.label }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartValue }}</span>\n <select (change)=\"setExpression('value', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c.value.expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c.value.expression\">{{ f.label }}</option>\n }\n </select>\n </label>\n @if (advanced()) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.expression }}</span>\n <input class=\"pp__mono\" [value]=\"c.category.expression\" (input)=\"setExpression('category', $any($event.target).value)\" spellcheck=\"false\" />\n <input class=\"pp__mono\" [value]=\"c.value.expression\" (input)=\"setExpression('value', $any($event.target).value)\" spellcheck=\"false\" />\n </label>\n }\n <label class=\"pp__row\">\n <span>{{ s.chartAggregate }}</span>\n <select (change)=\"set('aggregate', $any($event.target).value)\">\n @for (a of aggregates; track a.value) {\n <option [value]=\"a.value\" [selected]=\"(c.aggregate ?? 'sum') === a.value\">{{ s[a.label] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartTitle }}</span>\n <input [value]=\"c.title ?? ''\" (input)=\"set('title', $any($event.target).value)\" />\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.showValues\" (change)=\"set('showValues', $any($event.target).checked || undefined)\" />\n <span>{{ s.showValues }}</span>\n </label>\n @if (c.chartType === 'pie' || c.chartType === 'doughnut') {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.showLegend !== false\" (change)=\"set('showLegend', $any($event.target).checked ? undefined : false)\" />\n <span>{{ s.showLegend }}</span>\n </label>\n }\n </section>\n }\n @case ('checkbox') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <span class=\"pp__label\">{{ s.checked }}</span>\n <we-report-bindable-input [value]=\"checkedValue(c)\" [fields]=\"fields()\" [strings]=\"s\" (valueChange)=\"setBindable('checked', $event)\" />\n </section>\n }\n }\n\n <section class=\"pp__section\">\n <h3>{{ s.conditionalFormatting }}</h3>\n @for (rule of c.formatting ?? []; track $index; let i = $index) {\n @let cond = condition(rule.when);\n <div class=\"pp__rule\">\n <div class=\"pp__rule-head\">\n <span>{{ s.ruleWhen }}</span>\n <button type=\"button\" class=\"pp__link\" (click)=\"removeRule(i)\" [title]=\"s.removeRule\" [attr.aria-label]=\"s.removeRule\">\u2715</button>\n </div>\n @if (cond) {\n <div class=\"pp__rule-when\">\n <select (change)=\"setCondition(i, cond, 'field', $any($event.target).value)\" [attr.aria-label]=\"s.ruleWhen\">\n <option value=\"\" [selected]=\"!cond.field\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === cond.field\">{{ f.label }}</option>\n }\n </select>\n <select (change)=\"setCondition(i, cond, 'op', $any($event.target).value)\">\n @for (o of conditionOps; track o.op) {\n <option [value]=\"o.op\" [selected]=\"o.op === cond.op\">{{ o.op === 'contains' ? s.opContains : o.label }}</option>\n }\n </select>\n <input [value]=\"cond.value\" (input)=\"setCondition(i, cond, 'value', $any($event.target).value)\" [placeholder]=\"s.ruleValue\" [attr.aria-label]=\"s.ruleValue\" />\n </div>\n }\n @if (advanced() || !cond) {\n <input class=\"pp__mono\" [value]=\"rule.when\" (input)=\"setRule(i, { when: $any($event.target).value })\" spellcheck=\"false\" />\n }\n <div class=\"pp__rule-then\">\n <span>{{ s.ruleThen }}</span>\n <input type=\"color\" [value]=\"rule.style.color ?? '#000000'\" (input)=\"setRuleStyle(i, 'color', $any($event.target).value)\" [title]=\"s.textColor\" [attr.aria-label]=\"s.textColor\" />\n <input type=\"color\" [value]=\"rule.style.backgroundColor ?? '#ffffff'\" (input)=\"setRuleStyle(i, 'backgroundColor', $any($event.target).value)\" [title]=\"s.backgroundColor\" [attr.aria-label]=\"s.backgroundColor\" />\n <button type=\"button\" class=\"pp__chip\" [class.pp__on]=\"rule.style.bold\" (click)=\"setRuleStyle(i, 'bold', rule.style.bold ? undefined : true)\">{{ s.bold }}</button>\n </div>\n </div>\n } @empty {\n <small class=\"pp__hint\">{{ s.conditionalHint }}</small>\n }\n <button type=\"button\" class=\"pp__link\" (click)=\"addRule()\">+ {{ s.addRule }}</button>\n </section>\n\n <section class=\"pp__section\">\n <h3>{{ s.groupLayout }}</h3>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\"><span>{{ s.left }}</span><input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.x)\" (input)=\"setGeometry('x', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.top }}</span><input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.y)\" (input)=\"setGeometry('y', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.width }}</span><input type=\"number\" min=\"0.5\" step=\"0.5\" [value]=\"num(c.width)\" (input)=\"setGeometry('width', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.height }}</span><input type=\"number\" min=\"0.5\" step=\"0.5\" [value]=\"num(c.height)\" (input)=\"setGeometry('height', $any($event.target).value)\" /></label>\n </div>\n </section>\n }\n\n <!-- Appearance applies to every selected control at once. -->\n @if (style(); as st) {\n @if (hasText()) {\n <section class=\"pp__section\">\n <h3>{{ s.groupAppearance }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.font }}</span>\n <select (change)=\"setStyle('fontFamily', $any($event.target).value)\">\n @for (f of fontFamilies(); track f) {\n <option [value]=\"f\" [selected]=\"f === st.fontFamily\">{{ f }}</option>\n }\n @if (!fontFamilies().includes(st.fontFamily)) {\n <option [value]=\"st.fontFamily\" selected>{{ st.fontFamily }}</option>\n }\n </select>\n </label>\n <div class=\"pp__row\">\n <span>{{ s.fontSize }} (pt)</span>\n <input type=\"number\" min=\"4\" max=\"200\" step=\"0.5\" [value]=\"num(st.fontSize)\" (input)=\"setStyle('fontSize', asNumber($any($event.target).value, 4))\" />\n </div>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.bold\" (click)=\"setStyle('bold', !st.bold)\" [attr.aria-pressed]=\"st.bold\"><b>{{ s.bold }}</b></button>\n <button type=\"button\" [class.pp__on]=\"st.italic\" (click)=\"setStyle('italic', !st.italic)\" [attr.aria-pressed]=\"st.italic\"><i>{{ s.italic }}</i></button>\n <button type=\"button\" [class.pp__on]=\"st.underline\" (click)=\"setStyle('underline', !st.underline)\" [attr.aria-pressed]=\"st.underline\"><u>{{ s.underline }}</u></button>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.alignment }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'left'\" (click)=\"setStyle('textAlign', 'left')\">{{ s.alignLeft }}</button>\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'center'\" (click)=\"setStyle('textAlign', 'center')\">{{ s.alignCenter }}</button>\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'right'\" (click)=\"setStyle('textAlign', 'right')\">{{ s.alignRight }}</button>\n </div>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.verticalAlignment }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'top'\" (click)=\"setStyle('verticalAlign', 'top')\">{{ s.alignTop }}</button>\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'middle'\" (click)=\"setStyle('verticalAlign', 'middle')\">{{ s.alignMiddle }}</button>\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'bottom'\" (click)=\"setStyle('verticalAlign', 'bottom')\">{{ s.alignBottom }}</button>\n </div>\n </div>\n <label class=\"pp__row\">\n <span>{{ s.textColor }}</span>\n <input type=\"color\" [value]=\"st.color\" (input)=\"setStyle('color', $any($event.target).value)\" />\n </label>\n </section>\n }\n @if (control()?.type !== 'line') {\n <section class=\"pp__section\">\n @if (!hasText()) {\n <h3>{{ s.groupAppearance }}</h3>\n }\n <label class=\"pp__row\">\n <span>{{ s.backgroundColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"st.backgroundColor ?? '#ffffff'\" (input)=\"setStyle('backgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setStyle('backgroundColor', undefined)\">{{ s.noColor }}</button>\n </span>\n </label>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.border }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.top\" (click)=\"toggleBorderSide('top', !st.border?.sides?.top)\">{{ s.marginTop }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.right\" (click)=\"toggleBorderSide('right', !st.border?.sides?.right)\">{{ s.marginRight }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.bottom\" (click)=\"toggleBorderSide('bottom', !st.border?.sides?.bottom)\">{{ s.marginBottom }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.left\" (click)=\"toggleBorderSide('left', !st.border?.sides?.left)\">{{ s.marginLeft }}</button>\n </div>\n </div>\n @if (st.border) {\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.borderWidth }}</span>\n <input type=\"number\" min=\"0.05\" step=\"0.05\" [value]=\"num(st.border.width)\" (input)=\"setBorder({ width: asNumber($any($event.target).value, 0.05) })\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.borderColor }}</span>\n <input type=\"color\" [value]=\"st.border.color\" (input)=\"setBorder({ color: $any($event.target).value })\" />\n </label>\n </div>\n }\n @if (advanced() && hasText()) {\n <label class=\"pp__row\">\n <span>{{ s.padding }} (mm)</span>\n <input type=\"number\" min=\"0\" step=\"0.1\" [value]=\"num(st.padding)\" (input)=\"setStyle('padding', asNumber($any($event.target).value, 0))\" />\n </label>\n }\n </section>\n }\n }\n\n @if (advanced() && control(); as c) {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <span class=\"pp__label\">{{ s.visibleWhen }}</span>\n <input class=\"pp__mono\" [value]=\"$any(visibleValue(c)).expression ?? ''\" (input)=\"setVisible({ expression: $any($event.target).value })\" spellcheck=\"false\" placeholder=\"[Total] > 0\" />\n <small class=\"pp__hint\">{{ s.visibleWhenHint }}</small>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.stretch\" (change)=\"set('stretch', $any($event.target).checked || undefined)\" />\n <span>{{ s.stretch }}<small class=\"pp__hint\">{{ s.stretchHint }}</small></span>\n </label>\n </section>\n }\n}\n", styles: [":host{display:block;padding:14px 14px 32px;font-size:12.5px;color:var(--we-report-fg, #1d1d1f)}.pp__title{margin:0;font-size:15px;font-weight:600;letter-spacing:-.01em}.pp__subtitle{margin-top:2px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__subtitle code{font-size:11px}.pp__section{display:flex;flex-direction:column;gap:10px;padding:14px 0;border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.pp__section:last-of-type{border-bottom:0}.pp__section h3{margin:0;font-size:12px;font-weight:600;color:var(--we-report-fg, #1d1d1f)}.pp__row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pp__row>span:first-child{flex:1;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__row input[type=number]{width:76px;text-align:right;font-variant-numeric:tabular-nums}.pp__row select{width:auto;max-width:60%}.pp__row--stack{flex-direction:column;align-items:stretch;gap:4px}.pp__row--stack>span:first-child{font-size:11.5px}.pp__row--stack input[type=number]{width:100%;text-align:left}.pp__row--stack select{max-width:none;width:100%}.pp__grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pp__grid--4{grid-template-columns:repeat(4,1fr)}.pp__grid--4 label{display:flex;flex-direction:column;gap:3px;text-align:center}.pp__grid--4 label small{font-size:10.5px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__grid--4 label input{text-align:center!important}input:not([type=checkbox]):not([type=color]):not([type=file]),select,textarea{width:100%;box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;transition:box-shadow .15s ease}input:not([type=checkbox]):not([type=color]):not([type=file]):focus,select:focus,textarea:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff);width:14px;height:14px}input[type=color]{width:26px;height:26px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14))}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:0;border-radius:50%}input[type=color]::-moz-color-swatch{border:0;border-radius:50%}.pp__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace!important;font-size:12px!important}.pp__label{font-weight:500}.pp__hint{display:block;margin-top:2px;font-size:11px;line-height:1.35;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__check{display:flex;align-items:flex-start;gap:8px;cursor:pointer}.pp__check input{margin-top:2px}.pp__segmented{display:flex;padding:2px;gap:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.pp__segmented button{flex:1;border:0;border-radius:6px;padding:4px;font:inherit;font-size:12px;background:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.pp__segmented button.pp__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.pp__segmented button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.pp__tools{display:flex;gap:2px;padding:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.pp__tools button{flex:1;display:inline-flex;align-items:center;justify-content:center;height:26px;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer}.pp__tools button :is(svg){width:16px;height:16px}.pp__tools button:hover:not(:disabled){background:var(--we-report-segment-on-bg, #fff);box-shadow:0 1px 2px #0000001a}.pp__tools button:disabled{opacity:.3;cursor:default}.pp__tools button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.pp__buttons{display:grid;grid-template-columns:1fr 1fr;gap:4px}.pp__buttons button{border:0;border-radius:var(--we-report-control-radius, 7px);padding:5px 6px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12));color:inherit;font:inherit;font-size:12px;cursor:pointer}.pp__buttons button:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .2))}.pp__buttons button:disabled{opacity:.4;cursor:default}.pp__rule{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:10px;background:var(--we-report-workspace-bg, #f2f2f7)}.pp__rule-head,.pp__rule-then{display:flex;align-items:center;gap:8px}.pp__rule-head>span,.pp__rule-then>span{flex:1;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.pp__rule-when{display:grid;grid-template-columns:1fr 54px 1fr;gap:4px}.pp__chip{border:0;border-radius:999px;padding:3px 10px;font:inherit;font-size:11.5px;font-weight:700;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12));color:inherit;cursor:pointer}.pp__chip.pp__on{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.pp__color{display:inline-flex;align-items:center;gap:8px}.pp__link{border:0;background:none;padding:0;font:inherit;color:var(--we-report-accent, #007aff);cursor:pointer}.pp__file{position:relative;display:block;padding:10px;border-radius:10px;border:1px dashed var(--we-report-accent, #007aff);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font-weight:500;text-align:center;cursor:pointer}.pp__file input{position:absolute;inset:0;opacity:0;cursor:pointer}.pp__danger{margin-top:14px;width:100%;padding:7px;border:0;border-radius:8px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #b25000);font:inherit;font-weight:500;cursor:pointer}@media (prefers-reduced-motion: reduce){input,select,textarea,.pp__segmented button{transition:none}}\n"] }]
|
|
6924
|
+
args: [{ selector: 'we-report-property-panel', standalone: true, imports: [BindableInputComponent, WeReportIconPipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let s = strings();\n<h2 class=\"pp__title\">{{ s.properties }}</h2>\n\n@let selectedControl = control();\n@let selectedBand = band();\n@if (selectedControl) {\n <div class=\"pp__subtitle\">{{ s.controlNames[selectedControl.type] }} \u00B7 <code>{{ selectedControl.id }}</code></div>\n} @else if (controls().length > 1) {\n <div class=\"pp__subtitle\">{{ s.itemsSelected.replace('{0}', '' + controls().length) }}</div>\n} @else if (selectedBand) {\n <div class=\"pp__subtitle\">{{ s.bandNames[selectedBand.kind] }}</div>\n}\n\n<!-- \u2500\u2500 Report (nothing selected) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (!controls().length && !band()) {\n <section class=\"pp__section\">\n <h3>{{ s.groupPage }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.reportName }}</span>\n <input [value]=\"report().name\" (input)=\"setReport('name', $any($event.target).value)\" />\n </label>\n @if (!embedded()) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.paper }}</span>\n <select (change)=\"setPaper($any($event.target).value)\">\n @for (p of papers; track p.id) {\n <option [value]=\"p.id\" [selected]=\"p.id === report().page.paper\">{{ p.id }} ({{ p.width }} \u00D7 {{ p.height ?? '\u221E' }} mm)</option>\n }\n <option value=\"custom\" [selected]=\"report().page.paper === 'custom'\">{{ s.customSize }}</option>\n </select>\n </label>\n @if (report().page.paper === 'custom') {\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.width }} (mm)</span>\n <input type=\"number\" min=\"10\" step=\"1\" [value]=\"num(report().page.width)\" (input)=\"setPage('width', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.height }} (mm)</span>\n <input type=\"number\" min=\"10\" step=\"1\" [value]=\"num(report().page.height)\" (input)=\"setPage('height', $any($event.target).value)\" />\n </label>\n </div>\n }\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.orientation }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"report().page.orientation === 'portrait'\" (click)=\"setPage('orientation', 'portrait')\">{{ s.portrait }}</button>\n <button type=\"button\" [class.pp__on]=\"report().page.orientation === 'landscape'\" (click)=\"setPage('orientation', 'landscape')\">{{ s.landscape }}</button>\n </div>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.margins }} (mm)</span>\n <div class=\"pp__grid pp__grid--4\">\n <label><small>{{ s.marginTop }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.top)\" (input)=\"setMargin('top', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginRight }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.right)\" (input)=\"setMargin('right', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginBottom }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.bottom)\" (input)=\"setMargin('bottom', $any($event.target).value)\" /></label>\n <label><small>{{ s.marginLeft }}</small><input type=\"number\" min=\"0\" step=\"1\" [value]=\"num(report().page.margins.left)\" (input)=\"setMargin('left', $any($event.target).value)\" /></label>\n </div>\n </div>\n @if (advanced()) {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!report().page.mirrorMargins\" (change)=\"setPageOption('mirrorMargins', $any($event.target).checked || undefined)\" />\n <span>{{ s.mirrorMargins }}<small class=\"pp__hint\">{{ s.mirrorMarginsHint }}</small></span>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.pageColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"report().page.color ?? '#ffffff'\" (input)=\"setPageOption('color', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setPageOption('color', undefined)\">{{ s.noColor }}</button>\n </span>\n </label>\n }\n } @else {\n <small class=\"pp__hint\">{{ s.subreportPageHint }}</small>\n }\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.reportLocale }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.reportLocaleRegion }}</span>\n <select (change)=\"setCulture('locale', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!report().locale\">{{ s.reportLocaleDefault }}</option>\n @for (l of cultures; track l.id) {\n <option [value]=\"l.id\" [selected]=\"report().locale === l.id\">{{ l.name }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.reportCurrency }}</span>\n <select (change)=\"setCulture('currency', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!report().currency\">{{ s.reportLocaleDefault }}</option>\n @for (c of currencies; track c) {\n <option [value]=\"c\" [selected]=\"report().currency === c\">{{ c }}</option>\n }\n </select>\n </label>\n <small class=\"pp__hint\">{{ s.reportLocaleHint }}</small>\n </section>\n <!-- A sub-report has no watermark of its own (the page around it does). -->\n @if (!embedded()) {\n <section class=\"pp__section\">\n <h3>{{ s.watermark }}</h3>\n @let wm = report().watermark;\n <we-report-bindable-input [value]=\"wm?.text ?? ''\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.watermark\" (valueChange)=\"setWatermark({ text: $event })\" />\n <small class=\"pp__hint\">{{ s.watermarkHint }}</small>\n @if (wm) {\n <div class=\"pp__row\">\n <span>{{ s.color }}</span>\n <input type=\"color\" [value]=\"wm.color ?? '#e3e6ea'\" (input)=\"setWatermark({ color: $any($event.target).value })\" [attr.aria-label]=\"s.color\" />\n </div>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.watermarkAngle\">\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"(wm.angle ?? 45) === 45\" [class.pp__on]=\"(wm.angle ?? 45) === 45\" (click)=\"setWatermark({ angle: undefined })\">\u2197 45\u00B0</button>\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"wm.angle === 0\" [class.pp__on]=\"wm.angle === 0\" (click)=\"setWatermark({ angle: 0 })\">\u2192 0\u00B0</button>\n </div>\n }\n </section>\n }\n @if (advanced() && report().dataMember) {\n <section class=\"pp__section\">\n <h3>{{ s.groupData }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.dataRows }}</span>\n <input [value]=\"report().dataMember?.path ?? ''\" (input)=\"setRowsPath($any($event.target).value)\" spellcheck=\"false\" />\n <small class=\"pp__hint\">{{ s.dataRowsHint }}</small>\n </label>\n </section>\n }\n}\n\n<!-- \u2500\u2500 Band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (band(); as b) {\n <section class=\"pp__section\">\n <h3>{{ s.groupLayout }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.bandHeight }} (mm)</span>\n <input type=\"number\" min=\"2\" step=\"1\" [value]=\"num(b.height)\" (input)=\"setBand('height', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row\">\n <span>{{ s.backgroundColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"b.backgroundColor ?? '#ffffff'\" (input)=\"setBand('backgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setBand('backgroundColor', '')\">{{ s.noColor }}</button>\n </span>\n </label>\n @if (b.kind === 'detail' || b.kind === 'subDetail') {\n <label class=\"pp__row\">\n <span>{{ s.alternateBackground }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"b.alternateBackgroundColor ?? '#f6f8fa'\" (input)=\"setBand('alternateBackgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setBand('alternateBackgroundColor', '')\">{{ s.noColor }}</button>\n </span>\n </label>\n }\n @if (b.kind === 'groupHeader' || b.kind === 'detail') {\n <span class=\"pp__label\">{{ s.bookmark }}</span>\n <we-report-bindable-input [value]=\"bookmarkValue(b)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.bookmark\" (valueChange)=\"setBookmark($event)\" />\n <small class=\"pp__hint\">{{ s.bookmarkHint }}</small>\n }\n @if (advanced() && b.kind !== 'pageHeader' && b.kind !== 'pageFooter') {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.bandVisible }}</span>\n <input class=\"pp__mono\" [value]=\"b.visible?.expression ?? ''\" placeholder=\"[Discount] > 0\" (input)=\"setBand('visible', $any($event.target).value)\" spellcheck=\"false\" />\n </label>\n <small class=\"pp__hint\">{{ s.bandVisibleHint }}</small>\n }\n </section>\n @if (b.kind === 'subDetail') {\n <section class=\"pp__section\">\n <h3>{{ s.innerList }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.innerListOf }}</span>\n <select (change)=\"setBand('rowsPath', $any($event.target).value)\">\n @for (l of lists(); track l) {\n <option [value]=\"l\" [selected]=\"b.rowsPath === l\">{{ l }}</option>\n }\n @if (b.rowsPath && !lists().includes(b.rowsPath)) {\n <option [value]=\"b.rowsPath\" selected>{{ b.rowsPath }}</option>\n }\n </select>\n </label>\n <small class=\"pp__hint\">{{ s.innerListHint }}</small>\n </section>\n }\n @if (b.kind === 'detail') {\n <section class=\"pp__section\">\n <h3>{{ s.sortRows }}</h3>\n @let key = b.sortBy?.[0];\n <div class=\"pp__grid\">\n <select (change)=\"setSort($any($event.target).value, !!key?.descending)\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"\" [selected]=\"!key\">{{ s.dataOrder }}</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === key?.expression\">{{ f.label }}</option>\n }\n @if (key && !fieldExpressions().has(key.expression)) {\n <option [value]=\"key.expression\" selected>{{ key.expression }}</option>\n }\n </select>\n <select [disabled]=\"!key\" (change)=\"setSort(key?.expression ?? '', $any($event.target).value === 'desc')\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"asc\" [selected]=\"!key?.descending\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"!!key?.descending\">{{ s.sortDesc }}</option>\n </select>\n </div>\n </section>\n <section class=\"pp__section\">\n <h3>{{ s.labelSheet }}</h3>\n <select (change)=\"applyLabelSheet($any($event.target).value); $any($event.target).value = ''\" [attr.aria-label]=\"s.labelSheet\">\n <option value=\"\" selected>{{ s.labelSheetChoose }}</option>\n @for (l of labelSheets; track l.id) {\n <option [value]=\"l.id\">{{ labelSheetName(l) }}</option>\n }\n </select>\n <small class=\"pp__hint\">{{ s.labelSheetHint }}</small>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnsCount }}</span>\n <input type=\"number\" min=\"1\" max=\"12\" step=\"1\" [value]=\"b.columns?.count ?? 1\" (input)=\"setColumns('count', $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnGap }}</span>\n <input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(b.columns?.gap ?? 0)\" (input)=\"setColumns('gap', $any($event.target).value)\" />\n </label>\n </div>\n <small class=\"pp__hint\">{{ s.columnsHint }}</small>\n </section>\n }\n @if (b.kind === 'groupHeader') {\n <section class=\"pp__section\">\n <h3>{{ s.groupBy }}</h3>\n @if (fields().length) {\n <select (change)=\"setBand('groupBy', $any($event.target).value)\">\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === b.groupBy?.expression\">{{ f.label }}</option>\n }\n </select>\n }\n <input class=\"pp__mono\" [value]=\"b.groupBy?.expression ?? ''\" (input)=\"setBand('groupBy', $any($event.target).value)\" spellcheck=\"false\" />\n <label class=\"pp__row\">\n <span>{{ s.sortGroups }}</span>\n <select (change)=\"setBand('sort', $any($event.target).value)\">\n <option value=\"asc\" [selected]=\"!b.sort || b.sort === 'asc'\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"b.sort === 'desc'\">{{ s.sortDesc }}</option>\n <option value=\"none\" [selected]=\"b.sort === 'none'\">{{ s.sortNone }}</option>\n </select>\n </label>\n @if (advanced() || b.orderBy) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.groupOrderBy }}</span>\n <input class=\"pp__mono\" [value]=\"b.orderBy?.expression ?? ''\" placeholder=\"Sum([amount])\" (input)=\"setGroupOrder($any($event.target).value, !!b.orderBy?.descending)\" spellcheck=\"false\" />\n </label>\n @if (b.orderBy) {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.orderBy.descending\" (change)=\"setGroupOrder(b.orderBy.expression, $any($event.target).checked)\" />\n <span>{{ s.largestFirst }}</span>\n </label>\n }\n <small class=\"pp__hint\">{{ s.groupOrderByHint }}</small>\n <label class=\"pp__row\">\n <span>{{ s.groupTop }}</span>\n <input type=\"number\" min=\"1\" step=\"1\" [value]=\"b.top ?? ''\" (input)=\"setGroupTop($any($event.target).value)\" />\n </label>\n }\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.keepTogether\" (change)=\"toggleBand('keepTogether', $any($event.target).checked)\" />\n <span>{{ s.keepTogether }}<small class=\"pp__hint\">{{ s.keepTogetherHint }}</small></span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.keepWithFirstRow\" (change)=\"toggleBand('keepWithFirstRow', $any($event.target).checked)\" />\n <span>{{ s.keepWithFirstRow }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.repeatOnEveryPage\" (change)=\"toggleBand('repeatOnEveryPage', $any($event.target).checked)\" />\n <span>{{ s.repeatOnEveryPage }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.resetPageNumber\" (change)=\"toggleBand('resetPageNumber', $any($event.target).checked)\" />\n <span>{{ s.resetPageNumber }}<small class=\"pp__hint\">{{ s.resetPageNumberHint }}</small></span>\n </label>\n </section>\n }\n @if (advanced() && b.kind !== 'pageHeader' && b.kind !== 'pageFooter') {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.pageBreakBefore\" (change)=\"toggleBand('pageBreakBefore', $any($event.target).checked)\" />\n <span>{{ s.pageBreakBefore }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.pageBreakAfter\" (change)=\"toggleBand('pageBreakAfter', $any($event.target).checked)\" />\n <span>{{ s.pageBreakAfter }}</span>\n </label>\n @if (b.kind === 'reportFooter') {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!b.printAtBottom\" (change)=\"toggleBand('printAtBottom', $any($event.target).checked)\" />\n <span>{{ s.printAtBottom }}<small class=\"pp__hint\">{{ s.printAtBottomHint }}</small></span>\n </label>\n }\n </section>\n }\n @if (advanced() && (b.kind === 'pageHeader' || b.kind === 'pageFooter')) {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"b.printOnFirstPage !== false\" (change)=\"setPrintOn('printOnFirstPage', $any($event.target).checked)\" />\n <span>{{ s.printOnFirstPage }}</span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"b.printOnLastPage !== false\" (change)=\"setPrintOn('printOnLastPage', $any($event.target).checked)\" />\n <span>{{ s.printOnLastPage }}</span>\n </label>\n </section>\n }\n @if (b.kind !== 'detail') {\n <button type=\"button\" class=\"pp__danger\" (click)=\"removeBand()\">{{ s.removeBand }}</button>\n }\n}\n\n<!-- \u2500\u2500 Control(s) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 -->\n@if (controls().length) {\n @let n = controls().length;\n <section class=\"pp__section\">\n <h3>{{ s.arrange }}</h3>\n <div class=\"pp__tools\" role=\"toolbar\" [attr.aria-label]=\"s.arrange\">\n @for (a of alignActions; track a.edge) {\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.align(a.edge)\" [title]=\"s[a.label]\" [attr.aria-label]=\"s[a.label]\" [innerHTML]=\"a.icon | weReportIcon\"></button>\n }\n </div>\n <div class=\"pp__tools\" role=\"toolbar\" [attr.aria-label]=\"s.arrange\">\n <button type=\"button\" [disabled]=\"n < 3\" (click)=\"state.distribute('h')\" [title]=\"s.distributeH\" [attr.aria-label]=\"s.distributeH\" [innerHTML]=\"'distributeH' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 3\" (click)=\"state.distribute('v')\" [title]=\"s.distributeV\" [attr.aria-label]=\"s.distributeV\" [innerHTML]=\"'distributeV' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.sameSize('width')\" [title]=\"s.sameWidth\" [attr.aria-label]=\"s.sameWidth\" [innerHTML]=\"'sameWidth' | weReportIcon\"></button>\n <button type=\"button\" [disabled]=\"n < 2\" (click)=\"state.sameSize('height')\" [title]=\"s.sameHeight\" [attr.aria-label]=\"s.sameHeight\" [innerHTML]=\"'sameHeight' | weReportIcon\"></button>\n <button type=\"button\" (click)=\"state.arrange('front')\" [title]=\"s.bringToFront\" [attr.aria-label]=\"s.bringToFront\" [innerHTML]=\"'bringToFront' | weReportIcon\"></button>\n <button type=\"button\" (click)=\"state.arrange('back')\" [title]=\"s.sendToBack\" [attr.aria-label]=\"s.sendToBack\" [innerHTML]=\"'sendToBack' | weReportIcon\"></button>\n </div>\n @if (n < 2) {\n <small class=\"pp__hint\">{{ s.arrangeHint }}</small>\n }\n </section>\n @if (control(); as c) {\n <!-- Content first: it is what people change most. -->\n @switch (c.type) {\n @case ('text') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [multiline]=\"true\" [label]=\"s.groupContent\" (valueChange)=\"setBindable('text', $event)\" />\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ $any(s)[f.key] }}</option>\n }\n @if (formatIsCustom()) {\n <option [value]=\"c.format\" selected>{{ c.format }}</option>\n }\n </select>\n </label>\n @if (advanced()) {\n <input class=\"pp__mono\" [value]=\"c.format ?? ''\" (input)=\"set('format', $any($event.target).value)\" spellcheck=\"false\" placeholder=\"n2 \u00B7 c2 \u00B7 dd.MM.yyyy\" />\n }\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.canGrow\" (change)=\"set('canGrow', $any($event.target).checked || undefined)\" />\n <span>{{ s.canGrow }}<small class=\"pp__hint\">{{ s.canGrowHint }}</small></span>\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.markup\" (change)=\"set('markup', $any($event.target).checked || undefined)\" />\n <span>{{ s.richText }}<small class=\"pp__hint\">{{ s.richTextHint }}</small></span>\n </label>\n </section>\n }\n @case ('barcode') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.symbology }}</span>\n <select (change)=\"set('symbology', $any($event.target).value)\">\n @for (sym of symbologies; track sym) {\n <option [value]=\"sym\" [selected]=\"sym === c.symbology\">{{ sym }}</option>\n }\n @if (!symbologies.includes(c.symbology)) {\n <option [value]=\"c.symbology\" selected>{{ c.symbology }}</option>\n }\n </select>\n </label>\n <span class=\"pp__label\">{{ s.barcodeValue }}</span>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.barcodeValue\" (valueChange)=\"setBindable('value', $event)\" />\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.showText\" (change)=\"set('showText', $any($event.target).checked)\" />\n <span>{{ s.showText }}</span>\n </label>\n </section>\n }\n @case ('image') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__file\">\n <input type=\"file\" accept=\"image/png,image/jpeg\" (change)=\"chooseImage($event)\" />\n <span>{{ s.chooseImage }}</span>\n </label>\n <span class=\"pp__label\">{{ s.fromData }}</span>\n <we-report-bindable-input [value]=\"textValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.fromData\" (valueChange)=\"setBindable('source', $event)\" />\n <label class=\"pp__row\">\n <span>{{ s.fit }}</span>\n <select (change)=\"set('fit', $any($event.target).value)\">\n <option value=\"contain\" [selected]=\"c.fit === 'contain'\">{{ s.fitContain }}</option>\n <option value=\"cover\" [selected]=\"c.fit === 'cover'\">{{ s.fitCover }}</option>\n <option value=\"stretch\" [selected]=\"c.fit === 'stretch'\">{{ s.fitStretch }}</option>\n <option value=\"none\" [selected]=\"c.fit === 'none'\">{{ s.fitNone }}</option>\n </select>\n </label>\n </section>\n }\n @case ('line') {\n <section class=\"pp__section\">\n <h3>{{ s.groupAppearance }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.lineDirection }}</span>\n <select (change)=\"set('direction', $any($event.target).value)\">\n <option value=\"horizontal\" [selected]=\"c.direction === 'horizontal'\">{{ s.horizontal }}</option>\n <option value=\"vertical\" [selected]=\"c.direction === 'vertical'\">{{ s.vertical }}</option>\n <option value=\"diagonalDown\" [selected]=\"c.direction === 'diagonalDown'\">{{ s.diagonalDown }}</option>\n <option value=\"diagonalUp\" [selected]=\"c.direction === 'diagonalUp'\">{{ s.diagonalUp }}</option>\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.lineWidth }} (mm)</span>\n <input type=\"number\" min=\"0.05\" step=\"0.05\" [value]=\"num(c.lineWidth)\" (input)=\"set('lineWidth', asNumber($any($event.target).value, 0.05))\" />\n </label>\n <label class=\"pp__row\">\n <span>{{ s.color }}</span>\n <input type=\"color\" [value]=\"c.color ?? style()?.color ?? '#000000'\" (input)=\"set('color', $any($event.target).value)\" />\n </label>\n </section>\n }\n @case ('shape') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.shape }}</span>\n <select (change)=\"set('shape', $any($event.target).value)\">\n <option value=\"rectangle\" [selected]=\"c.shape === 'rectangle'\">{{ s.rectangle }}</option>\n <option value=\"roundedRectangle\" [selected]=\"c.shape === 'roundedRectangle'\">{{ s.roundedRectangle }}</option>\n <option value=\"ellipse\" [selected]=\"c.shape === 'ellipse'\">{{ s.ellipse }}</option>\n </select>\n </label>\n @if (c.shape === 'roundedRectangle') {\n <label class=\"pp__row\">\n <span>{{ s.cornerRadius }} (mm)</span>\n <input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.cornerRadius ?? 2)\" (input)=\"set('cornerRadius', asNumber($any($event.target).value, 0))\" />\n </label>\n }\n </section>\n }\n @case ('pageInfo') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <label class=\"pp__row\">\n <span>{{ s.pageInfo }}</span>\n <select (change)=\"set('info', $any($event.target).value)\">\n <option value=\"pageNumber\" [selected]=\"c.info === 'pageNumber'\">{{ s.pageNumber }}</option>\n <option value=\"pageCount\" [selected]=\"c.info === 'pageCount'\">{{ s.pageTotal }}</option>\n <option value=\"pageNofM\" [selected]=\"c.info === 'pageNofM'\">{{ s.pageNofM }}</option>\n <option value=\"printDate\" [selected]=\"c.info === 'printDate'\">{{ s.printDate }}</option>\n </select>\n </label>\n @if (c.info === 'pageNofM' || c.info === 'printDate') {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.format }}</span>\n <input class=\"pp__mono\" [value]=\"c.format ?? ''\" (input)=\"set('format', $any($event.target).value)\" [placeholder]=\"c.info === 'pageNofM' ? '{0} / {1}' : 'dd.MM.yyyy'\" spellcheck=\"false\" />\n </label>\n }\n </section>\n }\n @case ('table') {\n @let cellInfo = selectedCell();\n <section class=\"pp__section\">\n <h3>{{ s.tableSection }}</h3>\n <small class=\"pp__hint\">{{ s.tableHint }}</small>\n <div class=\"pp__buttons\">\n <button type=\"button\" (click)=\"tableOp('insertRow')\">+ {{ s.addRow }}</button>\n <button type=\"button\" (click)=\"tableOp('insertColumn')\">+ {{ s.addColumn }}</button>\n <button type=\"button\" [disabled]=\"c.rows.length < 2\" (click)=\"tableOp('deleteRow')\">\u2212 {{ s.deleteRow }}</button>\n <button type=\"button\" [disabled]=\"c.columns.length < 2\" (click)=\"tableOp('deleteColumn')\">\u2212 {{ s.deleteColumn }}</button>\n <button type=\"button\" [disabled]=\"!cellInfo || cellInfo.index >= c.rows[cellInfo.row].cells.length - 1\" (click)=\"tableOp('mergeRight')\">{{ s.mergeCells }}</button>\n <button type=\"button\" [disabled]=\"!cellInfo || (cellInfo.cell.colSpan ?? 1) < 2\" (click)=\"tableOp('splitCell')\">{{ s.splitCell }}</button>\n </div>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.canGrow\" (change)=\"set('canGrow', $any($event.target).checked || undefined)\" />\n <span>{{ s.canGrow }}<small class=\"pp__hint\">{{ s.canGrowHint }}</small></span>\n </label>\n </section>\n @if (cellInfo) {\n <section class=\"pp__section\">\n <h3>{{ s.selectedCell }}</h3>\n <we-report-bindable-input [value]=\"cellInfo.cell.text\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.selectedCell\" (valueChange)=\"setCell({ text: $event })\" />\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"setCell({ format: $any($event.target).value || undefined })\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(cellInfo.cell.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.alignment\">\n @for (a of ['left', 'center', 'right']; track a) {\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"cellAlign(cellInfo.cell) === a\" [class.pp__on]=\"cellAlign(cellInfo.cell) === a\" (click)=\"setCellStyle('textAlign', $any(a))\">\n {{ a === 'left' ? s.alignLeft : a === 'center' ? s.alignCenter : s.alignRight }}\n </button>\n }\n </div>\n <div class=\"pp__rule-then\">\n <button type=\"button\" class=\"pp__chip\" [class.pp__on]=\"cellInfo.cell.styleOverrides?.bold\" (click)=\"setCellStyle('bold', cellInfo.cell.styleOverrides?.bold ? undefined : true)\">{{ s.bold }}</button>\n <span>{{ s.backgroundColor }}</span>\n <input type=\"color\" [value]=\"cellInfo.cell.styleOverrides?.backgroundColor ?? '#ffffff'\" (input)=\"setCellStyle('backgroundColor', $any($event.target).value)\" [attr.aria-label]=\"s.backgroundColor\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setCellStyle('backgroundColor', undefined)\">{{ s.noColor }}</button>\n </div>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.columnWidth }}</span>\n <input type=\"number\" min=\"2\" step=\"1\" [value]=\"num(c.columns[cellInfo.column])\" (input)=\"setColumnWidth(cellInfo.column, $any($event.target).value)\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.rowHeight }}</span>\n <input type=\"number\" min=\"2\" step=\"0.5\" [value]=\"num(c.rows[cellInfo.row].height)\" (input)=\"setRowHeight(cellInfo.row, $any($event.target).value)\" />\n </label>\n </div>\n </section>\n }\n }\n @case ('chart') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <small class=\"pp__hint\">{{ s.chartHint }}</small>\n <div class=\"pp__segmented\" role=\"radiogroup\" [attr.aria-label]=\"s.chartType\">\n @for (t of chartTypes; track t.type) {\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"c.chartType === t.type\" [class.pp__on]=\"c.chartType === t.type\" (click)=\"setChartType(t.type)\">{{ s[t.label] }}</button>\n }\n </div>\n <!-- A data bar and a gauge show one value: they have no groups. -->\n @let grouped = c.chartType !== 'databar' && c.chartType !== 'gauge';\n @if (grouped) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartCategory }}</span>\n <select (change)=\"setExpression('category', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c.category.expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c.category.expression\">{{ f.label }}</option>\n }\n </select>\n </label>\n }\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartValue }}</span>\n <select (change)=\"setExpression('value', $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c.value.expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c.value.expression\">{{ f.label }}</option>\n }\n </select>\n </label>\n @if (advanced()) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.expression }}</span>\n @if (grouped) {\n <input class=\"pp__mono\" [value]=\"c.category.expression\" (input)=\"setExpression('category', $any($event.target).value)\" spellcheck=\"false\" />\n }\n <input class=\"pp__mono\" [value]=\"c.value.expression\" (input)=\"setExpression('value', $any($event.target).value)\" spellcheck=\"false\" />\n </label>\n }\n <label class=\"pp__row\">\n <span>{{ s.chartAggregate }}</span>\n <select (change)=\"set('aggregate', $any($event.target).value)\">\n @for (a of aggregates; track a.value) {\n <option [value]=\"a.value\" [selected]=\"(c.aggregate ?? 'sum') === a.value\">{{ s[a.label] }}</option>\n }\n </select>\n </label>\n @if (c.chartType === 'databar' || c.chartType === 'gauge') {\n <label class=\"pp__row\">\n <span>{{ s.chartMax }}</span>\n <input type=\"number\" [value]=\"c.max ?? ''\" (input)=\"set('max', $any($event.target).value === '' ? undefined : +$any($event.target).value)\" />\n </label>\n }\n @if (advanced() || c.rows) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartRows }}</span>\n <input class=\"pp__mono\" [attr.list]=\"listId + '-chart'\" [value]=\"c.rows?.expression ?? ''\" placeholder=\"[months]\" (input)=\"setOptionalChartRows($any($event.target).value)\" spellcheck=\"false\" />\n <datalist [id]=\"listId + '-chart'\">\n @for (l of lists(); track l) {\n <option [value]=\"'[' + l + ']'\"></option>\n }\n </datalist>\n </label>\n <small class=\"pp__hint\">{{ s.chartRowsHint }}</small>\n }\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.chartTitle }}</span>\n <input [value]=\"c.title ?? ''\" (input)=\"set('title', $any($event.target).value)\" />\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.showValues\" (change)=\"set('showValues', $any($event.target).checked || undefined)\" />\n <span>{{ s.showValues }}</span>\n </label>\n @if (c.chartType === 'pie' || c.chartType === 'doughnut') {\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.showLegend !== false\" (change)=\"set('showLegend', $any($event.target).checked ? undefined : false)\" />\n <span>{{ s.showLegend }}</span>\n </label>\n }\n </section>\n }\n @case ('crosstab') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <small class=\"pp__hint\">{{ s.crosstabHint }}</small>\n @for (k of crosstabKeys; track k.key) {\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s[k.label] }}</span>\n <select (change)=\"setCrosstab(k.key, $any($event.target).value)\">\n <option value=\"\" [selected]=\"!c[k.key].expression\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === c[k.key].expression\">{{ f.label }}</option>\n }\n </select>\n @if (advanced()) {\n <input class=\"pp__mono\" [value]=\"c[k.key].expression\" (input)=\"setCrosstab(k.key, $any($event.target).value)\" spellcheck=\"false\" />\n }\n </label>\n }\n <label class=\"pp__row\">\n <span>{{ s.chartAggregate }}</span>\n <select (change)=\"set('aggregate', $any($event.target).value)\">\n @for (a of aggregates; track a.value) {\n <option [value]=\"a.value\" [selected]=\"(c.aggregate ?? 'sum') === a.value\">{{ s[a.label] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.format }}</span>\n <select (change)=\"set('format', $any($event.target).value)\">\n @for (f of formats; track f.value) {\n <option [value]=\"f.value\" [selected]=\"(c.format ?? '') === f.value\">{{ s[f.key] }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.crosstabTitle }}</span>\n <input [value]=\"c.title ?? ''\" (input)=\"set('title', $any($event.target).value)\" />\n </label>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"c.totals !== false\" (change)=\"set('totals', $any($event.target).checked ? undefined : false)\" />\n <span>{{ s.crosstabTotals }}</span>\n </label>\n </section>\n }\n @case ('subreport') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <small class=\"pp__hint\">{{ s.subreportHint }}</small>\n <div class=\"pp__buttons\">\n <button type=\"button\" (click)=\"state.subreportOpen.set(c.id)\">{{ s.subreportEdit }}</button>\n </div>\n <label class=\"pp__file\">\n <input type=\"file\" accept=\".json,.rdl,.rdlc,.repx\" (change)=\"chooseSubreport($event)\" />\n <span>{{ s.subreportLoad }}</span>\n </label>\n @if (subreportError()) {\n <small class=\"pp__hint pp__warn\" role=\"alert\">{{ s.subreportLoadFailed }}</small>\n }\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.subreportRows }}</span>\n <input class=\"pp__mono\" [attr.list]=\"listId + '-sub'\" [value]=\"c.rows?.expression ?? ''\" placeholder=\"[orders]\" (input)=\"setOptionalExpression('rows', $any($event.target).value)\" spellcheck=\"false\" />\n <datalist [id]=\"listId + '-sub'\">\n @for (l of lists(); track l) {\n <option [value]=\"'[' + l + ']'\"></option>\n }\n </datalist>\n </label>\n <small class=\"pp__hint\">{{ s.subreportRowsHint }}</small>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.subreportFilter }}</span>\n <input class=\"pp__mono\" [value]=\"c.filter?.expression ?? ''\" placeholder=\"[CustomerId] = [^.Id]\" (input)=\"setOptionalExpression('filter', $any($event.target).value)\" spellcheck=\"false\" />\n </label>\n <small class=\"pp__hint\">{{ s.subreportFilterHint }}</small>\n @if (c.report.parameters?.length) {\n <span class=\"pp__label\">{{ s.subreportParams }}</span>\n @for (p of c.report.parameters; track p.name) {\n <span class=\"pp__label\">{{ p.label || p.name }}</span>\n <we-report-bindable-input [value]=\"subreportParamValue(c, p.name)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"p.label || p.name\" (valueChange)=\"setSubreportParam(p.name, $event)\" />\n }\n }\n </section>\n }\n @case ('checkbox') {\n <section class=\"pp__section\">\n <h3>{{ s.groupContent }}</h3>\n <span class=\"pp__label\">{{ s.checked }}</span>\n <we-report-bindable-input [value]=\"checkedValue(c)\" [fields]=\"fields()\" [strings]=\"s\" [label]=\"s.checked\" (valueChange)=\"setBindable('checked', $event)\" />\n </section>\n }\n }\n\n <section class=\"pp__section\">\n <h3>{{ s.conditionalFormatting }}</h3>\n @for (rule of c.formatting ?? []; track $index; let i = $index) {\n @let cond = condition(rule.when);\n <div class=\"pp__rule\">\n <div class=\"pp__rule-head\">\n <span>{{ s.ruleWhen }}</span>\n <button type=\"button\" class=\"pp__link\" (click)=\"removeRule(i)\" [title]=\"s.removeRule\" [attr.aria-label]=\"s.removeRule\">\u2715</button>\n </div>\n @if (cond) {\n <div class=\"pp__rule-when\">\n <select (change)=\"setCondition(i, cond, 'field', $any($event.target).value)\" [attr.aria-label]=\"s.ruleWhen\">\n <option value=\"\" [selected]=\"!cond.field\">\u2014</option>\n @for (f of fields(); track f.expression) {\n <option [value]=\"f.expression\" [selected]=\"f.expression === cond.field\">{{ f.label }}</option>\n }\n </select>\n <select (change)=\"setCondition(i, cond, 'op', $any($event.target).value)\">\n @for (o of conditionOps; track o.op) {\n <option [value]=\"o.op\" [selected]=\"o.op === cond.op\">{{ o.op === 'contains' ? s.opContains : o.label }}</option>\n }\n </select>\n <input [value]=\"cond.value\" (input)=\"setCondition(i, cond, 'value', $any($event.target).value)\" [placeholder]=\"s.ruleValue\" [attr.aria-label]=\"s.ruleValue\" />\n </div>\n }\n @if (advanced() || !cond) {\n <input class=\"pp__mono\" [value]=\"rule.when\" (input)=\"setRule(i, { when: $any($event.target).value })\" spellcheck=\"false\" />\n }\n <div class=\"pp__rule-then\">\n <span>{{ s.ruleThen }}</span>\n <input type=\"color\" [value]=\"rule.style.color ?? '#000000'\" (input)=\"setRuleStyle(i, 'color', $any($event.target).value)\" [title]=\"s.textColor\" [attr.aria-label]=\"s.textColor\" />\n <input type=\"color\" [value]=\"rule.style.backgroundColor ?? '#ffffff'\" (input)=\"setRuleStyle(i, 'backgroundColor', $any($event.target).value)\" [title]=\"s.backgroundColor\" [attr.aria-label]=\"s.backgroundColor\" />\n <button type=\"button\" class=\"pp__chip\" [class.pp__on]=\"rule.style.bold\" (click)=\"setRuleStyle(i, 'bold', rule.style.bold ? undefined : true)\">{{ s.bold }}</button>\n </div>\n </div>\n } @empty {\n <small class=\"pp__hint\">{{ s.conditionalHint }}</small>\n }\n <button type=\"button\" class=\"pp__link\" (click)=\"addRule()\">+ {{ s.addRule }}</button>\n </section>\n\n <section class=\"pp__section\">\n <h3>{{ s.groupLayout }}</h3>\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\"><span>{{ s.left }}</span><input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.x)\" (input)=\"setGeometry('x', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.top }}</span><input type=\"number\" min=\"0\" step=\"0.5\" [value]=\"num(c.y)\" (input)=\"setGeometry('y', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.width }}</span><input type=\"number\" min=\"0.5\" step=\"0.5\" [value]=\"num(c.width)\" (input)=\"setGeometry('width', $any($event.target).value)\" /></label>\n <label class=\"pp__row pp__row--stack\"><span>{{ s.height }}</span><input type=\"number\" min=\"0.5\" step=\"0.5\" [value]=\"num(c.height)\" (input)=\"setGeometry('height', $any($event.target).value)\" /></label>\n </div>\n </section>\n }\n\n <!-- Appearance applies to every selected control at once. -->\n @if (style(); as st) {\n @if (hasText()) {\n <section class=\"pp__section\">\n <h3>{{ s.groupAppearance }}</h3>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.font }}</span>\n <select (change)=\"setStyle('fontFamily', $any($event.target).value)\">\n @for (f of fontFamilies(); track f) {\n <option [value]=\"f\" [selected]=\"f === st.fontFamily\">{{ f }}</option>\n }\n @if (!fontFamilies().includes(st.fontFamily)) {\n <option [value]=\"st.fontFamily\" selected>{{ st.fontFamily }}</option>\n }\n </select>\n </label>\n <label class=\"pp__row\">\n <span>{{ s.fontSize }} (pt)</span>\n <input type=\"number\" min=\"4\" max=\"200\" step=\"0.5\" [value]=\"num(st.fontSize)\" (input)=\"setStyle('fontSize', asNumber($any($event.target).value, 4))\" />\n </label>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.bold\" (click)=\"setStyle('bold', !st.bold)\" [attr.aria-pressed]=\"st.bold\"><b>{{ s.bold }}</b></button>\n <button type=\"button\" [class.pp__on]=\"st.italic\" (click)=\"setStyle('italic', !st.italic)\" [attr.aria-pressed]=\"st.italic\"><i>{{ s.italic }}</i></button>\n <button type=\"button\" [class.pp__on]=\"st.underline\" (click)=\"setStyle('underline', !st.underline)\" [attr.aria-pressed]=\"st.underline\"><u>{{ s.underline }}</u></button>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.alignment }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'left'\" (click)=\"setStyle('textAlign', 'left')\">{{ s.alignLeft }}</button>\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'center'\" (click)=\"setStyle('textAlign', 'center')\">{{ s.alignCenter }}</button>\n <button type=\"button\" [class.pp__on]=\"st.textAlign === 'right'\" (click)=\"setStyle('textAlign', 'right')\">{{ s.alignRight }}</button>\n </div>\n </div>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.verticalAlignment }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'top'\" (click)=\"setStyle('verticalAlign', 'top')\">{{ s.alignTop }}</button>\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'middle'\" (click)=\"setStyle('verticalAlign', 'middle')\">{{ s.alignMiddle }}</button>\n <button type=\"button\" [class.pp__on]=\"st.verticalAlign === 'bottom'\" (click)=\"setStyle('verticalAlign', 'bottom')\">{{ s.alignBottom }}</button>\n </div>\n </div>\n <label class=\"pp__row\">\n <span>{{ s.textColor }}</span>\n <input type=\"color\" [value]=\"st.color\" (input)=\"setStyle('color', $any($event.target).value)\" />\n </label>\n </section>\n }\n @if (control()?.type !== 'line') {\n <section class=\"pp__section\">\n @if (!hasText()) {\n <h3>{{ s.groupAppearance }}</h3>\n }\n <label class=\"pp__row\">\n <span>{{ s.backgroundColor }}</span>\n <span class=\"pp__color\">\n <input type=\"color\" [value]=\"st.backgroundColor ?? '#ffffff'\" (input)=\"setStyle('backgroundColor', $any($event.target).value)\" />\n <button type=\"button\" class=\"pp__link\" (click)=\"setStyle('backgroundColor', undefined)\">{{ s.noColor }}</button>\n </span>\n </label>\n <div class=\"pp__row pp__row--stack\">\n <span>{{ s.border }}</span>\n <div class=\"pp__segmented\">\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.top\" (click)=\"toggleBorderSide('top', !st.border?.sides?.top)\">{{ s.marginTop }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.right\" (click)=\"toggleBorderSide('right', !st.border?.sides?.right)\">{{ s.marginRight }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.bottom\" (click)=\"toggleBorderSide('bottom', !st.border?.sides?.bottom)\">{{ s.marginBottom }}</button>\n <button type=\"button\" [class.pp__on]=\"!!st.border?.sides?.left\" (click)=\"toggleBorderSide('left', !st.border?.sides?.left)\">{{ s.marginLeft }}</button>\n </div>\n </div>\n @if (st.border) {\n <div class=\"pp__grid\">\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.borderWidth }}</span>\n <input type=\"number\" min=\"0.05\" step=\"0.05\" [value]=\"num(st.border.width)\" (input)=\"setBorder({ width: asNumber($any($event.target).value, 0.05) })\" />\n </label>\n <label class=\"pp__row pp__row--stack\">\n <span>{{ s.borderColor }}</span>\n <input type=\"color\" [value]=\"st.border.color\" (input)=\"setBorder({ color: $any($event.target).value })\" />\n </label>\n </div>\n }\n @if (advanced() && hasText()) {\n <label class=\"pp__row\">\n <span>{{ s.padding }} (mm)</span>\n <input type=\"number\" min=\"0\" step=\"0.1\" [value]=\"num(st.padding)\" (input)=\"setStyle('padding', asNumber($any($event.target).value, 0))\" />\n </label>\n }\n </section>\n }\n }\n\n @if (advanced() && control(); as c) {\n <section class=\"pp__section\">\n <h3>{{ s.groupBehaviour }}</h3>\n <span class=\"pp__label\">{{ s.visibleWhen }}</span>\n <input class=\"pp__mono\" [value]=\"$any(visibleValue(c)).expression ?? ''\" (input)=\"setVisible({ expression: $any($event.target).value })\" spellcheck=\"false\" placeholder=\"[Total] > 0\" />\n <small class=\"pp__hint\">{{ s.visibleWhenHint }}</small>\n <label class=\"pp__check\">\n <input type=\"checkbox\" [checked]=\"!!c.stretch\" (change)=\"set('stretch', $any($event.target).checked || undefined)\" />\n <span>{{ s.stretch }}<small class=\"pp__hint\">{{ s.stretchHint }}</small></span>\n </label>\n </section>\n }\n}\n", styles: [":host{display:block;padding:14px 14px 32px;font-size:12.5px;color:var(--we-report-fg, #1d1d1f)}.pp__title{margin:0;font-size:15px;font-weight:600;letter-spacing:-.01em}.pp__subtitle{margin-top:2px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__subtitle code{font-size:11px}.pp__section{display:flex;flex-direction:column;gap:10px;padding:14px 0;border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.pp__section:last-of-type{border-bottom:0}.pp__section h3{margin:0;font-size:12px;font-weight:600;color:var(--we-report-fg, #1d1d1f)}.pp__row{display:flex;align-items:center;justify-content:space-between;gap:10px}.pp__row>span:first-child{flex:1;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__row input[type=number]{width:76px;text-align:right;font-variant-numeric:tabular-nums}.pp__row select{width:auto;max-width:60%}.pp__row--stack{flex-direction:column;align-items:stretch;gap:4px}.pp__row--stack>span:first-child{font-size:11.5px}.pp__row--stack input[type=number]{width:100%;text-align:left}.pp__row--stack select{max-width:none;width:100%}.pp__grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.pp__grid--4{grid-template-columns:repeat(4,1fr)}.pp__grid--4 label{display:flex;flex-direction:column;gap:3px;text-align:center}.pp__grid--4 label small{font-size:10.5px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__grid--4 label input{text-align:center!important}input:not([type=checkbox]):not([type=color]):not([type=file]),select,textarea{width:100%;box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;transition:box-shadow .15s ease}input:not([type=checkbox]):not([type=color]):not([type=file]):focus,select:focus,textarea:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff);width:14px;height:14px}input[type=color]{width:26px;height:26px;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14))}input[type=color]::-webkit-color-swatch-wrapper{padding:0}input[type=color]::-webkit-color-swatch{border:0;border-radius:50%}input[type=color]::-moz-color-swatch{border:0;border-radius:50%}.pp__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace!important;font-size:12px!important}.pp__label{font-weight:500}.pp__hint{display:block;margin-top:2px;font-size:11px;line-height:1.35;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__check{display:flex;align-items:flex-start;gap:8px;cursor:pointer}.pp__check input{margin-top:2px}.pp__segmented{display:flex;padding:2px;gap:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.pp__segmented button{flex:1;border:0;border-radius:6px;padding:4px;font:inherit;font-size:12px;background:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease,box-shadow .15s ease}.pp__segmented button.pp__on{background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.pp__segmented button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.pp__tools{display:flex;gap:2px;padding:2px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.pp__tools button{flex:1;display:inline-flex;align-items:center;justify-content:center;height:26px;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer}.pp__tools button :is(svg){width:16px;height:16px}.pp__tools button:hover:not(:disabled){background:var(--we-report-segment-on-bg, #fff);box-shadow:0 1px 2px #0000001a}.pp__tools button:disabled{opacity:.3;cursor:default}.pp__tools button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.pp__buttons{display:grid;grid-template-columns:1fr 1fr;gap:4px}.pp__buttons button{border:0;border-radius:var(--we-report-control-radius, 7px);padding:5px 6px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12));color:inherit;font:inherit;font-size:12px;cursor:pointer}.pp__buttons button:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .2))}.pp__buttons button:disabled{opacity:.4;cursor:default}.pp__rule{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:10px;background:var(--we-report-workspace-bg, #f2f2f7)}.pp__rule-head,.pp__rule-then{display:flex;align-items:center;gap:8px}.pp__rule-head>span,.pp__rule-then>span{flex:1;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.pp__rule-when{display:grid;grid-template-columns:1fr 54px 1fr;gap:4px}.pp__chip{border:0;border-radius:999px;padding:3px 10px;font:inherit;font-size:11.5px;font-weight:700;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12));color:inherit;cursor:pointer}.pp__chip.pp__on{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.pp__color{display:inline-flex;align-items:center;gap:8px}.pp__link{border:0;background:none;padding:0;font:inherit;color:var(--we-report-accent, #007aff);cursor:pointer}.pp__file{position:relative;display:block;padding:10px;border-radius:10px;border:1px dashed var(--we-report-accent, #007aff);background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font-weight:500;text-align:center;cursor:pointer}.pp__file input{position:absolute;inset:0;opacity:0;cursor:pointer}.pp__danger{margin-top:14px;width:100%;padding:7px;border:0;border-radius:8px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400);font:inherit;font-weight:500;cursor:pointer}@media (prefers-reduced-motion: reduce){input,select,textarea,.pp__segmented button{transition:none}}.pp__warn{color:var(--we-report-warning-fg, #9a4400)}\n"] }]
|
|
5657
6925
|
}] });
|
|
5658
6926
|
function positive(value, min) {
|
|
5659
6927
|
const n = Number(String(value).replace(',', '.'));
|
|
@@ -5940,7 +7208,7 @@ class DatabaseSourceEditorComponent {
|
|
|
5940
7208
|
<p [class.dbe__ok]="r.ok" [class.dbe__error]="!r.ok">{{ r.message }}</p>
|
|
5941
7209
|
}
|
|
5942
7210
|
}
|
|
5943
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:10px}label{display:flex;flex-direction:column;gap:4px}label>span,.dbe__label{font-weight:500}.dbe__row{display:flex;gap:6px;align-items:flex-end;margin-bottom:4px}.dbe__grow{flex:1}.dbe__op{width:110px}.dbe__source{width:140px}.dbe__columns{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px}.dbe__check{flex-direction:row;align-items:center;gap:6px;font-weight:400}input:not([type=checkbox]),select,textarea,button{box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;min-width:0}input:focus,select:focus,textarea:focus,button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}textarea{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}button{cursor:pointer;font-weight:500}button:disabled{opacity:.4;cursor:default}.dbe__primary{padding:6px 14px;background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.dbe__link{padding:0;background:none;color:var(--we-report-accent, #007aff)}.dbe__hint{font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
7211
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;gap:10px}label{display:flex;flex-direction:column;gap:4px}label>span,.dbe__label{font-weight:500}.dbe__row{display:flex;gap:6px;align-items:flex-end;margin-bottom:4px}.dbe__grow{flex:1}.dbe__op{width:110px}.dbe__source{width:140px}.dbe__columns{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px}.dbe__check{flex-direction:row;align-items:center;gap:6px;font-weight:400}input:not([type=checkbox]),select,textarea,button{box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;min-width:0}input:focus,select:focus,textarea:focus,button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}textarea{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}button{cursor:pointer;font-weight:500}button:disabled{opacity:.4;cursor:default}.dbe__primary{padding:6px 14px;background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.dbe__link{padding:0;background:none;color:var(--we-report-accent, #007aff)}.dbe__hint{font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dbe__ok,.dbe__error{margin:0;padding:8px 12px;border-radius:10px;font-size:12px}.dbe__ok{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.dbe__error{background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5944
7212
|
}
|
|
5945
7213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DatabaseSourceEditorComponent, decorators: [{
|
|
5946
7214
|
type: Component,
|
|
@@ -6069,7 +7337,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6069
7337
|
<p [class.dbe__ok]="r.ok" [class.dbe__error]="!r.ok">{{ r.message }}</p>
|
|
6070
7338
|
}
|
|
6071
7339
|
}
|
|
6072
|
-
`, styles: [":host{display:flex;flex-direction:column;gap:10px}label{display:flex;flex-direction:column;gap:4px}label>span,.dbe__label{font-weight:500}.dbe__row{display:flex;gap:6px;align-items:flex-end;margin-bottom:4px}.dbe__grow{flex:1}.dbe__op{width:110px}.dbe__source{width:140px}.dbe__columns{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px}.dbe__check{flex-direction:row;align-items:center;gap:6px;font-weight:400}input:not([type=checkbox]),select,textarea,button{box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;min-width:0}input:focus,select:focus,textarea:focus,button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}textarea{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}button{cursor:pointer;font-weight:500}button:disabled{opacity:.4;cursor:default}.dbe__primary{padding:6px 14px;background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.dbe__link{padding:0;background:none;color:var(--we-report-accent, #007aff)}.dbe__hint{font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .
|
|
7340
|
+
`, styles: [":host{display:flex;flex-direction:column;gap:10px}label{display:flex;flex-direction:column;gap:4px}label>span,.dbe__label{font-weight:500}.dbe__row{display:flex;gap:6px;align-items:flex-end;margin-bottom:4px}.dbe__grow{flex:1}.dbe__op{width:110px}.dbe__source{width:140px}.dbe__columns{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px}.dbe__check{flex-direction:row;align-items:center;gap:6px;font-weight:400}input:not([type=checkbox]),select,textarea,button{box-sizing:border-box;font:inherit;padding:5px 8px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;min-width:0}input:focus,select:focus,textarea:focus,button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}textarea{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}button{cursor:pointer;font-weight:500}button:disabled{opacity:.4;cursor:default}.dbe__primary{padding:6px 14px;background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.dbe__link{padding:0;background:none;color:var(--we-report-accent, #007aff)}.dbe__hint{font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dbe__ok,.dbe__error{margin:0;padding:8px 12px;border-radius:10px;font-size:12px}.dbe__ok{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.dbe__error{background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400)}\n"] }]
|
|
6073
7341
|
}], ctorParameters: () => [] });
|
|
6074
7342
|
|
|
6075
7343
|
/**
|
|
@@ -6079,7 +7347,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
6079
7347
|
class DataSourcesDialogComponent {
|
|
6080
7348
|
strings = input.required();
|
|
6081
7349
|
fetchFn = input(undefined);
|
|
7350
|
+
/** The host app passes the rows (the designer's `data`), so the main source's own data is a fallback. */
|
|
7351
|
+
hostData = input(false);
|
|
6082
7352
|
closed = output();
|
|
7353
|
+
dialog = viewChild('dialog');
|
|
7354
|
+
constructor() {
|
|
7355
|
+
// Focus the dialog so Escape closes it at once.
|
|
7356
|
+
afterNextRender(() => this.dialog()?.nativeElement.focus());
|
|
7357
|
+
}
|
|
7358
|
+
/** Escape closes the dialog, but not from a dialog inside it or a text area that saves on leaving. */
|
|
7359
|
+
onEscape(e) {
|
|
7360
|
+
const target = e.target;
|
|
7361
|
+
if (target.tagName === 'TEXTAREA' || target.closest('[role=dialog]') !== e.currentTarget)
|
|
7362
|
+
return;
|
|
7363
|
+
this.closed.emit();
|
|
7364
|
+
}
|
|
6083
7365
|
state = inject(DesignerState);
|
|
6084
7366
|
backend = inject(WeReportBackendService);
|
|
6085
7367
|
report = computed(() => this.state.report());
|
|
@@ -6118,6 +7400,36 @@ class DataSourcesDialogComponent {
|
|
|
6118
7400
|
testing = signal(false);
|
|
6119
7401
|
testResult = signal(null);
|
|
6120
7402
|
types = ['string', 'number', 'date', 'boolean'];
|
|
7403
|
+
/** Plain fields of every source, offered as a parameter's list ("source|field"). */
|
|
7404
|
+
choiceFields = computed(() => this.report().dataSources.flatMap((s) =>
|
|
7405
|
+
// The main source lists its rows (`dataMember.path`), as parameterChoices reads them.
|
|
7406
|
+
inferSchema(toRows(readPath(sourceValue(s), this.report().dataMember?.dataSourceId === s.id ? this.report().dataMember?.path : undefined)).slice(0, 50))
|
|
7407
|
+
.filter((f) => f.type !== 'object' && f.type !== 'array' && f.type !== 'image')
|
|
7408
|
+
.map((f) => ({ key: `${s.id}|${f.name}`, label: `${s.name} › ${f.name}` }))));
|
|
7409
|
+
choicesText(p) {
|
|
7410
|
+
return p.choices?.values?.join(', ') ?? '';
|
|
7411
|
+
}
|
|
7412
|
+
choicesKey(p) {
|
|
7413
|
+
return p.choices?.dataSourceId && p.choices.valueField ? `${p.choices.dataSourceId}|${p.choices.valueField}` : '';
|
|
7414
|
+
}
|
|
7415
|
+
/** A typed list ("A, B, C") or a data field ("source|field"); empty removes the list. */
|
|
7416
|
+
setChoices(index, kind, value) {
|
|
7417
|
+
this.state.update((d) => {
|
|
7418
|
+
const p = d.parameters?.[index];
|
|
7419
|
+
if (!p)
|
|
7420
|
+
return;
|
|
7421
|
+
if (kind === 'values') {
|
|
7422
|
+
const values = value.split(',').map((v) => v.trim()).filter(Boolean);
|
|
7423
|
+
p.choices = values.length ? { values: p.type === 'number' && values.every((v) => !isNaN(Number(v))) ? values.map(Number) : values } : undefined;
|
|
7424
|
+
}
|
|
7425
|
+
else {
|
|
7426
|
+
const [dataSourceId, valueField] = value.split('|');
|
|
7427
|
+
p.choices = dataSourceId && valueField ? { dataSourceId, valueField } : undefined;
|
|
7428
|
+
}
|
|
7429
|
+
if (!p.choices)
|
|
7430
|
+
delete p.choices;
|
|
7431
|
+
}, `param-${index}-choices-${kind}`);
|
|
7432
|
+
}
|
|
6121
7433
|
add(kind) {
|
|
6122
7434
|
const id = this.uniqueSourceId();
|
|
6123
7435
|
const s = this.strings();
|
|
@@ -6218,6 +7530,18 @@ class DataSourcesDialogComponent {
|
|
|
6218
7530
|
s[key] = value;
|
|
6219
7531
|
}, key);
|
|
6220
7532
|
}
|
|
7533
|
+
/** Page size of a paged web service; empty turns paging off. */
|
|
7534
|
+
setPaging(size) {
|
|
7535
|
+
this.edit((s) => {
|
|
7536
|
+
if (s.kind !== 'webService')
|
|
7537
|
+
return;
|
|
7538
|
+
const n = Math.floor(Number(size));
|
|
7539
|
+
if (size === '' || !(n > 0))
|
|
7540
|
+
delete s.paging;
|
|
7541
|
+
else
|
|
7542
|
+
s.paging = { ...s.paging, size: n };
|
|
7543
|
+
}, 'paging');
|
|
7544
|
+
}
|
|
6221
7545
|
db(s) {
|
|
6222
7546
|
return s.kind === 'database' ? s : null;
|
|
6223
7547
|
}
|
|
@@ -6303,6 +7627,43 @@ class DataSourcesDialogComponent {
|
|
|
6303
7627
|
p.defaultValue = value === '' ? undefined : value;
|
|
6304
7628
|
}, `param-${index}-${key}`);
|
|
6305
7629
|
}
|
|
7630
|
+
addCalculated() {
|
|
7631
|
+
this.state.update((d) => {
|
|
7632
|
+
const names = new Set((d.calculatedFields ?? []).map((f) => f.name));
|
|
7633
|
+
let n = 1;
|
|
7634
|
+
while (names.has(`field${n}`))
|
|
7635
|
+
n++;
|
|
7636
|
+
d.calculatedFields = [...(d.calculatedFields ?? []), { name: `field${n}`, expression: '' }];
|
|
7637
|
+
});
|
|
7638
|
+
}
|
|
7639
|
+
/** Names are used as [name]: the box shows the cleaned name right away. */
|
|
7640
|
+
setCalculatedName(index, input) {
|
|
7641
|
+
this.setCalculated(index, 'name', input.value);
|
|
7642
|
+
input.value = this.report().calculatedFields?.[index]?.name ?? '';
|
|
7643
|
+
}
|
|
7644
|
+
setParameterName(index, input) {
|
|
7645
|
+
this.setParameter(index, 'name', input.value);
|
|
7646
|
+
input.value = this.report().parameters?.[index]?.name ?? '';
|
|
7647
|
+
}
|
|
7648
|
+
setCalculated(index, key, value) {
|
|
7649
|
+
this.state.update((d) => {
|
|
7650
|
+
const f = d.calculatedFields?.[index];
|
|
7651
|
+
if (!f)
|
|
7652
|
+
return;
|
|
7653
|
+
// A name is used as [name] in formulas: letters, digits and underscores only.
|
|
7654
|
+
if (key === 'name')
|
|
7655
|
+
f.name = value.replace(/[^\p{L}\p{N}_]/gu, '');
|
|
7656
|
+
else
|
|
7657
|
+
f.expression = value;
|
|
7658
|
+
}, `calc-${index}-${key}`);
|
|
7659
|
+
}
|
|
7660
|
+
removeCalculated(index) {
|
|
7661
|
+
this.state.update((d) => {
|
|
7662
|
+
d.calculatedFields = (d.calculatedFields ?? []).filter((_, i) => i !== index);
|
|
7663
|
+
if (!d.calculatedFields.length)
|
|
7664
|
+
delete d.calculatedFields;
|
|
7665
|
+
});
|
|
7666
|
+
}
|
|
6306
7667
|
removeParameter(index) {
|
|
6307
7668
|
this.state.update((d) => {
|
|
6308
7669
|
d.parameters = (d.parameters ?? []).filter((_, i) => i !== index);
|
|
@@ -6325,12 +7686,12 @@ class DataSourcesDialogComponent {
|
|
|
6325
7686
|
return `source${n}`;
|
|
6326
7687
|
}
|
|
6327
7688
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DataSourcesDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6328
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DataSourcesDialogComponent, isStandalone: true, selector: "we-report-data-sources-dialog", inputs: { strings: { classPropertyName: "strings", publicName: "strings", isSignal: true, isRequired: true, transformFunction: null }, fetchFn: { classPropertyName: "fetchFn", publicName: "fetchFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "@let s = strings();\n<div class=\"dsd__backdrop\" (click)=\"closed.emit()\"></div>\n<div class=\"dsd\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.dataSources\">\n <header class=\"dsd__head\">\n <h2>{{ s.dataSources }}</h2>\n <button type=\"button\" class=\"dsd__close\" (click)=\"closed.emit()\" [attr.aria-label]=\"s.close\">\u00D7</button>\n </header>\n\n <div class=\"dsd__body\">\n <nav class=\"dsd__list\">\n @for (src of report().dataSources; track src.id) {\n <button type=\"button\" class=\"dsd__item\" [class.dsd__item--on]=\"src.id === source()?.id\" (click)=\"select(src.id)\">\n <span>{{ src.name }}</span>\n <small>{{ kindLabel(src) }}@if (report().dataMember?.dataSourceId === src.id) { \u00B7 {{ s.rowsSource }} }</small>\n </button>\n } @empty {\n <p class=\"dsd__hint\">{{ s.noSources }}</p>\n }\n <div class=\"dsd__add\">\n <button type=\"button\" (click)=\"add('json')\">+ JSON</button>\n <button type=\"button\" (click)=\"add('csv')\">+ CSV / Excel</button>\n <button type=\"button\" (click)=\"add('webService')\">+ {{ s.webService }}</button>\n <button type=\"button\" (click)=\"add('database')\">+ {{ s.database }}</button>\n </div>\n\n <h3>{{ s.parameters }}</h3>\n <p class=\"dsd__hint\">{{ s.parametersHint }}</p>\n @for (p of report().parameters ?? []; track $index; let i = $index) {\n <div class=\"dsd__param\">\n <input [value]=\"p.name\" (input)=\"setParameter(i, 'name', $any($event.target).value)\" [attr.aria-label]=\"s.parameterName\" spellcheck=\"false\" />\n <select (change)=\"setParameter(i, 'type', $any($event.target).value)\" [attr.aria-label]=\"s.parameterType\">\n @for (t of types; track t) {\n <option [value]=\"t\" [selected]=\"t === p.type\">{{ typeLabel(t) }}</option>\n }\n </select>\n <input [value]=\"p.label ?? ''\" (input)=\"setParameter(i, 'label', $any($event.target).value)\" [placeholder]=\"s.parameterLabel\" />\n <input [value]=\"p.defaultValue ?? ''\" (input)=\"setParameter(i, 'defaultValue', $any($event.target).value)\" [placeholder]=\"s.defaultValue\" />\n <button type=\"button\" class=\"dsd__icon\" (click)=\"removeParameter(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n <code class=\"dsd__use\">[?{{ p.name }}] \u00B7 {{ '{{' }}{{ p.name }}{{ '}}' }}</code>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addParameter()\">+ {{ s.addParameter }}</button>\n </nav>\n\n <section class=\"dsd__editor\">\n @if (source(); as src) {\n <label class=\"dsd__field\">\n <span>{{ s.sourceName }}</span>\n <input [value]=\"src.name\" (input)=\"setName($any($event.target).value)\" />\n </label>\n\n <div class=\"dsd__rows\">\n @if (isMain()) {\n <label class=\"dsd__field\">\n <span>{{ s.dataRows }}</span>\n <input list=\"dsd-paths\" [value]=\"report().dataMember?.path ?? ''\" (input)=\"setRowsPath($any($event.target).value)\" spellcheck=\"false\" [placeholder]=\"s.wholeData\" />\n <datalist id=\"dsd-paths\">\n @for (p of listPaths(); track p) {\n <option [value]=\"p\"></option>\n }\n </datalist>\n <small class=\"dsd__hint\">{{ s.dataRowsHint }} \u00B7 {{ s.rowCount.replace('{0}', '' + rowCount()) }}</small>\n </label>\n } @else {\n <button type=\"button\" class=\"dsd__link\" (click)=\"useForRows()\">{{ s.useForRows }}</button>\n }\n </div>\n\n @switch (src.kind) {\n @case ('json') {\n <label class=\"dsd__field dsd__grow\">\n <span>{{ s.jsonData }}</span>\n <textarea spellcheck=\"false\" [value]=\"jsonText(src)\" (change)=\"setJson($any($event.target).value)\"></textarea>\n </label>\n @if (jsonError(); as err) {\n <p class=\"dsd__error\">{{ err }}</p>\n }\n }\n @case ('csv') {\n <label class=\"dsd__field dsd__grow\">\n <span>{{ s.csvData }}</span>\n <textarea spellcheck=\"false\" [value]=\"src.text\" (input)=\"setCsv($any($event.target).value)\"></textarea>\n <small class=\"dsd__hint\">{{ s.rowCount.replace('{0}', '' + csvRows(src)) }}</small>\n </label>\n }\n @case ('webService') {\n @let w = web(src)!;\n <div class=\"dsd__inline\">\n <select (change)=\"setWeb('method', $any($event.target).value)\" [attr.aria-label]=\"s.method\">\n <option value=\"GET\" [selected]=\"(w.method ?? 'GET') === 'GET'\">GET</option>\n <option value=\"POST\" [selected]=\"w.method === 'POST'\">POST</option>\n </select>\n <input class=\"dsd__url\" [value]=\"w.url\" (input)=\"setWeb('url', $any($event.target).value)\" [attr.aria-label]=\"s.url\" spellcheck=\"false\" placeholder=\"https://api.example.com/orders?from={{ '{{' }}from{{ '}}' }}\" />\n <button type=\"button\" class=\"dsd__primary\" (click)=\"test()\" [disabled]=\"testing()\">{{ testing() ? s.testing : s.test }}</button>\n </div>\n @if (testResult(); as r) {\n <p [class.dsd__ok]=\"r.ok\" [class.dsd__error]=\"!r.ok\">{{ r.message }}</p>\n }\n <div class=\"dsd__field\">\n <span>{{ s.headers }}</span>\n @for (h of w.headers ?? []; track $index; let i = $index) {\n <div class=\"dsd__inline\">\n <input [value]=\"h.name\" (input)=\"setHeader(i, 'name', $any($event.target).value)\" placeholder=\"Authorization\" [attr.aria-label]=\"s.headerName\" />\n <input [value]=\"h.value\" (input)=\"setHeader(i, 'value', $any($event.target).value)\" placeholder=\"Bearer {{ '{{' }}token{{ '}}' }}\" [attr.aria-label]=\"s.headerValue\" />\n <button type=\"button\" class=\"dsd__icon\" (click)=\"removeHeader(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addHeader()\">+ {{ s.addHeader }}</button>\n </div>\n @if (w.method === 'POST') {\n <label class=\"dsd__field\">\n <span>{{ s.requestBody }}</span>\n <textarea spellcheck=\"false\" rows=\"4\" [value]=\"w.body ?? ''\" (input)=\"setWeb('body', $any($event.target).value)\"></textarea>\n </label>\n }\n <label class=\"dsd__check\">\n <input type=\"checkbox\" [checked]=\"w.via === 'backend'\" (change)=\"setWeb('via', $any($event.target).checked ? 'backend' : '')\" />\n <span>{{ s.viaBackend }}<small class=\"dsd__hint\">{{ s.viaBackendHint }}</small></span>\n </label>\n <p class=\"dsd__warning\">{{ s.secretWarning }}</p>\n }\n @case ('database') {\n <we-report-database-source-editor\n [source]=\"db(src)!\"\n [parameters]=\"report().parameters ?? []\"\n [strings]=\"s\"\n [fetchFn]=\"fetchFn()\"\n (edit)=\"applyDbEdit($event)\"\n />\n }\n }\n <button type=\"button\" class=\"dsd__danger\" (click)=\"remove()\">{{ s.removeSource }}</button>\n } @else {\n <p class=\"dsd__hint\">{{ s.noSources }}</p>\n }\n </section>\n </div>\n</div>\n", styles: [":host{font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;letter-spacing:-.003em}.dsd__backdrop{position:fixed;inset:0;z-index:100;background:var(--we-report-backdrop, rgba(0, 0, 0, .22));animation:dsd-fade .18s ease-out}.dsd{position:fixed;top:50%;left:50%;z-index:101;transform:translate(-50%,-50%);display:flex;flex-direction:column;width:min(960px,100vw - 32px);height:min(680px,100vh - 32px);border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);color:var(--we-report-fg, #1d1d1f);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));overflow:hidden;animation:dsd-pop .2s ease-out}@keyframes dsd-fade{0%{opacity:0}}@keyframes dsd-pop{0%{opacity:0;transform:translate(-50%,-48%) scale(.98)}}@media (prefers-reduced-motion: reduce){.dsd__backdrop,.dsd{animation:none}input,select,textarea,button{transition:none!important}}.dsd__head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__head h2{margin:0;font-size:15px;font-weight:600}.dsd__close{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:0;border-radius:50%;background:var(--we-report-hover-bg, rgba(118, 118, 128, .12));font-size:17px;line-height:1;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));cursor:pointer}.dsd__body{flex:1;display:grid;grid-template-columns:330px minmax(0,1fr);min-height:0}.dsd__list{display:flex;flex-direction:column;gap:4px;padding:12px;overflow:auto;background:var(--we-report-workspace-bg, #f2f2f7);border-right:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__list h3{margin:16px 4px 2px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.dsd__item{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsd__item:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__item small{color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.dsd__item--on,.dsd__item--on:hover{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.dsd__item--on small,.dsd__item--on:hover small{color:inherit;opacity:.8}.dsd__add{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}.dsd__add button{padding:7px 8px;border:0;border-radius:8px;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font:inherit;font-weight:500;cursor:pointer}.dsd__add button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__param{display:grid;grid-template-columns:1fr 90px 26px;gap:4px;padding:8px;border-radius:10px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__param input:nth-of-type(2),.dsd__param input:nth-of-type(3){grid-column:1/3}.dsd__use{grid-column:1/-1;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.dsd__editor{display:flex;flex-direction:column;gap:12px;padding:16px 20px;overflow:auto}.dsd__field{display:flex;flex-direction:column;gap:4px}.dsd__field>span{font-weight:500}.dsd__grow{flex:1}.dsd__grow textarea{flex:1;min-height:240px}.dsd__inline{display:flex;gap:6px;align-items:center}.dsd__inline input{flex:1}.dsd__url{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}input,select,textarea{box-sizing:border-box;font:inherit;padding:6px 9px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;min-width:0;transition:box-shadow .15s ease}input:focus,select:focus,textarea:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}textarea{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:12px}button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.dsd__hint{margin:0;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.dsd__link{align-self:flex-start;border:0;padding:0;background:none;color:var(--we-report-accent, #007aff);font:inherit;cursor:pointer}.dsd__icon{border:0;border-radius:6px;background:transparent;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));cursor:pointer}.dsd__icon:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__primary{padding:6px 16px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);font:inherit;font-weight:500;cursor:pointer}.dsd__primary:disabled{opacity:.4;cursor:default}.dsd__ok,.dsd__error,.dsd__warning{margin:0;padding:8px 12px;border-radius:10px;font-size:12px}.dsd__ok{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.dsd__error,.dsd__warning{background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #b25000)}.dsd__danger{align-self:flex-start;margin-top:auto;padding:7px 14px;border:0;border-radius:8px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #b25000);font:inherit;font-weight:500;cursor:pointer}.dsd__check{display:flex;align-items:flex-start;gap:6px;cursor:pointer}.dsd__check small{display:block}\n"], dependencies: [{ kind: "component", type: DatabaseSourceEditorComponent, selector: "we-report-database-source-editor", inputs: ["source", "parameters", "strings", "fetchFn"], outputs: ["edit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DataSourcesDialogComponent, isStandalone: true, selector: "we-report-data-sources-dialog", inputs: { strings: { classPropertyName: "strings", publicName: "strings", isSignal: true, isRequired: true, transformFunction: null }, fetchFn: { classPropertyName: "fetchFn", publicName: "fetchFn", isSignal: true, isRequired: false, transformFunction: null }, hostData: { classPropertyName: "hostData", publicName: "hostData", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }], ngImport: i0, template: "@let s = strings();\n<div class=\"dsd__backdrop\" (click)=\"closed.emit()\"></div>\n<div #dialog class=\"dsd\" role=\"dialog\" aria-modal=\"true\" tabindex=\"-1\" [attr.aria-label]=\"s.dataSources\" (keydown.escape)=\"onEscape($event)\">\n <header class=\"dsd__head\">\n <h2>{{ s.dataSources }}</h2>\n <button type=\"button\" class=\"dsd__close\" (click)=\"closed.emit()\" [attr.aria-label]=\"s.close\">\u00D7</button>\n </header>\n\n <div class=\"dsd__body\">\n <nav class=\"dsd__list\">\n @for (src of report().dataSources; track src.id) {\n <button type=\"button\" class=\"dsd__item\" [class.dsd__item--on]=\"src.id === source()?.id\" (click)=\"select(src.id)\">\n <span>{{ src.name }}</span>\n <small>{{ kindLabel(src) }}@if (report().dataMember?.dataSourceId === src.id) { \u00B7 {{ s.rowsSource }} }</small>\n </button>\n } @empty {\n <p class=\"dsd__hint\">{{ s.noSources }}</p>\n }\n <div class=\"dsd__add\">\n <button type=\"button\" (click)=\"add('json')\">+ JSON</button>\n <button type=\"button\" (click)=\"add('csv')\">+ CSV / Excel</button>\n <button type=\"button\" (click)=\"add('webService')\">+ {{ s.webService }}</button>\n <button type=\"button\" (click)=\"add('database')\">+ {{ s.database }}</button>\n </div>\n\n <h3>{{ s.parameters }}</h3>\n <p class=\"dsd__hint\">{{ s.parametersHint }}</p>\n @for (p of report().parameters ?? []; track $index; let i = $index) {\n <div class=\"dsd__param\">\n <input [value]=\"p.name\" (input)=\"setParameterName(i, $any($event.target))\" [attr.aria-label]=\"s.parameterName\" spellcheck=\"false\" />\n <select (change)=\"setParameter(i, 'type', $any($event.target).value)\" [attr.aria-label]=\"s.parameterType\">\n @for (t of types; track t) {\n <option [value]=\"t\" [selected]=\"t === p.type\">{{ typeLabel(t) }}</option>\n }\n </select>\n <input [value]=\"p.label ?? ''\" (input)=\"setParameter(i, 'label', $any($event.target).value)\" [placeholder]=\"s.parameterLabel\" />\n <input [value]=\"p.defaultValue ?? ''\" (input)=\"setParameter(i, 'defaultValue', $any($event.target).value)\" [placeholder]=\"s.defaultValue\" />\n <button type=\"button\" class=\"dsd__icon\" (click)=\"removeParameter(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n @if (!choicesKey(p)) {\n <input class=\"dsd__choices\" [value]=\"choicesText(p)\" (change)=\"setChoices(i, 'values', $any($event.target).value)\" [placeholder]=\"s.parameterChoices\" />\n }\n @if (!choicesText(p) && choiceFields().length) {\n <select class=\"dsd__choices\" (change)=\"setChoices(i, 'field', $any($event.target).value)\" [attr.aria-label]=\"s.parameterChoicesFrom\">\n <option value=\"\" [selected]=\"!choicesKey(p)\">{{ s.parameterChoicesFrom }}: {{ s.parameterNoList }}</option>\n @for (f of choiceFields(); track f.key) {\n <option [value]=\"f.key\" [selected]=\"f.key === choicesKey(p)\">{{ f.label }}</option>\n }\n </select>\n }\n <code class=\"dsd__use\">[?{{ p.name }}] \u00B7 {{ '{{' }}{{ p.name }}{{ '}}' }}</code>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addParameter()\">+ {{ s.addParameter }}</button>\n\n <h3>{{ s.calculatedFields }}</h3>\n <p class=\"dsd__hint\">{{ s.calculatedFieldsHint }}</p>\n @for (f of report().calculatedFields ?? []; track $index; let i = $index) {\n <div class=\"dsd__param\">\n <input class=\"dsd__calc-name\" [value]=\"f.name\" (input)=\"setCalculatedName(i, $any($event.target))\" [attr.aria-label]=\"s.calculatedFieldName\" spellcheck=\"false\" />\n <button type=\"button\" class=\"dsd__icon dsd__calc-remove\" (click)=\"removeCalculated(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n <input class=\"dsd__choices dsd__mono\" [value]=\"f.expression\" (input)=\"setCalculated(i, 'expression', $any($event.target).value)\" placeholder=\"[qty] * [price]\" [attr.aria-label]=\"s.expression\" spellcheck=\"false\" />\n <code class=\"dsd__use\">[{{ f.name }}]</code>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addCalculated()\">+ {{ s.addCalculatedField }}</button>\n </nav>\n\n <section class=\"dsd__editor\">\n @if (source(); as src) {\n <label class=\"dsd__field\">\n <span>{{ s.sourceName }}</span>\n <input [value]=\"src.name\" (input)=\"setName($any($event.target).value)\" />\n </label>\n\n <div class=\"dsd__rows\">\n @if (isMain()) {\n <label class=\"dsd__field\">\n <span>{{ s.dataRows }}</span>\n <input list=\"dsd-paths\" [value]=\"report().dataMember?.path ?? ''\" (input)=\"setRowsPath($any($event.target).value)\" spellcheck=\"false\" [placeholder]=\"s.wholeData\" />\n <datalist id=\"dsd-paths\">\n @for (p of listPaths(); track p) {\n <option [value]=\"p\"></option>\n }\n </datalist>\n <small class=\"dsd__hint\">{{ s.dataRowsHint }} \u00B7 {{ s.rowCount.replace('{0}', '' + rowCount()) }}</small>\n </label>\n @if (hostData()) {\n <p class=\"dsd__hint\">{{ s.hostDataNote }}</p>\n }\n } @else {\n <button type=\"button\" class=\"dsd__link\" (click)=\"useForRows()\">{{ s.useForRows }}</button>\n }\n </div>\n\n @switch (src.kind) {\n @case ('json') {\n <label class=\"dsd__field dsd__grow\">\n <span>{{ s.jsonData }}</span>\n <textarea spellcheck=\"false\" [value]=\"jsonText(src)\" (change)=\"setJson($any($event.target).value)\"></textarea>\n </label>\n @if (jsonError(); as err) {\n <p class=\"dsd__error\">{{ err }}</p>\n }\n }\n @case ('csv') {\n <label class=\"dsd__field dsd__grow\">\n <span>{{ s.csvData }}</span>\n <textarea spellcheck=\"false\" [value]=\"src.text\" (input)=\"setCsv($any($event.target).value)\"></textarea>\n <small class=\"dsd__hint\">{{ s.rowCount.replace('{0}', '' + csvRows(src)) }}</small>\n </label>\n }\n @case ('webService') {\n @let w = web(src)!;\n <div class=\"dsd__inline\">\n <select (change)=\"setWeb('method', $any($event.target).value)\" [attr.aria-label]=\"s.method\">\n <option value=\"GET\" [selected]=\"(w.method ?? 'GET') === 'GET'\">GET</option>\n <option value=\"POST\" [selected]=\"w.method === 'POST'\">POST</option>\n </select>\n <input class=\"dsd__url\" [value]=\"w.url\" (input)=\"setWeb('url', $any($event.target).value)\" [attr.aria-label]=\"s.url\" spellcheck=\"false\" placeholder=\"https://api.example.com/orders?from={{ '{{' }}from{{ '}}' }}\" />\n <button type=\"button\" class=\"dsd__primary\" (click)=\"test()\" [disabled]=\"testing()\">{{ testing() ? s.testing : s.test }}</button>\n </div>\n @if (testResult(); as r) {\n <p [class.dsd__ok]=\"r.ok\" [class.dsd__error]=\"!r.ok\">{{ r.message }}</p>\n }\n <div class=\"dsd__field\">\n <span>{{ s.headers }}</span>\n @for (h of w.headers ?? []; track $index; let i = $index) {\n <div class=\"dsd__inline\">\n <input [value]=\"h.name\" (input)=\"setHeader(i, 'name', $any($event.target).value)\" placeholder=\"Authorization\" [attr.aria-label]=\"s.headerName\" />\n <input [value]=\"h.value\" (input)=\"setHeader(i, 'value', $any($event.target).value)\" placeholder=\"Bearer {{ '{{' }}token{{ '}}' }}\" [attr.aria-label]=\"s.headerValue\" />\n <button type=\"button\" class=\"dsd__icon\" (click)=\"removeHeader(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addHeader()\">+ {{ s.addHeader }}</button>\n </div>\n @if (w.method === 'POST') {\n <label class=\"dsd__field\">\n <span>{{ s.requestBody }}</span>\n <textarea spellcheck=\"false\" rows=\"4\" [value]=\"w.body ?? ''\" (input)=\"setWeb('body', $any($event.target).value)\"></textarea>\n </label>\n }\n <label class=\"dsd__check\">\n <input type=\"checkbox\" [checked]=\"!!w.paging\" (change)=\"setPaging($any($event.target).checked ? '50' : '')\" />\n <span>{{ s.paging }}<small class=\"dsd__hint\">{{ s.pagingHint }}</small></span>\n </label>\n @if (w.paging) {\n <label class=\"dsd__field\">\n <span>{{ s.pageSize }}</span>\n <input type=\"number\" min=\"1\" step=\"1\" [value]=\"w.paging.size\" (input)=\"setPaging($any($event.target).value)\" />\n </label>\n }\n <label class=\"dsd__check\">\n <input type=\"checkbox\" [checked]=\"w.via === 'backend'\" (change)=\"setWeb('via', $any($event.target).checked ? 'backend' : '')\" />\n <span>{{ s.viaBackend }}<small class=\"dsd__hint\">{{ s.viaBackendHint }}</small></span>\n </label>\n <p class=\"dsd__warning\">{{ s.secretWarning }}</p>\n }\n @case ('database') {\n <we-report-database-source-editor\n [source]=\"db(src)!\"\n [parameters]=\"report().parameters ?? []\"\n [strings]=\"s\"\n [fetchFn]=\"fetchFn()\"\n (edit)=\"applyDbEdit($event)\"\n />\n }\n }\n <button type=\"button\" class=\"dsd__danger\" (click)=\"remove()\">{{ s.removeSource }}</button>\n } @else {\n <p class=\"dsd__hint\">{{ s.noSources }}</p>\n }\n </section>\n </div>\n</div>\n", styles: [":host{font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;letter-spacing:-.003em}.dsd__backdrop{position:fixed;inset:0;z-index:100;background:var(--we-report-backdrop, rgba(0, 0, 0, .22));animation:dsd-fade .18s ease-out}.dsd{position:fixed;top:50%;left:50%;z-index:101;transform:translate(-50%,-50%);display:flex;flex-direction:column;width:min(960px,100vw - 32px);height:min(680px,100vh - 32px);border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);color:var(--we-report-fg, #1d1d1f);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));overflow:hidden;animation:dsd-pop .2s ease-out}@keyframes dsd-fade{0%{opacity:0}}@keyframes dsd-pop{0%{opacity:0;transform:translate(-50%,-48%) scale(.98)}}@media (prefers-reduced-motion: reduce){.dsd__backdrop,.dsd{animation:none}input,select,textarea,button{transition:none!important}}.dsd__head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__head h2{margin:0;font-size:15px;font-weight:600}.dsd__close{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:0;border-radius:50%;background:var(--we-report-hover-bg, rgba(118, 118, 128, .12));font-size:17px;line-height:1;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));cursor:pointer}.dsd__body{flex:1;display:grid;grid-template-columns:330px minmax(0,1fr);min-height:0}.dsd__list{display:flex;flex-direction:column;gap:4px;padding:12px;overflow:auto;background:var(--we-report-workspace-bg, #f2f2f7);border-right:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__list h3{margin:16px 4px 2px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dsd__item{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsd__item:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__item small{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dsd__item--on,.dsd__item--on:hover{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.dsd__item--on small,.dsd__item--on:hover small{color:inherit;opacity:.8}.dsd__add{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}.dsd__add button{padding:7px 8px;border:0;border-radius:8px;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font:inherit;font-weight:500;cursor:pointer}.dsd__add button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__param{display:grid;grid-template-columns:1fr 90px 26px;gap:4px;padding:8px;border-radius:10px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__param input:nth-of-type(2),.dsd__param input:nth-of-type(3){grid-column:1/3}.dsd__use{grid-column:1/-1;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dsd__editor{display:flex;flex-direction:column;gap:12px;padding:16px 20px;overflow:auto}.dsd__field{display:flex;flex-direction:column;gap:4px}.dsd__field>span{font-weight:500}.dsd__grow{flex:1}.dsd__grow textarea{flex:1;min-height:240px}.dsd__inline{display:flex;gap:6px;align-items:center}.dsd__inline input{flex:1}.dsd__url{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}input,select,textarea{box-sizing:border-box;font:inherit;padding:6px 9px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;min-width:0;transition:box-shadow .15s ease}input:focus,select:focus,textarea:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}textarea{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:12px}button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.dsd__hint{margin:0;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dsd__link{align-self:flex-start;border:0;padding:0;background:none;color:var(--we-report-accent, #007aff);font:inherit;cursor:pointer}.dsd__icon{border:0;border-radius:6px;background:transparent;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));cursor:pointer}.dsd__icon:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__primary{padding:6px 16px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);font:inherit;font-weight:500;cursor:pointer}.dsd__primary:disabled{opacity:.4;cursor:default}.dsd__ok,.dsd__error,.dsd__warning{margin:0;padding:8px 12px;border-radius:10px;font-size:12px}.dsd__ok{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.dsd__error,.dsd__warning{background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400)}.dsd__danger{align-self:flex-start;margin-top:auto;padding:7px 14px;border:0;border-radius:8px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400);font:inherit;font-weight:500;cursor:pointer}.dsd__check{display:flex;align-items:flex-start;gap:6px;cursor:pointer}.dsd__check small{display:block}.dsd__choices{grid-column:1/-1;min-width:0}.dsd__calc-name{grid-column:1/3}.dsd__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}.dsd:focus{outline:none}\n"], dependencies: [{ kind: "component", type: DatabaseSourceEditorComponent, selector: "we-report-database-source-editor", inputs: ["source", "parameters", "strings", "fetchFn"], outputs: ["edit"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6329
7690
|
}
|
|
6330
7691
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DataSourcesDialogComponent, decorators: [{
|
|
6331
7692
|
type: Component,
|
|
6332
|
-
args: [{ selector: 'we-report-data-sources-dialog', standalone: true, imports: [DatabaseSourceEditorComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let s = strings();\n<div class=\"dsd__backdrop\" (click)=\"closed.emit()\"></div>\n<div class=\"dsd\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.dataSources\">\n <header class=\"dsd__head\">\n <h2>{{ s.dataSources }}</h2>\n <button type=\"button\" class=\"dsd__close\" (click)=\"closed.emit()\" [attr.aria-label]=\"s.close\">\u00D7</button>\n </header>\n\n <div class=\"dsd__body\">\n <nav class=\"dsd__list\">\n @for (src of report().dataSources; track src.id) {\n <button type=\"button\" class=\"dsd__item\" [class.dsd__item--on]=\"src.id === source()?.id\" (click)=\"select(src.id)\">\n <span>{{ src.name }}</span>\n <small>{{ kindLabel(src) }}@if (report().dataMember?.dataSourceId === src.id) { \u00B7 {{ s.rowsSource }} }</small>\n </button>\n } @empty {\n <p class=\"dsd__hint\">{{ s.noSources }}</p>\n }\n <div class=\"dsd__add\">\n <button type=\"button\" (click)=\"add('json')\">+ JSON</button>\n <button type=\"button\" (click)=\"add('csv')\">+ CSV / Excel</button>\n <button type=\"button\" (click)=\"add('webService')\">+ {{ s.webService }}</button>\n <button type=\"button\" (click)=\"add('database')\">+ {{ s.database }}</button>\n </div>\n\n <h3>{{ s.parameters }}</h3>\n <p class=\"dsd__hint\">{{ s.parametersHint }}</p>\n @for (p of report().parameters ?? []; track $index; let i = $index) {\n <div class=\"dsd__param\">\n <input [value]=\"p.name\" (input)=\"setParameter(i, 'name', $any($event.target).value)\" [attr.aria-label]=\"s.parameterName\" spellcheck=\"false\" />\n <select (change)=\"setParameter(i, 'type', $any($event.target).value)\" [attr.aria-label]=\"s.parameterType\">\n @for (t of types; track t) {\n <option [value]=\"t\" [selected]=\"t === p.type\">{{ typeLabel(t) }}</option>\n }\n </select>\n <input [value]=\"p.label ?? ''\" (input)=\"setParameter(i, 'label', $any($event.target).value)\" [placeholder]=\"s.parameterLabel\" />\n <input [value]=\"p.defaultValue ?? ''\" (input)=\"setParameter(i, 'defaultValue', $any($event.target).value)\" [placeholder]=\"s.defaultValue\" />\n <button type=\"button\" class=\"dsd__icon\" (click)=\"removeParameter(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n <code class=\"dsd__use\">[?{{ p.name }}] \u00B7 {{ '{{' }}{{ p.name }}{{ '}}' }}</code>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addParameter()\">+ {{ s.addParameter }}</button>\n </nav>\n\n <section class=\"dsd__editor\">\n @if (source(); as src) {\n <label class=\"dsd__field\">\n <span>{{ s.sourceName }}</span>\n <input [value]=\"src.name\" (input)=\"setName($any($event.target).value)\" />\n </label>\n\n <div class=\"dsd__rows\">\n @if (isMain()) {\n <label class=\"dsd__field\">\n <span>{{ s.dataRows }}</span>\n <input list=\"dsd-paths\" [value]=\"report().dataMember?.path ?? ''\" (input)=\"setRowsPath($any($event.target).value)\" spellcheck=\"false\" [placeholder]=\"s.wholeData\" />\n <datalist id=\"dsd-paths\">\n @for (p of listPaths(); track p) {\n <option [value]=\"p\"></option>\n }\n </datalist>\n <small class=\"dsd__hint\">{{ s.dataRowsHint }} \u00B7 {{ s.rowCount.replace('{0}', '' + rowCount()) }}</small>\n </label>\n } @else {\n <button type=\"button\" class=\"dsd__link\" (click)=\"useForRows()\">{{ s.useForRows }}</button>\n }\n </div>\n\n @switch (src.kind) {\n @case ('json') {\n <label class=\"dsd__field dsd__grow\">\n <span>{{ s.jsonData }}</span>\n <textarea spellcheck=\"false\" [value]=\"jsonText(src)\" (change)=\"setJson($any($event.target).value)\"></textarea>\n </label>\n @if (jsonError(); as err) {\n <p class=\"dsd__error\">{{ err }}</p>\n }\n }\n @case ('csv') {\n <label class=\"dsd__field dsd__grow\">\n <span>{{ s.csvData }}</span>\n <textarea spellcheck=\"false\" [value]=\"src.text\" (input)=\"setCsv($any($event.target).value)\"></textarea>\n <small class=\"dsd__hint\">{{ s.rowCount.replace('{0}', '' + csvRows(src)) }}</small>\n </label>\n }\n @case ('webService') {\n @let w = web(src)!;\n <div class=\"dsd__inline\">\n <select (change)=\"setWeb('method', $any($event.target).value)\" [attr.aria-label]=\"s.method\">\n <option value=\"GET\" [selected]=\"(w.method ?? 'GET') === 'GET'\">GET</option>\n <option value=\"POST\" [selected]=\"w.method === 'POST'\">POST</option>\n </select>\n <input class=\"dsd__url\" [value]=\"w.url\" (input)=\"setWeb('url', $any($event.target).value)\" [attr.aria-label]=\"s.url\" spellcheck=\"false\" placeholder=\"https://api.example.com/orders?from={{ '{{' }}from{{ '}}' }}\" />\n <button type=\"button\" class=\"dsd__primary\" (click)=\"test()\" [disabled]=\"testing()\">{{ testing() ? s.testing : s.test }}</button>\n </div>\n @if (testResult(); as r) {\n <p [class.dsd__ok]=\"r.ok\" [class.dsd__error]=\"!r.ok\">{{ r.message }}</p>\n }\n <div class=\"dsd__field\">\n <span>{{ s.headers }}</span>\n @for (h of w.headers ?? []; track $index; let i = $index) {\n <div class=\"dsd__inline\">\n <input [value]=\"h.name\" (input)=\"setHeader(i, 'name', $any($event.target).value)\" placeholder=\"Authorization\" [attr.aria-label]=\"s.headerName\" />\n <input [value]=\"h.value\" (input)=\"setHeader(i, 'value', $any($event.target).value)\" placeholder=\"Bearer {{ '{{' }}token{{ '}}' }}\" [attr.aria-label]=\"s.headerValue\" />\n <button type=\"button\" class=\"dsd__icon\" (click)=\"removeHeader(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addHeader()\">+ {{ s.addHeader }}</button>\n </div>\n @if (w.method === 'POST') {\n <label class=\"dsd__field\">\n <span>{{ s.requestBody }}</span>\n <textarea spellcheck=\"false\" rows=\"4\" [value]=\"w.body ?? ''\" (input)=\"setWeb('body', $any($event.target).value)\"></textarea>\n </label>\n }\n <label class=\"dsd__check\">\n <input type=\"checkbox\" [checked]=\"w.via === 'backend'\" (change)=\"setWeb('via', $any($event.target).checked ? 'backend' : '')\" />\n <span>{{ s.viaBackend }}<small class=\"dsd__hint\">{{ s.viaBackendHint }}</small></span>\n </label>\n <p class=\"dsd__warning\">{{ s.secretWarning }}</p>\n }\n @case ('database') {\n <we-report-database-source-editor\n [source]=\"db(src)!\"\n [parameters]=\"report().parameters ?? []\"\n [strings]=\"s\"\n [fetchFn]=\"fetchFn()\"\n (edit)=\"applyDbEdit($event)\"\n />\n }\n }\n <button type=\"button\" class=\"dsd__danger\" (click)=\"remove()\">{{ s.removeSource }}</button>\n } @else {\n <p class=\"dsd__hint\">{{ s.noSources }}</p>\n }\n </section>\n </div>\n</div>\n", styles: [":host{font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;letter-spacing:-.003em}.dsd__backdrop{position:fixed;inset:0;z-index:100;background:var(--we-report-backdrop, rgba(0, 0, 0, .22));animation:dsd-fade .18s ease-out}.dsd{position:fixed;top:50%;left:50%;z-index:101;transform:translate(-50%,-50%);display:flex;flex-direction:column;width:min(960px,100vw - 32px);height:min(680px,100vh - 32px);border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);color:var(--we-report-fg, #1d1d1f);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));overflow:hidden;animation:dsd-pop .2s ease-out}@keyframes dsd-fade{0%{opacity:0}}@keyframes dsd-pop{0%{opacity:0;transform:translate(-50%,-48%) scale(.98)}}@media (prefers-reduced-motion: reduce){.dsd__backdrop,.dsd{animation:none}input,select,textarea,button{transition:none!important}}.dsd__head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__head h2{margin:0;font-size:15px;font-weight:600}.dsd__close{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:0;border-radius:50%;background:var(--we-report-hover-bg, rgba(118, 118, 128, .12));font-size:17px;line-height:1;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));cursor:pointer}.dsd__body{flex:1;display:grid;grid-template-columns:330px minmax(0,1fr);min-height:0}.dsd__list{display:flex;flex-direction:column;gap:4px;padding:12px;overflow:auto;background:var(--we-report-workspace-bg, #f2f2f7);border-right:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__list h3{margin:16px 4px 2px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.dsd__item{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsd__item:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__item small{color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.dsd__item--on,.dsd__item--on:hover{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.dsd__item--on small,.dsd__item--on:hover small{color:inherit;opacity:.8}.dsd__add{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}.dsd__add button{padding:7px 8px;border:0;border-radius:8px;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font:inherit;font-weight:500;cursor:pointer}.dsd__add button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__param{display:grid;grid-template-columns:1fr 90px 26px;gap:4px;padding:8px;border-radius:10px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__param input:nth-of-type(2),.dsd__param input:nth-of-type(3){grid-column:1/3}.dsd__use{grid-column:1/-1;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.dsd__editor{display:flex;flex-direction:column;gap:12px;padding:16px 20px;overflow:auto}.dsd__field{display:flex;flex-direction:column;gap:4px}.dsd__field>span{font-weight:500}.dsd__grow{flex:1}.dsd__grow textarea{flex:1;min-height:240px}.dsd__inline{display:flex;gap:6px;align-items:center}.dsd__inline input{flex:1}.dsd__url{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}input,select,textarea{box-sizing:border-box;font:inherit;padding:6px 9px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;min-width:0;transition:box-shadow .15s ease}input:focus,select:focus,textarea:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}textarea{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:12px}button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.dsd__hint{margin:0;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.dsd__link{align-self:flex-start;border:0;padding:0;background:none;color:var(--we-report-accent, #007aff);font:inherit;cursor:pointer}.dsd__icon{border:0;border-radius:6px;background:transparent;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));cursor:pointer}.dsd__icon:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__primary{padding:6px 16px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);font:inherit;font-weight:500;cursor:pointer}.dsd__primary:disabled{opacity:.4;cursor:default}.dsd__ok,.dsd__error,.dsd__warning{margin:0;padding:8px 12px;border-radius:10px;font-size:12px}.dsd__ok{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.dsd__error,.dsd__warning{background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #b25000)}.dsd__danger{align-self:flex-start;margin-top:auto;padding:7px 14px;border:0;border-radius:8px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #b25000);font:inherit;font-weight:500;cursor:pointer}.dsd__check{display:flex;align-items:flex-start;gap:6px;cursor:pointer}.dsd__check small{display:block}\n"] }]
|
|
6333
|
-
}] });
|
|
7693
|
+
args: [{ selector: 'we-report-data-sources-dialog', standalone: true, imports: [DatabaseSourceEditorComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let s = strings();\n<div class=\"dsd__backdrop\" (click)=\"closed.emit()\"></div>\n<div #dialog class=\"dsd\" role=\"dialog\" aria-modal=\"true\" tabindex=\"-1\" [attr.aria-label]=\"s.dataSources\" (keydown.escape)=\"onEscape($event)\">\n <header class=\"dsd__head\">\n <h2>{{ s.dataSources }}</h2>\n <button type=\"button\" class=\"dsd__close\" (click)=\"closed.emit()\" [attr.aria-label]=\"s.close\">\u00D7</button>\n </header>\n\n <div class=\"dsd__body\">\n <nav class=\"dsd__list\">\n @for (src of report().dataSources; track src.id) {\n <button type=\"button\" class=\"dsd__item\" [class.dsd__item--on]=\"src.id === source()?.id\" (click)=\"select(src.id)\">\n <span>{{ src.name }}</span>\n <small>{{ kindLabel(src) }}@if (report().dataMember?.dataSourceId === src.id) { \u00B7 {{ s.rowsSource }} }</small>\n </button>\n } @empty {\n <p class=\"dsd__hint\">{{ s.noSources }}</p>\n }\n <div class=\"dsd__add\">\n <button type=\"button\" (click)=\"add('json')\">+ JSON</button>\n <button type=\"button\" (click)=\"add('csv')\">+ CSV / Excel</button>\n <button type=\"button\" (click)=\"add('webService')\">+ {{ s.webService }}</button>\n <button type=\"button\" (click)=\"add('database')\">+ {{ s.database }}</button>\n </div>\n\n <h3>{{ s.parameters }}</h3>\n <p class=\"dsd__hint\">{{ s.parametersHint }}</p>\n @for (p of report().parameters ?? []; track $index; let i = $index) {\n <div class=\"dsd__param\">\n <input [value]=\"p.name\" (input)=\"setParameterName(i, $any($event.target))\" [attr.aria-label]=\"s.parameterName\" spellcheck=\"false\" />\n <select (change)=\"setParameter(i, 'type', $any($event.target).value)\" [attr.aria-label]=\"s.parameterType\">\n @for (t of types; track t) {\n <option [value]=\"t\" [selected]=\"t === p.type\">{{ typeLabel(t) }}</option>\n }\n </select>\n <input [value]=\"p.label ?? ''\" (input)=\"setParameter(i, 'label', $any($event.target).value)\" [placeholder]=\"s.parameterLabel\" />\n <input [value]=\"p.defaultValue ?? ''\" (input)=\"setParameter(i, 'defaultValue', $any($event.target).value)\" [placeholder]=\"s.defaultValue\" />\n <button type=\"button\" class=\"dsd__icon\" (click)=\"removeParameter(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n @if (!choicesKey(p)) {\n <input class=\"dsd__choices\" [value]=\"choicesText(p)\" (change)=\"setChoices(i, 'values', $any($event.target).value)\" [placeholder]=\"s.parameterChoices\" />\n }\n @if (!choicesText(p) && choiceFields().length) {\n <select class=\"dsd__choices\" (change)=\"setChoices(i, 'field', $any($event.target).value)\" [attr.aria-label]=\"s.parameterChoicesFrom\">\n <option value=\"\" [selected]=\"!choicesKey(p)\">{{ s.parameterChoicesFrom }}: {{ s.parameterNoList }}</option>\n @for (f of choiceFields(); track f.key) {\n <option [value]=\"f.key\" [selected]=\"f.key === choicesKey(p)\">{{ f.label }}</option>\n }\n </select>\n }\n <code class=\"dsd__use\">[?{{ p.name }}] \u00B7 {{ '{{' }}{{ p.name }}{{ '}}' }}</code>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addParameter()\">+ {{ s.addParameter }}</button>\n\n <h3>{{ s.calculatedFields }}</h3>\n <p class=\"dsd__hint\">{{ s.calculatedFieldsHint }}</p>\n @for (f of report().calculatedFields ?? []; track $index; let i = $index) {\n <div class=\"dsd__param\">\n <input class=\"dsd__calc-name\" [value]=\"f.name\" (input)=\"setCalculatedName(i, $any($event.target))\" [attr.aria-label]=\"s.calculatedFieldName\" spellcheck=\"false\" />\n <button type=\"button\" class=\"dsd__icon dsd__calc-remove\" (click)=\"removeCalculated(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n <input class=\"dsd__choices dsd__mono\" [value]=\"f.expression\" (input)=\"setCalculated(i, 'expression', $any($event.target).value)\" placeholder=\"[qty] * [price]\" [attr.aria-label]=\"s.expression\" spellcheck=\"false\" />\n <code class=\"dsd__use\">[{{ f.name }}]</code>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addCalculated()\">+ {{ s.addCalculatedField }}</button>\n </nav>\n\n <section class=\"dsd__editor\">\n @if (source(); as src) {\n <label class=\"dsd__field\">\n <span>{{ s.sourceName }}</span>\n <input [value]=\"src.name\" (input)=\"setName($any($event.target).value)\" />\n </label>\n\n <div class=\"dsd__rows\">\n @if (isMain()) {\n <label class=\"dsd__field\">\n <span>{{ s.dataRows }}</span>\n <input list=\"dsd-paths\" [value]=\"report().dataMember?.path ?? ''\" (input)=\"setRowsPath($any($event.target).value)\" spellcheck=\"false\" [placeholder]=\"s.wholeData\" />\n <datalist id=\"dsd-paths\">\n @for (p of listPaths(); track p) {\n <option [value]=\"p\"></option>\n }\n </datalist>\n <small class=\"dsd__hint\">{{ s.dataRowsHint }} \u00B7 {{ s.rowCount.replace('{0}', '' + rowCount()) }}</small>\n </label>\n @if (hostData()) {\n <p class=\"dsd__hint\">{{ s.hostDataNote }}</p>\n }\n } @else {\n <button type=\"button\" class=\"dsd__link\" (click)=\"useForRows()\">{{ s.useForRows }}</button>\n }\n </div>\n\n @switch (src.kind) {\n @case ('json') {\n <label class=\"dsd__field dsd__grow\">\n <span>{{ s.jsonData }}</span>\n <textarea spellcheck=\"false\" [value]=\"jsonText(src)\" (change)=\"setJson($any($event.target).value)\"></textarea>\n </label>\n @if (jsonError(); as err) {\n <p class=\"dsd__error\">{{ err }}</p>\n }\n }\n @case ('csv') {\n <label class=\"dsd__field dsd__grow\">\n <span>{{ s.csvData }}</span>\n <textarea spellcheck=\"false\" [value]=\"src.text\" (input)=\"setCsv($any($event.target).value)\"></textarea>\n <small class=\"dsd__hint\">{{ s.rowCount.replace('{0}', '' + csvRows(src)) }}</small>\n </label>\n }\n @case ('webService') {\n @let w = web(src)!;\n <div class=\"dsd__inline\">\n <select (change)=\"setWeb('method', $any($event.target).value)\" [attr.aria-label]=\"s.method\">\n <option value=\"GET\" [selected]=\"(w.method ?? 'GET') === 'GET'\">GET</option>\n <option value=\"POST\" [selected]=\"w.method === 'POST'\">POST</option>\n </select>\n <input class=\"dsd__url\" [value]=\"w.url\" (input)=\"setWeb('url', $any($event.target).value)\" [attr.aria-label]=\"s.url\" spellcheck=\"false\" placeholder=\"https://api.example.com/orders?from={{ '{{' }}from{{ '}}' }}\" />\n <button type=\"button\" class=\"dsd__primary\" (click)=\"test()\" [disabled]=\"testing()\">{{ testing() ? s.testing : s.test }}</button>\n </div>\n @if (testResult(); as r) {\n <p [class.dsd__ok]=\"r.ok\" [class.dsd__error]=\"!r.ok\">{{ r.message }}</p>\n }\n <div class=\"dsd__field\">\n <span>{{ s.headers }}</span>\n @for (h of w.headers ?? []; track $index; let i = $index) {\n <div class=\"dsd__inline\">\n <input [value]=\"h.name\" (input)=\"setHeader(i, 'name', $any($event.target).value)\" placeholder=\"Authorization\" [attr.aria-label]=\"s.headerName\" />\n <input [value]=\"h.value\" (input)=\"setHeader(i, 'value', $any($event.target).value)\" placeholder=\"Bearer {{ '{{' }}token{{ '}}' }}\" [attr.aria-label]=\"s.headerValue\" />\n <button type=\"button\" class=\"dsd__icon\" (click)=\"removeHeader(i)\" [attr.aria-label]=\"s.delete\">\u00D7</button>\n </div>\n }\n <button type=\"button\" class=\"dsd__link\" (click)=\"addHeader()\">+ {{ s.addHeader }}</button>\n </div>\n @if (w.method === 'POST') {\n <label class=\"dsd__field\">\n <span>{{ s.requestBody }}</span>\n <textarea spellcheck=\"false\" rows=\"4\" [value]=\"w.body ?? ''\" (input)=\"setWeb('body', $any($event.target).value)\"></textarea>\n </label>\n }\n <label class=\"dsd__check\">\n <input type=\"checkbox\" [checked]=\"!!w.paging\" (change)=\"setPaging($any($event.target).checked ? '50' : '')\" />\n <span>{{ s.paging }}<small class=\"dsd__hint\">{{ s.pagingHint }}</small></span>\n </label>\n @if (w.paging) {\n <label class=\"dsd__field\">\n <span>{{ s.pageSize }}</span>\n <input type=\"number\" min=\"1\" step=\"1\" [value]=\"w.paging.size\" (input)=\"setPaging($any($event.target).value)\" />\n </label>\n }\n <label class=\"dsd__check\">\n <input type=\"checkbox\" [checked]=\"w.via === 'backend'\" (change)=\"setWeb('via', $any($event.target).checked ? 'backend' : '')\" />\n <span>{{ s.viaBackend }}<small class=\"dsd__hint\">{{ s.viaBackendHint }}</small></span>\n </label>\n <p class=\"dsd__warning\">{{ s.secretWarning }}</p>\n }\n @case ('database') {\n <we-report-database-source-editor\n [source]=\"db(src)!\"\n [parameters]=\"report().parameters ?? []\"\n [strings]=\"s\"\n [fetchFn]=\"fetchFn()\"\n (edit)=\"applyDbEdit($event)\"\n />\n }\n }\n <button type=\"button\" class=\"dsd__danger\" (click)=\"remove()\">{{ s.removeSource }}</button>\n } @else {\n <p class=\"dsd__hint\">{{ s.noSources }}</p>\n }\n </section>\n </div>\n</div>\n", styles: [":host{font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;letter-spacing:-.003em}.dsd__backdrop{position:fixed;inset:0;z-index:100;background:var(--we-report-backdrop, rgba(0, 0, 0, .22));animation:dsd-fade .18s ease-out}.dsd{position:fixed;top:50%;left:50%;z-index:101;transform:translate(-50%,-50%);display:flex;flex-direction:column;width:min(960px,100vw - 32px);height:min(680px,100vh - 32px);border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);color:var(--we-report-fg, #1d1d1f);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));overflow:hidden;animation:dsd-pop .2s ease-out}@keyframes dsd-fade{0%{opacity:0}}@keyframes dsd-pop{0%{opacity:0;transform:translate(-50%,-48%) scale(.98)}}@media (prefers-reduced-motion: reduce){.dsd__backdrop,.dsd{animation:none}input,select,textarea,button{transition:none!important}}.dsd__head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__head h2{margin:0;font-size:15px;font-weight:600}.dsd__close{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:0;border-radius:50%;background:var(--we-report-hover-bg, rgba(118, 118, 128, .12));font-size:17px;line-height:1;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));cursor:pointer}.dsd__body{flex:1;display:grid;grid-template-columns:330px minmax(0,1fr);min-height:0}.dsd__list{display:flex;flex-direction:column;gap:4px;padding:12px;overflow:auto;background:var(--we-report-workspace-bg, #f2f2f7);border-right:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__list h3{margin:16px 4px 2px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dsd__item{display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.dsd__item:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__item small{color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dsd__item--on,.dsd__item--on:hover{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}.dsd__item--on small,.dsd__item--on:hover small{color:inherit;opacity:.8}.dsd__add{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}.dsd__add button{padding:7px 8px;border:0;border-radius:8px;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff);font:inherit;font-weight:500;cursor:pointer}.dsd__add button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__param{display:grid;grid-template-columns:1fr 90px 26px;gap:4px;padding:8px;border-radius:10px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14))}.dsd__param input:nth-of-type(2),.dsd__param input:nth-of-type(3){grid-column:1/3}.dsd__use{grid-column:1/-1;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dsd__editor{display:flex;flex-direction:column;gap:12px;padding:16px 20px;overflow:auto}.dsd__field{display:flex;flex-direction:column;gap:4px}.dsd__field>span{font-weight:500}.dsd__grow{flex:1}.dsd__grow textarea{flex:1;min-height:240px}.dsd__inline{display:flex;gap:6px;align-items:center}.dsd__inline input{flex:1}.dsd__url{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}input,select,textarea{box-sizing:border-box;font:inherit;padding:6px 9px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;min-width:0;transition:box-shadow .15s ease}input:focus,select:focus,textarea:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}input[type=checkbox]{accent-color:var(--we-report-accent, #007aff)}textarea{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:12px}button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.dsd__hint{margin:0;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.dsd__link{align-self:flex-start;border:0;padding:0;background:none;color:var(--we-report-accent, #007aff);font:inherit;cursor:pointer}.dsd__icon{border:0;border-radius:6px;background:transparent;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));cursor:pointer}.dsd__icon:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.dsd__primary{padding:6px 16px;border:0;border-radius:var(--we-report-control-radius, 7px);background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);font:inherit;font-weight:500;cursor:pointer}.dsd__primary:disabled{opacity:.4;cursor:default}.dsd__ok,.dsd__error,.dsd__warning{margin:0;padding:8px 12px;border-radius:10px;font-size:12px}.dsd__ok{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.dsd__error,.dsd__warning{background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400)}.dsd__danger{align-self:flex-start;margin-top:auto;padding:7px 14px;border:0;border-radius:8px;background:var(--we-report-warning-bg, rgba(255, 149, 0, .12));color:var(--we-report-warning-fg, #9a4400);font:inherit;font-weight:500;cursor:pointer}.dsd__check{display:flex;align-items:flex-start;gap:6px;cursor:pointer}.dsd__check small{display:block}.dsd__choices{grid-column:1/-1;min-width:0}.dsd__calc-name{grid-column:1/3}.dsd__mono{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace}.dsd:focus{outline:none}\n"] }]
|
|
7694
|
+
}], ctorParameters: () => [] });
|
|
6334
7695
|
|
|
6335
7696
|
const WIDTH_KEY = 'we-report-designer.panels';
|
|
6336
7697
|
/** Panel widths, zoom and grid are a per-browser convenience; storage may be unavailable. */
|
|
@@ -6384,8 +7745,13 @@ class WeReportDesignerComponent {
|
|
|
6384
7745
|
zoom = input(1);
|
|
6385
7746
|
/** Fetch used for web-service data sources (testing in the designer and the preview). */
|
|
6386
7747
|
fetchFn = input(undefined);
|
|
7748
|
+
/** When the report is a sub-report: a sample of the row around it, which its `[^.field]` reads. */
|
|
7749
|
+
outerRow = input(undefined);
|
|
7750
|
+
/** Designing a sub-report inside another designer: its page comes from the box (no paper settings). */
|
|
7751
|
+
embedded = input(false);
|
|
6387
7752
|
state = inject(DesignerState);
|
|
6388
7753
|
fontsService = inject(WeReportFontsService);
|
|
7754
|
+
config = inject(WE_REPORT_CONFIG);
|
|
6389
7755
|
defaultLocale = inject(WE_REPORT_LOCALE);
|
|
6390
7756
|
strings = computed(() => this.locale() ?? this.defaultLocale);
|
|
6391
7757
|
toolbox = TOOLBOX_ITEMS;
|
|
@@ -6400,6 +7766,7 @@ class WeReportDesignerComponent {
|
|
|
6400
7766
|
/** Right-click menu: screen position and the band it was opened on. */
|
|
6401
7767
|
contextMenu = signal(null);
|
|
6402
7768
|
canvas = viewChild('canvas');
|
|
7769
|
+
injector = inject(Injector);
|
|
6403
7770
|
host = inject(ElementRef);
|
|
6404
7771
|
surface = viewChild(DesignSurfaceComponent);
|
|
6405
7772
|
shortcutsOpen = signal(false);
|
|
@@ -6525,20 +7892,22 @@ class WeReportDesignerComponent {
|
|
|
6525
7892
|
}
|
|
6526
7893
|
/** Design problems, checked on every edit; field names are judged only when there is data. */
|
|
6527
7894
|
issues = computed(() => {
|
|
6528
|
-
const { rows, parent } = this.fields();
|
|
7895
|
+
const { rows, parent, lists } = this.fields();
|
|
6529
7896
|
const known = rows.length || parent.length;
|
|
6530
7897
|
const inner = this.fields().inner;
|
|
6531
7898
|
const bandOf = (id) => this.state.report().bands.find((b) => b.controls.some((c) => c.id === id))?.id ?? '';
|
|
6532
7899
|
const cut = [...(this.surface()?.cutTexts() ?? [])].map((controlId) => ({ code: 'textCut', severity: 'warning', bandId: bandOf(controlId), controlId }));
|
|
6533
7900
|
return [
|
|
6534
|
-
...checkReport(this.state.report(),
|
|
7901
|
+
...checkReport(this.state.report(),
|
|
7902
|
+
// Lists inside a row are fields too (a sub-report's rows, Count([orders])).
|
|
7903
|
+
known ? [...rows.map((f) => f.path), ...lists] : undefined, known ? parent.map((f) => f.path) : undefined, undefined, inner.length ? inner.map((f) => f.path) : undefined),
|
|
6535
7904
|
...cut,
|
|
6536
7905
|
];
|
|
6537
7906
|
});
|
|
6538
7907
|
/** Show the first data row inside bound controls instead of their formulas. */
|
|
6539
7908
|
showData = signal(readSaved('showData', true, (v) => typeof v === 'boolean'));
|
|
6540
7909
|
sample = computed(() => (this.showData() ? this.state.sample() : null));
|
|
6541
|
-
fields = computed(() => designerFields(this.state.report(), this.data()));
|
|
7910
|
+
fields = computed(() => designerFields(this.state.report(), this.data(), this.outerRow()));
|
|
6542
7911
|
fieldFilter = signal('');
|
|
6543
7912
|
/** The field list narrowed to names containing the filter text. */
|
|
6544
7913
|
shownFields = computed(() => {
|
|
@@ -6581,8 +7950,9 @@ class WeReportDesignerComponent {
|
|
|
6581
7950
|
let sample = null;
|
|
6582
7951
|
try {
|
|
6583
7952
|
const { rows, parent } = resolveReportData(this.state.report(), this.data());
|
|
6584
|
-
|
|
6585
|
-
|
|
7953
|
+
const around = this.outerRow() ?? parent;
|
|
7954
|
+
if (rows?.length || (around !== undefined && around !== null))
|
|
7955
|
+
sample = { row: rows?.[0], rows: rows ?? [], parent: around, calculated: calculatedFieldMap(this.state.report()) };
|
|
6586
7956
|
}
|
|
6587
7957
|
catch {
|
|
6588
7958
|
sample = null;
|
|
@@ -6639,11 +8009,26 @@ class WeReportDesignerComponent {
|
|
|
6639
8009
|
// The surface keeps 24px on the left and 136px on the right for the section labels.
|
|
6640
8010
|
this.setZoom(Math.floor(((el.clientWidth - 24 - 136 - 16) / pagePx) * 20) / 20);
|
|
6641
8011
|
}
|
|
8012
|
+
/** Ctrl + wheel (and a trackpad pinch) zooms around the pointer. */
|
|
6642
8013
|
onCanvasWheel(e) {
|
|
6643
8014
|
if (!(e.ctrlKey || e.metaKey))
|
|
6644
8015
|
return;
|
|
6645
8016
|
e.preventDefault();
|
|
6646
|
-
this.
|
|
8017
|
+
const before = this.zoomLevel();
|
|
8018
|
+
this.setZoom(before + (e.deltaY < 0 ? 0.1 : -0.1));
|
|
8019
|
+
const box = this.canvas()?.nativeElement;
|
|
8020
|
+
const ratio = this.zoomLevel() / before;
|
|
8021
|
+
if (!box || ratio === 1)
|
|
8022
|
+
return;
|
|
8023
|
+
const rect = box.getBoundingClientRect();
|
|
8024
|
+
const x = e.clientX - rect.left;
|
|
8025
|
+
const y = e.clientY - rect.top;
|
|
8026
|
+
const left = (box.scrollLeft + x) * ratio - x;
|
|
8027
|
+
const top = (box.scrollTop + y) * ratio - y;
|
|
8028
|
+
afterNextRender(() => {
|
|
8029
|
+
box.scrollLeft = left;
|
|
8030
|
+
box.scrollTop = top;
|
|
8031
|
+
}, { injector: this.injector });
|
|
6647
8032
|
}
|
|
6648
8033
|
openContextMenu(e) {
|
|
6649
8034
|
const target = e.target;
|
|
@@ -6711,6 +8096,98 @@ class WeReportDesignerComponent {
|
|
|
6711
8096
|
});
|
|
6712
8097
|
this.state.selection.set({ kind: 'controls', ids });
|
|
6713
8098
|
}
|
|
8099
|
+
/** The sub-report whose design is open in its own designer window. */
|
|
8100
|
+
openSubreport = computed(() => {
|
|
8101
|
+
const id = this.state.subreportOpen();
|
|
8102
|
+
const c = id ? this.state.report().bands.flatMap((b) => b.controls).find((x) => x.id === id) : undefined;
|
|
8103
|
+
return c?.type === 'subreport' ? c : null;
|
|
8104
|
+
});
|
|
8105
|
+
/** The sub-report on a page as wide as its box and as tall as its content, as it prints. */
|
|
8106
|
+
subreportDesign = computed(() => {
|
|
8107
|
+
const c = this.openSubreport();
|
|
8108
|
+
if (!c)
|
|
8109
|
+
return null;
|
|
8110
|
+
const p = c.report.page;
|
|
8111
|
+
// Only paper and size are fixed by the box; other page settings stay as edited (so editing
|
|
8112
|
+
// them inside does not reload the inner designer). The layout ignores them for a sub-report.
|
|
8113
|
+
if (p?.paper === 'custom' && p.width === c.width && p.height == null)
|
|
8114
|
+
return c.report;
|
|
8115
|
+
return {
|
|
8116
|
+
...c.report,
|
|
8117
|
+
page: {
|
|
8118
|
+
...p,
|
|
8119
|
+
orientation: p?.orientation ?? 'portrait',
|
|
8120
|
+
displayUnit: p?.displayUnit ?? 'mm',
|
|
8121
|
+
paper: 'custom',
|
|
8122
|
+
width: c.width,
|
|
8123
|
+
height: null,
|
|
8124
|
+
margins: p?.margins ?? { top: 0, right: 0, bottom: 0, left: 0 },
|
|
8125
|
+
},
|
|
8126
|
+
};
|
|
8127
|
+
});
|
|
8128
|
+
/**
|
|
8129
|
+
* Sample data for the sub-report's designer: its rows formula over the first row, else the data
|
|
8130
|
+
* of the source it is bound to (its own, or one of this report's, as in the layout).
|
|
8131
|
+
*/
|
|
8132
|
+
subreportData = computed(() => {
|
|
8133
|
+
const c = this.openSubreport();
|
|
8134
|
+
if (!c)
|
|
8135
|
+
return undefined;
|
|
8136
|
+
const sample = this.state.sample();
|
|
8137
|
+
let rows;
|
|
8138
|
+
if (c.rows?.expression.trim()) {
|
|
8139
|
+
if (!sample)
|
|
8140
|
+
return undefined;
|
|
8141
|
+
try {
|
|
8142
|
+
rows = evaluate(c.rows.expression, sample);
|
|
8143
|
+
}
|
|
8144
|
+
catch {
|
|
8145
|
+
return undefined;
|
|
8146
|
+
}
|
|
8147
|
+
}
|
|
8148
|
+
else {
|
|
8149
|
+
const id = c.report.dataMember?.dataSourceId;
|
|
8150
|
+
if (!id || c.report.dataSources.some((s) => s.id === id))
|
|
8151
|
+
return undefined;
|
|
8152
|
+
const outer = this.state.report().dataSources.find((s) => s.id === id);
|
|
8153
|
+
rows = outer ? sourceValue(outer) : undefined;
|
|
8154
|
+
}
|
|
8155
|
+
if (!Array.isArray(rows))
|
|
8156
|
+
return c.rows?.expression.trim() ? undefined : rows;
|
|
8157
|
+
// The sample row's own rows, as printed (the filter matches them to the row around).
|
|
8158
|
+
const filter = c.filter?.expression.trim();
|
|
8159
|
+
if (!filter || !sample)
|
|
8160
|
+
return rows;
|
|
8161
|
+
const all = rows;
|
|
8162
|
+
const matching = all.filter((row) => {
|
|
8163
|
+
try {
|
|
8164
|
+
return Boolean(evaluate(filter, { row, rows: all, parent: sample.row }));
|
|
8165
|
+
}
|
|
8166
|
+
catch {
|
|
8167
|
+
return false;
|
|
8168
|
+
}
|
|
8169
|
+
});
|
|
8170
|
+
// No match for the sample row: all rows, so the fields can still be designed.
|
|
8171
|
+
return matching.length ? matching : all;
|
|
8172
|
+
});
|
|
8173
|
+
/** The window closes when its sub-report is gone (deleted, or undone away), and takes the focus when it opens. */
|
|
8174
|
+
subreportWindow = effect(() => {
|
|
8175
|
+
const id = this.state.subreportOpen();
|
|
8176
|
+
if (id && !this.openSubreport()) {
|
|
8177
|
+
untracked(() => this.state.subreportOpen.set(null));
|
|
8178
|
+
return;
|
|
8179
|
+
}
|
|
8180
|
+
if (id)
|
|
8181
|
+
setTimeout(() => this.host.nativeElement.querySelector('.wd__subreport')?.focus());
|
|
8182
|
+
}, { allowSignalWrites: true });
|
|
8183
|
+
/** Edits from the sub-report's designer; one undo step per burst of edits here. */
|
|
8184
|
+
setSubreport(id, report) {
|
|
8185
|
+
// The very object the inner designer holds, so it does not reload (and lose its undo history).
|
|
8186
|
+
this.state.updateControls([id], (c) => {
|
|
8187
|
+
if (c.type === 'subreport')
|
|
8188
|
+
c.report = report;
|
|
8189
|
+
}, `subreport-${id}`);
|
|
8190
|
+
}
|
|
6714
8191
|
hasTextSelected = computed(() => this.state.selectedControls().some((c) => c.type === 'text'));
|
|
6715
8192
|
/**
|
|
6716
8193
|
* Sizes the selected texts to what they show on the page (fixed text, or the sample value),
|
|
@@ -6724,7 +8201,7 @@ class WeReportDesignerComponent {
|
|
|
6724
8201
|
const report = this.state.report();
|
|
6725
8202
|
const sizes = new Map();
|
|
6726
8203
|
for (const c of texts) {
|
|
6727
|
-
const shown = this.host.nativeElement.querySelector(`[data-control-id="${CSS.escape(c.id)}"] .ds__text`)?.textContent ?? '';
|
|
8204
|
+
const shown = this.printedText(c) ?? this.host.nativeElement.querySelector(`[data-control-id="${CSS.escape(c.id)}"] .ds__text`)?.textContent ?? '';
|
|
6728
8205
|
const lines = shown.split('\n');
|
|
6729
8206
|
const style = resolveStyle(report, c.style, c.styleOverrides);
|
|
6730
8207
|
const font = fonts.resolve(style.fontFamily, style.bold, style.italic);
|
|
@@ -6736,6 +8213,33 @@ class WeReportDesignerComponent {
|
|
|
6736
8213
|
}
|
|
6737
8214
|
this.state.updateControls([...sizes.keys()], (c) => Object.assign(c, sizes.get(c.id)));
|
|
6738
8215
|
}
|
|
8216
|
+
tidySelection() {
|
|
8217
|
+
this.state.tidy(this.state.selectedControls().map((c) => c.id), this.gridSize());
|
|
8218
|
+
}
|
|
8219
|
+
tidyBand(bandId) {
|
|
8220
|
+
const band = this.state.report().bands.find((b) => b.id === bandId);
|
|
8221
|
+
if (band)
|
|
8222
|
+
this.state.tidy(band.controls.map((c) => c.id), this.gridSize());
|
|
8223
|
+
}
|
|
8224
|
+
/**
|
|
8225
|
+
* What a bound text prints with the first data row, also while *Show data* is off (the page
|
|
8226
|
+
* then shows the formula); `null` when there is no data to evaluate with.
|
|
8227
|
+
* shortcut: inner-list texts use the detail row, so their size may be off; measure them with *Show data* on.
|
|
8228
|
+
*/
|
|
8229
|
+
printedText(c) {
|
|
8230
|
+
const sample = this.state.sample();
|
|
8231
|
+
if (c.type !== 'text' || !isExpression(c.text) || !sample || this.showData())
|
|
8232
|
+
return null;
|
|
8233
|
+
const report = this.state.report();
|
|
8234
|
+
const options = { locale: report.locale || this.config.locale || 'en-US', currency: report.currency || this.config.currency || 'USD' };
|
|
8235
|
+
try {
|
|
8236
|
+
const value = evaluate(c.text.expression, { ...sample, ...options, now: new Date() });
|
|
8237
|
+
return typeof value === 'string' && !c.format ? value : formatValue(value, c.format, options);
|
|
8238
|
+
}
|
|
8239
|
+
catch {
|
|
8240
|
+
return null;
|
|
8241
|
+
}
|
|
8242
|
+
}
|
|
6739
8243
|
/** Shrinks (or grows) a section to just below its lowest item. */
|
|
6740
8244
|
fitBand(bandId) {
|
|
6741
8245
|
this.state.update((d) => {
|
|
@@ -6754,6 +8258,9 @@ class WeReportDesignerComponent {
|
|
|
6754
8258
|
/** Copy and cut also put the items on the system clipboard, so they paste in another tab. */
|
|
6755
8259
|
onCopy(e) {
|
|
6756
8260
|
this.pendingClipboardKey = null;
|
|
8261
|
+
// While a sub-report window is open, the inner designer has the clipboard.
|
|
8262
|
+
if (this.state.subreportOpen())
|
|
8263
|
+
return;
|
|
6757
8264
|
// Text selected on the page (a label, a hint) is copied as text, not as report items.
|
|
6758
8265
|
if (this.tab() !== 'design' || this.isTyping(e) || !document.getSelection()?.isCollapsed || !this.state.copySelection())
|
|
6759
8266
|
return;
|
|
@@ -6765,6 +8272,8 @@ class WeReportDesignerComponent {
|
|
|
6765
8272
|
/** Pastes our items, else a picture (screenshot) or text from any other program. */
|
|
6766
8273
|
onPaste(e) {
|
|
6767
8274
|
this.pendingClipboardKey = null;
|
|
8275
|
+
if (this.state.subreportOpen())
|
|
8276
|
+
return;
|
|
6768
8277
|
if (this.tab() !== 'design' || this.isTyping(e))
|
|
6769
8278
|
return;
|
|
6770
8279
|
const data = e.clipboardData;
|
|
@@ -6914,6 +8423,7 @@ class WeReportDesignerComponent {
|
|
|
6914
8423
|
overlap: s.issueOverlap,
|
|
6915
8424
|
outsideColumn: s.issueOutsideColumn,
|
|
6916
8425
|
textCut: s.issueTextCut,
|
|
8426
|
+
checkDigit: s.issueCheckDigit,
|
|
6917
8427
|
}[issue.code];
|
|
6918
8428
|
return text.replace('{0}', issue.detail ?? '');
|
|
6919
8429
|
}
|
|
@@ -6922,6 +8432,13 @@ class WeReportDesignerComponent {
|
|
|
6922
8432
|
}
|
|
6923
8433
|
/** Moves (and if needed narrows) an item back inside the paper; a cut text grows to fit instead. */
|
|
6924
8434
|
fixIssue(issue) {
|
|
8435
|
+
if (issue.code === 'checkDigit') {
|
|
8436
|
+
this.state.updateControls([issue.controlId], (c) => {
|
|
8437
|
+
if (c.type === 'barcode' && typeof c.value === 'string')
|
|
8438
|
+
c.value = c.value.slice(0, -1) + issue.detail;
|
|
8439
|
+
});
|
|
8440
|
+
return;
|
|
8441
|
+
}
|
|
6925
8442
|
if (issue.code === 'textCut') {
|
|
6926
8443
|
this.state.updateControls([issue.controlId], (c) => {
|
|
6927
8444
|
if (c.type === 'text')
|
|
@@ -6936,6 +8453,9 @@ class WeReportDesignerComponent {
|
|
|
6936
8453
|
});
|
|
6937
8454
|
}
|
|
6938
8455
|
onKeydown(e) {
|
|
8456
|
+
// Keys pressed while a sub-report window is open belong to it, even when focus stayed behind it.
|
|
8457
|
+
if (this.state.subreportOpen())
|
|
8458
|
+
return;
|
|
6939
8459
|
if (e.key === 'F5') {
|
|
6940
8460
|
// Desktop designers preview with F5; here it switches between design and preview.
|
|
6941
8461
|
e.preventDefault();
|
|
@@ -7059,11 +8579,11 @@ class WeReportDesignerComponent {
|
|
|
7059
8579
|
}
|
|
7060
8580
|
}
|
|
7061
8581
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WeReportDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7062
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: WeReportDesignerComponent, isStandalone: true, selector: "we-report-designer", inputs: { report: { classPropertyName: "report", publicName: "report", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, zoom: { classPropertyName: "zoom", publicName: "zoom", isSignal: true, isRequired: false, transformFunction: null }, fetchFn: { classPropertyName: "fetchFn", publicName: "fetchFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { report: "reportChange" }, host: { listeners: { "copy": "onCopy($event)", "cut": "onCopy($event)", "paste": "onPaste($event)", "document:pointerdown": "closeMenus($event)", "keydown": "onKeydown($event)" } }, providers: [DesignerState], viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }, { propertyName: "surface", first: true, predicate: DesignSurfaceComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let s = strings();\n<div class=\"wd__toolbar\" role=\"toolbar\">\n <div class=\"wd__tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"tab() === 'design'\" [class.wd__tab--on]=\"tab() === 'design'\" (click)=\"tab.set('design')\">\n <span [innerHTML]=\"'design' | weReportIcon\"></span>{{ s.design }}\n </button>\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"tab() === 'preview'\" [class.wd__tab--on]=\"tab() === 'preview'\" (click)=\"tab.set('preview')\" title=\"F5\">\n <span [innerHTML]=\"'preview' | weReportIcon\"></span>{{ s.preview }}\n </button>\n </div>\n @if (tab() === 'design') {\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"!state.canUndo()\" (click)=\"state.undo()\" [title]=\"s.undo + ' (Ctrl+Z)'\" [attr.aria-label]=\"s.undo\" [innerHTML]=\"'undo' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"!state.canRedo()\" (click)=\"state.redo()\" [title]=\"s.redo + ' (Ctrl+Y)'\" [attr.aria-label]=\"s.redo\" [innerHTML]=\"'redo' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"state.selection().kind !== 'controls'\" (click)=\"state.deleteSelection()\" [title]=\"s.delete + ' (Del)'\" [attr.aria-label]=\"s.delete\" [innerHTML]=\"'trash' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon\" (click)=\"setZoom(zoomLevel() - 0.1)\" [title]=\"s.zoomOut\" [attr.aria-label]=\"s.zoomOut\" [innerHTML]=\"'zoomOut' | weReportIcon\"></button>\n <select class=\"wd__zoom\" (change)=\"pickZoom($any($event.target).value); $any($event.target).value = ''\" [attr.aria-label]=\"s.zoomLevel\">\n <option value=\"\" selected>{{ (zoomLevel() * 100).toFixed(0) }}%</option>\n @for (z of zoomSteps; track z) {\n <option [value]=\"z\">{{ z * 100 }}%</option>\n }\n <option value=\"width\">{{ s.fitWidth }}</option>\n </select>\n <button type=\"button\" class=\"wd__icon\" (click)=\"setZoom(zoomLevel() + 0.1)\" [title]=\"s.zoomIn\" [attr.aria-label]=\"s.zoomIn\" [innerHTML]=\"'zoomIn' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" (click)=\"fitWidth()\" [title]=\"s.fitWidth\" [attr.aria-label]=\"s.fitWidth\" [innerHTML]=\"'fitWidth' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <div class=\"wd__menu\">\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"bandMenuOpen.set(!bandMenuOpen())\" [attr.aria-expanded]=\"bandMenuOpen()\">+ {{ s.addBand }}</button>\n @if (bandMenuOpen()) {\n <div class=\"wd__menu-list\" role=\"menu\">\n @for (k of addableBands(); track k) {\n <button type=\"button\" role=\"menuitem\" (click)=\"addBand(k)\">{{ k === 'groupHeader' ? s.groupBy + '\u2026' : s.bandNames[k] }}</button>\n }\n </div>\n }\n </div>\n @if (shownFields().rows.length) {\n <button type=\"button\" class=\"wd__text-btn wd__magic\" (click)=\"autoDesign()\" [title]=\"s.autoDesignHint\"><span [innerHTML]=\"'wand' | weReportIcon\"></span> {{ s.wizardTitle }}</button>\n }\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"dataDialogOpen.set(true)\">\n <span [innerHTML]=\"'database' | weReportIcon\"></span> {{ s.dataSources }}\n </button>\n <label class=\"wd__toggle\">\n <input type=\"checkbox\" [checked]=\"showData()\" (change)=\"showData.set($any($event.target).checked)\" />\n {{ s.showData }}\n </label>\n <select class=\"wd__zoom\" [title]=\"s.snapGrid\" [attr.aria-label]=\"s.snapGrid\" (change)=\"gridSize.set(+$any($event.target).value)\">\n @for (g of gridSteps; track g) {\n <option [value]=\"g\" [selected]=\"g === gridSize()\">{{ g ? g + ' mm' : s.gridOff }}</option>\n }\n </select>\n <span class=\"wd__spacer\"></span>\n <div class=\"wd__menu\">\n <button type=\"button\" class=\"wd__text-btn\" [class.wd__issues]=\"issues().length\" (click)=\"problemsOpen.set(!problemsOpen())\" [attr.aria-expanded]=\"problemsOpen()\">\n {{ issues().length ? '\u26A0 ' + issues().length : '\u2713' }} {{ s.problems }}\n </button>\n @if (problemsOpen()) {\n <div class=\"wd__menu-list wd__problems\" role=\"list\">\n @for (issue of issues(); track $index) {\n <div class=\"wd__problem\" role=\"listitem\">\n <button type=\"button\" class=\"wd__problem-text\" (click)=\"showIssue(issue)\">\n <code>{{ issue.controlId }}</code> {{ issueText(issue) }}\n </button>\n @if (issue.code === 'outsidePage' || issue.code === 'textCut') {\n <button type=\"button\" class=\"wd__fix\" (click)=\"fixIssue(issue)\">{{ s.fixIt }}</button>\n }\n </div>\n } @empty {\n <p class=\"wd__hint\">{{ s.noProblems }}</p>\n }\n </div>\n }\n </div>\n <button type=\"button\" class=\"wd__icon\" (click)=\"shortcutsOpen.set(true)\" [title]=\"s.keyboardShortcuts + ' (F1)'\" [attr.aria-label]=\"s.keyboardShortcuts\" [innerHTML]=\"'keyboard' | weReportIcon\"></button>\n <div class=\"wd__mode\" role=\"radiogroup\">\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"!advanced()\" [class.wd__mode--on]=\"!advanced()\" (click)=\"advanced.set(false)\">{{ s.basicMode }}</button>\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"advanced()\" [class.wd__mode--on]=\"advanced()\" (click)=\"advanced.set(true)\">{{ s.advancedMode }}</button>\n </div>\n }\n</div>\n\n@if (tab() === 'design') {\n <div class=\"wd__body\" [style.grid-template-columns]=\"leftWidth() + 'px 6px minmax(0, 1fr) 6px ' + rightWidth() + 'px'\">\n <aside class=\"wd__left\" [class.wd__collapsed]=\"!leftWidth()\">\n <div class=\"wd__left-tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"leftTab() === 'add'\" [class.wd__left-tab--on]=\"leftTab() === 'add'\" (click)=\"leftTab.set('add')\">{{ s.add }}</button>\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"leftTab() === 'outline'\" [class.wd__left-tab--on]=\"leftTab() === 'outline'\" (click)=\"leftTab.set('outline')\">{{ s.explorer }}</button>\n </div>\n @if (leftTab() === 'add') {\n <h2>{{ s.toolbox }}</h2>\n <p class=\"wd__hint\">{{ s.toolboxHint }} {{ s.addByClick }}</p>\n <div class=\"wd__tools\">\n @for (item of toolbox; track $index) {\n <div class=\"wd__tool\" draggable=\"true\" role=\"button\" tabindex=\"0\" (dragstart)=\"onToolDragStart($event, item)\" (click)=\"onToolClick(item)\" (keydown.enter)=\"onToolClick(item)\" [title]=\"s.controlNames[item.type]\">\n <span [innerHTML]=\"iconName(item.icon) | weReportIcon\"></span>\n <span>{{ item.variant === 'qrcode' ? 'QR' : s.controlNames[item.type] }}</span>\n </div>\n }\n </div>\n\n <h2>{{ s.fields }}</h2>\n @if (fields().rows.length || fields().parent.length) {\n <p class=\"wd__hint\">{{ s.fieldsHint }}</p>\n @if (allFields().length > 8) {\n <input class=\"wd__field-filter\" type=\"search\" [placeholder]=\"s.filterFields\" [attr.aria-label]=\"s.filterFields\" [value]=\"fieldFilter()\" (input)=\"fieldFilter.set($any($event.target).value)\" />\n }\n <ul class=\"wd__fields\">\n @for (f of shownFields().rows; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n @if (shownFields().inner.length) {\n <h3>{{ s.innerFields }}</h3>\n <ul class=\"wd__fields\">\n @for (f of shownFields().inner; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n }\n @if (shownFields().parent.length) {\n <h3>{{ s.parentFields }}</h3>\n <ul class=\"wd__fields\">\n @for (f of shownFields().parent; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n }\n } @else {\n <p class=\"wd__hint\">{{ s.noFields }}</p>\n }\n } @else {\n <p class=\"wd__hint\">{{ s.explorerHint }}</p>\n <ul class=\"wd__outline\" role=\"tree\">\n @for (band of state.report().bands; track band.id) {\n <li role=\"treeitem\" [attr.aria-expanded]=\"true\">\n <button type=\"button\" class=\"wd__outline-band\" [class.wd__outline--on]=\"state.selection().kind === 'band' && state.selectedBand()?.id === band.id\" (click)=\"state.selection.set({ kind: 'band', id: band.id })\">\n {{ s.bandNames[band.kind] }}\n </button>\n <ul role=\"group\">\n @for (c of band.controls; track c.id) {\n <li role=\"treeitem\">\n <button type=\"button\" class=\"wd__outline-item\" [class.wd__outline--on]=\"isSelected(c.id)\" (click)=\"selectFromOutline($event, c.id)\">\n <span [innerHTML]=\"outlineIcon(c) | weReportIcon\"></span><span class=\"wd__outline-text\">{{ outlineLabel(c) }}</span>\n </button>\n </li>\n } @empty {\n <li class=\"wd__outline-empty\">{{ s.emptyBand }}</li>\n }\n </ul>\n </li>\n }\n </ul>\n }\n </aside>\n\n <div class=\"wd__splitter\" role=\"separator\" aria-orientation=\"vertical\" [title]=\"s.resizePanel\" (pointerdown)=\"startResize($event, 'left')\" (dblclick)=\"togglePanel('left')\"></div>\n <div class=\"wd__center\">\n @let st = formatStyle();\n <div class=\"wd__formatbar\" role=\"toolbar\" [attr.aria-label]=\"s.formatBar\" [class.wd__formatbar--off]=\"!st\">\n <select class=\"wd__font\" [disabled]=\"!st\" (change)=\"format('fontFamily', $any($event.target).value)\" [attr.aria-label]=\"s.font\" [title]=\"s.font\">\n @for (f of fontFamilies(); track f) {\n <option [value]=\"f\" [selected]=\"st?.fontFamily === f\">{{ f }}</option>\n }\n @if (st && !fontFamilies().includes(st.fontFamily)) {\n <option [value]=\"st.fontFamily\" selected>{{ st.fontFamily }}</option>\n }\n </select>\n <input class=\"wd__size\" type=\"number\" min=\"4\" max=\"200\" step=\"1\" [attr.list]=\"sizeListId\" [disabled]=\"!st\" [value]=\"st?.fontSize ?? ''\" (change)=\"format('fontSize', +$any($event.target).value || undefined)\" [attr.aria-label]=\"s.fontSize\" [title]=\"s.fontSize\" />\n <datalist [id]=\"sizeListId\">\n @for (n of fontSizes; track n) {\n <option [value]=\"n\"></option>\n }\n </datalist>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.bold\" (click)=\"toggleFormat('bold')\" [title]=\"s.bold + ' (Ctrl+B)'\" [attr.aria-pressed]=\"!!st?.bold\"><b>B</b></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.italic\" (click)=\"toggleFormat('italic')\" [title]=\"s.italic + ' (Ctrl+I)'\" [attr.aria-pressed]=\"!!st?.italic\"><i>I</i></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.underline\" (click)=\"toggleFormat('underline')\" [title]=\"s.underline + ' (Ctrl+U)'\" [attr.aria-pressed]=\"!!st?.underline\"><u>U</u></button>\n <span class=\"wd__sep\"></span>\n @for (a of textAligns; track a.value) {\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.textAlign === a.value\" (click)=\"format('textAlign', a.value)\" [title]=\"s[a.label]\" [attr.aria-label]=\"s[a.label]\" [innerHTML]=\"a.icon | weReportIcon\"></button>\n }\n <span class=\"wd__sep\"></span>\n <label class=\"wd__well\" [title]=\"s.textColor\">\n <span>A</span>\n <input type=\"color\" [disabled]=\"!st\" [value]=\"st?.color ?? '#000000'\" (input)=\"format('color', $any($event.target).value)\" [attr.aria-label]=\"s.textColor\" />\n </label>\n <label class=\"wd__well wd__well--fill\" [title]=\"s.backgroundColor\">\n <span [style.background]=\"st?.backgroundColor ?? 'transparent'\"></span>\n <input type=\"color\" [disabled]=\"!st\" [value]=\"st?.backgroundColor ?? '#ffffff'\" (input)=\"format('backgroundColor', $any($event.target).value)\" [attr.aria-label]=\"s.backgroundColor\" />\n </label>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" (click)=\"format('backgroundColor', undefined)\" [title]=\"s.backgroundColor + ': ' + s.noColor\" [attr.aria-label]=\"s.noColor\" [innerHTML]=\"'noColor' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"!!st?.border\" (click)=\"setBorder(true)\" [title]=\"s.allBorders\" [attr.aria-label]=\"s.allBorders\" [innerHTML]=\"'borderAll' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" (click)=\"setBorder(false)\" [title]=\"s.noBorder\" [attr.aria-label]=\"s.noBorder\" [innerHTML]=\"'borderNone' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"!!state.painter()\" (click)=\"togglePainter()\" [title]=\"s.formatPainter\" [attr.aria-label]=\"s.formatPainter\" [attr.aria-pressed]=\"!!state.painter()\" [innerHTML]=\"'brush' | weReportIcon\"></button>\n </div>\n <main #canvas class=\"wd__canvas\" tabindex=\"-1\" (contextmenu)=\"openContextMenu($event)\" (wheel)=\"onCanvasWheel($event)\">\n <we-report-design-surface [strings]=\"s\" [zoom]=\"zoomLevel()\" [gridSize]=\"gridSize()\" [sample]=\"sample()\" [fields]=\"allFields()\" />\n </main>\n </div>\n\n <div class=\"wd__splitter\" role=\"separator\" aria-orientation=\"vertical\" [title]=\"s.resizePanel\" (pointerdown)=\"startResize($event, 'right')\" (dblclick)=\"togglePanel('right')\"></div>\n <aside class=\"wd__right\" [class.wd__collapsed]=\"!rightWidth()\">\n <we-report-property-panel [strings]=\"s\" [fields]=\"allFields()\" [lists]=\"fields().lists\" [fontFamilies]=\"fontFamilies()\" [advanced]=\"advanced()\" />\n </aside>\n </div>\n <footer class=\"wd__status\" aria-live=\"polite\">\n @let info = selectionInfo();\n <span class=\"wd__status-sel\">{{ info.title }}</span>\n @if (info.box; as b) {\n <span>{{ s.left }} {{ mm(b.x) }}</span>\n <span>{{ s.top }} {{ mm(b.y) }}</span>\n <span>{{ s.width }} {{ mm(b.width) }}</span>\n <span>{{ s.height }} {{ mm(b.height) }} mm</span>\n }\n <span class=\"wd__spacer\"></span>\n <span class=\"wd__status-pointer\">{{ pointerInfo() }}</span>\n <span>{{ (zoomLevel() * 100).toFixed(0) }}%</span>\n </footer>\n} @else {\n <we-report-viewer class=\"wd__preview\" [report]=\"state.report()\" [data]=\"data()\" [locale]=\"s\" [fetchFn]=\"fetchFn()\" />\n}\n\n@if (dataDialogOpen()) {\n <we-report-data-sources-dialog [strings]=\"s\" [fetchFn]=\"fetchFn()\" (closed)=\"dataDialogOpen.set(false)\" />\n}\n\n@if (contextMenu(); as m) {\n <div class=\"wd__menu-list wd__context\" role=\"menu\" [style.left.px]=\"m.x\" [style.top.px]=\"m.y\" (keydown.escape)=\"contextMenu.set(null)\">\n @if (m.onControl) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.cutSelection.bind(state))\"><span [innerHTML]=\"'cut' | weReportIcon\"></span>{{ s.cut }}<kbd>Ctrl+X</kbd></button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.copySelection.bind(state))\"><span [innerHTML]=\"'copy' | weReportIcon\"></span>{{ s.copy }}<kbd>Ctrl+C</kbd></button>\n }\n <button type=\"button\" role=\"menuitem\" [disabled]=\"!state.hasClipboard()\" (click)=\"menu(state.paste.bind(state, m.bandId ?? undefined))\"><span [innerHTML]=\"'paste' | weReportIcon\"></span>{{ s.paste }}<kbd>Ctrl+V</kbd></button>\n @if (m.onControl) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(editSelected.bind(this))\"><span [innerHTML]=\"'edit' | weReportIcon\"></span>{{ s.editText }}<kbd>F2</kbd></button>\n @if (totalTarget()) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(addTotal.bind(this))\"><span [innerHTML]=\"'sum' | weReportIcon\"></span>{{ s.addTotal }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(groupByValue.bind(this))\"><span [innerHTML]=\"'outline' | weReportIcon\"></span>{{ s.groupByThis }}</button>\n }\n @if (hasTextSelected()) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(fitToText.bind(this))\"><span [innerHTML]=\"'sameWidth' | weReportIcon\"></span>{{ s.fitToText }}</button>\n }\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.duplicateSelection.bind(state))\"><span [innerHTML]=\"'copy' | weReportIcon\"></span>{{ s.duplicate }}<kbd>Ctrl+D</kbd></button>\n <hr />\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.arrange.bind(state, 'front'))\"><span [innerHTML]=\"'bringToFront' | weReportIcon\"></span>{{ s.bringToFront }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.arrange.bind(state, 'back'))\"><span [innerHTML]=\"'sendToBack' | weReportIcon\"></span>{{ s.sendToBack }}</button>\n <hr />\n <button type=\"button\" role=\"menuitem\" class=\"wd__danger\" (click)=\"menu(state.deleteSelection.bind(state))\"><span [innerHTML]=\"'trash' | weReportIcon\"></span>{{ s.delete }}<kbd>Del</kbd></button>\n } @else {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(addTextAt.bind(this, m.bandId, m.at))\"><span [innerHTML]=\"'text' | weReportIcon\"></span>{{ s.addTextHere }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.selectAll.bind(state))\"><span [innerHTML]=\"'outline' | weReportIcon\"></span>{{ s.selectAll }}<kbd>Ctrl+A</kbd></button>\n @if (m.bandId) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.toggleCollapsed.bind(state, m.bandId))\"><span [innerHTML]=\"'fitHeight' | weReportIcon\"></span>{{ state.collapsed().has(m.bandId) ? s.expandBand : s.collapseBand }}</button>\n }\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(fitBand.bind(this, m.bandId))\"><span [innerHTML]=\"'fitHeight' | weReportIcon\"></span>{{ s.fitBandToContent }}</button>\n @if (state.selectedBand()?.kind !== 'detail') {\n <hr />\n <button type=\"button\" role=\"menuitem\" class=\"wd__danger\" (click)=\"menu(state.deleteSelection.bind(state))\"><span [innerHTML]=\"'trash' | weReportIcon\"></span>{{ s.removeBand }}</button>\n }\n }\n </div>\n}\n\n@if (wizard(); as w) {\n <div class=\"wd__sheet-backdrop\" (click)=\"wizard.set(null)\"></div>\n <div class=\"wd__sheet wd__wizard\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.wizardTitle\" (keydown.escape)=\"wizard.set(null)\">\n <h2>{{ s.wizardTitle }}</h2>\n <label class=\"wd__wizard-row\">\n <span>{{ s.wizardReportTitle }}</span>\n <input type=\"text\" [value]=\"w.title\" (input)=\"updateWizard({ title: $any($event.target).value })\" />\n </label>\n <fieldset class=\"wd__wizard-fields\">\n <legend>{{ s.wizardColumns }}</legend>\n @for (f of w.fields; track f.name) {\n <label><input type=\"checkbox\" [checked]=\"f.on\" [disabled]=\"f.name === w.groupBy\" (change)=\"toggleWizardField(f.name)\" /> {{ f.name }}</label>\n }\n </fieldset>\n <label class=\"wd__wizard-row\">\n <span>{{ s.groupBy }}</span>\n <select (change)=\"updateWizard({ groupBy: $any($event.target).value })\">\n <option value=\"\" [selected]=\"!w.groupBy\">{{ s.noGrouping }}</option>\n @for (f of w.fields; track f.name) {\n <option [value]=\"f.name\" [selected]=\"f.name === w.groupBy\">{{ f.name }}</option>\n }\n </select>\n </label>\n <div class=\"wd__wizard-row\">\n <span>{{ s.sortRows }}</span>\n <span class=\"wd__wizard-pair\">\n <select (change)=\"updateWizard({ sortBy: $any($event.target).value })\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"\" [selected]=\"!w.sortBy\">{{ s.dataOrder }}</option>\n @for (f of w.fields; track f.name) {\n <option [value]=\"f.name\" [selected]=\"f.name === w.sortBy\">{{ f.name }}</option>\n }\n </select>\n <select [disabled]=\"!w.sortBy\" (change)=\"updateWizard({ sortDescending: $any($event.target).value === 'desc' })\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"asc\" [selected]=\"!w.sortDescending\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"w.sortDescending\">{{ s.sortDesc }}</option>\n </select>\n </span>\n </div>\n <label class=\"wd__wizard-row\">\n <span>{{ s.orientation }}</span>\n <select (change)=\"updateWizard({ orientation: $any($event.target).value })\">\n <option value=\"\" [selected]=\"!w.orientation\">{{ s.automatic }}</option>\n <option value=\"portrait\" [selected]=\"w.orientation === 'portrait'\">{{ s.portrait }}</option>\n <option value=\"landscape\" [selected]=\"w.orientation === 'landscape'\">{{ s.landscape }}</option>\n </select>\n </label>\n <label class=\"wd__wizard-check\"><input type=\"checkbox\" [checked]=\"w.totals\" (change)=\"updateWizard({ totals: !w.totals })\" /> {{ s.wizardTotals }}</label>\n <p class=\"wd__wizard-hint\">{{ s.autoDesignHint }}</p>\n <div class=\"wd__wizard-actions\">\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"wizard.set(null)\">{{ s.cancel }}</button>\n <button type=\"button\" class=\"wd__primary\" [disabled]=\"!wizardReady()\" (click)=\"runWizard()\">{{ s.createReport }}</button>\n </div>\n </div>\n}\n\n@if (shortcutsOpen()) {\n <div class=\"wd__sheet-backdrop\" (click)=\"shortcutsOpen.set(false)\"></div>\n <div class=\"wd__sheet\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.keyboardShortcuts\" (keydown.escape)=\"shortcutsOpen.set(false)\">\n <h2>{{ s.keyboardShortcuts }}</h2>\n <dl class=\"wd__keys\">\n <dt>Ctrl+Z \u00B7 Ctrl+Y</dt><dd>{{ s.undo }} \u00B7 {{ s.redo }}</dd>\n <dt>Ctrl+X \u00B7 Ctrl+C \u00B7 Ctrl+V</dt><dd>{{ s.cut }} \u00B7 {{ s.copy }} \u00B7 {{ s.paste }}</dd>\n <dt>Ctrl+D</dt><dd>{{ s.duplicate }}</dd>\n <dt>Delete</dt><dd>{{ s.delete }}</dd>\n <dt>Ctrl+A</dt><dd>{{ s.selectAll }}</dd>\n <dt>F2 \u00B7 Enter \u00B7 \u29C9</dt><dd>{{ s.editText }}</dd>\n <dt>Ctrl+B \u00B7 Ctrl+I \u00B7 Ctrl+U</dt><dd>{{ s.bold }} \u00B7 {{ s.italic }} \u00B7 {{ s.underline }}</dd>\n <dt>\u2190 \u2191 \u2192 \u2193 \u00B7 Shift</dt><dd>{{ s.moveItem }} (1 / 5 mm)</dd>\n <dt>Alt + \u2190 \u2191 \u2192 \u2193</dt><dd>{{ s.moveFine }}</dd>\n <dt>Ctrl + \u2190 \u2191 \u2192 \u2193</dt><dd>{{ s.resizeItem }}</dd>\n <dt>Tab \u00B7 Shift+Tab</dt><dd>{{ s.nextItem }}</dd>\n <dt>Ctrl+= \u00B7 Ctrl+- \u00B7 Ctrl+0</dt><dd>{{ s.zoomIn }} \u00B7 {{ s.zoomOut }} \u00B7 {{ s.fitWidth }}</dd>\n <dt>Alt</dt><dd>{{ s.noSnap }}</dd>\n <dt>Ctrl + \u21F1</dt><dd>{{ s.dragCopy }}</dd>\n <dt>\u2B1A</dt><dd>{{ s.rubberBand }}</dd>\n <dt>F5</dt><dd>{{ s.preview }} \u00B7 {{ s.design }}</dd>\n <dt>F1</dt><dd>{{ s.keyboardShortcuts }}</dd>\n </dl>\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"shortcutsOpen.set(false)\">{{ s.close }}</button>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;min-height:0;height:100%;font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;line-height:1.38;letter-spacing:-.003em;color:var(--we-report-fg, #1d1d1f);background:var(--we-report-workspace-bg, #f2f2f7);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}@media (prefers-reduced-motion: reduce){button{transition:none}}.wd__toolbar{position:relative;z-index:10;display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-height:52px;padding:8px 14px;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));box-sizing:border-box}.wd__tabs,.wd__mode{display:inline-flex;padding:2px;gap:2px;border-radius:9px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.wd__tabs button,.wd__mode button{display:inline-flex;align-items:center;gap:6px;border:0;border-radius:7px;padding:4px 12px;background:transparent;font-weight:500;cursor:pointer}.wd__tabs button :is(svg),.wd__mode button :is(svg){width:15px;height:15px}.wd__tab--on,.wd__mode--on{background:var(--we-report-segment-on-bg, #fff)!important;box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.wd__icon,.wd__text-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:transparent;cursor:pointer}.wd__icon :is(svg),.wd__text-btn :is(svg){width:17px;height:17px}.wd__icon:hover:not(:disabled),.wd__text-btn:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__icon:disabled,.wd__text-btn:disabled{opacity:.3;cursor:default}.wd__text-btn{padding:0 10px;font-weight:500}.wd__magic{color:var(--we-report-accent, #007aff)}.wd__issues{color:var(--we-report-warning-fg, #b25000);background:var(--we-report-warning-bg, rgba(255, 149, 0, .12))}.wd__sep{width:.5px;height:20px;margin:0 6px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__zoom{height:26px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 4px;background:transparent;font:inherit;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));cursor:pointer}.wd__zoom:hover{background:var(--we-report-input-bg, rgba(118, 118, 128, .1))}.wd__toggle{display:inline-flex;align-items:center;gap:6px;margin:0 6px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));cursor:pointer}.wd__toggle input{accent-color:var(--we-report-accent, #007aff)}.wd__spacer{flex:1}.wd__menu{position:relative}.wd__menu-list{position:absolute;top:calc(100% + 6px);left:0;z-index:20;display:flex;flex-direction:column;min-width:220px;padding:5px;border-radius:var(--we-report-radius, 12px);background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));animation:wd-pop .14s ease-out}.wd__menu-list button{text-align:left;border:0;border-radius:6px;padding:6px 10px;background:transparent;cursor:pointer}.wd__menu-list button:hover{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}@keyframes wd-pop{0%{opacity:0;transform:translateY(-4px) scale(.98)}}@media (prefers-reduced-motion: reduce){.wd__menu-list{animation:none}}.wd__problems{left:auto;right:0;width:380px;max-height:380px;overflow:auto}.wd__problem{display:flex;align-items:flex-start;gap:6px}.wd__problem .wd__problem-text{flex:1;font-size:12px}.wd__problem .wd__problem-text:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))!important;color:inherit!important}.wd__problem code{font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__fix{flex:none;font-weight:600;color:var(--we-report-accent, #007aff)!important}.wd__body{flex:1;display:grid;grid-template-columns:232px 6px minmax(0,1fr) 6px 288px;min-height:0}.wd__left,.wd__right{overflow:auto;background:var(--we-report-panel-bg, #fbfbfd)}.wd__left{padding:14px 12px 28px}.wd__left h2{margin:4px 4px 2px;font-size:13px;font-weight:600}.wd__left h3{margin:16px 4px 4px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__left,.wd__right{min-width:0}.wd__hint{margin:0 4px 10px;font-size:11.5px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:20px}.wd__tool{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px 10px;border-radius:10px;background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14)),0 1px 2px #0000000a;font-size:11.5px;text-align:center;cursor:grab;-webkit-user-select:none;user-select:none;transition:transform .15s ease,box-shadow .15s ease}.wd__tool :is(svg){width:20px;height:20px;color:var(--we-report-accent, #007aff)}.wd__tool:hover{transform:translateY(-1px);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14)),0 4px 12px #00000014}.wd__tool:active{cursor:grabbing;transform:scale(.97)}@media (prefers-reduced-motion: reduce){.wd__tool{transition:none}.wd__tool:hover,.wd__tool:active{transform:none}}.wd__fields{list-style:none;margin:0;padding:0}.wd__fields li{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:6px;cursor:grab;-webkit-user-select:none;user-select:none}.wd__fields li:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__field-type{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border-radius:5px;font-size:10px;font-weight:700;text-transform:uppercase;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.wd__center{display:flex;flex-direction:column;min-width:0;min-height:0}.wd__canvas{flex:1;min-height:0;overflow:auto;outline:none}.wd__preview{flex:1;min-height:0}.wd__left-tabs{display:flex;padding:2px;gap:2px;margin-bottom:14px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.wd__left-tabs button{flex:1;border:0;border-radius:6px;padding:4px 8px;background:transparent;font-size:12px;font-weight:500;cursor:pointer}.wd__left-tab--on{background:var(--we-report-segment-on-bg, #fff)!important;box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.wd__outline{list-style:none;margin:0;padding:0}.wd__outline ul{list-style:none;margin:0 0 8px;padding:0 0 0 10px}.wd__outline button{display:flex;align-items:center;gap:6px;width:100%;border:0;border-radius:6px;padding:4px 8px;background:transparent;text-align:left;cursor:pointer}.wd__outline button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__outline button :is(svg){flex:none;width:14px;height:14px;color:var(--we-report-accent, #007aff)}.wd__outline-band{font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__outline-item{font-size:12px}.wd__outline-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd__outline--on,.wd__outline--on:hover{background:var(--we-report-accent, #007aff)!important;color:var(--we-report-accent-fg, #fff)!important}.wd__outline--on :is(svg),.wd__outline--on:hover :is(svg){color:inherit!important}.wd__outline-empty{padding:2px 8px;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__context{position:fixed;z-index:200}.wd__context button{display:flex;align-items:center;gap:8px}.wd__context button :is(svg){width:14px;height:14px}.wd__context button:disabled{opacity:.4;cursor:default;background:transparent!important;color:inherit!important}.wd__context kbd{margin-left:auto;padding-left:16px;font:inherit;font-size:11px;opacity:.55}.wd__context hr{width:100%;margin:4px 0;border:0;border-top:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__danger{color:var(--we-report-warning-fg, #b25000)}.wd__formatbar{display:flex;align-items:center;flex-wrap:wrap;gap:2px;min-height:40px;padding:4px 14px;box-sizing:border-box;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__formatbar select,.wd__formatbar input[type=number]{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__formatbar select:focus,.wd__formatbar input[type=number]:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.wd__formatbar select:disabled,.wd__formatbar input[type=number]:disabled{opacity:.4}.wd__font{width:150px}.wd__size{width:62px;font-variant-numeric:tabular-nums}.wd__fmt{min-width:28px;height:28px;font-size:14px}.wd__fmt--on{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07))!important;color:var(--we-report-accent, #007aff);box-shadow:inset 0 0 0 1px var(--we-report-selection, #007aff)}.wd__well{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--we-report-control-radius, 7px);cursor:pointer}.wd__well:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__well span{font-weight:700;font-size:14px}.wd__well input{position:absolute;left:4px;right:4px;bottom:3px;height:4px;width:auto;padding:0;border:0;opacity:1;cursor:pointer;pointer-events:auto}.wd__well input::-webkit-color-swatch-wrapper{padding:0}.wd__well input::-webkit-color-swatch{border:0;border-radius:1px}.wd__well--fill span{width:14px;height:14px;border-radius:3px;box-shadow:inset 0 0 0 1px var(--we-report-separator, rgba(60, 60, 67, .3))}.wd__formatbar--off .wd__well{opacity:.4;pointer-events:none}.wd__status{display:flex;align-items:center;gap:14px;min-height:26px;padding:0 14px;font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));border-top:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__status-sel{color:var(--we-report-fg, #1d1d1f);font-weight:500}.wd__splitter{position:relative;cursor:col-resize;background:var(--we-report-panel-bg, #fbfbfd);touch-action:none}.wd__splitter:after{content:\"\";position:absolute;top:0;bottom:0;left:50%;width:.5px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__splitter:hover:after{width:2px;margin-left:-1px;background:var(--we-report-accent, #007aff)}.wd__tool:focus-visible,.wd__fields li:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.wd__field-filter{width:100%;height:28px;box-sizing:border-box;margin-bottom:6px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__wizard{display:flex;flex-direction:column;gap:10px}.wd__wizard input[type=text],.wd__wizard select{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__wizard-row{display:grid;grid-template-columns:140px 1fr;align-items:center;gap:8px}.wd__wizard-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}.wd__wizard-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:4px 12px;max-height:220px;overflow:auto;margin:0;padding:8px 10px;border:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));border-radius:var(--we-report-control-radius, 7px)}.wd__wizard-fields legend{padding:0 4px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__wizard-fields label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd__wizard-hint{margin:0;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));font-size:12px}.wd__wizard-actions{display:flex;justify-content:flex-end;gap:8px}.wd__primary{height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 14px;background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);font:inherit;font-weight:600;cursor:pointer}.wd__sheet-backdrop{position:fixed;inset:0;z-index:150;background:var(--we-report-backdrop, rgba(0, 0, 0, .22))}.wd__sheet{position:fixed;top:50%;left:50%;z-index:151;transform:translate(-50%,-50%);width:min(560px,100vw - 32px);max-height:calc(100vh - 32px);overflow:auto;box-sizing:border-box;padding:20px 22px;border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14))}.wd__sheet h2{margin:0 0 12px;font-size:15px;font-weight:600}.wd__keys{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0 0 14px}.wd__keys dt{font:12px ui-monospace,SF Mono,Menlo,Consolas,monospace;color:var(--we-report-accent, #007aff)}.wd__keys dd{margin:0}.wd__collapsed{visibility:hidden;padding:0!important;overflow:hidden!important}\n"], dependencies: [{ kind: "component", type: DesignSurfaceComponent, selector: "we-report-design-surface", inputs: ["strings", "zoom", "gridSize", "sample", "fields"] }, { kind: "component", type: PropertyPanelComponent, selector: "we-report-property-panel", inputs: ["strings", "fields", "fontFamilies", "advanced", "lists"] }, { kind: "component", type: WeReportViewerComponent, selector: "we-report-viewer", inputs: ["report", "data", "zoom", "locale", "printDate", "parameters", "fetchFn"], outputs: ["problems", "rendered"] }, { kind: "pipe", type: WeReportIconPipe, name: "weReportIcon" }, { kind: "component", type: DataSourcesDialogComponent, selector: "we-report-data-sources-dialog", inputs: ["strings", "fetchFn"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8582
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: WeReportDesignerComponent, isStandalone: true, selector: "we-report-designer", inputs: { report: { classPropertyName: "report", publicName: "report", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, zoom: { classPropertyName: "zoom", publicName: "zoom", isSignal: true, isRequired: false, transformFunction: null }, fetchFn: { classPropertyName: "fetchFn", publicName: "fetchFn", isSignal: true, isRequired: false, transformFunction: null }, outerRow: { classPropertyName: "outerRow", publicName: "outerRow", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { report: "reportChange" }, host: { listeners: { "copy": "onCopy($event)", "cut": "onCopy($event)", "paste": "onPaste($event)", "document:pointerdown": "closeMenus($event)", "keydown": "onKeydown($event)" } }, providers: [DesignerState], viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }, { propertyName: "surface", first: true, predicate: DesignSurfaceComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let s = strings();\n<div class=\"wd__toolbar\" role=\"toolbar\">\n <div class=\"wd__tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"tab() === 'design'\" [class.wd__tab--on]=\"tab() === 'design'\" (click)=\"tab.set('design')\">\n <span [innerHTML]=\"'design' | weReportIcon\"></span>{{ s.design }}\n </button>\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"tab() === 'preview'\" [class.wd__tab--on]=\"tab() === 'preview'\" (click)=\"tab.set('preview')\" title=\"F5\">\n <span [innerHTML]=\"'preview' | weReportIcon\"></span>{{ s.preview }}\n </button>\n </div>\n @if (tab() === 'design') {\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"!state.canUndo()\" (click)=\"state.undo()\" [title]=\"s.undo + ' (Ctrl+Z)'\" [attr.aria-label]=\"s.undo\" [innerHTML]=\"'undo' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"!state.canRedo()\" (click)=\"state.redo()\" [title]=\"s.redo + ' (Ctrl+Y)'\" [attr.aria-label]=\"s.redo\" [innerHTML]=\"'redo' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"state.selection().kind !== 'controls'\" (click)=\"state.deleteSelection()\" [title]=\"s.delete + ' (Del)'\" [attr.aria-label]=\"s.delete\" [innerHTML]=\"'trash' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon\" (click)=\"setZoom(zoomLevel() - 0.1)\" [title]=\"s.zoomOut\" [attr.aria-label]=\"s.zoomOut\" [innerHTML]=\"'zoomOut' | weReportIcon\"></button>\n <select class=\"wd__zoom\" (change)=\"pickZoom($any($event.target).value); $any($event.target).value = ''\" [attr.aria-label]=\"s.zoomLevel\">\n <option value=\"\" selected>{{ (zoomLevel() * 100).toFixed(0) }}%</option>\n @for (z of zoomSteps; track z) {\n <option [value]=\"z\">{{ z * 100 }}%</option>\n }\n <option value=\"width\">{{ s.fitWidth }}</option>\n </select>\n <button type=\"button\" class=\"wd__icon\" (click)=\"setZoom(zoomLevel() + 0.1)\" [title]=\"s.zoomIn\" [attr.aria-label]=\"s.zoomIn\" [innerHTML]=\"'zoomIn' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" (click)=\"fitWidth()\" [title]=\"s.fitWidth\" [attr.aria-label]=\"s.fitWidth\" [innerHTML]=\"'fitWidth' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <div class=\"wd__menu\">\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"bandMenuOpen.set(!bandMenuOpen())\" [attr.aria-expanded]=\"bandMenuOpen()\">+ {{ s.addBand }}</button>\n @if (bandMenuOpen()) {\n <div class=\"wd__menu-list\" role=\"menu\">\n @for (k of addableBands(); track k) {\n <button type=\"button\" role=\"menuitem\" (click)=\"addBand(k)\">{{ k === 'groupHeader' ? s.groupBy + '\u2026' : s.bandNames[k] }}</button>\n }\n </div>\n }\n </div>\n @if (shownFields().rows.length) {\n <button type=\"button\" class=\"wd__text-btn wd__magic\" (click)=\"autoDesign()\" [title]=\"s.autoDesignHint\"><span [innerHTML]=\"'wand' | weReportIcon\"></span> {{ s.wizardTitle }}</button>\n }\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"dataDialogOpen.set(true)\">\n <span [innerHTML]=\"'database' | weReportIcon\"></span> {{ s.dataSources }}\n </button>\n <label class=\"wd__toggle\">\n <input type=\"checkbox\" [checked]=\"showData()\" (change)=\"showData.set($any($event.target).checked)\" />\n {{ s.showData }}\n </label>\n <select class=\"wd__zoom\" [title]=\"s.snapGrid\" [attr.aria-label]=\"s.snapGrid\" (change)=\"gridSize.set(+$any($event.target).value)\">\n @for (g of gridSteps; track g) {\n <option [value]=\"g\" [selected]=\"g === gridSize()\">{{ g ? g + ' mm' : s.gridOff }}</option>\n }\n </select>\n <span class=\"wd__spacer\"></span>\n <div class=\"wd__menu\">\n <button type=\"button\" class=\"wd__text-btn\" [class.wd__issues]=\"issues().length\" (click)=\"problemsOpen.set(!problemsOpen())\" [attr.aria-expanded]=\"problemsOpen()\">\n {{ issues().length ? '\u26A0 ' + issues().length : '\u2713' }} {{ s.problems }}\n </button>\n @if (problemsOpen()) {\n <div class=\"wd__menu-list wd__problems\" role=\"list\">\n @for (issue of issues(); track $index) {\n <div class=\"wd__problem\" role=\"listitem\">\n <button type=\"button\" class=\"wd__problem-text\" (click)=\"showIssue(issue)\">\n <code>{{ issue.controlId }}</code> {{ issueText(issue) }}\n </button>\n @if (issue.code === 'outsidePage' || issue.code === 'textCut' || issue.code === 'checkDigit') {\n <button type=\"button\" class=\"wd__fix\" (click)=\"fixIssue(issue)\">{{ s.fixIt }}</button>\n }\n </div>\n } @empty {\n <p class=\"wd__hint\">{{ s.noProblems }}</p>\n }\n </div>\n }\n </div>\n <button type=\"button\" class=\"wd__icon\" (click)=\"shortcutsOpen.set(true)\" [title]=\"s.keyboardShortcuts + ' (F1)'\" [attr.aria-label]=\"s.keyboardShortcuts\" [innerHTML]=\"'keyboard' | weReportIcon\"></button>\n <div class=\"wd__mode\" role=\"radiogroup\">\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"!advanced()\" [class.wd__mode--on]=\"!advanced()\" (click)=\"advanced.set(false)\">{{ s.basicMode }}</button>\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"advanced()\" [class.wd__mode--on]=\"advanced()\" (click)=\"advanced.set(true)\">{{ s.advancedMode }}</button>\n </div>\n }\n</div>\n\n@if (tab() === 'design') {\n <div class=\"wd__body\" [style.grid-template-columns]=\"leftWidth() + 'px 6px minmax(0, 1fr) 6px ' + rightWidth() + 'px'\">\n <aside class=\"wd__left\" [class.wd__collapsed]=\"!leftWidth()\">\n <div class=\"wd__left-tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"leftTab() === 'add'\" [class.wd__left-tab--on]=\"leftTab() === 'add'\" (click)=\"leftTab.set('add')\">{{ s.add }}</button>\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"leftTab() === 'outline'\" [class.wd__left-tab--on]=\"leftTab() === 'outline'\" (click)=\"leftTab.set('outline')\">{{ s.explorer }}</button>\n </div>\n @if (leftTab() === 'add') {\n <h2>{{ s.toolbox }}</h2>\n <p class=\"wd__hint\">{{ s.toolboxHint }} {{ s.addByClick }}</p>\n <div class=\"wd__tools\">\n @for (item of toolbox; track $index) {\n <div class=\"wd__tool\" draggable=\"true\" role=\"button\" tabindex=\"0\" (dragstart)=\"onToolDragStart($event, item)\" (click)=\"onToolClick(item)\" (keydown.enter)=\"onToolClick(item)\" [title]=\"item.variant === 'signature' ? s.signature : s.controlNames[item.type]\">\n <span [innerHTML]=\"iconName(item.icon) | weReportIcon\"></span>\n <span>{{ item.variant === 'qrcode' ? 'QR' : item.variant === 'signature' ? s.signature : s.controlNames[item.type] }}</span>\n </div>\n }\n </div>\n\n <h2>{{ s.fields }}</h2>\n @if (fields().rows.length || fields().parent.length) {\n <p class=\"wd__hint\">{{ s.fieldsHint }}</p>\n @if (allFields().length > 8) {\n <input class=\"wd__field-filter\" type=\"search\" [placeholder]=\"s.filterFields\" [attr.aria-label]=\"s.filterFields\" [value]=\"fieldFilter()\" (input)=\"fieldFilter.set($any($event.target).value)\" />\n }\n <!-- The fields are buttons (drag or double-click), not a reading list. -->\n <ul class=\"wd__fields\" role=\"none\">\n @for (f of shownFields().rows; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n @if (shownFields().inner.length) {\n <h3>{{ s.innerFields }}</h3>\n <ul class=\"wd__fields\" role=\"none\">\n @for (f of shownFields().inner; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n }\n @if (shownFields().parent.length) {\n <h3>{{ s.parentFields }}</h3>\n <ul class=\"wd__fields\" role=\"none\">\n @for (f of shownFields().parent; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n }\n } @else {\n <p class=\"wd__hint\">{{ s.noFields }}</p>\n }\n } @else {\n <p class=\"wd__hint\">{{ s.explorerHint }}</p>\n <ul class=\"wd__outline\" role=\"tree\">\n @for (band of state.report().bands; track band.id) {\n <li role=\"treeitem\" [attr.aria-expanded]=\"true\">\n <button type=\"button\" class=\"wd__outline-band\" [class.wd__outline--on]=\"state.selection().kind === 'band' && state.selectedBand()?.id === band.id\" (click)=\"state.selection.set({ kind: 'band', id: band.id })\">\n {{ s.bandNames[band.kind] }}\n </button>\n <ul role=\"group\">\n @for (c of band.controls; track c.id) {\n <li role=\"treeitem\">\n <button type=\"button\" class=\"wd__outline-item\" [class.wd__outline--on]=\"isSelected(c.id)\" (click)=\"selectFromOutline($event, c.id)\">\n <span [innerHTML]=\"outlineIcon(c) | weReportIcon\"></span><span class=\"wd__outline-text\">{{ outlineLabel(c) }}</span>\n </button>\n </li>\n } @empty {\n <li class=\"wd__outline-empty\">{{ s.emptyBand }}</li>\n }\n </ul>\n </li>\n }\n </ul>\n }\n </aside>\n\n <div class=\"wd__splitter\" role=\"separator\" aria-orientation=\"vertical\" [title]=\"s.resizePanel\" (pointerdown)=\"startResize($event, 'left')\" (dblclick)=\"togglePanel('left')\"></div>\n <div class=\"wd__center\">\n @let st = formatStyle();\n <div class=\"wd__formatbar\" role=\"toolbar\" [attr.aria-label]=\"s.formatBar\" [class.wd__formatbar--off]=\"!st\">\n <select class=\"wd__font\" [disabled]=\"!st\" (change)=\"format('fontFamily', $any($event.target).value)\" [attr.aria-label]=\"s.font\" [title]=\"s.font\">\n @for (f of fontFamilies(); track f) {\n <option [value]=\"f\" [selected]=\"st?.fontFamily === f\">{{ f }}</option>\n }\n @if (st && !fontFamilies().includes(st.fontFamily)) {\n <option [value]=\"st.fontFamily\" selected>{{ st.fontFamily }}</option>\n }\n </select>\n <input class=\"wd__size\" type=\"number\" min=\"4\" max=\"200\" step=\"1\" [attr.list]=\"sizeListId\" [disabled]=\"!st\" [value]=\"st?.fontSize ?? ''\" (change)=\"format('fontSize', +$any($event.target).value || undefined)\" [attr.aria-label]=\"s.fontSize\" [title]=\"s.fontSize\" />\n <datalist [id]=\"sizeListId\">\n @for (n of fontSizes; track n) {\n <option [value]=\"n\"></option>\n }\n </datalist>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.bold\" (click)=\"toggleFormat('bold')\" [title]=\"s.bold + ' (Ctrl+B)'\" [attr.aria-pressed]=\"!!st?.bold\"><b>B</b></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.italic\" (click)=\"toggleFormat('italic')\" [title]=\"s.italic + ' (Ctrl+I)'\" [attr.aria-pressed]=\"!!st?.italic\"><i>I</i></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.underline\" (click)=\"toggleFormat('underline')\" [title]=\"s.underline + ' (Ctrl+U)'\" [attr.aria-pressed]=\"!!st?.underline\"><u>U</u></button>\n <span class=\"wd__sep\"></span>\n @for (a of textAligns; track a.value) {\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.textAlign === a.value\" (click)=\"format('textAlign', a.value)\" [title]=\"s[a.label]\" [attr.aria-label]=\"s[a.label]\" [innerHTML]=\"a.icon | weReportIcon\"></button>\n }\n <span class=\"wd__sep\"></span>\n <label class=\"wd__well\" [title]=\"s.textColor\">\n <span>A</span>\n <input type=\"color\" [disabled]=\"!st\" [value]=\"st?.color ?? '#000000'\" (input)=\"format('color', $any($event.target).value)\" [attr.aria-label]=\"s.textColor\" />\n </label>\n <label class=\"wd__well wd__well--fill\" [title]=\"s.backgroundColor\">\n <span [style.background]=\"st?.backgroundColor ?? 'transparent'\"></span>\n <input type=\"color\" [disabled]=\"!st\" [value]=\"st?.backgroundColor ?? '#ffffff'\" (input)=\"format('backgroundColor', $any($event.target).value)\" [attr.aria-label]=\"s.backgroundColor\" />\n </label>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" (click)=\"format('backgroundColor', undefined)\" [title]=\"s.backgroundColor + ': ' + s.noColor\" [attr.aria-label]=\"s.noColor\" [innerHTML]=\"'noColor' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"!!st?.border\" (click)=\"setBorder(true)\" [title]=\"s.allBorders\" [attr.aria-label]=\"s.allBorders\" [innerHTML]=\"'borderAll' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" (click)=\"setBorder(false)\" [title]=\"s.noBorder\" [attr.aria-label]=\"s.noBorder\" [innerHTML]=\"'borderNone' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"!!state.painter()\" (click)=\"togglePainter()\" [title]=\"s.formatPainter\" [attr.aria-label]=\"s.formatPainter\" [attr.aria-pressed]=\"!!state.painter()\" [innerHTML]=\"'brush' | weReportIcon\"></button>\n </div>\n <main #canvas class=\"wd__canvas\" tabindex=\"-1\" (contextmenu)=\"openContextMenu($event)\" (wheel)=\"onCanvasWheel($event)\">\n <we-report-design-surface [strings]=\"s\" [zoom]=\"zoomLevel()\" [gridSize]=\"gridSize()\" [sample]=\"sample()\" [fields]=\"allFields()\" />\n </main>\n </div>\n\n <div class=\"wd__splitter\" role=\"separator\" aria-orientation=\"vertical\" [title]=\"s.resizePanel\" (pointerdown)=\"startResize($event, 'right')\" (dblclick)=\"togglePanel('right')\"></div>\n <aside class=\"wd__right\" [class.wd__collapsed]=\"!rightWidth()\">\n <we-report-property-panel [strings]=\"s\" [fields]=\"allFields()\" [lists]=\"fields().lists\" [embedded]=\"embedded()\" [fontFamilies]=\"fontFamilies()\" [advanced]=\"advanced()\" />\n </aside>\n </div>\n <footer class=\"wd__status\" aria-live=\"polite\">\n @let info = selectionInfo();\n <span class=\"wd__status-sel\">{{ info.title }}</span>\n @if (info.box; as b) {\n <span>{{ s.left }} {{ mm(b.x) }}</span>\n <span>{{ s.top }} {{ mm(b.y) }}</span>\n <span>{{ s.width }} {{ mm(b.width) }}</span>\n <span>{{ s.height }} {{ mm(b.height) }} mm</span>\n }\n <span class=\"wd__spacer\"></span>\n <span class=\"wd__status-pointer\">{{ pointerInfo() }}</span>\n <span>{{ (zoomLevel() * 100).toFixed(0) }}%</span>\n </footer>\n} @else {\n <we-report-viewer class=\"wd__preview\" [report]=\"state.report()\" [data]=\"data()\" [outerRow]=\"outerRow()\" [locale]=\"s\" [fetchFn]=\"fetchFn()\" />\n}\n\n@if (dataDialogOpen()) {\n <we-report-data-sources-dialog [strings]=\"s\" [fetchFn]=\"fetchFn()\" [hostData]=\"data() !== undefined\" (closed)=\"dataDialogOpen.set(false)\" />\n}\n\n@if (contextMenu(); as m) {\n <div class=\"wd__menu-list wd__context\" role=\"menu\" [style.left.px]=\"m.x\" [style.top.px]=\"m.y\" (keydown.escape)=\"contextMenu.set(null)\">\n @if (m.onControl) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.cutSelection.bind(state))\"><span [innerHTML]=\"'cut' | weReportIcon\"></span>{{ s.cut }}<kbd>Ctrl+X</kbd></button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.copySelection.bind(state))\"><span [innerHTML]=\"'copy' | weReportIcon\"></span>{{ s.copy }}<kbd>Ctrl+C</kbd></button>\n }\n <button type=\"button\" role=\"menuitem\" [disabled]=\"!state.hasClipboard()\" (click)=\"menu(state.paste.bind(state, m.bandId ?? undefined))\"><span [innerHTML]=\"'paste' | weReportIcon\"></span>{{ s.paste }}<kbd>Ctrl+V</kbd></button>\n @if (m.onControl) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(editSelected.bind(this))\"><span [innerHTML]=\"'edit' | weReportIcon\"></span>{{ s.editText }}<kbd>F2</kbd></button>\n @if (totalTarget()) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(addTotal.bind(this))\"><span [innerHTML]=\"'sum' | weReportIcon\"></span>{{ s.addTotal }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(groupByValue.bind(this))\"><span [innerHTML]=\"'outline' | weReportIcon\"></span>{{ s.groupByThis }}</button>\n }\n @if (hasTextSelected()) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(fitToText.bind(this))\"><span [innerHTML]=\"'sameWidth' | weReportIcon\"></span>{{ s.fitToText }}</button>\n }\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.duplicateSelection.bind(state))\"><span [innerHTML]=\"'copy' | weReportIcon\"></span>{{ s.duplicate }}<kbd>Ctrl+D</kbd></button>\n @if (state.selectedControls().length > 1) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(tidySelection.bind(this))\" [title]=\"s.tidyUpHint\"><span [innerHTML]=\"'wand' | weReportIcon\"></span>{{ s.tidyUp }}</button>\n }\n <hr />\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.arrange.bind(state, 'front'))\"><span [innerHTML]=\"'bringToFront' | weReportIcon\"></span>{{ s.bringToFront }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.arrange.bind(state, 'back'))\"><span [innerHTML]=\"'sendToBack' | weReportIcon\"></span>{{ s.sendToBack }}</button>\n <hr />\n <button type=\"button\" role=\"menuitem\" class=\"wd__danger\" (click)=\"menu(state.deleteSelection.bind(state))\"><span [innerHTML]=\"'trash' | weReportIcon\"></span>{{ s.delete }}<kbd>Del</kbd></button>\n } @else {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(addTextAt.bind(this, m.bandId, m.at))\"><span [innerHTML]=\"'text' | weReportIcon\"></span>{{ s.addTextHere }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.selectAll.bind(state))\"><span [innerHTML]=\"'outline' | weReportIcon\"></span>{{ s.selectAll }}<kbd>Ctrl+A</kbd></button>\n @if (m.bandId) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.toggleCollapsed.bind(state, m.bandId))\"><span [innerHTML]=\"'fitHeight' | weReportIcon\"></span>{{ state.collapsed().has(m.bandId) ? s.expandBand : s.collapseBand }}</button>\n }\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(fitBand.bind(this, m.bandId))\"><span [innerHTML]=\"'fitHeight' | weReportIcon\"></span>{{ s.fitBandToContent }}</button>\n @if (m.bandId) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(tidyBand.bind(this, m.bandId))\" [title]=\"s.tidyUpHint\"><span [innerHTML]=\"'wand' | weReportIcon\"></span>{{ s.tidyUp }}</button>\n }\n @if (state.selectedBand()?.kind !== 'detail') {\n <hr />\n <button type=\"button\" role=\"menuitem\" class=\"wd__danger\" (click)=\"menu(state.deleteSelection.bind(state))\"><span [innerHTML]=\"'trash' | weReportIcon\"></span>{{ s.removeBand }}</button>\n }\n }\n </div>\n}\n\n@if (wizard(); as w) {\n <div class=\"wd__sheet-backdrop\" (click)=\"wizard.set(null)\"></div>\n <div class=\"wd__sheet wd__wizard\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.wizardTitle\" (keydown.escape)=\"wizard.set(null)\">\n <h2>{{ s.wizardTitle }}</h2>\n <label class=\"wd__wizard-row\">\n <span>{{ s.wizardReportTitle }}</span>\n <input type=\"text\" [value]=\"w.title\" (input)=\"updateWizard({ title: $any($event.target).value })\" />\n </label>\n <fieldset class=\"wd__wizard-fields\">\n <legend>{{ s.wizardColumns }}</legend>\n @for (f of w.fields; track f.name) {\n <label><input type=\"checkbox\" [checked]=\"f.on\" [disabled]=\"f.name === w.groupBy\" (change)=\"toggleWizardField(f.name)\" /> {{ f.name }}</label>\n }\n </fieldset>\n <label class=\"wd__wizard-row\">\n <span>{{ s.groupBy }}</span>\n <select (change)=\"updateWizard({ groupBy: $any($event.target).value })\">\n <option value=\"\" [selected]=\"!w.groupBy\">{{ s.noGrouping }}</option>\n @for (f of w.fields; track f.name) {\n <option [value]=\"f.name\" [selected]=\"f.name === w.groupBy\">{{ f.name }}</option>\n }\n </select>\n </label>\n <div class=\"wd__wizard-row\">\n <span>{{ s.sortRows }}</span>\n <span class=\"wd__wizard-pair\">\n <select (change)=\"updateWizard({ sortBy: $any($event.target).value })\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"\" [selected]=\"!w.sortBy\">{{ s.dataOrder }}</option>\n @for (f of w.fields; track f.name) {\n <option [value]=\"f.name\" [selected]=\"f.name === w.sortBy\">{{ f.name }}</option>\n }\n </select>\n <select [disabled]=\"!w.sortBy\" (change)=\"updateWizard({ sortDescending: $any($event.target).value === 'desc' })\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"asc\" [selected]=\"!w.sortDescending\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"w.sortDescending\">{{ s.sortDesc }}</option>\n </select>\n </span>\n </div>\n <label class=\"wd__wizard-row\">\n <span>{{ s.orientation }}</span>\n <select (change)=\"updateWizard({ orientation: $any($event.target).value })\">\n <option value=\"\" [selected]=\"!w.orientation\">{{ s.automatic }}</option>\n <option value=\"portrait\" [selected]=\"w.orientation === 'portrait'\">{{ s.portrait }}</option>\n <option value=\"landscape\" [selected]=\"w.orientation === 'landscape'\">{{ s.landscape }}</option>\n </select>\n </label>\n <label class=\"wd__wizard-check\"><input type=\"checkbox\" [checked]=\"w.totals\" (change)=\"updateWizard({ totals: !w.totals })\" /> {{ s.wizardTotals }}</label>\n <p class=\"wd__wizard-hint\">{{ s.autoDesignHint }}</p>\n <div class=\"wd__wizard-actions\">\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"wizard.set(null)\">{{ s.cancel }}</button>\n <button type=\"button\" class=\"wd__primary\" [disabled]=\"!wizardReady()\" (click)=\"runWizard()\">{{ s.createReport }}</button>\n </div>\n </div>\n}\n\n@if (shortcutsOpen()) {\n <div class=\"wd__sheet-backdrop\" (click)=\"shortcutsOpen.set(false)\"></div>\n <div class=\"wd__sheet\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.keyboardShortcuts\" (keydown.escape)=\"shortcutsOpen.set(false)\">\n <h2>{{ s.keyboardShortcuts }}</h2>\n <dl class=\"wd__keys\">\n <dt>Ctrl+Z \u00B7 Ctrl+Y</dt><dd>{{ s.undo }} \u00B7 {{ s.redo }}</dd>\n <dt>Ctrl+X \u00B7 Ctrl+C \u00B7 Ctrl+V</dt><dd>{{ s.cut }} \u00B7 {{ s.copy }} \u00B7 {{ s.paste }}</dd>\n <dt>Ctrl+D</dt><dd>{{ s.duplicate }}</dd>\n <dt>Delete</dt><dd>{{ s.delete }}</dd>\n <dt>Ctrl+A</dt><dd>{{ s.selectAll }}</dd>\n <dt>F2 \u00B7 Enter \u00B7 \u29C9</dt><dd>{{ s.editText }}</dd>\n <dt>Ctrl+B \u00B7 Ctrl+I \u00B7 Ctrl+U</dt><dd>{{ s.bold }} \u00B7 {{ s.italic }} \u00B7 {{ s.underline }}</dd>\n <dt>\u2190 \u2191 \u2192 \u2193 \u00B7 Shift</dt><dd>{{ s.moveItem }} (1 / 5 mm)</dd>\n <dt>Alt + \u2190 \u2191 \u2192 \u2193</dt><dd>{{ s.moveFine }}</dd>\n <dt>Ctrl + \u2190 \u2191 \u2192 \u2193</dt><dd>{{ s.resizeItem }}</dd>\n <dt>Tab \u00B7 Shift+Tab</dt><dd>{{ s.nextItem }}</dd>\n <dt>Ctrl+= \u00B7 Ctrl+- \u00B7 Ctrl+0</dt><dd>{{ s.zoomIn }} \u00B7 {{ s.zoomOut }} \u00B7 {{ s.fitWidth }}</dd>\n <dt>Alt</dt><dd>{{ s.noSnap }}</dd>\n <dt>Ctrl + \u21F1</dt><dd>{{ s.dragCopy }}</dd>\n <dt>\u2B1A</dt><dd>{{ s.rubberBand }}</dd>\n <dt>F5</dt><dd>{{ s.preview }} \u00B7 {{ s.design }}</dd>\n <dt>F1</dt><dd>{{ s.keyboardShortcuts }}</dd>\n </dl>\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"shortcutsOpen.set(false)\">{{ s.close }}</button>\n </div>\n}\n\n@if (openSubreport(); as sub) {\n <div class=\"wd__sheet-backdrop\"></div>\n <!-- Keys and clipboard events stay with the inner designer; the outer one would act on its own page. -->\n <div class=\"wd__sheet wd__subreport\" tabindex=\"-1\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.subreportTitle.replace('{0}', sub.report.name)\"\n (keydown)=\"$event.stopPropagation()\" (copy)=\"$event.stopPropagation()\" (cut)=\"$event.stopPropagation()\" (paste)=\"$event.stopPropagation()\">\n <div class=\"wd__subreport-head\">\n <h2>{{ s.subreportTitle.replace('{0}', sub.report.name) }}</h2>\n <button type=\"button\" class=\"wd__primary\" (click)=\"state.subreportOpen.set(null)\">{{ s.subreportDone }}</button>\n </div>\n <we-report-designer class=\"wd__subreport-designer\" [report]=\"subreportDesign()!\" (reportChange)=\"setSubreport(sub.id, $event)\" [data]=\"subreportData()\" [outerRow]=\"state.sample()?.row\" [embedded]=\"true\" [locale]=\"locale()\" [fetchFn]=\"fetchFn()\" />\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;min-height:0;height:100%;font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;line-height:1.38;letter-spacing:-.003em;color:var(--we-report-fg, #1d1d1f);background:var(--we-report-workspace-bg, #f2f2f7);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}@media (prefers-reduced-motion: reduce){button{transition:none}}.wd__toolbar{position:relative;z-index:10;display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-height:52px;padding:8px 14px;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));box-sizing:border-box}.wd__tabs,.wd__mode{display:inline-flex;padding:2px;gap:2px;border-radius:9px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.wd__tabs button,.wd__mode button{display:inline-flex;align-items:center;gap:6px;border:0;border-radius:7px;padding:4px 12px;background:transparent;font-weight:500;cursor:pointer}.wd__tabs button :is(svg),.wd__mode button :is(svg){width:15px;height:15px}.wd__tab--on,.wd__mode--on{background:var(--we-report-segment-on-bg, #fff)!important;box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.wd__icon,.wd__text-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:transparent;cursor:pointer}.wd__icon :is(svg),.wd__text-btn :is(svg){width:17px;height:17px}.wd__icon:hover:not(:disabled),.wd__text-btn:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__icon:disabled,.wd__text-btn:disabled{opacity:.3;cursor:default}.wd__text-btn{padding:0 10px;font-weight:500}.wd__magic{color:var(--we-report-accent, #007aff)}.wd__issues{color:var(--we-report-warning-fg, #9a4400);background:var(--we-report-warning-bg, rgba(255, 149, 0, .12))}.wd__sep{width:.5px;height:20px;margin:0 6px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__zoom{height:26px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 4px;background:transparent;font:inherit;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));cursor:pointer}.wd__zoom:hover{background:var(--we-report-input-bg, rgba(118, 118, 128, .1))}.wd__toggle{display:inline-flex;align-items:center;gap:6px;margin:0 6px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));cursor:pointer}.wd__toggle input{accent-color:var(--we-report-accent, #007aff)}.wd__spacer{flex:1}.wd__menu{position:relative}.wd__menu-list{position:absolute;top:calc(100% + 6px);left:0;z-index:20;display:flex;flex-direction:column;min-width:220px;padding:5px;border-radius:var(--we-report-radius, 12px);background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));animation:wd-pop .14s ease-out}.wd__menu-list button{text-align:left;border:0;border-radius:6px;padding:6px 10px;background:transparent;cursor:pointer}.wd__menu-list button:hover{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}@keyframes wd-pop{0%{opacity:0;transform:translateY(-4px) scale(.98)}}@media (prefers-reduced-motion: reduce){.wd__menu-list{animation:none}}.wd__problems{left:auto;right:0;width:380px;max-height:380px;overflow:auto}.wd__problem{display:flex;align-items:flex-start;gap:6px}.wd__problem .wd__problem-text{flex:1;font-size:12px}.wd__problem .wd__problem-text:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))!important;color:inherit!important}.wd__problem code{font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__fix{flex:none;font-weight:600;color:var(--we-report-accent, #007aff)!important}.wd__body{flex:1;display:grid;grid-template-columns:232px 6px minmax(0,1fr) 6px 288px;min-height:0}.wd__left,.wd__right{overflow:auto;background:var(--we-report-panel-bg, #fbfbfd)}.wd__left{padding:14px 12px 28px}.wd__left h2{margin:4px 4px 2px;font-size:13px;font-weight:600}.wd__left h3{margin:16px 4px 4px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__left,.wd__right{min-width:0}.wd__hint{margin:0 4px 10px;font-size:11.5px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:20px}.wd__tool{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px 10px;border-radius:10px;background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14)),0 1px 2px #0000000a;font-size:11.5px;text-align:center;cursor:grab;-webkit-user-select:none;user-select:none;transition:transform .15s ease,box-shadow .15s ease}.wd__tool :is(svg){width:20px;height:20px;color:var(--we-report-accent, #007aff)}.wd__tool:hover{transform:translateY(-1px);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14)),0 4px 12px #00000014}.wd__tool:active{cursor:grabbing;transform:scale(.97)}@media (prefers-reduced-motion: reduce){.wd__tool{transition:none}.wd__tool:hover,.wd__tool:active{transform:none}}.wd__fields{list-style:none;margin:0;padding:0}.wd__fields li{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:6px;cursor:grab;-webkit-user-select:none;user-select:none}.wd__fields li:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__field-type{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border-radius:5px;font-size:10px;font-weight:700;text-transform:uppercase;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.wd__center{display:flex;flex-direction:column;min-width:0;min-height:0}.wd__canvas{flex:1;min-height:0;overflow:auto;outline:none}.wd__preview{flex:1;min-height:0}.wd__left-tabs{display:flex;padding:2px;gap:2px;margin-bottom:14px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.wd__left-tabs button{flex:1;border:0;border-radius:6px;padding:4px 8px;background:transparent;font-size:12px;font-weight:500;cursor:pointer}.wd__left-tab--on{background:var(--we-report-segment-on-bg, #fff)!important;box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.wd__outline{list-style:none;margin:0;padding:0}.wd__outline ul{list-style:none;margin:0 0 8px;padding:0 0 0 10px}.wd__outline button{display:flex;align-items:center;gap:6px;width:100%;border:0;border-radius:6px;padding:4px 8px;background:transparent;text-align:left;cursor:pointer}.wd__outline button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__outline button :is(svg){flex:none;width:14px;height:14px;color:var(--we-report-accent, #007aff)}.wd__outline-band{font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__outline-item{font-size:12px}.wd__outline-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd__outline--on,.wd__outline--on:hover{background:var(--we-report-accent, #007aff)!important;color:var(--we-report-accent-fg, #fff)!important}.wd__outline--on :is(svg),.wd__outline--on:hover :is(svg){color:inherit!important}.wd__outline-empty{padding:2px 8px;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__context{position:fixed;z-index:200}.wd__context button{display:flex;align-items:center;gap:8px}.wd__context button :is(svg){width:14px;height:14px}.wd__context button:disabled{opacity:.4;cursor:default;background:transparent!important;color:inherit!important}.wd__context kbd{margin-left:auto;padding-left:16px;font:inherit;font-size:11px;opacity:.55}.wd__context hr{width:100%;margin:4px 0;border:0;border-top:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__danger{color:var(--we-report-warning-fg, #9a4400)}.wd__formatbar{display:flex;align-items:center;flex-wrap:wrap;gap:2px;min-height:40px;padding:4px 14px;box-sizing:border-box;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__formatbar select,.wd__formatbar input[type=number]{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__formatbar select:focus,.wd__formatbar input[type=number]:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.wd__formatbar select:disabled,.wd__formatbar input[type=number]:disabled{opacity:.4}.wd__font{width:150px}.wd__size{width:62px;font-variant-numeric:tabular-nums}.wd__fmt{min-width:28px;height:28px;font-size:14px}.wd__fmt--on{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07))!important;color:var(--we-report-accent, #007aff);box-shadow:inset 0 0 0 1px var(--we-report-selection, #007aff)}.wd__well{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--we-report-control-radius, 7px);cursor:pointer}.wd__well:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__well span{font-weight:700;font-size:14px}.wd__well input{position:absolute;left:4px;right:4px;bottom:3px;height:4px;width:auto;padding:0;border:0;opacity:1;cursor:pointer;pointer-events:auto}.wd__well input::-webkit-color-swatch-wrapper{padding:0}.wd__well input::-webkit-color-swatch{border:0;border-radius:1px}.wd__well--fill span{width:14px;height:14px;border-radius:3px;box-shadow:inset 0 0 0 1px var(--we-report-separator, rgba(60, 60, 67, .3))}.wd__formatbar--off .wd__well{opacity:.4;pointer-events:none}.wd__status{display:flex;align-items:center;gap:14px;min-height:26px;padding:0 14px;font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));border-top:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__status-sel{color:var(--we-report-fg, #1d1d1f);font-weight:500}.wd__splitter{position:relative;cursor:col-resize;background:var(--we-report-panel-bg, #fbfbfd);touch-action:none}.wd__splitter:after{content:\"\";position:absolute;top:0;bottom:0;left:50%;width:.5px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__splitter:hover:after{width:2px;margin-left:-1px;background:var(--we-report-accent, #007aff)}.wd__tool:focus-visible,.wd__fields li:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.wd__field-filter{width:100%;height:28px;box-sizing:border-box;margin-bottom:6px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__wizard{display:flex;flex-direction:column;gap:10px}.wd__wizard input[type=text],.wd__wizard select{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__wizard-row{display:grid;grid-template-columns:140px 1fr;align-items:center;gap:8px}.wd__wizard-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}.wd__wizard-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:4px 12px;max-height:220px;overflow:auto;margin:0;padding:8px 10px;border:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));border-radius:var(--we-report-control-radius, 7px)}.wd__wizard-fields legend{padding:0 4px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__wizard-fields label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd__wizard-hint{margin:0;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));font-size:12px}.wd__wizard-actions{display:flex;justify-content:flex-end;gap:8px}.wd__primary{height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 14px;background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);font:inherit;font-weight:600;cursor:pointer}.wd__sheet-backdrop{position:fixed;inset:0;z-index:150;background:var(--we-report-backdrop, rgba(0, 0, 0, .22))}.wd__sheet{position:fixed;top:50%;left:50%;z-index:151;transform:translate(-50%,-50%);width:min(560px,100vw - 32px);max-height:calc(100vh - 32px);overflow:auto;box-sizing:border-box;padding:20px 22px;border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14))}.wd__sheet h2{margin:0 0 12px;font-size:15px;font-weight:600}.wd__keys{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0 0 14px}.wd__keys dt{font:12px ui-monospace,SF Mono,Menlo,Consolas,monospace;color:var(--we-report-accent, #007aff)}.wd__keys dd{margin:0}.wd__collapsed{visibility:hidden;padding:0!important;overflow:hidden!important}.wd__subreport{display:flex;flex-direction:column;inset:16px;transform:none;width:auto;height:auto;max-height:none;padding:12px;overflow:hidden}.wd__subreport-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.wd__subreport-head h2{margin:0}.wd__subreport-designer{flex:1;min-height:0;border:1px solid var(--we-report-border, rgba(0, 0, 0, .1));border-radius:8px;overflow:hidden}\n"], dependencies: [{ kind: "component", type: WeReportDesignerComponent, selector: "we-report-designer", inputs: ["report", "data", "locale", "zoom", "fetchFn", "outerRow", "embedded"], outputs: ["reportChange"] }, { kind: "component", type: DesignSurfaceComponent, selector: "we-report-design-surface", inputs: ["strings", "zoom", "gridSize", "sample", "fields"] }, { kind: "component", type: PropertyPanelComponent, selector: "we-report-property-panel", inputs: ["strings", "fields", "fontFamilies", "advanced", "lists", "embedded"] }, { kind: "component", type: WeReportViewerComponent, selector: "we-report-viewer", inputs: ["report", "data", "outerRow", "zoom", "locale", "printDate", "parameters", "hide", "fetchFn"], outputs: ["problems", "rendered"] }, { kind: "pipe", type: WeReportIconPipe, name: "weReportIcon" }, { kind: "component", type: DataSourcesDialogComponent, selector: "we-report-data-sources-dialog", inputs: ["strings", "fetchFn", "hostData"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7063
8583
|
}
|
|
7064
8584
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: WeReportDesignerComponent, decorators: [{
|
|
7065
8585
|
type: Component,
|
|
7066
|
-
args: [{ selector: 'we-report-designer', standalone: true, imports: [DesignSurfaceComponent, PropertyPanelComponent, WeReportViewerComponent, WeReportIconPipe, DataSourcesDialogComponent], providers: [DesignerState], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let s = strings();\n<div class=\"wd__toolbar\" role=\"toolbar\">\n <div class=\"wd__tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"tab() === 'design'\" [class.wd__tab--on]=\"tab() === 'design'\" (click)=\"tab.set('design')\">\n <span [innerHTML]=\"'design' | weReportIcon\"></span>{{ s.design }}\n </button>\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"tab() === 'preview'\" [class.wd__tab--on]=\"tab() === 'preview'\" (click)=\"tab.set('preview')\" title=\"F5\">\n <span [innerHTML]=\"'preview' | weReportIcon\"></span>{{ s.preview }}\n </button>\n </div>\n @if (tab() === 'design') {\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"!state.canUndo()\" (click)=\"state.undo()\" [title]=\"s.undo + ' (Ctrl+Z)'\" [attr.aria-label]=\"s.undo\" [innerHTML]=\"'undo' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"!state.canRedo()\" (click)=\"state.redo()\" [title]=\"s.redo + ' (Ctrl+Y)'\" [attr.aria-label]=\"s.redo\" [innerHTML]=\"'redo' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"state.selection().kind !== 'controls'\" (click)=\"state.deleteSelection()\" [title]=\"s.delete + ' (Del)'\" [attr.aria-label]=\"s.delete\" [innerHTML]=\"'trash' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon\" (click)=\"setZoom(zoomLevel() - 0.1)\" [title]=\"s.zoomOut\" [attr.aria-label]=\"s.zoomOut\" [innerHTML]=\"'zoomOut' | weReportIcon\"></button>\n <select class=\"wd__zoom\" (change)=\"pickZoom($any($event.target).value); $any($event.target).value = ''\" [attr.aria-label]=\"s.zoomLevel\">\n <option value=\"\" selected>{{ (zoomLevel() * 100).toFixed(0) }}%</option>\n @for (z of zoomSteps; track z) {\n <option [value]=\"z\">{{ z * 100 }}%</option>\n }\n <option value=\"width\">{{ s.fitWidth }}</option>\n </select>\n <button type=\"button\" class=\"wd__icon\" (click)=\"setZoom(zoomLevel() + 0.1)\" [title]=\"s.zoomIn\" [attr.aria-label]=\"s.zoomIn\" [innerHTML]=\"'zoomIn' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" (click)=\"fitWidth()\" [title]=\"s.fitWidth\" [attr.aria-label]=\"s.fitWidth\" [innerHTML]=\"'fitWidth' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <div class=\"wd__menu\">\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"bandMenuOpen.set(!bandMenuOpen())\" [attr.aria-expanded]=\"bandMenuOpen()\">+ {{ s.addBand }}</button>\n @if (bandMenuOpen()) {\n <div class=\"wd__menu-list\" role=\"menu\">\n @for (k of addableBands(); track k) {\n <button type=\"button\" role=\"menuitem\" (click)=\"addBand(k)\">{{ k === 'groupHeader' ? s.groupBy + '\u2026' : s.bandNames[k] }}</button>\n }\n </div>\n }\n </div>\n @if (shownFields().rows.length) {\n <button type=\"button\" class=\"wd__text-btn wd__magic\" (click)=\"autoDesign()\" [title]=\"s.autoDesignHint\"><span [innerHTML]=\"'wand' | weReportIcon\"></span> {{ s.wizardTitle }}</button>\n }\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"dataDialogOpen.set(true)\">\n <span [innerHTML]=\"'database' | weReportIcon\"></span> {{ s.dataSources }}\n </button>\n <label class=\"wd__toggle\">\n <input type=\"checkbox\" [checked]=\"showData()\" (change)=\"showData.set($any($event.target).checked)\" />\n {{ s.showData }}\n </label>\n <select class=\"wd__zoom\" [title]=\"s.snapGrid\" [attr.aria-label]=\"s.snapGrid\" (change)=\"gridSize.set(+$any($event.target).value)\">\n @for (g of gridSteps; track g) {\n <option [value]=\"g\" [selected]=\"g === gridSize()\">{{ g ? g + ' mm' : s.gridOff }}</option>\n }\n </select>\n <span class=\"wd__spacer\"></span>\n <div class=\"wd__menu\">\n <button type=\"button\" class=\"wd__text-btn\" [class.wd__issues]=\"issues().length\" (click)=\"problemsOpen.set(!problemsOpen())\" [attr.aria-expanded]=\"problemsOpen()\">\n {{ issues().length ? '\u26A0 ' + issues().length : '\u2713' }} {{ s.problems }}\n </button>\n @if (problemsOpen()) {\n <div class=\"wd__menu-list wd__problems\" role=\"list\">\n @for (issue of issues(); track $index) {\n <div class=\"wd__problem\" role=\"listitem\">\n <button type=\"button\" class=\"wd__problem-text\" (click)=\"showIssue(issue)\">\n <code>{{ issue.controlId }}</code> {{ issueText(issue) }}\n </button>\n @if (issue.code === 'outsidePage' || issue.code === 'textCut') {\n <button type=\"button\" class=\"wd__fix\" (click)=\"fixIssue(issue)\">{{ s.fixIt }}</button>\n }\n </div>\n } @empty {\n <p class=\"wd__hint\">{{ s.noProblems }}</p>\n }\n </div>\n }\n </div>\n <button type=\"button\" class=\"wd__icon\" (click)=\"shortcutsOpen.set(true)\" [title]=\"s.keyboardShortcuts + ' (F1)'\" [attr.aria-label]=\"s.keyboardShortcuts\" [innerHTML]=\"'keyboard' | weReportIcon\"></button>\n <div class=\"wd__mode\" role=\"radiogroup\">\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"!advanced()\" [class.wd__mode--on]=\"!advanced()\" (click)=\"advanced.set(false)\">{{ s.basicMode }}</button>\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"advanced()\" [class.wd__mode--on]=\"advanced()\" (click)=\"advanced.set(true)\">{{ s.advancedMode }}</button>\n </div>\n }\n</div>\n\n@if (tab() === 'design') {\n <div class=\"wd__body\" [style.grid-template-columns]=\"leftWidth() + 'px 6px minmax(0, 1fr) 6px ' + rightWidth() + 'px'\">\n <aside class=\"wd__left\" [class.wd__collapsed]=\"!leftWidth()\">\n <div class=\"wd__left-tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"leftTab() === 'add'\" [class.wd__left-tab--on]=\"leftTab() === 'add'\" (click)=\"leftTab.set('add')\">{{ s.add }}</button>\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"leftTab() === 'outline'\" [class.wd__left-tab--on]=\"leftTab() === 'outline'\" (click)=\"leftTab.set('outline')\">{{ s.explorer }}</button>\n </div>\n @if (leftTab() === 'add') {\n <h2>{{ s.toolbox }}</h2>\n <p class=\"wd__hint\">{{ s.toolboxHint }} {{ s.addByClick }}</p>\n <div class=\"wd__tools\">\n @for (item of toolbox; track $index) {\n <div class=\"wd__tool\" draggable=\"true\" role=\"button\" tabindex=\"0\" (dragstart)=\"onToolDragStart($event, item)\" (click)=\"onToolClick(item)\" (keydown.enter)=\"onToolClick(item)\" [title]=\"s.controlNames[item.type]\">\n <span [innerHTML]=\"iconName(item.icon) | weReportIcon\"></span>\n <span>{{ item.variant === 'qrcode' ? 'QR' : s.controlNames[item.type] }}</span>\n </div>\n }\n </div>\n\n <h2>{{ s.fields }}</h2>\n @if (fields().rows.length || fields().parent.length) {\n <p class=\"wd__hint\">{{ s.fieldsHint }}</p>\n @if (allFields().length > 8) {\n <input class=\"wd__field-filter\" type=\"search\" [placeholder]=\"s.filterFields\" [attr.aria-label]=\"s.filterFields\" [value]=\"fieldFilter()\" (input)=\"fieldFilter.set($any($event.target).value)\" />\n }\n <ul class=\"wd__fields\">\n @for (f of shownFields().rows; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n @if (shownFields().inner.length) {\n <h3>{{ s.innerFields }}</h3>\n <ul class=\"wd__fields\">\n @for (f of shownFields().inner; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n }\n @if (shownFields().parent.length) {\n <h3>{{ s.parentFields }}</h3>\n <ul class=\"wd__fields\">\n @for (f of shownFields().parent; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n }\n } @else {\n <p class=\"wd__hint\">{{ s.noFields }}</p>\n }\n } @else {\n <p class=\"wd__hint\">{{ s.explorerHint }}</p>\n <ul class=\"wd__outline\" role=\"tree\">\n @for (band of state.report().bands; track band.id) {\n <li role=\"treeitem\" [attr.aria-expanded]=\"true\">\n <button type=\"button\" class=\"wd__outline-band\" [class.wd__outline--on]=\"state.selection().kind === 'band' && state.selectedBand()?.id === band.id\" (click)=\"state.selection.set({ kind: 'band', id: band.id })\">\n {{ s.bandNames[band.kind] }}\n </button>\n <ul role=\"group\">\n @for (c of band.controls; track c.id) {\n <li role=\"treeitem\">\n <button type=\"button\" class=\"wd__outline-item\" [class.wd__outline--on]=\"isSelected(c.id)\" (click)=\"selectFromOutline($event, c.id)\">\n <span [innerHTML]=\"outlineIcon(c) | weReportIcon\"></span><span class=\"wd__outline-text\">{{ outlineLabel(c) }}</span>\n </button>\n </li>\n } @empty {\n <li class=\"wd__outline-empty\">{{ s.emptyBand }}</li>\n }\n </ul>\n </li>\n }\n </ul>\n }\n </aside>\n\n <div class=\"wd__splitter\" role=\"separator\" aria-orientation=\"vertical\" [title]=\"s.resizePanel\" (pointerdown)=\"startResize($event, 'left')\" (dblclick)=\"togglePanel('left')\"></div>\n <div class=\"wd__center\">\n @let st = formatStyle();\n <div class=\"wd__formatbar\" role=\"toolbar\" [attr.aria-label]=\"s.formatBar\" [class.wd__formatbar--off]=\"!st\">\n <select class=\"wd__font\" [disabled]=\"!st\" (change)=\"format('fontFamily', $any($event.target).value)\" [attr.aria-label]=\"s.font\" [title]=\"s.font\">\n @for (f of fontFamilies(); track f) {\n <option [value]=\"f\" [selected]=\"st?.fontFamily === f\">{{ f }}</option>\n }\n @if (st && !fontFamilies().includes(st.fontFamily)) {\n <option [value]=\"st.fontFamily\" selected>{{ st.fontFamily }}</option>\n }\n </select>\n <input class=\"wd__size\" type=\"number\" min=\"4\" max=\"200\" step=\"1\" [attr.list]=\"sizeListId\" [disabled]=\"!st\" [value]=\"st?.fontSize ?? ''\" (change)=\"format('fontSize', +$any($event.target).value || undefined)\" [attr.aria-label]=\"s.fontSize\" [title]=\"s.fontSize\" />\n <datalist [id]=\"sizeListId\">\n @for (n of fontSizes; track n) {\n <option [value]=\"n\"></option>\n }\n </datalist>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.bold\" (click)=\"toggleFormat('bold')\" [title]=\"s.bold + ' (Ctrl+B)'\" [attr.aria-pressed]=\"!!st?.bold\"><b>B</b></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.italic\" (click)=\"toggleFormat('italic')\" [title]=\"s.italic + ' (Ctrl+I)'\" [attr.aria-pressed]=\"!!st?.italic\"><i>I</i></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.underline\" (click)=\"toggleFormat('underline')\" [title]=\"s.underline + ' (Ctrl+U)'\" [attr.aria-pressed]=\"!!st?.underline\"><u>U</u></button>\n <span class=\"wd__sep\"></span>\n @for (a of textAligns; track a.value) {\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.textAlign === a.value\" (click)=\"format('textAlign', a.value)\" [title]=\"s[a.label]\" [attr.aria-label]=\"s[a.label]\" [innerHTML]=\"a.icon | weReportIcon\"></button>\n }\n <span class=\"wd__sep\"></span>\n <label class=\"wd__well\" [title]=\"s.textColor\">\n <span>A</span>\n <input type=\"color\" [disabled]=\"!st\" [value]=\"st?.color ?? '#000000'\" (input)=\"format('color', $any($event.target).value)\" [attr.aria-label]=\"s.textColor\" />\n </label>\n <label class=\"wd__well wd__well--fill\" [title]=\"s.backgroundColor\">\n <span [style.background]=\"st?.backgroundColor ?? 'transparent'\"></span>\n <input type=\"color\" [disabled]=\"!st\" [value]=\"st?.backgroundColor ?? '#ffffff'\" (input)=\"format('backgroundColor', $any($event.target).value)\" [attr.aria-label]=\"s.backgroundColor\" />\n </label>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" (click)=\"format('backgroundColor', undefined)\" [title]=\"s.backgroundColor + ': ' + s.noColor\" [attr.aria-label]=\"s.noColor\" [innerHTML]=\"'noColor' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"!!st?.border\" (click)=\"setBorder(true)\" [title]=\"s.allBorders\" [attr.aria-label]=\"s.allBorders\" [innerHTML]=\"'borderAll' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" (click)=\"setBorder(false)\" [title]=\"s.noBorder\" [attr.aria-label]=\"s.noBorder\" [innerHTML]=\"'borderNone' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"!!state.painter()\" (click)=\"togglePainter()\" [title]=\"s.formatPainter\" [attr.aria-label]=\"s.formatPainter\" [attr.aria-pressed]=\"!!state.painter()\" [innerHTML]=\"'brush' | weReportIcon\"></button>\n </div>\n <main #canvas class=\"wd__canvas\" tabindex=\"-1\" (contextmenu)=\"openContextMenu($event)\" (wheel)=\"onCanvasWheel($event)\">\n <we-report-design-surface [strings]=\"s\" [zoom]=\"zoomLevel()\" [gridSize]=\"gridSize()\" [sample]=\"sample()\" [fields]=\"allFields()\" />\n </main>\n </div>\n\n <div class=\"wd__splitter\" role=\"separator\" aria-orientation=\"vertical\" [title]=\"s.resizePanel\" (pointerdown)=\"startResize($event, 'right')\" (dblclick)=\"togglePanel('right')\"></div>\n <aside class=\"wd__right\" [class.wd__collapsed]=\"!rightWidth()\">\n <we-report-property-panel [strings]=\"s\" [fields]=\"allFields()\" [lists]=\"fields().lists\" [fontFamilies]=\"fontFamilies()\" [advanced]=\"advanced()\" />\n </aside>\n </div>\n <footer class=\"wd__status\" aria-live=\"polite\">\n @let info = selectionInfo();\n <span class=\"wd__status-sel\">{{ info.title }}</span>\n @if (info.box; as b) {\n <span>{{ s.left }} {{ mm(b.x) }}</span>\n <span>{{ s.top }} {{ mm(b.y) }}</span>\n <span>{{ s.width }} {{ mm(b.width) }}</span>\n <span>{{ s.height }} {{ mm(b.height) }} mm</span>\n }\n <span class=\"wd__spacer\"></span>\n <span class=\"wd__status-pointer\">{{ pointerInfo() }}</span>\n <span>{{ (zoomLevel() * 100).toFixed(0) }}%</span>\n </footer>\n} @else {\n <we-report-viewer class=\"wd__preview\" [report]=\"state.report()\" [data]=\"data()\" [locale]=\"s\" [fetchFn]=\"fetchFn()\" />\n}\n\n@if (dataDialogOpen()) {\n <we-report-data-sources-dialog [strings]=\"s\" [fetchFn]=\"fetchFn()\" (closed)=\"dataDialogOpen.set(false)\" />\n}\n\n@if (contextMenu(); as m) {\n <div class=\"wd__menu-list wd__context\" role=\"menu\" [style.left.px]=\"m.x\" [style.top.px]=\"m.y\" (keydown.escape)=\"contextMenu.set(null)\">\n @if (m.onControl) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.cutSelection.bind(state))\"><span [innerHTML]=\"'cut' | weReportIcon\"></span>{{ s.cut }}<kbd>Ctrl+X</kbd></button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.copySelection.bind(state))\"><span [innerHTML]=\"'copy' | weReportIcon\"></span>{{ s.copy }}<kbd>Ctrl+C</kbd></button>\n }\n <button type=\"button\" role=\"menuitem\" [disabled]=\"!state.hasClipboard()\" (click)=\"menu(state.paste.bind(state, m.bandId ?? undefined))\"><span [innerHTML]=\"'paste' | weReportIcon\"></span>{{ s.paste }}<kbd>Ctrl+V</kbd></button>\n @if (m.onControl) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(editSelected.bind(this))\"><span [innerHTML]=\"'edit' | weReportIcon\"></span>{{ s.editText }}<kbd>F2</kbd></button>\n @if (totalTarget()) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(addTotal.bind(this))\"><span [innerHTML]=\"'sum' | weReportIcon\"></span>{{ s.addTotal }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(groupByValue.bind(this))\"><span [innerHTML]=\"'outline' | weReportIcon\"></span>{{ s.groupByThis }}</button>\n }\n @if (hasTextSelected()) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(fitToText.bind(this))\"><span [innerHTML]=\"'sameWidth' | weReportIcon\"></span>{{ s.fitToText }}</button>\n }\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.duplicateSelection.bind(state))\"><span [innerHTML]=\"'copy' | weReportIcon\"></span>{{ s.duplicate }}<kbd>Ctrl+D</kbd></button>\n <hr />\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.arrange.bind(state, 'front'))\"><span [innerHTML]=\"'bringToFront' | weReportIcon\"></span>{{ s.bringToFront }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.arrange.bind(state, 'back'))\"><span [innerHTML]=\"'sendToBack' | weReportIcon\"></span>{{ s.sendToBack }}</button>\n <hr />\n <button type=\"button\" role=\"menuitem\" class=\"wd__danger\" (click)=\"menu(state.deleteSelection.bind(state))\"><span [innerHTML]=\"'trash' | weReportIcon\"></span>{{ s.delete }}<kbd>Del</kbd></button>\n } @else {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(addTextAt.bind(this, m.bandId, m.at))\"><span [innerHTML]=\"'text' | weReportIcon\"></span>{{ s.addTextHere }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.selectAll.bind(state))\"><span [innerHTML]=\"'outline' | weReportIcon\"></span>{{ s.selectAll }}<kbd>Ctrl+A</kbd></button>\n @if (m.bandId) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.toggleCollapsed.bind(state, m.bandId))\"><span [innerHTML]=\"'fitHeight' | weReportIcon\"></span>{{ state.collapsed().has(m.bandId) ? s.expandBand : s.collapseBand }}</button>\n }\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(fitBand.bind(this, m.bandId))\"><span [innerHTML]=\"'fitHeight' | weReportIcon\"></span>{{ s.fitBandToContent }}</button>\n @if (state.selectedBand()?.kind !== 'detail') {\n <hr />\n <button type=\"button\" role=\"menuitem\" class=\"wd__danger\" (click)=\"menu(state.deleteSelection.bind(state))\"><span [innerHTML]=\"'trash' | weReportIcon\"></span>{{ s.removeBand }}</button>\n }\n }\n </div>\n}\n\n@if (wizard(); as w) {\n <div class=\"wd__sheet-backdrop\" (click)=\"wizard.set(null)\"></div>\n <div class=\"wd__sheet wd__wizard\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.wizardTitle\" (keydown.escape)=\"wizard.set(null)\">\n <h2>{{ s.wizardTitle }}</h2>\n <label class=\"wd__wizard-row\">\n <span>{{ s.wizardReportTitle }}</span>\n <input type=\"text\" [value]=\"w.title\" (input)=\"updateWizard({ title: $any($event.target).value })\" />\n </label>\n <fieldset class=\"wd__wizard-fields\">\n <legend>{{ s.wizardColumns }}</legend>\n @for (f of w.fields; track f.name) {\n <label><input type=\"checkbox\" [checked]=\"f.on\" [disabled]=\"f.name === w.groupBy\" (change)=\"toggleWizardField(f.name)\" /> {{ f.name }}</label>\n }\n </fieldset>\n <label class=\"wd__wizard-row\">\n <span>{{ s.groupBy }}</span>\n <select (change)=\"updateWizard({ groupBy: $any($event.target).value })\">\n <option value=\"\" [selected]=\"!w.groupBy\">{{ s.noGrouping }}</option>\n @for (f of w.fields; track f.name) {\n <option [value]=\"f.name\" [selected]=\"f.name === w.groupBy\">{{ f.name }}</option>\n }\n </select>\n </label>\n <div class=\"wd__wizard-row\">\n <span>{{ s.sortRows }}</span>\n <span class=\"wd__wizard-pair\">\n <select (change)=\"updateWizard({ sortBy: $any($event.target).value })\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"\" [selected]=\"!w.sortBy\">{{ s.dataOrder }}</option>\n @for (f of w.fields; track f.name) {\n <option [value]=\"f.name\" [selected]=\"f.name === w.sortBy\">{{ f.name }}</option>\n }\n </select>\n <select [disabled]=\"!w.sortBy\" (change)=\"updateWizard({ sortDescending: $any($event.target).value === 'desc' })\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"asc\" [selected]=\"!w.sortDescending\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"w.sortDescending\">{{ s.sortDesc }}</option>\n </select>\n </span>\n </div>\n <label class=\"wd__wizard-row\">\n <span>{{ s.orientation }}</span>\n <select (change)=\"updateWizard({ orientation: $any($event.target).value })\">\n <option value=\"\" [selected]=\"!w.orientation\">{{ s.automatic }}</option>\n <option value=\"portrait\" [selected]=\"w.orientation === 'portrait'\">{{ s.portrait }}</option>\n <option value=\"landscape\" [selected]=\"w.orientation === 'landscape'\">{{ s.landscape }}</option>\n </select>\n </label>\n <label class=\"wd__wizard-check\"><input type=\"checkbox\" [checked]=\"w.totals\" (change)=\"updateWizard({ totals: !w.totals })\" /> {{ s.wizardTotals }}</label>\n <p class=\"wd__wizard-hint\">{{ s.autoDesignHint }}</p>\n <div class=\"wd__wizard-actions\">\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"wizard.set(null)\">{{ s.cancel }}</button>\n <button type=\"button\" class=\"wd__primary\" [disabled]=\"!wizardReady()\" (click)=\"runWizard()\">{{ s.createReport }}</button>\n </div>\n </div>\n}\n\n@if (shortcutsOpen()) {\n <div class=\"wd__sheet-backdrop\" (click)=\"shortcutsOpen.set(false)\"></div>\n <div class=\"wd__sheet\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.keyboardShortcuts\" (keydown.escape)=\"shortcutsOpen.set(false)\">\n <h2>{{ s.keyboardShortcuts }}</h2>\n <dl class=\"wd__keys\">\n <dt>Ctrl+Z \u00B7 Ctrl+Y</dt><dd>{{ s.undo }} \u00B7 {{ s.redo }}</dd>\n <dt>Ctrl+X \u00B7 Ctrl+C \u00B7 Ctrl+V</dt><dd>{{ s.cut }} \u00B7 {{ s.copy }} \u00B7 {{ s.paste }}</dd>\n <dt>Ctrl+D</dt><dd>{{ s.duplicate }}</dd>\n <dt>Delete</dt><dd>{{ s.delete }}</dd>\n <dt>Ctrl+A</dt><dd>{{ s.selectAll }}</dd>\n <dt>F2 \u00B7 Enter \u00B7 \u29C9</dt><dd>{{ s.editText }}</dd>\n <dt>Ctrl+B \u00B7 Ctrl+I \u00B7 Ctrl+U</dt><dd>{{ s.bold }} \u00B7 {{ s.italic }} \u00B7 {{ s.underline }}</dd>\n <dt>\u2190 \u2191 \u2192 \u2193 \u00B7 Shift</dt><dd>{{ s.moveItem }} (1 / 5 mm)</dd>\n <dt>Alt + \u2190 \u2191 \u2192 \u2193</dt><dd>{{ s.moveFine }}</dd>\n <dt>Ctrl + \u2190 \u2191 \u2192 \u2193</dt><dd>{{ s.resizeItem }}</dd>\n <dt>Tab \u00B7 Shift+Tab</dt><dd>{{ s.nextItem }}</dd>\n <dt>Ctrl+= \u00B7 Ctrl+- \u00B7 Ctrl+0</dt><dd>{{ s.zoomIn }} \u00B7 {{ s.zoomOut }} \u00B7 {{ s.fitWidth }}</dd>\n <dt>Alt</dt><dd>{{ s.noSnap }}</dd>\n <dt>Ctrl + \u21F1</dt><dd>{{ s.dragCopy }}</dd>\n <dt>\u2B1A</dt><dd>{{ s.rubberBand }}</dd>\n <dt>F5</dt><dd>{{ s.preview }} \u00B7 {{ s.design }}</dd>\n <dt>F1</dt><dd>{{ s.keyboardShortcuts }}</dd>\n </dl>\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"shortcutsOpen.set(false)\">{{ s.close }}</button>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;min-height:0;height:100%;font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;line-height:1.38;letter-spacing:-.003em;color:var(--we-report-fg, #1d1d1f);background:var(--we-report-workspace-bg, #f2f2f7);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}@media (prefers-reduced-motion: reduce){button{transition:none}}.wd__toolbar{position:relative;z-index:10;display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-height:52px;padding:8px 14px;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));box-sizing:border-box}.wd__tabs,.wd__mode{display:inline-flex;padding:2px;gap:2px;border-radius:9px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.wd__tabs button,.wd__mode button{display:inline-flex;align-items:center;gap:6px;border:0;border-radius:7px;padding:4px 12px;background:transparent;font-weight:500;cursor:pointer}.wd__tabs button :is(svg),.wd__mode button :is(svg){width:15px;height:15px}.wd__tab--on,.wd__mode--on{background:var(--we-report-segment-on-bg, #fff)!important;box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.wd__icon,.wd__text-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:transparent;cursor:pointer}.wd__icon :is(svg),.wd__text-btn :is(svg){width:17px;height:17px}.wd__icon:hover:not(:disabled),.wd__text-btn:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__icon:disabled,.wd__text-btn:disabled{opacity:.3;cursor:default}.wd__text-btn{padding:0 10px;font-weight:500}.wd__magic{color:var(--we-report-accent, #007aff)}.wd__issues{color:var(--we-report-warning-fg, #b25000);background:var(--we-report-warning-bg, rgba(255, 149, 0, .12))}.wd__sep{width:.5px;height:20px;margin:0 6px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__zoom{height:26px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 4px;background:transparent;font:inherit;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));cursor:pointer}.wd__zoom:hover{background:var(--we-report-input-bg, rgba(118, 118, 128, .1))}.wd__toggle{display:inline-flex;align-items:center;gap:6px;margin:0 6px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));cursor:pointer}.wd__toggle input{accent-color:var(--we-report-accent, #007aff)}.wd__spacer{flex:1}.wd__menu{position:relative}.wd__menu-list{position:absolute;top:calc(100% + 6px);left:0;z-index:20;display:flex;flex-direction:column;min-width:220px;padding:5px;border-radius:var(--we-report-radius, 12px);background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));animation:wd-pop .14s ease-out}.wd__menu-list button{text-align:left;border:0;border-radius:6px;padding:6px 10px;background:transparent;cursor:pointer}.wd__menu-list button:hover{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}@keyframes wd-pop{0%{opacity:0;transform:translateY(-4px) scale(.98)}}@media (prefers-reduced-motion: reduce){.wd__menu-list{animation:none}}.wd__problems{left:auto;right:0;width:380px;max-height:380px;overflow:auto}.wd__problem{display:flex;align-items:flex-start;gap:6px}.wd__problem .wd__problem-text{flex:1;font-size:12px}.wd__problem .wd__problem-text:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))!important;color:inherit!important}.wd__problem code{font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__fix{flex:none;font-weight:600;color:var(--we-report-accent, #007aff)!important}.wd__body{flex:1;display:grid;grid-template-columns:232px 6px minmax(0,1fr) 6px 288px;min-height:0}.wd__left,.wd__right{overflow:auto;background:var(--we-report-panel-bg, #fbfbfd)}.wd__left{padding:14px 12px 28px}.wd__left h2{margin:4px 4px 2px;font-size:13px;font-weight:600}.wd__left h3{margin:16px 4px 4px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__left,.wd__right{min-width:0}.wd__hint{margin:0 4px 10px;font-size:11.5px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:20px}.wd__tool{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px 10px;border-radius:10px;background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14)),0 1px 2px #0000000a;font-size:11.5px;text-align:center;cursor:grab;-webkit-user-select:none;user-select:none;transition:transform .15s ease,box-shadow .15s ease}.wd__tool :is(svg){width:20px;height:20px;color:var(--we-report-accent, #007aff)}.wd__tool:hover{transform:translateY(-1px);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14)),0 4px 12px #00000014}.wd__tool:active{cursor:grabbing;transform:scale(.97)}@media (prefers-reduced-motion: reduce){.wd__tool{transition:none}.wd__tool:hover,.wd__tool:active{transform:none}}.wd__fields{list-style:none;margin:0;padding:0}.wd__fields li{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:6px;cursor:grab;-webkit-user-select:none;user-select:none}.wd__fields li:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__field-type{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border-radius:5px;font-size:10px;font-weight:700;text-transform:uppercase;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.wd__center{display:flex;flex-direction:column;min-width:0;min-height:0}.wd__canvas{flex:1;min-height:0;overflow:auto;outline:none}.wd__preview{flex:1;min-height:0}.wd__left-tabs{display:flex;padding:2px;gap:2px;margin-bottom:14px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.wd__left-tabs button{flex:1;border:0;border-radius:6px;padding:4px 8px;background:transparent;font-size:12px;font-weight:500;cursor:pointer}.wd__left-tab--on{background:var(--we-report-segment-on-bg, #fff)!important;box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.wd__outline{list-style:none;margin:0;padding:0}.wd__outline ul{list-style:none;margin:0 0 8px;padding:0 0 0 10px}.wd__outline button{display:flex;align-items:center;gap:6px;width:100%;border:0;border-radius:6px;padding:4px 8px;background:transparent;text-align:left;cursor:pointer}.wd__outline button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__outline button :is(svg){flex:none;width:14px;height:14px;color:var(--we-report-accent, #007aff)}.wd__outline-band{font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__outline-item{font-size:12px}.wd__outline-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd__outline--on,.wd__outline--on:hover{background:var(--we-report-accent, #007aff)!important;color:var(--we-report-accent-fg, #fff)!important}.wd__outline--on :is(svg),.wd__outline--on:hover :is(svg){color:inherit!important}.wd__outline-empty{padding:2px 8px;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__context{position:fixed;z-index:200}.wd__context button{display:flex;align-items:center;gap:8px}.wd__context button :is(svg){width:14px;height:14px}.wd__context button:disabled{opacity:.4;cursor:default;background:transparent!important;color:inherit!important}.wd__context kbd{margin-left:auto;padding-left:16px;font:inherit;font-size:11px;opacity:.55}.wd__context hr{width:100%;margin:4px 0;border:0;border-top:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__danger{color:var(--we-report-warning-fg, #b25000)}.wd__formatbar{display:flex;align-items:center;flex-wrap:wrap;gap:2px;min-height:40px;padding:4px 14px;box-sizing:border-box;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__formatbar select,.wd__formatbar input[type=number]{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__formatbar select:focus,.wd__formatbar input[type=number]:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.wd__formatbar select:disabled,.wd__formatbar input[type=number]:disabled{opacity:.4}.wd__font{width:150px}.wd__size{width:62px;font-variant-numeric:tabular-nums}.wd__fmt{min-width:28px;height:28px;font-size:14px}.wd__fmt--on{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07))!important;color:var(--we-report-accent, #007aff);box-shadow:inset 0 0 0 1px var(--we-report-selection, #007aff)}.wd__well{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--we-report-control-radius, 7px);cursor:pointer}.wd__well:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__well span{font-weight:700;font-size:14px}.wd__well input{position:absolute;left:4px;right:4px;bottom:3px;height:4px;width:auto;padding:0;border:0;opacity:1;cursor:pointer;pointer-events:auto}.wd__well input::-webkit-color-swatch-wrapper{padding:0}.wd__well input::-webkit-color-swatch{border:0;border-radius:1px}.wd__well--fill span{width:14px;height:14px;border-radius:3px;box-shadow:inset 0 0 0 1px var(--we-report-separator, rgba(60, 60, 67, .3))}.wd__formatbar--off .wd__well{opacity:.4;pointer-events:none}.wd__status{display:flex;align-items:center;gap:14px;min-height:26px;padding:0 14px;font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));border-top:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__status-sel{color:var(--we-report-fg, #1d1d1f);font-weight:500}.wd__splitter{position:relative;cursor:col-resize;background:var(--we-report-panel-bg, #fbfbfd);touch-action:none}.wd__splitter:after{content:\"\";position:absolute;top:0;bottom:0;left:50%;width:.5px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__splitter:hover:after{width:2px;margin-left:-1px;background:var(--we-report-accent, #007aff)}.wd__tool:focus-visible,.wd__fields li:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.wd__field-filter{width:100%;height:28px;box-sizing:border-box;margin-bottom:6px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__wizard{display:flex;flex-direction:column;gap:10px}.wd__wizard input[type=text],.wd__wizard select{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__wizard-row{display:grid;grid-template-columns:140px 1fr;align-items:center;gap:8px}.wd__wizard-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}.wd__wizard-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:4px 12px;max-height:220px;overflow:auto;margin:0;padding:8px 10px;border:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));border-radius:var(--we-report-control-radius, 7px)}.wd__wizard-fields legend{padding:0 4px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62))}.wd__wizard-fields label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd__wizard-hint{margin:0;color:var(--we-report-muted-fg, rgba(60, 60, 67, .62));font-size:12px}.wd__wizard-actions{display:flex;justify-content:flex-end;gap:8px}.wd__primary{height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 14px;background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);font:inherit;font-weight:600;cursor:pointer}.wd__sheet-backdrop{position:fixed;inset:0;z-index:150;background:var(--we-report-backdrop, rgba(0, 0, 0, .22))}.wd__sheet{position:fixed;top:50%;left:50%;z-index:151;transform:translate(-50%,-50%);width:min(560px,100vw - 32px);max-height:calc(100vh - 32px);overflow:auto;box-sizing:border-box;padding:20px 22px;border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14))}.wd__sheet h2{margin:0 0 12px;font-size:15px;font-weight:600}.wd__keys{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0 0 14px}.wd__keys dt{font:12px ui-monospace,SF Mono,Menlo,Consolas,monospace;color:var(--we-report-accent, #007aff)}.wd__keys dd{margin:0}.wd__collapsed{visibility:hidden;padding:0!important;overflow:hidden!important}\n"] }]
|
|
8586
|
+
args: [{ selector: 'we-report-designer', standalone: true, imports: [DesignSurfaceComponent, PropertyPanelComponent, WeReportViewerComponent, WeReportIconPipe, DataSourcesDialogComponent], providers: [DesignerState], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let s = strings();\n<div class=\"wd__toolbar\" role=\"toolbar\">\n <div class=\"wd__tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"tab() === 'design'\" [class.wd__tab--on]=\"tab() === 'design'\" (click)=\"tab.set('design')\">\n <span [innerHTML]=\"'design' | weReportIcon\"></span>{{ s.design }}\n </button>\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"tab() === 'preview'\" [class.wd__tab--on]=\"tab() === 'preview'\" (click)=\"tab.set('preview')\" title=\"F5\">\n <span [innerHTML]=\"'preview' | weReportIcon\"></span>{{ s.preview }}\n </button>\n </div>\n @if (tab() === 'design') {\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"!state.canUndo()\" (click)=\"state.undo()\" [title]=\"s.undo + ' (Ctrl+Z)'\" [attr.aria-label]=\"s.undo\" [innerHTML]=\"'undo' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"!state.canRedo()\" (click)=\"state.redo()\" [title]=\"s.redo + ' (Ctrl+Y)'\" [attr.aria-label]=\"s.redo\" [innerHTML]=\"'redo' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" [disabled]=\"state.selection().kind !== 'controls'\" (click)=\"state.deleteSelection()\" [title]=\"s.delete + ' (Del)'\" [attr.aria-label]=\"s.delete\" [innerHTML]=\"'trash' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon\" (click)=\"setZoom(zoomLevel() - 0.1)\" [title]=\"s.zoomOut\" [attr.aria-label]=\"s.zoomOut\" [innerHTML]=\"'zoomOut' | weReportIcon\"></button>\n <select class=\"wd__zoom\" (change)=\"pickZoom($any($event.target).value); $any($event.target).value = ''\" [attr.aria-label]=\"s.zoomLevel\">\n <option value=\"\" selected>{{ (zoomLevel() * 100).toFixed(0) }}%</option>\n @for (z of zoomSteps; track z) {\n <option [value]=\"z\">{{ z * 100 }}%</option>\n }\n <option value=\"width\">{{ s.fitWidth }}</option>\n </select>\n <button type=\"button\" class=\"wd__icon\" (click)=\"setZoom(zoomLevel() + 0.1)\" [title]=\"s.zoomIn\" [attr.aria-label]=\"s.zoomIn\" [innerHTML]=\"'zoomIn' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon\" (click)=\"fitWidth()\" [title]=\"s.fitWidth\" [attr.aria-label]=\"s.fitWidth\" [innerHTML]=\"'fitWidth' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <div class=\"wd__menu\">\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"bandMenuOpen.set(!bandMenuOpen())\" [attr.aria-expanded]=\"bandMenuOpen()\">+ {{ s.addBand }}</button>\n @if (bandMenuOpen()) {\n <div class=\"wd__menu-list\" role=\"menu\">\n @for (k of addableBands(); track k) {\n <button type=\"button\" role=\"menuitem\" (click)=\"addBand(k)\">{{ k === 'groupHeader' ? s.groupBy + '\u2026' : s.bandNames[k] }}</button>\n }\n </div>\n }\n </div>\n @if (shownFields().rows.length) {\n <button type=\"button\" class=\"wd__text-btn wd__magic\" (click)=\"autoDesign()\" [title]=\"s.autoDesignHint\"><span [innerHTML]=\"'wand' | weReportIcon\"></span> {{ s.wizardTitle }}</button>\n }\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"dataDialogOpen.set(true)\">\n <span [innerHTML]=\"'database' | weReportIcon\"></span> {{ s.dataSources }}\n </button>\n <label class=\"wd__toggle\">\n <input type=\"checkbox\" [checked]=\"showData()\" (change)=\"showData.set($any($event.target).checked)\" />\n {{ s.showData }}\n </label>\n <select class=\"wd__zoom\" [title]=\"s.snapGrid\" [attr.aria-label]=\"s.snapGrid\" (change)=\"gridSize.set(+$any($event.target).value)\">\n @for (g of gridSteps; track g) {\n <option [value]=\"g\" [selected]=\"g === gridSize()\">{{ g ? g + ' mm' : s.gridOff }}</option>\n }\n </select>\n <span class=\"wd__spacer\"></span>\n <div class=\"wd__menu\">\n <button type=\"button\" class=\"wd__text-btn\" [class.wd__issues]=\"issues().length\" (click)=\"problemsOpen.set(!problemsOpen())\" [attr.aria-expanded]=\"problemsOpen()\">\n {{ issues().length ? '\u26A0 ' + issues().length : '\u2713' }} {{ s.problems }}\n </button>\n @if (problemsOpen()) {\n <div class=\"wd__menu-list wd__problems\" role=\"list\">\n @for (issue of issues(); track $index) {\n <div class=\"wd__problem\" role=\"listitem\">\n <button type=\"button\" class=\"wd__problem-text\" (click)=\"showIssue(issue)\">\n <code>{{ issue.controlId }}</code> {{ issueText(issue) }}\n </button>\n @if (issue.code === 'outsidePage' || issue.code === 'textCut' || issue.code === 'checkDigit') {\n <button type=\"button\" class=\"wd__fix\" (click)=\"fixIssue(issue)\">{{ s.fixIt }}</button>\n }\n </div>\n } @empty {\n <p class=\"wd__hint\">{{ s.noProblems }}</p>\n }\n </div>\n }\n </div>\n <button type=\"button\" class=\"wd__icon\" (click)=\"shortcutsOpen.set(true)\" [title]=\"s.keyboardShortcuts + ' (F1)'\" [attr.aria-label]=\"s.keyboardShortcuts\" [innerHTML]=\"'keyboard' | weReportIcon\"></button>\n <div class=\"wd__mode\" role=\"radiogroup\">\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"!advanced()\" [class.wd__mode--on]=\"!advanced()\" (click)=\"advanced.set(false)\">{{ s.basicMode }}</button>\n <button type=\"button\" role=\"radio\" [attr.aria-checked]=\"advanced()\" [class.wd__mode--on]=\"advanced()\" (click)=\"advanced.set(true)\">{{ s.advancedMode }}</button>\n </div>\n }\n</div>\n\n@if (tab() === 'design') {\n <div class=\"wd__body\" [style.grid-template-columns]=\"leftWidth() + 'px 6px minmax(0, 1fr) 6px ' + rightWidth() + 'px'\">\n <aside class=\"wd__left\" [class.wd__collapsed]=\"!leftWidth()\">\n <div class=\"wd__left-tabs\" role=\"tablist\">\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"leftTab() === 'add'\" [class.wd__left-tab--on]=\"leftTab() === 'add'\" (click)=\"leftTab.set('add')\">{{ s.add }}</button>\n <button type=\"button\" role=\"tab\" [attr.aria-selected]=\"leftTab() === 'outline'\" [class.wd__left-tab--on]=\"leftTab() === 'outline'\" (click)=\"leftTab.set('outline')\">{{ s.explorer }}</button>\n </div>\n @if (leftTab() === 'add') {\n <h2>{{ s.toolbox }}</h2>\n <p class=\"wd__hint\">{{ s.toolboxHint }} {{ s.addByClick }}</p>\n <div class=\"wd__tools\">\n @for (item of toolbox; track $index) {\n <div class=\"wd__tool\" draggable=\"true\" role=\"button\" tabindex=\"0\" (dragstart)=\"onToolDragStart($event, item)\" (click)=\"onToolClick(item)\" (keydown.enter)=\"onToolClick(item)\" [title]=\"item.variant === 'signature' ? s.signature : s.controlNames[item.type]\">\n <span [innerHTML]=\"iconName(item.icon) | weReportIcon\"></span>\n <span>{{ item.variant === 'qrcode' ? 'QR' : item.variant === 'signature' ? s.signature : s.controlNames[item.type] }}</span>\n </div>\n }\n </div>\n\n <h2>{{ s.fields }}</h2>\n @if (fields().rows.length || fields().parent.length) {\n <p class=\"wd__hint\">{{ s.fieldsHint }}</p>\n @if (allFields().length > 8) {\n <input class=\"wd__field-filter\" type=\"search\" [placeholder]=\"s.filterFields\" [attr.aria-label]=\"s.filterFields\" [value]=\"fieldFilter()\" (input)=\"fieldFilter.set($any($event.target).value)\" />\n }\n <!-- The fields are buttons (drag or double-click), not a reading list. -->\n <ul class=\"wd__fields\" role=\"none\">\n @for (f of shownFields().rows; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n @if (shownFields().inner.length) {\n <h3>{{ s.innerFields }}</h3>\n <ul class=\"wd__fields\" role=\"none\">\n @for (f of shownFields().inner; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n }\n @if (shownFields().parent.length) {\n <h3>{{ s.parentFields }}</h3>\n <ul class=\"wd__fields\" role=\"none\">\n @for (f of shownFields().parent; track f.path) {\n <li draggable=\"true\" tabindex=\"0\" role=\"button\" (dragstart)=\"onFieldDragStart($event, f)\" (dblclick)=\"onFieldDblClick(f)\" (keydown.enter)=\"onFieldDblClick(f)\" [style.padding-left.px]=\"8 + f.depth * 12\" [attr.data-type]=\"f.type\">\n <span class=\"wd__field-type\">{{ f.type[0] }}</span>{{ f.label }}\n </li>\n }\n </ul>\n }\n } @else {\n <p class=\"wd__hint\">{{ s.noFields }}</p>\n }\n } @else {\n <p class=\"wd__hint\">{{ s.explorerHint }}</p>\n <ul class=\"wd__outline\" role=\"tree\">\n @for (band of state.report().bands; track band.id) {\n <li role=\"treeitem\" [attr.aria-expanded]=\"true\">\n <button type=\"button\" class=\"wd__outline-band\" [class.wd__outline--on]=\"state.selection().kind === 'band' && state.selectedBand()?.id === band.id\" (click)=\"state.selection.set({ kind: 'band', id: band.id })\">\n {{ s.bandNames[band.kind] }}\n </button>\n <ul role=\"group\">\n @for (c of band.controls; track c.id) {\n <li role=\"treeitem\">\n <button type=\"button\" class=\"wd__outline-item\" [class.wd__outline--on]=\"isSelected(c.id)\" (click)=\"selectFromOutline($event, c.id)\">\n <span [innerHTML]=\"outlineIcon(c) | weReportIcon\"></span><span class=\"wd__outline-text\">{{ outlineLabel(c) }}</span>\n </button>\n </li>\n } @empty {\n <li class=\"wd__outline-empty\">{{ s.emptyBand }}</li>\n }\n </ul>\n </li>\n }\n </ul>\n }\n </aside>\n\n <div class=\"wd__splitter\" role=\"separator\" aria-orientation=\"vertical\" [title]=\"s.resizePanel\" (pointerdown)=\"startResize($event, 'left')\" (dblclick)=\"togglePanel('left')\"></div>\n <div class=\"wd__center\">\n @let st = formatStyle();\n <div class=\"wd__formatbar\" role=\"toolbar\" [attr.aria-label]=\"s.formatBar\" [class.wd__formatbar--off]=\"!st\">\n <select class=\"wd__font\" [disabled]=\"!st\" (change)=\"format('fontFamily', $any($event.target).value)\" [attr.aria-label]=\"s.font\" [title]=\"s.font\">\n @for (f of fontFamilies(); track f) {\n <option [value]=\"f\" [selected]=\"st?.fontFamily === f\">{{ f }}</option>\n }\n @if (st && !fontFamilies().includes(st.fontFamily)) {\n <option [value]=\"st.fontFamily\" selected>{{ st.fontFamily }}</option>\n }\n </select>\n <input class=\"wd__size\" type=\"number\" min=\"4\" max=\"200\" step=\"1\" [attr.list]=\"sizeListId\" [disabled]=\"!st\" [value]=\"st?.fontSize ?? ''\" (change)=\"format('fontSize', +$any($event.target).value || undefined)\" [attr.aria-label]=\"s.fontSize\" [title]=\"s.fontSize\" />\n <datalist [id]=\"sizeListId\">\n @for (n of fontSizes; track n) {\n <option [value]=\"n\"></option>\n }\n </datalist>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.bold\" (click)=\"toggleFormat('bold')\" [title]=\"s.bold + ' (Ctrl+B)'\" [attr.aria-pressed]=\"!!st?.bold\"><b>B</b></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.italic\" (click)=\"toggleFormat('italic')\" [title]=\"s.italic + ' (Ctrl+I)'\" [attr.aria-pressed]=\"!!st?.italic\"><i>I</i></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.underline\" (click)=\"toggleFormat('underline')\" [title]=\"s.underline + ' (Ctrl+U)'\" [attr.aria-pressed]=\"!!st?.underline\"><u>U</u></button>\n <span class=\"wd__sep\"></span>\n @for (a of textAligns; track a.value) {\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"st?.textAlign === a.value\" (click)=\"format('textAlign', a.value)\" [title]=\"s[a.label]\" [attr.aria-label]=\"s[a.label]\" [innerHTML]=\"a.icon | weReportIcon\"></button>\n }\n <span class=\"wd__sep\"></span>\n <label class=\"wd__well\" [title]=\"s.textColor\">\n <span>A</span>\n <input type=\"color\" [disabled]=\"!st\" [value]=\"st?.color ?? '#000000'\" (input)=\"format('color', $any($event.target).value)\" [attr.aria-label]=\"s.textColor\" />\n </label>\n <label class=\"wd__well wd__well--fill\" [title]=\"s.backgroundColor\">\n <span [style.background]=\"st?.backgroundColor ?? 'transparent'\"></span>\n <input type=\"color\" [disabled]=\"!st\" [value]=\"st?.backgroundColor ?? '#ffffff'\" (input)=\"format('backgroundColor', $any($event.target).value)\" [attr.aria-label]=\"s.backgroundColor\" />\n </label>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" (click)=\"format('backgroundColor', undefined)\" [title]=\"s.backgroundColor + ': ' + s.noColor\" [attr.aria-label]=\"s.noColor\" [innerHTML]=\"'noColor' | weReportIcon\"></button>\n <span class=\"wd__sep\"></span>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"!!st?.border\" (click)=\"setBorder(true)\" [title]=\"s.allBorders\" [attr.aria-label]=\"s.allBorders\" [innerHTML]=\"'borderAll' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" (click)=\"setBorder(false)\" [title]=\"s.noBorder\" [attr.aria-label]=\"s.noBorder\" [innerHTML]=\"'borderNone' | weReportIcon\"></button>\n <button type=\"button\" class=\"wd__icon wd__fmt\" [disabled]=\"!st\" [class.wd__fmt--on]=\"!!state.painter()\" (click)=\"togglePainter()\" [title]=\"s.formatPainter\" [attr.aria-label]=\"s.formatPainter\" [attr.aria-pressed]=\"!!state.painter()\" [innerHTML]=\"'brush' | weReportIcon\"></button>\n </div>\n <main #canvas class=\"wd__canvas\" tabindex=\"-1\" (contextmenu)=\"openContextMenu($event)\" (wheel)=\"onCanvasWheel($event)\">\n <we-report-design-surface [strings]=\"s\" [zoom]=\"zoomLevel()\" [gridSize]=\"gridSize()\" [sample]=\"sample()\" [fields]=\"allFields()\" />\n </main>\n </div>\n\n <div class=\"wd__splitter\" role=\"separator\" aria-orientation=\"vertical\" [title]=\"s.resizePanel\" (pointerdown)=\"startResize($event, 'right')\" (dblclick)=\"togglePanel('right')\"></div>\n <aside class=\"wd__right\" [class.wd__collapsed]=\"!rightWidth()\">\n <we-report-property-panel [strings]=\"s\" [fields]=\"allFields()\" [lists]=\"fields().lists\" [embedded]=\"embedded()\" [fontFamilies]=\"fontFamilies()\" [advanced]=\"advanced()\" />\n </aside>\n </div>\n <footer class=\"wd__status\" aria-live=\"polite\">\n @let info = selectionInfo();\n <span class=\"wd__status-sel\">{{ info.title }}</span>\n @if (info.box; as b) {\n <span>{{ s.left }} {{ mm(b.x) }}</span>\n <span>{{ s.top }} {{ mm(b.y) }}</span>\n <span>{{ s.width }} {{ mm(b.width) }}</span>\n <span>{{ s.height }} {{ mm(b.height) }} mm</span>\n }\n <span class=\"wd__spacer\"></span>\n <span class=\"wd__status-pointer\">{{ pointerInfo() }}</span>\n <span>{{ (zoomLevel() * 100).toFixed(0) }}%</span>\n </footer>\n} @else {\n <we-report-viewer class=\"wd__preview\" [report]=\"state.report()\" [data]=\"data()\" [outerRow]=\"outerRow()\" [locale]=\"s\" [fetchFn]=\"fetchFn()\" />\n}\n\n@if (dataDialogOpen()) {\n <we-report-data-sources-dialog [strings]=\"s\" [fetchFn]=\"fetchFn()\" [hostData]=\"data() !== undefined\" (closed)=\"dataDialogOpen.set(false)\" />\n}\n\n@if (contextMenu(); as m) {\n <div class=\"wd__menu-list wd__context\" role=\"menu\" [style.left.px]=\"m.x\" [style.top.px]=\"m.y\" (keydown.escape)=\"contextMenu.set(null)\">\n @if (m.onControl) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.cutSelection.bind(state))\"><span [innerHTML]=\"'cut' | weReportIcon\"></span>{{ s.cut }}<kbd>Ctrl+X</kbd></button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.copySelection.bind(state))\"><span [innerHTML]=\"'copy' | weReportIcon\"></span>{{ s.copy }}<kbd>Ctrl+C</kbd></button>\n }\n <button type=\"button\" role=\"menuitem\" [disabled]=\"!state.hasClipboard()\" (click)=\"menu(state.paste.bind(state, m.bandId ?? undefined))\"><span [innerHTML]=\"'paste' | weReportIcon\"></span>{{ s.paste }}<kbd>Ctrl+V</kbd></button>\n @if (m.onControl) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(editSelected.bind(this))\"><span [innerHTML]=\"'edit' | weReportIcon\"></span>{{ s.editText }}<kbd>F2</kbd></button>\n @if (totalTarget()) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(addTotal.bind(this))\"><span [innerHTML]=\"'sum' | weReportIcon\"></span>{{ s.addTotal }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(groupByValue.bind(this))\"><span [innerHTML]=\"'outline' | weReportIcon\"></span>{{ s.groupByThis }}</button>\n }\n @if (hasTextSelected()) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(fitToText.bind(this))\"><span [innerHTML]=\"'sameWidth' | weReportIcon\"></span>{{ s.fitToText }}</button>\n }\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.duplicateSelection.bind(state))\"><span [innerHTML]=\"'copy' | weReportIcon\"></span>{{ s.duplicate }}<kbd>Ctrl+D</kbd></button>\n @if (state.selectedControls().length > 1) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(tidySelection.bind(this))\" [title]=\"s.tidyUpHint\"><span [innerHTML]=\"'wand' | weReportIcon\"></span>{{ s.tidyUp }}</button>\n }\n <hr />\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.arrange.bind(state, 'front'))\"><span [innerHTML]=\"'bringToFront' | weReportIcon\"></span>{{ s.bringToFront }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.arrange.bind(state, 'back'))\"><span [innerHTML]=\"'sendToBack' | weReportIcon\"></span>{{ s.sendToBack }}</button>\n <hr />\n <button type=\"button\" role=\"menuitem\" class=\"wd__danger\" (click)=\"menu(state.deleteSelection.bind(state))\"><span [innerHTML]=\"'trash' | weReportIcon\"></span>{{ s.delete }}<kbd>Del</kbd></button>\n } @else {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(addTextAt.bind(this, m.bandId, m.at))\"><span [innerHTML]=\"'text' | weReportIcon\"></span>{{ s.addTextHere }}</button>\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.selectAll.bind(state))\"><span [innerHTML]=\"'outline' | weReportIcon\"></span>{{ s.selectAll }}<kbd>Ctrl+A</kbd></button>\n @if (m.bandId) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(state.toggleCollapsed.bind(state, m.bandId))\"><span [innerHTML]=\"'fitHeight' | weReportIcon\"></span>{{ state.collapsed().has(m.bandId) ? s.expandBand : s.collapseBand }}</button>\n }\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(fitBand.bind(this, m.bandId))\"><span [innerHTML]=\"'fitHeight' | weReportIcon\"></span>{{ s.fitBandToContent }}</button>\n @if (m.bandId) {\n <button type=\"button\" role=\"menuitem\" (click)=\"menu(tidyBand.bind(this, m.bandId))\" [title]=\"s.tidyUpHint\"><span [innerHTML]=\"'wand' | weReportIcon\"></span>{{ s.tidyUp }}</button>\n }\n @if (state.selectedBand()?.kind !== 'detail') {\n <hr />\n <button type=\"button\" role=\"menuitem\" class=\"wd__danger\" (click)=\"menu(state.deleteSelection.bind(state))\"><span [innerHTML]=\"'trash' | weReportIcon\"></span>{{ s.removeBand }}</button>\n }\n }\n </div>\n}\n\n@if (wizard(); as w) {\n <div class=\"wd__sheet-backdrop\" (click)=\"wizard.set(null)\"></div>\n <div class=\"wd__sheet wd__wizard\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.wizardTitle\" (keydown.escape)=\"wizard.set(null)\">\n <h2>{{ s.wizardTitle }}</h2>\n <label class=\"wd__wizard-row\">\n <span>{{ s.wizardReportTitle }}</span>\n <input type=\"text\" [value]=\"w.title\" (input)=\"updateWizard({ title: $any($event.target).value })\" />\n </label>\n <fieldset class=\"wd__wizard-fields\">\n <legend>{{ s.wizardColumns }}</legend>\n @for (f of w.fields; track f.name) {\n <label><input type=\"checkbox\" [checked]=\"f.on\" [disabled]=\"f.name === w.groupBy\" (change)=\"toggleWizardField(f.name)\" /> {{ f.name }}</label>\n }\n </fieldset>\n <label class=\"wd__wizard-row\">\n <span>{{ s.groupBy }}</span>\n <select (change)=\"updateWizard({ groupBy: $any($event.target).value })\">\n <option value=\"\" [selected]=\"!w.groupBy\">{{ s.noGrouping }}</option>\n @for (f of w.fields; track f.name) {\n <option [value]=\"f.name\" [selected]=\"f.name === w.groupBy\">{{ f.name }}</option>\n }\n </select>\n </label>\n <div class=\"wd__wizard-row\">\n <span>{{ s.sortRows }}</span>\n <span class=\"wd__wizard-pair\">\n <select (change)=\"updateWizard({ sortBy: $any($event.target).value })\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"\" [selected]=\"!w.sortBy\">{{ s.dataOrder }}</option>\n @for (f of w.fields; track f.name) {\n <option [value]=\"f.name\" [selected]=\"f.name === w.sortBy\">{{ f.name }}</option>\n }\n </select>\n <select [disabled]=\"!w.sortBy\" (change)=\"updateWizard({ sortDescending: $any($event.target).value === 'desc' })\" [attr.aria-label]=\"s.sortRows\">\n <option value=\"asc\" [selected]=\"!w.sortDescending\">{{ s.sortAsc }}</option>\n <option value=\"desc\" [selected]=\"w.sortDescending\">{{ s.sortDesc }}</option>\n </select>\n </span>\n </div>\n <label class=\"wd__wizard-row\">\n <span>{{ s.orientation }}</span>\n <select (change)=\"updateWizard({ orientation: $any($event.target).value })\">\n <option value=\"\" [selected]=\"!w.orientation\">{{ s.automatic }}</option>\n <option value=\"portrait\" [selected]=\"w.orientation === 'portrait'\">{{ s.portrait }}</option>\n <option value=\"landscape\" [selected]=\"w.orientation === 'landscape'\">{{ s.landscape }}</option>\n </select>\n </label>\n <label class=\"wd__wizard-check\"><input type=\"checkbox\" [checked]=\"w.totals\" (change)=\"updateWizard({ totals: !w.totals })\" /> {{ s.wizardTotals }}</label>\n <p class=\"wd__wizard-hint\">{{ s.autoDesignHint }}</p>\n <div class=\"wd__wizard-actions\">\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"wizard.set(null)\">{{ s.cancel }}</button>\n <button type=\"button\" class=\"wd__primary\" [disabled]=\"!wizardReady()\" (click)=\"runWizard()\">{{ s.createReport }}</button>\n </div>\n </div>\n}\n\n@if (shortcutsOpen()) {\n <div class=\"wd__sheet-backdrop\" (click)=\"shortcutsOpen.set(false)\"></div>\n <div class=\"wd__sheet\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.keyboardShortcuts\" (keydown.escape)=\"shortcutsOpen.set(false)\">\n <h2>{{ s.keyboardShortcuts }}</h2>\n <dl class=\"wd__keys\">\n <dt>Ctrl+Z \u00B7 Ctrl+Y</dt><dd>{{ s.undo }} \u00B7 {{ s.redo }}</dd>\n <dt>Ctrl+X \u00B7 Ctrl+C \u00B7 Ctrl+V</dt><dd>{{ s.cut }} \u00B7 {{ s.copy }} \u00B7 {{ s.paste }}</dd>\n <dt>Ctrl+D</dt><dd>{{ s.duplicate }}</dd>\n <dt>Delete</dt><dd>{{ s.delete }}</dd>\n <dt>Ctrl+A</dt><dd>{{ s.selectAll }}</dd>\n <dt>F2 \u00B7 Enter \u00B7 \u29C9</dt><dd>{{ s.editText }}</dd>\n <dt>Ctrl+B \u00B7 Ctrl+I \u00B7 Ctrl+U</dt><dd>{{ s.bold }} \u00B7 {{ s.italic }} \u00B7 {{ s.underline }}</dd>\n <dt>\u2190 \u2191 \u2192 \u2193 \u00B7 Shift</dt><dd>{{ s.moveItem }} (1 / 5 mm)</dd>\n <dt>Alt + \u2190 \u2191 \u2192 \u2193</dt><dd>{{ s.moveFine }}</dd>\n <dt>Ctrl + \u2190 \u2191 \u2192 \u2193</dt><dd>{{ s.resizeItem }}</dd>\n <dt>Tab \u00B7 Shift+Tab</dt><dd>{{ s.nextItem }}</dd>\n <dt>Ctrl+= \u00B7 Ctrl+- \u00B7 Ctrl+0</dt><dd>{{ s.zoomIn }} \u00B7 {{ s.zoomOut }} \u00B7 {{ s.fitWidth }}</dd>\n <dt>Alt</dt><dd>{{ s.noSnap }}</dd>\n <dt>Ctrl + \u21F1</dt><dd>{{ s.dragCopy }}</dd>\n <dt>\u2B1A</dt><dd>{{ s.rubberBand }}</dd>\n <dt>F5</dt><dd>{{ s.preview }} \u00B7 {{ s.design }}</dd>\n <dt>F1</dt><dd>{{ s.keyboardShortcuts }}</dd>\n </dl>\n <button type=\"button\" class=\"wd__text-btn\" (click)=\"shortcutsOpen.set(false)\">{{ s.close }}</button>\n </div>\n}\n\n@if (openSubreport(); as sub) {\n <div class=\"wd__sheet-backdrop\"></div>\n <!-- Keys and clipboard events stay with the inner designer; the outer one would act on its own page. -->\n <div class=\"wd__sheet wd__subreport\" tabindex=\"-1\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"s.subreportTitle.replace('{0}', sub.report.name)\"\n (keydown)=\"$event.stopPropagation()\" (copy)=\"$event.stopPropagation()\" (cut)=\"$event.stopPropagation()\" (paste)=\"$event.stopPropagation()\">\n <div class=\"wd__subreport-head\">\n <h2>{{ s.subreportTitle.replace('{0}', sub.report.name) }}</h2>\n <button type=\"button\" class=\"wd__primary\" (click)=\"state.subreportOpen.set(null)\">{{ s.subreportDone }}</button>\n </div>\n <we-report-designer class=\"wd__subreport-designer\" [report]=\"subreportDesign()!\" (reportChange)=\"setSubreport(sub.id, $event)\" [data]=\"subreportData()\" [outerRow]=\"state.sample()?.row\" [embedded]=\"true\" [locale]=\"locale()\" [fetchFn]=\"fetchFn()\" />\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;min-height:0;height:100%;font-family:var(--we-report-font-family, system-ui, sans-serif);font-size:13px;line-height:1.38;letter-spacing:-.003em;color:var(--we-report-fg, #1d1d1f);background:var(--we-report-workspace-bg, #f2f2f7);-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}button:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}@media (prefers-reduced-motion: reduce){button{transition:none}}.wd__toolbar{position:relative;z-index:10;display:flex;align-items:center;flex-wrap:wrap;gap:4px;min-height:52px;padding:8px 14px;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));box-sizing:border-box}.wd__tabs,.wd__mode{display:inline-flex;padding:2px;gap:2px;border-radius:9px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.wd__tabs button,.wd__mode button{display:inline-flex;align-items:center;gap:6px;border:0;border-radius:7px;padding:4px 12px;background:transparent;font-weight:500;cursor:pointer}.wd__tabs button :is(svg),.wd__mode button :is(svg){width:15px;height:15px}.wd__tab--on,.wd__mode--on{background:var(--we-report-segment-on-bg, #fff)!important;box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.wd__icon,.wd__text-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:30px;height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);background:transparent;cursor:pointer}.wd__icon :is(svg),.wd__text-btn :is(svg){width:17px;height:17px}.wd__icon:hover:not(:disabled),.wd__text-btn:hover:not(:disabled){background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__icon:disabled,.wd__text-btn:disabled{opacity:.3;cursor:default}.wd__text-btn{padding:0 10px;font-weight:500}.wd__magic{color:var(--we-report-accent, #007aff)}.wd__issues{color:var(--we-report-warning-fg, #9a4400);background:var(--we-report-warning-bg, rgba(255, 149, 0, .12))}.wd__sep{width:.5px;height:20px;margin:0 6px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__zoom{height:26px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 4px;background:transparent;font:inherit;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));cursor:pointer}.wd__zoom:hover{background:var(--we-report-input-bg, rgba(118, 118, 128, .1))}.wd__toggle{display:inline-flex;align-items:center;gap:6px;margin:0 6px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));cursor:pointer}.wd__toggle input{accent-color:var(--we-report-accent, #007aff)}.wd__spacer{flex:1}.wd__menu{position:relative}.wd__menu-list{position:absolute;top:calc(100% + 6px);left:0;z-index:20;display:flex;flex-direction:column;min-width:220px;padding:5px;border-radius:var(--we-report-radius, 12px);background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14));animation:wd-pop .14s ease-out}.wd__menu-list button{text-align:left;border:0;border-radius:6px;padding:6px 10px;background:transparent;cursor:pointer}.wd__menu-list button:hover{background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff)}@keyframes wd-pop{0%{opacity:0;transform:translateY(-4px) scale(.98)}}@media (prefers-reduced-motion: reduce){.wd__menu-list{animation:none}}.wd__problems{left:auto;right:0;width:380px;max-height:380px;overflow:auto}.wd__problem{display:flex;align-items:flex-start;gap:6px}.wd__problem .wd__problem-text{flex:1;font-size:12px}.wd__problem .wd__problem-text:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))!important;color:inherit!important}.wd__problem code{font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__fix{flex:none;font-weight:600;color:var(--we-report-accent, #007aff)!important}.wd__body{flex:1;display:grid;grid-template-columns:232px 6px minmax(0,1fr) 6px 288px;min-height:0}.wd__left,.wd__right{overflow:auto;background:var(--we-report-panel-bg, #fbfbfd)}.wd__left{padding:14px 12px 28px}.wd__left h2{margin:4px 4px 2px;font-size:13px;font-weight:600}.wd__left h3{margin:16px 4px 4px;font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__left,.wd__right{min-width:0}.wd__hint{margin:0 4px 10px;font-size:11.5px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:20px}.wd__tool{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px 10px;border-radius:10px;background:var(--we-report-segment-on-bg, #fff);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14)),0 1px 2px #0000000a;font-size:11.5px;text-align:center;cursor:grab;-webkit-user-select:none;user-select:none;transition:transform .15s ease,box-shadow .15s ease}.wd__tool :is(svg){width:20px;height:20px;color:var(--we-report-accent, #007aff)}.wd__tool:hover{transform:translateY(-1px);box-shadow:0 0 0 .5px var(--we-report-separator, rgba(60, 60, 67, .14)),0 4px 12px #00000014}.wd__tool:active{cursor:grabbing;transform:scale(.97)}@media (prefers-reduced-motion: reduce){.wd__tool{transition:none}.wd__tool:hover,.wd__tool:active{transform:none}}.wd__fields{list-style:none;margin:0;padding:0}.wd__fields li{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:6px;cursor:grab;-webkit-user-select:none;user-select:none}.wd__fields li:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__field-type{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px;border-radius:5px;font-size:10px;font-weight:700;text-transform:uppercase;background:var(--we-report-selection-fill, rgba(0, 122, 255, .07));color:var(--we-report-accent, #007aff)}.wd__center{display:flex;flex-direction:column;min-width:0;min-height:0}.wd__canvas{flex:1;min-height:0;overflow:auto;outline:none}.wd__preview{flex:1;min-height:0}.wd__left-tabs{display:flex;padding:2px;gap:2px;margin-bottom:14px;border-radius:8px;background:var(--we-report-segment-bg, rgba(118, 118, 128, .12))}.wd__left-tabs button{flex:1;border:0;border-radius:6px;padding:4px 8px;background:transparent;font-size:12px;font-weight:500;cursor:pointer}.wd__left-tab--on{background:var(--we-report-segment-on-bg, #fff)!important;box-shadow:0 0 0 .5px #0000000a,0 1px 3px #0000001f}.wd__outline{list-style:none;margin:0;padding:0}.wd__outline ul{list-style:none;margin:0 0 8px;padding:0 0 0 10px}.wd__outline button{display:flex;align-items:center;gap:6px;width:100%;border:0;border-radius:6px;padding:4px 8px;background:transparent;text-align:left;cursor:pointer}.wd__outline button:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__outline button :is(svg){flex:none;width:14px;height:14px;color:var(--we-report-accent, #007aff)}.wd__outline-band{font-size:11px;font-weight:600;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__outline-item{font-size:12px}.wd__outline-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd__outline--on,.wd__outline--on:hover{background:var(--we-report-accent, #007aff)!important;color:var(--we-report-accent-fg, #fff)!important}.wd__outline--on :is(svg),.wd__outline--on:hover :is(svg){color:inherit!important}.wd__outline-empty{padding:2px 8px;font-size:11px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__context{position:fixed;z-index:200}.wd__context button{display:flex;align-items:center;gap:8px}.wd__context button :is(svg){width:14px;height:14px}.wd__context button:disabled{opacity:.4;cursor:default;background:transparent!important;color:inherit!important}.wd__context kbd{margin-left:auto;padding-left:16px;font:inherit;font-size:11px;opacity:.55}.wd__context hr{width:100%;margin:4px 0;border:0;border-top:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__danger{color:var(--we-report-warning-fg, #9a4400)}.wd__formatbar{display:flex;align-items:center;flex-wrap:wrap;gap:2px;min-height:40px;padding:4px 14px;box-sizing:border-box;background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));border-bottom:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__formatbar select,.wd__formatbar input[type=number]{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__formatbar select:focus,.wd__formatbar input[type=number]:focus{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.wd__formatbar select:disabled,.wd__formatbar input[type=number]:disabled{opacity:.4}.wd__font{width:150px}.wd__size{width:62px;font-variant-numeric:tabular-nums}.wd__fmt{min-width:28px;height:28px;font-size:14px}.wd__fmt--on{background:var(--we-report-selection-fill, rgba(0, 122, 255, .07))!important;color:var(--we-report-accent, #007aff);box-shadow:inset 0 0 0 1px var(--we-report-selection, #007aff)}.wd__well{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--we-report-control-radius, 7px);cursor:pointer}.wd__well:hover{background:var(--we-report-hover-bg, rgba(118, 118, 128, .12))}.wd__well span{font-weight:700;font-size:14px}.wd__well input{position:absolute;left:4px;right:4px;bottom:3px;height:4px;width:auto;padding:0;border:0;opacity:1;cursor:pointer;pointer-events:auto}.wd__well input::-webkit-color-swatch-wrapper{padding:0}.wd__well input::-webkit-color-swatch{border:0;border-radius:1px}.wd__well--fill span{width:14px;height:14px;border-radius:3px;box-shadow:inset 0 0 0 1px var(--we-report-separator, rgba(60, 60, 67, .3))}.wd__formatbar--off .wd__well{opacity:.4;pointer-events:none}.wd__status{display:flex;align-items:center;gap:14px;min-height:26px;padding:0 14px;font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));background:var(--we-report-toolbar-bg, rgba(250, 250, 252, .82));border-top:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__status-sel{color:var(--we-report-fg, #1d1d1f);font-weight:500}.wd__splitter{position:relative;cursor:col-resize;background:var(--we-report-panel-bg, #fbfbfd);touch-action:none}.wd__splitter:after{content:\"\";position:absolute;top:0;bottom:0;left:50%;width:.5px;background:var(--we-report-separator, rgba(60, 60, 67, .14))}.wd__splitter:hover:after{width:2px;margin-left:-1px;background:var(--we-report-accent, #007aff)}.wd__tool:focus-visible,.wd__fields li:focus-visible{outline:none;box-shadow:var(--we-report-focus-ring, 0 0 0 3px rgba(0, 122, 255, .35))}.wd__field-filter{width:100%;height:28px;box-sizing:border-box;margin-bottom:6px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__wizard{display:flex;flex-direction:column;gap:10px}.wd__wizard input[type=text],.wd__wizard select{height:28px;box-sizing:border-box;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 8px;background:var(--we-report-input-bg, rgba(118, 118, 128, .1));color:inherit;font:inherit}.wd__wizard-row{display:grid;grid-template-columns:140px 1fr;align-items:center;gap:8px}.wd__wizard-pair{display:grid;grid-template-columns:1fr 1fr;gap:6px}.wd__wizard-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:4px 12px;max-height:220px;overflow:auto;margin:0;padding:8px 10px;border:.5px solid var(--we-report-separator, rgba(60, 60, 67, .14));border-radius:var(--we-report-control-radius, 7px)}.wd__wizard-fields legend{padding:0 4px;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75))}.wd__wizard-fields label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wd__wizard-hint{margin:0;color:var(--we-report-muted-fg, rgba(60, 60, 67, .75));font-size:12px}.wd__wizard-actions{display:flex;justify-content:flex-end;gap:8px}.wd__primary{height:30px;border:0;border-radius:var(--we-report-control-radius, 7px);padding:0 14px;background:var(--we-report-accent, #007aff);color:var(--we-report-accent-fg, #fff);font:inherit;font-weight:600;cursor:pointer}.wd__sheet-backdrop{position:fixed;inset:0;z-index:150;background:var(--we-report-backdrop, rgba(0, 0, 0, .22))}.wd__sheet{position:fixed;top:50%;left:50%;z-index:151;transform:translate(-50%,-50%);width:min(560px,100vw - 32px);max-height:calc(100vh - 32px);overflow:auto;box-sizing:border-box;padding:20px 22px;border-radius:14px;background:var(--we-report-panel-bg, #fbfbfd);box-shadow:var(--we-report-popover-shadow, 0 8px 24px rgba(0, 0, 0, .14))}.wd__sheet h2{margin:0 0 12px;font-size:15px;font-weight:600}.wd__keys{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0 0 14px}.wd__keys dt{font:12px ui-monospace,SF Mono,Menlo,Consolas,monospace;color:var(--we-report-accent, #007aff)}.wd__keys dd{margin:0}.wd__collapsed{visibility:hidden;padding:0!important;overflow:hidden!important}.wd__subreport{display:flex;flex-direction:column;inset:16px;transform:none;width:auto;height:auto;max-height:none;padding:12px;overflow:hidden}.wd__subreport-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}.wd__subreport-head h2{margin:0}.wd__subreport-designer{flex:1;min-height:0;border:1px solid var(--we-report-border, rgba(0, 0, 0, .1));border-radius:8px;overflow:hidden}\n"] }]
|
|
7067
8587
|
}], ctorParameters: () => [], propDecorators: { onCopy: [{
|
|
7068
8588
|
type: HostListener,
|
|
7069
8589
|
args: ['copy', ['$event']]
|