bways-report 0.2.1 → 0.2.3
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/README.md +21 -1
- package/esm2022/lib/core/config/bways-report-config.mjs +1 -1
- package/esm2022/lib/core/services/designer-form-context.service.mjs +23 -0
- package/esm2022/lib/core/services/dynamic-form-builder.service.mjs +3 -2
- package/esm2022/lib/core/services/report-data-discovery.service.mjs +15 -6
- package/esm2022/lib/core/services/report-session-context.service.mjs +1 -44
- package/esm2022/lib/core/utils/report-form-values.util.mjs +25 -0
- package/esm2022/lib/core/utils/report-parameter.util.mjs +20 -4
- package/esm2022/lib/features/designer/components/design-canvas/design-canvas.component.mjs +20 -6
- package/esm2022/lib/features/designer/components/property-editor/parameter-binding-editor.component.mjs +94 -2
- package/esm2022/lib/features/designer/components/property-editor/property-editor-action.component.mjs +4 -2
- package/esm2022/lib/features/designer/components/property-editor/property-editor-datasource.component.mjs +9 -7
- package/esm2022/lib/features/designer/components/property-editor/property-editor-grid.component.mjs +7 -14
- package/esm2022/lib/features/designer/components/property-editor/property-editor.component.mjs +8 -4
- package/esm2022/lib/features/designer/components/toolbar/designer-toolbar.component.mjs +11 -11
- package/esm2022/lib/features/designer/designer.component.mjs +6 -5
- package/esm2022/lib/features/designer/services/designer-state.service.mjs +5 -3
- package/esm2022/lib/primitives/components/date/rpt-calendar-input.component.mjs +102 -0
- package/esm2022/lib/primitives/components/date/rpt-date.component.mjs +12 -3
- package/esm2022/lib/primitives/components/dropdown/rpt-dropdown.component.mjs +23 -4
- package/esm2022/lib/primitives/components/radio/rpt-radio.component.mjs +3 -2
- package/fesm2022/bways-report.mjs +1275 -1030
- package/fesm2022/bways-report.mjs.map +1 -1
- package/lib/core/config/bways-report-config.d.ts +3 -0
- package/lib/core/services/designer-form-context.service.d.ts +14 -0
- package/lib/core/services/report-data-discovery.service.d.ts +1 -1
- package/lib/core/services/report-session-context.service.d.ts +0 -5
- package/lib/core/utils/report-form-values.util.d.ts +5 -0
- package/lib/core/utils/report-parameter.util.d.ts +3 -0
- package/lib/features/designer/components/design-canvas/design-canvas.component.d.ts +1 -0
- package/lib/features/designer/components/property-editor/parameter-binding-editor.component.d.ts +12 -0
- package/lib/features/designer/components/property-editor/property-editor-action.component.d.ts +1 -0
- package/lib/features/designer/components/property-editor/property-editor-datasource.component.d.ts +1 -0
- package/lib/features/designer/components/property-editor/property-editor.component.d.ts +1 -0
- package/lib/primitives/components/date/rpt-calendar-input.component.d.ts +23 -0
- package/lib/primitives/components/dropdown/rpt-dropdown.component.d.ts +2 -0
- package/package.json +1 -1
- package/styles/theme.css +9 -12
|
@@ -517,6 +517,172 @@ function getValidationMessage(definition, errorKey) {
|
|
|
517
517
|
return defaults[errorKey] ?? 'Invalid value';
|
|
518
518
|
}
|
|
519
519
|
|
|
520
|
+
/**
|
|
521
|
+
* Utility to normalize arbitrary backend HTTP responses into standard array of records.
|
|
522
|
+
*
|
|
523
|
+
* Supports:
|
|
524
|
+
* - Direct array payloads: `[ { ... }, { ... } ]`
|
|
525
|
+
* - Standard envelope wrappers: `{ data: [...] }`, `{ rows: [...] }`, `{ result: [...] }`, `{ items: [...] }`
|
|
526
|
+
* - OData envelopes: `{ value: [...] }`
|
|
527
|
+
* - Paginated wrappers: `{ total: 100, page: 1, data: [...] }`
|
|
528
|
+
*/
|
|
529
|
+
function extractRowArray(response) {
|
|
530
|
+
if (Array.isArray(response)) {
|
|
531
|
+
return response;
|
|
532
|
+
}
|
|
533
|
+
if (!response || typeof response !== 'object') {
|
|
534
|
+
return [];
|
|
535
|
+
}
|
|
536
|
+
const obj = response;
|
|
537
|
+
// Check common wrapper property names
|
|
538
|
+
const candidateKeys = ['data', 'rows', 'result', 'items', 'value', 'records', 'entities'];
|
|
539
|
+
for (const key of candidateKeys) {
|
|
540
|
+
const val = obj[key];
|
|
541
|
+
if (Array.isArray(val)) {
|
|
542
|
+
return val;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
return [];
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Case-insensitive lookup in an object/record.
|
|
549
|
+
* Searches for exact match first, then lower-cased match, then normalized (ignoring underscores/dashes).
|
|
550
|
+
*/
|
|
551
|
+
function getFieldCaseInsensitive(record, targetKey) {
|
|
552
|
+
if (!record || typeof record !== 'object')
|
|
553
|
+
return undefined;
|
|
554
|
+
// 1. Exact match
|
|
555
|
+
if (targetKey in record) {
|
|
556
|
+
return record[targetKey];
|
|
557
|
+
}
|
|
558
|
+
// 2. Case-insensitive match
|
|
559
|
+
const targetLower = targetKey.toLowerCase();
|
|
560
|
+
for (const [k, v] of Object.entries(record)) {
|
|
561
|
+
if (k.toLowerCase() === targetLower) {
|
|
562
|
+
return v;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
// 3. Normalized match (strip leading '@', underscores, dashes)
|
|
566
|
+
const normalize = (s) => s.replace(/^@/, '').replace(/[_\-\s]/g, '').toLowerCase();
|
|
567
|
+
const normalizedTarget = normalize(targetKey);
|
|
568
|
+
for (const [k, v] of Object.entries(record)) {
|
|
569
|
+
if (normalize(k) === normalizedTarget) {
|
|
570
|
+
return v;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
return undefined;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Normalizes an arbitrary database record into a standardized { value, label, raw } option item.
|
|
577
|
+
* Supports case-insensitive field matching and intelligent heuristics for SQL Server columns.
|
|
578
|
+
*/
|
|
579
|
+
function extractLookupOptionItem(row, valueField, displayField) {
|
|
580
|
+
if (!row || typeof row !== 'object') {
|
|
581
|
+
return {
|
|
582
|
+
value: row ?? '',
|
|
583
|
+
label: String(row ?? ''),
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
const rec = row;
|
|
587
|
+
// If row is already normalized (e.g. from backend lookup endpoint which returned { value, label })
|
|
588
|
+
// and user did not specify distinct target fields
|
|
589
|
+
if ('value' in rec &&
|
|
590
|
+
'label' in rec &&
|
|
591
|
+
(!valueField || valueField === 'value' || !getFieldCaseInsensitive(rec, valueField)) &&
|
|
592
|
+
(!displayField || displayField === 'label' || !getFieldCaseInsensitive(rec, displayField))) {
|
|
593
|
+
const v = rec['value'];
|
|
594
|
+
const result = {
|
|
595
|
+
value: typeof v === 'object' ? JSON.stringify(v) : v,
|
|
596
|
+
label: String(rec['label'] ?? rec['value'] ?? ''),
|
|
597
|
+
};
|
|
598
|
+
if ('raw' in rec && rec['raw']) {
|
|
599
|
+
result.raw = rec['raw'];
|
|
600
|
+
}
|
|
601
|
+
return result;
|
|
602
|
+
}
|
|
603
|
+
const keys = Object.keys(rec);
|
|
604
|
+
// 1. Resolve Value
|
|
605
|
+
let val = undefined;
|
|
606
|
+
if (valueField && valueField.trim()) {
|
|
607
|
+
val = getFieldCaseInsensitive(rec, valueField.trim());
|
|
608
|
+
}
|
|
609
|
+
if (val === undefined || val === null || val === '') {
|
|
610
|
+
const candidateValueKeys = ['code', 'id', 'key', 'value', 'val'];
|
|
611
|
+
for (const cand of candidateValueKeys) {
|
|
612
|
+
const v = getFieldCaseInsensitive(rec, cand);
|
|
613
|
+
if (v !== undefined && v !== null && v !== '') {
|
|
614
|
+
val = v;
|
|
615
|
+
break;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
if (val === undefined || val === null || val === '') {
|
|
620
|
+
const idKeys = keys.filter((k) => /(?:_code|_id|id|code)$/i.test(k));
|
|
621
|
+
const specificIdKey = idKeys.find((k) => !/^(?:user_?id|company_?id)$/i.test(k)) || idKeys[0];
|
|
622
|
+
if (specificIdKey) {
|
|
623
|
+
val = rec[specificIdKey];
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
if (val === undefined || val === null || val === '') {
|
|
627
|
+
const firstPrimitiveKey = keys.find((k) => typeof rec[k] === 'string' || typeof rec[k] === 'number');
|
|
628
|
+
val = firstPrimitiveKey ? rec[firstPrimitiveKey] : (keys[0] ? rec[keys[0]] : '');
|
|
629
|
+
}
|
|
630
|
+
// 2. Resolve Label / Display
|
|
631
|
+
let label = undefined;
|
|
632
|
+
if (displayField && displayField.trim()) {
|
|
633
|
+
label = getFieldCaseInsensitive(rec, displayField.trim());
|
|
634
|
+
}
|
|
635
|
+
if (label === undefined || label === null || label === '') {
|
|
636
|
+
const candidateDisplayKeys = ['name', 'title', 'label', 'description', 'desc', 'text', 'caption'];
|
|
637
|
+
for (const cand of candidateDisplayKeys) {
|
|
638
|
+
const l = getFieldCaseInsensitive(rec, cand);
|
|
639
|
+
if (l !== undefined && l !== null && l !== '') {
|
|
640
|
+
label = l;
|
|
641
|
+
break;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
if (label === undefined || label === null || label === '') {
|
|
646
|
+
const nameKey = keys.find((k) => /(?:_name|_title|_desc)$/i.test(k));
|
|
647
|
+
if (nameKey) {
|
|
648
|
+
label = rec[nameKey];
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
if (label === undefined || label === null || label === '') {
|
|
652
|
+
const secondPrimitiveKey = keys.find((k) => (typeof rec[k] === 'string' || typeof rec[k] === 'number') && rec[k] !== val);
|
|
653
|
+
label = secondPrimitiveKey ? rec[secondPrimitiveKey] : String(val ?? '');
|
|
654
|
+
}
|
|
655
|
+
return {
|
|
656
|
+
value: typeof val === 'object' ? JSON.stringify(val) : val,
|
|
657
|
+
label: String(label ?? val ?? ''),
|
|
658
|
+
raw: rec,
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
const selectedRows = new WeakMap();
|
|
663
|
+
const ROWS = Symbol('report selected dropdown rows');
|
|
664
|
+
function rememberSelectedOption(control, value, record) {
|
|
665
|
+
if (record)
|
|
666
|
+
selectedRows.set(control, { value, record });
|
|
667
|
+
else
|
|
668
|
+
selectedRows.delete(control);
|
|
669
|
+
}
|
|
670
|
+
/** Keep form values primitive. Selection metadata never becomes a wire argument. */
|
|
671
|
+
function extractReportFormValues(form) {
|
|
672
|
+
const values = form.getRawValue();
|
|
673
|
+
const rows = {};
|
|
674
|
+
for (const [key, control] of Object.entries(form.controls)) {
|
|
675
|
+
const selected = selectedRows.get(control);
|
|
676
|
+
if (selected && Object.is(selected.value, control.value))
|
|
677
|
+
Object.defineProperty(rows, key, { value: selected.record, enumerable: true });
|
|
678
|
+
}
|
|
679
|
+
Object.defineProperty(values, ROWS, { value: rows });
|
|
680
|
+
return values;
|
|
681
|
+
}
|
|
682
|
+
function selectedOptionRecord(values, field) {
|
|
683
|
+
return getFieldCaseInsensitive(values[ROWS], field);
|
|
684
|
+
}
|
|
685
|
+
|
|
520
686
|
/**
|
|
521
687
|
* DynamicFormBuilder converts metadata definitions into Angular Reactive Form controls.
|
|
522
688
|
*
|
|
@@ -558,7 +724,7 @@ class DynamicFormBuilder {
|
|
|
558
724
|
* @returns Key-value dictionary of all control values.
|
|
559
725
|
*/
|
|
560
726
|
extractValues(form) {
|
|
561
|
-
return form
|
|
727
|
+
return extractReportFormValues(form);
|
|
562
728
|
}
|
|
563
729
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
564
730
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFormBuilder, providedIn: 'root' });
|
|
@@ -754,9 +920,7 @@ class ReportSessionContextService {
|
|
|
754
920
|
}
|
|
755
921
|
}
|
|
756
922
|
const manualMap = this.manualRuntimeContext();
|
|
757
|
-
const autoDetected = this.detectBrowserSession();
|
|
758
923
|
return {
|
|
759
|
-
...autoDetected,
|
|
760
924
|
...providerMap,
|
|
761
925
|
...tokenMap,
|
|
762
926
|
...manualMap,
|
|
@@ -921,47 +1085,6 @@ class ReportSessionContextService {
|
|
|
921
1085
|
return {};
|
|
922
1086
|
}
|
|
923
1087
|
}
|
|
924
|
-
/**
|
|
925
|
-
* Safely detects session parameters from host project browser storage
|
|
926
|
-
* (sessionStorage: user_Info, currentUser; localStorage: currentUser, CompanyData, user_Info).
|
|
927
|
-
*/
|
|
928
|
-
detectBrowserSession() {
|
|
929
|
-
const result = {};
|
|
930
|
-
if (typeof window === 'undefined')
|
|
931
|
-
return result;
|
|
932
|
-
const sources = [
|
|
933
|
-
{ storage: typeof sessionStorage !== 'undefined' ? sessionStorage : null, key: 'user_Info' },
|
|
934
|
-
{ storage: typeof localStorage !== 'undefined' ? localStorage : null, key: 'currentUser' },
|
|
935
|
-
{ storage: typeof localStorage !== 'undefined' ? localStorage : null, key: 'CompanyData' },
|
|
936
|
-
{ storage: typeof sessionStorage !== 'undefined' ? sessionStorage : null, key: 'currentUser' },
|
|
937
|
-
{ storage: typeof localStorage !== 'undefined' ? localStorage : null, key: 'user_Info' },
|
|
938
|
-
];
|
|
939
|
-
for (const src of sources) {
|
|
940
|
-
if (!src.storage)
|
|
941
|
-
continue;
|
|
942
|
-
try {
|
|
943
|
-
const item = src.storage.getItem(src.key);
|
|
944
|
-
if (item) {
|
|
945
|
-
const parsed = JSON.parse(item);
|
|
946
|
-
if (parsed && typeof parsed === 'object') {
|
|
947
|
-
for (const [k, v] of Object.entries(parsed)) {
|
|
948
|
-
if (v !== undefined &&
|
|
949
|
-
v !== null &&
|
|
950
|
-
(typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean')) {
|
|
951
|
-
if (!(k in result)) {
|
|
952
|
-
result[k] = v;
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
catch {
|
|
960
|
-
// Ignore JSON parse errors in storage
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
return result;
|
|
964
|
-
}
|
|
965
1088
|
/**
|
|
966
1089
|
* Normalizes a parameter or session key into a lowercase alphanumeric string
|
|
967
1090
|
* for reliable, case-insensitive, and symbol-insensitive matching.
|
|
@@ -1378,214 +1501,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1378
1501
|
args: [{ providedIn: 'root' }]
|
|
1379
1502
|
}] });
|
|
1380
1503
|
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1504
|
+
const TOKEN_RE = /^\{\{\s*(.+?)\s*\}\}$/;
|
|
1505
|
+
/** Supported wire formats for date-bound procedure/API parameters. */
|
|
1506
|
+
const PARAMETER_DATE_FORMATS = ['yyyy-MM-dd', 'yyyyMMdd', 'dd/MM/yyyy', 'MM/dd/yyyy', 'dd-MM-yyyy'];
|
|
1507
|
+
/** The optional date pipe is persisted in existing string mappings. */
|
|
1508
|
+
function parseParameterToken(raw) {
|
|
1509
|
+
const match = TOKEN_RE.exec(raw);
|
|
1510
|
+
if (!match)
|
|
1511
|
+
return null;
|
|
1512
|
+
const column = /^(.+?)\s*\|\s*column\s*:\s*(.+)$/.exec(match[1]);
|
|
1513
|
+
if (column)
|
|
1514
|
+
return { field: column[1].trim(), column: column[2].trim() };
|
|
1515
|
+
const parts = match[1].split(/\s*\|\s*date\s*:\s*/);
|
|
1516
|
+
if (parts.length === 1)
|
|
1517
|
+
return { field: parts[0].trim() };
|
|
1518
|
+
const format = parts[1];
|
|
1519
|
+
return { field: parts[0].trim(), dateFormat: parts.length === 2 ? format : parts.slice(1).join(' | date:') };
|
|
1520
|
+
}
|
|
1521
|
+
/** Format calendar parts directly, avoiding UTC/time-zone shifts and locale parsing. */
|
|
1522
|
+
function formatParameterDate(value, format) {
|
|
1523
|
+
if (!PARAMETER_DATE_FORMATS.includes(format))
|
|
1524
|
+
throw new Error('Unsupported parameter date format. Choose a date format in the Field binding.');
|
|
1525
|
+
if (value === '' || value === null || value === undefined)
|
|
1526
|
+
return '';
|
|
1527
|
+
const raw = value instanceof Date
|
|
1528
|
+
? value.getFullYear() + '-' + String(value.getMonth() + 1).padStart(2, '0') + '-' + String(value.getDate()).padStart(2, '0')
|
|
1529
|
+
: String(value);
|
|
1530
|
+
const match = /^(\d{4})-?(\d{2})-?(\d{2})(?:T.*)?$/.exec(raw);
|
|
1531
|
+
if (!match)
|
|
1532
|
+
throw new Error('Invalid date. Select a valid date in the linked field.');
|
|
1533
|
+
const [, year, month, day] = match;
|
|
1534
|
+
const probe = new Date(0);
|
|
1535
|
+
probe.setFullYear(+year, +month - 1, +day);
|
|
1536
|
+
probe.setHours(0, 0, 0, 0);
|
|
1537
|
+
if (probe.getFullYear() !== +year || probe.getMonth() + 1 !== +month || probe.getDate() !== +day) {
|
|
1538
|
+
throw new Error('Invalid date. Select a valid date in the linked field.');
|
|
1396
1539
|
}
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1540
|
+
return format.replace('yyyy', year).replace('MM', month).replace('dd', day);
|
|
1541
|
+
}
|
|
1542
|
+
const pad$1 = (n) => String(n).padStart(2, '0');
|
|
1543
|
+
const formatYMD$1 = (d) => `${d.getFullYear()}-${pad$1(d.getMonth() + 1)}-${pad$1(d.getDate())}`;
|
|
1544
|
+
/** Resolves `{{context.xxx}}` presets such as today / startOfMonth. */
|
|
1545
|
+
function resolveContextPreset(key) {
|
|
1546
|
+
const now = new Date();
|
|
1547
|
+
switch (key.toLowerCase()) {
|
|
1548
|
+
case 'yesterday': {
|
|
1549
|
+
const y = new Date(now);
|
|
1550
|
+
y.setDate(y.getDate() - 1);
|
|
1551
|
+
return formatYMD$1(y);
|
|
1404
1552
|
}
|
|
1553
|
+
case 'startofmonth':
|
|
1554
|
+
return `${now.getFullYear()}-${pad$1(now.getMonth() + 1)}-01`;
|
|
1555
|
+
case 'endofmonth':
|
|
1556
|
+
return formatYMD$1(new Date(now.getFullYear(), now.getMonth() + 1, 0));
|
|
1557
|
+
case 'startofyear':
|
|
1558
|
+
return `${now.getFullYear()}-01-01`;
|
|
1559
|
+
case 'today':
|
|
1560
|
+
default:
|
|
1561
|
+
return formatYMD$1(now);
|
|
1405
1562
|
}
|
|
1406
|
-
return [];
|
|
1407
1563
|
}
|
|
1408
1564
|
/**
|
|
1409
|
-
*
|
|
1410
|
-
*
|
|
1565
|
+
* Looks up a field value from formValues supporting direct names, dot paths (a.b),
|
|
1566
|
+
* and compound date ranges (e.g. dateRange.from, dateRange_from, dateRangeFrom).
|
|
1411
1567
|
*/
|
|
1412
|
-
function
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
return record[targetKey];
|
|
1418
|
-
}
|
|
1419
|
-
// 2. Case-insensitive match
|
|
1420
|
-
const targetLower = targetKey.toLowerCase();
|
|
1421
|
-
for (const [k, v] of Object.entries(record)) {
|
|
1422
|
-
if (k.toLowerCase() === targetLower) {
|
|
1423
|
-
return v;
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
// 3. Normalized match (strip leading '@', underscores, dashes)
|
|
1427
|
-
const normalize = (s) => s.replace(/^@/, '').replace(/[_\-\s]/g, '').toLowerCase();
|
|
1428
|
-
const normalizedTarget = normalize(targetKey);
|
|
1429
|
-
for (const [k, v] of Object.entries(record)) {
|
|
1430
|
-
if (normalize(k) === normalizedTarget) {
|
|
1431
|
-
return v;
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
return undefined;
|
|
1435
|
-
}
|
|
1436
|
-
/**
|
|
1437
|
-
* Normalizes an arbitrary database record into a standardized { value, label, raw } option item.
|
|
1438
|
-
* Supports case-insensitive field matching and intelligent heuristics for SQL Server columns.
|
|
1439
|
-
*/
|
|
1440
|
-
function extractLookupOptionItem(row, valueField, displayField) {
|
|
1441
|
-
if (!row || typeof row !== 'object') {
|
|
1442
|
-
return {
|
|
1443
|
-
value: row ?? '',
|
|
1444
|
-
label: String(row ?? ''),
|
|
1445
|
-
};
|
|
1446
|
-
}
|
|
1447
|
-
const rec = row;
|
|
1448
|
-
// If row is already normalized (e.g. from backend lookup endpoint which returned { value, label })
|
|
1449
|
-
// and user did not specify distinct target fields
|
|
1450
|
-
if ('value' in rec &&
|
|
1451
|
-
'label' in rec &&
|
|
1452
|
-
(!valueField || valueField === 'value' || !getFieldCaseInsensitive(rec, valueField)) &&
|
|
1453
|
-
(!displayField || displayField === 'label' || !getFieldCaseInsensitive(rec, displayField))) {
|
|
1454
|
-
const v = rec['value'];
|
|
1455
|
-
const result = {
|
|
1456
|
-
value: typeof v === 'object' ? JSON.stringify(v) : v,
|
|
1457
|
-
label: String(rec['label'] ?? rec['value'] ?? ''),
|
|
1458
|
-
};
|
|
1459
|
-
if ('raw' in rec && rec['raw']) {
|
|
1460
|
-
result.raw = rec['raw'];
|
|
1461
|
-
}
|
|
1462
|
-
return result;
|
|
1463
|
-
}
|
|
1464
|
-
const keys = Object.keys(rec);
|
|
1465
|
-
// 1. Resolve Value
|
|
1466
|
-
let val = undefined;
|
|
1467
|
-
if (valueField && valueField.trim()) {
|
|
1468
|
-
val = getFieldCaseInsensitive(rec, valueField.trim());
|
|
1469
|
-
}
|
|
1470
|
-
if (val === undefined || val === null || val === '') {
|
|
1471
|
-
const candidateValueKeys = ['code', 'id', 'key', 'value', 'val'];
|
|
1472
|
-
for (const cand of candidateValueKeys) {
|
|
1473
|
-
const v = getFieldCaseInsensitive(rec, cand);
|
|
1474
|
-
if (v !== undefined && v !== null && v !== '') {
|
|
1475
|
-
val = v;
|
|
1476
|
-
break;
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
if (val === undefined || val === null || val === '') {
|
|
1481
|
-
const idKeys = keys.filter((k) => /(?:_code|_id|id|code)$/i.test(k));
|
|
1482
|
-
const specificIdKey = idKeys.find((k) => !/^(?:user_?id|company_?id)$/i.test(k)) || idKeys[0];
|
|
1483
|
-
if (specificIdKey) {
|
|
1484
|
-
val = rec[specificIdKey];
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
if (val === undefined || val === null || val === '') {
|
|
1488
|
-
const firstPrimitiveKey = keys.find((k) => typeof rec[k] === 'string' || typeof rec[k] === 'number');
|
|
1489
|
-
val = firstPrimitiveKey ? rec[firstPrimitiveKey] : (keys[0] ? rec[keys[0]] : '');
|
|
1490
|
-
}
|
|
1491
|
-
// 2. Resolve Label / Display
|
|
1492
|
-
let label = undefined;
|
|
1493
|
-
if (displayField && displayField.trim()) {
|
|
1494
|
-
label = getFieldCaseInsensitive(rec, displayField.trim());
|
|
1495
|
-
}
|
|
1496
|
-
if (label === undefined || label === null || label === '') {
|
|
1497
|
-
const candidateDisplayKeys = ['name', 'title', 'label', 'description', 'desc', 'text', 'caption'];
|
|
1498
|
-
for (const cand of candidateDisplayKeys) {
|
|
1499
|
-
const l = getFieldCaseInsensitive(rec, cand);
|
|
1500
|
-
if (l !== undefined && l !== null && l !== '') {
|
|
1501
|
-
label = l;
|
|
1502
|
-
break;
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
if (label === undefined || label === null || label === '') {
|
|
1507
|
-
const nameKey = keys.find((k) => /(?:_name|_title|_desc)$/i.test(k));
|
|
1508
|
-
if (nameKey) {
|
|
1509
|
-
label = rec[nameKey];
|
|
1510
|
-
}
|
|
1511
|
-
}
|
|
1512
|
-
if (label === undefined || label === null || label === '') {
|
|
1513
|
-
const secondPrimitiveKey = keys.find((k) => (typeof rec[k] === 'string' || typeof rec[k] === 'number') && rec[k] !== val);
|
|
1514
|
-
label = secondPrimitiveKey ? rec[secondPrimitiveKey] : String(val ?? '');
|
|
1515
|
-
}
|
|
1516
|
-
return {
|
|
1517
|
-
value: typeof val === 'object' ? JSON.stringify(val) : val,
|
|
1518
|
-
label: String(label ?? val ?? ''),
|
|
1519
|
-
raw: rec,
|
|
1520
|
-
};
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
const TOKEN_RE = /^\{\{\s*(.+?)\s*\}\}$/;
|
|
1524
|
-
/** Supported wire formats for date-bound procedure/API parameters. */
|
|
1525
|
-
const PARAMETER_DATE_FORMATS = ['yyyy-MM-dd', 'yyyyMMdd', 'dd/MM/yyyy', 'MM/dd/yyyy', 'dd-MM-yyyy'];
|
|
1526
|
-
/** The optional date pipe is persisted in existing string mappings. */
|
|
1527
|
-
function parseParameterToken(raw) {
|
|
1528
|
-
const match = TOKEN_RE.exec(raw);
|
|
1529
|
-
if (!match)
|
|
1530
|
-
return null;
|
|
1531
|
-
const parts = match[1].split(/\s*\|\s*date\s*:\s*/);
|
|
1532
|
-
if (parts.length === 1)
|
|
1533
|
-
return { field: parts[0].trim() };
|
|
1534
|
-
const format = parts[1];
|
|
1535
|
-
return { field: parts[0].trim(), dateFormat: parts.length === 2 ? format : parts.slice(1).join(' | date:') };
|
|
1536
|
-
}
|
|
1537
|
-
/** Format calendar parts directly, avoiding UTC/time-zone shifts and locale parsing. */
|
|
1538
|
-
function formatParameterDate(value, format) {
|
|
1539
|
-
if (!PARAMETER_DATE_FORMATS.includes(format))
|
|
1540
|
-
throw new Error('Unsupported parameter date format. Choose a date format in the Field binding.');
|
|
1541
|
-
if (value === '' || value === null || value === undefined)
|
|
1542
|
-
return '';
|
|
1543
|
-
const raw = value instanceof Date
|
|
1544
|
-
? value.getFullYear() + '-' + String(value.getMonth() + 1).padStart(2, '0') + '-' + String(value.getDate()).padStart(2, '0')
|
|
1545
|
-
: String(value);
|
|
1546
|
-
const match = /^(\d{4})-?(\d{2})-?(\d{2})(?:T.*)?$/.exec(raw);
|
|
1547
|
-
if (!match)
|
|
1548
|
-
throw new Error('Invalid date. Select a valid date in the linked field.');
|
|
1549
|
-
const [, year, month, day] = match;
|
|
1550
|
-
const probe = new Date(0);
|
|
1551
|
-
probe.setFullYear(+year, +month - 1, +day);
|
|
1552
|
-
probe.setHours(0, 0, 0, 0);
|
|
1553
|
-
if (probe.getFullYear() !== +year || probe.getMonth() + 1 !== +month || probe.getDate() !== +day) {
|
|
1554
|
-
throw new Error('Invalid date. Select a valid date in the linked field.');
|
|
1555
|
-
}
|
|
1556
|
-
return format.replace('yyyy', year).replace('MM', month).replace('dd', day);
|
|
1557
|
-
}
|
|
1558
|
-
const pad$1 = (n) => String(n).padStart(2, '0');
|
|
1559
|
-
const formatYMD$1 = (d) => `${d.getFullYear()}-${pad$1(d.getMonth() + 1)}-${pad$1(d.getDate())}`;
|
|
1560
|
-
/** Resolves `{{context.xxx}}` presets such as today / startOfMonth. */
|
|
1561
|
-
function resolveContextPreset(key) {
|
|
1562
|
-
const now = new Date();
|
|
1563
|
-
switch (key.toLowerCase()) {
|
|
1564
|
-
case 'yesterday': {
|
|
1565
|
-
const y = new Date(now);
|
|
1566
|
-
y.setDate(y.getDate() - 1);
|
|
1567
|
-
return formatYMD$1(y);
|
|
1568
|
-
}
|
|
1569
|
-
case 'startofmonth':
|
|
1570
|
-
return `${now.getFullYear()}-${pad$1(now.getMonth() + 1)}-01`;
|
|
1571
|
-
case 'endofmonth':
|
|
1572
|
-
return formatYMD$1(new Date(now.getFullYear(), now.getMonth() + 1, 0));
|
|
1573
|
-
case 'startofyear':
|
|
1574
|
-
return `${now.getFullYear()}-01-01`;
|
|
1575
|
-
case 'today':
|
|
1576
|
-
default:
|
|
1577
|
-
return formatYMD$1(now);
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
/**
|
|
1581
|
-
* Looks up a field value from formValues supporting direct names, dot paths (a.b),
|
|
1582
|
-
* and compound date ranges (e.g. dateRange.from, dateRange_from, dateRangeFrom).
|
|
1583
|
-
*/
|
|
1584
|
-
function resolveCanvasFieldValue(formValues, inner) {
|
|
1585
|
-
// 1. Direct case-insensitive lookup
|
|
1586
|
-
const direct = getFieldCaseInsensitive(formValues, inner);
|
|
1587
|
-
if (direct !== undefined && direct !== null) {
|
|
1588
|
-
return direct;
|
|
1568
|
+
function resolveCanvasFieldValue(formValues, inner) {
|
|
1569
|
+
// 1. Direct case-insensitive lookup
|
|
1570
|
+
const direct = getFieldCaseInsensitive(formValues, inner);
|
|
1571
|
+
if (direct !== undefined && direct !== null) {
|
|
1572
|
+
return direct;
|
|
1589
1573
|
}
|
|
1590
1574
|
// 2. Dot-path lookup (e.g. dateRange.from or user.address.city)
|
|
1591
1575
|
if (inner.includes('.')) {
|
|
@@ -1770,9 +1754,17 @@ function resolveParameterValue(raw, session, formValues) {
|
|
|
1770
1754
|
if (inner.startsWith('context.')) {
|
|
1771
1755
|
return format(resolveContextPreset(inner.slice(8)));
|
|
1772
1756
|
}
|
|
1773
|
-
const v = resolveCanvasFieldValue(formValues, inner);
|
|
1757
|
+
const v = token.column ? getFieldCaseInsensitive(selectedOptionRecord(formValues, inner), token.column) : resolveCanvasFieldValue(formValues, inner);
|
|
1774
1758
|
return format(v !== undefined && v !== null ? v : '');
|
|
1775
1759
|
}
|
|
1760
|
+
/** Replace a single mapping and remove all stale aliases for the same argument. */
|
|
1761
|
+
function setParameterMapping(mappings, name, value) {
|
|
1762
|
+
const key = name.replace(/^@+/, '');
|
|
1763
|
+
if (!key)
|
|
1764
|
+
throw new Error('A parameter name cannot be empty.');
|
|
1765
|
+
const entries = Object.entries(mappings ?? {}).filter(([existing]) => existing.replace(/^@+/, '').toLowerCase() !== key.toLowerCase());
|
|
1766
|
+
return Object.fromEntries([...entries, [key, value]]);
|
|
1767
|
+
}
|
|
1776
1768
|
/** Canonical SQL argument names. Equal aliases collapse; conflicting values fail explicitly. */
|
|
1777
1769
|
function normalizeParameterNames(parameters) {
|
|
1778
1770
|
const out = {};
|
|
@@ -1797,6 +1789,10 @@ function normalizeParameterNames(parameters) {
|
|
|
1797
1789
|
function resolveParameterMappings(mappings, session, formValues) {
|
|
1798
1790
|
const out = {};
|
|
1799
1791
|
for (const [key, raw] of Object.entries(mappings ?? {})) {
|
|
1792
|
+
const token = typeof raw === 'string' ? parseParameterToken(raw) : null;
|
|
1793
|
+
// An unavailable session is not an empty SQL argument. Preserve explicit 0/false values.
|
|
1794
|
+
if (token?.field.startsWith('session.') && getFieldCaseInsensitive(session, token.field.slice(8)) == null)
|
|
1795
|
+
continue;
|
|
1800
1796
|
const val = resolveParameterValue(raw, session, formValues);
|
|
1801
1797
|
Object.defineProperty(out, key, { value: val, enumerable: true });
|
|
1802
1798
|
}
|
|
@@ -1817,7 +1813,7 @@ function findMissingCanvasFields(mappings, formValues) {
|
|
|
1817
1813
|
const inner = token.field;
|
|
1818
1814
|
if (inner.startsWith('session.') || inner.startsWith('context.'))
|
|
1819
1815
|
continue;
|
|
1820
|
-
const v = resolveCanvasFieldValue(formValues, inner);
|
|
1816
|
+
const v = token.column ? getFieldCaseInsensitive(selectedOptionRecord(formValues, inner), token.column) : resolveCanvasFieldValue(formValues, inner);
|
|
1821
1817
|
if (v === undefined || v === null || (typeof v === 'string' && v.trim() === '')) {
|
|
1822
1818
|
missing.add(inner);
|
|
1823
1819
|
}
|
|
@@ -1838,7 +1834,7 @@ function findMissingCanvasFields(mappings, formValues) {
|
|
|
1838
1834
|
*/
|
|
1839
1835
|
function resolveExecutionDataSource(def) {
|
|
1840
1836
|
const sources = def.dataSources ?? [];
|
|
1841
|
-
const byId = sources.find((d) => d.id === def.grid?.dataSourceId);
|
|
1837
|
+
const byId = sources.find((d) => d.id === def.grid?.dataSourceId || d.name === def.grid?.dataSourceId);
|
|
1842
1838
|
if (byId)
|
|
1843
1839
|
return byId;
|
|
1844
1840
|
if (sources.length > 0)
|
|
@@ -1914,7 +1910,7 @@ class ReportDataDiscoveryService {
|
|
|
1914
1910
|
* automatically runs dynamic sample query via ReportLookupAdapter using resolved parameters.
|
|
1915
1911
|
* 3. For REST APIs, executes a dynamic test sample and extracts columns from the result array.
|
|
1916
1912
|
*/
|
|
1917
|
-
autoDetectColumns(entityName, entityType = 'stored_procedure', mappings = {}, schema = 'dbo', apiOptions) {
|
|
1913
|
+
autoDetectColumns(entityName, entityType = 'stored_procedure', mappings = {}, schema = 'dbo', apiOptions, formValues = {}) {
|
|
1918
1914
|
if (!entityName) {
|
|
1919
1915
|
return of([]);
|
|
1920
1916
|
}
|
|
@@ -1931,7 +1927,7 @@ class ReportDataDiscoveryService {
|
|
|
1931
1927
|
throw new Error('STATIC_EMPTY');
|
|
1932
1928
|
}), catchError(() => {
|
|
1933
1929
|
// Fallback to dynamic execution
|
|
1934
|
-
return this.fallbackDynamicDetection(entityName, entityType, mappings, schema);
|
|
1930
|
+
return this.fallbackDynamicDetection(entityName, entityType, mappings, schema, formValues);
|
|
1935
1931
|
}));
|
|
1936
1932
|
}
|
|
1937
1933
|
return this.fallbackDynamicDetection(entityName, entityType, mappings, schema);
|
|
@@ -2011,12 +2007,21 @@ class ReportDataDiscoveryService {
|
|
|
2011
2007
|
align: c.dataType === 'number' ? 'right' : 'left',
|
|
2012
2008
|
}));
|
|
2013
2009
|
}
|
|
2014
|
-
fallbackDynamicDetection(entityName, sourceType, mappings, schema = 'dbo') {
|
|
2010
|
+
fallbackDynamicDetection(entityName, sourceType, mappings, schema = 'dbo', formValues = {}) {
|
|
2015
2011
|
if (!this.lookupAdapter) {
|
|
2016
2012
|
return of([]);
|
|
2017
2013
|
}
|
|
2018
2014
|
const session = this.sessionService?.getCurrentSessionContext() ?? {};
|
|
2019
|
-
const
|
|
2015
|
+
const missing = findMissingCanvasFields(mappings, formValues);
|
|
2016
|
+
if (missing.length)
|
|
2017
|
+
return throwError(() => new Error('Enter the linked filter values before detecting columns: ' + missing.join(', ')));
|
|
2018
|
+
let resolvedParams;
|
|
2019
|
+
try {
|
|
2020
|
+
resolvedParams = resolveParameterMappings(mappings, session, formValues);
|
|
2021
|
+
}
|
|
2022
|
+
catch (error) {
|
|
2023
|
+
return throwError(() => error);
|
|
2024
|
+
}
|
|
2020
2025
|
return this.lookupAdapter
|
|
2021
2026
|
.fetchOptions({
|
|
2022
2027
|
sourceType: (sourceType === 'stored_procedure' ? 'procedure' : sourceType),
|
|
@@ -3637,6 +3642,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3637
3642
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:4px;box-sizing:border-box}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-input-wrapper{position:relative;width:100%;flex:1;min-height:0;display:flex}.rpt-input{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease;outline:none}.rpt-input:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-input:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-input:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-input.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-input.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
3638
3643
|
}] });
|
|
3639
3644
|
|
|
3645
|
+
/** Owned by one designer, including the property editor and its live canvas. */
|
|
3646
|
+
class DesignerFormContextService {
|
|
3647
|
+
form = signal(null);
|
|
3648
|
+
revision = signal(0);
|
|
3649
|
+
dropdownColumns = signal({});
|
|
3650
|
+
values = computed(() => { this.revision(); const form = this.form(); return form ? extractReportFormValues(form) : {}; });
|
|
3651
|
+
bind(form) { this.form.set(form); this.refresh(); }
|
|
3652
|
+
refresh() { this.revision.update(value => value + 1); }
|
|
3653
|
+
setColumns(key, columns) {
|
|
3654
|
+
const current = this.dropdownColumns()[key] ?? [];
|
|
3655
|
+
if (JSON.stringify(current) !== JSON.stringify(columns))
|
|
3656
|
+
this.dropdownColumns.update(value => ({ ...value, [key]: columns }));
|
|
3657
|
+
}
|
|
3658
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignerFormContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3659
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignerFormContextService });
|
|
3660
|
+
}
|
|
3661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignerFormContextService, decorators: [{
|
|
3662
|
+
type: Injectable
|
|
3663
|
+
}] });
|
|
3664
|
+
|
|
3640
3665
|
/** CDK structural styles, embedded so standalone components need no host CSS import.
|
|
3641
3666
|
* Compatible with CDK's overlay-prebuilt.css; no theme or !important overrides.
|
|
3642
3667
|
* CDK structural CSS is MIT licensed; see third-party-notices/angular-cdk-LICENSE.txt.
|
|
@@ -3712,6 +3737,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3712
3737
|
}] });
|
|
3713
3738
|
|
|
3714
3739
|
class RptDropdownComponent {
|
|
3740
|
+
formContext = inject(DesignerFormContextService, { optional: true });
|
|
3715
3741
|
masterDataProvider = inject(MasterDataProvider, { optional: true });
|
|
3716
3742
|
lookupAdapter = inject(ReportLookupAdapter, { optional: true });
|
|
3717
3743
|
sessionService = inject(ReportSessionContextService, { optional: true });
|
|
@@ -3981,6 +4007,7 @@ class RptDropdownComponent {
|
|
|
3981
4007
|
this.formControl().markAsTouched();
|
|
3982
4008
|
}
|
|
3983
4009
|
selectOption(opt) {
|
|
4010
|
+
rememberSelectedOption(this.formControl(), opt.key, { value: opt.key, key: opt.key, label: opt.label, ...opt.raw });
|
|
3984
4011
|
this.currentValue.set(opt.key);
|
|
3985
4012
|
this.formControl().setValue(opt.key);
|
|
3986
4013
|
this.formControl().markAsDirty();
|
|
@@ -4082,6 +4109,21 @@ class RptDropdownComponent {
|
|
|
4082
4109
|
}
|
|
4083
4110
|
}
|
|
4084
4111
|
constructor() {
|
|
4112
|
+
effect(() => {
|
|
4113
|
+
const options = this.allOptions();
|
|
4114
|
+
const value = this.currentValue();
|
|
4115
|
+
const control = this.formControl();
|
|
4116
|
+
const config = this.config();
|
|
4117
|
+
untracked(() => {
|
|
4118
|
+
const selected = options.find(option => String(option.key) === String(value));
|
|
4119
|
+
rememberSelectedOption(control, value, selected ? { value: selected.key, key: selected.key, label: selected.label, ...selected.raw } : undefined);
|
|
4120
|
+
if (config.key) {
|
|
4121
|
+
const columns = [...new Set(options.flatMap(option => Object.keys(option.raw ?? {})))];
|
|
4122
|
+
this.formContext?.setColumns(config.key, columns);
|
|
4123
|
+
}
|
|
4124
|
+
this.formContext?.refresh();
|
|
4125
|
+
});
|
|
4126
|
+
}, { allowSignalWrites: true });
|
|
4085
4127
|
// Sync reactive form control value changes to currentValue signal
|
|
4086
4128
|
effect(() => {
|
|
4087
4129
|
const ctrl = this.formControl();
|
|
@@ -4194,7 +4236,7 @@ class RptDropdownComponent {
|
|
|
4194
4236
|
const k = String(it.value);
|
|
4195
4237
|
if (!seen.has(k)) {
|
|
4196
4238
|
seen.add(k);
|
|
4197
|
-
deduped.push({ key:
|
|
4239
|
+
deduped.push({ key: it.value, label: it.label || k, raw: it.raw });
|
|
4198
4240
|
}
|
|
4199
4241
|
}
|
|
4200
4242
|
this.dynamicOptions.set(deduped);
|
|
@@ -4233,14 +4275,14 @@ class RptDropdownComponent {
|
|
|
4233
4275
|
}
|
|
4234
4276
|
}
|
|
4235
4277
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4236
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptDropdownComponent, isStandalone: true, selector: "rpt-dropdown", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, showStatus: { classPropertyName: "showStatus", publicName: "showStatus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropdownClick: "dropdownClick" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscape()" }, properties: { "class.is-open": "isOpen()", "class.opens-above": "opensAbove()" } }, viewQueries: [{ propertyName: "comboboxWrapperEl", first: true, predicate: ["comboboxWrapper"], descendants: true, isSignal: true }, { propertyName: "searchInputEl", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "optionsListEl", first: true, predicate: ["optionsListEl"], descendants: true, isSignal: true }], ngImport: i0, template: " <div class=\"rpt-field-group\">\n @if (config().label) {\n <label [for]=\"elementId()\" class=\"rpt-label\">\n {{ config().label }}\n @if (config().validation?.required) {\n <span class=\"rpt-required-marker\">*</span>\n }\n </label>\n }\n\n @if (isSearchable()) {\n <!-- Searchable Typeahead Combobox -->\n <div class=\"rpt-combobox-wrapper\" #comboboxWrapper #comboboxOrigin=\"cdkOverlayOrigin\" cdkOverlayOrigin>\n <button\n type=\"button\"\n class=\"rpt-combobox-trigger\"\n [id]=\"elementId()\"\n [class.rpt-invalid]=\"isInvalid()\"\n [class.is-open]=\"isOpen()\"\n [disabled]=\"formControl().disabled\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n (click)=\"toggleOpen($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <span class=\"trigger-label\" [class.is-placeholder]=\"!selectedOption()\">\n {{ selectedOption() ? selectedOption()!.label : placeholder() }}\n </span>\n\n <div class=\"trigger-actions\">\n @if (isLoading()) {\n <span class=\"status-dot dot-pulse\" style=\"color: #2563eb; margin-right: 4px;\" title=\"Executing query on database...\"></span>\n }\n @if (loadError() && !isLoading()) {\n <button\n type=\"button\"\n class=\"trigger-retry-btn\"\n title=\"Retry database query\"\n aria-label=\"Retry database query\"\n (click)=\"retryLookup($event)\"\n >\n \u21BB Retry\n </button>\n }\n @if (selectedOption() && !formControl().disabled) {\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"trigger-clear-btn\"\n title=\"Clear selection\"\n aria-label=\"Clear selection\"\n (click)=\"clearSelection($event)\"\n (keydown.enter)=\"clearSelection($event)\"\n (keydown.space)=\"clearSelection($event)\"\n >\n \u2715\n </span>\n }\n <span class=\"trigger-arrow\" [class.rotated]=\"isOpen()\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path d=\"M1 1.5L6 6.5L11 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </span>\n </div>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"comboboxOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayMinWidth]=\"'min(180px, calc(100vw - 16px))'\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n [cdkConnectedOverlayPush]=\"true\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n (overlayOutsideClick)=\"closeDropdown()\"\n (positionChange)=\"onPositionChange($event)\"\n (attach)=\"onOverlayAttached()\"\n (detach)=\"closeDropdown()\"\n >\n <div\n class=\"rpt-combobox-menu\"\n [class.opens-above]=\"opensAbove()\"\n role=\"listbox\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- Real-time Filter Search Box -->\n <div class=\"combobox-search-box\">\n <span class=\"combobox-search-icon\" aria-hidden=\"true\">\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n </span>\n <input\n #searchInput\n type=\"text\"\n class=\"combobox-search-input\"\n placeholder=\"Type to filter...\"\n [value]=\"searchTerm()\"\n [attr.aria-activedescendant]=\"focusedIndex() >= 0 ? (elementId() + '_opt_' + focusedIndex()) : null\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n @if (searchTerm()) {\n <button\n type=\"button\"\n class=\"combobox-search-clear\"\n title=\"Clear filter\"\n (click)=\"clearSearch($event)\"\n >\n \u2715\n </button>\n }\n </div>\n\n <!-- Filtered Options List -->\n <div class=\"combobox-options-list\" #optionsListEl (scroll)=\"onOptionsScroll($event)\">\n @if (waitingFor().length > 0) {\n <div class=\"combobox-status-row waiting\">\n <span>Waiting for {{ waitingLabel() }}...</span>\n </div>\n } @else if (isLoading()) {\n <div class=\"combobox-status-row loading\">\n <span class=\"status-dot dot-pulse\"></span>\n <span>Executing query on database (may take 1\u20132 minutes on local database)...</span>\n </div>\n } @else if (loadError()) {\n <div class=\"combobox-status-row error\">\n <span>Error: {{ loadError() }}</span>\n <button type=\"button\" class=\"combobox-retry-btn\" (click)=\"retryLookup($event)\">\u21BB Retry Query</button>\n </div>\n } @else if (isDynamicSource() && hasLoaded() && allOptions().length === 0) {\n <div class=\"combobox-status-row empty\">\n <span>No records found (check parameters)</span>\n </div>\n } @else if (filteredOptions().length === 0) {\n <div class=\"combobox-status-row empty\">\n <span>No options matching \"{{ searchTerm() }}\"</span>\n </div>\n } @else {\n @for (opt of visibleFilteredOptions(); track opt.key; let i = $index) {\n <div\n role=\"option\"\n [id]=\"elementId() + '_opt_' + i\"\n class=\"combobox-option-item\"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-focused]=\"focusedIndex() === i\"\n [attr.aria-selected]=\"isSelected(opt)\"\n (click)=\"selectOption(opt)\"\n (mouseenter)=\"focusedIndex.set(i)\"\n >\n <span class=\"opt-label\">{{ opt.label }}</span>\n @if (isSelected(opt)) {\n <span class=\"opt-check\" aria-hidden=\"true\">\u2713</span>\n }\n </div>\n }\n @if (excessFilteredCount() > 0) {\n <div class=\"combobox-status-row hint\">\n <span>Showing {{ visibleFilteredOptions().length }} of {{ filteredOptions().length }} matches. Scroll down or</span>\n <button\n type=\"button\"\n class=\"combobox-load-all-btn\"\n (click)=\"loadAllFiltered(); $event.stopPropagation();\"\n >\n Load all {{ filteredOptions().length }}\n </button>\n </div>\n }\n }\n </div>\n </div>\n </ng-template>\n } @else {\n <!-- Native Browser Select Fallback -->\n <div class=\"rpt-select-wrapper\">\n <select\n [id]=\"elementId()\"\n [formControl]=\"formControl()\"\n [class.rpt-invalid]=\"isInvalid()\"\n class=\"rpt-select\"\n >\n @if (waitingFor().length > 0) {\n <option value=\"\" disabled selected>Waiting for {{ waitingLabel() }}...</option>\n } @else if (isLoading()) {\n <option value=\"\" disabled selected>Loading options from database...</option>\n } @else if (loadError()) {\n <option value=\"\" disabled selected>Error: {{ loadError() }}</option>\n } @else if (isDynamicSource() && hasLoaded() && allOptions().length === 0) {\n <option value=\"\" disabled selected>-- No records found (check parameters) --</option>\n } @else if (placeholder()) {\n <option value=\"\" [disabled]=\"config().validation?.required\">{{ placeholder() }}</option>\n }\n @for (opt of renderedOptions(); track opt.key) {\n <option [value]=\"opt.key\">{{ opt.label }}</option>\n }\n @if (hasExcessOptions()) {\n <option value=\"\" disabled>... and {{ excessOptionsCount() }} more records (refine filter) ...</option>\n }\n </select>\n <div class=\"rpt-select-arrow\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path d=\"M1 1.5L6 6.5L11 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </div>\n </div>\n }\n\n @if (showStatus() && isDynamicSource() && statusText()) {\n <div class=\"rpt-status-badge\" [attr.data-status]=\"statusKind()\">\n @switch (statusKind()) {\n @case ('loading') {\n <span class=\"status-dot dot-pulse\"></span>\n <span>Loading from database\u2026</span>\n }\n @case ('ok') {\n <span class=\"status-dot dot-ok\"></span>\n <span>{{ dynamicOptions().length }} records loaded</span>\n }\n @case ('waiting') {\n <span class=\"status-dot dot-warn\"></span>\n <span>Waiting for:</span>\n <div class=\"waiting-tokens\">\n @for (k of waitingFor(); track k) {\n <span class=\"waiting-token\">{{ k }}</span>\n }\n </div>\n }\n @case ('error') {\n <span class=\"status-dot dot-err\"></span>\n <span>{{ loadError() }}</span>\n <button type=\"button\" class=\"rpt-badge-retry-btn\" (click)=\"retryLookup($event)\">\u21BB Retry</button>\n }\n @case ('empty') {\n <span class=\"status-dot\"></span>\n <span>No records found for parameters</span>\n }\n @default {\n <span class=\"status-dot\"></span>\n }\n }\n </div>\n }\n\n @if (errorMessage()) {\n <span class=\"rpt-error-text\">{{ errorMessage() }}</span>\n }\n </div>", styles: [":host{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;font-family:var(--rpt-font-family, inherit);position:relative}.rpt-status-badge{display:flex;flex-wrap:wrap;align-items:center;gap:4px;font-size:.6875rem;padding:3px 6px;border-radius:4px;margin-top:4px;font-weight:500;line-height:1.3;max-width:100%;box-sizing:border-box;overflow:hidden;word-break:break-word}.rpt-status-badge>span{overflow-wrap:anywhere;word-break:break-word}.rpt-status-badge[data-status=loading]{background:#eff6ff;color:#2563eb;border:1px solid #dbeafe}.rpt-status-badge[data-status=ok]{background:#f0fdf4;color:#16a34a;border:1px solid #dcfce7}.rpt-status-badge[data-status=waiting]{background:#fffbeb;color:#d97706;border:1px solid #fef3c7}.rpt-status-badge[data-status=error]{background:#fef2f2;color:#dc2626;border:1px solid #fee2e2}.rpt-status-badge[data-status=empty]{background:#f8fafc;color:#64748b;border:1px solid #e2e8f0}.waiting-tokens{display:inline-flex;flex-wrap:wrap;align-items:center;gap:3px;margin-left:2px;max-width:100%}.waiting-token{background:#b453091f;border:1px solid rgba(180,83,9,.3);padding:1px 5px;border-radius:3px;font-weight:700;font-size:.625rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;box-sizing:border-box}.status-dot{width:6px;height:6px;border-radius:50%;background:currentColor}.dot-pulse{animation:rpt-pulse 1s infinite alternate}@keyframes rpt-pulse{0%{opacity:.3}to{opacity:1}}.rpt-field-group{display:flex;flex-direction:column;max-width:100%;min-width:0;gap:4px;box-sizing:border-box;position:relative}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-select-wrapper{position:relative;width:100%;flex:1;min-height:0;display:flex;align-items:center}.rpt-select{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 36px 6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);appearance:none;-webkit-appearance:none;outline:none;cursor:pointer;transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-select:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-select:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-select:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-select.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-select.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-select-arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--rpt-color-text-muted, #64748b);display:flex;align-items:center}.rpt-combobox-wrapper{position:relative;width:100%;flex:1;min-height:0}.rpt-combobox-trigger{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 10px 6px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--rpt-font-size-base, .875rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);outline:none;cursor:pointer;text-align:left;transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-combobox-trigger:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-combobox-trigger:focus-visible,.rpt-combobox-trigger.is-open{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-combobox-trigger:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-combobox-trigger.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-combobox-trigger.rpt-invalid:focus-visible{box-shadow:0 0 0 3px #ef444440}.trigger-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3}.trigger-label.is-placeholder{color:var(--rpt-color-text-muted, #94a3b8)}.trigger-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.trigger-clear-btn{display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:.6875rem;color:var(--rpt-color-text-muted, #64748b);background-color:#f1f5f9;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,color .15s ease}.trigger-clear-btn:hover{background-color:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.trigger-arrow{display:flex;align-items:center;color:var(--rpt-color-text-muted, #64748b);transition:transform .18s ease}.trigger-arrow.rotated{transform:rotate(180deg)}.rpt-combobox-menu{width:100%;min-width:0;max-width:100vw;box-sizing:border-box;background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);box-shadow:0 10px 25px -5px #00000024,0 8px 10px -6px #00000014;overflow:hidden;display:flex;flex-direction:column;animation:rpt-dropdown-pop .12s cubic-bezier(0,0,.2,1)}.rpt-combobox-menu.opens-above{box-shadow:0 -10px 25px -5px #00000024,0 -8px 10px -6px #00000014;animation:rpt-dropdown-pop-above .12s cubic-bezier(0,0,.2,1)}@keyframes rpt-dropdown-pop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes rpt-dropdown-pop-above{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.combobox-search-box{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--rpt-color-border, #e2e8f0);background-color:#f8fafc}.combobox-search-icon{color:var(--rpt-color-text-muted, #94a3b8);display:flex;align-items:center;flex-shrink:0}.combobox-search-input{flex:1;border:none;outline:none;background:transparent;font-size:var(--rpt-font-size-sm, .8125rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);min-width:0}.combobox-search-input::placeholder{color:#94a3b8}.combobox-search-clear{border:none;background:#e2e8f0;color:#64748b;width:16px;height:16px;border-radius:50%;font-size:.625rem;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}.combobox-search-clear:hover{background:#cbd5e1;color:#0f172a}.combobox-options-list{max-height:220px;overflow-y:auto;overscroll-behavior:contain;padding:4px}.combobox-option-item{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;border-radius:4px;font-size:var(--rpt-font-size-base, .84rem);color:var(--rpt-color-text, #0f172a);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .1s ease}.combobox-option-item.is-focused{background-color:var(--rpt-color-surface-hover, #f1f5f9)}.combobox-option-item.is-selected{background-color:#eff6ff;color:var(--rpt-color-primary, #2563eb);font-weight:600}.opt-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.opt-check{font-size:.875rem;font-weight:700;color:var(--rpt-color-primary, #2563eb);margin-left:8px}.combobox-status-row{padding:10px 12px;font-size:.78rem;text-align:center;color:var(--rpt-color-text-muted, #64748b)}.combobox-status-row.loading{display:flex;align-items:center;justify-content:center;gap:6px;color:#2563eb}.combobox-status-row.error{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--rpt-color-danger, #dc2626)}.trigger-retry-btn,.combobox-retry-btn,.rpt-badge-retry-btn{display:inline-flex;align-items:center;gap:3px;font-size:.6875rem;font-weight:600;color:#dc2626;background:#fee2e2;border:1px solid #fca5a5;border-radius:4px;padding:2px 7px;cursor:pointer;line-height:1.2;transition:background-color .12s ease,color .12s ease}.trigger-retry-btn:hover,.combobox-retry-btn:hover,.rpt-badge-retry-btn:hover{background:#fecaca;color:#b91c1c;border-color:#f87171}.combobox-status-row.hint{font-size:.72rem;color:#64748b;border-top:1px dashed #cbd5e1;margin-top:4px;padding:6px 10px;background-color:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;bottom:0;z-index:2;box-shadow:0 -2px 6px #0000000a}.combobox-load-all-btn{background:#eff6ff;border:1px solid #bfdbfe;color:#2563eb;font-size:.6875rem;font-weight:600;padding:3px 8px;border-radius:4px;cursor:pointer;white-space:nowrap;flex-shrink:0;transition:all .12s ease}.combobox-load-all-btn:hover{background:#2563eb;color:#fff;border-color:#2563eb}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4278
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptDropdownComponent, isStandalone: true, selector: "rpt-dropdown", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, parentForm: { classPropertyName: "parentForm", publicName: "parentForm", isSignal: true, isRequired: false, transformFunction: null }, showStatus: { classPropertyName: "showStatus", publicName: "showStatus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropdownClick: "dropdownClick" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscape()" }, properties: { "class.is-open": "isOpen()", "class.opens-above": "opensAbove()" } }, viewQueries: [{ propertyName: "comboboxWrapperEl", first: true, predicate: ["comboboxWrapper"], descendants: true, isSignal: true }, { propertyName: "searchInputEl", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "optionsListEl", first: true, predicate: ["optionsListEl"], descendants: true, isSignal: true }], ngImport: i0, template: " <div class=\"rpt-field-group\">\n @if (config().label) {\n <label [for]=\"elementId()\" class=\"rpt-label\">\n {{ config().label }}\n @if (config().validation?.required) {\n <span class=\"rpt-required-marker\">*</span>\n }\n </label>\n }\n\n @if (isSearchable()) {\n <!-- Searchable Typeahead Combobox -->\n <div class=\"rpt-combobox-wrapper\" #comboboxWrapper #comboboxOrigin=\"cdkOverlayOrigin\" cdkOverlayOrigin>\n <button\n type=\"button\"\n class=\"rpt-combobox-trigger\"\n [id]=\"elementId()\"\n [class.rpt-invalid]=\"isInvalid()\"\n [class.is-open]=\"isOpen()\"\n [disabled]=\"formControl().disabled\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n (click)=\"toggleOpen($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <span class=\"trigger-label\" [class.is-placeholder]=\"!selectedOption()\">\n {{ selectedOption() ? selectedOption()!.label : placeholder() }}\n </span>\n\n <div class=\"trigger-actions\">\n @if (isLoading()) {\n <span class=\"status-dot dot-pulse\" style=\"color: #2563eb; margin-right: 4px;\" title=\"Executing query on database...\"></span>\n }\n @if (loadError() && !isLoading()) {\n <button\n type=\"button\"\n class=\"trigger-retry-btn\"\n title=\"Retry database query\"\n aria-label=\"Retry database query\"\n (click)=\"retryLookup($event)\"\n >\n \u21BB Retry\n </button>\n }\n @if (selectedOption() && !formControl().disabled) {\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"trigger-clear-btn\"\n title=\"Clear selection\"\n aria-label=\"Clear selection\"\n (click)=\"clearSelection($event)\"\n (keydown.enter)=\"clearSelection($event)\"\n (keydown.space)=\"clearSelection($event)\"\n >\n \u2715\n </span>\n }\n <span class=\"trigger-arrow\" [class.rotated]=\"isOpen()\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path d=\"M1 1.5L6 6.5L11 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </span>\n </div>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"comboboxOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayMinWidth]=\"'min(180px, calc(100vw - 16px))'\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n [cdkConnectedOverlayPush]=\"true\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n (overlayOutsideClick)=\"closeDropdown()\"\n (positionChange)=\"onPositionChange($event)\"\n (attach)=\"onOverlayAttached()\"\n (detach)=\"closeDropdown()\"\n >\n <div\n class=\"rpt-combobox-menu\"\n [class.opens-above]=\"opensAbove()\"\n role=\"listbox\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- Real-time Filter Search Box -->\n <div class=\"combobox-search-box\">\n <span class=\"combobox-search-icon\" aria-hidden=\"true\">\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n </span>\n <input\n #searchInput\n type=\"text\"\n class=\"combobox-search-input\"\n placeholder=\"Type to filter...\"\n [value]=\"searchTerm()\"\n [attr.aria-activedescendant]=\"focusedIndex() >= 0 ? (elementId() + '_opt_' + focusedIndex()) : null\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n @if (searchTerm()) {\n <button\n type=\"button\"\n class=\"combobox-search-clear\"\n title=\"Clear filter\"\n (click)=\"clearSearch($event)\"\n >\n \u2715\n </button>\n }\n </div>\n\n <!-- Filtered Options List -->\n <div class=\"combobox-options-list\" #optionsListEl (scroll)=\"onOptionsScroll($event)\">\n @if (waitingFor().length > 0) {\n <div class=\"combobox-status-row waiting\">\n <span>Waiting for {{ waitingLabel() }}...</span>\n </div>\n } @else if (isLoading()) {\n <div class=\"combobox-status-row loading\">\n <span class=\"status-dot dot-pulse\"></span>\n <span>Executing query on database (may take 1\u20132 minutes on local database)...</span>\n </div>\n } @else if (loadError()) {\n <div class=\"combobox-status-row error\">\n <span>Error: {{ loadError() }}</span>\n <button type=\"button\" class=\"combobox-retry-btn\" (click)=\"retryLookup($event)\">\u21BB Retry Query</button>\n </div>\n } @else if (isDynamicSource() && hasLoaded() && allOptions().length === 0) {\n <div class=\"combobox-status-row empty\">\n <span>No records found (check parameters)</span>\n </div>\n } @else if (filteredOptions().length === 0) {\n <div class=\"combobox-status-row empty\">\n <span>No options matching \"{{ searchTerm() }}\"</span>\n </div>\n } @else {\n @for (opt of visibleFilteredOptions(); track opt.key; let i = $index) {\n <div\n role=\"option\"\n [id]=\"elementId() + '_opt_' + i\"\n class=\"combobox-option-item\"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-focused]=\"focusedIndex() === i\"\n [attr.aria-selected]=\"isSelected(opt)\"\n (click)=\"selectOption(opt)\"\n (mouseenter)=\"focusedIndex.set(i)\"\n >\n <span class=\"opt-label\">{{ opt.label }}</span>\n @if (isSelected(opt)) {\n <span class=\"opt-check\" aria-hidden=\"true\">\u2713</span>\n }\n </div>\n }\n @if (excessFilteredCount() > 0) {\n <div class=\"combobox-status-row hint\">\n <span>Showing {{ visibleFilteredOptions().length }} of {{ filteredOptions().length }} matches. Scroll down or</span>\n <button\n type=\"button\"\n class=\"combobox-load-all-btn\"\n (click)=\"loadAllFiltered(); $event.stopPropagation();\"\n >\n Load all {{ filteredOptions().length }}\n </button>\n </div>\n }\n }\n </div>\n </div>\n </ng-template>\n } @else {\n <!-- Native Browser Select Fallback -->\n <div class=\"rpt-select-wrapper\">\n <select\n [id]=\"elementId()\"\n [formControl]=\"formControl()\"\n [class.rpt-invalid]=\"isInvalid()\"\n class=\"rpt-select\"\n >\n @if (waitingFor().length > 0) {\n <option value=\"\" disabled selected>Waiting for {{ waitingLabel() }}...</option>\n } @else if (isLoading()) {\n <option value=\"\" disabled selected>Loading options from database...</option>\n } @else if (loadError()) {\n <option value=\"\" disabled selected>Error: {{ loadError() }}</option>\n } @else if (isDynamicSource() && hasLoaded() && allOptions().length === 0) {\n <option value=\"\" disabled selected>-- No records found (check parameters) --</option>\n } @else if (placeholder()) {\n <option value=\"\" [disabled]=\"config().validation?.required\">{{ placeholder() }}</option>\n }\n @for (opt of renderedOptions(); track opt.key) {\n <option [ngValue]=\"opt.key\">{{ opt.label }}</option>\n }\n @if (hasExcessOptions()) {\n <option value=\"\" disabled>... and {{ excessOptionsCount() }} more records (refine filter) ...</option>\n }\n </select>\n <div class=\"rpt-select-arrow\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path d=\"M1 1.5L6 6.5L11 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </div>\n </div>\n }\n\n @if (showStatus() && isDynamicSource() && statusText()) {\n <div class=\"rpt-status-badge\" [attr.data-status]=\"statusKind()\">\n @switch (statusKind()) {\n @case ('loading') {\n <span class=\"status-dot dot-pulse\"></span>\n <span>Loading from database\u2026</span>\n }\n @case ('ok') {\n <span class=\"status-dot dot-ok\"></span>\n <span>{{ dynamicOptions().length }} records loaded</span>\n }\n @case ('waiting') {\n <span class=\"status-dot dot-warn\"></span>\n <span>Waiting for:</span>\n <div class=\"waiting-tokens\">\n @for (k of waitingFor(); track k) {\n <span class=\"waiting-token\">{{ k }}</span>\n }\n </div>\n }\n @case ('error') {\n <span class=\"status-dot dot-err\"></span>\n <span>{{ loadError() }}</span>\n <button type=\"button\" class=\"rpt-badge-retry-btn\" (click)=\"retryLookup($event)\">\u21BB Retry</button>\n }\n @case ('empty') {\n <span class=\"status-dot\"></span>\n <span>No records found for parameters</span>\n }\n @default {\n <span class=\"status-dot\"></span>\n }\n }\n </div>\n }\n\n @if (errorMessage()) {\n <span class=\"rpt-error-text\">{{ errorMessage() }}</span>\n }\n </div>", styles: [":host{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;font-family:var(--rpt-font-family, inherit);position:relative}.rpt-status-badge{display:flex;flex-wrap:wrap;align-items:center;gap:4px;font-size:.6875rem;padding:3px 6px;border-radius:4px;margin-top:4px;font-weight:500;line-height:1.3;max-width:100%;box-sizing:border-box;overflow:hidden;word-break:break-word}.rpt-status-badge>span{overflow-wrap:anywhere;word-break:break-word}.rpt-status-badge[data-status=loading]{background:#eff6ff;color:#2563eb;border:1px solid #dbeafe}.rpt-status-badge[data-status=ok]{background:#f0fdf4;color:#16a34a;border:1px solid #dcfce7}.rpt-status-badge[data-status=waiting]{background:#fffbeb;color:#d97706;border:1px solid #fef3c7}.rpt-status-badge[data-status=error]{background:#fef2f2;color:#dc2626;border:1px solid #fee2e2}.rpt-status-badge[data-status=empty]{background:#f8fafc;color:#64748b;border:1px solid #e2e8f0}.waiting-tokens{display:inline-flex;flex-wrap:wrap;align-items:center;gap:3px;margin-left:2px;max-width:100%}.waiting-token{background:#b453091f;border:1px solid rgba(180,83,9,.3);padding:1px 5px;border-radius:3px;font-weight:700;font-size:.625rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;box-sizing:border-box}.status-dot{width:6px;height:6px;border-radius:50%;background:currentColor}.dot-pulse{animation:rpt-pulse 1s infinite alternate}@keyframes rpt-pulse{0%{opacity:.3}to{opacity:1}}.rpt-field-group{display:flex;flex-direction:column;max-width:100%;min-width:0;gap:4px;box-sizing:border-box;position:relative}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-select-wrapper{position:relative;width:100%;flex:1;min-height:0;display:flex;align-items:center}.rpt-select{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 36px 6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);appearance:none;-webkit-appearance:none;outline:none;cursor:pointer;transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-select:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-select:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-select:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-select.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-select.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-select-arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--rpt-color-text-muted, #64748b);display:flex;align-items:center}.rpt-combobox-wrapper{position:relative;width:100%;flex:1;min-height:0}.rpt-combobox-trigger{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 10px 6px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--rpt-font-size-base, .875rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);outline:none;cursor:pointer;text-align:left;transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-combobox-trigger:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-combobox-trigger:focus-visible,.rpt-combobox-trigger.is-open{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-combobox-trigger:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-combobox-trigger.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-combobox-trigger.rpt-invalid:focus-visible{box-shadow:0 0 0 3px #ef444440}.trigger-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3}.trigger-label.is-placeholder{color:var(--rpt-color-text-muted, #94a3b8)}.trigger-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.trigger-clear-btn{display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:.6875rem;color:var(--rpt-color-text-muted, #64748b);background-color:#f1f5f9;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,color .15s ease}.trigger-clear-btn:hover{background-color:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.trigger-arrow{display:flex;align-items:center;color:var(--rpt-color-text-muted, #64748b);transition:transform .18s ease}.trigger-arrow.rotated{transform:rotate(180deg)}.rpt-combobox-menu{width:100%;min-width:0;max-width:100vw;box-sizing:border-box;background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);box-shadow:0 10px 25px -5px #00000024,0 8px 10px -6px #00000014;overflow:hidden;display:flex;flex-direction:column;animation:rpt-dropdown-pop .12s cubic-bezier(0,0,.2,1)}.rpt-combobox-menu.opens-above{box-shadow:0 -10px 25px -5px #00000024,0 -8px 10px -6px #00000014;animation:rpt-dropdown-pop-above .12s cubic-bezier(0,0,.2,1)}@keyframes rpt-dropdown-pop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes rpt-dropdown-pop-above{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.combobox-search-box{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--rpt-color-border, #e2e8f0);background-color:#f8fafc}.combobox-search-icon{color:var(--rpt-color-text-muted, #94a3b8);display:flex;align-items:center;flex-shrink:0}.combobox-search-input{flex:1;border:none;outline:none;background:transparent;font-size:var(--rpt-font-size-sm, .8125rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);min-width:0}.combobox-search-input::placeholder{color:#94a3b8}.combobox-search-clear{border:none;background:#e2e8f0;color:#64748b;width:16px;height:16px;border-radius:50%;font-size:.625rem;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}.combobox-search-clear:hover{background:#cbd5e1;color:#0f172a}.combobox-options-list{max-height:220px;overflow-y:auto;overscroll-behavior:contain;padding:4px}.combobox-option-item{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;border-radius:4px;font-size:var(--rpt-font-size-base, .84rem);color:var(--rpt-color-text, #0f172a);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .1s ease}.combobox-option-item.is-focused{background-color:var(--rpt-color-surface-hover, #f1f5f9)}.combobox-option-item.is-selected{background-color:#eff6ff;color:var(--rpt-color-primary, #2563eb);font-weight:600}.opt-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.opt-check{font-size:.875rem;font-weight:700;color:var(--rpt-color-primary, #2563eb);margin-left:8px}.combobox-status-row{padding:10px 12px;font-size:.78rem;text-align:center;color:var(--rpt-color-text-muted, #64748b)}.combobox-status-row.loading{display:flex;align-items:center;justify-content:center;gap:6px;color:#2563eb}.combobox-status-row.error{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--rpt-color-danger, #dc2626)}.trigger-retry-btn,.combobox-retry-btn,.rpt-badge-retry-btn{display:inline-flex;align-items:center;gap:3px;font-size:.6875rem;font-weight:600;color:#dc2626;background:#fee2e2;border:1px solid #fca5a5;border-radius:4px;padding:2px 7px;cursor:pointer;line-height:1.2;transition:background-color .12s ease,color .12s ease}.trigger-retry-btn:hover,.combobox-retry-btn:hover,.rpt-badge-retry-btn:hover{background:#fecaca;color:#b91c1c;border-color:#f87171}.combobox-status-row.hint{font-size:.72rem;color:#64748b;border-top:1px dashed #cbd5e1;margin-top:4px;padding:6px 10px;background-color:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;bottom:0;z-index:2;box-shadow:0 -2px 6px #0000000a}.combobox-load-all-btn{background:#eff6ff;border:1px solid #bfdbfe;color:#2563eb;font-size:.6875rem;font-weight:600;padding:3px 8px;border-radius:4px;cursor:pointer;white-space:nowrap;flex-shrink:0;transition:all .12s ease}.combobox-load-all-btn:hover{background:#2563eb;color:#fff;border-color:#2563eb}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i2.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4237
4279
|
}
|
|
4238
4280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptDropdownComponent, decorators: [{
|
|
4239
4281
|
type: Component,
|
|
4240
4282
|
args: [{ selector: 'rpt-dropdown', standalone: true, imports: [ReactiveFormsModule, OverlayModule], host: {
|
|
4241
4283
|
'[class.is-open]': 'isOpen()',
|
|
4242
4284
|
'[class.opens-above]': 'opensAbove()',
|
|
4243
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: " <div class=\"rpt-field-group\">\n @if (config().label) {\n <label [for]=\"elementId()\" class=\"rpt-label\">\n {{ config().label }}\n @if (config().validation?.required) {\n <span class=\"rpt-required-marker\">*</span>\n }\n </label>\n }\n\n @if (isSearchable()) {\n <!-- Searchable Typeahead Combobox -->\n <div class=\"rpt-combobox-wrapper\" #comboboxWrapper #comboboxOrigin=\"cdkOverlayOrigin\" cdkOverlayOrigin>\n <button\n type=\"button\"\n class=\"rpt-combobox-trigger\"\n [id]=\"elementId()\"\n [class.rpt-invalid]=\"isInvalid()\"\n [class.is-open]=\"isOpen()\"\n [disabled]=\"formControl().disabled\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n (click)=\"toggleOpen($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <span class=\"trigger-label\" [class.is-placeholder]=\"!selectedOption()\">\n {{ selectedOption() ? selectedOption()!.label : placeholder() }}\n </span>\n\n <div class=\"trigger-actions\">\n @if (isLoading()) {\n <span class=\"status-dot dot-pulse\" style=\"color: #2563eb; margin-right: 4px;\" title=\"Executing query on database...\"></span>\n }\n @if (loadError() && !isLoading()) {\n <button\n type=\"button\"\n class=\"trigger-retry-btn\"\n title=\"Retry database query\"\n aria-label=\"Retry database query\"\n (click)=\"retryLookup($event)\"\n >\n \u21BB Retry\n </button>\n }\n @if (selectedOption() && !formControl().disabled) {\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"trigger-clear-btn\"\n title=\"Clear selection\"\n aria-label=\"Clear selection\"\n (click)=\"clearSelection($event)\"\n (keydown.enter)=\"clearSelection($event)\"\n (keydown.space)=\"clearSelection($event)\"\n >\n \u2715\n </span>\n }\n <span class=\"trigger-arrow\" [class.rotated]=\"isOpen()\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path d=\"M1 1.5L6 6.5L11 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </span>\n </div>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"comboboxOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayMinWidth]=\"'min(180px, calc(100vw - 16px))'\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n [cdkConnectedOverlayPush]=\"true\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n (overlayOutsideClick)=\"closeDropdown()\"\n (positionChange)=\"onPositionChange($event)\"\n (attach)=\"onOverlayAttached()\"\n (detach)=\"closeDropdown()\"\n >\n <div\n class=\"rpt-combobox-menu\"\n [class.opens-above]=\"opensAbove()\"\n role=\"listbox\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- Real-time Filter Search Box -->\n <div class=\"combobox-search-box\">\n <span class=\"combobox-search-icon\" aria-hidden=\"true\">\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n </span>\n <input\n #searchInput\n type=\"text\"\n class=\"combobox-search-input\"\n placeholder=\"Type to filter...\"\n [value]=\"searchTerm()\"\n [attr.aria-activedescendant]=\"focusedIndex() >= 0 ? (elementId() + '_opt_' + focusedIndex()) : null\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n @if (searchTerm()) {\n <button\n type=\"button\"\n class=\"combobox-search-clear\"\n title=\"Clear filter\"\n (click)=\"clearSearch($event)\"\n >\n \u2715\n </button>\n }\n </div>\n\n <!-- Filtered Options List -->\n <div class=\"combobox-options-list\" #optionsListEl (scroll)=\"onOptionsScroll($event)\">\n @if (waitingFor().length > 0) {\n <div class=\"combobox-status-row waiting\">\n <span>Waiting for {{ waitingLabel() }}...</span>\n </div>\n } @else if (isLoading()) {\n <div class=\"combobox-status-row loading\">\n <span class=\"status-dot dot-pulse\"></span>\n <span>Executing query on database (may take 1\u20132 minutes on local database)...</span>\n </div>\n } @else if (loadError()) {\n <div class=\"combobox-status-row error\">\n <span>Error: {{ loadError() }}</span>\n <button type=\"button\" class=\"combobox-retry-btn\" (click)=\"retryLookup($event)\">\u21BB Retry Query</button>\n </div>\n } @else if (isDynamicSource() && hasLoaded() && allOptions().length === 0) {\n <div class=\"combobox-status-row empty\">\n <span>No records found (check parameters)</span>\n </div>\n } @else if (filteredOptions().length === 0) {\n <div class=\"combobox-status-row empty\">\n <span>No options matching \"{{ searchTerm() }}\"</span>\n </div>\n } @else {\n @for (opt of visibleFilteredOptions(); track opt.key; let i = $index) {\n <div\n role=\"option\"\n [id]=\"elementId() + '_opt_' + i\"\n class=\"combobox-option-item\"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-focused]=\"focusedIndex() === i\"\n [attr.aria-selected]=\"isSelected(opt)\"\n (click)=\"selectOption(opt)\"\n (mouseenter)=\"focusedIndex.set(i)\"\n >\n <span class=\"opt-label\">{{ opt.label }}</span>\n @if (isSelected(opt)) {\n <span class=\"opt-check\" aria-hidden=\"true\">\u2713</span>\n }\n </div>\n }\n @if (excessFilteredCount() > 0) {\n <div class=\"combobox-status-row hint\">\n <span>Showing {{ visibleFilteredOptions().length }} of {{ filteredOptions().length }} matches. Scroll down or</span>\n <button\n type=\"button\"\n class=\"combobox-load-all-btn\"\n (click)=\"loadAllFiltered(); $event.stopPropagation();\"\n >\n Load all {{ filteredOptions().length }}\n </button>\n </div>\n }\n }\n </div>\n </div>\n </ng-template>\n } @else {\n <!-- Native Browser Select Fallback -->\n <div class=\"rpt-select-wrapper\">\n <select\n [id]=\"elementId()\"\n [formControl]=\"formControl()\"\n [class.rpt-invalid]=\"isInvalid()\"\n class=\"rpt-select\"\n >\n @if (waitingFor().length > 0) {\n <option value=\"\" disabled selected>Waiting for {{ waitingLabel() }}...</option>\n } @else if (isLoading()) {\n <option value=\"\" disabled selected>Loading options from database...</option>\n } @else if (loadError()) {\n <option value=\"\" disabled selected>Error: {{ loadError() }}</option>\n } @else if (isDynamicSource() && hasLoaded() && allOptions().length === 0) {\n <option value=\"\" disabled selected>-- No records found (check parameters) --</option>\n } @else if (placeholder()) {\n <option value=\"\" [disabled]=\"config().validation?.required\">{{ placeholder() }}</option>\n }\n @for (opt of renderedOptions(); track opt.key) {\n <option [value]=\"opt.key\">{{ opt.label }}</option>\n }\n @if (hasExcessOptions()) {\n <option value=\"\" disabled>... and {{ excessOptionsCount() }} more records (refine filter) ...</option>\n }\n </select>\n <div class=\"rpt-select-arrow\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path d=\"M1 1.5L6 6.5L11 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </div>\n </div>\n }\n\n @if (showStatus() && isDynamicSource() && statusText()) {\n <div class=\"rpt-status-badge\" [attr.data-status]=\"statusKind()\">\n @switch (statusKind()) {\n @case ('loading') {\n <span class=\"status-dot dot-pulse\"></span>\n <span>Loading from database\u2026</span>\n }\n @case ('ok') {\n <span class=\"status-dot dot-ok\"></span>\n <span>{{ dynamicOptions().length }} records loaded</span>\n }\n @case ('waiting') {\n <span class=\"status-dot dot-warn\"></span>\n <span>Waiting for:</span>\n <div class=\"waiting-tokens\">\n @for (k of waitingFor(); track k) {\n <span class=\"waiting-token\">{{ k }}</span>\n }\n </div>\n }\n @case ('error') {\n <span class=\"status-dot dot-err\"></span>\n <span>{{ loadError() }}</span>\n <button type=\"button\" class=\"rpt-badge-retry-btn\" (click)=\"retryLookup($event)\">\u21BB Retry</button>\n }\n @case ('empty') {\n <span class=\"status-dot\"></span>\n <span>No records found for parameters</span>\n }\n @default {\n <span class=\"status-dot\"></span>\n }\n }\n </div>\n }\n\n @if (errorMessage()) {\n <span class=\"rpt-error-text\">{{ errorMessage() }}</span>\n }\n </div>", styles: [":host{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;font-family:var(--rpt-font-family, inherit);position:relative}.rpt-status-badge{display:flex;flex-wrap:wrap;align-items:center;gap:4px;font-size:.6875rem;padding:3px 6px;border-radius:4px;margin-top:4px;font-weight:500;line-height:1.3;max-width:100%;box-sizing:border-box;overflow:hidden;word-break:break-word}.rpt-status-badge>span{overflow-wrap:anywhere;word-break:break-word}.rpt-status-badge[data-status=loading]{background:#eff6ff;color:#2563eb;border:1px solid #dbeafe}.rpt-status-badge[data-status=ok]{background:#f0fdf4;color:#16a34a;border:1px solid #dcfce7}.rpt-status-badge[data-status=waiting]{background:#fffbeb;color:#d97706;border:1px solid #fef3c7}.rpt-status-badge[data-status=error]{background:#fef2f2;color:#dc2626;border:1px solid #fee2e2}.rpt-status-badge[data-status=empty]{background:#f8fafc;color:#64748b;border:1px solid #e2e8f0}.waiting-tokens{display:inline-flex;flex-wrap:wrap;align-items:center;gap:3px;margin-left:2px;max-width:100%}.waiting-token{background:#b453091f;border:1px solid rgba(180,83,9,.3);padding:1px 5px;border-radius:3px;font-weight:700;font-size:.625rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;box-sizing:border-box}.status-dot{width:6px;height:6px;border-radius:50%;background:currentColor}.dot-pulse{animation:rpt-pulse 1s infinite alternate}@keyframes rpt-pulse{0%{opacity:.3}to{opacity:1}}.rpt-field-group{display:flex;flex-direction:column;max-width:100%;min-width:0;gap:4px;box-sizing:border-box;position:relative}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-select-wrapper{position:relative;width:100%;flex:1;min-height:0;display:flex;align-items:center}.rpt-select{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 36px 6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);appearance:none;-webkit-appearance:none;outline:none;cursor:pointer;transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-select:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-select:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-select:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-select.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-select.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-select-arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--rpt-color-text-muted, #64748b);display:flex;align-items:center}.rpt-combobox-wrapper{position:relative;width:100%;flex:1;min-height:0}.rpt-combobox-trigger{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 10px 6px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--rpt-font-size-base, .875rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);outline:none;cursor:pointer;text-align:left;transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-combobox-trigger:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-combobox-trigger:focus-visible,.rpt-combobox-trigger.is-open{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-combobox-trigger:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-combobox-trigger.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-combobox-trigger.rpt-invalid:focus-visible{box-shadow:0 0 0 3px #ef444440}.trigger-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3}.trigger-label.is-placeholder{color:var(--rpt-color-text-muted, #94a3b8)}.trigger-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.trigger-clear-btn{display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:.6875rem;color:var(--rpt-color-text-muted, #64748b);background-color:#f1f5f9;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,color .15s ease}.trigger-clear-btn:hover{background-color:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.trigger-arrow{display:flex;align-items:center;color:var(--rpt-color-text-muted, #64748b);transition:transform .18s ease}.trigger-arrow.rotated{transform:rotate(180deg)}.rpt-combobox-menu{width:100%;min-width:0;max-width:100vw;box-sizing:border-box;background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);box-shadow:0 10px 25px -5px #00000024,0 8px 10px -6px #00000014;overflow:hidden;display:flex;flex-direction:column;animation:rpt-dropdown-pop .12s cubic-bezier(0,0,.2,1)}.rpt-combobox-menu.opens-above{box-shadow:0 -10px 25px -5px #00000024,0 -8px 10px -6px #00000014;animation:rpt-dropdown-pop-above .12s cubic-bezier(0,0,.2,1)}@keyframes rpt-dropdown-pop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes rpt-dropdown-pop-above{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.combobox-search-box{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--rpt-color-border, #e2e8f0);background-color:#f8fafc}.combobox-search-icon{color:var(--rpt-color-text-muted, #94a3b8);display:flex;align-items:center;flex-shrink:0}.combobox-search-input{flex:1;border:none;outline:none;background:transparent;font-size:var(--rpt-font-size-sm, .8125rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);min-width:0}.combobox-search-input::placeholder{color:#94a3b8}.combobox-search-clear{border:none;background:#e2e8f0;color:#64748b;width:16px;height:16px;border-radius:50%;font-size:.625rem;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}.combobox-search-clear:hover{background:#cbd5e1;color:#0f172a}.combobox-options-list{max-height:220px;overflow-y:auto;overscroll-behavior:contain;padding:4px}.combobox-option-item{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;border-radius:4px;font-size:var(--rpt-font-size-base, .84rem);color:var(--rpt-color-text, #0f172a);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .1s ease}.combobox-option-item.is-focused{background-color:var(--rpt-color-surface-hover, #f1f5f9)}.combobox-option-item.is-selected{background-color:#eff6ff;color:var(--rpt-color-primary, #2563eb);font-weight:600}.opt-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.opt-check{font-size:.875rem;font-weight:700;color:var(--rpt-color-primary, #2563eb);margin-left:8px}.combobox-status-row{padding:10px 12px;font-size:.78rem;text-align:center;color:var(--rpt-color-text-muted, #64748b)}.combobox-status-row.loading{display:flex;align-items:center;justify-content:center;gap:6px;color:#2563eb}.combobox-status-row.error{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--rpt-color-danger, #dc2626)}.trigger-retry-btn,.combobox-retry-btn,.rpt-badge-retry-btn{display:inline-flex;align-items:center;gap:3px;font-size:.6875rem;font-weight:600;color:#dc2626;background:#fee2e2;border:1px solid #fca5a5;border-radius:4px;padding:2px 7px;cursor:pointer;line-height:1.2;transition:background-color .12s ease,color .12s ease}.trigger-retry-btn:hover,.combobox-retry-btn:hover,.rpt-badge-retry-btn:hover{background:#fecaca;color:#b91c1c;border-color:#f87171}.combobox-status-row.hint{font-size:.72rem;color:#64748b;border-top:1px dashed #cbd5e1;margin-top:4px;padding:6px 10px;background-color:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;bottom:0;z-index:2;box-shadow:0 -2px 6px #0000000a}.combobox-load-all-btn{background:#eff6ff;border:1px solid #bfdbfe;color:#2563eb;font-size:.6875rem;font-weight:600;padding:3px 8px;border-radius:4px;cursor:pointer;white-space:nowrap;flex-shrink:0;transition:all .12s ease}.combobox-load-all-btn:hover{background:#2563eb;color:#fff;border-color:#2563eb}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
4285
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: " <div class=\"rpt-field-group\">\n @if (config().label) {\n <label [for]=\"elementId()\" class=\"rpt-label\">\n {{ config().label }}\n @if (config().validation?.required) {\n <span class=\"rpt-required-marker\">*</span>\n }\n </label>\n }\n\n @if (isSearchable()) {\n <!-- Searchable Typeahead Combobox -->\n <div class=\"rpt-combobox-wrapper\" #comboboxWrapper #comboboxOrigin=\"cdkOverlayOrigin\" cdkOverlayOrigin>\n <button\n type=\"button\"\n class=\"rpt-combobox-trigger\"\n [id]=\"elementId()\"\n [class.rpt-invalid]=\"isInvalid()\"\n [class.is-open]=\"isOpen()\"\n [disabled]=\"formControl().disabled\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"'listbox'\"\n (click)=\"toggleOpen($event)\"\n (keydown)=\"onTriggerKeydown($event)\"\n >\n <span class=\"trigger-label\" [class.is-placeholder]=\"!selectedOption()\">\n {{ selectedOption() ? selectedOption()!.label : placeholder() }}\n </span>\n\n <div class=\"trigger-actions\">\n @if (isLoading()) {\n <span class=\"status-dot dot-pulse\" style=\"color: #2563eb; margin-right: 4px;\" title=\"Executing query on database...\"></span>\n }\n @if (loadError() && !isLoading()) {\n <button\n type=\"button\"\n class=\"trigger-retry-btn\"\n title=\"Retry database query\"\n aria-label=\"Retry database query\"\n (click)=\"retryLookup($event)\"\n >\n \u21BB Retry\n </button>\n }\n @if (selectedOption() && !formControl().disabled) {\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"trigger-clear-btn\"\n title=\"Clear selection\"\n aria-label=\"Clear selection\"\n (click)=\"clearSelection($event)\"\n (keydown.enter)=\"clearSelection($event)\"\n (keydown.space)=\"clearSelection($event)\"\n >\n \u2715\n </span>\n }\n <span class=\"trigger-arrow\" [class.rotated]=\"isOpen()\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path d=\"M1 1.5L6 6.5L11 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </span>\n </div>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"comboboxOrigin\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayMinWidth]=\"'min(180px, calc(100vw - 16px))'\"\n [cdkConnectedOverlayFlexibleDimensions]=\"true\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n [cdkConnectedOverlayPush]=\"true\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n (overlayOutsideClick)=\"closeDropdown()\"\n (positionChange)=\"onPositionChange($event)\"\n (attach)=\"onOverlayAttached()\"\n (detach)=\"closeDropdown()\"\n >\n <div\n class=\"rpt-combobox-menu\"\n [class.opens-above]=\"opensAbove()\"\n role=\"listbox\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- Real-time Filter Search Box -->\n <div class=\"combobox-search-box\">\n <span class=\"combobox-search-icon\" aria-hidden=\"true\">\n <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"></circle>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"></line>\n </svg>\n </span>\n <input\n #searchInput\n type=\"text\"\n class=\"combobox-search-input\"\n placeholder=\"Type to filter...\"\n [value]=\"searchTerm()\"\n [attr.aria-activedescendant]=\"focusedIndex() >= 0 ? (elementId() + '_opt_' + focusedIndex()) : null\"\n (input)=\"onSearchInput($event)\"\n (keydown)=\"onSearchKeydown($event)\"\n />\n @if (searchTerm()) {\n <button\n type=\"button\"\n class=\"combobox-search-clear\"\n title=\"Clear filter\"\n (click)=\"clearSearch($event)\"\n >\n \u2715\n </button>\n }\n </div>\n\n <!-- Filtered Options List -->\n <div class=\"combobox-options-list\" #optionsListEl (scroll)=\"onOptionsScroll($event)\">\n @if (waitingFor().length > 0) {\n <div class=\"combobox-status-row waiting\">\n <span>Waiting for {{ waitingLabel() }}...</span>\n </div>\n } @else if (isLoading()) {\n <div class=\"combobox-status-row loading\">\n <span class=\"status-dot dot-pulse\"></span>\n <span>Executing query on database (may take 1\u20132 minutes on local database)...</span>\n </div>\n } @else if (loadError()) {\n <div class=\"combobox-status-row error\">\n <span>Error: {{ loadError() }}</span>\n <button type=\"button\" class=\"combobox-retry-btn\" (click)=\"retryLookup($event)\">\u21BB Retry Query</button>\n </div>\n } @else if (isDynamicSource() && hasLoaded() && allOptions().length === 0) {\n <div class=\"combobox-status-row empty\">\n <span>No records found (check parameters)</span>\n </div>\n } @else if (filteredOptions().length === 0) {\n <div class=\"combobox-status-row empty\">\n <span>No options matching \"{{ searchTerm() }}\"</span>\n </div>\n } @else {\n @for (opt of visibleFilteredOptions(); track opt.key; let i = $index) {\n <div\n role=\"option\"\n [id]=\"elementId() + '_opt_' + i\"\n class=\"combobox-option-item\"\n [class.is-selected]=\"isSelected(opt)\"\n [class.is-focused]=\"focusedIndex() === i\"\n [attr.aria-selected]=\"isSelected(opt)\"\n (click)=\"selectOption(opt)\"\n (mouseenter)=\"focusedIndex.set(i)\"\n >\n <span class=\"opt-label\">{{ opt.label }}</span>\n @if (isSelected(opt)) {\n <span class=\"opt-check\" aria-hidden=\"true\">\u2713</span>\n }\n </div>\n }\n @if (excessFilteredCount() > 0) {\n <div class=\"combobox-status-row hint\">\n <span>Showing {{ visibleFilteredOptions().length }} of {{ filteredOptions().length }} matches. Scroll down or</span>\n <button\n type=\"button\"\n class=\"combobox-load-all-btn\"\n (click)=\"loadAllFiltered(); $event.stopPropagation();\"\n >\n Load all {{ filteredOptions().length }}\n </button>\n </div>\n }\n }\n </div>\n </div>\n </ng-template>\n } @else {\n <!-- Native Browser Select Fallback -->\n <div class=\"rpt-select-wrapper\">\n <select\n [id]=\"elementId()\"\n [formControl]=\"formControl()\"\n [class.rpt-invalid]=\"isInvalid()\"\n class=\"rpt-select\"\n >\n @if (waitingFor().length > 0) {\n <option value=\"\" disabled selected>Waiting for {{ waitingLabel() }}...</option>\n } @else if (isLoading()) {\n <option value=\"\" disabled selected>Loading options from database...</option>\n } @else if (loadError()) {\n <option value=\"\" disabled selected>Error: {{ loadError() }}</option>\n } @else if (isDynamicSource() && hasLoaded() && allOptions().length === 0) {\n <option value=\"\" disabled selected>-- No records found (check parameters) --</option>\n } @else if (placeholder()) {\n <option value=\"\" [disabled]=\"config().validation?.required\">{{ placeholder() }}</option>\n }\n @for (opt of renderedOptions(); track opt.key) {\n <option [ngValue]=\"opt.key\">{{ opt.label }}</option>\n }\n @if (hasExcessOptions()) {\n <option value=\"\" disabled>... and {{ excessOptionsCount() }} more records (refine filter) ...</option>\n }\n </select>\n <div class=\"rpt-select-arrow\" aria-hidden=\"true\">\n <svg width=\"12\" height=\"8\" viewBox=\"0 0 12 8\" fill=\"none\">\n <path d=\"M1 1.5L6 6.5L11 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </div>\n </div>\n }\n\n @if (showStatus() && isDynamicSource() && statusText()) {\n <div class=\"rpt-status-badge\" [attr.data-status]=\"statusKind()\">\n @switch (statusKind()) {\n @case ('loading') {\n <span class=\"status-dot dot-pulse\"></span>\n <span>Loading from database\u2026</span>\n }\n @case ('ok') {\n <span class=\"status-dot dot-ok\"></span>\n <span>{{ dynamicOptions().length }} records loaded</span>\n }\n @case ('waiting') {\n <span class=\"status-dot dot-warn\"></span>\n <span>Waiting for:</span>\n <div class=\"waiting-tokens\">\n @for (k of waitingFor(); track k) {\n <span class=\"waiting-token\">{{ k }}</span>\n }\n </div>\n }\n @case ('error') {\n <span class=\"status-dot dot-err\"></span>\n <span>{{ loadError() }}</span>\n <button type=\"button\" class=\"rpt-badge-retry-btn\" (click)=\"retryLookup($event)\">\u21BB Retry</button>\n }\n @case ('empty') {\n <span class=\"status-dot\"></span>\n <span>No records found for parameters</span>\n }\n @default {\n <span class=\"status-dot\"></span>\n }\n }\n </div>\n }\n\n @if (errorMessage()) {\n <span class=\"rpt-error-text\">{{ errorMessage() }}</span>\n }\n </div>", styles: [":host{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;font-family:var(--rpt-font-family, inherit);position:relative}.rpt-status-badge{display:flex;flex-wrap:wrap;align-items:center;gap:4px;font-size:.6875rem;padding:3px 6px;border-radius:4px;margin-top:4px;font-weight:500;line-height:1.3;max-width:100%;box-sizing:border-box;overflow:hidden;word-break:break-word}.rpt-status-badge>span{overflow-wrap:anywhere;word-break:break-word}.rpt-status-badge[data-status=loading]{background:#eff6ff;color:#2563eb;border:1px solid #dbeafe}.rpt-status-badge[data-status=ok]{background:#f0fdf4;color:#16a34a;border:1px solid #dcfce7}.rpt-status-badge[data-status=waiting]{background:#fffbeb;color:#d97706;border:1px solid #fef3c7}.rpt-status-badge[data-status=error]{background:#fef2f2;color:#dc2626;border:1px solid #fee2e2}.rpt-status-badge[data-status=empty]{background:#f8fafc;color:#64748b;border:1px solid #e2e8f0}.waiting-tokens{display:inline-flex;flex-wrap:wrap;align-items:center;gap:3px;margin-left:2px;max-width:100%}.waiting-token{background:#b453091f;border:1px solid rgba(180,83,9,.3);padding:1px 5px;border-radius:3px;font-weight:700;font-size:.625rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;box-sizing:border-box}.status-dot{width:6px;height:6px;border-radius:50%;background:currentColor}.dot-pulse{animation:rpt-pulse 1s infinite alternate}@keyframes rpt-pulse{0%{opacity:.3}to{opacity:1}}.rpt-field-group{display:flex;flex-direction:column;max-width:100%;min-width:0;gap:4px;box-sizing:border-box;position:relative}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-select-wrapper{position:relative;width:100%;flex:1;min-height:0;display:flex;align-items:center}.rpt-select{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 36px 6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);appearance:none;-webkit-appearance:none;outline:none;cursor:pointer;transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-select:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-select:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-select:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-select.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-select.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-select-arrow{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--rpt-color-text-muted, #64748b);display:flex;align-items:center}.rpt-combobox-wrapper{position:relative;width:100%;flex:1;min-height:0}.rpt-combobox-trigger{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 10px 6px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--rpt-font-size-base, .875rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);outline:none;cursor:pointer;text-align:left;transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-combobox-trigger:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-combobox-trigger:focus-visible,.rpt-combobox-trigger.is-open{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-combobox-trigger:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-combobox-trigger.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-combobox-trigger.rpt-invalid:focus-visible{box-shadow:0 0 0 3px #ef444440}.trigger-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3}.trigger-label.is-placeholder{color:var(--rpt-color-text-muted, #94a3b8)}.trigger-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.trigger-clear-btn{display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:.6875rem;color:var(--rpt-color-text-muted, #64748b);background-color:#f1f5f9;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .15s ease,color .15s ease}.trigger-clear-btn:hover{background-color:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.trigger-arrow{display:flex;align-items:center;color:var(--rpt-color-text-muted, #64748b);transition:transform .18s ease}.trigger-arrow.rotated{transform:rotate(180deg)}.rpt-combobox-menu{width:100%;min-width:0;max-width:100vw;box-sizing:border-box;background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);box-shadow:0 10px 25px -5px #00000024,0 8px 10px -6px #00000014;overflow:hidden;display:flex;flex-direction:column;animation:rpt-dropdown-pop .12s cubic-bezier(0,0,.2,1)}.rpt-combobox-menu.opens-above{box-shadow:0 -10px 25px -5px #00000024,0 -8px 10px -6px #00000014;animation:rpt-dropdown-pop-above .12s cubic-bezier(0,0,.2,1)}@keyframes rpt-dropdown-pop{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes rpt-dropdown-pop-above{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.combobox-search-box{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--rpt-color-border, #e2e8f0);background-color:#f8fafc}.combobox-search-icon{color:var(--rpt-color-text-muted, #94a3b8);display:flex;align-items:center;flex-shrink:0}.combobox-search-input{flex:1;border:none;outline:none;background:transparent;font-size:var(--rpt-font-size-sm, .8125rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);min-width:0}.combobox-search-input::placeholder{color:#94a3b8}.combobox-search-clear{border:none;background:#e2e8f0;color:#64748b;width:16px;height:16px;border-radius:50%;font-size:.625rem;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}.combobox-search-clear:hover{background:#cbd5e1;color:#0f172a}.combobox-options-list{max-height:220px;overflow-y:auto;overscroll-behavior:contain;padding:4px}.combobox-option-item{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;border-radius:4px;font-size:var(--rpt-font-size-base, .84rem);color:var(--rpt-color-text, #0f172a);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .1s ease}.combobox-option-item.is-focused{background-color:var(--rpt-color-surface-hover, #f1f5f9)}.combobox-option-item.is-selected{background-color:#eff6ff;color:var(--rpt-color-primary, #2563eb);font-weight:600}.opt-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.opt-check{font-size:.875rem;font-weight:700;color:var(--rpt-color-primary, #2563eb);margin-left:8px}.combobox-status-row{padding:10px 12px;font-size:.78rem;text-align:center;color:var(--rpt-color-text-muted, #64748b)}.combobox-status-row.loading{display:flex;align-items:center;justify-content:center;gap:6px;color:#2563eb}.combobox-status-row.error{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--rpt-color-danger, #dc2626)}.trigger-retry-btn,.combobox-retry-btn,.rpt-badge-retry-btn{display:inline-flex;align-items:center;gap:3px;font-size:.6875rem;font-weight:600;color:#dc2626;background:#fee2e2;border:1px solid #fca5a5;border-radius:4px;padding:2px 7px;cursor:pointer;line-height:1.2;transition:background-color .12s ease,color .12s ease}.trigger-retry-btn:hover,.combobox-retry-btn:hover,.rpt-badge-retry-btn:hover{background:#fecaca;color:#b91c1c;border-color:#f87171}.combobox-status-row.hint{font-size:.72rem;color:#64748b;border-top:1px dashed #cbd5e1;margin-top:4px;padding:6px 10px;background-color:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;bottom:0;z-index:2;box-shadow:0 -2px 6px #0000000a}.combobox-load-all-btn{background:#eff6ff;border:1px solid #bfdbfe;color:#2563eb;font-size:.6875rem;font-weight:600;padding:3px 8px;border-radius:4px;cursor:pointer;white-space:nowrap;flex-shrink:0;transition:all .12s ease}.combobox-load-all-btn:hover{background:#2563eb;color:#fff;border-color:#2563eb}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
4244
4286
|
}], ctorParameters: () => [], propDecorators: { onDocumentClick: [{
|
|
4245
4287
|
type: HostListener,
|
|
4246
4288
|
args: ['document:click', ['$event']]
|
|
@@ -4249,739 +4291,119 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
4249
4291
|
args: ['document:keydown.escape']
|
|
4250
4292
|
}] } });
|
|
4251
4293
|
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
if (!errors)
|
|
4272
|
-
return '';
|
|
4273
|
-
const firstKey = Object.keys(errors)[0];
|
|
4274
|
-
return getValidationMessage(this.config().validation, firstKey);
|
|
4294
|
+
/**
|
|
4295
|
+
* Enterprise SVG Icon component for BWays-Report.
|
|
4296
|
+
* Provides crisp, scalable vector icons without external font dependencies.
|
|
4297
|
+
*/
|
|
4298
|
+
class RptIconComponent {
|
|
4299
|
+
/** Icon name (e.g. 'search', 'edit', 'save', 'kpi', 'chart-bar', 'trend-up') */
|
|
4300
|
+
name = input.required();
|
|
4301
|
+
/** Icon dimension in pixels. Defaults to 16. */
|
|
4302
|
+
size = input(16);
|
|
4303
|
+
/** Stroke/fill color. Defaults to 'currentColor'. */
|
|
4304
|
+
color = input('currentColor');
|
|
4305
|
+
/** Stroke width for line-based icons. Defaults to 2. */
|
|
4306
|
+
strokeWidth = input(2);
|
|
4307
|
+
viewBox = computed(() => '0 0 24 24');
|
|
4308
|
+
stroke = computed(() => 'currentColor');
|
|
4309
|
+
fill = computed(() => 'none');
|
|
4310
|
+
iconData = computed(() => {
|
|
4311
|
+
const n = this.name()?.toLowerCase().trim() || 'box';
|
|
4312
|
+
return ICON_REGISTRY[n] || ICON_REGISTRY['box'] || { paths: [] };
|
|
4275
4313
|
});
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
/>
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4314
|
+
paths = computed(() => this.iconData().paths || []);
|
|
4315
|
+
circles = computed(() => this.iconData().circles || []);
|
|
4316
|
+
rects = computed(() => this.iconData().rects || []);
|
|
4317
|
+
lines = computed(() => this.iconData().lines || []);
|
|
4318
|
+
polylines = computed(() => this.iconData().polylines || []);
|
|
4319
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4320
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptIconComponent, isStandalone: true, selector: "rpt-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
4321
|
+
<svg
|
|
4322
|
+
class="rpt-svg-icon"
|
|
4323
|
+
[attr.width]="size()"
|
|
4324
|
+
[attr.height]="size()"
|
|
4325
|
+
[attr.viewBox]="viewBox()"
|
|
4326
|
+
[attr.stroke]="stroke()"
|
|
4327
|
+
[attr.fill]="fill()"
|
|
4328
|
+
[attr.stroke-width]="strokeWidth()"
|
|
4329
|
+
stroke-linecap="round"
|
|
4330
|
+
stroke-linejoin="round"
|
|
4331
|
+
[style.color]="color()"
|
|
4332
|
+
aria-hidden="true"
|
|
4333
|
+
>
|
|
4334
|
+
@for (d of paths(); track d) {
|
|
4335
|
+
<path [attr.d]="d" />
|
|
4336
|
+
}
|
|
4337
|
+
@for (c of circles(); track c.cx + '-' + c.cy) {
|
|
4338
|
+
<circle [attr.cx]="c.cx" [attr.cy]="c.cy" [attr.r]="c.r" />
|
|
4339
|
+
}
|
|
4340
|
+
@for (r of rects(); track r.x + '-' + r.y) {
|
|
4341
|
+
<rect
|
|
4342
|
+
[attr.x]="r.x"
|
|
4343
|
+
[attr.y]="r.y"
|
|
4344
|
+
[attr.width]="r.width"
|
|
4345
|
+
[attr.height]="r.height"
|
|
4346
|
+
[attr.rx]="r.rx || 0"
|
|
4347
|
+
/>
|
|
4348
|
+
}
|
|
4349
|
+
@for (l of lines(); track l.x1 + '-' + l.y1) {
|
|
4350
|
+
<line
|
|
4351
|
+
[attr.x1]="l.x1"
|
|
4352
|
+
[attr.y1]="l.y1"
|
|
4353
|
+
[attr.x2]="l.x2"
|
|
4354
|
+
[attr.y2]="l.y2"
|
|
4355
|
+
/>
|
|
4356
|
+
}
|
|
4357
|
+
@for (p of polylines(); track p) {
|
|
4358
|
+
<polyline [attr.points]="p" />
|
|
4359
|
+
}
|
|
4360
|
+
</svg>
|
|
4361
|
+
`, isInline: true, styles: [":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1}.rpt-svg-icon{display:inline-block;flex-shrink:0;color:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4305
4362
|
}
|
|
4306
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type:
|
|
4363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptIconComponent, decorators: [{
|
|
4307
4364
|
type: Component,
|
|
4308
|
-
args: [{ selector: 'rpt-
|
|
4309
|
-
<
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4365
|
+
args: [{ selector: 'rpt-icon', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
4366
|
+
<svg
|
|
4367
|
+
class="rpt-svg-icon"
|
|
4368
|
+
[attr.width]="size()"
|
|
4369
|
+
[attr.height]="size()"
|
|
4370
|
+
[attr.viewBox]="viewBox()"
|
|
4371
|
+
[attr.stroke]="stroke()"
|
|
4372
|
+
[attr.fill]="fill()"
|
|
4373
|
+
[attr.stroke-width]="strokeWidth()"
|
|
4374
|
+
stroke-linecap="round"
|
|
4375
|
+
stroke-linejoin="round"
|
|
4376
|
+
[style.color]="color()"
|
|
4377
|
+
aria-hidden="true"
|
|
4378
|
+
>
|
|
4379
|
+
@for (d of paths(); track d) {
|
|
4380
|
+
<path [attr.d]="d" />
|
|
4317
4381
|
}
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
[
|
|
4324
|
-
[
|
|
4325
|
-
[
|
|
4326
|
-
[
|
|
4327
|
-
|
|
4382
|
+
@for (c of circles(); track c.cx + '-' + c.cy) {
|
|
4383
|
+
<circle [attr.cx]="c.cx" [attr.cy]="c.cy" [attr.r]="c.r" />
|
|
4384
|
+
}
|
|
4385
|
+
@for (r of rects(); track r.x + '-' + r.y) {
|
|
4386
|
+
<rect
|
|
4387
|
+
[attr.x]="r.x"
|
|
4388
|
+
[attr.y]="r.y"
|
|
4389
|
+
[attr.width]="r.width"
|
|
4390
|
+
[attr.height]="r.height"
|
|
4391
|
+
[attr.rx]="r.rx || 0"
|
|
4328
4392
|
/>
|
|
4329
|
-
</div>
|
|
4330
|
-
|
|
4331
|
-
@if (errorMessage()) {
|
|
4332
|
-
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
4333
4393
|
}
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
maxDate = computed(() => this.config().properties?.['maxDate'] || null);
|
|
4348
|
-
showPresets = computed(() => this.config().properties?.['showPresets'] !== false);
|
|
4349
|
-
presets = [
|
|
4350
|
-
{ id: 'today', label: 'Today' },
|
|
4351
|
-
{ id: 'yesterday', label: 'Yesterday' },
|
|
4352
|
-
{ id: 'thisWeek', label: 'This Week' },
|
|
4353
|
-
{ id: 'thisMonth', label: 'This Month' },
|
|
4354
|
-
{ id: 'lastMonth', label: 'Last Month' },
|
|
4355
|
-
{ id: 'thisQuarter', label: 'This Quarter' },
|
|
4356
|
-
{ id: 'ytd', label: 'YTD' },
|
|
4357
|
-
];
|
|
4358
|
-
fromDate = signal('');
|
|
4359
|
-
toDate = signal('');
|
|
4360
|
-
activePreset = signal('custom');
|
|
4361
|
-
hasValue = computed(() => !!(this.fromDate() || this.toDate()));
|
|
4362
|
-
rangeError = computed(() => {
|
|
4363
|
-
const f = this.fromDate();
|
|
4364
|
-
const t = this.toDate();
|
|
4365
|
-
if (f && t && f > t) {
|
|
4366
|
-
return `'From' date cannot be after 'To' date`;
|
|
4367
|
-
}
|
|
4368
|
-
return '';
|
|
4369
|
-
});
|
|
4370
|
-
isInvalid = computed(() => {
|
|
4371
|
-
const ctrl = this.formControl();
|
|
4372
|
-
return (ctrl.invalid && (ctrl.dirty || ctrl.touched)) || !!this.rangeError();
|
|
4373
|
-
});
|
|
4374
|
-
errorMessage = computed(() => {
|
|
4375
|
-
const ctrl = this.formControl();
|
|
4376
|
-
if (!ctrl.invalid || (!ctrl.dirty && !ctrl.touched)) {
|
|
4377
|
-
return '';
|
|
4378
|
-
}
|
|
4379
|
-
const errors = ctrl.errors;
|
|
4380
|
-
if (!errors)
|
|
4381
|
-
return '';
|
|
4382
|
-
const firstKey = Object.keys(errors)[0];
|
|
4383
|
-
return getValidationMessage(this.config().validation, firstKey);
|
|
4384
|
-
});
|
|
4385
|
-
controlSub;
|
|
4386
|
-
constructor() {
|
|
4387
|
-
effect(() => {
|
|
4388
|
-
const ctrl = this.formControl();
|
|
4389
|
-
untracked(() => this.syncControlValue(ctrl.value));
|
|
4390
|
-
this.controlSub?.unsubscribe();
|
|
4391
|
-
this.controlSub = ctrl.valueChanges.subscribe((v) => this.syncControlValue(v));
|
|
4392
|
-
}, { allowSignalWrites: true });
|
|
4393
|
-
}
|
|
4394
|
-
ngOnInit() {
|
|
4395
|
-
const defaultPreset = this.config().properties?.['defaultPreset'];
|
|
4396
|
-
if (defaultPreset && !this.formControl().value) {
|
|
4397
|
-
this.applyPreset(defaultPreset);
|
|
4398
|
-
}
|
|
4399
|
-
}
|
|
4400
|
-
ngOnDestroy() {
|
|
4401
|
-
this.controlSub?.unsubscribe();
|
|
4402
|
-
}
|
|
4403
|
-
syncControlValue(val) {
|
|
4404
|
-
if (val && typeof val === 'object' && 'from' in val) {
|
|
4405
|
-
const drv = val;
|
|
4406
|
-
this.fromDate.set(drv.from || '');
|
|
4407
|
-
this.toDate.set(drv.to || '');
|
|
4408
|
-
if (drv.preset) {
|
|
4409
|
-
this.activePreset.set(drv.preset);
|
|
4410
|
-
}
|
|
4411
|
-
}
|
|
4412
|
-
else if (typeof val === 'string' && val.includes(',')) {
|
|
4413
|
-
const [f, t] = val.split(',');
|
|
4414
|
-
this.fromDate.set(f?.trim() || '');
|
|
4415
|
-
this.toDate.set(t?.trim() || '');
|
|
4416
|
-
}
|
|
4417
|
-
else if (!val) {
|
|
4418
|
-
this.fromDate.set('');
|
|
4419
|
-
this.toDate.set('');
|
|
4420
|
-
this.activePreset.set('custom');
|
|
4421
|
-
}
|
|
4422
|
-
}
|
|
4423
|
-
applyPreset(presetId) {
|
|
4424
|
-
const now = new Date();
|
|
4425
|
-
let from = '';
|
|
4426
|
-
let to = '';
|
|
4427
|
-
switch (presetId) {
|
|
4428
|
-
case 'today':
|
|
4429
|
-
from = formatYMD(now);
|
|
4430
|
-
to = formatYMD(now);
|
|
4431
|
-
break;
|
|
4432
|
-
case 'yesterday': {
|
|
4433
|
-
const y = new Date(now);
|
|
4434
|
-
y.setDate(y.getDate() - 1);
|
|
4435
|
-
from = formatYMD(y);
|
|
4436
|
-
to = formatYMD(y);
|
|
4437
|
-
break;
|
|
4438
|
-
}
|
|
4439
|
-
case 'thisWeek': {
|
|
4440
|
-
const day = now.getDay();
|
|
4441
|
-
const diff = now.getDate() - day + (day === 0 ? -6 : 1); // Monday
|
|
4442
|
-
const monday = new Date(now);
|
|
4443
|
-
monday.setDate(diff);
|
|
4444
|
-
from = formatYMD(monday);
|
|
4445
|
-
to = formatYMD(now);
|
|
4446
|
-
break;
|
|
4447
|
-
}
|
|
4448
|
-
case 'thisMonth':
|
|
4449
|
-
from = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-01`;
|
|
4450
|
-
to = formatYMD(new Date(now.getFullYear(), now.getMonth() + 1, 0));
|
|
4451
|
-
break;
|
|
4452
|
-
case 'lastMonth': {
|
|
4453
|
-
const lastMonthEnd = new Date(now.getFullYear(), now.getMonth(), 0);
|
|
4454
|
-
from = `${lastMonthEnd.getFullYear()}-${pad(lastMonthEnd.getMonth() + 1)}-01`;
|
|
4455
|
-
to = formatYMD(lastMonthEnd);
|
|
4456
|
-
break;
|
|
4457
|
-
}
|
|
4458
|
-
case 'thisQuarter': {
|
|
4459
|
-
const currentQuarter = Math.floor(now.getMonth() / 3);
|
|
4460
|
-
const startMonth = currentQuarter * 3;
|
|
4461
|
-
const endMonth = startMonth + 2;
|
|
4462
|
-
from = `${now.getFullYear()}-${pad(startMonth + 1)}-01`;
|
|
4463
|
-
to = formatYMD(new Date(now.getFullYear(), endMonth + 1, 0));
|
|
4464
|
-
break;
|
|
4465
|
-
}
|
|
4466
|
-
case 'ytd':
|
|
4467
|
-
from = `${now.getFullYear()}-01-01`;
|
|
4468
|
-
to = formatYMD(now);
|
|
4469
|
-
break;
|
|
4470
|
-
default:
|
|
4471
|
-
return;
|
|
4472
|
-
}
|
|
4473
|
-
this.fromDate.set(from);
|
|
4474
|
-
this.toDate.set(to);
|
|
4475
|
-
this.activePreset.set(presetId);
|
|
4476
|
-
this.emitRangeChange({ from, to, preset: presetId });
|
|
4477
|
-
}
|
|
4478
|
-
onFromChange(event) {
|
|
4479
|
-
const from = event.target.value;
|
|
4480
|
-
this.fromDate.set(from);
|
|
4481
|
-
this.activePreset.set('custom');
|
|
4482
|
-
this.emitRangeChange({ from, to: this.toDate(), preset: 'custom' });
|
|
4483
|
-
}
|
|
4484
|
-
onToChange(event) {
|
|
4485
|
-
const to = event.target.value;
|
|
4486
|
-
this.toDate.set(to);
|
|
4487
|
-
this.activePreset.set('custom');
|
|
4488
|
-
this.emitRangeChange({ from: this.fromDate(), to, preset: 'custom' });
|
|
4489
|
-
}
|
|
4490
|
-
clearRange(event) {
|
|
4491
|
-
event.stopPropagation();
|
|
4492
|
-
this.fromDate.set('');
|
|
4493
|
-
this.toDate.set('');
|
|
4494
|
-
this.activePreset.set('custom');
|
|
4495
|
-
this.formControl().setValue(null);
|
|
4496
|
-
this.formControl().markAsDirty();
|
|
4497
|
-
this.formControl().markAsTouched();
|
|
4498
|
-
}
|
|
4499
|
-
emitRangeChange(range) {
|
|
4500
|
-
this.formControl().setValue(range);
|
|
4501
|
-
this.formControl().markAsDirty();
|
|
4502
|
-
this.formControl().markAsTouched();
|
|
4503
|
-
}
|
|
4504
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4505
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptDateRangeComponent, isStandalone: true, selector: "rpt-date-range", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
4506
|
-
<div class="rpt-field-group">
|
|
4507
|
-
<!-- Header with Label & Preset Bar -->
|
|
4508
|
-
<div class="rpt-label-row">
|
|
4509
|
-
@if (config().label) {
|
|
4510
|
-
<label [for]="elementId() + '_from'" class="rpt-label">
|
|
4511
|
-
{{ config().label }}
|
|
4512
|
-
@if (config().validation?.required) {
|
|
4513
|
-
<span class="rpt-required-marker">*</span>
|
|
4514
|
-
}
|
|
4515
|
-
</label>
|
|
4516
|
-
}
|
|
4517
|
-
|
|
4518
|
-
@if (showPresets()) {
|
|
4519
|
-
<div class="rpt-preset-pills" role="toolbar" aria-label="Date presets">
|
|
4520
|
-
@for (p of presets; track p.id) {
|
|
4521
|
-
<button
|
|
4522
|
-
type="button"
|
|
4523
|
-
class="rpt-preset-pill"
|
|
4524
|
-
[class.is-active]="activePreset() === p.id"
|
|
4525
|
-
[disabled]="formControl().disabled"
|
|
4526
|
-
(click)="applyPreset(p.id)"
|
|
4527
|
-
>
|
|
4528
|
-
{{ p.label }}
|
|
4529
|
-
</button>
|
|
4530
|
-
}
|
|
4531
|
-
</div>
|
|
4532
|
-
}
|
|
4533
|
-
</div>
|
|
4534
|
-
|
|
4535
|
-
<!-- Date Inputs Container -->
|
|
4536
|
-
<div class="rpt-date-range-container" [class.rpt-invalid]="isInvalid()">
|
|
4537
|
-
<!-- From Field -->
|
|
4538
|
-
<div class="rpt-date-subfield">
|
|
4539
|
-
<span class="rpt-date-prefix">From</span>
|
|
4540
|
-
<input
|
|
4541
|
-
[id]="elementId() + '_from'"
|
|
4542
|
-
type="date"
|
|
4543
|
-
class="rpt-date-input"
|
|
4544
|
-
[value]="fromDate()"
|
|
4545
|
-
[disabled]="formControl().disabled"
|
|
4546
|
-
[min]="minDate()"
|
|
4547
|
-
[max]="maxDate()"
|
|
4548
|
-
(input)="onFromChange($event)"
|
|
4549
|
-
/>
|
|
4550
|
-
</div>
|
|
4551
|
-
|
|
4552
|
-
<span class="rpt-range-separator" aria-hidden="true">→</span>
|
|
4553
|
-
|
|
4554
|
-
<!-- To Field -->
|
|
4555
|
-
<div class="rpt-date-subfield">
|
|
4556
|
-
<span class="rpt-date-prefix">To</span>
|
|
4557
|
-
<input
|
|
4558
|
-
[id]="elementId() + '_to'"
|
|
4559
|
-
type="date"
|
|
4560
|
-
class="rpt-date-input"
|
|
4561
|
-
[value]="toDate()"
|
|
4562
|
-
[disabled]="formControl().disabled"
|
|
4563
|
-
[min]="fromDate() || minDate()"
|
|
4564
|
-
[max]="maxDate()"
|
|
4565
|
-
(input)="onToChange($event)"
|
|
4566
|
-
/>
|
|
4567
|
-
</div>
|
|
4568
|
-
|
|
4569
|
-
<!-- Quick Clear Button -->
|
|
4570
|
-
@if (hasValue() && !formControl().disabled) {
|
|
4571
|
-
<button
|
|
4572
|
-
type="button"
|
|
4573
|
-
class="rpt-range-clear-btn"
|
|
4574
|
-
title="Clear date range"
|
|
4575
|
-
aria-label="Clear date range"
|
|
4576
|
-
(click)="clearRange($event)"
|
|
4577
|
-
>
|
|
4578
|
-
✕
|
|
4579
|
-
</button>
|
|
4580
|
-
}
|
|
4581
|
-
</div>
|
|
4582
|
-
|
|
4583
|
-
@if (rangeError()) {
|
|
4584
|
-
<span class="rpt-error-text">{{ rangeError() }}</span>
|
|
4585
|
-
} @else if (errorMessage()) {
|
|
4586
|
-
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
4587
|
-
}
|
|
4588
|
-
</div>
|
|
4589
|
-
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:5px;box-sizing:border-box}.rpt-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-preset-pills{display:inline-flex;align-items:center;gap:3px;flex-wrap:wrap}.rpt-preset-pill{border:1px solid var(--rpt-color-border, #cbd5e1);background:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);font-size:.6875rem;font-weight:500;padding:1px 7px;border-radius:12px;cursor:pointer;line-height:1.4;transition:all .12s ease}.rpt-preset-pill:hover:not(:disabled){border-color:var(--rpt-color-primary, #2563eb);color:var(--rpt-color-primary, #2563eb);background:#eff6ff}.rpt-preset-pill.is-active{background:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);color:#fff;font-weight:600}.rpt-preset-pill:disabled{cursor:not-allowed;opacity:.5}.rpt-date-range-container{display:flex;align-items:center;gap:8px;width:100%;flex:1;min-height:38px;box-sizing:border-box;padding:3px 8px;background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-date-range-container:focus-within{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-date-range-container.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-date-subfield{display:flex;align-items:center;gap:6px;flex:1;min-width:0}.rpt-date-prefix{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--rpt-color-text-muted, #94a3b8);-webkit-user-select:none;user-select:none}.rpt-date-input{width:100%;border:none;outline:none;background:transparent;font-size:var(--rpt-font-size-base, .84rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);min-width:0;padding:4px 0}.rpt-date-input:disabled{color:var(--rpt-color-text-muted, #94a3b8);cursor:not-allowed}.rpt-range-separator{color:var(--rpt-color-text-muted, #94a3b8);font-size:.8125rem;-webkit-user-select:none;user-select:none;padding:0 2px}.rpt-range-clear-btn{border:none;background:#f1f5f9;color:var(--rpt-color-text-muted, #64748b);width:18px;height:18px;border-radius:50%;font-size:.6875rem;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;transition:background-color .15s ease,color .15s ease}.rpt-range-clear-btn:hover{background-color:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4590
|
-
}
|
|
4591
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptDateRangeComponent, decorators: [{
|
|
4592
|
-
type: Component,
|
|
4593
|
-
args: [{ selector: 'rpt-date-range', standalone: true, imports: [ReactiveFormsModule], template: `
|
|
4594
|
-
<div class="rpt-field-group">
|
|
4595
|
-
<!-- Header with Label & Preset Bar -->
|
|
4596
|
-
<div class="rpt-label-row">
|
|
4597
|
-
@if (config().label) {
|
|
4598
|
-
<label [for]="elementId() + '_from'" class="rpt-label">
|
|
4599
|
-
{{ config().label }}
|
|
4600
|
-
@if (config().validation?.required) {
|
|
4601
|
-
<span class="rpt-required-marker">*</span>
|
|
4602
|
-
}
|
|
4603
|
-
</label>
|
|
4604
|
-
}
|
|
4605
|
-
|
|
4606
|
-
@if (showPresets()) {
|
|
4607
|
-
<div class="rpt-preset-pills" role="toolbar" aria-label="Date presets">
|
|
4608
|
-
@for (p of presets; track p.id) {
|
|
4609
|
-
<button
|
|
4610
|
-
type="button"
|
|
4611
|
-
class="rpt-preset-pill"
|
|
4612
|
-
[class.is-active]="activePreset() === p.id"
|
|
4613
|
-
[disabled]="formControl().disabled"
|
|
4614
|
-
(click)="applyPreset(p.id)"
|
|
4615
|
-
>
|
|
4616
|
-
{{ p.label }}
|
|
4617
|
-
</button>
|
|
4618
|
-
}
|
|
4619
|
-
</div>
|
|
4620
|
-
}
|
|
4621
|
-
</div>
|
|
4622
|
-
|
|
4623
|
-
<!-- Date Inputs Container -->
|
|
4624
|
-
<div class="rpt-date-range-container" [class.rpt-invalid]="isInvalid()">
|
|
4625
|
-
<!-- From Field -->
|
|
4626
|
-
<div class="rpt-date-subfield">
|
|
4627
|
-
<span class="rpt-date-prefix">From</span>
|
|
4628
|
-
<input
|
|
4629
|
-
[id]="elementId() + '_from'"
|
|
4630
|
-
type="date"
|
|
4631
|
-
class="rpt-date-input"
|
|
4632
|
-
[value]="fromDate()"
|
|
4633
|
-
[disabled]="formControl().disabled"
|
|
4634
|
-
[min]="minDate()"
|
|
4635
|
-
[max]="maxDate()"
|
|
4636
|
-
(input)="onFromChange($event)"
|
|
4637
|
-
/>
|
|
4638
|
-
</div>
|
|
4639
|
-
|
|
4640
|
-
<span class="rpt-range-separator" aria-hidden="true">→</span>
|
|
4641
|
-
|
|
4642
|
-
<!-- To Field -->
|
|
4643
|
-
<div class="rpt-date-subfield">
|
|
4644
|
-
<span class="rpt-date-prefix">To</span>
|
|
4645
|
-
<input
|
|
4646
|
-
[id]="elementId() + '_to'"
|
|
4647
|
-
type="date"
|
|
4648
|
-
class="rpt-date-input"
|
|
4649
|
-
[value]="toDate()"
|
|
4650
|
-
[disabled]="formControl().disabled"
|
|
4651
|
-
[min]="fromDate() || minDate()"
|
|
4652
|
-
[max]="maxDate()"
|
|
4653
|
-
(input)="onToChange($event)"
|
|
4654
|
-
/>
|
|
4655
|
-
</div>
|
|
4656
|
-
|
|
4657
|
-
<!-- Quick Clear Button -->
|
|
4658
|
-
@if (hasValue() && !formControl().disabled) {
|
|
4659
|
-
<button
|
|
4660
|
-
type="button"
|
|
4661
|
-
class="rpt-range-clear-btn"
|
|
4662
|
-
title="Clear date range"
|
|
4663
|
-
aria-label="Clear date range"
|
|
4664
|
-
(click)="clearRange($event)"
|
|
4665
|
-
>
|
|
4666
|
-
✕
|
|
4667
|
-
</button>
|
|
4668
|
-
}
|
|
4669
|
-
</div>
|
|
4670
|
-
|
|
4671
|
-
@if (rangeError()) {
|
|
4672
|
-
<span class="rpt-error-text">{{ rangeError() }}</span>
|
|
4673
|
-
} @else if (errorMessage()) {
|
|
4674
|
-
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
4675
|
-
}
|
|
4676
|
-
</div>
|
|
4677
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:5px;box-sizing:border-box}.rpt-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-preset-pills{display:inline-flex;align-items:center;gap:3px;flex-wrap:wrap}.rpt-preset-pill{border:1px solid var(--rpt-color-border, #cbd5e1);background:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);font-size:.6875rem;font-weight:500;padding:1px 7px;border-radius:12px;cursor:pointer;line-height:1.4;transition:all .12s ease}.rpt-preset-pill:hover:not(:disabled){border-color:var(--rpt-color-primary, #2563eb);color:var(--rpt-color-primary, #2563eb);background:#eff6ff}.rpt-preset-pill.is-active{background:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);color:#fff;font-weight:600}.rpt-preset-pill:disabled{cursor:not-allowed;opacity:.5}.rpt-date-range-container{display:flex;align-items:center;gap:8px;width:100%;flex:1;min-height:38px;box-sizing:border-box;padding:3px 8px;background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-date-range-container:focus-within{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-date-range-container.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-date-subfield{display:flex;align-items:center;gap:6px;flex:1;min-width:0}.rpt-date-prefix{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--rpt-color-text-muted, #94a3b8);-webkit-user-select:none;user-select:none}.rpt-date-input{width:100%;border:none;outline:none;background:transparent;font-size:var(--rpt-font-size-base, .84rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);min-width:0;padding:4px 0}.rpt-date-input:disabled{color:var(--rpt-color-text-muted, #94a3b8);cursor:not-allowed}.rpt-range-separator{color:var(--rpt-color-text-muted, #94a3b8);font-size:.8125rem;-webkit-user-select:none;user-select:none;padding:0 2px}.rpt-range-clear-btn{border:none;background:#f1f5f9;color:var(--rpt-color-text-muted, #64748b);width:18px;height:18px;border-radius:50%;font-size:.6875rem;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;transition:background-color .15s ease,color .15s ease}.rpt-range-clear-btn:hover{background-color:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
4678
|
-
}], ctorParameters: () => [] });
|
|
4679
|
-
|
|
4680
|
-
class RptNumberComponent {
|
|
4681
|
-
config = input.required();
|
|
4682
|
-
control = input();
|
|
4683
|
-
fallbackControl = new FormControl(null);
|
|
4684
|
-
formControl = computed(() => this.control() ?? this.fallbackControl);
|
|
4685
|
-
elementId = computed(() => this.config().key || this.config().id);
|
|
4686
|
-
placeholder = computed(() => this.config().properties?.['placeholder'] || '');
|
|
4687
|
-
prefix = computed(() => this.config().properties?.['prefix'] || '');
|
|
4688
|
-
suffix = computed(() => this.config().properties?.['suffix'] || '');
|
|
4689
|
-
minVal = computed(() => this.config().validation?.min ?? this.config().properties?.['min'] ?? null);
|
|
4690
|
-
maxVal = computed(() => this.config().validation?.max ?? this.config().properties?.['max'] ?? null);
|
|
4691
|
-
stepVal = computed(() => this.config().properties?.['step'] ?? 1);
|
|
4692
|
-
isInvalid = computed(() => {
|
|
4693
|
-
const ctrl = this.formControl();
|
|
4694
|
-
return ctrl.invalid && (ctrl.dirty || ctrl.touched);
|
|
4695
|
-
});
|
|
4696
|
-
errorMessage = computed(() => {
|
|
4697
|
-
const ctrl = this.formControl();
|
|
4698
|
-
if (!ctrl.invalid || (!ctrl.dirty && !ctrl.touched)) {
|
|
4699
|
-
return '';
|
|
4700
|
-
}
|
|
4701
|
-
const errors = ctrl.errors;
|
|
4702
|
-
if (!errors)
|
|
4703
|
-
return '';
|
|
4704
|
-
const firstKey = Object.keys(errors)[0];
|
|
4705
|
-
return getValidationMessage(this.config().validation, firstKey);
|
|
4706
|
-
});
|
|
4707
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4708
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptNumberComponent, isStandalone: true, selector: "rpt-number", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
4709
|
-
<div class="rpt-field-group">
|
|
4710
|
-
@if (config().label) {
|
|
4711
|
-
<label [for]="elementId()" class="rpt-label">
|
|
4712
|
-
{{ config().label }}
|
|
4713
|
-
@if (config().validation?.required) {
|
|
4714
|
-
<span class="rpt-required-marker">*</span>
|
|
4715
|
-
}
|
|
4716
|
-
</label>
|
|
4717
|
-
}
|
|
4718
|
-
|
|
4719
|
-
<div class="rpt-input-wrapper" [class.has-prefix]="prefix()" [class.has-suffix]="suffix()">
|
|
4720
|
-
@if (prefix()) {
|
|
4721
|
-
<span class="rpt-affix rpt-prefix">{{ prefix() }}</span>
|
|
4722
|
-
}
|
|
4723
|
-
<input
|
|
4724
|
-
[id]="elementId()"
|
|
4725
|
-
type="number"
|
|
4726
|
-
(wheel)="$any($event.target).blur()"
|
|
4727
|
-
(keydown.arrowup)="$event.preventDefault()"
|
|
4728
|
-
(keydown.arrowdown)="$event.preventDefault()"
|
|
4729
|
-
[formControl]="formControl()"
|
|
4730
|
-
[min]="minVal()"
|
|
4731
|
-
[max]="maxVal()"
|
|
4732
|
-
[step]="stepVal()"
|
|
4733
|
-
[placeholder]="placeholder()"
|
|
4734
|
-
[class.rpt-invalid]="isInvalid()"
|
|
4735
|
-
class="rpt-number-input"
|
|
4736
|
-
/>
|
|
4737
|
-
@if (suffix()) {
|
|
4738
|
-
<span class="rpt-affix rpt-suffix">{{ suffix() }}</span>
|
|
4739
|
-
}
|
|
4740
|
-
</div>
|
|
4741
|
-
|
|
4742
|
-
@if (errorMessage()) {
|
|
4743
|
-
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
4744
|
-
}
|
|
4745
|
-
</div>
|
|
4746
|
-
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:4px;box-sizing:border-box}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-input-wrapper{position:relative;display:flex;align-items:stretch;width:100%;flex:1;min-height:0}.rpt-affix{font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);background-color:var(--rpt-color-surface, #f8fafc);padding:0 10px;height:100%;min-height:38px;display:flex;align-items:center;border:1px solid var(--rpt-color-border, #cbd5e1);-webkit-user-select:none;user-select:none;box-sizing:border-box}.rpt-prefix{border-right:none;border-top-left-radius:var(--rpt-border-radius, 6px);border-bottom-left-radius:var(--rpt-border-radius, 6px)}.rpt-suffix{border-left:none;border-top-right-radius:var(--rpt-border-radius, 6px);border-bottom-right-radius:var(--rpt-border-radius, 6px)}.rpt-number-input::-webkit-inner-spin-button,.rpt-number-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rpt-number-input{-moz-appearance:textfield;appearance:textfield;width:100%;box-sizing:border-box;height:100%;min-height:38px;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease;outline:none}.has-prefix .rpt-number-input{border-top-left-radius:0;border-bottom-left-radius:0}.has-suffix .rpt-number-input{border-top-right-radius:0;border-bottom-right-radius:0}.rpt-number-input:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-number-input:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-number-input:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-number-input.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-number-input.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4747
|
-
}
|
|
4748
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptNumberComponent, decorators: [{
|
|
4749
|
-
type: Component,
|
|
4750
|
-
args: [{ selector: 'rpt-number', standalone: true, imports: [ReactiveFormsModule], template: `
|
|
4751
|
-
<div class="rpt-field-group">
|
|
4752
|
-
@if (config().label) {
|
|
4753
|
-
<label [for]="elementId()" class="rpt-label">
|
|
4754
|
-
{{ config().label }}
|
|
4755
|
-
@if (config().validation?.required) {
|
|
4756
|
-
<span class="rpt-required-marker">*</span>
|
|
4757
|
-
}
|
|
4758
|
-
</label>
|
|
4759
|
-
}
|
|
4760
|
-
|
|
4761
|
-
<div class="rpt-input-wrapper" [class.has-prefix]="prefix()" [class.has-suffix]="suffix()">
|
|
4762
|
-
@if (prefix()) {
|
|
4763
|
-
<span class="rpt-affix rpt-prefix">{{ prefix() }}</span>
|
|
4764
|
-
}
|
|
4765
|
-
<input
|
|
4766
|
-
[id]="elementId()"
|
|
4767
|
-
type="number"
|
|
4768
|
-
(wheel)="$any($event.target).blur()"
|
|
4769
|
-
(keydown.arrowup)="$event.preventDefault()"
|
|
4770
|
-
(keydown.arrowdown)="$event.preventDefault()"
|
|
4771
|
-
[formControl]="formControl()"
|
|
4772
|
-
[min]="minVal()"
|
|
4773
|
-
[max]="maxVal()"
|
|
4774
|
-
[step]="stepVal()"
|
|
4775
|
-
[placeholder]="placeholder()"
|
|
4776
|
-
[class.rpt-invalid]="isInvalid()"
|
|
4777
|
-
class="rpt-number-input"
|
|
4778
|
-
/>
|
|
4779
|
-
@if (suffix()) {
|
|
4780
|
-
<span class="rpt-affix rpt-suffix">{{ suffix() }}</span>
|
|
4781
|
-
}
|
|
4782
|
-
</div>
|
|
4783
|
-
|
|
4784
|
-
@if (errorMessage()) {
|
|
4785
|
-
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
4786
|
-
}
|
|
4787
|
-
</div>
|
|
4788
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:4px;box-sizing:border-box}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-input-wrapper{position:relative;display:flex;align-items:stretch;width:100%;flex:1;min-height:0}.rpt-affix{font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);background-color:var(--rpt-color-surface, #f8fafc);padding:0 10px;height:100%;min-height:38px;display:flex;align-items:center;border:1px solid var(--rpt-color-border, #cbd5e1);-webkit-user-select:none;user-select:none;box-sizing:border-box}.rpt-prefix{border-right:none;border-top-left-radius:var(--rpt-border-radius, 6px);border-bottom-left-radius:var(--rpt-border-radius, 6px)}.rpt-suffix{border-left:none;border-top-right-radius:var(--rpt-border-radius, 6px);border-bottom-right-radius:var(--rpt-border-radius, 6px)}.rpt-number-input::-webkit-inner-spin-button,.rpt-number-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rpt-number-input{-moz-appearance:textfield;appearance:textfield;width:100%;box-sizing:border-box;height:100%;min-height:38px;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease;outline:none}.has-prefix .rpt-number-input{border-top-left-radius:0;border-bottom-left-radius:0}.has-suffix .rpt-number-input{border-top-right-radius:0;border-bottom-right-radius:0}.rpt-number-input:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-number-input:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-number-input:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-number-input.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-number-input.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
4789
|
-
}] });
|
|
4790
|
-
|
|
4791
|
-
class RptCheckboxComponent {
|
|
4792
|
-
config = input.required();
|
|
4793
|
-
control = input();
|
|
4794
|
-
fallbackControl = new FormControl(false);
|
|
4795
|
-
formControl = computed(() => this.control() ?? this.fallbackControl);
|
|
4796
|
-
elementId = computed(() => this.config().key || this.config().id);
|
|
4797
|
-
isInvalid = computed(() => {
|
|
4798
|
-
const ctrl = this.formControl();
|
|
4799
|
-
return ctrl.invalid && (ctrl.dirty || ctrl.touched);
|
|
4800
|
-
});
|
|
4801
|
-
errorMessage = computed(() => {
|
|
4802
|
-
const ctrl = this.formControl();
|
|
4803
|
-
if (!ctrl.invalid || (!ctrl.dirty && !ctrl.touched)) {
|
|
4804
|
-
return '';
|
|
4805
|
-
}
|
|
4806
|
-
const errors = ctrl.errors;
|
|
4807
|
-
if (!errors)
|
|
4808
|
-
return '';
|
|
4809
|
-
const firstKey = Object.keys(errors)[0];
|
|
4810
|
-
return getValidationMessage(this.config().validation, firstKey);
|
|
4811
|
-
});
|
|
4812
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4813
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptCheckboxComponent, isStandalone: true, selector: "rpt-checkbox", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
4814
|
-
<div class="rpt-checkbox-field">
|
|
4815
|
-
<label [for]="elementId()" class="rpt-checkbox-label">
|
|
4816
|
-
<input
|
|
4817
|
-
[id]="elementId()"
|
|
4818
|
-
type="checkbox"
|
|
4819
|
-
[formControl]="formControl()"
|
|
4820
|
-
class="rpt-checkbox-input"
|
|
4821
|
-
/>
|
|
4822
|
-
<span class="rpt-custom-checkbox" aria-hidden="true">
|
|
4823
|
-
<svg class="rpt-check-icon" width="12" height="10" viewBox="0 0 12 10" fill="none">
|
|
4824
|
-
<path d="M1 5L4.5 8.5L11 1.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4825
|
-
</svg>
|
|
4826
|
-
</span>
|
|
4827
|
-
<span class="rpt-checkbox-text">
|
|
4828
|
-
{{ config().label }}
|
|
4829
|
-
@if (config().validation?.required) {
|
|
4830
|
-
<span class="rpt-required-marker">*</span>
|
|
4831
|
-
}
|
|
4832
|
-
</span>
|
|
4833
|
-
</label>
|
|
4834
|
-
|
|
4835
|
-
@if (errorMessage()) {
|
|
4836
|
-
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
4837
|
-
}
|
|
4838
|
-
</div>
|
|
4839
|
-
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-checkbox-field{display:flex;flex-direction:column;justify-content:flex-end;height:100%;gap:4px;padding-bottom:8px;box-sizing:border-box}.rpt-checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.rpt-checkbox-input{position:absolute;opacity:0;width:0;height:0;margin:0}.rpt-custom-checkbox{width:18px;height:18px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-sm, 4px);background-color:var(--rpt-color-bg, #ffffff);display:flex;align-items:center;justify-content:center;transition:all var(--rpt-transition-speed, .15s) ease;color:var(--rpt-color-text-inverse, #ffffff);flex-shrink:0}.rpt-checkbox-label:hover .rpt-custom-checkbox{border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-checkbox-input:focus-visible+.rpt-custom-checkbox{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-checkbox-input:checked+.rpt-custom-checkbox{background-color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb)}.rpt-check-icon{opacity:0;transform:scale(.6);transition:all var(--rpt-transition-speed, .15s) ease}.rpt-checkbox-input:checked+.rpt-custom-checkbox .rpt-check-icon{opacity:1;transform:scale(1)}.rpt-checkbox-input:disabled+.rpt-custom-checkbox{background-color:var(--rpt-color-surface, #f8fafc);border-color:var(--rpt-color-border, #cbd5e1);cursor:not-allowed}.rpt-checkbox-text{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a)}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4840
|
-
}
|
|
4841
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptCheckboxComponent, decorators: [{
|
|
4842
|
-
type: Component,
|
|
4843
|
-
args: [{ selector: 'rpt-checkbox', standalone: true, imports: [ReactiveFormsModule], template: `
|
|
4844
|
-
<div class="rpt-checkbox-field">
|
|
4845
|
-
<label [for]="elementId()" class="rpt-checkbox-label">
|
|
4846
|
-
<input
|
|
4847
|
-
[id]="elementId()"
|
|
4848
|
-
type="checkbox"
|
|
4849
|
-
[formControl]="formControl()"
|
|
4850
|
-
class="rpt-checkbox-input"
|
|
4851
|
-
/>
|
|
4852
|
-
<span class="rpt-custom-checkbox" aria-hidden="true">
|
|
4853
|
-
<svg class="rpt-check-icon" width="12" height="10" viewBox="0 0 12 10" fill="none">
|
|
4854
|
-
<path d="M1 5L4.5 8.5L11 1.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4855
|
-
</svg>
|
|
4856
|
-
</span>
|
|
4857
|
-
<span class="rpt-checkbox-text">
|
|
4858
|
-
{{ config().label }}
|
|
4859
|
-
@if (config().validation?.required) {
|
|
4860
|
-
<span class="rpt-required-marker">*</span>
|
|
4861
|
-
}
|
|
4862
|
-
</span>
|
|
4863
|
-
</label>
|
|
4864
|
-
|
|
4865
|
-
@if (errorMessage()) {
|
|
4866
|
-
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
4867
|
-
}
|
|
4868
|
-
</div>
|
|
4869
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-checkbox-field{display:flex;flex-direction:column;justify-content:flex-end;height:100%;gap:4px;padding-bottom:8px;box-sizing:border-box}.rpt-checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.rpt-checkbox-input{position:absolute;opacity:0;width:0;height:0;margin:0}.rpt-custom-checkbox{width:18px;height:18px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-sm, 4px);background-color:var(--rpt-color-bg, #ffffff);display:flex;align-items:center;justify-content:center;transition:all var(--rpt-transition-speed, .15s) ease;color:var(--rpt-color-text-inverse, #ffffff);flex-shrink:0}.rpt-checkbox-label:hover .rpt-custom-checkbox{border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-checkbox-input:focus-visible+.rpt-custom-checkbox{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-checkbox-input:checked+.rpt-custom-checkbox{background-color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb)}.rpt-check-icon{opacity:0;transform:scale(.6);transition:all var(--rpt-transition-speed, .15s) ease}.rpt-checkbox-input:checked+.rpt-custom-checkbox .rpt-check-icon{opacity:1;transform:scale(1)}.rpt-checkbox-input:disabled+.rpt-custom-checkbox{background-color:var(--rpt-color-surface, #f8fafc);border-color:var(--rpt-color-border, #cbd5e1);cursor:not-allowed}.rpt-checkbox-text{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a)}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
4870
|
-
}] });
|
|
4871
|
-
|
|
4872
|
-
/**
|
|
4873
|
-
* Enterprise SVG Icon component for BWays-Report.
|
|
4874
|
-
* Provides crisp, scalable vector icons without external font dependencies.
|
|
4875
|
-
*/
|
|
4876
|
-
class RptIconComponent {
|
|
4877
|
-
/** Icon name (e.g. 'search', 'edit', 'save', 'kpi', 'chart-bar', 'trend-up') */
|
|
4878
|
-
name = input.required();
|
|
4879
|
-
/** Icon dimension in pixels. Defaults to 16. */
|
|
4880
|
-
size = input(16);
|
|
4881
|
-
/** Stroke/fill color. Defaults to 'currentColor'. */
|
|
4882
|
-
color = input('currentColor');
|
|
4883
|
-
/** Stroke width for line-based icons. Defaults to 2. */
|
|
4884
|
-
strokeWidth = input(2);
|
|
4885
|
-
viewBox = computed(() => '0 0 24 24');
|
|
4886
|
-
stroke = computed(() => 'currentColor');
|
|
4887
|
-
fill = computed(() => 'none');
|
|
4888
|
-
iconData = computed(() => {
|
|
4889
|
-
const n = this.name()?.toLowerCase().trim() || 'box';
|
|
4890
|
-
return ICON_REGISTRY[n] || ICON_REGISTRY['box'] || { paths: [] };
|
|
4891
|
-
});
|
|
4892
|
-
paths = computed(() => this.iconData().paths || []);
|
|
4893
|
-
circles = computed(() => this.iconData().circles || []);
|
|
4894
|
-
rects = computed(() => this.iconData().rects || []);
|
|
4895
|
-
lines = computed(() => this.iconData().lines || []);
|
|
4896
|
-
polylines = computed(() => this.iconData().polylines || []);
|
|
4897
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4898
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptIconComponent, isStandalone: true, selector: "rpt-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, strokeWidth: { classPropertyName: "strokeWidth", publicName: "strokeWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
4899
|
-
<svg
|
|
4900
|
-
class="rpt-svg-icon"
|
|
4901
|
-
[attr.width]="size()"
|
|
4902
|
-
[attr.height]="size()"
|
|
4903
|
-
[attr.viewBox]="viewBox()"
|
|
4904
|
-
[attr.stroke]="stroke()"
|
|
4905
|
-
[attr.fill]="fill()"
|
|
4906
|
-
[attr.stroke-width]="strokeWidth()"
|
|
4907
|
-
stroke-linecap="round"
|
|
4908
|
-
stroke-linejoin="round"
|
|
4909
|
-
[style.color]="color()"
|
|
4910
|
-
aria-hidden="true"
|
|
4911
|
-
>
|
|
4912
|
-
@for (d of paths(); track d) {
|
|
4913
|
-
<path [attr.d]="d" />
|
|
4914
|
-
}
|
|
4915
|
-
@for (c of circles(); track c.cx + '-' + c.cy) {
|
|
4916
|
-
<circle [attr.cx]="c.cx" [attr.cy]="c.cy" [attr.r]="c.r" />
|
|
4917
|
-
}
|
|
4918
|
-
@for (r of rects(); track r.x + '-' + r.y) {
|
|
4919
|
-
<rect
|
|
4920
|
-
[attr.x]="r.x"
|
|
4921
|
-
[attr.y]="r.y"
|
|
4922
|
-
[attr.width]="r.width"
|
|
4923
|
-
[attr.height]="r.height"
|
|
4924
|
-
[attr.rx]="r.rx || 0"
|
|
4925
|
-
/>
|
|
4926
|
-
}
|
|
4927
|
-
@for (l of lines(); track l.x1 + '-' + l.y1) {
|
|
4928
|
-
<line
|
|
4929
|
-
[attr.x1]="l.x1"
|
|
4930
|
-
[attr.y1]="l.y1"
|
|
4931
|
-
[attr.x2]="l.x2"
|
|
4932
|
-
[attr.y2]="l.y2"
|
|
4933
|
-
/>
|
|
4934
|
-
}
|
|
4935
|
-
@for (p of polylines(); track p) {
|
|
4936
|
-
<polyline [attr.points]="p" />
|
|
4937
|
-
}
|
|
4938
|
-
</svg>
|
|
4939
|
-
`, isInline: true, styles: [":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1}.rpt-svg-icon{display:inline-block;flex-shrink:0;color:inherit}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4940
|
-
}
|
|
4941
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptIconComponent, decorators: [{
|
|
4942
|
-
type: Component,
|
|
4943
|
-
args: [{ selector: 'rpt-icon', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
4944
|
-
<svg
|
|
4945
|
-
class="rpt-svg-icon"
|
|
4946
|
-
[attr.width]="size()"
|
|
4947
|
-
[attr.height]="size()"
|
|
4948
|
-
[attr.viewBox]="viewBox()"
|
|
4949
|
-
[attr.stroke]="stroke()"
|
|
4950
|
-
[attr.fill]="fill()"
|
|
4951
|
-
[attr.stroke-width]="strokeWidth()"
|
|
4952
|
-
stroke-linecap="round"
|
|
4953
|
-
stroke-linejoin="round"
|
|
4954
|
-
[style.color]="color()"
|
|
4955
|
-
aria-hidden="true"
|
|
4956
|
-
>
|
|
4957
|
-
@for (d of paths(); track d) {
|
|
4958
|
-
<path [attr.d]="d" />
|
|
4959
|
-
}
|
|
4960
|
-
@for (c of circles(); track c.cx + '-' + c.cy) {
|
|
4961
|
-
<circle [attr.cx]="c.cx" [attr.cy]="c.cy" [attr.r]="c.r" />
|
|
4962
|
-
}
|
|
4963
|
-
@for (r of rects(); track r.x + '-' + r.y) {
|
|
4964
|
-
<rect
|
|
4965
|
-
[attr.x]="r.x"
|
|
4966
|
-
[attr.y]="r.y"
|
|
4967
|
-
[attr.width]="r.width"
|
|
4968
|
-
[attr.height]="r.height"
|
|
4969
|
-
[attr.rx]="r.rx || 0"
|
|
4970
|
-
/>
|
|
4971
|
-
}
|
|
4972
|
-
@for (l of lines(); track l.x1 + '-' + l.y1) {
|
|
4973
|
-
<line
|
|
4974
|
-
[attr.x1]="l.x1"
|
|
4975
|
-
[attr.y1]="l.y1"
|
|
4976
|
-
[attr.x2]="l.x2"
|
|
4977
|
-
[attr.y2]="l.y2"
|
|
4978
|
-
/>
|
|
4979
|
-
}
|
|
4980
|
-
@for (p of polylines(); track p) {
|
|
4981
|
-
<polyline [attr.points]="p" />
|
|
4982
|
-
}
|
|
4983
|
-
</svg>
|
|
4984
|
-
`, styles: [":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1}.rpt-svg-icon{display:inline-block;flex-shrink:0;color:inherit}\n"] }]
|
|
4394
|
+
@for (l of lines(); track l.x1 + '-' + l.y1) {
|
|
4395
|
+
<line
|
|
4396
|
+
[attr.x1]="l.x1"
|
|
4397
|
+
[attr.y1]="l.y1"
|
|
4398
|
+
[attr.x2]="l.x2"
|
|
4399
|
+
[attr.y2]="l.y2"
|
|
4400
|
+
/>
|
|
4401
|
+
}
|
|
4402
|
+
@for (p of polylines(); track p) {
|
|
4403
|
+
<polyline [attr.points]="p" />
|
|
4404
|
+
}
|
|
4405
|
+
</svg>
|
|
4406
|
+
`, styles: [":host{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;line-height:1}.rpt-svg-icon{display:inline-block;flex-shrink:0;color:inherit}\n"] }]
|
|
4985
4407
|
}] });
|
|
4986
4408
|
const ICON_REGISTRY = {
|
|
4987
4409
|
// Input / Text
|
|
@@ -5428,7 +4850,733 @@ const ICON_REGISTRY = {
|
|
|
5428
4850
|
{ cx: 15, cy: 18, r: 1.5 }
|
|
5429
4851
|
]
|
|
5430
4852
|
}
|
|
5431
|
-
};
|
|
4853
|
+
};
|
|
4854
|
+
|
|
4855
|
+
function normalizedDate(value) {
|
|
4856
|
+
if (value instanceof Date && !isNaN(value.getTime()))
|
|
4857
|
+
return value.getFullYear() + '-' + String(value.getMonth() + 1).padStart(2, '0') + '-' + String(value.getDate()).padStart(2, '0');
|
|
4858
|
+
const match = /^(\d{4})-?(\d{2})-?(\d{2})$/.exec(String(value ?? ''));
|
|
4859
|
+
return match ? match[1] + '-' + match[2] + '-' + match[3] : '';
|
|
4860
|
+
}
|
|
4861
|
+
function displayedDate(value) {
|
|
4862
|
+
const iso = normalizedDate(value);
|
|
4863
|
+
return iso ? iso.slice(8, 10) + '-' + iso.slice(5, 7) + '-' + iso.slice(0, 4) : '';
|
|
4864
|
+
}
|
|
4865
|
+
/** Stable display format with ISO form values; browser locale only affects the calendar popup. */
|
|
4866
|
+
class RptCalendarInputComponent {
|
|
4867
|
+
control = input.required();
|
|
4868
|
+
elementId = input('');
|
|
4869
|
+
min = input(null);
|
|
4870
|
+
max = input(null);
|
|
4871
|
+
text = signal('');
|
|
4872
|
+
calendarValue = signal('');
|
|
4873
|
+
disabled = signal(false);
|
|
4874
|
+
invalid = signal(false);
|
|
4875
|
+
formatError = signal(false);
|
|
4876
|
+
editing = false;
|
|
4877
|
+
constructor() {
|
|
4878
|
+
effect(onCleanup => {
|
|
4879
|
+
const control = this.control();
|
|
4880
|
+
const sync = () => { this.disabled.set(control.disabled); this.invalid.set(control.invalid); if (!this.editing) {
|
|
4881
|
+
this.text.set(displayedDate(control.value));
|
|
4882
|
+
this.calendarValue.set(normalizedDate(control.value));
|
|
4883
|
+
this.formatError.set(false);
|
|
4884
|
+
} };
|
|
4885
|
+
untracked(sync);
|
|
4886
|
+
const subscription = merge(control.valueChanges, control.statusChanges).subscribe(sync);
|
|
4887
|
+
onCleanup(() => subscription.unsubscribe());
|
|
4888
|
+
}, { allowSignalWrites: true });
|
|
4889
|
+
}
|
|
4890
|
+
ngOnInit() {
|
|
4891
|
+
this.text.set(displayedDate(this.control().value));
|
|
4892
|
+
this.calendarValue.set(normalizedDate(this.control().value));
|
|
4893
|
+
this.disabled.set(this.control().disabled);
|
|
4894
|
+
this.invalid.set(this.control().invalid);
|
|
4895
|
+
}
|
|
4896
|
+
onText(value) {
|
|
4897
|
+
this.text.set(value);
|
|
4898
|
+
const match = /^(\d{2})-(\d{2})-(\d{4})$/.exec(value);
|
|
4899
|
+
const iso = match ? match[3] + '-' + match[2] + '-' + match[1] : '';
|
|
4900
|
+
const probe = new Date(0);
|
|
4901
|
+
if (match)
|
|
4902
|
+
probe.setUTCFullYear(+match[3], +match[2] - 1, +match[1]);
|
|
4903
|
+
const valid = !!match && +match[3] > 0 && probe.getUTCFullYear() === +match[3] && probe.getUTCMonth() + 1 === +match[2] && probe.getUTCDate() === +match[1];
|
|
4904
|
+
const inRange = valid && (!this.min() || iso >= this.min()) && (!this.max() || iso <= this.max());
|
|
4905
|
+
this.editing = true;
|
|
4906
|
+
try {
|
|
4907
|
+
this.control().setValue(inRange ? iso : '');
|
|
4908
|
+
this.control().markAsDirty();
|
|
4909
|
+
this.formatError.set(value !== '' && !inRange);
|
|
4910
|
+
this.calendarValue.set(inRange ? iso : '');
|
|
4911
|
+
if (value !== '' && !inRange)
|
|
4912
|
+
this.control().setErrors({ ...this.control().errors, dateFormat: true });
|
|
4913
|
+
this.invalid.set(this.control().invalid);
|
|
4914
|
+
}
|
|
4915
|
+
finally {
|
|
4916
|
+
this.editing = false;
|
|
4917
|
+
}
|
|
4918
|
+
}
|
|
4919
|
+
onCalendar(value) { this.onText(displayedDate(value)); this.control().markAsTouched(); }
|
|
4920
|
+
openCalendar(picker) { try {
|
|
4921
|
+
if (picker.showPicker)
|
|
4922
|
+
picker.showPicker();
|
|
4923
|
+
else
|
|
4924
|
+
picker.click();
|
|
4925
|
+
}
|
|
4926
|
+
catch {
|
|
4927
|
+
picker.click();
|
|
4928
|
+
} }
|
|
4929
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptCalendarInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4930
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptCalendarInputComponent, isStandalone: true, selector: "rpt-calendar-input", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, elementId: { classPropertyName: "elementId", publicName: "elementId", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<div class="calendar-field">
|
|
4931
|
+
<input type="text" class="date-text" [id]="elementId()" placeholder="dd-mm-yyyy" inputmode="numeric" autocomplete="off"
|
|
4932
|
+
[value]="text()" [disabled]="disabled()" [attr.aria-invalid]="invalid() || null" aria-description="Date in day-month-year format, dd-mm-yyyy"
|
|
4933
|
+
(input)="onText($any($event.target).value)" (blur)="control().markAsTouched()" />
|
|
4934
|
+
<button type="button" class="calendar-toggle" aria-label="Open date calendar" [disabled]="disabled()" (click)="openCalendar(picker)"><rpt-icon name="calendar" [size]="15" /></button>
|
|
4935
|
+
<input #picker type="date" class="native-calendar" tabindex="-1" aria-hidden="true" [disabled]="disabled()" [value]="calendarValue()"
|
|
4936
|
+
[min]="min() || ''" [max]="max() || ''" (change)="onCalendar($any($event.target).value)" />
|
|
4937
|
+
</div>
|
|
4938
|
+
@if (formatError()) { <span class="date-error" role="alert">Enter a valid date as dd-mm-yyyy.</span> }`, isInline: true, styles: [":host{display:block;width:100%;min-height:38px}.calendar-field{position:relative;display:flex;width:100%;height:38px;box-sizing:border-box;border:1px solid var(--rpt-color-border,#cbd5e1);border-radius:6px;background:var(--rpt-color-bg,#fff)}.calendar-field:focus-within{border-color:var(--rpt-color-primary,#2563eb);box-shadow:0 0 0 2px #2563eb26}.date-text{box-sizing:border-box;flex:1;min-width:0;width:100%;height:100%;padding:6px 10px;border:0;border-radius:6px;background:transparent;font-family:var(--rpt-font-family,system-ui,sans-serif);font-size:14px;line-height:1.25;color:var(--rpt-color-text,#0f172a);outline:none}.date-text[aria-invalid=true]{box-shadow:inset 0 0 0 1px #dc2626}.calendar-toggle{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;flex:0 0 36px;width:36px;height:100%;min-height:0;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.native-calendar{position:absolute;right:0;bottom:0;width:1px;height:1px;opacity:0;pointer-events:none}.date-error{display:block;font:12px/1.3 var(--rpt-font-family,system-ui,sans-serif);color:#b91c1c;margin-top:3px}input:disabled,button:disabled{cursor:not-allowed;opacity:.6}\n"], dependencies: [{ kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4939
|
+
}
|
|
4940
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptCalendarInputComponent, decorators: [{
|
|
4941
|
+
type: Component,
|
|
4942
|
+
args: [{ selector: 'rpt-calendar-input', standalone: true, imports: [RptIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `<div class="calendar-field">
|
|
4943
|
+
<input type="text" class="date-text" [id]="elementId()" placeholder="dd-mm-yyyy" inputmode="numeric" autocomplete="off"
|
|
4944
|
+
[value]="text()" [disabled]="disabled()" [attr.aria-invalid]="invalid() || null" aria-description="Date in day-month-year format, dd-mm-yyyy"
|
|
4945
|
+
(input)="onText($any($event.target).value)" (blur)="control().markAsTouched()" />
|
|
4946
|
+
<button type="button" class="calendar-toggle" aria-label="Open date calendar" [disabled]="disabled()" (click)="openCalendar(picker)"><rpt-icon name="calendar" [size]="15" /></button>
|
|
4947
|
+
<input #picker type="date" class="native-calendar" tabindex="-1" aria-hidden="true" [disabled]="disabled()" [value]="calendarValue()"
|
|
4948
|
+
[min]="min() || ''" [max]="max() || ''" (change)="onCalendar($any($event.target).value)" />
|
|
4949
|
+
</div>
|
|
4950
|
+
@if (formatError()) { <span class="date-error" role="alert">Enter a valid date as dd-mm-yyyy.</span> }`, styles: [":host{display:block;width:100%;min-height:38px}.calendar-field{position:relative;display:flex;width:100%;height:38px;box-sizing:border-box;border:1px solid var(--rpt-color-border,#cbd5e1);border-radius:6px;background:var(--rpt-color-bg,#fff)}.calendar-field:focus-within{border-color:var(--rpt-color-primary,#2563eb);box-shadow:0 0 0 2px #2563eb26}.date-text{box-sizing:border-box;flex:1;min-width:0;width:100%;height:100%;padding:6px 10px;border:0;border-radius:6px;background:transparent;font-family:var(--rpt-font-family,system-ui,sans-serif);font-size:14px;line-height:1.25;color:var(--rpt-color-text,#0f172a);outline:none}.date-text[aria-invalid=true]{box-shadow:inset 0 0 0 1px #dc2626}.calendar-toggle{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;flex:0 0 36px;width:36px;height:100%;min-height:0;margin:0;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}.native-calendar{position:absolute;right:0;bottom:0;width:1px;height:1px;opacity:0;pointer-events:none}.date-error{display:block;font:12px/1.3 var(--rpt-font-family,system-ui,sans-serif);color:#b91c1c;margin-top:3px}input:disabled,button:disabled{cursor:not-allowed;opacity:.6}\n"] }]
|
|
4951
|
+
}], ctorParameters: () => [] });
|
|
4952
|
+
|
|
4953
|
+
class RptDateComponent {
|
|
4954
|
+
config = input.required();
|
|
4955
|
+
control = input();
|
|
4956
|
+
fallbackControl = new FormControl('');
|
|
4957
|
+
formControl = computed(() => this.control() ?? this.fallbackControl);
|
|
4958
|
+
elementId = computed(() => this.config().key || this.config().id);
|
|
4959
|
+
dateType = computed(() => (this.config().properties?.['includeTime'] ? 'datetime-local' : 'date'));
|
|
4960
|
+
minDate = computed(() => this.config().properties?.['minDate'] || null);
|
|
4961
|
+
maxDate = computed(() => this.config().properties?.['maxDate'] || null);
|
|
4962
|
+
isInvalid = computed(() => {
|
|
4963
|
+
const ctrl = this.formControl();
|
|
4964
|
+
return ctrl.invalid && (ctrl.dirty || ctrl.touched);
|
|
4965
|
+
});
|
|
4966
|
+
errorMessage = computed(() => {
|
|
4967
|
+
const ctrl = this.formControl();
|
|
4968
|
+
if (!ctrl.invalid || (!ctrl.dirty && !ctrl.touched)) {
|
|
4969
|
+
return '';
|
|
4970
|
+
}
|
|
4971
|
+
const errors = ctrl.errors;
|
|
4972
|
+
if (!errors)
|
|
4973
|
+
return '';
|
|
4974
|
+
const firstKey = Object.keys(errors)[0];
|
|
4975
|
+
return getValidationMessage(this.config().validation, firstKey);
|
|
4976
|
+
});
|
|
4977
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4978
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptDateComponent, isStandalone: true, selector: "rpt-date", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
4979
|
+
<div class="rpt-field-group">
|
|
4980
|
+
@if (config().label) {
|
|
4981
|
+
<label [for]="elementId()" class="rpt-label">
|
|
4982
|
+
{{ config().label }}
|
|
4983
|
+
@if (config().validation?.required) {
|
|
4984
|
+
<span class="rpt-required-marker">*</span>
|
|
4985
|
+
}
|
|
4986
|
+
</label>
|
|
4987
|
+
}
|
|
4988
|
+
|
|
4989
|
+
<div class="rpt-date-wrapper">
|
|
4990
|
+
@if (dateType() === 'date') {
|
|
4991
|
+
<rpt-calendar-input [elementId]="elementId()" [control]="formControl()" [min]="minDate()" [max]="maxDate()" />
|
|
4992
|
+
} @else {
|
|
4993
|
+
<input
|
|
4994
|
+
[id]="elementId()"
|
|
4995
|
+
[type]="dateType()"
|
|
4996
|
+
[formControl]="formControl()"
|
|
4997
|
+
[min]="minDate()"
|
|
4998
|
+
[max]="maxDate()"
|
|
4999
|
+
[class.rpt-invalid]="isInvalid()"
|
|
5000
|
+
class="rpt-date-input"
|
|
5001
|
+
/>
|
|
5002
|
+
}
|
|
5003
|
+
</div>
|
|
5004
|
+
|
|
5005
|
+
@if (errorMessage()) {
|
|
5006
|
+
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
5007
|
+
}
|
|
5008
|
+
</div>
|
|
5009
|
+
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:4px;box-sizing:border-box}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-date-wrapper{position:relative;width:100%;flex:1;min-height:0;display:flex}.rpt-date-input{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease;outline:none}.rpt-date-input:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-date-input:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-date-input:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-date-input.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-date-input.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: RptCalendarInputComponent, selector: "rpt-calendar-input", inputs: ["control", "elementId", "min", "max"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5010
|
+
}
|
|
5011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptDateComponent, decorators: [{
|
|
5012
|
+
type: Component,
|
|
5013
|
+
args: [{ selector: 'rpt-date', standalone: true, imports: [ReactiveFormsModule, RptCalendarInputComponent], template: `
|
|
5014
|
+
<div class="rpt-field-group">
|
|
5015
|
+
@if (config().label) {
|
|
5016
|
+
<label [for]="elementId()" class="rpt-label">
|
|
5017
|
+
{{ config().label }}
|
|
5018
|
+
@if (config().validation?.required) {
|
|
5019
|
+
<span class="rpt-required-marker">*</span>
|
|
5020
|
+
}
|
|
5021
|
+
</label>
|
|
5022
|
+
}
|
|
5023
|
+
|
|
5024
|
+
<div class="rpt-date-wrapper">
|
|
5025
|
+
@if (dateType() === 'date') {
|
|
5026
|
+
<rpt-calendar-input [elementId]="elementId()" [control]="formControl()" [min]="minDate()" [max]="maxDate()" />
|
|
5027
|
+
} @else {
|
|
5028
|
+
<input
|
|
5029
|
+
[id]="elementId()"
|
|
5030
|
+
[type]="dateType()"
|
|
5031
|
+
[formControl]="formControl()"
|
|
5032
|
+
[min]="minDate()"
|
|
5033
|
+
[max]="maxDate()"
|
|
5034
|
+
[class.rpt-invalid]="isInvalid()"
|
|
5035
|
+
class="rpt-date-input"
|
|
5036
|
+
/>
|
|
5037
|
+
}
|
|
5038
|
+
</div>
|
|
5039
|
+
|
|
5040
|
+
@if (errorMessage()) {
|
|
5041
|
+
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
5042
|
+
}
|
|
5043
|
+
</div>
|
|
5044
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:4px;box-sizing:border-box}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-date-wrapper{position:relative;width:100%;flex:1;min-height:0;display:flex}.rpt-date-input{width:100%;height:100%;min-height:38px;box-sizing:border-box;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease;outline:none}.rpt-date-input:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-date-input:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-date-input:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-date-input.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-date-input.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
5045
|
+
}] });
|
|
5046
|
+
|
|
5047
|
+
const pad = (n) => String(n).padStart(2, '0');
|
|
5048
|
+
const formatYMD = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
5049
|
+
class RptDateRangeComponent {
|
|
5050
|
+
config = input.required();
|
|
5051
|
+
control = input();
|
|
5052
|
+
fallbackControl = new FormControl(null);
|
|
5053
|
+
formControl = computed(() => this.control() ?? this.fallbackControl);
|
|
5054
|
+
elementId = computed(() => this.config().key || this.config().id);
|
|
5055
|
+
minDate = computed(() => this.config().properties?.['minDate'] || null);
|
|
5056
|
+
maxDate = computed(() => this.config().properties?.['maxDate'] || null);
|
|
5057
|
+
showPresets = computed(() => this.config().properties?.['showPresets'] !== false);
|
|
5058
|
+
presets = [
|
|
5059
|
+
{ id: 'today', label: 'Today' },
|
|
5060
|
+
{ id: 'yesterday', label: 'Yesterday' },
|
|
5061
|
+
{ id: 'thisWeek', label: 'This Week' },
|
|
5062
|
+
{ id: 'thisMonth', label: 'This Month' },
|
|
5063
|
+
{ id: 'lastMonth', label: 'Last Month' },
|
|
5064
|
+
{ id: 'thisQuarter', label: 'This Quarter' },
|
|
5065
|
+
{ id: 'ytd', label: 'YTD' },
|
|
5066
|
+
];
|
|
5067
|
+
fromDate = signal('');
|
|
5068
|
+
toDate = signal('');
|
|
5069
|
+
activePreset = signal('custom');
|
|
5070
|
+
hasValue = computed(() => !!(this.fromDate() || this.toDate()));
|
|
5071
|
+
rangeError = computed(() => {
|
|
5072
|
+
const f = this.fromDate();
|
|
5073
|
+
const t = this.toDate();
|
|
5074
|
+
if (f && t && f > t) {
|
|
5075
|
+
return `'From' date cannot be after 'To' date`;
|
|
5076
|
+
}
|
|
5077
|
+
return '';
|
|
5078
|
+
});
|
|
5079
|
+
isInvalid = computed(() => {
|
|
5080
|
+
const ctrl = this.formControl();
|
|
5081
|
+
return (ctrl.invalid && (ctrl.dirty || ctrl.touched)) || !!this.rangeError();
|
|
5082
|
+
});
|
|
5083
|
+
errorMessage = computed(() => {
|
|
5084
|
+
const ctrl = this.formControl();
|
|
5085
|
+
if (!ctrl.invalid || (!ctrl.dirty && !ctrl.touched)) {
|
|
5086
|
+
return '';
|
|
5087
|
+
}
|
|
5088
|
+
const errors = ctrl.errors;
|
|
5089
|
+
if (!errors)
|
|
5090
|
+
return '';
|
|
5091
|
+
const firstKey = Object.keys(errors)[0];
|
|
5092
|
+
return getValidationMessage(this.config().validation, firstKey);
|
|
5093
|
+
});
|
|
5094
|
+
controlSub;
|
|
5095
|
+
constructor() {
|
|
5096
|
+
effect(() => {
|
|
5097
|
+
const ctrl = this.formControl();
|
|
5098
|
+
untracked(() => this.syncControlValue(ctrl.value));
|
|
5099
|
+
this.controlSub?.unsubscribe();
|
|
5100
|
+
this.controlSub = ctrl.valueChanges.subscribe((v) => this.syncControlValue(v));
|
|
5101
|
+
}, { allowSignalWrites: true });
|
|
5102
|
+
}
|
|
5103
|
+
ngOnInit() {
|
|
5104
|
+
const defaultPreset = this.config().properties?.['defaultPreset'];
|
|
5105
|
+
if (defaultPreset && !this.formControl().value) {
|
|
5106
|
+
this.applyPreset(defaultPreset);
|
|
5107
|
+
}
|
|
5108
|
+
}
|
|
5109
|
+
ngOnDestroy() {
|
|
5110
|
+
this.controlSub?.unsubscribe();
|
|
5111
|
+
}
|
|
5112
|
+
syncControlValue(val) {
|
|
5113
|
+
if (val && typeof val === 'object' && 'from' in val) {
|
|
5114
|
+
const drv = val;
|
|
5115
|
+
this.fromDate.set(drv.from || '');
|
|
5116
|
+
this.toDate.set(drv.to || '');
|
|
5117
|
+
if (drv.preset) {
|
|
5118
|
+
this.activePreset.set(drv.preset);
|
|
5119
|
+
}
|
|
5120
|
+
}
|
|
5121
|
+
else if (typeof val === 'string' && val.includes(',')) {
|
|
5122
|
+
const [f, t] = val.split(',');
|
|
5123
|
+
this.fromDate.set(f?.trim() || '');
|
|
5124
|
+
this.toDate.set(t?.trim() || '');
|
|
5125
|
+
}
|
|
5126
|
+
else if (!val) {
|
|
5127
|
+
this.fromDate.set('');
|
|
5128
|
+
this.toDate.set('');
|
|
5129
|
+
this.activePreset.set('custom');
|
|
5130
|
+
}
|
|
5131
|
+
}
|
|
5132
|
+
applyPreset(presetId) {
|
|
5133
|
+
const now = new Date();
|
|
5134
|
+
let from = '';
|
|
5135
|
+
let to = '';
|
|
5136
|
+
switch (presetId) {
|
|
5137
|
+
case 'today':
|
|
5138
|
+
from = formatYMD(now);
|
|
5139
|
+
to = formatYMD(now);
|
|
5140
|
+
break;
|
|
5141
|
+
case 'yesterday': {
|
|
5142
|
+
const y = new Date(now);
|
|
5143
|
+
y.setDate(y.getDate() - 1);
|
|
5144
|
+
from = formatYMD(y);
|
|
5145
|
+
to = formatYMD(y);
|
|
5146
|
+
break;
|
|
5147
|
+
}
|
|
5148
|
+
case 'thisWeek': {
|
|
5149
|
+
const day = now.getDay();
|
|
5150
|
+
const diff = now.getDate() - day + (day === 0 ? -6 : 1); // Monday
|
|
5151
|
+
const monday = new Date(now);
|
|
5152
|
+
monday.setDate(diff);
|
|
5153
|
+
from = formatYMD(monday);
|
|
5154
|
+
to = formatYMD(now);
|
|
5155
|
+
break;
|
|
5156
|
+
}
|
|
5157
|
+
case 'thisMonth':
|
|
5158
|
+
from = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-01`;
|
|
5159
|
+
to = formatYMD(new Date(now.getFullYear(), now.getMonth() + 1, 0));
|
|
5160
|
+
break;
|
|
5161
|
+
case 'lastMonth': {
|
|
5162
|
+
const lastMonthEnd = new Date(now.getFullYear(), now.getMonth(), 0);
|
|
5163
|
+
from = `${lastMonthEnd.getFullYear()}-${pad(lastMonthEnd.getMonth() + 1)}-01`;
|
|
5164
|
+
to = formatYMD(lastMonthEnd);
|
|
5165
|
+
break;
|
|
5166
|
+
}
|
|
5167
|
+
case 'thisQuarter': {
|
|
5168
|
+
const currentQuarter = Math.floor(now.getMonth() / 3);
|
|
5169
|
+
const startMonth = currentQuarter * 3;
|
|
5170
|
+
const endMonth = startMonth + 2;
|
|
5171
|
+
from = `${now.getFullYear()}-${pad(startMonth + 1)}-01`;
|
|
5172
|
+
to = formatYMD(new Date(now.getFullYear(), endMonth + 1, 0));
|
|
5173
|
+
break;
|
|
5174
|
+
}
|
|
5175
|
+
case 'ytd':
|
|
5176
|
+
from = `${now.getFullYear()}-01-01`;
|
|
5177
|
+
to = formatYMD(now);
|
|
5178
|
+
break;
|
|
5179
|
+
default:
|
|
5180
|
+
return;
|
|
5181
|
+
}
|
|
5182
|
+
this.fromDate.set(from);
|
|
5183
|
+
this.toDate.set(to);
|
|
5184
|
+
this.activePreset.set(presetId);
|
|
5185
|
+
this.emitRangeChange({ from, to, preset: presetId });
|
|
5186
|
+
}
|
|
5187
|
+
onFromChange(event) {
|
|
5188
|
+
const from = event.target.value;
|
|
5189
|
+
this.fromDate.set(from);
|
|
5190
|
+
this.activePreset.set('custom');
|
|
5191
|
+
this.emitRangeChange({ from, to: this.toDate(), preset: 'custom' });
|
|
5192
|
+
}
|
|
5193
|
+
onToChange(event) {
|
|
5194
|
+
const to = event.target.value;
|
|
5195
|
+
this.toDate.set(to);
|
|
5196
|
+
this.activePreset.set('custom');
|
|
5197
|
+
this.emitRangeChange({ from: this.fromDate(), to, preset: 'custom' });
|
|
5198
|
+
}
|
|
5199
|
+
clearRange(event) {
|
|
5200
|
+
event.stopPropagation();
|
|
5201
|
+
this.fromDate.set('');
|
|
5202
|
+
this.toDate.set('');
|
|
5203
|
+
this.activePreset.set('custom');
|
|
5204
|
+
this.formControl().setValue(null);
|
|
5205
|
+
this.formControl().markAsDirty();
|
|
5206
|
+
this.formControl().markAsTouched();
|
|
5207
|
+
}
|
|
5208
|
+
emitRangeChange(range) {
|
|
5209
|
+
this.formControl().setValue(range);
|
|
5210
|
+
this.formControl().markAsDirty();
|
|
5211
|
+
this.formControl().markAsTouched();
|
|
5212
|
+
}
|
|
5213
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5214
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptDateRangeComponent, isStandalone: true, selector: "rpt-date-range", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
5215
|
+
<div class="rpt-field-group">
|
|
5216
|
+
<!-- Header with Label & Preset Bar -->
|
|
5217
|
+
<div class="rpt-label-row">
|
|
5218
|
+
@if (config().label) {
|
|
5219
|
+
<label [for]="elementId() + '_from'" class="rpt-label">
|
|
5220
|
+
{{ config().label }}
|
|
5221
|
+
@if (config().validation?.required) {
|
|
5222
|
+
<span class="rpt-required-marker">*</span>
|
|
5223
|
+
}
|
|
5224
|
+
</label>
|
|
5225
|
+
}
|
|
5226
|
+
|
|
5227
|
+
@if (showPresets()) {
|
|
5228
|
+
<div class="rpt-preset-pills" role="toolbar" aria-label="Date presets">
|
|
5229
|
+
@for (p of presets; track p.id) {
|
|
5230
|
+
<button
|
|
5231
|
+
type="button"
|
|
5232
|
+
class="rpt-preset-pill"
|
|
5233
|
+
[class.is-active]="activePreset() === p.id"
|
|
5234
|
+
[disabled]="formControl().disabled"
|
|
5235
|
+
(click)="applyPreset(p.id)"
|
|
5236
|
+
>
|
|
5237
|
+
{{ p.label }}
|
|
5238
|
+
</button>
|
|
5239
|
+
}
|
|
5240
|
+
</div>
|
|
5241
|
+
}
|
|
5242
|
+
</div>
|
|
5243
|
+
|
|
5244
|
+
<!-- Date Inputs Container -->
|
|
5245
|
+
<div class="rpt-date-range-container" [class.rpt-invalid]="isInvalid()">
|
|
5246
|
+
<!-- From Field -->
|
|
5247
|
+
<div class="rpt-date-subfield">
|
|
5248
|
+
<span class="rpt-date-prefix">From</span>
|
|
5249
|
+
<input
|
|
5250
|
+
[id]="elementId() + '_from'"
|
|
5251
|
+
type="date"
|
|
5252
|
+
class="rpt-date-input"
|
|
5253
|
+
[value]="fromDate()"
|
|
5254
|
+
[disabled]="formControl().disabled"
|
|
5255
|
+
[min]="minDate()"
|
|
5256
|
+
[max]="maxDate()"
|
|
5257
|
+
(input)="onFromChange($event)"
|
|
5258
|
+
/>
|
|
5259
|
+
</div>
|
|
5260
|
+
|
|
5261
|
+
<span class="rpt-range-separator" aria-hidden="true">→</span>
|
|
5262
|
+
|
|
5263
|
+
<!-- To Field -->
|
|
5264
|
+
<div class="rpt-date-subfield">
|
|
5265
|
+
<span class="rpt-date-prefix">To</span>
|
|
5266
|
+
<input
|
|
5267
|
+
[id]="elementId() + '_to'"
|
|
5268
|
+
type="date"
|
|
5269
|
+
class="rpt-date-input"
|
|
5270
|
+
[value]="toDate()"
|
|
5271
|
+
[disabled]="formControl().disabled"
|
|
5272
|
+
[min]="fromDate() || minDate()"
|
|
5273
|
+
[max]="maxDate()"
|
|
5274
|
+
(input)="onToChange($event)"
|
|
5275
|
+
/>
|
|
5276
|
+
</div>
|
|
5277
|
+
|
|
5278
|
+
<!-- Quick Clear Button -->
|
|
5279
|
+
@if (hasValue() && !formControl().disabled) {
|
|
5280
|
+
<button
|
|
5281
|
+
type="button"
|
|
5282
|
+
class="rpt-range-clear-btn"
|
|
5283
|
+
title="Clear date range"
|
|
5284
|
+
aria-label="Clear date range"
|
|
5285
|
+
(click)="clearRange($event)"
|
|
5286
|
+
>
|
|
5287
|
+
✕
|
|
5288
|
+
</button>
|
|
5289
|
+
}
|
|
5290
|
+
</div>
|
|
5291
|
+
|
|
5292
|
+
@if (rangeError()) {
|
|
5293
|
+
<span class="rpt-error-text">{{ rangeError() }}</span>
|
|
5294
|
+
} @else if (errorMessage()) {
|
|
5295
|
+
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
5296
|
+
}
|
|
5297
|
+
</div>
|
|
5298
|
+
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:5px;box-sizing:border-box}.rpt-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-preset-pills{display:inline-flex;align-items:center;gap:3px;flex-wrap:wrap}.rpt-preset-pill{border:1px solid var(--rpt-color-border, #cbd5e1);background:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);font-size:.6875rem;font-weight:500;padding:1px 7px;border-radius:12px;cursor:pointer;line-height:1.4;transition:all .12s ease}.rpt-preset-pill:hover:not(:disabled){border-color:var(--rpt-color-primary, #2563eb);color:var(--rpt-color-primary, #2563eb);background:#eff6ff}.rpt-preset-pill.is-active{background:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);color:#fff;font-weight:600}.rpt-preset-pill:disabled{cursor:not-allowed;opacity:.5}.rpt-date-range-container{display:flex;align-items:center;gap:8px;width:100%;flex:1;min-height:38px;box-sizing:border-box;padding:3px 8px;background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-date-range-container:focus-within{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-date-range-container.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-date-subfield{display:flex;align-items:center;gap:6px;flex:1;min-width:0}.rpt-date-prefix{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--rpt-color-text-muted, #94a3b8);-webkit-user-select:none;user-select:none}.rpt-date-input{width:100%;border:none;outline:none;background:transparent;font-size:var(--rpt-font-size-base, .84rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);min-width:0;padding:4px 0}.rpt-date-input:disabled{color:var(--rpt-color-text-muted, #94a3b8);cursor:not-allowed}.rpt-range-separator{color:var(--rpt-color-text-muted, #94a3b8);font-size:.8125rem;-webkit-user-select:none;user-select:none;padding:0 2px}.rpt-range-clear-btn{border:none;background:#f1f5f9;color:var(--rpt-color-text-muted, #64748b);width:18px;height:18px;border-radius:50%;font-size:.6875rem;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;transition:background-color .15s ease,color .15s ease}.rpt-range-clear-btn:hover{background-color:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5299
|
+
}
|
|
5300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptDateRangeComponent, decorators: [{
|
|
5301
|
+
type: Component,
|
|
5302
|
+
args: [{ selector: 'rpt-date-range', standalone: true, imports: [ReactiveFormsModule], template: `
|
|
5303
|
+
<div class="rpt-field-group">
|
|
5304
|
+
<!-- Header with Label & Preset Bar -->
|
|
5305
|
+
<div class="rpt-label-row">
|
|
5306
|
+
@if (config().label) {
|
|
5307
|
+
<label [for]="elementId() + '_from'" class="rpt-label">
|
|
5308
|
+
{{ config().label }}
|
|
5309
|
+
@if (config().validation?.required) {
|
|
5310
|
+
<span class="rpt-required-marker">*</span>
|
|
5311
|
+
}
|
|
5312
|
+
</label>
|
|
5313
|
+
}
|
|
5314
|
+
|
|
5315
|
+
@if (showPresets()) {
|
|
5316
|
+
<div class="rpt-preset-pills" role="toolbar" aria-label="Date presets">
|
|
5317
|
+
@for (p of presets; track p.id) {
|
|
5318
|
+
<button
|
|
5319
|
+
type="button"
|
|
5320
|
+
class="rpt-preset-pill"
|
|
5321
|
+
[class.is-active]="activePreset() === p.id"
|
|
5322
|
+
[disabled]="formControl().disabled"
|
|
5323
|
+
(click)="applyPreset(p.id)"
|
|
5324
|
+
>
|
|
5325
|
+
{{ p.label }}
|
|
5326
|
+
</button>
|
|
5327
|
+
}
|
|
5328
|
+
</div>
|
|
5329
|
+
}
|
|
5330
|
+
</div>
|
|
5331
|
+
|
|
5332
|
+
<!-- Date Inputs Container -->
|
|
5333
|
+
<div class="rpt-date-range-container" [class.rpt-invalid]="isInvalid()">
|
|
5334
|
+
<!-- From Field -->
|
|
5335
|
+
<div class="rpt-date-subfield">
|
|
5336
|
+
<span class="rpt-date-prefix">From</span>
|
|
5337
|
+
<input
|
|
5338
|
+
[id]="elementId() + '_from'"
|
|
5339
|
+
type="date"
|
|
5340
|
+
class="rpt-date-input"
|
|
5341
|
+
[value]="fromDate()"
|
|
5342
|
+
[disabled]="formControl().disabled"
|
|
5343
|
+
[min]="minDate()"
|
|
5344
|
+
[max]="maxDate()"
|
|
5345
|
+
(input)="onFromChange($event)"
|
|
5346
|
+
/>
|
|
5347
|
+
</div>
|
|
5348
|
+
|
|
5349
|
+
<span class="rpt-range-separator" aria-hidden="true">→</span>
|
|
5350
|
+
|
|
5351
|
+
<!-- To Field -->
|
|
5352
|
+
<div class="rpt-date-subfield">
|
|
5353
|
+
<span class="rpt-date-prefix">To</span>
|
|
5354
|
+
<input
|
|
5355
|
+
[id]="elementId() + '_to'"
|
|
5356
|
+
type="date"
|
|
5357
|
+
class="rpt-date-input"
|
|
5358
|
+
[value]="toDate()"
|
|
5359
|
+
[disabled]="formControl().disabled"
|
|
5360
|
+
[min]="fromDate() || minDate()"
|
|
5361
|
+
[max]="maxDate()"
|
|
5362
|
+
(input)="onToChange($event)"
|
|
5363
|
+
/>
|
|
5364
|
+
</div>
|
|
5365
|
+
|
|
5366
|
+
<!-- Quick Clear Button -->
|
|
5367
|
+
@if (hasValue() && !formControl().disabled) {
|
|
5368
|
+
<button
|
|
5369
|
+
type="button"
|
|
5370
|
+
class="rpt-range-clear-btn"
|
|
5371
|
+
title="Clear date range"
|
|
5372
|
+
aria-label="Clear date range"
|
|
5373
|
+
(click)="clearRange($event)"
|
|
5374
|
+
>
|
|
5375
|
+
✕
|
|
5376
|
+
</button>
|
|
5377
|
+
}
|
|
5378
|
+
</div>
|
|
5379
|
+
|
|
5380
|
+
@if (rangeError()) {
|
|
5381
|
+
<span class="rpt-error-text">{{ rangeError() }}</span>
|
|
5382
|
+
} @else if (errorMessage()) {
|
|
5383
|
+
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
5384
|
+
}
|
|
5385
|
+
</div>
|
|
5386
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:5px;box-sizing:border-box}.rpt-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-preset-pills{display:inline-flex;align-items:center;gap:3px;flex-wrap:wrap}.rpt-preset-pill{border:1px solid var(--rpt-color-border, #cbd5e1);background:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);font-size:.6875rem;font-weight:500;padding:1px 7px;border-radius:12px;cursor:pointer;line-height:1.4;transition:all .12s ease}.rpt-preset-pill:hover:not(:disabled){border-color:var(--rpt-color-primary, #2563eb);color:var(--rpt-color-primary, #2563eb);background:#eff6ff}.rpt-preset-pill.is-active{background:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);color:#fff;font-weight:600}.rpt-preset-pill:disabled{cursor:not-allowed;opacity:.5}.rpt-date-range-container{display:flex;align-items:center;gap:8px;width:100%;flex:1;min-height:38px;box-sizing:border-box;padding:3px 8px;background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease}.rpt-date-range-container:focus-within{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-date-range-container.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-date-subfield{display:flex;align-items:center;gap:6px;flex:1;min-width:0}.rpt-date-prefix{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em;color:var(--rpt-color-text-muted, #94a3b8);-webkit-user-select:none;user-select:none}.rpt-date-input{width:100%;border:none;outline:none;background:transparent;font-size:var(--rpt-font-size-base, .84rem);font-family:inherit;color:var(--rpt-color-text, #0f172a);min-width:0;padding:4px 0}.rpt-date-input:disabled{color:var(--rpt-color-text-muted, #94a3b8);cursor:not-allowed}.rpt-range-separator{color:var(--rpt-color-text-muted, #94a3b8);font-size:.8125rem;-webkit-user-select:none;user-select:none;padding:0 2px}.rpt-range-clear-btn{border:none;background:#f1f5f9;color:var(--rpt-color-text-muted, #64748b);width:18px;height:18px;border-radius:50%;font-size:.6875rem;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;transition:background-color .15s ease,color .15s ease}.rpt-range-clear-btn:hover{background-color:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
5387
|
+
}], ctorParameters: () => [] });
|
|
5388
|
+
|
|
5389
|
+
class RptNumberComponent {
|
|
5390
|
+
config = input.required();
|
|
5391
|
+
control = input();
|
|
5392
|
+
fallbackControl = new FormControl(null);
|
|
5393
|
+
formControl = computed(() => this.control() ?? this.fallbackControl);
|
|
5394
|
+
elementId = computed(() => this.config().key || this.config().id);
|
|
5395
|
+
placeholder = computed(() => this.config().properties?.['placeholder'] || '');
|
|
5396
|
+
prefix = computed(() => this.config().properties?.['prefix'] || '');
|
|
5397
|
+
suffix = computed(() => this.config().properties?.['suffix'] || '');
|
|
5398
|
+
minVal = computed(() => this.config().validation?.min ?? this.config().properties?.['min'] ?? null);
|
|
5399
|
+
maxVal = computed(() => this.config().validation?.max ?? this.config().properties?.['max'] ?? null);
|
|
5400
|
+
stepVal = computed(() => this.config().properties?.['step'] ?? 1);
|
|
5401
|
+
isInvalid = computed(() => {
|
|
5402
|
+
const ctrl = this.formControl();
|
|
5403
|
+
return ctrl.invalid && (ctrl.dirty || ctrl.touched);
|
|
5404
|
+
});
|
|
5405
|
+
errorMessage = computed(() => {
|
|
5406
|
+
const ctrl = this.formControl();
|
|
5407
|
+
if (!ctrl.invalid || (!ctrl.dirty && !ctrl.touched)) {
|
|
5408
|
+
return '';
|
|
5409
|
+
}
|
|
5410
|
+
const errors = ctrl.errors;
|
|
5411
|
+
if (!errors)
|
|
5412
|
+
return '';
|
|
5413
|
+
const firstKey = Object.keys(errors)[0];
|
|
5414
|
+
return getValidationMessage(this.config().validation, firstKey);
|
|
5415
|
+
});
|
|
5416
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5417
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptNumberComponent, isStandalone: true, selector: "rpt-number", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
5418
|
+
<div class="rpt-field-group">
|
|
5419
|
+
@if (config().label) {
|
|
5420
|
+
<label [for]="elementId()" class="rpt-label">
|
|
5421
|
+
{{ config().label }}
|
|
5422
|
+
@if (config().validation?.required) {
|
|
5423
|
+
<span class="rpt-required-marker">*</span>
|
|
5424
|
+
}
|
|
5425
|
+
</label>
|
|
5426
|
+
}
|
|
5427
|
+
|
|
5428
|
+
<div class="rpt-input-wrapper" [class.has-prefix]="prefix()" [class.has-suffix]="suffix()">
|
|
5429
|
+
@if (prefix()) {
|
|
5430
|
+
<span class="rpt-affix rpt-prefix">{{ prefix() }}</span>
|
|
5431
|
+
}
|
|
5432
|
+
<input
|
|
5433
|
+
[id]="elementId()"
|
|
5434
|
+
type="number"
|
|
5435
|
+
(wheel)="$any($event.target).blur()"
|
|
5436
|
+
(keydown.arrowup)="$event.preventDefault()"
|
|
5437
|
+
(keydown.arrowdown)="$event.preventDefault()"
|
|
5438
|
+
[formControl]="formControl()"
|
|
5439
|
+
[min]="minVal()"
|
|
5440
|
+
[max]="maxVal()"
|
|
5441
|
+
[step]="stepVal()"
|
|
5442
|
+
[placeholder]="placeholder()"
|
|
5443
|
+
[class.rpt-invalid]="isInvalid()"
|
|
5444
|
+
class="rpt-number-input"
|
|
5445
|
+
/>
|
|
5446
|
+
@if (suffix()) {
|
|
5447
|
+
<span class="rpt-affix rpt-suffix">{{ suffix() }}</span>
|
|
5448
|
+
}
|
|
5449
|
+
</div>
|
|
5450
|
+
|
|
5451
|
+
@if (errorMessage()) {
|
|
5452
|
+
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
5453
|
+
}
|
|
5454
|
+
</div>
|
|
5455
|
+
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:4px;box-sizing:border-box}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-input-wrapper{position:relative;display:flex;align-items:stretch;width:100%;flex:1;min-height:0}.rpt-affix{font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);background-color:var(--rpt-color-surface, #f8fafc);padding:0 10px;height:100%;min-height:38px;display:flex;align-items:center;border:1px solid var(--rpt-color-border, #cbd5e1);-webkit-user-select:none;user-select:none;box-sizing:border-box}.rpt-prefix{border-right:none;border-top-left-radius:var(--rpt-border-radius, 6px);border-bottom-left-radius:var(--rpt-border-radius, 6px)}.rpt-suffix{border-left:none;border-top-right-radius:var(--rpt-border-radius, 6px);border-bottom-right-radius:var(--rpt-border-radius, 6px)}.rpt-number-input::-webkit-inner-spin-button,.rpt-number-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rpt-number-input{-moz-appearance:textfield;appearance:textfield;width:100%;box-sizing:border-box;height:100%;min-height:38px;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease;outline:none}.has-prefix .rpt-number-input{border-top-left-radius:0;border-bottom-left-radius:0}.has-suffix .rpt-number-input{border-top-right-radius:0;border-bottom-right-radius:0}.rpt-number-input:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-number-input:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-number-input:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-number-input.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-number-input.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5456
|
+
}
|
|
5457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptNumberComponent, decorators: [{
|
|
5458
|
+
type: Component,
|
|
5459
|
+
args: [{ selector: 'rpt-number', standalone: true, imports: [ReactiveFormsModule], template: `
|
|
5460
|
+
<div class="rpt-field-group">
|
|
5461
|
+
@if (config().label) {
|
|
5462
|
+
<label [for]="elementId()" class="rpt-label">
|
|
5463
|
+
{{ config().label }}
|
|
5464
|
+
@if (config().validation?.required) {
|
|
5465
|
+
<span class="rpt-required-marker">*</span>
|
|
5466
|
+
}
|
|
5467
|
+
</label>
|
|
5468
|
+
}
|
|
5469
|
+
|
|
5470
|
+
<div class="rpt-input-wrapper" [class.has-prefix]="prefix()" [class.has-suffix]="suffix()">
|
|
5471
|
+
@if (prefix()) {
|
|
5472
|
+
<span class="rpt-affix rpt-prefix">{{ prefix() }}</span>
|
|
5473
|
+
}
|
|
5474
|
+
<input
|
|
5475
|
+
[id]="elementId()"
|
|
5476
|
+
type="number"
|
|
5477
|
+
(wheel)="$any($event.target).blur()"
|
|
5478
|
+
(keydown.arrowup)="$event.preventDefault()"
|
|
5479
|
+
(keydown.arrowdown)="$event.preventDefault()"
|
|
5480
|
+
[formControl]="formControl()"
|
|
5481
|
+
[min]="minVal()"
|
|
5482
|
+
[max]="maxVal()"
|
|
5483
|
+
[step]="stepVal()"
|
|
5484
|
+
[placeholder]="placeholder()"
|
|
5485
|
+
[class.rpt-invalid]="isInvalid()"
|
|
5486
|
+
class="rpt-number-input"
|
|
5487
|
+
/>
|
|
5488
|
+
@if (suffix()) {
|
|
5489
|
+
<span class="rpt-affix rpt-suffix">{{ suffix() }}</span>
|
|
5490
|
+
}
|
|
5491
|
+
</div>
|
|
5492
|
+
|
|
5493
|
+
@if (errorMessage()) {
|
|
5494
|
+
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
5495
|
+
}
|
|
5496
|
+
</div>
|
|
5497
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-field-group{display:flex;flex-direction:column;height:100%;gap:4px;box-sizing:border-box}.rpt-label{font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text, #0f172a);flex-shrink:0}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-input-wrapper{position:relative;display:flex;align-items:stretch;width:100%;flex:1;min-height:0}.rpt-affix{font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);background-color:var(--rpt-color-surface, #f8fafc);padding:0 10px;height:100%;min-height:38px;display:flex;align-items:center;border:1px solid var(--rpt-color-border, #cbd5e1);-webkit-user-select:none;user-select:none;box-sizing:border-box}.rpt-prefix{border-right:none;border-top-left-radius:var(--rpt-border-radius, 6px);border-bottom-left-radius:var(--rpt-border-radius, 6px)}.rpt-suffix{border-left:none;border-top-right-radius:var(--rpt-border-radius, 6px);border-bottom-right-radius:var(--rpt-border-radius, 6px)}.rpt-number-input::-webkit-inner-spin-button,.rpt-number-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rpt-number-input{-moz-appearance:textfield;appearance:textfield;width:100%;box-sizing:border-box;height:100%;min-height:38px;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a);background-color:var(--rpt-color-bg, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);transition:border-color var(--rpt-transition-speed, .15s) ease,box-shadow var(--rpt-transition-speed, .15s) ease;outline:none}.has-prefix .rpt-number-input{border-top-left-radius:0;border-bottom-left-radius:0}.has-suffix .rpt-number-input{border-top-right-radius:0;border-bottom-right-radius:0}.rpt-number-input:hover:not(:disabled){border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-number-input:focus{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-number-input:disabled{background-color:var(--rpt-color-surface, #f8fafc);color:var(--rpt-color-text-muted, #64748b);cursor:not-allowed}.rpt-number-input.rpt-invalid{border-color:var(--rpt-color-danger, #ef4444)}.rpt-number-input.rpt-invalid:focus{box-shadow:0 0 0 3px #ef444440}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
5498
|
+
}] });
|
|
5499
|
+
|
|
5500
|
+
class RptCheckboxComponent {
|
|
5501
|
+
config = input.required();
|
|
5502
|
+
control = input();
|
|
5503
|
+
fallbackControl = new FormControl(false);
|
|
5504
|
+
formControl = computed(() => this.control() ?? this.fallbackControl);
|
|
5505
|
+
elementId = computed(() => this.config().key || this.config().id);
|
|
5506
|
+
isInvalid = computed(() => {
|
|
5507
|
+
const ctrl = this.formControl();
|
|
5508
|
+
return ctrl.invalid && (ctrl.dirty || ctrl.touched);
|
|
5509
|
+
});
|
|
5510
|
+
errorMessage = computed(() => {
|
|
5511
|
+
const ctrl = this.formControl();
|
|
5512
|
+
if (!ctrl.invalid || (!ctrl.dirty && !ctrl.touched)) {
|
|
5513
|
+
return '';
|
|
5514
|
+
}
|
|
5515
|
+
const errors = ctrl.errors;
|
|
5516
|
+
if (!errors)
|
|
5517
|
+
return '';
|
|
5518
|
+
const firstKey = Object.keys(errors)[0];
|
|
5519
|
+
return getValidationMessage(this.config().validation, firstKey);
|
|
5520
|
+
});
|
|
5521
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5522
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RptCheckboxComponent, isStandalone: true, selector: "rpt-checkbox", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
5523
|
+
<div class="rpt-checkbox-field">
|
|
5524
|
+
<label [for]="elementId()" class="rpt-checkbox-label">
|
|
5525
|
+
<input
|
|
5526
|
+
[id]="elementId()"
|
|
5527
|
+
type="checkbox"
|
|
5528
|
+
[formControl]="formControl()"
|
|
5529
|
+
class="rpt-checkbox-input"
|
|
5530
|
+
/>
|
|
5531
|
+
<span class="rpt-custom-checkbox" aria-hidden="true">
|
|
5532
|
+
<svg class="rpt-check-icon" width="12" height="10" viewBox="0 0 12 10" fill="none">
|
|
5533
|
+
<path d="M1 5L4.5 8.5L11 1.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5534
|
+
</svg>
|
|
5535
|
+
</span>
|
|
5536
|
+
<span class="rpt-checkbox-text">
|
|
5537
|
+
{{ config().label }}
|
|
5538
|
+
@if (config().validation?.required) {
|
|
5539
|
+
<span class="rpt-required-marker">*</span>
|
|
5540
|
+
}
|
|
5541
|
+
</span>
|
|
5542
|
+
</label>
|
|
5543
|
+
|
|
5544
|
+
@if (errorMessage()) {
|
|
5545
|
+
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
5546
|
+
}
|
|
5547
|
+
</div>
|
|
5548
|
+
`, isInline: true, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-checkbox-field{display:flex;flex-direction:column;justify-content:flex-end;height:100%;gap:4px;padding-bottom:8px;box-sizing:border-box}.rpt-checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.rpt-checkbox-input{position:absolute;opacity:0;width:0;height:0;margin:0}.rpt-custom-checkbox{width:18px;height:18px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-sm, 4px);background-color:var(--rpt-color-bg, #ffffff);display:flex;align-items:center;justify-content:center;transition:all var(--rpt-transition-speed, .15s) ease;color:var(--rpt-color-text-inverse, #ffffff);flex-shrink:0}.rpt-checkbox-label:hover .rpt-custom-checkbox{border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-checkbox-input:focus-visible+.rpt-custom-checkbox{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-checkbox-input:checked+.rpt-custom-checkbox{background-color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb)}.rpt-check-icon{opacity:0;transform:scale(.6);transition:all var(--rpt-transition-speed, .15s) ease}.rpt-checkbox-input:checked+.rpt-custom-checkbox .rpt-check-icon{opacity:1;transform:scale(1)}.rpt-checkbox-input:disabled+.rpt-custom-checkbox{background-color:var(--rpt-color-surface, #f8fafc);border-color:var(--rpt-color-border, #cbd5e1);cursor:not-allowed}.rpt-checkbox-text{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a)}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5549
|
+
}
|
|
5550
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RptCheckboxComponent, decorators: [{
|
|
5551
|
+
type: Component,
|
|
5552
|
+
args: [{ selector: 'rpt-checkbox', standalone: true, imports: [ReactiveFormsModule], template: `
|
|
5553
|
+
<div class="rpt-checkbox-field">
|
|
5554
|
+
<label [for]="elementId()" class="rpt-checkbox-label">
|
|
5555
|
+
<input
|
|
5556
|
+
[id]="elementId()"
|
|
5557
|
+
type="checkbox"
|
|
5558
|
+
[formControl]="formControl()"
|
|
5559
|
+
class="rpt-checkbox-input"
|
|
5560
|
+
/>
|
|
5561
|
+
<span class="rpt-custom-checkbox" aria-hidden="true">
|
|
5562
|
+
<svg class="rpt-check-icon" width="12" height="10" viewBox="0 0 12 10" fill="none">
|
|
5563
|
+
<path d="M1 5L4.5 8.5L11 1.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5564
|
+
</svg>
|
|
5565
|
+
</span>
|
|
5566
|
+
<span class="rpt-checkbox-text">
|
|
5567
|
+
{{ config().label }}
|
|
5568
|
+
@if (config().validation?.required) {
|
|
5569
|
+
<span class="rpt-required-marker">*</span>
|
|
5570
|
+
}
|
|
5571
|
+
</span>
|
|
5572
|
+
</label>
|
|
5573
|
+
|
|
5574
|
+
@if (errorMessage()) {
|
|
5575
|
+
<span class="rpt-error-text">{{ errorMessage() }}</span>
|
|
5576
|
+
}
|
|
5577
|
+
</div>
|
|
5578
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%;height:100%;box-sizing:border-box;font-family:var(--rpt-font-family, inherit)}.rpt-checkbox-field{display:flex;flex-direction:column;justify-content:flex-end;height:100%;gap:4px;padding-bottom:8px;box-sizing:border-box}.rpt-checkbox-label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.rpt-checkbox-input{position:absolute;opacity:0;width:0;height:0;margin:0}.rpt-custom-checkbox{width:18px;height:18px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-sm, 4px);background-color:var(--rpt-color-bg, #ffffff);display:flex;align-items:center;justify-content:center;transition:all var(--rpt-transition-speed, .15s) ease;color:var(--rpt-color-text-inverse, #ffffff);flex-shrink:0}.rpt-checkbox-label:hover .rpt-custom-checkbox{border-color:var(--rpt-color-border-hover, #94a3b8)}.rpt-checkbox-input:focus-visible+.rpt-custom-checkbox{border-color:var(--rpt-color-border-focus, #2563eb);box-shadow:var(--rpt-box-shadow-focus, 0 0 0 3px rgba(37, 99, 235, .25))}.rpt-checkbox-input:checked+.rpt-custom-checkbox{background-color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb)}.rpt-check-icon{opacity:0;transform:scale(.6);transition:all var(--rpt-transition-speed, .15s) ease}.rpt-checkbox-input:checked+.rpt-custom-checkbox .rpt-check-icon{opacity:1;transform:scale(1)}.rpt-checkbox-input:disabled+.rpt-custom-checkbox{background-color:var(--rpt-color-surface, #f8fafc);border-color:var(--rpt-color-border, #cbd5e1);cursor:not-allowed}.rpt-checkbox-text{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text, #0f172a)}.rpt-required-marker{color:var(--rpt-color-danger, #ef4444);margin-left:2px}.rpt-error-text{font-size:.7rem;color:var(--rpt-color-danger, #ef4444);margin-top:3px;line-height:1.25;max-width:100%;overflow-wrap:anywhere;word-break:break-word;display:block}\n"] }]
|
|
5579
|
+
}] });
|
|
5432
5580
|
|
|
5433
5581
|
class RptButtonComponent {
|
|
5434
5582
|
config = input.required();
|
|
@@ -6703,7 +6851,7 @@ class RptRadioComponent {
|
|
|
6703
6851
|
const isApi = ds.sourceType === 'api' || !!ds.apiEndpoint;
|
|
6704
6852
|
const isDbLookup = !!(ds.entityName && (ds.sourceType === 'table' || ds.sourceType === 'procedure'));
|
|
6705
6853
|
if ((isApi || isDbLookup) && this.lookupAdapter) {
|
|
6706
|
-
const formValues = this.parentForm()
|
|
6854
|
+
const formValues = this.parentForm() ? extractReportFormValues(this.parentForm()) : {};
|
|
6707
6855
|
const missing = findMissingCanvasFields(ds.parameterMappings, formValues);
|
|
6708
6856
|
if (missing.length > 0) {
|
|
6709
6857
|
this.lookupSub?.unsubscribe();
|
|
@@ -11149,9 +11297,9 @@ class DesignerStateService {
|
|
|
11149
11297
|
*/
|
|
11150
11298
|
updateGridDataSourceParameters(mappings) {
|
|
11151
11299
|
this.mutateDefinition((def) => {
|
|
11152
|
-
const gridDsId = def.grid?.dataSourceId;
|
|
11153
11300
|
const sources = def.dataSources ?? [];
|
|
11154
|
-
const
|
|
11301
|
+
const effective = resolveExecutionDataSource(def);
|
|
11302
|
+
const targetIdx = sources.findIndex(s => s.id === effective?.id);
|
|
11155
11303
|
if (targetIdx >= 0) {
|
|
11156
11304
|
const nextSources = [...sources];
|
|
11157
11305
|
nextSources[targetIdx] = {
|
|
@@ -11161,6 +11309,7 @@ class DesignerStateService {
|
|
|
11161
11309
|
return {
|
|
11162
11310
|
...def,
|
|
11163
11311
|
dataSources: nextSources,
|
|
11312
|
+
grid: def.grid ? { ...def.grid, dataSourceId: nextSources[targetIdx].id } : def.grid,
|
|
11164
11313
|
};
|
|
11165
11314
|
}
|
|
11166
11315
|
return def;
|
|
@@ -12615,9 +12764,9 @@ class DesignerToolbarComponent {
|
|
|
12615
12764
|
}
|
|
12616
12765
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignerToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12617
12766
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DesignerToolbarComponent, isStandalone: true, selector: "rpt-designer-toolbar", inputs: { isLeftPanelCollapsed: { classPropertyName: "isLeftPanelCollapsed", publicName: "isLeftPanelCollapsed", isSignal: true, isRequired: false, transformFunction: null }, isRightPanelCollapsed: { classPropertyName: "isRightPanelCollapsed", publicName: "isRightPanelCollapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleLeftPanel: "toggleLeftPanel", toggleRightPanel: "toggleRightPanel", saveRequested: "saveRequested" }, ngImport: i0, template: `
|
|
12618
|
-
<div class="toolbar-root">
|
|
12767
|
+
<div class="rpt-toolbar-root">
|
|
12619
12768
|
<!-- Left: Panel toggle, Title, Inline Rename, + New Report, Switcher & Dirty indicator -->
|
|
12620
|
-
<div class="toolbar-left">
|
|
12769
|
+
<div class="rpt-toolbar-left">
|
|
12621
12770
|
@if (viewMode() === 'design') {
|
|
12622
12771
|
<button
|
|
12623
12772
|
type="button"
|
|
@@ -12692,7 +12841,7 @@ class DesignerToolbarComponent {
|
|
|
12692
12841
|
</div>
|
|
12693
12842
|
|
|
12694
12843
|
<!-- Center: Mode Switcher -->
|
|
12695
|
-
<div class="toolbar-center">
|
|
12844
|
+
<div class="rpt-toolbar-center">
|
|
12696
12845
|
<div class="mode-pill-group" role="tablist" aria-label="Workbench View Mode">
|
|
12697
12846
|
<button
|
|
12698
12847
|
type="button"
|
|
@@ -12728,7 +12877,7 @@ class DesignerToolbarComponent {
|
|
|
12728
12877
|
</div>
|
|
12729
12878
|
|
|
12730
12879
|
<!-- Right: Undo, Redo, Blueprints, Grid, Export, Save -->
|
|
12731
|
-
<div class="toolbar-right">
|
|
12880
|
+
<div class="rpt-toolbar-right">
|
|
12732
12881
|
<div class="history-group">
|
|
12733
12882
|
<button
|
|
12734
12883
|
type="button"
|
|
@@ -12855,14 +13004,14 @@ class DesignerToolbarComponent {
|
|
|
12855
13004
|
</div>
|
|
12856
13005
|
}
|
|
12857
13006
|
</div>
|
|
12858
|
-
`, isInline: true, styles: [":host{display:block;background:var(--rpt-color-surface, #ffffff);color:var(--rpt-color-text, #0f172a);height:56px;font-family:var(--rpt-font-family, inherit);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);box-sizing:border-box;position:relative;box-shadow:0 1px 3px #0000000a;z-index:30;flex-shrink:0}.toolbar-root{display:flex;align-items:center;justify-content:flex-start;height:100%;padding:0 16px;gap:8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;box-sizing:border-box}.toolbar-root::-webkit-scrollbar{display:none}.toolbar-left{display:flex;align-items:center;gap:8px;min-width:0;flex-shrink:0}.toolbar-right{display:flex;align-items:center;gap:6px;min-width:0;flex-shrink:0;margin-left:auto;justify-content:flex-end}.toolbar-center{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin:0 auto}.report-identity{display:flex;align-items:center;gap:8px;min-width:0}.report-name{font-weight:600;font-size:.9rem;letter-spacing:-.01em;color:var(--rpt-color-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px;cursor:pointer;padding:2px 6px;border-radius:4px;border:1px dashed transparent;transition:all .12s ease}.report-name:hover{background:#f1f5f9;border-color:#cbd5e1}.report-name-input{font-weight:600;font-size:.9rem;color:var(--rpt-color-text, #0f172a);border:1px solid var(--rpt-color-primary, #2563eb);border-radius:4px;padding:2px 6px;outline:none;box-shadow:0 0 0 2px #2563eb33;background:#fff;max-width:220px;box-sizing:border-box}.btn-new-report{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;background:#f8fafc;color:var(--rpt-color-text-muted, #64748b);cursor:pointer;transition:all .12s ease}.btn-new-report:hover{background:#e2e8f0;color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb)}.report-switcher-select{height:26px;padding:0 6px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;background:#f8fafc;color:var(--rpt-color-text, #334155);font-size:.75rem;font-weight:500;cursor:pointer;max-width:140px;outline:none;transition:border-color .12s ease}.report-switcher-select:hover{border-color:#94a3b8}.dirty-badge{font-size:.65rem;font-weight:600;color:#b45309;background:#fef3c7;border:1px solid #fde68a;padding:1px 6px;border-radius:9999px;white-space:nowrap;flex-shrink:0}.mode-pill-group{display:flex;background:#f1f5f9;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);padding:3px;gap:2px;flex-shrink:0}.mode-btn{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text-muted, #64748b);background:transparent;border:none;border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap}.mode-btn:hover{color:var(--rpt-color-text, #0f172a);background:#0000000a}.mode-btn.active{background:#fff;color:var(--rpt-color-primary, #2563eb);font-weight:600;box-shadow:0 1px 3px #00000014}.history-group{display:flex;gap:2px;flex-shrink:0}.tool-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text-secondary, #334155);background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap;flex-shrink:0}.tool-btn:hover:not(:disabled){background:var(--rpt-color-surface-hover, #f8fafc);color:var(--rpt-color-text, #0f172a);border-color:var(--rpt-color-border-hover, #94a3b8)}.tool-btn:disabled{opacity:.45;cursor:not-allowed}.btn-panel-toggle{padding:6px 8px;color:var(--rpt-color-text-muted, #64748b)}.btn-panel-toggle:hover:not(:disabled){color:var(--rpt-color-text, #0f172a);background:var(--rpt-color-surface-hover, #f8fafc)}.btn-panel-toggle.active{background:#eff6ff;border-color:#bfdbfe;color:var(--rpt-color-primary, #2563eb)}.actions-divider{width:1px;height:20px;background:var(--rpt-color-border, #cbd5e1);flex-shrink:0}.btn-blueprints{background:#faf5ff;border-color:#e9d5ff;color:#7c3aed}.btn-blueprints:hover:not(:disabled){background:#f3e8ff;color:#6d28d9;border-color:#c084fc}.btn-save{background:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);color:#fff;font-weight:600}.btn-save:hover:not(:disabled){background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8)}.btn-export{background:#fff;color:var(--rpt-color-text-secondary, #334155)}.btn-grid-action{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a}.btn-grid-action:hover:not(:disabled){background:#dcfce7;color:#15803d;border-color:#86efac}.btn-grid-configured{background:#eff6ff;border-color:#bfdbfe;color:#2563eb}.btn-grid-configured:hover:not(:disabled){background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}@media (max-width: 1024px){.toolbar-root{padding:0 12px;gap:6px}.report-name{max-width:140px}.btn-blueprints .btn-label,.btn-export .btn-label{display:none}.tool-btn{padding:6px 9px}}@media (max-width: 900px){:host{height:48px}.toolbar-root{padding:0 8px;gap:4px}.btn-panel-toggle{display:none!important}.report-name{max-width:100px;font-size:.8125rem}.actions-divider{display:none}.tool-btn .btn-label{display:none!important}.tool-btn{padding:5px 7px;min-width:30px;height:30px;justify-content:center}.mode-pill-group{padding:2px;gap:1px}.mode-btn{padding:4px 8px;font-size:.725rem;gap:4px}}@media (max-width: 680px){:host{height:46px}.toolbar-root{padding:0 6px;gap:3px}.report-name{max-width:75px;font-size:.75rem}.dirty-badge{font-size:.6rem;padding:1px 4px}.mode-btn .mode-label{display:none}.mode-btn{padding:5px 8px}.tool-btn{min-width:28px;height:28px;padding:4px 6px}.toolbar-right{gap:3px}}.blueprint-backdrop{position:fixed;inset:0;background:#0f172a73;backdrop-filter:blur(4px);z-index:2000;animation:rpt-fade-in .15s ease-out}.blueprint-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(840px,92vw);max-height:85vh;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-xl, 12px);box-shadow:var(--rpt-box-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, .15));z-index:2001;display:flex;flex-direction:column;overflow:hidden;animation:rpt-modal-in .18s cubic-bezier(.16,1,.3,1)}@keyframes rpt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes rpt-modal-in{0%{transform:translate(-50%,-46%) scale(.96);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}.blueprint-modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--rpt-color-border, #cbd5e1);background:var(--rpt-color-surface, #f8fafc)}.blueprint-modal-title{font-size:var(--rpt-font-size-lg, 1.125rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 4px}.blueprint-modal-sub{font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);margin:0}.btn-close-modal{background:transparent;border:none;color:var(--rpt-color-text-muted, #64748b);font-size:1.25rem;cursor:pointer;padding:4px;line-height:1;border-radius:4px;transition:all .12s ease}.btn-close-modal:hover{color:var(--rpt-color-text, #0f172a);background:#e2e8f0}.blueprint-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:20px 24px;overflow-y:auto}.blueprint-card{background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);padding:16px;cursor:pointer;display:flex;flex-direction:column;transition:all .15s ease}.blueprint-card:hover{border-color:var(--rpt-color-primary, #2563eb);transform:translateY(-2px);box-shadow:0 8px 24px #2563eb1f}.blueprint-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.blueprint-cat-badge{font-size:.65rem;font-weight:600;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;padding:2px 6px;border-radius:4px}.blueprint-card-icon{color:var(--rpt-color-primary, #2563eb)}.blueprint-card-title{font-size:var(--rpt-font-size-base, .875rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 6px}.blueprint-card-desc{font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);line-height:1.4;margin:0 0 16px;flex:1}.blueprint-card-footer{margin-top:auto}.btn-apply-blueprint{width:100%;background:var(--rpt-color-primary, #2563eb);color:#fff;border:none;border-radius:var(--rpt-border-radius, 6px);padding:6px 12px;font-size:.75rem;font-weight:600;cursor:pointer;transition:background .12s ease}.blueprint-card:hover .btn-apply-blueprint{background:var(--rpt-color-primary-hover, #1d4ed8)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
13007
|
+
`, isInline: true, styles: [":host{display:block;background:var(--rpt-color-surface, #ffffff);color:var(--rpt-color-text, #0f172a);height:56px;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);box-sizing:border-box;position:relative;box-shadow:0 1px 3px #0000000a;z-index:30;flex-shrink:0}:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;align-self:center;width:auto;min-width:0;max-width:none;height:var(--rpt-toolbar-control-height, 32px);min-height:0;max-height:none;margin:0;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif);font-size:var(--rpt-font-size-sm, 12px);font-style:normal;font-weight:500;line-height:1.25;letter-spacing:normal;text-transform:none;white-space:nowrap}:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button.btn-new-report{width:26px;height:26px;padding:0}:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button.mode-btn{height:calc(var(--rpt-toolbar-control-height, 32px) - 4px)}:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button.btn-save,:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button.mode-btn.active{font-weight:600}:host .rpt-toolbar-root input,:host .rpt-toolbar-root select{flex:0 0 auto;font-family:inherit;font-style:normal;line-height:1.25;text-transform:none;letter-spacing:normal}.rpt-toolbar-root{display:flex;align-items:center;justify-content:flex-start;height:100%;padding:0 16px;gap:8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;box-sizing:border-box}.rpt-toolbar-root::-webkit-scrollbar{display:none}.rpt-toolbar-left{display:flex;align-items:center;gap:8px;min-width:0;flex-shrink:0}.rpt-toolbar-right{display:flex;align-items:center;gap:6px;min-width:0;flex-shrink:0;margin-left:auto;justify-content:flex-end}.rpt-toolbar-center{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin:0 auto}.report-identity{display:flex;align-items:center;gap:8px;min-width:0}.report-name{font-weight:600;font-size:14.4px;letter-spacing:-.01em;color:var(--rpt-color-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px;cursor:pointer;padding:2px 6px;border-radius:4px;border:1px dashed transparent;transition:all .12s ease}.report-name:hover{background:#f1f5f9;border-color:#cbd5e1}.report-name-input{font-weight:600;font-size:14.4px;color:var(--rpt-color-text, #0f172a);border:1px solid var(--rpt-color-primary, #2563eb);border-radius:4px;padding:2px 6px;outline:none;box-shadow:0 0 0 2px #2563eb33;background:#fff;max-width:220px;box-sizing:border-box}.btn-new-report{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;background:#f8fafc;color:var(--rpt-color-text-muted, #64748b);cursor:pointer;transition:all .12s ease}.btn-new-report:hover{background:#e2e8f0;color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb)}.report-switcher-select{height:26px;padding:0 6px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;background:#f8fafc;color:var(--rpt-color-text, #334155);font-size:12px;font-weight:500;cursor:pointer;max-width:140px;outline:none;transition:border-color .12s ease}.report-switcher-select:hover{border-color:#94a3b8}.dirty-badge{font-size:10.4px;font-weight:600;color:#b45309;background:#fef3c7;border:1px solid #fde68a;padding:1px 6px;border-radius:9999px;white-space:nowrap;flex-shrink:0}.mode-pill-group{display:flex;background:#f1f5f9;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);padding:3px;gap:2px;flex-shrink:0}.mode-btn{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;font-size:var(--rpt-font-size-sm, 12px);font-weight:500;color:var(--rpt-color-text-muted, #64748b);background:transparent;border:none;border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap}.mode-btn:hover{color:var(--rpt-color-text, #0f172a);background:#0000000a}.mode-btn.active{background:#fff;color:var(--rpt-color-primary, #2563eb);font-weight:600;box-shadow:0 1px 3px #00000014}.history-group{display:flex;gap:2px;flex-shrink:0}.tool-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;font-size:var(--rpt-font-size-sm, 12px);font-weight:500;color:var(--rpt-color-text-secondary, #334155);background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap;flex-shrink:0}.tool-btn:hover:not(:disabled){background:var(--rpt-color-surface-hover, #f8fafc);color:var(--rpt-color-text, #0f172a);border-color:var(--rpt-color-border-hover, #94a3b8)}.tool-btn:disabled{opacity:.45;cursor:not-allowed}.btn-panel-toggle{padding:6px 8px;color:var(--rpt-color-text-muted, #64748b)}.btn-panel-toggle:hover:not(:disabled){color:var(--rpt-color-text, #0f172a);background:var(--rpt-color-surface-hover, #f8fafc)}.btn-panel-toggle.active{background:#eff6ff;border-color:#bfdbfe;color:var(--rpt-color-primary, #2563eb)}.actions-divider{width:1px;height:20px;background:var(--rpt-color-border, #cbd5e1);flex-shrink:0}.btn-blueprints{background:#faf5ff;border-color:#e9d5ff;color:#7c3aed}.btn-blueprints:hover:not(:disabled){background:#f3e8ff;color:#6d28d9;border-color:#c084fc}.btn-save{background:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);color:#fff;font-weight:600}.btn-save:hover:not(:disabled){background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8)}.btn-export{background:#fff;color:var(--rpt-color-text-secondary, #334155)}.btn-grid-action{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a}.btn-grid-action:hover:not(:disabled){background:#dcfce7;color:#15803d;border-color:#86efac}.btn-grid-configured{background:#eff6ff;border-color:#bfdbfe;color:#2563eb}.btn-grid-configured:hover:not(:disabled){background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}@media (max-width: 1024px){.rpt-toolbar-root{padding:0 12px;gap:6px}.report-name{max-width:140px}.btn-blueprints .btn-label,.btn-export .btn-label{display:none}.tool-btn{padding:6px 9px}}@media (max-width: 900px){:host{--rpt-toolbar-control-height: 30px}:host{height:48px}.rpt-toolbar-root{padding:0 8px;gap:4px}.btn-panel-toggle{display:none!important}.report-name{max-width:100px;font-size:13px}.actions-divider{display:none}.tool-btn .btn-label{display:none!important}.tool-btn{padding:5px 7px;min-width:30px;height:30px;justify-content:center}.mode-pill-group{padding:2px;gap:1px}.mode-btn{padding:4px 8px;font-size:11.6px;gap:4px}}@media (max-width: 680px){:host{--rpt-toolbar-control-height: 28px}:host{height:46px}.rpt-toolbar-root{padding:0 6px;gap:3px}.report-name{max-width:75px;font-size:12px}.dirty-badge{font-size:9.6px;padding:1px 4px}.mode-btn .mode-label{display:none}.mode-btn{padding:5px 8px}.tool-btn{min-width:28px;height:28px;padding:4px 6px}.rpt-toolbar-right{gap:3px}}.blueprint-backdrop{position:fixed;inset:0;background:#0f172a73;backdrop-filter:blur(4px);z-index:2000;animation:rpt-fade-in .15s ease-out}.blueprint-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(840px,92vw);max-height:85vh;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-xl, 12px);box-shadow:var(--rpt-box-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, .15));z-index:2001;display:flex;flex-direction:column;overflow:hidden;animation:rpt-modal-in .18s cubic-bezier(.16,1,.3,1)}@keyframes rpt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes rpt-modal-in{0%{transform:translate(-50%,-46%) scale(.96);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}.blueprint-modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--rpt-color-border, #cbd5e1);background:var(--rpt-color-surface, #f8fafc)}.blueprint-modal-title{font-size:var(--rpt-font-size-lg, 18px);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 4px}.blueprint-modal-sub{font-size:var(--rpt-font-size-sm, 12px);color:var(--rpt-color-text-muted, #64748b);margin:0}.btn-close-modal{background:transparent;border:none;color:var(--rpt-color-text-muted, #64748b);font-size:20px;cursor:pointer;padding:4px;line-height:1;border-radius:4px;transition:all .12s ease}.btn-close-modal:hover{color:var(--rpt-color-text, #0f172a);background:#e2e8f0}.blueprint-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:20px 24px;overflow-y:auto}.blueprint-card{background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);padding:16px;cursor:pointer;display:flex;flex-direction:column;transition:all .15s ease}.blueprint-card:hover{border-color:var(--rpt-color-primary, #2563eb);transform:translateY(-2px);box-shadow:0 8px 24px #2563eb1f}.blueprint-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.blueprint-cat-badge{font-size:10.4px;font-weight:600;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;padding:2px 6px;border-radius:4px}.blueprint-card-icon{color:var(--rpt-color-primary, #2563eb)}.blueprint-card-title{font-size:var(--rpt-font-size-base, 14px);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 6px}.blueprint-card-desc{font-size:var(--rpt-font-size-sm, 12px);color:var(--rpt-color-text-muted, #64748b);line-height:1.4;margin:0 0 16px;flex:1}.blueprint-card-footer{margin-top:auto}.btn-apply-blueprint{width:100%;background:var(--rpt-color-primary, #2563eb);color:#fff;border:none;border-radius:var(--rpt-border-radius, 6px);padding:6px 12px;font-size:12px;font-weight:600;cursor:pointer;transition:background .12s ease}.blueprint-card:hover .btn-apply-blueprint{background:var(--rpt-color-primary-hover, #1d4ed8)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12859
13008
|
}
|
|
12860
13009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignerToolbarComponent, decorators: [{
|
|
12861
13010
|
type: Component,
|
|
12862
13011
|
args: [{ selector: 'rpt-designer-toolbar', standalone: true, imports: [CommonModule, FormsModule, RptIconComponent], template: `
|
|
12863
|
-
<div class="toolbar-root">
|
|
13012
|
+
<div class="rpt-toolbar-root">
|
|
12864
13013
|
<!-- Left: Panel toggle, Title, Inline Rename, + New Report, Switcher & Dirty indicator -->
|
|
12865
|
-
<div class="toolbar-left">
|
|
13014
|
+
<div class="rpt-toolbar-left">
|
|
12866
13015
|
@if (viewMode() === 'design') {
|
|
12867
13016
|
<button
|
|
12868
13017
|
type="button"
|
|
@@ -12937,7 +13086,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
12937
13086
|
</div>
|
|
12938
13087
|
|
|
12939
13088
|
<!-- Center: Mode Switcher -->
|
|
12940
|
-
<div class="toolbar-center">
|
|
13089
|
+
<div class="rpt-toolbar-center">
|
|
12941
13090
|
<div class="mode-pill-group" role="tablist" aria-label="Workbench View Mode">
|
|
12942
13091
|
<button
|
|
12943
13092
|
type="button"
|
|
@@ -12973,7 +13122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
12973
13122
|
</div>
|
|
12974
13123
|
|
|
12975
13124
|
<!-- Right: Undo, Redo, Blueprints, Grid, Export, Save -->
|
|
12976
|
-
<div class="toolbar-right">
|
|
13125
|
+
<div class="rpt-toolbar-right">
|
|
12977
13126
|
<div class="history-group">
|
|
12978
13127
|
<button
|
|
12979
13128
|
type="button"
|
|
@@ -13100,7 +13249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
13100
13249
|
</div>
|
|
13101
13250
|
}
|
|
13102
13251
|
</div>
|
|
13103
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;background:var(--rpt-color-surface, #ffffff);color:var(--rpt-color-text, #0f172a);height:56px;font-family:var(--rpt-font-family, inherit);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);box-sizing:border-box;position:relative;box-shadow:0 1px 3px #0000000a;z-index:30;flex-shrink:0}.toolbar-root{display:flex;align-items:center;justify-content:flex-start;height:100%;padding:0 16px;gap:8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;box-sizing:border-box}.toolbar-root::-webkit-scrollbar{display:none}.toolbar-left{display:flex;align-items:center;gap:8px;min-width:0;flex-shrink:0}.toolbar-right{display:flex;align-items:center;gap:6px;min-width:0;flex-shrink:0;margin-left:auto;justify-content:flex-end}.toolbar-center{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin:0 auto}.report-identity{display:flex;align-items:center;gap:8px;min-width:0}.report-name{font-weight:600;font-size:.9rem;letter-spacing:-.01em;color:var(--rpt-color-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px;cursor:pointer;padding:2px 6px;border-radius:4px;border:1px dashed transparent;transition:all .12s ease}.report-name:hover{background:#f1f5f9;border-color:#cbd5e1}.report-name-input{font-weight:600;font-size:.9rem;color:var(--rpt-color-text, #0f172a);border:1px solid var(--rpt-color-primary, #2563eb);border-radius:4px;padding:2px 6px;outline:none;box-shadow:0 0 0 2px #2563eb33;background:#fff;max-width:220px;box-sizing:border-box}.btn-new-report{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;background:#f8fafc;color:var(--rpt-color-text-muted, #64748b);cursor:pointer;transition:all .12s ease}.btn-new-report:hover{background:#e2e8f0;color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb)}.report-switcher-select{height:26px;padding:0 6px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;background:#f8fafc;color:var(--rpt-color-text, #334155);font-size:.75rem;font-weight:500;cursor:pointer;max-width:140px;outline:none;transition:border-color .12s ease}.report-switcher-select:hover{border-color:#94a3b8}.dirty-badge{font-size:.65rem;font-weight:600;color:#b45309;background:#fef3c7;border:1px solid #fde68a;padding:1px 6px;border-radius:9999px;white-space:nowrap;flex-shrink:0}.mode-pill-group{display:flex;background:#f1f5f9;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);padding:3px;gap:2px;flex-shrink:0}.mode-btn{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text-muted, #64748b);background:transparent;border:none;border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap}.mode-btn:hover{color:var(--rpt-color-text, #0f172a);background:#0000000a}.mode-btn.active{background:#fff;color:var(--rpt-color-primary, #2563eb);font-weight:600;box-shadow:0 1px 3px #00000014}.history-group{display:flex;gap:2px;flex-shrink:0}.tool-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;color:var(--rpt-color-text-secondary, #334155);background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap;flex-shrink:0}.tool-btn:hover:not(:disabled){background:var(--rpt-color-surface-hover, #f8fafc);color:var(--rpt-color-text, #0f172a);border-color:var(--rpt-color-border-hover, #94a3b8)}.tool-btn:disabled{opacity:.45;cursor:not-allowed}.btn-panel-toggle{padding:6px 8px;color:var(--rpt-color-text-muted, #64748b)}.btn-panel-toggle:hover:not(:disabled){color:var(--rpt-color-text, #0f172a);background:var(--rpt-color-surface-hover, #f8fafc)}.btn-panel-toggle.active{background:#eff6ff;border-color:#bfdbfe;color:var(--rpt-color-primary, #2563eb)}.actions-divider{width:1px;height:20px;background:var(--rpt-color-border, #cbd5e1);flex-shrink:0}.btn-blueprints{background:#faf5ff;border-color:#e9d5ff;color:#7c3aed}.btn-blueprints:hover:not(:disabled){background:#f3e8ff;color:#6d28d9;border-color:#c084fc}.btn-save{background:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);color:#fff;font-weight:600}.btn-save:hover:not(:disabled){background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8)}.btn-export{background:#fff;color:var(--rpt-color-text-secondary, #334155)}.btn-grid-action{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a}.btn-grid-action:hover:not(:disabled){background:#dcfce7;color:#15803d;border-color:#86efac}.btn-grid-configured{background:#eff6ff;border-color:#bfdbfe;color:#2563eb}.btn-grid-configured:hover:not(:disabled){background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}@media (max-width: 1024px){.toolbar-root{padding:0 12px;gap:6px}.report-name{max-width:140px}.btn-blueprints .btn-label,.btn-export .btn-label{display:none}.tool-btn{padding:6px 9px}}@media (max-width: 900px){:host{height:48px}.toolbar-root{padding:0 8px;gap:4px}.btn-panel-toggle{display:none!important}.report-name{max-width:100px;font-size:.8125rem}.actions-divider{display:none}.tool-btn .btn-label{display:none!important}.tool-btn{padding:5px 7px;min-width:30px;height:30px;justify-content:center}.mode-pill-group{padding:2px;gap:1px}.mode-btn{padding:4px 8px;font-size:.725rem;gap:4px}}@media (max-width: 680px){:host{height:46px}.toolbar-root{padding:0 6px;gap:3px}.report-name{max-width:75px;font-size:.75rem}.dirty-badge{font-size:.6rem;padding:1px 4px}.mode-btn .mode-label{display:none}.mode-btn{padding:5px 8px}.tool-btn{min-width:28px;height:28px;padding:4px 6px}.toolbar-right{gap:3px}}.blueprint-backdrop{position:fixed;inset:0;background:#0f172a73;backdrop-filter:blur(4px);z-index:2000;animation:rpt-fade-in .15s ease-out}.blueprint-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(840px,92vw);max-height:85vh;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-xl, 12px);box-shadow:var(--rpt-box-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, .15));z-index:2001;display:flex;flex-direction:column;overflow:hidden;animation:rpt-modal-in .18s cubic-bezier(.16,1,.3,1)}@keyframes rpt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes rpt-modal-in{0%{transform:translate(-50%,-46%) scale(.96);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}.blueprint-modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--rpt-color-border, #cbd5e1);background:var(--rpt-color-surface, #f8fafc)}.blueprint-modal-title{font-size:var(--rpt-font-size-lg, 1.125rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 4px}.blueprint-modal-sub{font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);margin:0}.btn-close-modal{background:transparent;border:none;color:var(--rpt-color-text-muted, #64748b);font-size:1.25rem;cursor:pointer;padding:4px;line-height:1;border-radius:4px;transition:all .12s ease}.btn-close-modal:hover{color:var(--rpt-color-text, #0f172a);background:#e2e8f0}.blueprint-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:20px 24px;overflow-y:auto}.blueprint-card{background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);padding:16px;cursor:pointer;display:flex;flex-direction:column;transition:all .15s ease}.blueprint-card:hover{border-color:var(--rpt-color-primary, #2563eb);transform:translateY(-2px);box-shadow:0 8px 24px #2563eb1f}.blueprint-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.blueprint-cat-badge{font-size:.65rem;font-weight:600;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;padding:2px 6px;border-radius:4px}.blueprint-card-icon{color:var(--rpt-color-primary, #2563eb)}.blueprint-card-title{font-size:var(--rpt-font-size-base, .875rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 6px}.blueprint-card-desc{font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);line-height:1.4;margin:0 0 16px;flex:1}.blueprint-card-footer{margin-top:auto}.btn-apply-blueprint{width:100%;background:var(--rpt-color-primary, #2563eb);color:#fff;border:none;border-radius:var(--rpt-border-radius, 6px);padding:6px 12px;font-size:.75rem;font-weight:600;cursor:pointer;transition:background .12s ease}.blueprint-card:hover .btn-apply-blueprint{background:var(--rpt-color-primary-hover, #1d4ed8)}\n"] }]
|
|
13252
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;background:var(--rpt-color-surface, #ffffff);color:var(--rpt-color-text, #0f172a);height:56px;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);box-sizing:border-box;position:relative;box-shadow:0 1px 3px #0000000a;z-index:30;flex-shrink:0}:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;align-self:center;width:auto;min-width:0;max-width:none;height:var(--rpt-toolbar-control-height, 32px);min-height:0;max-height:none;margin:0;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif);font-size:var(--rpt-font-size-sm, 12px);font-style:normal;font-weight:500;line-height:1.25;letter-spacing:normal;text-transform:none;white-space:nowrap}:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button.btn-new-report{width:26px;height:26px;padding:0}:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button.mode-btn{height:calc(var(--rpt-toolbar-control-height, 32px) - 4px)}:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button.btn-save,:host .rpt-toolbar-root>:is(.rpt-toolbar-left,.rpt-toolbar-center,.rpt-toolbar-right) button.mode-btn.active{font-weight:600}:host .rpt-toolbar-root input,:host .rpt-toolbar-root select{flex:0 0 auto;font-family:inherit;font-style:normal;line-height:1.25;text-transform:none;letter-spacing:normal}.rpt-toolbar-root{display:flex;align-items:center;justify-content:flex-start;height:100%;padding:0 16px;gap:8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;box-sizing:border-box}.rpt-toolbar-root::-webkit-scrollbar{display:none}.rpt-toolbar-left{display:flex;align-items:center;gap:8px;min-width:0;flex-shrink:0}.rpt-toolbar-right{display:flex;align-items:center;gap:6px;min-width:0;flex-shrink:0;margin-left:auto;justify-content:flex-end}.rpt-toolbar-center{display:flex;align-items:center;justify-content:center;flex-shrink:0;margin:0 auto}.report-identity{display:flex;align-items:center;gap:8px;min-width:0}.report-name{font-weight:600;font-size:14.4px;letter-spacing:-.01em;color:var(--rpt-color-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px;cursor:pointer;padding:2px 6px;border-radius:4px;border:1px dashed transparent;transition:all .12s ease}.report-name:hover{background:#f1f5f9;border-color:#cbd5e1}.report-name-input{font-weight:600;font-size:14.4px;color:var(--rpt-color-text, #0f172a);border:1px solid var(--rpt-color-primary, #2563eb);border-radius:4px;padding:2px 6px;outline:none;box-shadow:0 0 0 2px #2563eb33;background:#fff;max-width:220px;box-sizing:border-box}.btn-new-report{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;background:#f8fafc;color:var(--rpt-color-text-muted, #64748b);cursor:pointer;transition:all .12s ease}.btn-new-report:hover{background:#e2e8f0;color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb)}.report-switcher-select{height:26px;padding:0 6px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;background:#f8fafc;color:var(--rpt-color-text, #334155);font-size:12px;font-weight:500;cursor:pointer;max-width:140px;outline:none;transition:border-color .12s ease}.report-switcher-select:hover{border-color:#94a3b8}.dirty-badge{font-size:10.4px;font-weight:600;color:#b45309;background:#fef3c7;border:1px solid #fde68a;padding:1px 6px;border-radius:9999px;white-space:nowrap;flex-shrink:0}.mode-pill-group{display:flex;background:#f1f5f9;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);padding:3px;gap:2px;flex-shrink:0}.mode-btn{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;font-size:var(--rpt-font-size-sm, 12px);font-weight:500;color:var(--rpt-color-text-muted, #64748b);background:transparent;border:none;border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap}.mode-btn:hover{color:var(--rpt-color-text, #0f172a);background:#0000000a}.mode-btn.active{background:#fff;color:var(--rpt-color-primary, #2563eb);font-weight:600;box-shadow:0 1px 3px #00000014}.history-group{display:flex;gap:2px;flex-shrink:0}.tool-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;font-size:var(--rpt-font-size-sm, 12px);font-weight:500;color:var(--rpt-color-text-secondary, #334155);background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap;flex-shrink:0}.tool-btn:hover:not(:disabled){background:var(--rpt-color-surface-hover, #f8fafc);color:var(--rpt-color-text, #0f172a);border-color:var(--rpt-color-border-hover, #94a3b8)}.tool-btn:disabled{opacity:.45;cursor:not-allowed}.btn-panel-toggle{padding:6px 8px;color:var(--rpt-color-text-muted, #64748b)}.btn-panel-toggle:hover:not(:disabled){color:var(--rpt-color-text, #0f172a);background:var(--rpt-color-surface-hover, #f8fafc)}.btn-panel-toggle.active{background:#eff6ff;border-color:#bfdbfe;color:var(--rpt-color-primary, #2563eb)}.actions-divider{width:1px;height:20px;background:var(--rpt-color-border, #cbd5e1);flex-shrink:0}.btn-blueprints{background:#faf5ff;border-color:#e9d5ff;color:#7c3aed}.btn-blueprints:hover:not(:disabled){background:#f3e8ff;color:#6d28d9;border-color:#c084fc}.btn-save{background:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);color:#fff;font-weight:600}.btn-save:hover:not(:disabled){background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8)}.btn-export{background:#fff;color:var(--rpt-color-text-secondary, #334155)}.btn-grid-action{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a}.btn-grid-action:hover:not(:disabled){background:#dcfce7;color:#15803d;border-color:#86efac}.btn-grid-configured{background:#eff6ff;border-color:#bfdbfe;color:#2563eb}.btn-grid-configured:hover:not(:disabled){background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}@media (max-width: 1024px){.rpt-toolbar-root{padding:0 12px;gap:6px}.report-name{max-width:140px}.btn-blueprints .btn-label,.btn-export .btn-label{display:none}.tool-btn{padding:6px 9px}}@media (max-width: 900px){:host{--rpt-toolbar-control-height: 30px}:host{height:48px}.rpt-toolbar-root{padding:0 8px;gap:4px}.btn-panel-toggle{display:none!important}.report-name{max-width:100px;font-size:13px}.actions-divider{display:none}.tool-btn .btn-label{display:none!important}.tool-btn{padding:5px 7px;min-width:30px;height:30px;justify-content:center}.mode-pill-group{padding:2px;gap:1px}.mode-btn{padding:4px 8px;font-size:11.6px;gap:4px}}@media (max-width: 680px){:host{--rpt-toolbar-control-height: 28px}:host{height:46px}.rpt-toolbar-root{padding:0 6px;gap:3px}.report-name{max-width:75px;font-size:12px}.dirty-badge{font-size:9.6px;padding:1px 4px}.mode-btn .mode-label{display:none}.mode-btn{padding:5px 8px}.tool-btn{min-width:28px;height:28px;padding:4px 6px}.rpt-toolbar-right{gap:3px}}.blueprint-backdrop{position:fixed;inset:0;background:#0f172a73;backdrop-filter:blur(4px);z-index:2000;animation:rpt-fade-in .15s ease-out}.blueprint-modal{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(840px,92vw);max-height:85vh;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-xl, 12px);box-shadow:var(--rpt-box-shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, .15));z-index:2001;display:flex;flex-direction:column;overflow:hidden;animation:rpt-modal-in .18s cubic-bezier(.16,1,.3,1)}@keyframes rpt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes rpt-modal-in{0%{transform:translate(-50%,-46%) scale(.96);opacity:0}to{transform:translate(-50%,-50%) scale(1);opacity:1}}.blueprint-modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px;border-bottom:1px solid var(--rpt-color-border, #cbd5e1);background:var(--rpt-color-surface, #f8fafc)}.blueprint-modal-title{font-size:var(--rpt-font-size-lg, 18px);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 4px}.blueprint-modal-sub{font-size:var(--rpt-font-size-sm, 12px);color:var(--rpt-color-text-muted, #64748b);margin:0}.btn-close-modal{background:transparent;border:none;color:var(--rpt-color-text-muted, #64748b);font-size:20px;cursor:pointer;padding:4px;line-height:1;border-radius:4px;transition:all .12s ease}.btn-close-modal:hover{color:var(--rpt-color-text, #0f172a);background:#e2e8f0}.blueprint-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;padding:20px 24px;overflow-y:auto}.blueprint-card{background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);padding:16px;cursor:pointer;display:flex;flex-direction:column;transition:all .15s ease}.blueprint-card:hover{border-color:var(--rpt-color-primary, #2563eb);transform:translateY(-2px);box-shadow:0 8px 24px #2563eb1f}.blueprint-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.blueprint-cat-badge{font-size:10.4px;font-weight:600;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;padding:2px 6px;border-radius:4px}.blueprint-card-icon{color:var(--rpt-color-primary, #2563eb)}.blueprint-card-title{font-size:var(--rpt-font-size-base, 14px);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 6px}.blueprint-card-desc{font-size:var(--rpt-font-size-sm, 12px);color:var(--rpt-color-text-muted, #64748b);line-height:1.4;margin:0 0 16px;flex:1}.blueprint-card-footer{margin-top:auto}.btn-apply-blueprint{width:100%;background:var(--rpt-color-primary, #2563eb);color:#fff;border:none;border-radius:var(--rpt-border-radius, 6px);padding:6px 12px;font-size:12px;font-weight:600;cursor:pointer;transition:background .12s ease}.blueprint-card:hover .btn-apply-blueprint{background:var(--rpt-color-primary-hover, #1d4ed8)}\n"] }]
|
|
13104
13253
|
}], ctorParameters: () => [] });
|
|
13105
13254
|
|
|
13106
13255
|
class ComponentPaletteComponent {
|
|
@@ -13828,7 +13977,18 @@ function matchesSearchQuery(item, rawQuery) {
|
|
|
13828
13977
|
|
|
13829
13978
|
class DesignCanvasComponent {
|
|
13830
13979
|
requests = new ReportRequestScope();
|
|
13980
|
+
formContext = inject(DesignerFormContextService, { optional: true });
|
|
13831
13981
|
constructor() {
|
|
13982
|
+
effect(onCleanup => {
|
|
13983
|
+
const form = this.canvasForm();
|
|
13984
|
+
untracked(() => this.formContext?.bind(form));
|
|
13985
|
+
const subscription = form.valueChanges.subscribe(() => {
|
|
13986
|
+
this.formContext?.refresh();
|
|
13987
|
+
if (this.gridExecError()?.startsWith('Missing required filter values:') && this.executionService.getMissingFields(this.definition(), this.formBuilder.extractValues(form)).length === 0)
|
|
13988
|
+
this.gridExecError.set(null);
|
|
13989
|
+
});
|
|
13990
|
+
onCleanup(() => subscription.unsubscribe());
|
|
13991
|
+
}, { allowSignalWrites: true });
|
|
13832
13992
|
let previous = '';
|
|
13833
13993
|
effect(() => {
|
|
13834
13994
|
const key = JSON.stringify([this.requests.context(), this.definition().id]);
|
|
@@ -13857,12 +14017,12 @@ class DesignCanvasComponent {
|
|
|
13857
14017
|
currentKeys.add(comp.key);
|
|
13858
14018
|
if (!this._stableCanvasForm.contains(comp.key)) {
|
|
13859
14019
|
const defaultVal = comp.properties?.['defaultValue'] ?? (comp.type === 'checkbox' ? false : '');
|
|
13860
|
-
this._stableCanvasForm.addControl(comp.key, new FormControl(defaultVal));
|
|
14020
|
+
this._stableCanvasForm.addControl(comp.key, new FormControl(defaultVal), { emitEvent: false });
|
|
13861
14021
|
}
|
|
13862
14022
|
}
|
|
13863
14023
|
for (const existingKey of Object.keys(this._stableCanvasForm.controls)) {
|
|
13864
14024
|
if (!currentKeys.has(existingKey)) {
|
|
13865
|
-
this._stableCanvasForm.removeControl(existingKey);
|
|
14025
|
+
this._stableCanvasForm.removeControl(existingKey, { emitEvent: false });
|
|
13866
14026
|
}
|
|
13867
14027
|
}
|
|
13868
14028
|
return this._stableCanvasForm;
|
|
@@ -14121,7 +14281,7 @@ class DesignCanvasComponent {
|
|
|
14121
14281
|
if (!this.definition().grid) {
|
|
14122
14282
|
this.addResultGrid();
|
|
14123
14283
|
}
|
|
14124
|
-
const formValues = this.
|
|
14284
|
+
const formValues = this.formBuilder.extractValues(this.canvasForm());
|
|
14125
14285
|
const missing = this.executionService.getMissingFields(this.definition(), formValues);
|
|
14126
14286
|
if (missing.length > 0) {
|
|
14127
14287
|
this.gridExecError.set('Missing required filter values: ' + missing.join(', ') + '. Please enter values above to run.');
|
|
@@ -14297,7 +14457,7 @@ class DesignCanvasComponent {
|
|
|
14297
14457
|
this.designerState.addComponent(type);
|
|
14298
14458
|
}
|
|
14299
14459
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignCanvasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14300
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DesignCanvasComponent, isStandalone: true, selector: "rpt-design-canvas", host: { listeners: { "document:keydown.escape": "onEscape()" } }, ngImport: i0, template: " <div class=\"canvas-wrapper\" (click)=\"onCanvasBackgroundClick($event)\">\n <!-- Canvas Status / Quick Controls -->\n <div class=\"canvas-toolbar\">\n <div class=\"canvas-info\">\n <span class=\"info-label\">Grid Layout:</span>\n <span class=\"info-value\">{{ totalColumns() }} Columns</span>\n <span class=\"info-divider\">\u2022</span>\n <span class=\"info-label\">Components:</span>\n <span class=\"info-value\">{{ components().length }}</span>\n <span class=\"info-divider\">\u2022</span>\n <span class=\"live-mode-badge\" title=\"Interactive canvas: Values typed here run live queries and test dropdowns.\">\n \u26A1 Live Interactive Mode\n </span>\n </div>\n\n <div class=\"canvas-actions\">\n @if (!definition().grid) {\n <button\n type=\"button\"\n class=\"canvas-action-btn btn-grid-add\"\n (click)=\"addResultGrid($event)\"\n title=\"Add a Result Grid to this report\"\n >\n <rpt-icon name=\"table\" [size]=\"14\" />\n <span>+ Add Grid</span>\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"canvas-action-btn btn-grid-configured\"\n (click)=\"selectGridSettings($event)\"\n title=\"Configure Result Data Grid\"\n >\n <rpt-icon name=\"table\" [size]=\"14\" />\n <span>Grid ({{ definition().grid?.columns?.length ?? 0 }})</span>\n </button>\n }\n\n <button\n type=\"button\"\n class=\"canvas-action-btn\"\n (click)=\"selectReportSettings($event)\"\n title=\"Configure Page Layout & Grid Settings\"\n >\n <rpt-icon name=\"settings\" [size]=\"14\" />\n <span>Report Settings</span>\n </button>\n </div>\n </div>\n\n <!-- Canvas Drop Area -->\n <div class=\"canvas-scroll-area\" cdkScrollable>\n <div\n class=\"canvas-artboard\"\n [style.padding.px]=\"definition().layout.padding ?? 24\"\n >\n <!-- Report Header Preview -->\n <div class=\"canvas-report-header\">\n <h2 class=\"canvas-report-title\">{{ definition().name || 'Untitled Report' }}</h2>\n @if (definition().description) {\n <p class=\"canvas-report-desc\">{{ definition().description }}</p>\n }\n </div>\n\n <!-- Component Drop List Grid with 2D mixed orientation and data binding -->\n <div\n cdkDropList\n id=\"designer-canvas-drop-list\"\n class=\"canvas-grid\"\n cdkDropListOrientation=\"mixed\"\n [cdkDropListData]=\"sortedComponents()\"\n [style.grid-template-columns]=\"gridTemplateColumns()\"\n [style.gap.px]=\"definition().layout.gap ?? 16\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n @for (comp of sortedComponents(); track comp.id; let idx = $index) {\n <div\n cdkDrag\n [cdkDragData]=\"comp\"\n [cdkDragDisabled]=\"isAnyResizing()\"\n class=\"canvas-component-card\"\n [class.is-selected]=\"isSelected(comp.id)\"\n [class.is-resizing]=\"resizingCompId() === comp.id\"\n [class.is-field-highlighted]=\"isFieldHighlighted(comp)\"\n [class.is-narrow]=\"getSpan(comp) <= 4\"\n [class.is-compact]=\"getSpan(comp) <= 2\"\n [style.grid-column]=\"getGridColumn(comp)\"\n [style.grid-row]=\"getGridRow(comp)\"\n [style.width]=\"comp.layout?.width || 'auto'\"\n [style.height]=\"getComponentHeight(comp)\"\n [style.min-height]=\"getComponentMinHeight(comp)\"\n (click)=\"onSelect(comp.id, $event)\"\n >\n <!-- Card Header with Drag Handle & Actions -->\n <div class=\"card-header\">\n <div class=\"card-title-group\" cdkDragHandle title=\"Drag to reorder\">\n <span class=\"drag-handle-dots\">\u22EE\u22EE</span>\n <rpt-icon [name]=\"getComponentIconName(comp.type)\" [size]=\"14\" />\n <span class=\"comp-title\" [title]=\"comp.label || comp.key || comp.type\">\n {{ comp.label || comp.key || comp.type }}\n </span>\n </div>\n\n <div class=\"card-actions\">\n <!-- Static span pill & new row / start col pill when not hovered / not selected -->\n @if (comp.layout?.column; as col) {\n <span class=\"new-row-pill-static\" title=\"Starts at Column {{ col }}\">Col {{ col }}</span>\n } @else if (comp.layout?.newRow) {\n <span class=\"new-row-pill-static\" title=\"Starts on separate row\">\u21B3 Row</span>\n }\n <span\n class=\"span-pill-static\"\n title=\"Column span: {{ getSpan(comp) }} of {{ totalColumns() }} columns\"\n >\n {{ getSpan(comp) }}/{{ totalColumns() }}\n </span>\n\n <!-- Quick Action Stepper & Buttons (revealed on hover or selection) -->\n <div class=\"card-quick-controls\">\n <button\n type=\"button\"\n class=\"card-action-btn\"\n [class.btn-active-toggle]=\"comp.layout?.newRow\"\n (click)=\"toggleNewRow(comp, $event)\"\n title=\"{{ comp.layout?.newRow ? 'Starts on new row (Click to place inline)' : 'Start on separate row (Row Break)' }}\"\n >\n <rpt-icon name=\"corner-down-right\" [size]=\"11\" />\n </button>\n\n <div class=\"span-control-group\" title=\"Adjust Column Span\">\n <button\n type=\"button\"\n class=\"span-btn\"\n [disabled]=\"getSpan(comp) <= 1\"\n (click)=\"adjustSpan(comp, -1, $event)\"\n title=\"Shrink Column Span\"\n >\n <rpt-icon name=\"minus\" [size]=\"9\" />\n </button>\n <span class=\"span-badge\" [title]=\"'Column span: ' + getSpan(comp) + ' of ' + totalColumns()\">\n <span class=\"span-num\">{{ getSpan(comp) }}</span><span class=\"span-total\">/{{ totalColumns() }}</span>\n </span>\n <button\n type=\"button\"\n class=\"span-btn\"\n [disabled]=\"getSpan(comp) >= totalColumns()\"\n (click)=\"adjustSpan(comp, 1, $event)\"\n title=\"Expand Column Span\"\n >\n <rpt-icon name=\"plus\" [size]=\"9\" />\n </button>\n </div>\n\n <button\n type=\"button\"\n class=\"card-action-btn\"\n (click)=\"onDuplicate(comp.id, $event)\"\n title=\"Duplicate component\"\n >\n <rpt-icon name=\"copy\" [size]=\"12\" />\n </button>\n <button\n type=\"button\"\n class=\"card-action-btn btn-delete\"\n (click)=\"onDelete(comp.id, $event)\"\n title=\"Remove component\"\n >\n <rpt-icon name=\"trash\" [size]=\"12\" />\n </button>\n </div>\n </div>\n </div>\n\n <!-- Card Body Visual Preview -->\n <div class=\"card-body\">\n\n @switch (comp.type) {\n @case ('input') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Input' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"text\"\n class=\"canvas-active-input\"\n [placeholder]=\"comp.properties?.['placeholder'] || 'Enter text...'\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-input-box\">{{ comp.properties?.['placeholder'] || 'Enter text...' }}</div>\n }\n </div>\n }\n @case ('dropdown') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-dropdown\n [config]=\"comp\"\n [showStatus]=\"true\"\n [parentForm]=\"canvasForm()\"\n [control]=\"getCanvasControl(comp)\"\n (dropdownClick)=\"onControlInteract(comp)\"\n />\n </div>\n }\n @case ('date') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Date' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"date\"\n class=\"canvas-active-input\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-select-box\">\n <span>YYYY-MM-DD</span>\n <rpt-icon name=\"calendar\" [size]=\"12\" />\n </div>\n }\n </div>\n }\n @case ('date-range') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-date-range\n [config]=\"comp\"\n [control]=\"getCanvasControl(comp)\"\n />\n </div>\n }\n @case ('number') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Number' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"number\"\n class=\"canvas-active-input\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-input-box\">\n {{ comp.properties?.['prefix'] || '' }} 0.00 {{ comp.properties?.['suffix'] || '' }}\n </div>\n }\n </div>\n }\n @case ('checkbox') {\n <div class=\"mock-checkbox-field\" (click)=\"onControlInteract(comp, $event)\">\n @if (getCanvasControl(comp); as ctrl) {\n <label class=\"canvas-active-checkbox-lbl\">\n <input type=\"checkbox\" [formControl]=\"ctrl\" (focus)=\"onControlInteract(comp, $event)\" />\n <span class=\"mock-label\">{{ comp.label || 'Checkbox' }}</span>\n </label>\n } @else {\n <span class=\"mock-check-box\">\n <rpt-icon name=\"check\" [size]=\"10\" />\n </span>\n <span class=\"mock-label\">{{ comp.label || 'Checkbox' }}</span>\n }\n </div>\n }\n @case ('radio') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-radio\n [config]=\"comp\"\n [control]=\"getCanvasControl(comp)\"\n [parentForm]=\"canvasForm()\"\n />\n </div>\n }\n @case ('button') {\n <div class=\"mock-btn-wrapper\">\n <button\n type=\"button\"\n class=\"mock-btn\"\n [class]=\"'btn-' + (comp.properties?.['variant'] || 'primary')\"\n [class.mock-btn-full]=\"comp.properties?.['fullWidth'] === true || comp.layout?.width === '100%'\"\n [style.height]=\"getCustomBtnHeight(comp)\"\n [style.width]=\"getCustomBtnWidth(comp)\"\n (click)=\"onCanvasButtonClick(comp, $event)\"\n >\n @if (getCustomBtnIcon(comp); as btnIcon) {\n <rpt-icon [name]=\"btnIcon\" [size]=\"15\" />\n }\n <span>{{ comp.label || 'Button' }}</span>\n </button>\n </div>\n }\n @case ('kpi-card') {\n <div class=\"mock-kpi-field\">\n <div class=\"mock-kpi-header\">\n <span class=\"mock-label\">{{ comp.label || 'KPI Metric' }}</span>\n <rpt-icon name=\"kpi\" [size]=\"14\" />\n </div>\n <div class=\"mock-kpi-value\">{{ comp.properties?.['value'] || '$128,450' }}</div>\n <div class=\"mock-kpi-footer\">\n <span class=\"mock-kpi-trend\">+12.5%</span>\n <span class=\"mock-kpi-sub\">vs last period</span>\n </div>\n </div>\n }\n @case ('chart') {\n <div class=\"mock-chart-field\">\n <div class=\"mock-chart-header\">\n <span class=\"mock-label\">{{ comp.label || 'Quarterly Sales Revenue ($000)' }}</span>\n </div>\n <div class=\"mock-chart-bars\">\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 44%\"></div>\n <span class=\"mock-bar-lbl\">Q1 Jan-Mar</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 61%\"></div>\n <span class=\"mock-bar-lbl\">Q2 Apr-Jun</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 79%\"></div>\n <span class=\"mock-bar-lbl\">Q3 Jul-Sep</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 100%\"></div>\n <span class=\"mock-bar-lbl\">Q4 Oct-Dec</span>\n </div>\n </div>\n </div>\n }\n @default {\n <div class=\"mock-generic-box\">\n <span>{{ comp.type }}</span>\n </div>\n }\n }\n </div>\n\n <!-- Resizing Handles (East, South, South-East) -->\n <div\n class=\"resize-handle handle-e\"\n (pointerdown)=\"startResize($event, comp, 'e')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize column width \u2022 Double-click to reset\"\n ></div>\n <div\n class=\"resize-handle handle-s\"\n (pointerdown)=\"startResize($event, comp, 's')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize height \u2022 Double-click to reset\"\n ></div>\n <div\n class=\"resize-handle handle-se\"\n (pointerdown)=\"startResize($event, comp, 'se')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize width and height \u2022 Double-click to reset\"\n ></div>\n\n <!-- Resizing Dimension Ghost / Badge -->\n @if (resizingCompId() === comp.id) {\n <div class=\"resize-dimension-tooltip\">\n {{ resizingTooltip(comp) }}\n </div>\n }\n\n <!-- Drag placeholder with matched grid column span -->\n <div\n *cdkDragPlaceholder\n class=\"canvas-drag-placeholder\"\n [style.grid-column]=\"getGridColumn(comp)\"\n ></div>\n\n <!-- Drag preview -->\n <div *cdkDragPreview class=\"canvas-drag-preview\">\n <span class=\"drag-handle-dots\">\u22EE\u22EE</span>\n <rpt-icon [name]=\"getComponentIconName(comp.type)\" [size]=\"14\" />\n <span class=\"preview-title\">{{ comp.label || comp.key || comp.type }}</span>\n <span class=\"preview-span\">{{ getSpan(comp) }}/{{ totalColumns() }}</span>\n </div>\n </div>\n }\n\n @if (components().length === 0) {\n <div class=\"canvas-empty-state\" role=\"region\" aria-label=\"Empty canvas starter options\">\n <div class=\"empty-hero-badge\">\n <rpt-icon name=\"design\" [size]=\"28\" />\n </div>\n <h3 class=\"empty-hero-title\">Start Designing Your Custom Report</h3>\n <p class=\"empty-hero-desc\">\n Drag controls from the left component palette, or jumpstart your design with pre-configured enterprise blueprints.\n </p>\n\n <div class=\"empty-hero-actions\">\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-primary\"\n (click)=\"applyBlueprint('blueprint-audit-register')\"\n title=\"Load complete Audit Register blueprint with parameters and result grid\"\n >\n <rpt-icon name=\"table\" [size]=\"15\" />\n <span>Audit Register Blueprint</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-secondary\"\n (click)=\"applyBlueprint('blueprint-kpi-summary')\"\n title=\"Load Executive KPI summary blueprint\"\n >\n <rpt-icon name=\"chart-bar\" [size]=\"15\" />\n <span>KPI Summary Blueprint</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-outline\"\n (click)=\"addStarterComponent('date-range')\"\n title=\"Add a Date Range filter component\"\n >\n <rpt-icon name=\"calendar\" [size]=\"14\" />\n <span>+ Add Date Filter</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-outline\"\n (click)=\"addStarterComponent('button')\"\n title=\"Add an Execute Action button\"\n >\n <rpt-icon name=\"play\" [size]=\"14\" />\n <span>+ Add Run Button</span>\n </button>\n </div>\n </div>\n }\n </div>\n\n <!-- Live Result Grid Preview with Bways-Grid Features -->\n @if (definition().grid) {\n <div class=\"canvas-grid-box\">\n <div class=\"grid-preview-header\">\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <rpt-icon name=\"table\" [size]=\"15\" />\n <span class=\"grid-title\">Bways Grid ({{ definition().grid?.columns?.length ?? 0 }} columns)</span>\n @if (isExecutingGrid()) {\n <span class=\"grid-exec-badge is-loading\">Loading data from database...</span>\n } @else if (gridExecError()) {\n <span class=\"grid-exec-badge is-error\">{{ gridExecError() }}</span>\n } @else if (canvasGridData().length > 0) {\n <span class=\"grid-exec-badge is-success\">{{ canvasGridData().length }} rows loaded</span>\n }\n </div>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <button\n type=\"button\"\n class=\"btn-canvas-run-grid\"\n (click)=\"executeCanvasReport($event)\"\n [disabled]=\"isExecutingGrid()\"\n title=\"Execute query and load data into Bways Grid\"\n >\n <rpt-icon name=\"play\" [size]=\"11\" />\n <span>{{ isExecutingGrid() ? 'Running...' : 'Run / Refresh Grid' }}</span>\n </button>\n <button\n type=\"button\"\n class=\"btn-canvas-edit-grid\"\n (click)=\"selectGridSettings($event)\"\n title=\"Configure columns and grid options\"\n >\n <rpt-icon name=\"settings\" [size]=\"11\" />\n <span>Configure</span>\n </button>\n <button\n type=\"button\"\n class=\"btn-remove-grid\"\n (click)=\"removeGrid($event)\"\n title=\"Remove Result Grid from this report\"\n >\n <rpt-icon name=\"trash\" [size]=\"13\" />\n </button>\n </div>\n </div>\n\n @if (getGridSummaryText(); as summary) {\n <div class=\"grid-layout-status-strip\">\n <div class=\"grid-status-info\">\n <rpt-icon name=\"table\" [size]=\"12\" />\n <span>{{ summary }}</span>\n </div>\n <div class=\"grid-status-sync\" [class.is-pulsing]=\"layoutJustUpdated()\">\n <rpt-icon name=\"check\" [size]=\"11\" />\n <span>Layout auto-persisted</span>\n </div>\n </div>\n }\n\n <!-- Live Bways Grid bridge -->\n <div class=\"canvas-live-grid-container\" (click)=\"$event.stopPropagation()\" style=\"position: relative; min-height: 250px;\">\n @if (isExecutingGrid()) {\n <div class=\"canvas-grid-loading-overlay\">\n <span class=\"status-dot dot-pulse\" style=\"width: 14px; height: 14px; color: #2563eb; background: #2563eb; border-radius: 50%;\"></span>\n <span class=\"grid-loading-title\">Executing stored procedure on SQL Server...</span>\n <span class=\"grid-loading-sub\">Calculating outstanding balances and ledger amounts. Please wait...</span>\n </div>\n }\n <rpt-grid-bridge\n [gridDefinition]=\"definition().grid!\"\n [data]=\"canvasGridData()\"\n (gridStateChange)=\"onCanvasGridStateChange($event)\"\n (columnDefsChange)=\"onCanvasColumnDefsChange($event)\"\n />\n </div>\n </div>\n } @else {\n <div class=\"canvas-add-grid-banner\" (click)=\"addResultGrid($event)\">\n <div class=\"add-grid-icon\">\n <rpt-icon name=\"table\" [size]=\"20\" />\n </div>\n <div class=\"add-grid-text\">\n <span class=\"add-grid-title\">+ Add Result Data Grid</span>\n <span class=\"add-grid-sub\">Attach an interactive data table or UltraGrid to display report execution output</span>\n </div>\n <button type=\"button\" class=\"btn-banner-add\">Add Grid</button>\n </div>\n }\n </div>\n </div>\n </div>", styles: [":host{display:block;flex:1;min-height:0;min-width:0;height:100%;background-color:#f1f5f9;font-family:var(--rpt-font-family, inherit);box-sizing:border-box}.canvas-wrapper{min-height:0;display:flex;flex-direction:column;height:100%}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:42px;height:42px;padding:0 24px;background:var(--rpt-color-surface, #ffffff);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);box-sizing:border-box;gap:12px;overflow-x:auto;scrollbar-width:none;font-family:var(--rpt-font-family, inherit);flex-shrink:0}.canvas-toolbar::-webkit-scrollbar{display:none}.canvas-info{display:flex;align-items:center;gap:8px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);white-space:nowrap;line-height:1}.info-label{color:var(--rpt-color-text-muted, #64748b);font-weight:500;font-size:var(--rpt-font-size-sm, .75rem)}.info-value{font-weight:600;color:var(--rpt-color-text, #0f172a);font-size:var(--rpt-font-size-sm, .75rem)}.info-divider{color:var(--rpt-color-border, #cbd5e1);margin:0 2px}.live-mode-badge{display:inline-flex;align-items:center;gap:4px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-xs, .7rem);font-weight:600;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;padding:2px 8px;border-radius:9999px;line-height:1}.canvas-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.canvas-action-btn{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;letter-spacing:-.01em;color:var(--rpt-color-text-secondary, #334155);background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;line-height:1;white-space:nowrap;box-shadow:0 1px 2px #0000000a;transition:all var(--rpt-transition-speed, .15s) ease}.canvas-action-btn:hover{background:var(--rpt-color-surface-hover, #f8fafc);border-color:var(--rpt-color-border-hover, #94a3b8);color:var(--rpt-color-text, #0f172a);box-shadow:0 2px 4px #0000000f}.canvas-action-btn.btn-grid-configured{background:#eff6ff;border-color:#bfdbfe;color:#2563eb;font-weight:600}.canvas-action-btn.btn-grid-configured:hover{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}.canvas-action-btn.btn-grid-add{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a;font-weight:600}.canvas-action-btn.btn-grid-add:hover{background:#dcfce7;color:#15803d;border-color:#86efac}.canvas-action-btn:active{transform:translateY(1px)}.canvas-scroll-area{flex:1;min-height:0;overflow-y:auto;padding:16px}.canvas-artboard{width:100%;max-width:1400px;margin:0 auto;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);box-shadow:0 4px 6px -1px #0000000d;min-height:480px;box-sizing:border-box}@media (max-width: 900px){.canvas-toolbar{min-height:36px;height:36px;padding:0 10px;gap:6px}.live-mode-badge{display:none}.canvas-info{font-size:.75rem;gap:5px}.canvas-action-btn{padding:0 8px;font-size:.725rem;height:28px;gap:4px}.canvas-scroll-area{padding:10px}.canvas-artboard{min-height:360px}}@media (max-width: 600px){.canvas-toolbar{padding:0 8px;gap:4px}.canvas-info .info-label,.canvas-action-btn span{display:none}.canvas-action-btn{padding:0 6px;min-width:28px;justify-content:center}}.canvas-report-header{margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--rpt-color-border, #e2e8f0)}.canvas-report-title{font-size:var(--rpt-font-size-xl, 1.5rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 6px}.canvas-report-desc{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #64748b);margin:0}.canvas-grid{display:grid;width:100%;min-height:180px;align-items:start;border-radius:6px;transition:all var(--rpt-transition-speed, .15s) ease}.canvas-component-card{container-type:inline-size;background:#fff;border:1.5px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);box-shadow:var(--rpt-box-shadow, 0 1px 2px rgba(0, 0, 0, .05));box-sizing:border-box;transition:all var(--rpt-transition-speed, .15s) ease;cursor:pointer;position:relative;overflow:visible;display:flex;flex-direction:column;min-height:104px;z-index:1}.canvas-component-card:hover{border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 4px 6px -1px #2563eb1a;z-index:2}.canvas-component-card.is-selected{border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 0 0 2px #2563eb40;z-index:10}.canvas-component-card:focus-within,.canvas-component-card:has(.rpt-combobox-menu),.canvas-component-card:has(.is-open){z-index:100}.canvas-component-card.is-resizing{-webkit-user-select:none;user-select:none;border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 0 0 2px #2563eb59;z-index:30;transition:none!important}.resize-handle{position:absolute;z-index:20;touch-action:none;opacity:0;pointer-events:none;transition:opacity .15s ease}.canvas-component-card.is-selected .resize-handle{opacity:1;pointer-events:auto}.resize-handle.handle-e{top:0;right:0;width:6px;height:100%;cursor:ew-resize;display:flex;align-items:center;justify-content:center}.resize-handle.handle-e:after{content:\"\";width:3px;height:24px;background:#cbd5e1;border-radius:2px;transition:background .15s ease}.resize-handle.handle-e:hover:after,.canvas-component-card.is-selected .resize-handle.handle-e:after{background:var(--rpt-color-primary, #2563eb)}.resize-handle.handle-s{bottom:0;left:0;height:6px;width:100%;cursor:ns-resize;display:flex;align-items:center;justify-content:center}.resize-handle.handle-s:after{content:\"\";height:3px;width:24px;background:#cbd5e1;border-radius:2px;transition:background .15s ease}.resize-handle.handle-s:hover:after,.canvas-component-card.is-selected .resize-handle.handle-s:after{background:var(--rpt-color-primary, #2563eb)}.resize-handle.handle-se{bottom:0;right:0;width:12px;height:12px;cursor:nwse-resize;display:flex;align-items:flex-end;justify-content:flex-end;padding:2px}.resize-handle.handle-se:after{content:\"\";width:5px;height:5px;border-right:2px solid #cbd5e1;border-bottom:2px solid #cbd5e1;transition:border-color .15s ease}.resize-handle.handle-se:hover:after,.canvas-component-card.is-selected .resize-handle.handle-se:after{border-color:var(--rpt-color-primary, #2563eb)}.resize-dimension-tooltip{position:absolute;top:38px;right:8px;background:#0f172ae6;color:#fff;font-size:.7rem;font-weight:600;padding:3px 8px;border-radius:4px;white-space:nowrap;pointer-events:none;z-index:50;box-shadow:0 2px 4px #0003}.card-header{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:5px 8px;background:var(--rpt-color-surface, #f8fafc);border-bottom:1px solid var(--rpt-color-border, #e2e8f0);border-top-left-radius:var(--rpt-border-radius, 6px);border-top-right-radius:var(--rpt-border-radius, 6px);min-height:32px;box-sizing:border-box;overflow:hidden;position:relative}.canvas-component-card.is-selected .card-header{overflow:visible}.card-title-group{display:flex;align-items:center;gap:5px;cursor:grab;min-width:0;flex:1;overflow:hidden}.drag-handle-dots{color:var(--rpt-color-text-muted, #94a3b8);font-size:.85rem;letter-spacing:-2px;flex-shrink:0;-webkit-user-select:none;user-select:none}.comp-title{font-size:.75rem;font-weight:600;color:var(--rpt-color-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.card-actions{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:auto}.new-row-pill-static{font-size:.65rem;font-weight:600;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;padding:1px 5px;border-radius:9999px;white-space:nowrap;line-height:1;flex-shrink:0}.span-pill-static{display:inline-flex;align-items:center;justify-content:center;font-size:.65rem;font-weight:600;color:var(--rpt-color-text-muted, #64748b);background:var(--rpt-color-surface, #f1f5f9);border:1px solid var(--rpt-color-border, #e2e8f0);padding:1px 6px;border-radius:9999px;line-height:1.2;white-space:nowrap;-webkit-user-select:none;user-select:none}.card-quick-controls{display:none;align-items:center;gap:3px;flex-shrink:0}.canvas-component-card:hover .span-pill-static,.canvas-component-card.is-selected .span-pill-static,.canvas-component-card:hover .new-row-pill-static,.canvas-component-card.is-selected .new-row-pill-static{display:none}.canvas-component-card:hover .card-quick-controls,.canvas-component-card.is-selected .card-quick-controls{display:inline-flex}.canvas-component-card.is-narrow .card-header{padding:4px 6px;gap:3px}.canvas-component-card.is-narrow:hover .comp-title,.canvas-component-card.is-narrow.is-selected .comp-title,.canvas-component-card.is-narrow:hover .drag-handle-dots,.canvas-component-card.is-narrow.is-selected .drag-handle-dots{display:none}.canvas-component-card.is-narrow .card-quick-controls{gap:2px}.canvas-component-card.is-narrow .span-control-group{height:18px}.canvas-component-card.is-narrow .span-btn{width:14px;height:16px}.canvas-component-card.is-narrow .span-badge{font-size:.6rem;padding:0 2px}.canvas-component-card.is-narrow .span-total{display:none}.canvas-component-card.is-narrow .card-action-btn{width:18px;height:18px}@container (max-width: 250px){.card-header{padding:4px 6px;gap:3px}.canvas-component-card:hover .comp-title,.canvas-component-card.is-selected .comp-title,.canvas-component-card:hover .drag-handle-dots,.canvas-component-card.is-selected .drag-handle-dots,.span-total{display:none}.card-quick-controls{gap:2px}.card-action-btn{width:18px;height:18px}.span-control-group{height:18px}.span-btn{width:14px;height:16px}.span-badge{font-size:.6rem;padding:0 2px}}@container (max-width: 160px){.canvas-component-card.is-selected .card-quick-controls{position:absolute;top:-30px;right:0;background:#fff;border:1.5px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:2px 4px;gap:3px;box-shadow:0 4px 12px #2563eb2e,0 2px 4px #00000014;z-index:120;white-space:nowrap}}@media (max-width: 900px){.canvas-component-card:hover .comp-title,.canvas-component-card.is-selected .comp-title,.canvas-component-card:hover .drag-handle-dots,.canvas-component-card.is-selected .drag-handle-dots,.canvas-component-card .span-total{display:none}.canvas-component-card.is-selected .card-header{overflow:visible}.canvas-component-card.is-selected .card-quick-controls{position:absolute;top:-30px;right:0;background:#fff;border:1.5px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:2px 4px;gap:3px;box-shadow:0 4px 12px #2563eb2e,0 2px 4px #00000014;z-index:120;white-space:nowrap}}.span-control-group{display:inline-flex;align-items:center;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;height:20px;padding:0 1px;white-space:nowrap;flex-shrink:0}.span-btn{width:16px;height:18px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0;color:var(--rpt-color-text-muted, #64748b);cursor:pointer;border-radius:2px;transition:all .12s ease}.span-btn:hover:not(:disabled){background:var(--rpt-color-surface-hover, #f1f5f9);color:var(--rpt-color-primary, #2563eb)}.span-btn:disabled{opacity:.3;cursor:not-allowed}.span-badge{font-size:.65rem;font-weight:600;color:var(--rpt-color-text, #0f172a);padding:0 3px;white-space:nowrap;-webkit-user-select:none;user-select:none;line-height:1}.span-total{font-size:.6rem;color:var(--rpt-color-text-muted, #64748b);font-weight:500}.card-action-btn{width:20px;height:20px;border:none;background:transparent;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;color:var(--rpt-color-text-muted, #64748b);transition:all .12s ease;flex-shrink:0}.card-action-btn:hover{background:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.card-action-btn.btn-active-toggle{background:#7c3aed;color:#fff;border-color:#7c3aed}.card-action-btn.btn-active-toggle:hover{background:#6d28d9;color:#fff}.btn-delete:hover{background:#fee2e2;color:#ef4444}.card-body{padding:8px 10px 14px;flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;max-width:100%;box-sizing:border-box;overflow:visible}.mock-input-field{display:flex;flex-direction:column;gap:4px;flex:1;height:100%;min-height:0}.mock-label{font-size:.7rem;font-weight:600;color:var(--rpt-color-text-muted, #475569);flex-shrink:0}.mock-input-box,.mock-select-box{border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:6px;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #94a3b8);background:#fff;flex:1;min-height:38px;height:100%;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.mock-checkbox-field{display:flex;align-items:center;gap:6px;flex:1;height:100%;min-height:0;padding-top:14px}.mock-check-box{width:18px;height:18px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:.65rem;color:var(--rpt-color-primary, #2563eb);flex-shrink:0}.mock-btn-wrapper{display:flex;flex:1;height:100%;min-height:38px;align-items:center;justify-content:flex-start;width:100%;min-width:0;box-sizing:border-box}.mock-btn{border-radius:var(--rpt-border-radius, 6px);padding:0 16px;height:36px;font-size:var(--rpt-font-size-base, .875rem);font-weight:500;border:1px solid transparent;cursor:pointer;width:auto;max-width:100%;display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .15s ease}.mock-btn.mock-btn-full{width:100%}.canvas-component-card.is-narrow .mock-btn{padding:0 6px;font-size:.775rem;width:100%;height:34px}.mock-kpi-field{display:flex;flex-direction:column;justify-content:space-between;flex:1;height:100%;min-height:0}.mock-kpi-header{display:flex;align-items:center;justify-content:space-between}.mock-kpi-value{font-size:1.25rem;font-weight:700;color:var(--rpt-color-text, #0f172a);margin:2px 0}.mock-kpi-footer{display:flex;align-items:center;gap:6px;font-size:.65rem}.mock-kpi-trend{color:#16a34a;font-weight:600}.mock-kpi-sub{color:#64748b}.mock-chart-field{display:flex;flex-direction:column;flex:1;height:100%;min-height:140px}.mock-chart-bars{display:flex;align-items:flex-end;justify-content:space-around;gap:16px;flex:1;min-height:100px;padding-top:12px;box-sizing:border-box}.mock-chart-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;min-width:60px;max-width:140px}.mock-chart-bar{width:38px;max-width:44px;margin:0 auto;background:var(--rpt-color-primary, #2563eb);border-radius:6px 6px 0 0;opacity:.85;min-height:10px;transition:height .2s ease}.mock-bar-lbl{font-size:.6875rem;color:#64748b;margin-top:6px;text-align:center;white-space:normal;line-height:1.2}.btn-primary{background:var(--rpt-color-primary, #2563eb);color:#fff}.btn-secondary{background:#f1f5f9;color:#0f172a;border:1px solid #cbd5e1}.btn-outline{background:transparent;color:#2563eb;border:1px solid #2563eb}.btn-danger{background:#ef4444;color:#fff}.mock-generic-box{border:1px dashed #cbd5e1;border-radius:4px;padding:8px;font-size:.75rem;text-align:center;color:#64748b}.canvas-drag-placeholder{background:#2563eb0f;border:2px dashed var(--rpt-color-primary, #2563eb);border-radius:6px;min-height:80px;box-sizing:border-box;transition:transform .15s ease}.canvas-drag-preview,::ng-deep .canvas-drag-preview{background:#fff;border:2px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:8px 14px;display:inline-flex;align-items:center;gap:8px;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif)!important;font-size:.8rem;font-weight:600;color:var(--rpt-color-text, #0f172a);box-shadow:0 12px 24px -4px #00000040;z-index:10000}.preview-title,::ng-deep .preview-title{font-family:inherit!important;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-span,::ng-deep .preview-span{font-family:inherit!important;font-size:.65rem;font-weight:600;color:var(--rpt-color-primary, #2563eb);background:#eff6ff;border:1px solid #bfdbfe;padding:1px 6px;border-radius:9999px}.canvas-empty-state{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 28px;border:2px dashed var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-xl, 12px);background:var(--rpt-color-surface, #ffffff);text-align:center;box-shadow:var(--rpt-box-shadow-xs, 0 1px 2px 0 rgba(0, 0, 0, .04));transition:border-color var(--rpt-transition-speed, .15s) ease}.canvas-empty-state:hover{border-color:var(--rpt-color-primary, #2563eb)}.empty-hero-badge{width:56px;height:56px;border-radius:var(--rpt-border-radius-xl, 12px);background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);display:flex;align-items:center;justify-content:center;margin-bottom:16px;box-shadow:0 2px 8px #2563eb1f}.empty-hero-title{font-size:var(--rpt-font-size-lg, 1.125rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 8px;letter-spacing:-.01em}.empty-hero-desc{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #64748b);max-width:520px;line-height:1.5;margin:0 0 24px}.empty-hero-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px}.empty-btn{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;font-size:var(--rpt-font-size-sm, .75rem);font-weight:600;border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;font-family:inherit}.empty-btn-primary{background:var(--rpt-color-primary, #2563eb);color:#fff;border:1px solid var(--rpt-color-primary, #2563eb);box-shadow:0 1px 3px #2563eb33}.empty-btn-primary:hover{background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8);transform:translateY(-1px)}.empty-btn-secondary{background:#f8fafc;color:#334155;border:1px solid var(--rpt-color-border, #cbd5e1)}.empty-btn-secondary:hover{background:#f1f5f9;color:#0f172a;border-color:#94a3b8;transform:translateY(-1px)}.empty-btn-outline{background:#fff;color:var(--rpt-color-primary, #2563eb);border:1px solid #bfdbfe}.empty-btn-outline:hover{background:#eff6ff;border-color:var(--rpt-color-primary, #2563eb);transform:translateY(-1px)}.canvas-active-input{width:100%;height:32px;padding:4px 8px;font-size:.8125rem;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;outline:none;box-sizing:border-box;background:#fff;color:#0f172a;transition:border-color .15s ease}.canvas-active-input:focus{border-color:var(--rpt-color-primary, #2563eb)}.canvas-active-checkbox-lbl{display:inline-flex;align-items:center;gap:6px;cursor:pointer}.canvas-live-control-wrapper{width:100%;max-width:100%;min-width:0;position:relative;z-index:1;box-sizing:border-box}.canvas-grid-box{margin-top:24px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:8px;background:#fff;box-shadow:0 1px 3px #0000000d;overflow:hidden}.grid-preview-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:var(--rpt-color-surface, #f8fafc);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);font-size:.8rem;font-weight:600;color:var(--rpt-color-text, #0f172a)}.grid-title{font-weight:700}.grid-exec-badge{font-size:.6875rem;font-weight:600;padding:2px 8px;border-radius:10px}.grid-exec-badge.is-loading{background:#eff6ff;color:#2563eb}.grid-exec-badge.is-error{background:#fee2e2;color:#ef4444}.grid-exec-badge.is-success{background:#ecfdf5;color:#059669}.btn-canvas-run-grid{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;font-size:.72rem;font-weight:600;color:#fff;background:var(--rpt-color-primary, #2563eb);border:none;border-radius:4px;cursor:pointer;transition:background .15s ease}.btn-canvas-run-grid:hover:not(:disabled){background:#1d4ed8}.btn-canvas-run-grid:disabled{opacity:.6;cursor:not-allowed}.btn-canvas-edit-grid{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:.72rem;font-weight:500;color:#334155;background:#fff;border:1px solid #cbd5e1;border-radius:4px;cursor:pointer;transition:all .12s ease}.btn-canvas-edit-grid:hover{background:#f1f5f9}.canvas-live-grid-container{width:100%;min-height:480px;background:#fff}.live-mode-badge{display:inline-flex;align-items:center;gap:4px;font-size:.6875rem;font-weight:700;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;padding:1px 8px;border-radius:9999px}.canvas-component-card.is-field-highlighted{border-color:#f59e0b!important;box-shadow:0 0 0 3px #f59e0b59!important;animation:rpt-pulse-border 1s ease-in-out infinite alternate}@keyframes rpt-pulse-border{0%{box-shadow:0 0 0 2px #f59e0b40}to{box-shadow:0 0 0 5px #f59e0b80}}.grid-layout-status-strip{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:#f1f5f9;border-bottom:1px solid var(--rpt-color-border, #cbd5e1);font-size:.6875rem;color:#475569}.grid-status-info{display:inline-flex;align-items:center;gap:6px;font-weight:600}.grid-status-sync{display:inline-flex;align-items:center;gap:4px;color:#059669;font-weight:600;transition:transform .2s ease}.grid-status-sync.is-pulsing{transform:scale(1.08);color:#047857}.canvas-actions{display:flex;align-items:center;gap:8px}.btn-grid-add{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a}.btn-grid-add:hover{background:#dcfce7;border-color:#86efac;color:#15803d}.btn-remove-grid{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;background:transparent;color:#94a3b8;border-radius:4px;cursor:pointer;transition:all .15s ease}.btn-remove-grid:hover{background:#fee2e2;color:#ef4444}.canvas-add-grid-banner{margin-top:24px;border:2px dashed #cbd5e1;border-radius:8px;background:#fff;padding:16px 20px;display:flex;align-items:center;gap:16px;cursor:pointer;transition:all .15s ease}.canvas-add-grid-banner:hover{border-color:#2563eb;background:#f8fafc;box-shadow:0 2px 8px #2563eb14}.add-grid-icon{width:40px;height:40px;border-radius:8px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;flex-shrink:0}.add-grid-text{display:flex;flex-direction:column;gap:2px;flex:1}.add-grid-title{font-size:.875rem;font-weight:600;color:#0f172a}.add-grid-sub{font-size:.75rem;color:#64748b}.btn-banner-add{padding:6px 14px;font-size:.75rem;font-weight:600;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;cursor:pointer;white-space:nowrap;transition:all .15s ease}.canvas-add-grid-banner:hover .btn-banner-add{background:#2563eb;color:#fff;border-color:#2563eb}.canvas-grid-loading-overlay{position:absolute;inset:0;background:#ffffffe6;backdrop-filter:blur(2px);z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-family:inherit;border-radius:6px}.grid-loading-title{font-weight:600;font-size:.95rem;color:#1e293b}.grid-loading-sub{font-size:.8rem;color:#64748b}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button,.canvas-active-input::-webkit-inner-spin-button,.canvas-active-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number],.canvas-active-input{-moz-appearance:textfield;appearance:textfield}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i1$2.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: i1$2.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }, { kind: "component", type: RptDropdownComponent, selector: "rpt-dropdown", inputs: ["config", "control", "parentForm", "showStatus"], outputs: ["dropdownClick"] }, { kind: "component", type: RptDateRangeComponent, selector: "rpt-date-range", inputs: ["config", "control"] }, { kind: "component", type: RptRadioComponent, selector: "rpt-radio", inputs: ["config", "control", "parentForm"] }, { kind: "component", type: ReportGridBridgeComponent, selector: "rpt-grid-bridge", inputs: ["gridDefinition", "data"], outputs: ["gridStateChange", "columnDefsChange", "rowClick", "selectionChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14460
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DesignCanvasComponent, isStandalone: true, selector: "rpt-design-canvas", host: { listeners: { "document:keydown.escape": "onEscape()" } }, ngImport: i0, template: " <div class=\"canvas-wrapper\" (click)=\"onCanvasBackgroundClick($event)\">\n <!-- Canvas Status / Quick Controls -->\n <div class=\"canvas-toolbar\">\n <div class=\"canvas-info\">\n <span class=\"info-label\">Grid Layout:</span>\n <span class=\"info-value\">{{ totalColumns() }} Columns</span>\n <span class=\"info-divider\">\u2022</span>\n <span class=\"info-label\">Components:</span>\n <span class=\"info-value\">{{ components().length }}</span>\n <span class=\"info-divider\">\u2022</span>\n <span class=\"live-mode-badge\" title=\"Interactive canvas: Values typed here run live queries and test dropdowns.\">\n \u26A1 Live Interactive Mode\n </span>\n </div>\n\n <div class=\"canvas-actions\">\n @if (!definition().grid) {\n <button\n type=\"button\"\n class=\"canvas-action-btn btn-grid-add\"\n (click)=\"addResultGrid($event)\"\n title=\"Add a Result Grid to this report\"\n >\n <rpt-icon name=\"table\" [size]=\"14\" />\n <span>+ Add Grid</span>\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"canvas-action-btn btn-grid-configured\"\n (click)=\"selectGridSettings($event)\"\n title=\"Configure Result Data Grid\"\n >\n <rpt-icon name=\"table\" [size]=\"14\" />\n <span>Grid ({{ definition().grid?.columns?.length ?? 0 }})</span>\n </button>\n }\n\n <button\n type=\"button\"\n class=\"canvas-action-btn\"\n (click)=\"selectReportSettings($event)\"\n title=\"Configure Page Layout & Grid Settings\"\n >\n <rpt-icon name=\"settings\" [size]=\"14\" />\n <span>Report Settings</span>\n </button>\n </div>\n </div>\n\n <!-- Canvas Drop Area -->\n <div class=\"canvas-scroll-area\" cdkScrollable>\n <div\n class=\"canvas-artboard\"\n [style.padding.px]=\"definition().layout.padding ?? 24\"\n >\n <!-- Report Header Preview -->\n <div class=\"canvas-report-header\">\n <h2 class=\"canvas-report-title\">{{ definition().name || 'Untitled Report' }}</h2>\n @if (definition().description) {\n <p class=\"canvas-report-desc\">{{ definition().description }}</p>\n }\n </div>\n\n <!-- Component Drop List Grid with 2D mixed orientation and data binding -->\n <div\n cdkDropList\n id=\"designer-canvas-drop-list\"\n class=\"canvas-grid\"\n cdkDropListOrientation=\"mixed\"\n [cdkDropListData]=\"sortedComponents()\"\n [style.grid-template-columns]=\"gridTemplateColumns()\"\n [style.gap.px]=\"definition().layout.gap ?? 16\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n @for (comp of sortedComponents(); track comp.id; let idx = $index) {\n <div\n cdkDrag\n [cdkDragData]=\"comp\"\n [cdkDragDisabled]=\"isAnyResizing()\"\n class=\"canvas-component-card\"\n [class.is-selected]=\"isSelected(comp.id)\"\n [class.is-resizing]=\"resizingCompId() === comp.id\"\n [class.is-field-highlighted]=\"isFieldHighlighted(comp)\"\n [class.is-narrow]=\"getSpan(comp) <= 4\"\n [class.is-compact]=\"getSpan(comp) <= 2\"\n [style.grid-column]=\"getGridColumn(comp)\"\n [style.grid-row]=\"getGridRow(comp)\"\n [style.width]=\"comp.layout?.width || 'auto'\"\n [style.height]=\"getComponentHeight(comp)\"\n [style.min-height]=\"getComponentMinHeight(comp)\"\n (click)=\"onSelect(comp.id, $event)\"\n >\n <!-- Card Header with Drag Handle & Actions -->\n <div class=\"card-header\">\n <div class=\"card-title-group\" cdkDragHandle title=\"Drag to reorder\">\n <span class=\"drag-handle-dots\">\u22EE\u22EE</span>\n <rpt-icon [name]=\"getComponentIconName(comp.type)\" [size]=\"14\" />\n <span class=\"comp-title\" [title]=\"comp.label || comp.key || comp.type\">\n {{ comp.label || comp.key || comp.type }}\n </span>\n </div>\n\n <div class=\"card-actions\">\n <!-- Static span pill & new row / start col pill when not hovered / not selected -->\n @if (comp.layout?.column; as col) {\n <span class=\"new-row-pill-static\" title=\"Starts at Column {{ col }}\">Col {{ col }}</span>\n } @else if (comp.layout?.newRow) {\n <span class=\"new-row-pill-static\" title=\"Starts on separate row\">\u21B3 Row</span>\n }\n <span\n class=\"span-pill-static\"\n title=\"Column span: {{ getSpan(comp) }} of {{ totalColumns() }} columns\"\n >\n {{ getSpan(comp) }}/{{ totalColumns() }}\n </span>\n\n <!-- Quick Action Stepper & Buttons (revealed on hover or selection) -->\n <div class=\"card-quick-controls\">\n <button\n type=\"button\"\n class=\"card-action-btn\"\n [class.btn-active-toggle]=\"comp.layout?.newRow\"\n (click)=\"toggleNewRow(comp, $event)\"\n title=\"{{ comp.layout?.newRow ? 'Starts on new row (Click to place inline)' : 'Start on separate row (Row Break)' }}\"\n >\n <rpt-icon name=\"corner-down-right\" [size]=\"11\" />\n </button>\n\n <div class=\"span-control-group\" title=\"Adjust Column Span\">\n <button\n type=\"button\"\n class=\"span-btn\"\n [disabled]=\"getSpan(comp) <= 1\"\n (click)=\"adjustSpan(comp, -1, $event)\"\n title=\"Shrink Column Span\"\n >\n <rpt-icon name=\"minus\" [size]=\"9\" />\n </button>\n <span class=\"span-badge\" [title]=\"'Column span: ' + getSpan(comp) + ' of ' + totalColumns()\">\n <span class=\"span-num\">{{ getSpan(comp) }}</span><span class=\"span-total\">/{{ totalColumns() }}</span>\n </span>\n <button\n type=\"button\"\n class=\"span-btn\"\n [disabled]=\"getSpan(comp) >= totalColumns()\"\n (click)=\"adjustSpan(comp, 1, $event)\"\n title=\"Expand Column Span\"\n >\n <rpt-icon name=\"plus\" [size]=\"9\" />\n </button>\n </div>\n\n <button\n type=\"button\"\n class=\"card-action-btn\"\n (click)=\"onDuplicate(comp.id, $event)\"\n title=\"Duplicate component\"\n >\n <rpt-icon name=\"copy\" [size]=\"12\" />\n </button>\n <button\n type=\"button\"\n class=\"card-action-btn btn-delete\"\n (click)=\"onDelete(comp.id, $event)\"\n title=\"Remove component\"\n >\n <rpt-icon name=\"trash\" [size]=\"12\" />\n </button>\n </div>\n </div>\n </div>\n\n <!-- Card Body Visual Preview -->\n <div class=\"card-body\">\n\n @switch (comp.type) {\n @case ('input') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Input' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"text\"\n class=\"canvas-active-input\"\n [placeholder]=\"comp.properties?.['placeholder'] || 'Enter text...'\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-input-box\">{{ comp.properties?.['placeholder'] || 'Enter text...' }}</div>\n }\n </div>\n }\n @case ('dropdown') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-dropdown\n [config]=\"comp\"\n [showStatus]=\"true\"\n [parentForm]=\"canvasForm()\"\n [control]=\"getCanvasControl(comp)\"\n (dropdownClick)=\"onControlInteract(comp)\"\n />\n </div>\n }\n @case ('date') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-date [config]=\"comp\" [control]=\"getCanvasControl(comp) ?? undefined\" />\n </div>\n }\n @case ('date-range') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-date-range\n [config]=\"comp\"\n [control]=\"getCanvasControl(comp)\"\n />\n </div>\n }\n @case ('number') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Number' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"number\"\n class=\"canvas-active-input\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-input-box\">\n {{ comp.properties?.['prefix'] || '' }} 0.00 {{ comp.properties?.['suffix'] || '' }}\n </div>\n }\n </div>\n }\n @case ('checkbox') {\n <div class=\"mock-checkbox-field\" (click)=\"onControlInteract(comp, $event)\">\n @if (getCanvasControl(comp); as ctrl) {\n <label class=\"canvas-active-checkbox-lbl\">\n <input type=\"checkbox\" [formControl]=\"ctrl\" (focus)=\"onControlInteract(comp, $event)\" />\n <span class=\"mock-label\">{{ comp.label || 'Checkbox' }}</span>\n </label>\n } @else {\n <span class=\"mock-check-box\">\n <rpt-icon name=\"check\" [size]=\"10\" />\n </span>\n <span class=\"mock-label\">{{ comp.label || 'Checkbox' }}</span>\n }\n </div>\n }\n @case ('radio') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-radio\n [config]=\"comp\"\n [control]=\"getCanvasControl(comp)\"\n [parentForm]=\"canvasForm()\"\n />\n </div>\n }\n @case ('button') {\n <div class=\"mock-btn-wrapper\">\n <button\n type=\"button\"\n class=\"mock-btn\"\n [class]=\"'btn-' + (comp.properties?.['variant'] || 'primary')\"\n [class.mock-btn-full]=\"comp.properties?.['fullWidth'] === true || comp.layout?.width === '100%'\"\n [style.height]=\"getCustomBtnHeight(comp)\"\n [style.width]=\"getCustomBtnWidth(comp)\"\n (click)=\"onCanvasButtonClick(comp, $event)\"\n >\n @if (getCustomBtnIcon(comp); as btnIcon) {\n <rpt-icon [name]=\"btnIcon\" [size]=\"15\" />\n }\n <span>{{ comp.label || 'Button' }}</span>\n </button>\n </div>\n }\n @case ('kpi-card') {\n <div class=\"mock-kpi-field\">\n <div class=\"mock-kpi-header\">\n <span class=\"mock-label\">{{ comp.label || 'KPI Metric' }}</span>\n <rpt-icon name=\"kpi\" [size]=\"14\" />\n </div>\n <div class=\"mock-kpi-value\">{{ comp.properties?.['value'] || '$128,450' }}</div>\n <div class=\"mock-kpi-footer\">\n <span class=\"mock-kpi-trend\">+12.5%</span>\n <span class=\"mock-kpi-sub\">vs last period</span>\n </div>\n </div>\n }\n @case ('chart') {\n <div class=\"mock-chart-field\">\n <div class=\"mock-chart-header\">\n <span class=\"mock-label\">{{ comp.label || 'Quarterly Sales Revenue ($000)' }}</span>\n </div>\n <div class=\"mock-chart-bars\">\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 44%\"></div>\n <span class=\"mock-bar-lbl\">Q1 Jan-Mar</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 61%\"></div>\n <span class=\"mock-bar-lbl\">Q2 Apr-Jun</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 79%\"></div>\n <span class=\"mock-bar-lbl\">Q3 Jul-Sep</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 100%\"></div>\n <span class=\"mock-bar-lbl\">Q4 Oct-Dec</span>\n </div>\n </div>\n </div>\n }\n @default {\n <div class=\"mock-generic-box\">\n <span>{{ comp.type }}</span>\n </div>\n }\n }\n </div>\n\n <!-- Resizing Handles (East, South, South-East) -->\n <div\n class=\"resize-handle handle-e\"\n (pointerdown)=\"startResize($event, comp, 'e')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize column width \u2022 Double-click to reset\"\n ></div>\n <div\n class=\"resize-handle handle-s\"\n (pointerdown)=\"startResize($event, comp, 's')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize height \u2022 Double-click to reset\"\n ></div>\n <div\n class=\"resize-handle handle-se\"\n (pointerdown)=\"startResize($event, comp, 'se')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize width and height \u2022 Double-click to reset\"\n ></div>\n\n <!-- Resizing Dimension Ghost / Badge -->\n @if (resizingCompId() === comp.id) {\n <div class=\"resize-dimension-tooltip\">\n {{ resizingTooltip(comp) }}\n </div>\n }\n\n <!-- Drag placeholder with matched grid column span -->\n <div\n *cdkDragPlaceholder\n class=\"canvas-drag-placeholder\"\n [style.grid-column]=\"getGridColumn(comp)\"\n ></div>\n\n <!-- Drag preview -->\n <div *cdkDragPreview class=\"canvas-drag-preview\">\n <span class=\"drag-handle-dots\">\u22EE\u22EE</span>\n <rpt-icon [name]=\"getComponentIconName(comp.type)\" [size]=\"14\" />\n <span class=\"preview-title\">{{ comp.label || comp.key || comp.type }}</span>\n <span class=\"preview-span\">{{ getSpan(comp) }}/{{ totalColumns() }}</span>\n </div>\n </div>\n }\n\n @if (components().length === 0) {\n <div class=\"canvas-empty-state\" role=\"region\" aria-label=\"Empty canvas starter options\">\n <div class=\"empty-hero-badge\">\n <rpt-icon name=\"design\" [size]=\"28\" />\n </div>\n <h3 class=\"empty-hero-title\">Start Designing Your Custom Report</h3>\n <p class=\"empty-hero-desc\">\n Drag controls from the left component palette, or jumpstart your design with pre-configured enterprise blueprints.\n </p>\n\n <div class=\"empty-hero-actions\">\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-primary\"\n (click)=\"applyBlueprint('blueprint-audit-register')\"\n title=\"Load complete Audit Register blueprint with parameters and result grid\"\n >\n <rpt-icon name=\"table\" [size]=\"15\" />\n <span>Audit Register Blueprint</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-secondary\"\n (click)=\"applyBlueprint('blueprint-kpi-summary')\"\n title=\"Load Executive KPI summary blueprint\"\n >\n <rpt-icon name=\"chart-bar\" [size]=\"15\" />\n <span>KPI Summary Blueprint</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-outline\"\n (click)=\"addStarterComponent('date-range')\"\n title=\"Add a Date Range filter component\"\n >\n <rpt-icon name=\"calendar\" [size]=\"14\" />\n <span>+ Add Date Filter</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-outline\"\n (click)=\"addStarterComponent('button')\"\n title=\"Add an Execute Action button\"\n >\n <rpt-icon name=\"play\" [size]=\"14\" />\n <span>+ Add Run Button</span>\n </button>\n </div>\n </div>\n }\n </div>\n\n <!-- Live Result Grid Preview with Bways-Grid Features -->\n @if (definition().grid) {\n <div class=\"canvas-grid-box\">\n <div class=\"grid-preview-header\">\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <rpt-icon name=\"table\" [size]=\"15\" />\n <span class=\"grid-title\">Bways Grid ({{ definition().grid?.columns?.length ?? 0 }} columns)</span>\n @if (isExecutingGrid()) {\n <span class=\"grid-exec-badge is-loading\">Loading data from database...</span>\n } @else if (gridExecError()) {\n <span class=\"grid-exec-badge is-error\">{{ gridExecError() }}</span>\n } @else if (canvasGridData().length > 0) {\n <span class=\"grid-exec-badge is-success\">{{ canvasGridData().length }} rows loaded</span>\n }\n </div>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <button\n type=\"button\"\n class=\"btn-canvas-run-grid\"\n (click)=\"executeCanvasReport($event)\"\n [disabled]=\"isExecutingGrid()\"\n title=\"Execute query and load data into Bways Grid\"\n >\n <rpt-icon name=\"play\" [size]=\"11\" />\n <span>{{ isExecutingGrid() ? 'Running...' : 'Run / Refresh Grid' }}</span>\n </button>\n <button\n type=\"button\"\n class=\"btn-canvas-edit-grid\"\n (click)=\"selectGridSettings($event)\"\n title=\"Configure columns and grid options\"\n >\n <rpt-icon name=\"settings\" [size]=\"11\" />\n <span>Configure</span>\n </button>\n <button\n type=\"button\"\n class=\"btn-remove-grid\"\n (click)=\"removeGrid($event)\"\n title=\"Remove Result Grid from this report\"\n >\n <rpt-icon name=\"trash\" [size]=\"13\" />\n </button>\n </div>\n </div>\n\n @if (getGridSummaryText(); as summary) {\n <div class=\"grid-layout-status-strip\">\n <div class=\"grid-status-info\">\n <rpt-icon name=\"table\" [size]=\"12\" />\n <span>{{ summary }}</span>\n </div>\n <div class=\"grid-status-sync\" [class.is-pulsing]=\"layoutJustUpdated()\">\n <rpt-icon name=\"check\" [size]=\"11\" />\n <span>Layout auto-persisted</span>\n </div>\n </div>\n }\n\n <!-- Live Bways Grid bridge -->\n <div class=\"canvas-live-grid-container\" (click)=\"$event.stopPropagation()\" style=\"position: relative; min-height: 250px;\">\n @if (isExecutingGrid()) {\n <div class=\"canvas-grid-loading-overlay\">\n <span class=\"status-dot dot-pulse\" style=\"width: 14px; height: 14px; color: #2563eb; background: #2563eb; border-radius: 50%;\"></span>\n <span class=\"grid-loading-title\">Executing stored procedure on SQL Server...</span>\n <span class=\"grid-loading-sub\">Calculating outstanding balances and ledger amounts. Please wait...</span>\n </div>\n }\n <rpt-grid-bridge\n [gridDefinition]=\"definition().grid!\"\n [data]=\"canvasGridData()\"\n (gridStateChange)=\"onCanvasGridStateChange($event)\"\n (columnDefsChange)=\"onCanvasColumnDefsChange($event)\"\n />\n </div>\n </div>\n } @else {\n <div class=\"canvas-add-grid-banner\" (click)=\"addResultGrid($event)\">\n <div class=\"add-grid-icon\">\n <rpt-icon name=\"table\" [size]=\"20\" />\n </div>\n <div class=\"add-grid-text\">\n <span class=\"add-grid-title\">+ Add Result Data Grid</span>\n <span class=\"add-grid-sub\">Attach an interactive data table or UltraGrid to display report execution output</span>\n </div>\n <button type=\"button\" class=\"btn-banner-add\">Add Grid</button>\n </div>\n }\n </div>\n </div>\n </div>", styles: [":host{display:block;flex:1;min-height:0;min-width:0;height:100%;background-color:#f1f5f9;font-family:var(--rpt-font-family, inherit);box-sizing:border-box}.canvas-wrapper{min-height:0;display:flex;flex-direction:column;height:100%}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:42px;height:42px;padding:0 24px;background:var(--rpt-color-surface, #ffffff);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);box-sizing:border-box;gap:12px;overflow-x:auto;scrollbar-width:none;font-family:var(--rpt-font-family, inherit);flex-shrink:0}.canvas-toolbar::-webkit-scrollbar{display:none}.canvas-info{display:flex;align-items:center;gap:8px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);white-space:nowrap;line-height:1}.info-label{color:var(--rpt-color-text-muted, #64748b);font-weight:500;font-size:var(--rpt-font-size-sm, .75rem)}.info-value{font-weight:600;color:var(--rpt-color-text, #0f172a);font-size:var(--rpt-font-size-sm, .75rem)}.info-divider{color:var(--rpt-color-border, #cbd5e1);margin:0 2px}.live-mode-badge{display:inline-flex;align-items:center;gap:4px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-xs, .7rem);font-weight:600;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;padding:2px 8px;border-radius:9999px;line-height:1}.canvas-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.canvas-action-btn{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;letter-spacing:-.01em;color:var(--rpt-color-text-secondary, #334155);background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;line-height:1;white-space:nowrap;box-shadow:0 1px 2px #0000000a;transition:all var(--rpt-transition-speed, .15s) ease}.canvas-action-btn:hover{background:var(--rpt-color-surface-hover, #f8fafc);border-color:var(--rpt-color-border-hover, #94a3b8);color:var(--rpt-color-text, #0f172a);box-shadow:0 2px 4px #0000000f}.canvas-action-btn.btn-grid-configured{background:#eff6ff;border-color:#bfdbfe;color:#2563eb;font-weight:600}.canvas-action-btn.btn-grid-configured:hover{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}.canvas-action-btn.btn-grid-add{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a;font-weight:600}.canvas-action-btn.btn-grid-add:hover{background:#dcfce7;color:#15803d;border-color:#86efac}.canvas-action-btn:active{transform:translateY(1px)}.canvas-scroll-area{flex:1;min-height:0;overflow-y:auto;padding:16px}.canvas-artboard{width:100%;max-width:1400px;margin:0 auto;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);box-shadow:0 4px 6px -1px #0000000d;min-height:480px;box-sizing:border-box}@media (max-width: 900px){.canvas-toolbar{min-height:36px;height:36px;padding:0 10px;gap:6px}.live-mode-badge{display:none}.canvas-info{font-size:.75rem;gap:5px}.canvas-action-btn{padding:0 8px;font-size:.725rem;height:28px;gap:4px}.canvas-scroll-area{padding:10px}.canvas-artboard{min-height:360px}}@media (max-width: 600px){.canvas-toolbar{padding:0 8px;gap:4px}.canvas-info .info-label,.canvas-action-btn span{display:none}.canvas-action-btn{padding:0 6px;min-width:28px;justify-content:center}}.canvas-report-header{margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--rpt-color-border, #e2e8f0)}.canvas-report-title{font-size:var(--rpt-font-size-xl, 1.5rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 6px}.canvas-report-desc{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #64748b);margin:0}.canvas-grid{display:grid;width:100%;min-height:180px;align-items:start;border-radius:6px;transition:all var(--rpt-transition-speed, .15s) ease}.canvas-component-card{container-type:inline-size;background:#fff;border:1.5px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);box-shadow:var(--rpt-box-shadow, 0 1px 2px rgba(0, 0, 0, .05));box-sizing:border-box;transition:all var(--rpt-transition-speed, .15s) ease;cursor:pointer;position:relative;overflow:visible;display:flex;flex-direction:column;min-height:104px;z-index:1}.canvas-component-card:hover{border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 4px 6px -1px #2563eb1a;z-index:2}.canvas-component-card.is-selected{border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 0 0 2px #2563eb40;z-index:10}.canvas-component-card:focus-within,.canvas-component-card:has(.rpt-combobox-menu),.canvas-component-card:has(.is-open){z-index:100}.canvas-component-card.is-resizing{-webkit-user-select:none;user-select:none;border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 0 0 2px #2563eb59;z-index:30;transition:none!important}.resize-handle{position:absolute;z-index:20;touch-action:none;opacity:0;pointer-events:none;transition:opacity .15s ease}.canvas-component-card.is-selected .resize-handle{opacity:1;pointer-events:auto}.resize-handle.handle-e{top:0;right:0;width:6px;height:100%;cursor:ew-resize;display:flex;align-items:center;justify-content:center}.resize-handle.handle-e:after{content:\"\";width:3px;height:24px;background:#cbd5e1;border-radius:2px;transition:background .15s ease}.resize-handle.handle-e:hover:after,.canvas-component-card.is-selected .resize-handle.handle-e:after{background:var(--rpt-color-primary, #2563eb)}.resize-handle.handle-s{bottom:0;left:0;height:6px;width:100%;cursor:ns-resize;display:flex;align-items:center;justify-content:center}.resize-handle.handle-s:after{content:\"\";height:3px;width:24px;background:#cbd5e1;border-radius:2px;transition:background .15s ease}.resize-handle.handle-s:hover:after,.canvas-component-card.is-selected .resize-handle.handle-s:after{background:var(--rpt-color-primary, #2563eb)}.resize-handle.handle-se{bottom:0;right:0;width:12px;height:12px;cursor:nwse-resize;display:flex;align-items:flex-end;justify-content:flex-end;padding:2px}.resize-handle.handle-se:after{content:\"\";width:5px;height:5px;border-right:2px solid #cbd5e1;border-bottom:2px solid #cbd5e1;transition:border-color .15s ease}.resize-handle.handle-se:hover:after,.canvas-component-card.is-selected .resize-handle.handle-se:after{border-color:var(--rpt-color-primary, #2563eb)}.resize-dimension-tooltip{position:absolute;top:38px;right:8px;background:#0f172ae6;color:#fff;font-size:.7rem;font-weight:600;padding:3px 8px;border-radius:4px;white-space:nowrap;pointer-events:none;z-index:50;box-shadow:0 2px 4px #0003}.card-header{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:5px 8px;background:var(--rpt-color-surface, #f8fafc);border-bottom:1px solid var(--rpt-color-border, #e2e8f0);border-top-left-radius:var(--rpt-border-radius, 6px);border-top-right-radius:var(--rpt-border-radius, 6px);min-height:32px;box-sizing:border-box;overflow:hidden;position:relative}.canvas-component-card.is-selected .card-header{overflow:visible}.card-title-group{display:flex;align-items:center;gap:5px;cursor:grab;min-width:0;flex:1;overflow:hidden}.drag-handle-dots{color:var(--rpt-color-text-muted, #94a3b8);font-size:.85rem;letter-spacing:-2px;flex-shrink:0;-webkit-user-select:none;user-select:none}.comp-title{font-size:.75rem;font-weight:600;color:var(--rpt-color-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.card-actions{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:auto}.new-row-pill-static{font-size:.65rem;font-weight:600;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;padding:1px 5px;border-radius:9999px;white-space:nowrap;line-height:1;flex-shrink:0}.span-pill-static{display:inline-flex;align-items:center;justify-content:center;font-size:.65rem;font-weight:600;color:var(--rpt-color-text-muted, #64748b);background:var(--rpt-color-surface, #f1f5f9);border:1px solid var(--rpt-color-border, #e2e8f0);padding:1px 6px;border-radius:9999px;line-height:1.2;white-space:nowrap;-webkit-user-select:none;user-select:none}.card-quick-controls{display:none;align-items:center;gap:3px;flex-shrink:0}.canvas-component-card:hover .span-pill-static,.canvas-component-card.is-selected .span-pill-static,.canvas-component-card:hover .new-row-pill-static,.canvas-component-card.is-selected .new-row-pill-static{display:none}.canvas-component-card:hover .card-quick-controls,.canvas-component-card.is-selected .card-quick-controls{display:inline-flex}.canvas-component-card.is-narrow .card-header{padding:4px 6px;gap:3px}.canvas-component-card.is-narrow:hover .comp-title,.canvas-component-card.is-narrow.is-selected .comp-title,.canvas-component-card.is-narrow:hover .drag-handle-dots,.canvas-component-card.is-narrow.is-selected .drag-handle-dots{display:none}.canvas-component-card.is-narrow .card-quick-controls{gap:2px}.canvas-component-card.is-narrow .span-control-group{height:18px}.canvas-component-card.is-narrow .span-btn{width:14px;height:16px}.canvas-component-card.is-narrow .span-badge{font-size:.6rem;padding:0 2px}.canvas-component-card.is-narrow .span-total{display:none}.canvas-component-card.is-narrow .card-action-btn{width:18px;height:18px}@container (max-width: 250px){.card-header{padding:4px 6px;gap:3px}.canvas-component-card:hover .comp-title,.canvas-component-card.is-selected .comp-title,.canvas-component-card:hover .drag-handle-dots,.canvas-component-card.is-selected .drag-handle-dots,.span-total{display:none}.card-quick-controls{gap:2px}.card-action-btn{width:18px;height:18px}.span-control-group{height:18px}.span-btn{width:14px;height:16px}.span-badge{font-size:.6rem;padding:0 2px}}@container (max-width: 160px){.canvas-component-card.is-selected .card-quick-controls{position:absolute;top:-30px;right:0;background:#fff;border:1.5px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:2px 4px;gap:3px;box-shadow:0 4px 12px #2563eb2e,0 2px 4px #00000014;z-index:120;white-space:nowrap}}@media (max-width: 900px){.canvas-component-card:hover .comp-title,.canvas-component-card.is-selected .comp-title,.canvas-component-card:hover .drag-handle-dots,.canvas-component-card.is-selected .drag-handle-dots,.canvas-component-card .span-total{display:none}.canvas-component-card.is-selected .card-header{overflow:visible}.canvas-component-card.is-selected .card-quick-controls{position:absolute;top:-30px;right:0;background:#fff;border:1.5px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:2px 4px;gap:3px;box-shadow:0 4px 12px #2563eb2e,0 2px 4px #00000014;z-index:120;white-space:nowrap}}.span-control-group{display:inline-flex;align-items:center;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;height:20px;padding:0 1px;white-space:nowrap;flex-shrink:0}.span-btn{width:16px;height:18px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0;color:var(--rpt-color-text-muted, #64748b);cursor:pointer;border-radius:2px;transition:all .12s ease}.span-btn:hover:not(:disabled){background:var(--rpt-color-surface-hover, #f1f5f9);color:var(--rpt-color-primary, #2563eb)}.span-btn:disabled{opacity:.3;cursor:not-allowed}.span-badge{font-size:.65rem;font-weight:600;color:var(--rpt-color-text, #0f172a);padding:0 3px;white-space:nowrap;-webkit-user-select:none;user-select:none;line-height:1}.span-total{font-size:.6rem;color:var(--rpt-color-text-muted, #64748b);font-weight:500}.card-action-btn{width:20px;height:20px;border:none;background:transparent;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;color:var(--rpt-color-text-muted, #64748b);transition:all .12s ease;flex-shrink:0}.card-action-btn:hover{background:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.card-action-btn.btn-active-toggle{background:#7c3aed;color:#fff;border-color:#7c3aed}.card-action-btn.btn-active-toggle:hover{background:#6d28d9;color:#fff}.btn-delete:hover{background:#fee2e2;color:#ef4444}.card-body{padding:8px 10px 14px;flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;max-width:100%;box-sizing:border-box;overflow:visible}.mock-input-field{display:flex;flex-direction:column;gap:4px;flex:1;height:100%;min-height:0}.mock-label{font-size:.7rem;font-weight:600;color:var(--rpt-color-text-muted, #475569);flex-shrink:0}.mock-input-box,.mock-select-box{border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:6px;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #94a3b8);background:#fff;flex:1;min-height:38px;height:100%;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.mock-checkbox-field{display:flex;align-items:center;gap:6px;flex:1;height:100%;min-height:0;padding-top:14px}.mock-check-box{width:18px;height:18px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:.65rem;color:var(--rpt-color-primary, #2563eb);flex-shrink:0}.mock-btn-wrapper{display:flex;flex:1;height:100%;min-height:38px;align-items:center;justify-content:flex-start;width:100%;min-width:0;box-sizing:border-box}.mock-btn{border-radius:var(--rpt-border-radius, 6px);padding:0 16px;height:36px;font-size:var(--rpt-font-size-base, .875rem);font-weight:500;border:1px solid transparent;cursor:pointer;width:auto;max-width:100%;display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .15s ease}.mock-btn.mock-btn-full{width:100%}.canvas-component-card.is-narrow .mock-btn{padding:0 6px;font-size:.775rem;width:100%;height:34px}.mock-kpi-field{display:flex;flex-direction:column;justify-content:space-between;flex:1;height:100%;min-height:0}.mock-kpi-header{display:flex;align-items:center;justify-content:space-between}.mock-kpi-value{font-size:1.25rem;font-weight:700;color:var(--rpt-color-text, #0f172a);margin:2px 0}.mock-kpi-footer{display:flex;align-items:center;gap:6px;font-size:.65rem}.mock-kpi-trend{color:#16a34a;font-weight:600}.mock-kpi-sub{color:#64748b}.mock-chart-field{display:flex;flex-direction:column;flex:1;height:100%;min-height:140px}.mock-chart-bars{display:flex;align-items:flex-end;justify-content:space-around;gap:16px;flex:1;min-height:100px;padding-top:12px;box-sizing:border-box}.mock-chart-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;min-width:60px;max-width:140px}.mock-chart-bar{width:38px;max-width:44px;margin:0 auto;background:var(--rpt-color-primary, #2563eb);border-radius:6px 6px 0 0;opacity:.85;min-height:10px;transition:height .2s ease}.mock-bar-lbl{font-size:.6875rem;color:#64748b;margin-top:6px;text-align:center;white-space:normal;line-height:1.2}.btn-primary{background:var(--rpt-color-primary, #2563eb);color:#fff}.btn-secondary{background:#f1f5f9;color:#0f172a;border:1px solid #cbd5e1}.btn-outline{background:transparent;color:#2563eb;border:1px solid #2563eb}.btn-danger{background:#ef4444;color:#fff}.mock-generic-box{border:1px dashed #cbd5e1;border-radius:4px;padding:8px;font-size:.75rem;text-align:center;color:#64748b}.canvas-drag-placeholder{background:#2563eb0f;border:2px dashed var(--rpt-color-primary, #2563eb);border-radius:6px;min-height:80px;box-sizing:border-box;transition:transform .15s ease}.canvas-drag-preview,::ng-deep .canvas-drag-preview{background:#fff;border:2px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:8px 14px;display:inline-flex;align-items:center;gap:8px;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif)!important;font-size:.8rem;font-weight:600;color:var(--rpt-color-text, #0f172a);box-shadow:0 12px 24px -4px #00000040;z-index:10000}.preview-title,::ng-deep .preview-title{font-family:inherit!important;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-span,::ng-deep .preview-span{font-family:inherit!important;font-size:.65rem;font-weight:600;color:var(--rpt-color-primary, #2563eb);background:#eff6ff;border:1px solid #bfdbfe;padding:1px 6px;border-radius:9999px}.canvas-empty-state{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 28px;border:2px dashed var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-xl, 12px);background:var(--rpt-color-surface, #ffffff);text-align:center;box-shadow:var(--rpt-box-shadow-xs, 0 1px 2px 0 rgba(0, 0, 0, .04));transition:border-color var(--rpt-transition-speed, .15s) ease}.canvas-empty-state:hover{border-color:var(--rpt-color-primary, #2563eb)}.empty-hero-badge{width:56px;height:56px;border-radius:var(--rpt-border-radius-xl, 12px);background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);display:flex;align-items:center;justify-content:center;margin-bottom:16px;box-shadow:0 2px 8px #2563eb1f}.empty-hero-title{font-size:var(--rpt-font-size-lg, 1.125rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 8px;letter-spacing:-.01em}.empty-hero-desc{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #64748b);max-width:520px;line-height:1.5;margin:0 0 24px}.empty-hero-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px}.empty-btn{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;font-size:var(--rpt-font-size-sm, .75rem);font-weight:600;border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;font-family:inherit}.empty-btn-primary{background:var(--rpt-color-primary, #2563eb);color:#fff;border:1px solid var(--rpt-color-primary, #2563eb);box-shadow:0 1px 3px #2563eb33}.empty-btn-primary:hover{background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8);transform:translateY(-1px)}.empty-btn-secondary{background:#f8fafc;color:#334155;border:1px solid var(--rpt-color-border, #cbd5e1)}.empty-btn-secondary:hover{background:#f1f5f9;color:#0f172a;border-color:#94a3b8;transform:translateY(-1px)}.empty-btn-outline{background:#fff;color:var(--rpt-color-primary, #2563eb);border:1px solid #bfdbfe}.empty-btn-outline:hover{background:#eff6ff;border-color:var(--rpt-color-primary, #2563eb);transform:translateY(-1px)}.canvas-active-input{width:100%;height:32px;padding:4px 8px;font-size:.8125rem;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;outline:none;box-sizing:border-box;background:#fff;color:#0f172a;transition:border-color .15s ease}.canvas-active-input:focus{border-color:var(--rpt-color-primary, #2563eb)}.canvas-active-checkbox-lbl{display:inline-flex;align-items:center;gap:6px;cursor:pointer}.canvas-live-control-wrapper{width:100%;max-width:100%;min-width:0;position:relative;z-index:1;box-sizing:border-box}.canvas-grid-box{margin-top:24px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:8px;background:#fff;box-shadow:0 1px 3px #0000000d;overflow:hidden}.grid-preview-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:var(--rpt-color-surface, #f8fafc);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);font-size:.8rem;font-weight:600;color:var(--rpt-color-text, #0f172a)}.grid-title{font-weight:700}.grid-exec-badge{font-size:.6875rem;font-weight:600;padding:2px 8px;border-radius:10px}.grid-exec-badge.is-loading{background:#eff6ff;color:#2563eb}.grid-exec-badge.is-error{background:#fee2e2;color:#ef4444}.grid-exec-badge.is-success{background:#ecfdf5;color:#059669}.btn-canvas-run-grid{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;font-size:.72rem;font-weight:600;color:#fff;background:var(--rpt-color-primary, #2563eb);border:none;border-radius:4px;cursor:pointer;transition:background .15s ease}.btn-canvas-run-grid:hover:not(:disabled){background:#1d4ed8}.btn-canvas-run-grid:disabled{opacity:.6;cursor:not-allowed}.btn-canvas-edit-grid{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:.72rem;font-weight:500;color:#334155;background:#fff;border:1px solid #cbd5e1;border-radius:4px;cursor:pointer;transition:all .12s ease}.btn-canvas-edit-grid:hover{background:#f1f5f9}.canvas-live-grid-container{width:100%;min-height:480px;background:#fff}.live-mode-badge{display:inline-flex;align-items:center;gap:4px;font-size:.6875rem;font-weight:700;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;padding:1px 8px;border-radius:9999px}.canvas-component-card.is-field-highlighted{border-color:#f59e0b!important;box-shadow:0 0 0 3px #f59e0b59!important;animation:rpt-pulse-border 1s ease-in-out infinite alternate}@keyframes rpt-pulse-border{0%{box-shadow:0 0 0 2px #f59e0b40}to{box-shadow:0 0 0 5px #f59e0b80}}.grid-layout-status-strip{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:#f1f5f9;border-bottom:1px solid var(--rpt-color-border, #cbd5e1);font-size:.6875rem;color:#475569}.grid-status-info{display:inline-flex;align-items:center;gap:6px;font-weight:600}.grid-status-sync{display:inline-flex;align-items:center;gap:4px;color:#059669;font-weight:600;transition:transform .2s ease}.grid-status-sync.is-pulsing{transform:scale(1.08);color:#047857}.canvas-actions{display:flex;align-items:center;gap:8px}.btn-grid-add{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a}.btn-grid-add:hover{background:#dcfce7;border-color:#86efac;color:#15803d}.btn-remove-grid{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;background:transparent;color:#94a3b8;border-radius:4px;cursor:pointer;transition:all .15s ease}.btn-remove-grid:hover{background:#fee2e2;color:#ef4444}.canvas-add-grid-banner{margin-top:24px;border:2px dashed #cbd5e1;border-radius:8px;background:#fff;padding:16px 20px;display:flex;align-items:center;gap:16px;cursor:pointer;transition:all .15s ease}.canvas-add-grid-banner:hover{border-color:#2563eb;background:#f8fafc;box-shadow:0 2px 8px #2563eb14}.add-grid-icon{width:40px;height:40px;border-radius:8px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;flex-shrink:0}.add-grid-text{display:flex;flex-direction:column;gap:2px;flex:1}.add-grid-title{font-size:.875rem;font-weight:600;color:#0f172a}.add-grid-sub{font-size:.75rem;color:#64748b}.btn-banner-add{padding:6px 14px;font-size:.75rem;font-weight:600;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;cursor:pointer;white-space:nowrap;transition:all .15s ease}.canvas-add-grid-banner:hover .btn-banner-add{background:#2563eb;color:#fff;border-color:#2563eb}.canvas-grid-loading-overlay{position:absolute;inset:0;background:#ffffffe6;backdrop-filter:blur(2px);z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-family:inherit;border-radius:6px}.grid-loading-title{font-weight:600;font-size:.95rem;color:#1e293b}.grid-loading-sub{font-size:.8rem;color:#64748b}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button,.canvas-active-input::-webkit-inner-spin-button,.canvas-active-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number],.canvas-active-input{-moz-appearance:textfield;appearance:textfield}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i1$2.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: i1$2.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }, { kind: "component", type: RptDropdownComponent, selector: "rpt-dropdown", inputs: ["config", "control", "parentForm", "showStatus"], outputs: ["dropdownClick"] }, { kind: "component", type: RptDateComponent, selector: "rpt-date", inputs: ["config", "control"] }, { kind: "component", type: RptDateRangeComponent, selector: "rpt-date-range", inputs: ["config", "control"] }, { kind: "component", type: RptRadioComponent, selector: "rpt-radio", inputs: ["config", "control", "parentForm"] }, { kind: "component", type: ReportGridBridgeComponent, selector: "rpt-grid-bridge", inputs: ["gridDefinition", "data"], outputs: ["gridStateChange", "columnDefsChange", "rowClick", "selectionChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14301
14461
|
}
|
|
14302
14462
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignCanvasComponent, decorators: [{
|
|
14303
14463
|
type: Component,
|
|
@@ -14308,10 +14468,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
14308
14468
|
ReactiveFormsModule,
|
|
14309
14469
|
RptIconComponent,
|
|
14310
14470
|
RptDropdownComponent,
|
|
14471
|
+
RptDateComponent,
|
|
14311
14472
|
RptDateRangeComponent,
|
|
14312
14473
|
RptRadioComponent,
|
|
14313
14474
|
ReportGridBridgeComponent,
|
|
14314
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: " <div class=\"canvas-wrapper\" (click)=\"onCanvasBackgroundClick($event)\">\n <!-- Canvas Status / Quick Controls -->\n <div class=\"canvas-toolbar\">\n <div class=\"canvas-info\">\n <span class=\"info-label\">Grid Layout:</span>\n <span class=\"info-value\">{{ totalColumns() }} Columns</span>\n <span class=\"info-divider\">\u2022</span>\n <span class=\"info-label\">Components:</span>\n <span class=\"info-value\">{{ components().length }}</span>\n <span class=\"info-divider\">\u2022</span>\n <span class=\"live-mode-badge\" title=\"Interactive canvas: Values typed here run live queries and test dropdowns.\">\n \u26A1 Live Interactive Mode\n </span>\n </div>\n\n <div class=\"canvas-actions\">\n @if (!definition().grid) {\n <button\n type=\"button\"\n class=\"canvas-action-btn btn-grid-add\"\n (click)=\"addResultGrid($event)\"\n title=\"Add a Result Grid to this report\"\n >\n <rpt-icon name=\"table\" [size]=\"14\" />\n <span>+ Add Grid</span>\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"canvas-action-btn btn-grid-configured\"\n (click)=\"selectGridSettings($event)\"\n title=\"Configure Result Data Grid\"\n >\n <rpt-icon name=\"table\" [size]=\"14\" />\n <span>Grid ({{ definition().grid?.columns?.length ?? 0 }})</span>\n </button>\n }\n\n <button\n type=\"button\"\n class=\"canvas-action-btn\"\n (click)=\"selectReportSettings($event)\"\n title=\"Configure Page Layout & Grid Settings\"\n >\n <rpt-icon name=\"settings\" [size]=\"14\" />\n <span>Report Settings</span>\n </button>\n </div>\n </div>\n\n <!-- Canvas Drop Area -->\n <div class=\"canvas-scroll-area\" cdkScrollable>\n <div\n class=\"canvas-artboard\"\n [style.padding.px]=\"definition().layout.padding ?? 24\"\n >\n <!-- Report Header Preview -->\n <div class=\"canvas-report-header\">\n <h2 class=\"canvas-report-title\">{{ definition().name || 'Untitled Report' }}</h2>\n @if (definition().description) {\n <p class=\"canvas-report-desc\">{{ definition().description }}</p>\n }\n </div>\n\n <!-- Component Drop List Grid with 2D mixed orientation and data binding -->\n <div\n cdkDropList\n id=\"designer-canvas-drop-list\"\n class=\"canvas-grid\"\n cdkDropListOrientation=\"mixed\"\n [cdkDropListData]=\"sortedComponents()\"\n [style.grid-template-columns]=\"gridTemplateColumns()\"\n [style.gap.px]=\"definition().layout.gap ?? 16\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n @for (comp of sortedComponents(); track comp.id; let idx = $index) {\n <div\n cdkDrag\n [cdkDragData]=\"comp\"\n [cdkDragDisabled]=\"isAnyResizing()\"\n class=\"canvas-component-card\"\n [class.is-selected]=\"isSelected(comp.id)\"\n [class.is-resizing]=\"resizingCompId() === comp.id\"\n [class.is-field-highlighted]=\"isFieldHighlighted(comp)\"\n [class.is-narrow]=\"getSpan(comp) <= 4\"\n [class.is-compact]=\"getSpan(comp) <= 2\"\n [style.grid-column]=\"getGridColumn(comp)\"\n [style.grid-row]=\"getGridRow(comp)\"\n [style.width]=\"comp.layout?.width || 'auto'\"\n [style.height]=\"getComponentHeight(comp)\"\n [style.min-height]=\"getComponentMinHeight(comp)\"\n (click)=\"onSelect(comp.id, $event)\"\n >\n <!-- Card Header with Drag Handle & Actions -->\n <div class=\"card-header\">\n <div class=\"card-title-group\" cdkDragHandle title=\"Drag to reorder\">\n <span class=\"drag-handle-dots\">\u22EE\u22EE</span>\n <rpt-icon [name]=\"getComponentIconName(comp.type)\" [size]=\"14\" />\n <span class=\"comp-title\" [title]=\"comp.label || comp.key || comp.type\">\n {{ comp.label || comp.key || comp.type }}\n </span>\n </div>\n\n <div class=\"card-actions\">\n <!-- Static span pill & new row / start col pill when not hovered / not selected -->\n @if (comp.layout?.column; as col) {\n <span class=\"new-row-pill-static\" title=\"Starts at Column {{ col }}\">Col {{ col }}</span>\n } @else if (comp.layout?.newRow) {\n <span class=\"new-row-pill-static\" title=\"Starts on separate row\">\u21B3 Row</span>\n }\n <span\n class=\"span-pill-static\"\n title=\"Column span: {{ getSpan(comp) }} of {{ totalColumns() }} columns\"\n >\n {{ getSpan(comp) }}/{{ totalColumns() }}\n </span>\n\n <!-- Quick Action Stepper & Buttons (revealed on hover or selection) -->\n <div class=\"card-quick-controls\">\n <button\n type=\"button\"\n class=\"card-action-btn\"\n [class.btn-active-toggle]=\"comp.layout?.newRow\"\n (click)=\"toggleNewRow(comp, $event)\"\n title=\"{{ comp.layout?.newRow ? 'Starts on new row (Click to place inline)' : 'Start on separate row (Row Break)' }}\"\n >\n <rpt-icon name=\"corner-down-right\" [size]=\"11\" />\n </button>\n\n <div class=\"span-control-group\" title=\"Adjust Column Span\">\n <button\n type=\"button\"\n class=\"span-btn\"\n [disabled]=\"getSpan(comp) <= 1\"\n (click)=\"adjustSpan(comp, -1, $event)\"\n title=\"Shrink Column Span\"\n >\n <rpt-icon name=\"minus\" [size]=\"9\" />\n </button>\n <span class=\"span-badge\" [title]=\"'Column span: ' + getSpan(comp) + ' of ' + totalColumns()\">\n <span class=\"span-num\">{{ getSpan(comp) }}</span><span class=\"span-total\">/{{ totalColumns() }}</span>\n </span>\n <button\n type=\"button\"\n class=\"span-btn\"\n [disabled]=\"getSpan(comp) >= totalColumns()\"\n (click)=\"adjustSpan(comp, 1, $event)\"\n title=\"Expand Column Span\"\n >\n <rpt-icon name=\"plus\" [size]=\"9\" />\n </button>\n </div>\n\n <button\n type=\"button\"\n class=\"card-action-btn\"\n (click)=\"onDuplicate(comp.id, $event)\"\n title=\"Duplicate component\"\n >\n <rpt-icon name=\"copy\" [size]=\"12\" />\n </button>\n <button\n type=\"button\"\n class=\"card-action-btn btn-delete\"\n (click)=\"onDelete(comp.id, $event)\"\n title=\"Remove component\"\n >\n <rpt-icon name=\"trash\" [size]=\"12\" />\n </button>\n </div>\n </div>\n </div>\n\n <!-- Card Body Visual Preview -->\n <div class=\"card-body\">\n\n @switch (comp.type) {\n @case ('input') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Input' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"text\"\n class=\"canvas-active-input\"\n [placeholder]=\"comp.properties?.['placeholder'] || 'Enter text...'\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-input-box\">{{ comp.properties?.['placeholder'] || 'Enter text...' }}</div>\n }\n </div>\n }\n @case ('dropdown') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-dropdown\n [config]=\"comp\"\n [showStatus]=\"true\"\n [parentForm]=\"canvasForm()\"\n [control]=\"getCanvasControl(comp)\"\n (dropdownClick)=\"onControlInteract(comp)\"\n />\n </div>\n }\n @case ('date') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Date' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"date\"\n class=\"canvas-active-input\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-select-box\">\n <span>YYYY-MM-DD</span>\n <rpt-icon name=\"calendar\" [size]=\"12\" />\n </div>\n }\n </div>\n }\n @case ('date-range') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-date-range\n [config]=\"comp\"\n [control]=\"getCanvasControl(comp)\"\n />\n </div>\n }\n @case ('number') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Number' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"number\"\n class=\"canvas-active-input\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-input-box\">\n {{ comp.properties?.['prefix'] || '' }} 0.00 {{ comp.properties?.['suffix'] || '' }}\n </div>\n }\n </div>\n }\n @case ('checkbox') {\n <div class=\"mock-checkbox-field\" (click)=\"onControlInteract(comp, $event)\">\n @if (getCanvasControl(comp); as ctrl) {\n <label class=\"canvas-active-checkbox-lbl\">\n <input type=\"checkbox\" [formControl]=\"ctrl\" (focus)=\"onControlInteract(comp, $event)\" />\n <span class=\"mock-label\">{{ comp.label || 'Checkbox' }}</span>\n </label>\n } @else {\n <span class=\"mock-check-box\">\n <rpt-icon name=\"check\" [size]=\"10\" />\n </span>\n <span class=\"mock-label\">{{ comp.label || 'Checkbox' }}</span>\n }\n </div>\n }\n @case ('radio') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-radio\n [config]=\"comp\"\n [control]=\"getCanvasControl(comp)\"\n [parentForm]=\"canvasForm()\"\n />\n </div>\n }\n @case ('button') {\n <div class=\"mock-btn-wrapper\">\n <button\n type=\"button\"\n class=\"mock-btn\"\n [class]=\"'btn-' + (comp.properties?.['variant'] || 'primary')\"\n [class.mock-btn-full]=\"comp.properties?.['fullWidth'] === true || comp.layout?.width === '100%'\"\n [style.height]=\"getCustomBtnHeight(comp)\"\n [style.width]=\"getCustomBtnWidth(comp)\"\n (click)=\"onCanvasButtonClick(comp, $event)\"\n >\n @if (getCustomBtnIcon(comp); as btnIcon) {\n <rpt-icon [name]=\"btnIcon\" [size]=\"15\" />\n }\n <span>{{ comp.label || 'Button' }}</span>\n </button>\n </div>\n }\n @case ('kpi-card') {\n <div class=\"mock-kpi-field\">\n <div class=\"mock-kpi-header\">\n <span class=\"mock-label\">{{ comp.label || 'KPI Metric' }}</span>\n <rpt-icon name=\"kpi\" [size]=\"14\" />\n </div>\n <div class=\"mock-kpi-value\">{{ comp.properties?.['value'] || '$128,450' }}</div>\n <div class=\"mock-kpi-footer\">\n <span class=\"mock-kpi-trend\">+12.5%</span>\n <span class=\"mock-kpi-sub\">vs last period</span>\n </div>\n </div>\n }\n @case ('chart') {\n <div class=\"mock-chart-field\">\n <div class=\"mock-chart-header\">\n <span class=\"mock-label\">{{ comp.label || 'Quarterly Sales Revenue ($000)' }}</span>\n </div>\n <div class=\"mock-chart-bars\">\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 44%\"></div>\n <span class=\"mock-bar-lbl\">Q1 Jan-Mar</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 61%\"></div>\n <span class=\"mock-bar-lbl\">Q2 Apr-Jun</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 79%\"></div>\n <span class=\"mock-bar-lbl\">Q3 Jul-Sep</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 100%\"></div>\n <span class=\"mock-bar-lbl\">Q4 Oct-Dec</span>\n </div>\n </div>\n </div>\n }\n @default {\n <div class=\"mock-generic-box\">\n <span>{{ comp.type }}</span>\n </div>\n }\n }\n </div>\n\n <!-- Resizing Handles (East, South, South-East) -->\n <div\n class=\"resize-handle handle-e\"\n (pointerdown)=\"startResize($event, comp, 'e')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize column width \u2022 Double-click to reset\"\n ></div>\n <div\n class=\"resize-handle handle-s\"\n (pointerdown)=\"startResize($event, comp, 's')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize height \u2022 Double-click to reset\"\n ></div>\n <div\n class=\"resize-handle handle-se\"\n (pointerdown)=\"startResize($event, comp, 'se')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize width and height \u2022 Double-click to reset\"\n ></div>\n\n <!-- Resizing Dimension Ghost / Badge -->\n @if (resizingCompId() === comp.id) {\n <div class=\"resize-dimension-tooltip\">\n {{ resizingTooltip(comp) }}\n </div>\n }\n\n <!-- Drag placeholder with matched grid column span -->\n <div\n *cdkDragPlaceholder\n class=\"canvas-drag-placeholder\"\n [style.grid-column]=\"getGridColumn(comp)\"\n ></div>\n\n <!-- Drag preview -->\n <div *cdkDragPreview class=\"canvas-drag-preview\">\n <span class=\"drag-handle-dots\">\u22EE\u22EE</span>\n <rpt-icon [name]=\"getComponentIconName(comp.type)\" [size]=\"14\" />\n <span class=\"preview-title\">{{ comp.label || comp.key || comp.type }}</span>\n <span class=\"preview-span\">{{ getSpan(comp) }}/{{ totalColumns() }}</span>\n </div>\n </div>\n }\n\n @if (components().length === 0) {\n <div class=\"canvas-empty-state\" role=\"region\" aria-label=\"Empty canvas starter options\">\n <div class=\"empty-hero-badge\">\n <rpt-icon name=\"design\" [size]=\"28\" />\n </div>\n <h3 class=\"empty-hero-title\">Start Designing Your Custom Report</h3>\n <p class=\"empty-hero-desc\">\n Drag controls from the left component palette, or jumpstart your design with pre-configured enterprise blueprints.\n </p>\n\n <div class=\"empty-hero-actions\">\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-primary\"\n (click)=\"applyBlueprint('blueprint-audit-register')\"\n title=\"Load complete Audit Register blueprint with parameters and result grid\"\n >\n <rpt-icon name=\"table\" [size]=\"15\" />\n <span>Audit Register Blueprint</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-secondary\"\n (click)=\"applyBlueprint('blueprint-kpi-summary')\"\n title=\"Load Executive KPI summary blueprint\"\n >\n <rpt-icon name=\"chart-bar\" [size]=\"15\" />\n <span>KPI Summary Blueprint</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-outline\"\n (click)=\"addStarterComponent('date-range')\"\n title=\"Add a Date Range filter component\"\n >\n <rpt-icon name=\"calendar\" [size]=\"14\" />\n <span>+ Add Date Filter</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-outline\"\n (click)=\"addStarterComponent('button')\"\n title=\"Add an Execute Action button\"\n >\n <rpt-icon name=\"play\" [size]=\"14\" />\n <span>+ Add Run Button</span>\n </button>\n </div>\n </div>\n }\n </div>\n\n <!-- Live Result Grid Preview with Bways-Grid Features -->\n @if (definition().grid) {\n <div class=\"canvas-grid-box\">\n <div class=\"grid-preview-header\">\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <rpt-icon name=\"table\" [size]=\"15\" />\n <span class=\"grid-title\">Bways Grid ({{ definition().grid?.columns?.length ?? 0 }} columns)</span>\n @if (isExecutingGrid()) {\n <span class=\"grid-exec-badge is-loading\">Loading data from database...</span>\n } @else if (gridExecError()) {\n <span class=\"grid-exec-badge is-error\">{{ gridExecError() }}</span>\n } @else if (canvasGridData().length > 0) {\n <span class=\"grid-exec-badge is-success\">{{ canvasGridData().length }} rows loaded</span>\n }\n </div>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <button\n type=\"button\"\n class=\"btn-canvas-run-grid\"\n (click)=\"executeCanvasReport($event)\"\n [disabled]=\"isExecutingGrid()\"\n title=\"Execute query and load data into Bways Grid\"\n >\n <rpt-icon name=\"play\" [size]=\"11\" />\n <span>{{ isExecutingGrid() ? 'Running...' : 'Run / Refresh Grid' }}</span>\n </button>\n <button\n type=\"button\"\n class=\"btn-canvas-edit-grid\"\n (click)=\"selectGridSettings($event)\"\n title=\"Configure columns and grid options\"\n >\n <rpt-icon name=\"settings\" [size]=\"11\" />\n <span>Configure</span>\n </button>\n <button\n type=\"button\"\n class=\"btn-remove-grid\"\n (click)=\"removeGrid($event)\"\n title=\"Remove Result Grid from this report\"\n >\n <rpt-icon name=\"trash\" [size]=\"13\" />\n </button>\n </div>\n </div>\n\n @if (getGridSummaryText(); as summary) {\n <div class=\"grid-layout-status-strip\">\n <div class=\"grid-status-info\">\n <rpt-icon name=\"table\" [size]=\"12\" />\n <span>{{ summary }}</span>\n </div>\n <div class=\"grid-status-sync\" [class.is-pulsing]=\"layoutJustUpdated()\">\n <rpt-icon name=\"check\" [size]=\"11\" />\n <span>Layout auto-persisted</span>\n </div>\n </div>\n }\n\n <!-- Live Bways Grid bridge -->\n <div class=\"canvas-live-grid-container\" (click)=\"$event.stopPropagation()\" style=\"position: relative; min-height: 250px;\">\n @if (isExecutingGrid()) {\n <div class=\"canvas-grid-loading-overlay\">\n <span class=\"status-dot dot-pulse\" style=\"width: 14px; height: 14px; color: #2563eb; background: #2563eb; border-radius: 50%;\"></span>\n <span class=\"grid-loading-title\">Executing stored procedure on SQL Server...</span>\n <span class=\"grid-loading-sub\">Calculating outstanding balances and ledger amounts. Please wait...</span>\n </div>\n }\n <rpt-grid-bridge\n [gridDefinition]=\"definition().grid!\"\n [data]=\"canvasGridData()\"\n (gridStateChange)=\"onCanvasGridStateChange($event)\"\n (columnDefsChange)=\"onCanvasColumnDefsChange($event)\"\n />\n </div>\n </div>\n } @else {\n <div class=\"canvas-add-grid-banner\" (click)=\"addResultGrid($event)\">\n <div class=\"add-grid-icon\">\n <rpt-icon name=\"table\" [size]=\"20\" />\n </div>\n <div class=\"add-grid-text\">\n <span class=\"add-grid-title\">+ Add Result Data Grid</span>\n <span class=\"add-grid-sub\">Attach an interactive data table or UltraGrid to display report execution output</span>\n </div>\n <button type=\"button\" class=\"btn-banner-add\">Add Grid</button>\n </div>\n }\n </div>\n </div>\n </div>", styles: [":host{display:block;flex:1;min-height:0;min-width:0;height:100%;background-color:#f1f5f9;font-family:var(--rpt-font-family, inherit);box-sizing:border-box}.canvas-wrapper{min-height:0;display:flex;flex-direction:column;height:100%}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:42px;height:42px;padding:0 24px;background:var(--rpt-color-surface, #ffffff);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);box-sizing:border-box;gap:12px;overflow-x:auto;scrollbar-width:none;font-family:var(--rpt-font-family, inherit);flex-shrink:0}.canvas-toolbar::-webkit-scrollbar{display:none}.canvas-info{display:flex;align-items:center;gap:8px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);white-space:nowrap;line-height:1}.info-label{color:var(--rpt-color-text-muted, #64748b);font-weight:500;font-size:var(--rpt-font-size-sm, .75rem)}.info-value{font-weight:600;color:var(--rpt-color-text, #0f172a);font-size:var(--rpt-font-size-sm, .75rem)}.info-divider{color:var(--rpt-color-border, #cbd5e1);margin:0 2px}.live-mode-badge{display:inline-flex;align-items:center;gap:4px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-xs, .7rem);font-weight:600;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;padding:2px 8px;border-radius:9999px;line-height:1}.canvas-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.canvas-action-btn{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;letter-spacing:-.01em;color:var(--rpt-color-text-secondary, #334155);background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;line-height:1;white-space:nowrap;box-shadow:0 1px 2px #0000000a;transition:all var(--rpt-transition-speed, .15s) ease}.canvas-action-btn:hover{background:var(--rpt-color-surface-hover, #f8fafc);border-color:var(--rpt-color-border-hover, #94a3b8);color:var(--rpt-color-text, #0f172a);box-shadow:0 2px 4px #0000000f}.canvas-action-btn.btn-grid-configured{background:#eff6ff;border-color:#bfdbfe;color:#2563eb;font-weight:600}.canvas-action-btn.btn-grid-configured:hover{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}.canvas-action-btn.btn-grid-add{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a;font-weight:600}.canvas-action-btn.btn-grid-add:hover{background:#dcfce7;color:#15803d;border-color:#86efac}.canvas-action-btn:active{transform:translateY(1px)}.canvas-scroll-area{flex:1;min-height:0;overflow-y:auto;padding:16px}.canvas-artboard{width:100%;max-width:1400px;margin:0 auto;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);box-shadow:0 4px 6px -1px #0000000d;min-height:480px;box-sizing:border-box}@media (max-width: 900px){.canvas-toolbar{min-height:36px;height:36px;padding:0 10px;gap:6px}.live-mode-badge{display:none}.canvas-info{font-size:.75rem;gap:5px}.canvas-action-btn{padding:0 8px;font-size:.725rem;height:28px;gap:4px}.canvas-scroll-area{padding:10px}.canvas-artboard{min-height:360px}}@media (max-width: 600px){.canvas-toolbar{padding:0 8px;gap:4px}.canvas-info .info-label,.canvas-action-btn span{display:none}.canvas-action-btn{padding:0 6px;min-width:28px;justify-content:center}}.canvas-report-header{margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--rpt-color-border, #e2e8f0)}.canvas-report-title{font-size:var(--rpt-font-size-xl, 1.5rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 6px}.canvas-report-desc{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #64748b);margin:0}.canvas-grid{display:grid;width:100%;min-height:180px;align-items:start;border-radius:6px;transition:all var(--rpt-transition-speed, .15s) ease}.canvas-component-card{container-type:inline-size;background:#fff;border:1.5px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);box-shadow:var(--rpt-box-shadow, 0 1px 2px rgba(0, 0, 0, .05));box-sizing:border-box;transition:all var(--rpt-transition-speed, .15s) ease;cursor:pointer;position:relative;overflow:visible;display:flex;flex-direction:column;min-height:104px;z-index:1}.canvas-component-card:hover{border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 4px 6px -1px #2563eb1a;z-index:2}.canvas-component-card.is-selected{border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 0 0 2px #2563eb40;z-index:10}.canvas-component-card:focus-within,.canvas-component-card:has(.rpt-combobox-menu),.canvas-component-card:has(.is-open){z-index:100}.canvas-component-card.is-resizing{-webkit-user-select:none;user-select:none;border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 0 0 2px #2563eb59;z-index:30;transition:none!important}.resize-handle{position:absolute;z-index:20;touch-action:none;opacity:0;pointer-events:none;transition:opacity .15s ease}.canvas-component-card.is-selected .resize-handle{opacity:1;pointer-events:auto}.resize-handle.handle-e{top:0;right:0;width:6px;height:100%;cursor:ew-resize;display:flex;align-items:center;justify-content:center}.resize-handle.handle-e:after{content:\"\";width:3px;height:24px;background:#cbd5e1;border-radius:2px;transition:background .15s ease}.resize-handle.handle-e:hover:after,.canvas-component-card.is-selected .resize-handle.handle-e:after{background:var(--rpt-color-primary, #2563eb)}.resize-handle.handle-s{bottom:0;left:0;height:6px;width:100%;cursor:ns-resize;display:flex;align-items:center;justify-content:center}.resize-handle.handle-s:after{content:\"\";height:3px;width:24px;background:#cbd5e1;border-radius:2px;transition:background .15s ease}.resize-handle.handle-s:hover:after,.canvas-component-card.is-selected .resize-handle.handle-s:after{background:var(--rpt-color-primary, #2563eb)}.resize-handle.handle-se{bottom:0;right:0;width:12px;height:12px;cursor:nwse-resize;display:flex;align-items:flex-end;justify-content:flex-end;padding:2px}.resize-handle.handle-se:after{content:\"\";width:5px;height:5px;border-right:2px solid #cbd5e1;border-bottom:2px solid #cbd5e1;transition:border-color .15s ease}.resize-handle.handle-se:hover:after,.canvas-component-card.is-selected .resize-handle.handle-se:after{border-color:var(--rpt-color-primary, #2563eb)}.resize-dimension-tooltip{position:absolute;top:38px;right:8px;background:#0f172ae6;color:#fff;font-size:.7rem;font-weight:600;padding:3px 8px;border-radius:4px;white-space:nowrap;pointer-events:none;z-index:50;box-shadow:0 2px 4px #0003}.card-header{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:5px 8px;background:var(--rpt-color-surface, #f8fafc);border-bottom:1px solid var(--rpt-color-border, #e2e8f0);border-top-left-radius:var(--rpt-border-radius, 6px);border-top-right-radius:var(--rpt-border-radius, 6px);min-height:32px;box-sizing:border-box;overflow:hidden;position:relative}.canvas-component-card.is-selected .card-header{overflow:visible}.card-title-group{display:flex;align-items:center;gap:5px;cursor:grab;min-width:0;flex:1;overflow:hidden}.drag-handle-dots{color:var(--rpt-color-text-muted, #94a3b8);font-size:.85rem;letter-spacing:-2px;flex-shrink:0;-webkit-user-select:none;user-select:none}.comp-title{font-size:.75rem;font-weight:600;color:var(--rpt-color-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.card-actions{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:auto}.new-row-pill-static{font-size:.65rem;font-weight:600;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;padding:1px 5px;border-radius:9999px;white-space:nowrap;line-height:1;flex-shrink:0}.span-pill-static{display:inline-flex;align-items:center;justify-content:center;font-size:.65rem;font-weight:600;color:var(--rpt-color-text-muted, #64748b);background:var(--rpt-color-surface, #f1f5f9);border:1px solid var(--rpt-color-border, #e2e8f0);padding:1px 6px;border-radius:9999px;line-height:1.2;white-space:nowrap;-webkit-user-select:none;user-select:none}.card-quick-controls{display:none;align-items:center;gap:3px;flex-shrink:0}.canvas-component-card:hover .span-pill-static,.canvas-component-card.is-selected .span-pill-static,.canvas-component-card:hover .new-row-pill-static,.canvas-component-card.is-selected .new-row-pill-static{display:none}.canvas-component-card:hover .card-quick-controls,.canvas-component-card.is-selected .card-quick-controls{display:inline-flex}.canvas-component-card.is-narrow .card-header{padding:4px 6px;gap:3px}.canvas-component-card.is-narrow:hover .comp-title,.canvas-component-card.is-narrow.is-selected .comp-title,.canvas-component-card.is-narrow:hover .drag-handle-dots,.canvas-component-card.is-narrow.is-selected .drag-handle-dots{display:none}.canvas-component-card.is-narrow .card-quick-controls{gap:2px}.canvas-component-card.is-narrow .span-control-group{height:18px}.canvas-component-card.is-narrow .span-btn{width:14px;height:16px}.canvas-component-card.is-narrow .span-badge{font-size:.6rem;padding:0 2px}.canvas-component-card.is-narrow .span-total{display:none}.canvas-component-card.is-narrow .card-action-btn{width:18px;height:18px}@container (max-width: 250px){.card-header{padding:4px 6px;gap:3px}.canvas-component-card:hover .comp-title,.canvas-component-card.is-selected .comp-title,.canvas-component-card:hover .drag-handle-dots,.canvas-component-card.is-selected .drag-handle-dots,.span-total{display:none}.card-quick-controls{gap:2px}.card-action-btn{width:18px;height:18px}.span-control-group{height:18px}.span-btn{width:14px;height:16px}.span-badge{font-size:.6rem;padding:0 2px}}@container (max-width: 160px){.canvas-component-card.is-selected .card-quick-controls{position:absolute;top:-30px;right:0;background:#fff;border:1.5px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:2px 4px;gap:3px;box-shadow:0 4px 12px #2563eb2e,0 2px 4px #00000014;z-index:120;white-space:nowrap}}@media (max-width: 900px){.canvas-component-card:hover .comp-title,.canvas-component-card.is-selected .comp-title,.canvas-component-card:hover .drag-handle-dots,.canvas-component-card.is-selected .drag-handle-dots,.canvas-component-card .span-total{display:none}.canvas-component-card.is-selected .card-header{overflow:visible}.canvas-component-card.is-selected .card-quick-controls{position:absolute;top:-30px;right:0;background:#fff;border:1.5px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:2px 4px;gap:3px;box-shadow:0 4px 12px #2563eb2e,0 2px 4px #00000014;z-index:120;white-space:nowrap}}.span-control-group{display:inline-flex;align-items:center;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;height:20px;padding:0 1px;white-space:nowrap;flex-shrink:0}.span-btn{width:16px;height:18px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0;color:var(--rpt-color-text-muted, #64748b);cursor:pointer;border-radius:2px;transition:all .12s ease}.span-btn:hover:not(:disabled){background:var(--rpt-color-surface-hover, #f1f5f9);color:var(--rpt-color-primary, #2563eb)}.span-btn:disabled{opacity:.3;cursor:not-allowed}.span-badge{font-size:.65rem;font-weight:600;color:var(--rpt-color-text, #0f172a);padding:0 3px;white-space:nowrap;-webkit-user-select:none;user-select:none;line-height:1}.span-total{font-size:.6rem;color:var(--rpt-color-text-muted, #64748b);font-weight:500}.card-action-btn{width:20px;height:20px;border:none;background:transparent;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;color:var(--rpt-color-text-muted, #64748b);transition:all .12s ease;flex-shrink:0}.card-action-btn:hover{background:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.card-action-btn.btn-active-toggle{background:#7c3aed;color:#fff;border-color:#7c3aed}.card-action-btn.btn-active-toggle:hover{background:#6d28d9;color:#fff}.btn-delete:hover{background:#fee2e2;color:#ef4444}.card-body{padding:8px 10px 14px;flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;max-width:100%;box-sizing:border-box;overflow:visible}.mock-input-field{display:flex;flex-direction:column;gap:4px;flex:1;height:100%;min-height:0}.mock-label{font-size:.7rem;font-weight:600;color:var(--rpt-color-text-muted, #475569);flex-shrink:0}.mock-input-box,.mock-select-box{border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:6px;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #94a3b8);background:#fff;flex:1;min-height:38px;height:100%;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.mock-checkbox-field{display:flex;align-items:center;gap:6px;flex:1;height:100%;min-height:0;padding-top:14px}.mock-check-box{width:18px;height:18px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:.65rem;color:var(--rpt-color-primary, #2563eb);flex-shrink:0}.mock-btn-wrapper{display:flex;flex:1;height:100%;min-height:38px;align-items:center;justify-content:flex-start;width:100%;min-width:0;box-sizing:border-box}.mock-btn{border-radius:var(--rpt-border-radius, 6px);padding:0 16px;height:36px;font-size:var(--rpt-font-size-base, .875rem);font-weight:500;border:1px solid transparent;cursor:pointer;width:auto;max-width:100%;display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .15s ease}.mock-btn.mock-btn-full{width:100%}.canvas-component-card.is-narrow .mock-btn{padding:0 6px;font-size:.775rem;width:100%;height:34px}.mock-kpi-field{display:flex;flex-direction:column;justify-content:space-between;flex:1;height:100%;min-height:0}.mock-kpi-header{display:flex;align-items:center;justify-content:space-between}.mock-kpi-value{font-size:1.25rem;font-weight:700;color:var(--rpt-color-text, #0f172a);margin:2px 0}.mock-kpi-footer{display:flex;align-items:center;gap:6px;font-size:.65rem}.mock-kpi-trend{color:#16a34a;font-weight:600}.mock-kpi-sub{color:#64748b}.mock-chart-field{display:flex;flex-direction:column;flex:1;height:100%;min-height:140px}.mock-chart-bars{display:flex;align-items:flex-end;justify-content:space-around;gap:16px;flex:1;min-height:100px;padding-top:12px;box-sizing:border-box}.mock-chart-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;min-width:60px;max-width:140px}.mock-chart-bar{width:38px;max-width:44px;margin:0 auto;background:var(--rpt-color-primary, #2563eb);border-radius:6px 6px 0 0;opacity:.85;min-height:10px;transition:height .2s ease}.mock-bar-lbl{font-size:.6875rem;color:#64748b;margin-top:6px;text-align:center;white-space:normal;line-height:1.2}.btn-primary{background:var(--rpt-color-primary, #2563eb);color:#fff}.btn-secondary{background:#f1f5f9;color:#0f172a;border:1px solid #cbd5e1}.btn-outline{background:transparent;color:#2563eb;border:1px solid #2563eb}.btn-danger{background:#ef4444;color:#fff}.mock-generic-box{border:1px dashed #cbd5e1;border-radius:4px;padding:8px;font-size:.75rem;text-align:center;color:#64748b}.canvas-drag-placeholder{background:#2563eb0f;border:2px dashed var(--rpt-color-primary, #2563eb);border-radius:6px;min-height:80px;box-sizing:border-box;transition:transform .15s ease}.canvas-drag-preview,::ng-deep .canvas-drag-preview{background:#fff;border:2px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:8px 14px;display:inline-flex;align-items:center;gap:8px;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif)!important;font-size:.8rem;font-weight:600;color:var(--rpt-color-text, #0f172a);box-shadow:0 12px 24px -4px #00000040;z-index:10000}.preview-title,::ng-deep .preview-title{font-family:inherit!important;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-span,::ng-deep .preview-span{font-family:inherit!important;font-size:.65rem;font-weight:600;color:var(--rpt-color-primary, #2563eb);background:#eff6ff;border:1px solid #bfdbfe;padding:1px 6px;border-radius:9999px}.canvas-empty-state{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 28px;border:2px dashed var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-xl, 12px);background:var(--rpt-color-surface, #ffffff);text-align:center;box-shadow:var(--rpt-box-shadow-xs, 0 1px 2px 0 rgba(0, 0, 0, .04));transition:border-color var(--rpt-transition-speed, .15s) ease}.canvas-empty-state:hover{border-color:var(--rpt-color-primary, #2563eb)}.empty-hero-badge{width:56px;height:56px;border-radius:var(--rpt-border-radius-xl, 12px);background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);display:flex;align-items:center;justify-content:center;margin-bottom:16px;box-shadow:0 2px 8px #2563eb1f}.empty-hero-title{font-size:var(--rpt-font-size-lg, 1.125rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 8px;letter-spacing:-.01em}.empty-hero-desc{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #64748b);max-width:520px;line-height:1.5;margin:0 0 24px}.empty-hero-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px}.empty-btn{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;font-size:var(--rpt-font-size-sm, .75rem);font-weight:600;border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;font-family:inherit}.empty-btn-primary{background:var(--rpt-color-primary, #2563eb);color:#fff;border:1px solid var(--rpt-color-primary, #2563eb);box-shadow:0 1px 3px #2563eb33}.empty-btn-primary:hover{background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8);transform:translateY(-1px)}.empty-btn-secondary{background:#f8fafc;color:#334155;border:1px solid var(--rpt-color-border, #cbd5e1)}.empty-btn-secondary:hover{background:#f1f5f9;color:#0f172a;border-color:#94a3b8;transform:translateY(-1px)}.empty-btn-outline{background:#fff;color:var(--rpt-color-primary, #2563eb);border:1px solid #bfdbfe}.empty-btn-outline:hover{background:#eff6ff;border-color:var(--rpt-color-primary, #2563eb);transform:translateY(-1px)}.canvas-active-input{width:100%;height:32px;padding:4px 8px;font-size:.8125rem;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;outline:none;box-sizing:border-box;background:#fff;color:#0f172a;transition:border-color .15s ease}.canvas-active-input:focus{border-color:var(--rpt-color-primary, #2563eb)}.canvas-active-checkbox-lbl{display:inline-flex;align-items:center;gap:6px;cursor:pointer}.canvas-live-control-wrapper{width:100%;max-width:100%;min-width:0;position:relative;z-index:1;box-sizing:border-box}.canvas-grid-box{margin-top:24px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:8px;background:#fff;box-shadow:0 1px 3px #0000000d;overflow:hidden}.grid-preview-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:var(--rpt-color-surface, #f8fafc);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);font-size:.8rem;font-weight:600;color:var(--rpt-color-text, #0f172a)}.grid-title{font-weight:700}.grid-exec-badge{font-size:.6875rem;font-weight:600;padding:2px 8px;border-radius:10px}.grid-exec-badge.is-loading{background:#eff6ff;color:#2563eb}.grid-exec-badge.is-error{background:#fee2e2;color:#ef4444}.grid-exec-badge.is-success{background:#ecfdf5;color:#059669}.btn-canvas-run-grid{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;font-size:.72rem;font-weight:600;color:#fff;background:var(--rpt-color-primary, #2563eb);border:none;border-radius:4px;cursor:pointer;transition:background .15s ease}.btn-canvas-run-grid:hover:not(:disabled){background:#1d4ed8}.btn-canvas-run-grid:disabled{opacity:.6;cursor:not-allowed}.btn-canvas-edit-grid{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:.72rem;font-weight:500;color:#334155;background:#fff;border:1px solid #cbd5e1;border-radius:4px;cursor:pointer;transition:all .12s ease}.btn-canvas-edit-grid:hover{background:#f1f5f9}.canvas-live-grid-container{width:100%;min-height:480px;background:#fff}.live-mode-badge{display:inline-flex;align-items:center;gap:4px;font-size:.6875rem;font-weight:700;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;padding:1px 8px;border-radius:9999px}.canvas-component-card.is-field-highlighted{border-color:#f59e0b!important;box-shadow:0 0 0 3px #f59e0b59!important;animation:rpt-pulse-border 1s ease-in-out infinite alternate}@keyframes rpt-pulse-border{0%{box-shadow:0 0 0 2px #f59e0b40}to{box-shadow:0 0 0 5px #f59e0b80}}.grid-layout-status-strip{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:#f1f5f9;border-bottom:1px solid var(--rpt-color-border, #cbd5e1);font-size:.6875rem;color:#475569}.grid-status-info{display:inline-flex;align-items:center;gap:6px;font-weight:600}.grid-status-sync{display:inline-flex;align-items:center;gap:4px;color:#059669;font-weight:600;transition:transform .2s ease}.grid-status-sync.is-pulsing{transform:scale(1.08);color:#047857}.canvas-actions{display:flex;align-items:center;gap:8px}.btn-grid-add{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a}.btn-grid-add:hover{background:#dcfce7;border-color:#86efac;color:#15803d}.btn-remove-grid{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;background:transparent;color:#94a3b8;border-radius:4px;cursor:pointer;transition:all .15s ease}.btn-remove-grid:hover{background:#fee2e2;color:#ef4444}.canvas-add-grid-banner{margin-top:24px;border:2px dashed #cbd5e1;border-radius:8px;background:#fff;padding:16px 20px;display:flex;align-items:center;gap:16px;cursor:pointer;transition:all .15s ease}.canvas-add-grid-banner:hover{border-color:#2563eb;background:#f8fafc;box-shadow:0 2px 8px #2563eb14}.add-grid-icon{width:40px;height:40px;border-radius:8px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;flex-shrink:0}.add-grid-text{display:flex;flex-direction:column;gap:2px;flex:1}.add-grid-title{font-size:.875rem;font-weight:600;color:#0f172a}.add-grid-sub{font-size:.75rem;color:#64748b}.btn-banner-add{padding:6px 14px;font-size:.75rem;font-weight:600;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;cursor:pointer;white-space:nowrap;transition:all .15s ease}.canvas-add-grid-banner:hover .btn-banner-add{background:#2563eb;color:#fff;border-color:#2563eb}.canvas-grid-loading-overlay{position:absolute;inset:0;background:#ffffffe6;backdrop-filter:blur(2px);z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-family:inherit;border-radius:6px}.grid-loading-title{font-weight:600;font-size:.95rem;color:#1e293b}.grid-loading-sub{font-size:.8rem;color:#64748b}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button,.canvas-active-input::-webkit-inner-spin-button,.canvas-active-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number],.canvas-active-input{-moz-appearance:textfield;appearance:textfield}\n"] }]
|
|
14475
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: " <div class=\"canvas-wrapper\" (click)=\"onCanvasBackgroundClick($event)\">\n <!-- Canvas Status / Quick Controls -->\n <div class=\"canvas-toolbar\">\n <div class=\"canvas-info\">\n <span class=\"info-label\">Grid Layout:</span>\n <span class=\"info-value\">{{ totalColumns() }} Columns</span>\n <span class=\"info-divider\">\u2022</span>\n <span class=\"info-label\">Components:</span>\n <span class=\"info-value\">{{ components().length }}</span>\n <span class=\"info-divider\">\u2022</span>\n <span class=\"live-mode-badge\" title=\"Interactive canvas: Values typed here run live queries and test dropdowns.\">\n \u26A1 Live Interactive Mode\n </span>\n </div>\n\n <div class=\"canvas-actions\">\n @if (!definition().grid) {\n <button\n type=\"button\"\n class=\"canvas-action-btn btn-grid-add\"\n (click)=\"addResultGrid($event)\"\n title=\"Add a Result Grid to this report\"\n >\n <rpt-icon name=\"table\" [size]=\"14\" />\n <span>+ Add Grid</span>\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"canvas-action-btn btn-grid-configured\"\n (click)=\"selectGridSettings($event)\"\n title=\"Configure Result Data Grid\"\n >\n <rpt-icon name=\"table\" [size]=\"14\" />\n <span>Grid ({{ definition().grid?.columns?.length ?? 0 }})</span>\n </button>\n }\n\n <button\n type=\"button\"\n class=\"canvas-action-btn\"\n (click)=\"selectReportSettings($event)\"\n title=\"Configure Page Layout & Grid Settings\"\n >\n <rpt-icon name=\"settings\" [size]=\"14\" />\n <span>Report Settings</span>\n </button>\n </div>\n </div>\n\n <!-- Canvas Drop Area -->\n <div class=\"canvas-scroll-area\" cdkScrollable>\n <div\n class=\"canvas-artboard\"\n [style.padding.px]=\"definition().layout.padding ?? 24\"\n >\n <!-- Report Header Preview -->\n <div class=\"canvas-report-header\">\n <h2 class=\"canvas-report-title\">{{ definition().name || 'Untitled Report' }}</h2>\n @if (definition().description) {\n <p class=\"canvas-report-desc\">{{ definition().description }}</p>\n }\n </div>\n\n <!-- Component Drop List Grid with 2D mixed orientation and data binding -->\n <div\n cdkDropList\n id=\"designer-canvas-drop-list\"\n class=\"canvas-grid\"\n cdkDropListOrientation=\"mixed\"\n [cdkDropListData]=\"sortedComponents()\"\n [style.grid-template-columns]=\"gridTemplateColumns()\"\n [style.gap.px]=\"definition().layout.gap ?? 16\"\n (cdkDropListDropped)=\"onDrop($event)\"\n >\n @for (comp of sortedComponents(); track comp.id; let idx = $index) {\n <div\n cdkDrag\n [cdkDragData]=\"comp\"\n [cdkDragDisabled]=\"isAnyResizing()\"\n class=\"canvas-component-card\"\n [class.is-selected]=\"isSelected(comp.id)\"\n [class.is-resizing]=\"resizingCompId() === comp.id\"\n [class.is-field-highlighted]=\"isFieldHighlighted(comp)\"\n [class.is-narrow]=\"getSpan(comp) <= 4\"\n [class.is-compact]=\"getSpan(comp) <= 2\"\n [style.grid-column]=\"getGridColumn(comp)\"\n [style.grid-row]=\"getGridRow(comp)\"\n [style.width]=\"comp.layout?.width || 'auto'\"\n [style.height]=\"getComponentHeight(comp)\"\n [style.min-height]=\"getComponentMinHeight(comp)\"\n (click)=\"onSelect(comp.id, $event)\"\n >\n <!-- Card Header with Drag Handle & Actions -->\n <div class=\"card-header\">\n <div class=\"card-title-group\" cdkDragHandle title=\"Drag to reorder\">\n <span class=\"drag-handle-dots\">\u22EE\u22EE</span>\n <rpt-icon [name]=\"getComponentIconName(comp.type)\" [size]=\"14\" />\n <span class=\"comp-title\" [title]=\"comp.label || comp.key || comp.type\">\n {{ comp.label || comp.key || comp.type }}\n </span>\n </div>\n\n <div class=\"card-actions\">\n <!-- Static span pill & new row / start col pill when not hovered / not selected -->\n @if (comp.layout?.column; as col) {\n <span class=\"new-row-pill-static\" title=\"Starts at Column {{ col }}\">Col {{ col }}</span>\n } @else if (comp.layout?.newRow) {\n <span class=\"new-row-pill-static\" title=\"Starts on separate row\">\u21B3 Row</span>\n }\n <span\n class=\"span-pill-static\"\n title=\"Column span: {{ getSpan(comp) }} of {{ totalColumns() }} columns\"\n >\n {{ getSpan(comp) }}/{{ totalColumns() }}\n </span>\n\n <!-- Quick Action Stepper & Buttons (revealed on hover or selection) -->\n <div class=\"card-quick-controls\">\n <button\n type=\"button\"\n class=\"card-action-btn\"\n [class.btn-active-toggle]=\"comp.layout?.newRow\"\n (click)=\"toggleNewRow(comp, $event)\"\n title=\"{{ comp.layout?.newRow ? 'Starts on new row (Click to place inline)' : 'Start on separate row (Row Break)' }}\"\n >\n <rpt-icon name=\"corner-down-right\" [size]=\"11\" />\n </button>\n\n <div class=\"span-control-group\" title=\"Adjust Column Span\">\n <button\n type=\"button\"\n class=\"span-btn\"\n [disabled]=\"getSpan(comp) <= 1\"\n (click)=\"adjustSpan(comp, -1, $event)\"\n title=\"Shrink Column Span\"\n >\n <rpt-icon name=\"minus\" [size]=\"9\" />\n </button>\n <span class=\"span-badge\" [title]=\"'Column span: ' + getSpan(comp) + ' of ' + totalColumns()\">\n <span class=\"span-num\">{{ getSpan(comp) }}</span><span class=\"span-total\">/{{ totalColumns() }}</span>\n </span>\n <button\n type=\"button\"\n class=\"span-btn\"\n [disabled]=\"getSpan(comp) >= totalColumns()\"\n (click)=\"adjustSpan(comp, 1, $event)\"\n title=\"Expand Column Span\"\n >\n <rpt-icon name=\"plus\" [size]=\"9\" />\n </button>\n </div>\n\n <button\n type=\"button\"\n class=\"card-action-btn\"\n (click)=\"onDuplicate(comp.id, $event)\"\n title=\"Duplicate component\"\n >\n <rpt-icon name=\"copy\" [size]=\"12\" />\n </button>\n <button\n type=\"button\"\n class=\"card-action-btn btn-delete\"\n (click)=\"onDelete(comp.id, $event)\"\n title=\"Remove component\"\n >\n <rpt-icon name=\"trash\" [size]=\"12\" />\n </button>\n </div>\n </div>\n </div>\n\n <!-- Card Body Visual Preview -->\n <div class=\"card-body\">\n\n @switch (comp.type) {\n @case ('input') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Input' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"text\"\n class=\"canvas-active-input\"\n [placeholder]=\"comp.properties?.['placeholder'] || 'Enter text...'\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-input-box\">{{ comp.properties?.['placeholder'] || 'Enter text...' }}</div>\n }\n </div>\n }\n @case ('dropdown') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-dropdown\n [config]=\"comp\"\n [showStatus]=\"true\"\n [parentForm]=\"canvasForm()\"\n [control]=\"getCanvasControl(comp)\"\n (dropdownClick)=\"onControlInteract(comp)\"\n />\n </div>\n }\n @case ('date') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-date [config]=\"comp\" [control]=\"getCanvasControl(comp) ?? undefined\" />\n </div>\n }\n @case ('date-range') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-date-range\n [config]=\"comp\"\n [control]=\"getCanvasControl(comp)\"\n />\n </div>\n }\n @case ('number') {\n <div class=\"mock-input-field\" (click)=\"onControlInteract(comp, $event)\">\n <span class=\"mock-label\">{{ comp.label || 'Number' }}</span>\n @if (getCanvasControl(comp); as ctrl) {\n <input\n type=\"number\"\n class=\"canvas-active-input\"\n [formControl]=\"ctrl\"\n (focus)=\"onControlInteract(comp, $event)\"\n />\n } @else {\n <div class=\"mock-input-box\">\n {{ comp.properties?.['prefix'] || '' }} 0.00 {{ comp.properties?.['suffix'] || '' }}\n </div>\n }\n </div>\n }\n @case ('checkbox') {\n <div class=\"mock-checkbox-field\" (click)=\"onControlInteract(comp, $event)\">\n @if (getCanvasControl(comp); as ctrl) {\n <label class=\"canvas-active-checkbox-lbl\">\n <input type=\"checkbox\" [formControl]=\"ctrl\" (focus)=\"onControlInteract(comp, $event)\" />\n <span class=\"mock-label\">{{ comp.label || 'Checkbox' }}</span>\n </label>\n } @else {\n <span class=\"mock-check-box\">\n <rpt-icon name=\"check\" [size]=\"10\" />\n </span>\n <span class=\"mock-label\">{{ comp.label || 'Checkbox' }}</span>\n }\n </div>\n }\n @case ('radio') {\n <div class=\"canvas-live-control-wrapper\" (click)=\"onControlInteract(comp, $event)\">\n <rpt-radio\n [config]=\"comp\"\n [control]=\"getCanvasControl(comp)\"\n [parentForm]=\"canvasForm()\"\n />\n </div>\n }\n @case ('button') {\n <div class=\"mock-btn-wrapper\">\n <button\n type=\"button\"\n class=\"mock-btn\"\n [class]=\"'btn-' + (comp.properties?.['variant'] || 'primary')\"\n [class.mock-btn-full]=\"comp.properties?.['fullWidth'] === true || comp.layout?.width === '100%'\"\n [style.height]=\"getCustomBtnHeight(comp)\"\n [style.width]=\"getCustomBtnWidth(comp)\"\n (click)=\"onCanvasButtonClick(comp, $event)\"\n >\n @if (getCustomBtnIcon(comp); as btnIcon) {\n <rpt-icon [name]=\"btnIcon\" [size]=\"15\" />\n }\n <span>{{ comp.label || 'Button' }}</span>\n </button>\n </div>\n }\n @case ('kpi-card') {\n <div class=\"mock-kpi-field\">\n <div class=\"mock-kpi-header\">\n <span class=\"mock-label\">{{ comp.label || 'KPI Metric' }}</span>\n <rpt-icon name=\"kpi\" [size]=\"14\" />\n </div>\n <div class=\"mock-kpi-value\">{{ comp.properties?.['value'] || '$128,450' }}</div>\n <div class=\"mock-kpi-footer\">\n <span class=\"mock-kpi-trend\">+12.5%</span>\n <span class=\"mock-kpi-sub\">vs last period</span>\n </div>\n </div>\n }\n @case ('chart') {\n <div class=\"mock-chart-field\">\n <div class=\"mock-chart-header\">\n <span class=\"mock-label\">{{ comp.label || 'Quarterly Sales Revenue ($000)' }}</span>\n </div>\n <div class=\"mock-chart-bars\">\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 44%\"></div>\n <span class=\"mock-bar-lbl\">Q1 Jan-Mar</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 61%\"></div>\n <span class=\"mock-bar-lbl\">Q2 Apr-Jun</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 79%\"></div>\n <span class=\"mock-bar-lbl\">Q3 Jul-Sep</span>\n </div>\n <div class=\"mock-chart-col\">\n <div class=\"mock-chart-bar\" style=\"height: 100%\"></div>\n <span class=\"mock-bar-lbl\">Q4 Oct-Dec</span>\n </div>\n </div>\n </div>\n }\n @default {\n <div class=\"mock-generic-box\">\n <span>{{ comp.type }}</span>\n </div>\n }\n }\n </div>\n\n <!-- Resizing Handles (East, South, South-East) -->\n <div\n class=\"resize-handle handle-e\"\n (pointerdown)=\"startResize($event, comp, 'e')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize column width \u2022 Double-click to reset\"\n ></div>\n <div\n class=\"resize-handle handle-s\"\n (pointerdown)=\"startResize($event, comp, 's')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize height \u2022 Double-click to reset\"\n ></div>\n <div\n class=\"resize-handle handle-se\"\n (pointerdown)=\"startResize($event, comp, 'se')\"\n (dblclick)=\"resetDimensions(comp, $event)\"\n title=\"Drag to resize width and height \u2022 Double-click to reset\"\n ></div>\n\n <!-- Resizing Dimension Ghost / Badge -->\n @if (resizingCompId() === comp.id) {\n <div class=\"resize-dimension-tooltip\">\n {{ resizingTooltip(comp) }}\n </div>\n }\n\n <!-- Drag placeholder with matched grid column span -->\n <div\n *cdkDragPlaceholder\n class=\"canvas-drag-placeholder\"\n [style.grid-column]=\"getGridColumn(comp)\"\n ></div>\n\n <!-- Drag preview -->\n <div *cdkDragPreview class=\"canvas-drag-preview\">\n <span class=\"drag-handle-dots\">\u22EE\u22EE</span>\n <rpt-icon [name]=\"getComponentIconName(comp.type)\" [size]=\"14\" />\n <span class=\"preview-title\">{{ comp.label || comp.key || comp.type }}</span>\n <span class=\"preview-span\">{{ getSpan(comp) }}/{{ totalColumns() }}</span>\n </div>\n </div>\n }\n\n @if (components().length === 0) {\n <div class=\"canvas-empty-state\" role=\"region\" aria-label=\"Empty canvas starter options\">\n <div class=\"empty-hero-badge\">\n <rpt-icon name=\"design\" [size]=\"28\" />\n </div>\n <h3 class=\"empty-hero-title\">Start Designing Your Custom Report</h3>\n <p class=\"empty-hero-desc\">\n Drag controls from the left component palette, or jumpstart your design with pre-configured enterprise blueprints.\n </p>\n\n <div class=\"empty-hero-actions\">\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-primary\"\n (click)=\"applyBlueprint('blueprint-audit-register')\"\n title=\"Load complete Audit Register blueprint with parameters and result grid\"\n >\n <rpt-icon name=\"table\" [size]=\"15\" />\n <span>Audit Register Blueprint</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-secondary\"\n (click)=\"applyBlueprint('blueprint-kpi-summary')\"\n title=\"Load Executive KPI summary blueprint\"\n >\n <rpt-icon name=\"chart-bar\" [size]=\"15\" />\n <span>KPI Summary Blueprint</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-outline\"\n (click)=\"addStarterComponent('date-range')\"\n title=\"Add a Date Range filter component\"\n >\n <rpt-icon name=\"calendar\" [size]=\"14\" />\n <span>+ Add Date Filter</span>\n </button>\n <button\n type=\"button\"\n class=\"empty-btn empty-btn-outline\"\n (click)=\"addStarterComponent('button')\"\n title=\"Add an Execute Action button\"\n >\n <rpt-icon name=\"play\" [size]=\"14\" />\n <span>+ Add Run Button</span>\n </button>\n </div>\n </div>\n }\n </div>\n\n <!-- Live Result Grid Preview with Bways-Grid Features -->\n @if (definition().grid) {\n <div class=\"canvas-grid-box\">\n <div class=\"grid-preview-header\">\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <rpt-icon name=\"table\" [size]=\"15\" />\n <span class=\"grid-title\">Bways Grid ({{ definition().grid?.columns?.length ?? 0 }} columns)</span>\n @if (isExecutingGrid()) {\n <span class=\"grid-exec-badge is-loading\">Loading data from database...</span>\n } @else if (gridExecError()) {\n <span class=\"grid-exec-badge is-error\">{{ gridExecError() }}</span>\n } @else if (canvasGridData().length > 0) {\n <span class=\"grid-exec-badge is-success\">{{ canvasGridData().length }} rows loaded</span>\n }\n </div>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <button\n type=\"button\"\n class=\"btn-canvas-run-grid\"\n (click)=\"executeCanvasReport($event)\"\n [disabled]=\"isExecutingGrid()\"\n title=\"Execute query and load data into Bways Grid\"\n >\n <rpt-icon name=\"play\" [size]=\"11\" />\n <span>{{ isExecutingGrid() ? 'Running...' : 'Run / Refresh Grid' }}</span>\n </button>\n <button\n type=\"button\"\n class=\"btn-canvas-edit-grid\"\n (click)=\"selectGridSettings($event)\"\n title=\"Configure columns and grid options\"\n >\n <rpt-icon name=\"settings\" [size]=\"11\" />\n <span>Configure</span>\n </button>\n <button\n type=\"button\"\n class=\"btn-remove-grid\"\n (click)=\"removeGrid($event)\"\n title=\"Remove Result Grid from this report\"\n >\n <rpt-icon name=\"trash\" [size]=\"13\" />\n </button>\n </div>\n </div>\n\n @if (getGridSummaryText(); as summary) {\n <div class=\"grid-layout-status-strip\">\n <div class=\"grid-status-info\">\n <rpt-icon name=\"table\" [size]=\"12\" />\n <span>{{ summary }}</span>\n </div>\n <div class=\"grid-status-sync\" [class.is-pulsing]=\"layoutJustUpdated()\">\n <rpt-icon name=\"check\" [size]=\"11\" />\n <span>Layout auto-persisted</span>\n </div>\n </div>\n }\n\n <!-- Live Bways Grid bridge -->\n <div class=\"canvas-live-grid-container\" (click)=\"$event.stopPropagation()\" style=\"position: relative; min-height: 250px;\">\n @if (isExecutingGrid()) {\n <div class=\"canvas-grid-loading-overlay\">\n <span class=\"status-dot dot-pulse\" style=\"width: 14px; height: 14px; color: #2563eb; background: #2563eb; border-radius: 50%;\"></span>\n <span class=\"grid-loading-title\">Executing stored procedure on SQL Server...</span>\n <span class=\"grid-loading-sub\">Calculating outstanding balances and ledger amounts. Please wait...</span>\n </div>\n }\n <rpt-grid-bridge\n [gridDefinition]=\"definition().grid!\"\n [data]=\"canvasGridData()\"\n (gridStateChange)=\"onCanvasGridStateChange($event)\"\n (columnDefsChange)=\"onCanvasColumnDefsChange($event)\"\n />\n </div>\n </div>\n } @else {\n <div class=\"canvas-add-grid-banner\" (click)=\"addResultGrid($event)\">\n <div class=\"add-grid-icon\">\n <rpt-icon name=\"table\" [size]=\"20\" />\n </div>\n <div class=\"add-grid-text\">\n <span class=\"add-grid-title\">+ Add Result Data Grid</span>\n <span class=\"add-grid-sub\">Attach an interactive data table or UltraGrid to display report execution output</span>\n </div>\n <button type=\"button\" class=\"btn-banner-add\">Add Grid</button>\n </div>\n }\n </div>\n </div>\n </div>", styles: [":host{display:block;flex:1;min-height:0;min-width:0;height:100%;background-color:#f1f5f9;font-family:var(--rpt-font-family, inherit);box-sizing:border-box}.canvas-wrapper{min-height:0;display:flex;flex-direction:column;height:100%}.canvas-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:42px;height:42px;padding:0 24px;background:var(--rpt-color-surface, #ffffff);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);box-sizing:border-box;gap:12px;overflow-x:auto;scrollbar-width:none;font-family:var(--rpt-font-family, inherit);flex-shrink:0}.canvas-toolbar::-webkit-scrollbar{display:none}.canvas-info{display:flex;align-items:center;gap:8px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);color:var(--rpt-color-text-muted, #64748b);white-space:nowrap;line-height:1}.info-label{color:var(--rpt-color-text-muted, #64748b);font-weight:500;font-size:var(--rpt-font-size-sm, .75rem)}.info-value{font-weight:600;color:var(--rpt-color-text, #0f172a);font-size:var(--rpt-font-size-sm, .75rem)}.info-divider{color:var(--rpt-color-border, #cbd5e1);margin:0 2px}.live-mode-badge{display:inline-flex;align-items:center;gap:4px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-xs, .7rem);font-weight:600;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;padding:2px 8px;border-radius:9999px;line-height:1}.canvas-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.canvas-action-btn{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);font-weight:500;letter-spacing:-.01em;color:var(--rpt-color-text-secondary, #334155);background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;line-height:1;white-space:nowrap;box-shadow:0 1px 2px #0000000a;transition:all var(--rpt-transition-speed, .15s) ease}.canvas-action-btn:hover{background:var(--rpt-color-surface-hover, #f8fafc);border-color:var(--rpt-color-border-hover, #94a3b8);color:var(--rpt-color-text, #0f172a);box-shadow:0 2px 4px #0000000f}.canvas-action-btn.btn-grid-configured{background:#eff6ff;border-color:#bfdbfe;color:#2563eb;font-weight:600}.canvas-action-btn.btn-grid-configured:hover{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd}.canvas-action-btn.btn-grid-add{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a;font-weight:600}.canvas-action-btn.btn-grid-add:hover{background:#dcfce7;color:#15803d;border-color:#86efac}.canvas-action-btn:active{transform:translateY(1px)}.canvas-scroll-area{flex:1;min-height:0;overflow-y:auto;padding:16px}.canvas-artboard{width:100%;max-width:1400px;margin:0 auto;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-lg, 8px);box-shadow:0 4px 6px -1px #0000000d;min-height:480px;box-sizing:border-box}@media (max-width: 900px){.canvas-toolbar{min-height:36px;height:36px;padding:0 10px;gap:6px}.live-mode-badge{display:none}.canvas-info{font-size:.75rem;gap:5px}.canvas-action-btn{padding:0 8px;font-size:.725rem;height:28px;gap:4px}.canvas-scroll-area{padding:10px}.canvas-artboard{min-height:360px}}@media (max-width: 600px){.canvas-toolbar{padding:0 8px;gap:4px}.canvas-info .info-label,.canvas-action-btn span{display:none}.canvas-action-btn{padding:0 6px;min-width:28px;justify-content:center}}.canvas-report-header{margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--rpt-color-border, #e2e8f0)}.canvas-report-title{font-size:var(--rpt-font-size-xl, 1.5rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 6px}.canvas-report-desc{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #64748b);margin:0}.canvas-grid{display:grid;width:100%;min-height:180px;align-items:start;border-radius:6px;transition:all var(--rpt-transition-speed, .15s) ease}.canvas-component-card{container-type:inline-size;background:#fff;border:1.5px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);box-shadow:var(--rpt-box-shadow, 0 1px 2px rgba(0, 0, 0, .05));box-sizing:border-box;transition:all var(--rpt-transition-speed, .15s) ease;cursor:pointer;position:relative;overflow:visible;display:flex;flex-direction:column;min-height:104px;z-index:1}.canvas-component-card:hover{border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 4px 6px -1px #2563eb1a;z-index:2}.canvas-component-card.is-selected{border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 0 0 2px #2563eb40;z-index:10}.canvas-component-card:focus-within,.canvas-component-card:has(.rpt-combobox-menu),.canvas-component-card:has(.is-open){z-index:100}.canvas-component-card.is-resizing{-webkit-user-select:none;user-select:none;border-color:var(--rpt-color-primary, #2563eb);box-shadow:0 0 0 2px #2563eb59;z-index:30;transition:none!important}.resize-handle{position:absolute;z-index:20;touch-action:none;opacity:0;pointer-events:none;transition:opacity .15s ease}.canvas-component-card.is-selected .resize-handle{opacity:1;pointer-events:auto}.resize-handle.handle-e{top:0;right:0;width:6px;height:100%;cursor:ew-resize;display:flex;align-items:center;justify-content:center}.resize-handle.handle-e:after{content:\"\";width:3px;height:24px;background:#cbd5e1;border-radius:2px;transition:background .15s ease}.resize-handle.handle-e:hover:after,.canvas-component-card.is-selected .resize-handle.handle-e:after{background:var(--rpt-color-primary, #2563eb)}.resize-handle.handle-s{bottom:0;left:0;height:6px;width:100%;cursor:ns-resize;display:flex;align-items:center;justify-content:center}.resize-handle.handle-s:after{content:\"\";height:3px;width:24px;background:#cbd5e1;border-radius:2px;transition:background .15s ease}.resize-handle.handle-s:hover:after,.canvas-component-card.is-selected .resize-handle.handle-s:after{background:var(--rpt-color-primary, #2563eb)}.resize-handle.handle-se{bottom:0;right:0;width:12px;height:12px;cursor:nwse-resize;display:flex;align-items:flex-end;justify-content:flex-end;padding:2px}.resize-handle.handle-se:after{content:\"\";width:5px;height:5px;border-right:2px solid #cbd5e1;border-bottom:2px solid #cbd5e1;transition:border-color .15s ease}.resize-handle.handle-se:hover:after,.canvas-component-card.is-selected .resize-handle.handle-se:after{border-color:var(--rpt-color-primary, #2563eb)}.resize-dimension-tooltip{position:absolute;top:38px;right:8px;background:#0f172ae6;color:#fff;font-size:.7rem;font-weight:600;padding:3px 8px;border-radius:4px;white-space:nowrap;pointer-events:none;z-index:50;box-shadow:0 2px 4px #0003}.card-header{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:5px 8px;background:var(--rpt-color-surface, #f8fafc);border-bottom:1px solid var(--rpt-color-border, #e2e8f0);border-top-left-radius:var(--rpt-border-radius, 6px);border-top-right-radius:var(--rpt-border-radius, 6px);min-height:32px;box-sizing:border-box;overflow:hidden;position:relative}.canvas-component-card.is-selected .card-header{overflow:visible}.card-title-group{display:flex;align-items:center;gap:5px;cursor:grab;min-width:0;flex:1;overflow:hidden}.drag-handle-dots{color:var(--rpt-color-text-muted, #94a3b8);font-size:.85rem;letter-spacing:-2px;flex-shrink:0;-webkit-user-select:none;user-select:none}.comp-title{font-size:.75rem;font-weight:600;color:var(--rpt-color-text, #0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.card-actions{display:flex;align-items:center;gap:4px;flex-shrink:0;margin-left:auto}.new-row-pill-static{font-size:.65rem;font-weight:600;color:#7c3aed;background:#f5f3ff;border:1px solid #ddd6fe;padding:1px 5px;border-radius:9999px;white-space:nowrap;line-height:1;flex-shrink:0}.span-pill-static{display:inline-flex;align-items:center;justify-content:center;font-size:.65rem;font-weight:600;color:var(--rpt-color-text-muted, #64748b);background:var(--rpt-color-surface, #f1f5f9);border:1px solid var(--rpt-color-border, #e2e8f0);padding:1px 6px;border-radius:9999px;line-height:1.2;white-space:nowrap;-webkit-user-select:none;user-select:none}.card-quick-controls{display:none;align-items:center;gap:3px;flex-shrink:0}.canvas-component-card:hover .span-pill-static,.canvas-component-card.is-selected .span-pill-static,.canvas-component-card:hover .new-row-pill-static,.canvas-component-card.is-selected .new-row-pill-static{display:none}.canvas-component-card:hover .card-quick-controls,.canvas-component-card.is-selected .card-quick-controls{display:inline-flex}.canvas-component-card.is-narrow .card-header{padding:4px 6px;gap:3px}.canvas-component-card.is-narrow:hover .comp-title,.canvas-component-card.is-narrow.is-selected .comp-title,.canvas-component-card.is-narrow:hover .drag-handle-dots,.canvas-component-card.is-narrow.is-selected .drag-handle-dots{display:none}.canvas-component-card.is-narrow .card-quick-controls{gap:2px}.canvas-component-card.is-narrow .span-control-group{height:18px}.canvas-component-card.is-narrow .span-btn{width:14px;height:16px}.canvas-component-card.is-narrow .span-badge{font-size:.6rem;padding:0 2px}.canvas-component-card.is-narrow .span-total{display:none}.canvas-component-card.is-narrow .card-action-btn{width:18px;height:18px}@container (max-width: 250px){.card-header{padding:4px 6px;gap:3px}.canvas-component-card:hover .comp-title,.canvas-component-card.is-selected .comp-title,.canvas-component-card:hover .drag-handle-dots,.canvas-component-card.is-selected .drag-handle-dots,.span-total{display:none}.card-quick-controls{gap:2px}.card-action-btn{width:18px;height:18px}.span-control-group{height:18px}.span-btn{width:14px;height:16px}.span-badge{font-size:.6rem;padding:0 2px}}@container (max-width: 160px){.canvas-component-card.is-selected .card-quick-controls{position:absolute;top:-30px;right:0;background:#fff;border:1.5px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:2px 4px;gap:3px;box-shadow:0 4px 12px #2563eb2e,0 2px 4px #00000014;z-index:120;white-space:nowrap}}@media (max-width: 900px){.canvas-component-card:hover .comp-title,.canvas-component-card.is-selected .comp-title,.canvas-component-card:hover .drag-handle-dots,.canvas-component-card.is-selected .drag-handle-dots,.canvas-component-card .span-total{display:none}.canvas-component-card.is-selected .card-header{overflow:visible}.canvas-component-card.is-selected .card-quick-controls{position:absolute;top:-30px;right:0;background:#fff;border:1.5px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:2px 4px;gap:3px;box-shadow:0 4px 12px #2563eb2e,0 2px 4px #00000014;z-index:120;white-space:nowrap}}.span-control-group{display:inline-flex;align-items:center;background:#fff;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;height:20px;padding:0 1px;white-space:nowrap;flex-shrink:0}.span-btn{width:16px;height:18px;display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0;color:var(--rpt-color-text-muted, #64748b);cursor:pointer;border-radius:2px;transition:all .12s ease}.span-btn:hover:not(:disabled){background:var(--rpt-color-surface-hover, #f1f5f9);color:var(--rpt-color-primary, #2563eb)}.span-btn:disabled{opacity:.3;cursor:not-allowed}.span-badge{font-size:.65rem;font-weight:600;color:var(--rpt-color-text, #0f172a);padding:0 3px;white-space:nowrap;-webkit-user-select:none;user-select:none;line-height:1}.span-total{font-size:.6rem;color:var(--rpt-color-text-muted, #64748b);font-weight:500}.card-action-btn{width:20px;height:20px;border:none;background:transparent;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;color:var(--rpt-color-text-muted, #64748b);transition:all .12s ease;flex-shrink:0}.card-action-btn:hover{background:#e2e8f0;color:var(--rpt-color-text, #0f172a)}.card-action-btn.btn-active-toggle{background:#7c3aed;color:#fff;border-color:#7c3aed}.card-action-btn.btn-active-toggle:hover{background:#6d28d9;color:#fff}.btn-delete:hover{background:#fee2e2;color:#ef4444}.card-body{padding:8px 10px 14px;flex:1;display:flex;flex-direction:column;min-height:0;min-width:0;max-width:100%;box-sizing:border-box;overflow:visible}.mock-input-field{display:flex;flex-direction:column;gap:4px;flex:1;height:100%;min-height:0}.mock-label{font-size:.7rem;font-weight:600;color:var(--rpt-color-text-muted, #475569);flex-shrink:0}.mock-input-box,.mock-select-box{border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:6px;padding:6px 12px;font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #94a3b8);background:#fff;flex:1;min-height:38px;height:100%;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box}.mock-checkbox-field{display:flex;align-items:center;gap:6px;flex:1;height:100%;min-height:0;padding-top:14px}.mock-check-box{width:18px;height:18px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:.65rem;color:var(--rpt-color-primary, #2563eb);flex-shrink:0}.mock-btn-wrapper{display:flex;flex:1;height:100%;min-height:38px;align-items:center;justify-content:flex-start;width:100%;min-width:0;box-sizing:border-box}.mock-btn{border-radius:var(--rpt-border-radius, 6px);padding:0 16px;height:36px;font-size:var(--rpt-font-size-base, .875rem);font-weight:500;border:1px solid transparent;cursor:pointer;width:auto;max-width:100%;display:inline-flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .15s ease}.mock-btn.mock-btn-full{width:100%}.canvas-component-card.is-narrow .mock-btn{padding:0 6px;font-size:.775rem;width:100%;height:34px}.mock-kpi-field{display:flex;flex-direction:column;justify-content:space-between;flex:1;height:100%;min-height:0}.mock-kpi-header{display:flex;align-items:center;justify-content:space-between}.mock-kpi-value{font-size:1.25rem;font-weight:700;color:var(--rpt-color-text, #0f172a);margin:2px 0}.mock-kpi-footer{display:flex;align-items:center;gap:6px;font-size:.65rem}.mock-kpi-trend{color:#16a34a;font-weight:600}.mock-kpi-sub{color:#64748b}.mock-chart-field{display:flex;flex-direction:column;flex:1;height:100%;min-height:140px}.mock-chart-bars{display:flex;align-items:flex-end;justify-content:space-around;gap:16px;flex:1;min-height:100px;padding-top:12px;box-sizing:border-box}.mock-chart-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;min-width:60px;max-width:140px}.mock-chart-bar{width:38px;max-width:44px;margin:0 auto;background:var(--rpt-color-primary, #2563eb);border-radius:6px 6px 0 0;opacity:.85;min-height:10px;transition:height .2s ease}.mock-bar-lbl{font-size:.6875rem;color:#64748b;margin-top:6px;text-align:center;white-space:normal;line-height:1.2}.btn-primary{background:var(--rpt-color-primary, #2563eb);color:#fff}.btn-secondary{background:#f1f5f9;color:#0f172a;border:1px solid #cbd5e1}.btn-outline{background:transparent;color:#2563eb;border:1px solid #2563eb}.btn-danger{background:#ef4444;color:#fff}.mock-generic-box{border:1px dashed #cbd5e1;border-radius:4px;padding:8px;font-size:.75rem;text-align:center;color:#64748b}.canvas-drag-placeholder{background:#2563eb0f;border:2px dashed var(--rpt-color-primary, #2563eb);border-radius:6px;min-height:80px;box-sizing:border-box;transition:transform .15s ease}.canvas-drag-preview,::ng-deep .canvas-drag-preview{background:#fff;border:2px solid var(--rpt-color-primary, #2563eb);border-radius:6px;padding:8px 14px;display:inline-flex;align-items:center;gap:8px;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif)!important;font-size:.8rem;font-weight:600;color:var(--rpt-color-text, #0f172a);box-shadow:0 12px 24px -4px #00000040;z-index:10000}.preview-title,::ng-deep .preview-title{font-family:inherit!important;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-span,::ng-deep .preview-span{font-family:inherit!important;font-size:.65rem;font-weight:600;color:var(--rpt-color-primary, #2563eb);background:#eff6ff;border:1px solid #bfdbfe;padding:1px 6px;border-radius:9999px}.canvas-empty-state{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:56px 28px;border:2px dashed var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius-xl, 12px);background:var(--rpt-color-surface, #ffffff);text-align:center;box-shadow:var(--rpt-box-shadow-xs, 0 1px 2px 0 rgba(0, 0, 0, .04));transition:border-color var(--rpt-transition-speed, .15s) ease}.canvas-empty-state:hover{border-color:var(--rpt-color-primary, #2563eb)}.empty-hero-badge{width:56px;height:56px;border-radius:var(--rpt-border-radius-xl, 12px);background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);display:flex;align-items:center;justify-content:center;margin-bottom:16px;box-shadow:0 2px 8px #2563eb1f}.empty-hero-title{font-size:var(--rpt-font-size-lg, 1.125rem);font-weight:700;color:var(--rpt-color-text, #0f172a);margin:0 0 8px;letter-spacing:-.01em}.empty-hero-desc{font-size:var(--rpt-font-size-base, .875rem);color:var(--rpt-color-text-muted, #64748b);max-width:520px;line-height:1.5;margin:0 0 24px}.empty-hero-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px}.empty-btn{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;font-size:var(--rpt-font-size-sm, .75rem);font-weight:600;border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all var(--rpt-transition-speed, .15s) ease;font-family:inherit}.empty-btn-primary{background:var(--rpt-color-primary, #2563eb);color:#fff;border:1px solid var(--rpt-color-primary, #2563eb);box-shadow:0 1px 3px #2563eb33}.empty-btn-primary:hover{background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8);transform:translateY(-1px)}.empty-btn-secondary{background:#f8fafc;color:#334155;border:1px solid var(--rpt-color-border, #cbd5e1)}.empty-btn-secondary:hover{background:#f1f5f9;color:#0f172a;border-color:#94a3b8;transform:translateY(-1px)}.empty-btn-outline{background:#fff;color:var(--rpt-color-primary, #2563eb);border:1px solid #bfdbfe}.empty-btn-outline:hover{background:#eff6ff;border-color:var(--rpt-color-primary, #2563eb);transform:translateY(-1px)}.canvas-active-input{width:100%;height:32px;padding:4px 8px;font-size:.8125rem;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:4px;outline:none;box-sizing:border-box;background:#fff;color:#0f172a;transition:border-color .15s ease}.canvas-active-input:focus{border-color:var(--rpt-color-primary, #2563eb)}.canvas-active-checkbox-lbl{display:inline-flex;align-items:center;gap:6px;cursor:pointer}.canvas-live-control-wrapper{width:100%;max-width:100%;min-width:0;position:relative;z-index:1;box-sizing:border-box}.canvas-grid-box{margin-top:24px;border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:8px;background:#fff;box-shadow:0 1px 3px #0000000d;overflow:hidden}.grid-preview-header{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:var(--rpt-color-surface, #f8fafc);border-bottom:1px solid var(--rpt-color-border, #cbd5e1);font-size:.8rem;font-weight:600;color:var(--rpt-color-text, #0f172a)}.grid-title{font-weight:700}.grid-exec-badge{font-size:.6875rem;font-weight:600;padding:2px 8px;border-radius:10px}.grid-exec-badge.is-loading{background:#eff6ff;color:#2563eb}.grid-exec-badge.is-error{background:#fee2e2;color:#ef4444}.grid-exec-badge.is-success{background:#ecfdf5;color:#059669}.btn-canvas-run-grid{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;font-size:.72rem;font-weight:600;color:#fff;background:var(--rpt-color-primary, #2563eb);border:none;border-radius:4px;cursor:pointer;transition:background .15s ease}.btn-canvas-run-grid:hover:not(:disabled){background:#1d4ed8}.btn-canvas-run-grid:disabled{opacity:.6;cursor:not-allowed}.btn-canvas-edit-grid{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:.72rem;font-weight:500;color:#334155;background:#fff;border:1px solid #cbd5e1;border-radius:4px;cursor:pointer;transition:all .12s ease}.btn-canvas-edit-grid:hover{background:#f1f5f9}.canvas-live-grid-container{width:100%;min-height:480px;background:#fff}.live-mode-badge{display:inline-flex;align-items:center;gap:4px;font-size:.6875rem;font-weight:700;color:#047857;background:#ecfdf5;border:1px solid #a7f3d0;padding:1px 8px;border-radius:9999px}.canvas-component-card.is-field-highlighted{border-color:#f59e0b!important;box-shadow:0 0 0 3px #f59e0b59!important;animation:rpt-pulse-border 1s ease-in-out infinite alternate}@keyframes rpt-pulse-border{0%{box-shadow:0 0 0 2px #f59e0b40}to{box-shadow:0 0 0 5px #f59e0b80}}.grid-layout-status-strip{display:flex;align-items:center;justify-content:space-between;padding:6px 16px;background:#f1f5f9;border-bottom:1px solid var(--rpt-color-border, #cbd5e1);font-size:.6875rem;color:#475569}.grid-status-info{display:inline-flex;align-items:center;gap:6px;font-weight:600}.grid-status-sync{display:inline-flex;align-items:center;gap:4px;color:#059669;font-weight:600;transition:transform .2s ease}.grid-status-sync.is-pulsing{transform:scale(1.08);color:#047857}.canvas-actions{display:flex;align-items:center;gap:8px}.btn-grid-add{background:#f0fdf4;border-color:#bbf7d0;color:#16a34a}.btn-grid-add:hover{background:#dcfce7;border-color:#86efac;color:#15803d}.btn-remove-grid{display:inline-flex;align-items:center;justify-content:center;padding:4px;border:none;background:transparent;color:#94a3b8;border-radius:4px;cursor:pointer;transition:all .15s ease}.btn-remove-grid:hover{background:#fee2e2;color:#ef4444}.canvas-add-grid-banner{margin-top:24px;border:2px dashed #cbd5e1;border-radius:8px;background:#fff;padding:16px 20px;display:flex;align-items:center;gap:16px;cursor:pointer;transition:all .15s ease}.canvas-add-grid-banner:hover{border-color:#2563eb;background:#f8fafc;box-shadow:0 2px 8px #2563eb14}.add-grid-icon{width:40px;height:40px;border-radius:8px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;flex-shrink:0}.add-grid-text{display:flex;flex-direction:column;gap:2px;flex:1}.add-grid-title{font-size:.875rem;font-weight:600;color:#0f172a}.add-grid-sub{font-size:.75rem;color:#64748b}.btn-banner-add{padding:6px 14px;font-size:.75rem;font-weight:600;color:#2563eb;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;cursor:pointer;white-space:nowrap;transition:all .15s ease}.canvas-add-grid-banner:hover .btn-banner-add{background:#2563eb;color:#fff;border-color:#2563eb}.canvas-grid-loading-overlay{position:absolute;inset:0;background:#ffffffe6;backdrop-filter:blur(2px);z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;font-family:inherit;border-radius:6px}.grid-loading-title{font-weight:600;font-size:.95rem;color:#1e293b}.grid-loading-sub{font-size:.8rem;color:#64748b}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button,.canvas-active-input::-webkit-inner-spin-button,.canvas-active-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number],.canvas-active-input{-moz-appearance:textfield;appearance:textfield}\n"] }]
|
|
14315
14476
|
}], ctorParameters: () => [], propDecorators: { onEscape: [{
|
|
14316
14477
|
type: HostListener,
|
|
14317
14478
|
args: ['document:keydown.escape']
|
|
@@ -14993,7 +15154,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
14993
15154
|
}] });
|
|
14994
15155
|
|
|
14995
15156
|
class ParameterBindingEditorComponent {
|
|
15157
|
+
formContext = inject(DesignerFormContextService, { optional: true });
|
|
14996
15158
|
sessionService = inject(ReportSessionContextService);
|
|
15159
|
+
reportingConfig = inject(REPORTING_CONFIG, { optional: true });
|
|
14997
15160
|
param = input.required();
|
|
14998
15161
|
currentValue = input('');
|
|
14999
15162
|
allComponents = input([]);
|
|
@@ -15002,7 +15165,11 @@ class ParameterBindingEditorComponent {
|
|
|
15002
15165
|
valueChange = output();
|
|
15003
15166
|
linkedFieldChange = output();
|
|
15004
15167
|
internalMode = signal(null);
|
|
15005
|
-
sessionMatch = computed(() => this.sessionService.matchParameter(this.param().name));
|
|
15168
|
+
sessionMatch = computed(() => this.reportingConfig?.autoParameter === false ? null : this.sessionService.matchParameter(this.param().name));
|
|
15169
|
+
unavailableSessionBinding = computed(() => {
|
|
15170
|
+
const token = parseParameterToken(String(this.currentValue() ?? ''));
|
|
15171
|
+
return token?.field.startsWith('session.') && getFieldCaseInsensitive(this.sessionService.getCurrentSessionContext?.() ?? {}, token.field.slice(8)) == null;
|
|
15172
|
+
});
|
|
15006
15173
|
friendlyLabel = computed(() => {
|
|
15007
15174
|
return this.param().friendlyLabel || humanizeIdentifier(this.param().name);
|
|
15008
15175
|
});
|
|
@@ -15072,6 +15239,36 @@ class ParameterBindingEditorComponent {
|
|
|
15072
15239
|
? ['from', 'to'].map(part => ({ ...c, key: (c.key || c.id) + '.' + part, label: (c.label || c.key || c.id) + (part === 'from' ? ' ? From' : ' ? To') }))
|
|
15073
15240
|
: [c]);
|
|
15074
15241
|
});
|
|
15242
|
+
selectedDropdownField = computed(() => this.compatibleControls().find(c => (c.key || c.id) === this.selectedControlKey() && c.type === 'dropdown'));
|
|
15243
|
+
dropdownExample = computed(() => {
|
|
15244
|
+
const field = this.selectedDropdownField();
|
|
15245
|
+
if (field?.dataSource?.entityName || field?.dataSource?.apiEndpoint || field?.dataSource?.masterName)
|
|
15246
|
+
return null;
|
|
15247
|
+
const options = field?.properties?.['options'];
|
|
15248
|
+
if (!Array.isArray(options))
|
|
15249
|
+
return null;
|
|
15250
|
+
const first = options.find(option => option && typeof option === 'object' && 'key' in option);
|
|
15251
|
+
return first ? { label: String(first.label ?? first.key), value: String(first.key) } : null;
|
|
15252
|
+
});
|
|
15253
|
+
selectedDropdownColumn = computed(() => parseParameterToken(String(this.currentValue() ?? ''))?.column ?? '');
|
|
15254
|
+
dropdownColumns = computed(() => {
|
|
15255
|
+
const field = this.selectedDropdownField();
|
|
15256
|
+
if (!field?.key)
|
|
15257
|
+
return [];
|
|
15258
|
+
const loaded = this.formContext?.dropdownColumns()[field.key] ?? [];
|
|
15259
|
+
return [...new Set([...loaded, field.dataSource?.valueField, field.dataSource?.displayField, 'value', 'label'].filter((value) => !!value))];
|
|
15260
|
+
});
|
|
15261
|
+
dropdownParameterPreview = computed(() => {
|
|
15262
|
+
if (!this.selectedDropdownField() || !this.formContext)
|
|
15263
|
+
return null;
|
|
15264
|
+
const value = resolveParameterValue(this.currentValue(), {}, this.formContext.values());
|
|
15265
|
+
return value === undefined || value === null || value === '' ? null : String(value);
|
|
15266
|
+
});
|
|
15267
|
+
onDropdownColumnSelected(column) {
|
|
15268
|
+
if (!this.selectedDropdownField() || (column && !this.dropdownColumns().includes(column)))
|
|
15269
|
+
return;
|
|
15270
|
+
this.valueChange.emit('{{' + this.selectedControlKey() + (column ? ' | column:' + column : '') + '}}');
|
|
15271
|
+
}
|
|
15075
15272
|
dateFormats = PARAMETER_DATE_FORMATS;
|
|
15076
15273
|
selectedDateField = computed(() => this.compatibleControls().find(c => (c.key || c.id) === this.selectedControlKey() && (c.type === 'date' || c.type === 'date-range')));
|
|
15077
15274
|
selectedDateFormat = computed(() => parseParameterToken(String(this.currentValue()))?.dateFormat ?? 'yyyy-MM-dd');
|
|
@@ -15320,6 +15517,9 @@ class ParameterBindingEditorComponent {
|
|
|
15320
15517
|
|
|
15321
15518
|
<!-- Mode-specific Input Controls -->
|
|
15322
15519
|
<div class="param-body">
|
|
15520
|
+
@if (unavailableSessionBinding()) {
|
|
15521
|
+
<div class="param-desc" role="status">This session value is unavailable and will not be sent. Configure a session source or choose Field / Fixed.</div>
|
|
15522
|
+
}
|
|
15323
15523
|
<!-- 0. AUTO SESSION DERIVED -->
|
|
15324
15524
|
@if (activeMode() === 'session' && sessionMatch()) {
|
|
15325
15525
|
<div class="session-box">
|
|
@@ -15362,6 +15562,29 @@ class ParameterBindingEditorComponent {
|
|
|
15362
15562
|
}
|
|
15363
15563
|
</select>
|
|
15364
15564
|
</div>
|
|
15565
|
+
@if (selectedDropdownField(); as field) {
|
|
15566
|
+
<label class="param-desc" [for]="'column-' + currentComponentId() + '-' + param().name">Dropdown parameter column</label>
|
|
15567
|
+
<select class="field-select dropdown-parameter-column" [id]="'column-' + currentComponentId() + '-' + param().name"
|
|
15568
|
+
[ngModel]="selectedDropdownColumn()" (ngModelChange)="onDropdownColumnSelected($event)">
|
|
15569
|
+
<option value="">Selected value ({{ field.dataSource?.valueField || 'key' }})</option>
|
|
15570
|
+
@for (column of dropdownColumns(); track column) { <option [value]="column">{{ column }}</option> }
|
|
15571
|
+
</select>
|
|
15572
|
+
@if (dropdownParameterPreview(); as preview) { <div class="param-desc" role="status">Current parameter value: {{ preview }}</div> }
|
|
15573
|
+
<div class="param-desc" role="note">
|
|
15574
|
+
Sends the selected option's <strong>{{ selectedDropdownColumn() || field.dataSource?.valueField || 'key' }}</strong> value.
|
|
15575
|
+
@if (field.dataSource?.displayField) {
|
|
15576
|
+
<span>{{ field.dataSource?.displayField }} is the display label.</span>
|
|
15577
|
+
}
|
|
15578
|
+
@if (field.dataSource?.valueField || field.dataSource?.entityName || field.dataSource?.apiEndpoint || field.dataSource?.masterName) {
|
|
15579
|
+
<span>Choose Value Field in the dropdown settings to change what is sent.</span>
|
|
15580
|
+
} @else {
|
|
15581
|
+
<span>Edit option keys in the dropdown settings to change what is sent.</span>
|
|
15582
|
+
}
|
|
15583
|
+
</div>
|
|
15584
|
+
@if (dropdownExample(); as example) {
|
|
15585
|
+
<div class="param-desc">Example: {{ example.label }} ? {{ example.value }}</div>
|
|
15586
|
+
}
|
|
15587
|
+
}
|
|
15365
15588
|
@if (selectedDateField()) {
|
|
15366
15589
|
<label class="param-desc" [for]="'date-format-' + currentComponentId() + '-' + param().name">Execution date format</label>
|
|
15367
15590
|
<select class="field-select" [id]="'date-format-' + currentComponentId() + '-' + param().name"
|
|
@@ -15577,6 +15800,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
15577
15800
|
|
|
15578
15801
|
<!-- Mode-specific Input Controls -->
|
|
15579
15802
|
<div class="param-body">
|
|
15803
|
+
@if (unavailableSessionBinding()) {
|
|
15804
|
+
<div class="param-desc" role="status">This session value is unavailable and will not be sent. Configure a session source or choose Field / Fixed.</div>
|
|
15805
|
+
}
|
|
15580
15806
|
<!-- 0. AUTO SESSION DERIVED -->
|
|
15581
15807
|
@if (activeMode() === 'session' && sessionMatch()) {
|
|
15582
15808
|
<div class="session-box">
|
|
@@ -15619,6 +15845,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
15619
15845
|
}
|
|
15620
15846
|
</select>
|
|
15621
15847
|
</div>
|
|
15848
|
+
@if (selectedDropdownField(); as field) {
|
|
15849
|
+
<label class="param-desc" [for]="'column-' + currentComponentId() + '-' + param().name">Dropdown parameter column</label>
|
|
15850
|
+
<select class="field-select dropdown-parameter-column" [id]="'column-' + currentComponentId() + '-' + param().name"
|
|
15851
|
+
[ngModel]="selectedDropdownColumn()" (ngModelChange)="onDropdownColumnSelected($event)">
|
|
15852
|
+
<option value="">Selected value ({{ field.dataSource?.valueField || 'key' }})</option>
|
|
15853
|
+
@for (column of dropdownColumns(); track column) { <option [value]="column">{{ column }}</option> }
|
|
15854
|
+
</select>
|
|
15855
|
+
@if (dropdownParameterPreview(); as preview) { <div class="param-desc" role="status">Current parameter value: {{ preview }}</div> }
|
|
15856
|
+
<div class="param-desc" role="note">
|
|
15857
|
+
Sends the selected option's <strong>{{ selectedDropdownColumn() || field.dataSource?.valueField || 'key' }}</strong> value.
|
|
15858
|
+
@if (field.dataSource?.displayField) {
|
|
15859
|
+
<span>{{ field.dataSource?.displayField }} is the display label.</span>
|
|
15860
|
+
}
|
|
15861
|
+
@if (field.dataSource?.valueField || field.dataSource?.entityName || field.dataSource?.apiEndpoint || field.dataSource?.masterName) {
|
|
15862
|
+
<span>Choose Value Field in the dropdown settings to change what is sent.</span>
|
|
15863
|
+
} @else {
|
|
15864
|
+
<span>Edit option keys in the dropdown settings to change what is sent.</span>
|
|
15865
|
+
}
|
|
15866
|
+
</div>
|
|
15867
|
+
@if (dropdownExample(); as example) {
|
|
15868
|
+
<div class="param-desc">Example: {{ example.label }} ? {{ example.value }}</div>
|
|
15869
|
+
}
|
|
15870
|
+
}
|
|
15622
15871
|
@if (selectedDateField()) {
|
|
15623
15872
|
<label class="param-desc" [for]="'date-format-' + currentComponentId() + '-' + param().name">Execution date format</label>
|
|
15624
15873
|
<select class="field-select" [id]="'date-format-' + currentComponentId() + '-' + param().name"
|
|
@@ -15864,13 +16113,10 @@ class PropertyEditorGridComponent {
|
|
|
15864
16113
|
if (parsed.procedureName && parsed.procedureName.toLowerCase() !== this.activeEntityName().toLowerCase()) {
|
|
15865
16114
|
this.onSelectEntity(parsed.procedureName);
|
|
15866
16115
|
}
|
|
15867
|
-
|
|
16116
|
+
let currentMappings = { ...(this.dataSource()?.parameterMappings || {}) };
|
|
15868
16117
|
let count = 0;
|
|
15869
16118
|
for (const [key, val] of Object.entries(parsed.parameters)) {
|
|
15870
|
-
|
|
15871
|
-
currentMappings[key] = val;
|
|
15872
|
-
currentMappings[cleanKey] = val;
|
|
15873
|
-
currentMappings[`@${cleanKey}`] = val;
|
|
16119
|
+
currentMappings = setParameterMapping(currentMappings, key, val);
|
|
15874
16120
|
count++;
|
|
15875
16121
|
}
|
|
15876
16122
|
this.updateDataSourceParameters.emit(currentMappings);
|
|
@@ -16001,19 +16247,14 @@ class PropertyEditorGridComponent {
|
|
|
16001
16247
|
}
|
|
16002
16248
|
getParameterValue(paramName) {
|
|
16003
16249
|
const mappings = this.dataSource()?.parameterMappings || {};
|
|
16004
|
-
const
|
|
16005
|
-
const val = mappings[paramName] ?? mappings[`@${cleanName}`] ?? mappings[cleanName];
|
|
16250
|
+
const val = getFieldCaseInsensitive(mappings, paramName);
|
|
16006
16251
|
if (typeof val === 'string' || typeof val === 'number' || typeof val === 'boolean') {
|
|
16007
16252
|
return val;
|
|
16008
16253
|
}
|
|
16009
16254
|
return '';
|
|
16010
16255
|
}
|
|
16011
16256
|
onParameterChange(paramName, value) {
|
|
16012
|
-
const current =
|
|
16013
|
-
const cleanName = paramName.replace(/^@/, '');
|
|
16014
|
-
current[paramName] = value;
|
|
16015
|
-
current[`@${cleanName}`] = value;
|
|
16016
|
-
current[cleanName] = value;
|
|
16257
|
+
const current = setParameterMapping(this.dataSource()?.parameterMappings, paramName, value);
|
|
16017
16258
|
this.updateDataSourceParameters.emit(current);
|
|
16018
16259
|
}
|
|
16019
16260
|
onUpdateCol(index, field, value) {
|
|
@@ -16276,6 +16517,7 @@ class PropertyEditorDatasourceComponent {
|
|
|
16276
16517
|
entitiesSub;
|
|
16277
16518
|
discoveryAdapter = inject(ReportSchemaDiscoveryAdapter, { optional: true });
|
|
16278
16519
|
sessionService = inject(ReportSessionContextService, { optional: true });
|
|
16520
|
+
reportingConfig = inject(REPORTING_CONFIG, { optional: true });
|
|
16279
16521
|
designerState = inject(DesignerStateService, { optional: true });
|
|
16280
16522
|
dataDiscovery = inject(ReportDataDiscoveryService, { optional: true });
|
|
16281
16523
|
endpoints = inject(BWAYS_REPORT_ENDPOINTS, { optional: true });
|
|
@@ -16522,7 +16764,8 @@ class PropertyEditorDatasourceComponent {
|
|
|
16522
16764
|
continue;
|
|
16523
16765
|
}
|
|
16524
16766
|
// 1. Session match (e.g. companyId, branchId, userId)
|
|
16525
|
-
const sessionMatch = this.
|
|
16767
|
+
const sessionMatch = this.reportingConfig?.autoParameter === false ? null :
|
|
16768
|
+
this.sessionService?.matchParameter(clean) ?? this.sessionService?.matchParameter(param.name);
|
|
16526
16769
|
if (sessionMatch) {
|
|
16527
16770
|
currentMappings[param.name] = `{{session.${sessionMatch.sessionKey}}}`;
|
|
16528
16771
|
currentMappings[clean] = `{{session.${sessionMatch.sessionKey}}}`;
|
|
@@ -16589,7 +16832,8 @@ class PropertyEditorDatasourceComponent {
|
|
|
16589
16832
|
continue;
|
|
16590
16833
|
}
|
|
16591
16834
|
// 1. Session match (e.g. companyId, branchId, userId)
|
|
16592
|
-
const sessionMatch = this.
|
|
16835
|
+
const sessionMatch = this.reportingConfig?.autoParameter === false ? null :
|
|
16836
|
+
this.sessionService?.matchParameter(clean) ?? this.sessionService?.matchParameter(param.name);
|
|
16593
16837
|
if (sessionMatch) {
|
|
16594
16838
|
currentMappings[param.name] = `{{session.${sessionMatch.sessionKey}}}`;
|
|
16595
16839
|
currentMappings[clean] = `{{session.${sessionMatch.sessionKey}}}`;
|
|
@@ -16828,10 +17072,7 @@ class PropertyEditorDatasourceComponent {
|
|
|
16828
17072
|
'');
|
|
16829
17073
|
}
|
|
16830
17074
|
setParamValue(paramName, value) {
|
|
16831
|
-
const
|
|
16832
|
-
const existing = { ...(this.comp().dataSource?.parameterMappings ?? {}) };
|
|
16833
|
-
existing[paramName] = value;
|
|
16834
|
-
existing[clean] = value;
|
|
17075
|
+
const existing = setParameterMapping(this.comp().dataSource?.parameterMappings, paramName, value);
|
|
16835
17076
|
this.updateDataSource.emit({
|
|
16836
17077
|
...(this.comp().dataSource ?? { displayField: '', valueField: '' }),
|
|
16837
17078
|
parameterMappings: existing,
|
|
@@ -16886,6 +17127,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
16886
17127
|
* Exporting to Excel/PDF, Crystal Report Printing, and Navigation.
|
|
16887
17128
|
*/
|
|
16888
17129
|
class PropertyEditorActionComponent {
|
|
17130
|
+
formContext = inject(DesignerFormContextService, { optional: true });
|
|
16889
17131
|
designerState = inject(DesignerStateService, { optional: true });
|
|
16890
17132
|
discoveryAdapter = inject(ReportSchemaDiscoveryAdapter, { optional: true });
|
|
16891
17133
|
lookupAdapter = inject(ReportLookupAdapter, { optional: true });
|
|
@@ -17002,7 +17244,7 @@ class PropertyEditorActionComponent {
|
|
|
17002
17244
|
};
|
|
17003
17245
|
if (entityName && this.dataDiscovery) {
|
|
17004
17246
|
this.dataDiscovery
|
|
17005
|
-
.autoDetectColumns(entityName, entityType, mappings || {}, targetDs?.schema || 'dbo')
|
|
17247
|
+
.autoDetectColumns(entityName, entityType, mappings || {}, targetDs?.schema || 'dbo', undefined, this.formContext?.values() ?? {})
|
|
17006
17248
|
.subscribe({
|
|
17007
17249
|
next: (cols) => {
|
|
17008
17250
|
if (cols && cols.length > 0) {
|
|
@@ -17476,6 +17718,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
17476
17718
|
* and Rule 32 (Avoid God Components).
|
|
17477
17719
|
*/
|
|
17478
17720
|
class PropertyEditorComponent {
|
|
17721
|
+
formContext = inject(DesignerFormContextService, { optional: true });
|
|
17479
17722
|
designerState = inject(DesignerStateService);
|
|
17480
17723
|
registry = inject(ComponentRegistry);
|
|
17481
17724
|
discoveryAdapter = inject(ReportSchemaDiscoveryAdapter, { optional: true });
|
|
@@ -17735,7 +17978,7 @@ class PropertyEditorComponent {
|
|
|
17735
17978
|
message: `Detecting columns for ${targetEntity}...`,
|
|
17736
17979
|
kind: 'info',
|
|
17737
17980
|
});
|
|
17738
|
-
this.dataDiscovery.autoDetectColumns(targetEntity, targetType, targetMappings, schema).subscribe({
|
|
17981
|
+
this.dataDiscovery.autoDetectColumns(targetEntity, targetType, targetMappings, schema, undefined, this.formContext?.values() ?? {}).subscribe({
|
|
17739
17982
|
next: (mappedCols) => {
|
|
17740
17983
|
if (mappedCols && mappedCols.length > 0) {
|
|
17741
17984
|
const currentOptions = currentGrid?.options ? { ...currentGrid.options } : {
|
|
@@ -17763,8 +18006,10 @@ class PropertyEditorComponent {
|
|
|
17763
18006
|
this.isDetectingColumns.set(false);
|
|
17764
18007
|
const entityTypeLabel = targetType === 'table' ? 'Table/View' : 'Stored procedure';
|
|
17765
18008
|
this.gridDetectionStatus.set({
|
|
17766
|
-
message:
|
|
17767
|
-
|
|
18009
|
+
message: currentGrid?.columns?.length
|
|
18010
|
+
? `No sample rows returned for ${targetEntity} with the current filters. Existing columns have been kept.`
|
|
18011
|
+
: `No columns detected for ${targetEntity}. ${entityTypeLabel} returned no sample rows for the current filters. Try different filters or add columns manually.`,
|
|
18012
|
+
kind: currentGrid?.columns?.length ? 'info' : 'error',
|
|
17768
18013
|
});
|
|
17769
18014
|
}
|
|
17770
18015
|
},
|
|
@@ -18189,7 +18434,7 @@ class DesignerComponent {
|
|
|
18189
18434
|
setTimeout(() => this.saveMessage.set(null), 3000);
|
|
18190
18435
|
}
|
|
18191
18436
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18192
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DesignerComponent, isStandalone: true, selector: "rpt-designer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: false, isRequired: false, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "initialReport", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reportSaved: "save", definitionChanged: "definitionChange" }, host: { listeners: { "window:resize": "onResize()", "window:keydown": "onKeyDown($event)" } }, providers: [DesignerStateService, ...DESIGNER_ENDPOINT_PROVIDERS], ngImport: i0, template: `
|
|
18437
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DesignerComponent, isStandalone: true, selector: "rpt-designer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, apiUrl: { classPropertyName: "apiUrl", publicName: "apiUrl", isSignal: false, isRequired: false, transformFunction: null }, reportId: { classPropertyName: "reportId", publicName: "reportId", isSignal: true, isRequired: false, transformFunction: null }, definition: { classPropertyName: "definition", publicName: "initialReport", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reportSaved: "save", definitionChanged: "definitionChange" }, host: { listeners: { "window:resize": "onResize()", "window:keydown": "onKeyDown($event)" } }, providers: [DesignerFormContextService, DesignerStateService, ...DESIGNER_ENDPOINT_PROVIDERS], ngImport: i0, template: `
|
|
18193
18438
|
<div class="designer-shell">
|
|
18194
18439
|
@if (loadError()) { <div role="alert">{{ loadError() }} <button type="button" (click)="retryLoad()">Retry</button></div> }
|
|
18195
18440
|
<!-- Top Actions Toolbar with Sidebar Controls -->
|
|
@@ -18390,7 +18635,7 @@ class DesignerComponent {
|
|
|
18390
18635
|
</div>
|
|
18391
18636
|
}
|
|
18392
18637
|
</div>
|
|
18393
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;flex:1 1 0%;min-width:0;width:100%;height:100%;min-height:0;font-family:var(--rpt-font-family, inherit);box-sizing:border-box}.designer-shell{flex:1;min-height:0;display:flex;flex-direction:column;height:100%;background-color:#f8fafc;position:relative;overflow:hidden}.designer-workbench{display:flex;flex:1;overflow:hidden;position:relative;min-height:0}.workbench-left-container{display:flex;position:relative;width:268px;flex-shrink:0;height:100%;transition:width var(--rpt-transition-speed-smooth, .25s) cubic-bezier(.16,1,.3,1);z-index:20}.workbench-left-container.is-collapsed{width:0!important}.workbench-left-panel{width:100%;height:100%;overflow:hidden;border-right:1px solid var(--rpt-color-border, #cbd5e1);background:#fff;box-sizing:border-box}.workbench-left-container.is-collapsed .workbench-left-panel{visibility:hidden;border-right:none}.workbench-center-panel{flex:1;min-height:0;height:100%;overflow:hidden;display:flex;flex-direction:column;min-width:0;position:relative}.workbench-right-container{display:flex;position:relative;width:420px;flex-shrink:0;height:100%;transition:width var(--rpt-transition-speed-smooth, .25s) cubic-bezier(.16,1,.3,1);z-index:20}.workbench-right-container.is-collapsed{width:0!important}.workbench-right-panel{width:100%;height:100%;overflow:hidden;border-left:1px solid var(--rpt-color-border, #cbd5e1);background:#fff;box-sizing:border-box}.workbench-right-container.is-collapsed .workbench-right-panel{visibility:hidden;border-left:none}.compact-workbench-bar,.workbench-drawer-backdrop{display:none}@media (max-width: 900px){.compact-workbench-bar{display:flex;align-items:center;justify-content:space-around;height:48px;background:var(--rpt-color-surface, #ffffff);border-top:1px solid var(--rpt-color-border, #cbd5e1);padding:0 12px;gap:8px;z-index:45;flex-shrink:0;box-shadow:0 -2px 8px #0000000a;font-family:var(--rpt-font-family, inherit)}.compact-nav-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;border-radius:var(--rpt-border-radius, 6px);border:1px solid transparent;background:transparent;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);font-weight:var(--rpt-font-weight-medium, 500);letter-spacing:-.01em;line-height:1.4;color:var(--rpt-color-text-secondary, #334155);cursor:pointer;-webkit-user-select:none;user-select:none;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap}.compact-nav-btn rpt-icon{display:inline-flex;align-items:center;justify-content:center;color:var(--rpt-color-text-muted, #64748b);transition:color var(--rpt-transition-speed, .15s) ease}.compact-nav-btn:hover{background:var(--rpt-color-surface-hover, #f1f5f9);color:var(--rpt-color-text, #0f172a);border-color:var(--rpt-color-border-subtle, #e2e8f0)}.compact-nav-btn:hover rpt-icon{color:var(--rpt-color-text, #0f172a)}.compact-nav-btn.active{background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border-color:#2563eb40;font-weight:var(--rpt-font-weight-semibold, 600);box-shadow:0 1px 2px #2563eb14}.compact-nav-btn.active rpt-icon{color:var(--rpt-color-primary, #2563eb)}.compact-nav-btn:focus-visible{outline:2px solid var(--rpt-color-primary, #2563eb);outline-offset:1px}.workbench-drawer-backdrop{display:block;position:absolute;inset:0;background:#0f172a59;backdrop-filter:blur(1px);z-index:50}.workbench-left-container{position:absolute;left:0;top:0;bottom:0;width:280px;max-width:85vw;z-index:60;box-shadow:4px 0 24px #00000026;transform:translate(0);transition:transform .25s cubic-bezier(.16,1,.3,1)}.workbench-left-container.is-collapsed{transform:translate(-100%);width:280px!important}.workbench-right-container{position:absolute;right:0;top:0;bottom:0;width:380px;max-width:95vw;z-index:60;box-shadow:-4px 0 24px #00000026;transform:translate(0);transition:transform .25s cubic-bezier(.16,1,.3,1)}.workbench-right-container.is-collapsed{transform:translate(100%);width:380px!important}}.preview-mode-container{flex:1;min-height:0;overflow-y:auto;padding:16px;background-color:#f1f5f9;box-sizing:border-box}.preview-banner{max-width:1400px;margin:0 auto 16px;background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe;padding:10px 18px;border-radius:var(--rpt-border-radius-lg, 8px);font-size:var(--rpt-font-size-sm, .8rem);font-weight:600;display:flex;align-items:center;gap:8px;box-shadow:var(--rpt-box-shadow-xs, 0 1px 2px rgba(0, 0, 0, .04));box-sizing:border-box}.preview-content{max-width:1400px;margin:0 auto;background:#fff;border-radius:var(--rpt-border-radius-lg, 8px);border:1px solid var(--rpt-color-border, #cbd5e1);box-shadow:0 4px 6px -1px #0000000d;padding:0;min-height:480px;box-sizing:border-box}.json-mode-container{flex:1;min-height:0;padding:20px 24px;background-color:var(--rpt-color-bg, #f8fafc);display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden}.json-editor-card{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border-subtle, #e2e8f0);border-radius:var(--rpt-border-radius-lg, 8px);box-shadow:0 1px 3px #0000000d,0 1px 2px -1px #00000008;overflow:hidden;transition:background-color .2s ease,border-color .2s ease}.json-editor-card.theme-dark{background:#0f172a;border-color:#1e293b;box-shadow:0 4px 12px #00000040}.json-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;background:var(--rpt-color-surface, #ffffff);border-bottom:1px solid var(--rpt-color-border-subtle, #e2e8f0);flex-shrink:0;transition:background-color .2s ease,border-color .2s ease}.theme-dark .json-banner{background:#0b1120;border-bottom-color:#1e293b}.json-banner-left{display:flex;align-items:center;gap:12px;min-width:0}.json-badge-icon{width:32px;height:32px;border-radius:var(--rpt-border-radius, 6px);background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border:1px solid rgba(37,99,235,.18);display:flex;align-items:center;justify-content:center;flex-shrink:0}.theme-dark .json-badge-icon{background:#2563eb33;color:#60a5fa;border-color:#60a5fa4d}.json-title-group{display:flex;flex-direction:column;gap:2px;min-width:0}.json-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.json-title{font-size:.875rem;font-weight:600;letter-spacing:-.01em;color:var(--rpt-color-text, #0f172a)}.theme-dark .json-title{color:#f1f5f9}.json-schema-tag{font-size:.6875rem;font-weight:600;letter-spacing:.02em;padding:1px 7px;border-radius:9999px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;text-transform:uppercase}.theme-dark .json-schema-tag{background:#1e293b;color:#94a3b8;border-color:#334155}.json-meta-row{display:flex;align-items:center;gap:6px;font-size:.75rem;color:var(--rpt-color-text-muted, #64748b)}.theme-dark .json-meta-row{color:#64748b}.json-stat-pill strong{color:var(--rpt-color-text, #0f172a);font-weight:600}.theme-dark .json-stat-pill strong,.json-stat-divider{color:#cbd5e1}.theme-dark .json-stat-divider{color:#334155}.json-banner-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.btn-json-action{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;font-size:.75rem;font-weight:500;color:var(--rpt-color-text-secondary, #334155);background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all .15s ease}.btn-json-action:hover{background:var(--rpt-color-surface-hover, #f1f5f9);border-color:var(--rpt-color-border-hover, #94a3b8);color:var(--rpt-color-text, #0f172a)}.btn-json-action.active{background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);font-weight:600}.theme-dark .btn-json-action{background:#1e293b;border-color:#334155;color:#cbd5e1}.theme-dark .btn-json-action:hover{background:#334155;border-color:#475569;color:#fff}.theme-dark .btn-json-action.active{background:#2563eb40;color:#60a5fa;border-color:#3b82f6}.btn-copy-json{display:inline-flex;align-items:center;gap:6px;padding:5px 13px;font-size:.75rem;font-weight:600;color:#fff;background:var(--rpt-color-primary, #2563eb);border:1px solid var(--rpt-color-primary, #2563eb);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;box-shadow:0 1px 2px #2563eb33;transition:all .15s ease}.btn-copy-json:hover{background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8)}.btn-copy-json.copied{background:#10b981;border-color:#10b981;box-shadow:0 1px 2px #10b98133}.json-viewport{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:#fff;transition:background-color .2s ease}.theme-dark .json-viewport{background:#0f172a}.json-scroll-container{flex:1;min-height:0;overflow:auto}.json-code-table{width:100%;border-collapse:collapse;font-family:var(--rpt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.8125rem;line-height:1.6}.json-code-row{transition:background-color .1s ease}.json-code-row:hover{background:#f8fafc}.theme-dark .json-code-row:hover{background:#1e293b99}.json-line-number{width:44px;min-width:44px;max-width:56px;padding:1px 12px 1px 8px;text-align:right;color:#94a3b8;background:#f8fafc;border-right:1px solid #e2e8f0;-webkit-user-select:none;user-select:none;font-variant-numeric:tabular-nums;vertical-align:top;font-size:.75rem}.theme-dark .json-line-number{background:#0b1120;color:#475569;border-right-color:#1e293b}.json-line-text{padding:1px 16px;white-space:pre;vertical-align:top;color:#1e293b}.wrap-enabled .json-line-text{white-space:pre-wrap;word-break:break-all}.theme-dark .json-line-text{color:#e2e8f0}.json-token-key{color:#1e40af;font-weight:600}.json-token-string{color:#047857}.json-token-number{color:#7c3aed;font-weight:500}.json-token-boolean{color:#d97706;font-weight:600}.json-token-null{color:#dc2626;font-weight:600}.theme-dark .json-token-key{color:#60a5fa;font-weight:600}.theme-dark .json-token-string{color:#4ade80}.theme-dark .json-token-number{color:#c084fc;font-weight:500}.theme-dark .json-token-boolean{color:#fbbf24;font-weight:600}.theme-dark .json-token-null{color:#f87171;font-weight:600}.save-toast{position:absolute;bottom:24px;right:24px;background:#10b981;color:#fff;padding:10px 20px;border-radius:6px;font-size:.85rem;font-weight:600;box-shadow:0 10px 15px -3px #0000001a;z-index:100;animation:rpt-fade-in .2s ease}@keyframes rpt-fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$2.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: DesignerToolbarComponent, selector: "rpt-designer-toolbar", inputs: ["isLeftPanelCollapsed", "isRightPanelCollapsed"], outputs: ["toggleLeftPanel", "toggleRightPanel", "saveRequested"] }, { kind: "component", type: ComponentPaletteComponent, selector: "rpt-component-palette", outputs: ["collapseRequested"] }, { kind: "component", type: DesignCanvasComponent, selector: "rpt-design-canvas" }, { kind: "component", type: PropertyEditorComponent, selector: "rpt-property-editor", outputs: ["collapseRequested"] }, { kind: "component", type: ReportRuntimeComponent, selector: "rpt-report-runtime, rpt-runtime", inputs: ["reportId", "report", "resultData"], outputs: ["resetRequested", "execute", "executed", "exportRequested", "printRequested", "customActionTriggered", "gridStateChange", "columnDefsChange", "selectionChange", "selectionChanged", "rowActionTriggered", "drilldownRequested"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18638
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;flex:1 1 0%;min-width:0;width:100%;height:100%;min-height:0;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif);box-sizing:border-box}.designer-shell{flex:1;min-height:0;display:flex;flex-direction:column;height:100%;background-color:#f8fafc;position:relative;overflow:hidden}.designer-workbench{display:flex;flex:1;overflow:hidden;position:relative;min-height:0}.workbench-left-container{display:flex;position:relative;width:268px;flex-shrink:0;height:100%;transition:width var(--rpt-transition-speed-smooth, .25s) cubic-bezier(.16,1,.3,1);z-index:20}.workbench-left-container.is-collapsed{width:0!important}.workbench-left-panel{width:100%;height:100%;overflow:hidden;border-right:1px solid var(--rpt-color-border, #cbd5e1);background:#fff;box-sizing:border-box}.workbench-left-container.is-collapsed .workbench-left-panel{visibility:hidden;border-right:none}.workbench-center-panel{flex:1;min-height:0;height:100%;overflow:hidden;display:flex;flex-direction:column;min-width:0;position:relative}.workbench-right-container{display:flex;position:relative;width:420px;flex-shrink:0;height:100%;transition:width var(--rpt-transition-speed-smooth, .25s) cubic-bezier(.16,1,.3,1);z-index:20}.workbench-right-container.is-collapsed{width:0!important}.workbench-right-panel{width:100%;height:100%;overflow:hidden;border-left:1px solid var(--rpt-color-border, #cbd5e1);background:#fff;box-sizing:border-box}.workbench-right-container.is-collapsed .workbench-right-panel{visibility:hidden;border-left:none}.compact-workbench-bar,.workbench-drawer-backdrop{display:none}@media (max-width: 900px){.compact-workbench-bar{display:flex;align-items:center;justify-content:space-around;height:48px;background:var(--rpt-color-surface, #ffffff);border-top:1px solid var(--rpt-color-border, #cbd5e1);padding:0 12px;gap:8px;z-index:45;flex-shrink:0;box-shadow:0 -2px 8px #0000000a;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif)}.compact-nav-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;border-radius:var(--rpt-border-radius, 6px);border:1px solid transparent;background:transparent;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif);font-size:var(--rpt-font-size-sm, .75rem);font-weight:var(--rpt-font-weight-medium, 500);letter-spacing:-.01em;line-height:1.4;color:var(--rpt-color-text-secondary, #334155);cursor:pointer;-webkit-user-select:none;user-select:none;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap}.compact-nav-btn rpt-icon{display:inline-flex;align-items:center;justify-content:center;color:var(--rpt-color-text-muted, #64748b);transition:color var(--rpt-transition-speed, .15s) ease}.compact-nav-btn:hover{background:var(--rpt-color-surface-hover, #f1f5f9);color:var(--rpt-color-text, #0f172a);border-color:var(--rpt-color-border-subtle, #e2e8f0)}.compact-nav-btn:hover rpt-icon{color:var(--rpt-color-text, #0f172a)}.compact-nav-btn.active{background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border-color:#2563eb40;font-weight:var(--rpt-font-weight-semibold, 600);box-shadow:0 1px 2px #2563eb14}.compact-nav-btn.active rpt-icon{color:var(--rpt-color-primary, #2563eb)}.compact-nav-btn:focus-visible{outline:2px solid var(--rpt-color-primary, #2563eb);outline-offset:1px}.workbench-drawer-backdrop{display:block;position:absolute;inset:0;background:#0f172a59;backdrop-filter:blur(1px);z-index:50}.workbench-left-container{position:absolute;left:0;top:0;bottom:0;width:280px;max-width:85vw;z-index:60;box-shadow:4px 0 24px #00000026;transform:translate(0);transition:transform .25s cubic-bezier(.16,1,.3,1)}.workbench-left-container.is-collapsed{transform:translate(-100%);width:280px!important}.workbench-right-container{position:absolute;right:0;top:0;bottom:0;width:380px;max-width:95vw;z-index:60;box-shadow:-4px 0 24px #00000026;transform:translate(0);transition:transform .25s cubic-bezier(.16,1,.3,1)}.workbench-right-container.is-collapsed{transform:translate(100%);width:380px!important}}.preview-mode-container{flex:1;min-height:0;overflow-y:auto;padding:16px;background-color:#f1f5f9;box-sizing:border-box}.preview-banner{max-width:1400px;margin:0 auto 16px;background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe;padding:10px 18px;border-radius:var(--rpt-border-radius-lg, 8px);font-size:var(--rpt-font-size-sm, .8rem);font-weight:600;display:flex;align-items:center;gap:8px;box-shadow:var(--rpt-box-shadow-xs, 0 1px 2px rgba(0, 0, 0, .04));box-sizing:border-box}.preview-content{max-width:1400px;margin:0 auto;background:#fff;border-radius:var(--rpt-border-radius-lg, 8px);border:1px solid var(--rpt-color-border, #cbd5e1);box-shadow:0 4px 6px -1px #0000000d;padding:0;min-height:480px;box-sizing:border-box}.json-mode-container{flex:1;min-height:0;padding:20px 24px;background-color:var(--rpt-color-bg, #f8fafc);display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden}.json-editor-card{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border-subtle, #e2e8f0);border-radius:var(--rpt-border-radius-lg, 8px);box-shadow:0 1px 3px #0000000d,0 1px 2px -1px #00000008;overflow:hidden;transition:background-color .2s ease,border-color .2s ease}.json-editor-card.theme-dark{background:#0f172a;border-color:#1e293b;box-shadow:0 4px 12px #00000040}.json-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;background:var(--rpt-color-surface, #ffffff);border-bottom:1px solid var(--rpt-color-border-subtle, #e2e8f0);flex-shrink:0;transition:background-color .2s ease,border-color .2s ease}.theme-dark .json-banner{background:#0b1120;border-bottom-color:#1e293b}.json-banner-left{display:flex;align-items:center;gap:12px;min-width:0}.json-badge-icon{width:32px;height:32px;border-radius:var(--rpt-border-radius, 6px);background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border:1px solid rgba(37,99,235,.18);display:flex;align-items:center;justify-content:center;flex-shrink:0}.theme-dark .json-badge-icon{background:#2563eb33;color:#60a5fa;border-color:#60a5fa4d}.json-title-group{display:flex;flex-direction:column;gap:2px;min-width:0}.json-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.json-title{font-size:.875rem;font-weight:600;letter-spacing:-.01em;color:var(--rpt-color-text, #0f172a)}.theme-dark .json-title{color:#f1f5f9}.json-schema-tag{font-size:.6875rem;font-weight:600;letter-spacing:.02em;padding:1px 7px;border-radius:9999px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;text-transform:uppercase}.theme-dark .json-schema-tag{background:#1e293b;color:#94a3b8;border-color:#334155}.json-meta-row{display:flex;align-items:center;gap:6px;font-size:.75rem;color:var(--rpt-color-text-muted, #64748b)}.theme-dark .json-meta-row{color:#64748b}.json-stat-pill strong{color:var(--rpt-color-text, #0f172a);font-weight:600}.theme-dark .json-stat-pill strong,.json-stat-divider{color:#cbd5e1}.theme-dark .json-stat-divider{color:#334155}.json-banner-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.btn-json-action{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;font-size:.75rem;font-weight:500;color:var(--rpt-color-text-secondary, #334155);background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all .15s ease}.btn-json-action:hover{background:var(--rpt-color-surface-hover, #f1f5f9);border-color:var(--rpt-color-border-hover, #94a3b8);color:var(--rpt-color-text, #0f172a)}.btn-json-action.active{background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);font-weight:600}.theme-dark .btn-json-action{background:#1e293b;border-color:#334155;color:#cbd5e1}.theme-dark .btn-json-action:hover{background:#334155;border-color:#475569;color:#fff}.theme-dark .btn-json-action.active{background:#2563eb40;color:#60a5fa;border-color:#3b82f6}.btn-copy-json{display:inline-flex;align-items:center;gap:6px;padding:5px 13px;font-size:.75rem;font-weight:600;color:#fff;background:var(--rpt-color-primary, #2563eb);border:1px solid var(--rpt-color-primary, #2563eb);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;box-shadow:0 1px 2px #2563eb33;transition:all .15s ease}.btn-copy-json:hover{background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8)}.btn-copy-json.copied{background:#10b981;border-color:#10b981;box-shadow:0 1px 2px #10b98133}.json-viewport{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:#fff;transition:background-color .2s ease}.theme-dark .json-viewport{background:#0f172a}.json-scroll-container{flex:1;min-height:0;overflow:auto}.json-code-table{width:100%;border-collapse:collapse;font-family:var(--rpt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.8125rem;line-height:1.6}.json-code-row{transition:background-color .1s ease}.json-code-row:hover{background:#f8fafc}.theme-dark .json-code-row:hover{background:#1e293b99}.json-line-number{width:44px;min-width:44px;max-width:56px;padding:1px 12px 1px 8px;text-align:right;color:#94a3b8;background:#f8fafc;border-right:1px solid #e2e8f0;-webkit-user-select:none;user-select:none;font-variant-numeric:tabular-nums;vertical-align:top;font-size:.75rem}.theme-dark .json-line-number{background:#0b1120;color:#475569;border-right-color:#1e293b}.json-line-text{padding:1px 16px;white-space:pre;vertical-align:top;color:#1e293b}.wrap-enabled .json-line-text{white-space:pre-wrap;word-break:break-all}.theme-dark .json-line-text{color:#e2e8f0}.json-token-key{color:#1e40af;font-weight:600}.json-token-string{color:#047857}.json-token-number{color:#7c3aed;font-weight:500}.json-token-boolean{color:#d97706;font-weight:600}.json-token-null{color:#dc2626;font-weight:600}.theme-dark .json-token-key{color:#60a5fa;font-weight:600}.theme-dark .json-token-string{color:#4ade80}.theme-dark .json-token-number{color:#c084fc;font-weight:500}.theme-dark .json-token-boolean{color:#fbbf24;font-weight:600}.theme-dark .json-token-null{color:#f87171;font-weight:600}.save-toast{position:absolute;bottom:24px;right:24px;background:#10b981;color:#fff;padding:10px 20px;border-radius:6px;font-size:.85rem;font-weight:600;box-shadow:0 10px 15px -3px #0000001a;z-index:100;animation:rpt-fade-in .2s ease}@keyframes rpt-fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$2.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: DesignerToolbarComponent, selector: "rpt-designer-toolbar", inputs: ["isLeftPanelCollapsed", "isRightPanelCollapsed"], outputs: ["toggleLeftPanel", "toggleRightPanel", "saveRequested"] }, { kind: "component", type: ComponentPaletteComponent, selector: "rpt-component-palette", outputs: ["collapseRequested"] }, { kind: "component", type: DesignCanvasComponent, selector: "rpt-design-canvas" }, { kind: "component", type: PropertyEditorComponent, selector: "rpt-property-editor", outputs: ["collapseRequested"] }, { kind: "component", type: ReportRuntimeComponent, selector: "rpt-report-runtime, rpt-runtime", inputs: ["reportId", "report", "resultData"], outputs: ["resetRequested", "execute", "executed", "exportRequested", "printRequested", "customActionTriggered", "gridStateChange", "columnDefsChange", "selectionChange", "selectionChanged", "rowActionTriggered", "drilldownRequested"] }, { kind: "component", type: RptIconComponent, selector: "rpt-icon", inputs: ["name", "size", "color", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18394
18639
|
}
|
|
18395
18640
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DesignerComponent, decorators: [{
|
|
18396
18641
|
type: Component,
|
|
@@ -18406,7 +18651,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
18406
18651
|
PropertyEditorComponent,
|
|
18407
18652
|
ReportRuntimeComponent,
|
|
18408
18653
|
RptIconComponent,
|
|
18409
|
-
], providers: [DesignerStateService, ...DESIGNER_ENDPOINT_PROVIDERS], template: `
|
|
18654
|
+
], providers: [DesignerFormContextService, DesignerStateService, ...DESIGNER_ENDPOINT_PROVIDERS], template: `
|
|
18410
18655
|
<div class="designer-shell">
|
|
18411
18656
|
@if (loadError()) { <div role="alert">{{ loadError() }} <button type="button" (click)="retryLoad()">Retry</button></div> }
|
|
18412
18657
|
<!-- Top Actions Toolbar with Sidebar Controls -->
|
|
@@ -18607,7 +18852,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
18607
18852
|
</div>
|
|
18608
18853
|
}
|
|
18609
18854
|
</div>
|
|
18610
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:flex;flex-direction:column;flex:1 1 0%;min-width:0;width:100%;height:100%;min-height:0;font-family:var(--rpt-font-family, inherit);box-sizing:border-box}.designer-shell{flex:1;min-height:0;display:flex;flex-direction:column;height:100%;background-color:#f8fafc;position:relative;overflow:hidden}.designer-workbench{display:flex;flex:1;overflow:hidden;position:relative;min-height:0}.workbench-left-container{display:flex;position:relative;width:268px;flex-shrink:0;height:100%;transition:width var(--rpt-transition-speed-smooth, .25s) cubic-bezier(.16,1,.3,1);z-index:20}.workbench-left-container.is-collapsed{width:0!important}.workbench-left-panel{width:100%;height:100%;overflow:hidden;border-right:1px solid var(--rpt-color-border, #cbd5e1);background:#fff;box-sizing:border-box}.workbench-left-container.is-collapsed .workbench-left-panel{visibility:hidden;border-right:none}.workbench-center-panel{flex:1;min-height:0;height:100%;overflow:hidden;display:flex;flex-direction:column;min-width:0;position:relative}.workbench-right-container{display:flex;position:relative;width:420px;flex-shrink:0;height:100%;transition:width var(--rpt-transition-speed-smooth, .25s) cubic-bezier(.16,1,.3,1);z-index:20}.workbench-right-container.is-collapsed{width:0!important}.workbench-right-panel{width:100%;height:100%;overflow:hidden;border-left:1px solid var(--rpt-color-border, #cbd5e1);background:#fff;box-sizing:border-box}.workbench-right-container.is-collapsed .workbench-right-panel{visibility:hidden;border-left:none}.compact-workbench-bar,.workbench-drawer-backdrop{display:none}@media (max-width: 900px){.compact-workbench-bar{display:flex;align-items:center;justify-content:space-around;height:48px;background:var(--rpt-color-surface, #ffffff);border-top:1px solid var(--rpt-color-border, #cbd5e1);padding:0 12px;gap:8px;z-index:45;flex-shrink:0;box-shadow:0 -2px 8px #0000000a;font-family:var(--rpt-font-family, inherit)}.compact-nav-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;border-radius:var(--rpt-border-radius, 6px);border:1px solid transparent;background:transparent;font-family:var(--rpt-font-family, inherit);font-size:var(--rpt-font-size-sm, .75rem);font-weight:var(--rpt-font-weight-medium, 500);letter-spacing:-.01em;line-height:1.4;color:var(--rpt-color-text-secondary, #334155);cursor:pointer;-webkit-user-select:none;user-select:none;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap}.compact-nav-btn rpt-icon{display:inline-flex;align-items:center;justify-content:center;color:var(--rpt-color-text-muted, #64748b);transition:color var(--rpt-transition-speed, .15s) ease}.compact-nav-btn:hover{background:var(--rpt-color-surface-hover, #f1f5f9);color:var(--rpt-color-text, #0f172a);border-color:var(--rpt-color-border-subtle, #e2e8f0)}.compact-nav-btn:hover rpt-icon{color:var(--rpt-color-text, #0f172a)}.compact-nav-btn.active{background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border-color:#2563eb40;font-weight:var(--rpt-font-weight-semibold, 600);box-shadow:0 1px 2px #2563eb14}.compact-nav-btn.active rpt-icon{color:var(--rpt-color-primary, #2563eb)}.compact-nav-btn:focus-visible{outline:2px solid var(--rpt-color-primary, #2563eb);outline-offset:1px}.workbench-drawer-backdrop{display:block;position:absolute;inset:0;background:#0f172a59;backdrop-filter:blur(1px);z-index:50}.workbench-left-container{position:absolute;left:0;top:0;bottom:0;width:280px;max-width:85vw;z-index:60;box-shadow:4px 0 24px #00000026;transform:translate(0);transition:transform .25s cubic-bezier(.16,1,.3,1)}.workbench-left-container.is-collapsed{transform:translate(-100%);width:280px!important}.workbench-right-container{position:absolute;right:0;top:0;bottom:0;width:380px;max-width:95vw;z-index:60;box-shadow:-4px 0 24px #00000026;transform:translate(0);transition:transform .25s cubic-bezier(.16,1,.3,1)}.workbench-right-container.is-collapsed{transform:translate(100%);width:380px!important}}.preview-mode-container{flex:1;min-height:0;overflow-y:auto;padding:16px;background-color:#f1f5f9;box-sizing:border-box}.preview-banner{max-width:1400px;margin:0 auto 16px;background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe;padding:10px 18px;border-radius:var(--rpt-border-radius-lg, 8px);font-size:var(--rpt-font-size-sm, .8rem);font-weight:600;display:flex;align-items:center;gap:8px;box-shadow:var(--rpt-box-shadow-xs, 0 1px 2px rgba(0, 0, 0, .04));box-sizing:border-box}.preview-content{max-width:1400px;margin:0 auto;background:#fff;border-radius:var(--rpt-border-radius-lg, 8px);border:1px solid var(--rpt-color-border, #cbd5e1);box-shadow:0 4px 6px -1px #0000000d;padding:0;min-height:480px;box-sizing:border-box}.json-mode-container{flex:1;min-height:0;padding:20px 24px;background-color:var(--rpt-color-bg, #f8fafc);display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden}.json-editor-card{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border-subtle, #e2e8f0);border-radius:var(--rpt-border-radius-lg, 8px);box-shadow:0 1px 3px #0000000d,0 1px 2px -1px #00000008;overflow:hidden;transition:background-color .2s ease,border-color .2s ease}.json-editor-card.theme-dark{background:#0f172a;border-color:#1e293b;box-shadow:0 4px 12px #00000040}.json-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;background:var(--rpt-color-surface, #ffffff);border-bottom:1px solid var(--rpt-color-border-subtle, #e2e8f0);flex-shrink:0;transition:background-color .2s ease,border-color .2s ease}.theme-dark .json-banner{background:#0b1120;border-bottom-color:#1e293b}.json-banner-left{display:flex;align-items:center;gap:12px;min-width:0}.json-badge-icon{width:32px;height:32px;border-radius:var(--rpt-border-radius, 6px);background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border:1px solid rgba(37,99,235,.18);display:flex;align-items:center;justify-content:center;flex-shrink:0}.theme-dark .json-badge-icon{background:#2563eb33;color:#60a5fa;border-color:#60a5fa4d}.json-title-group{display:flex;flex-direction:column;gap:2px;min-width:0}.json-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.json-title{font-size:.875rem;font-weight:600;letter-spacing:-.01em;color:var(--rpt-color-text, #0f172a)}.theme-dark .json-title{color:#f1f5f9}.json-schema-tag{font-size:.6875rem;font-weight:600;letter-spacing:.02em;padding:1px 7px;border-radius:9999px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;text-transform:uppercase}.theme-dark .json-schema-tag{background:#1e293b;color:#94a3b8;border-color:#334155}.json-meta-row{display:flex;align-items:center;gap:6px;font-size:.75rem;color:var(--rpt-color-text-muted, #64748b)}.theme-dark .json-meta-row{color:#64748b}.json-stat-pill strong{color:var(--rpt-color-text, #0f172a);font-weight:600}.theme-dark .json-stat-pill strong,.json-stat-divider{color:#cbd5e1}.theme-dark .json-stat-divider{color:#334155}.json-banner-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.btn-json-action{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;font-size:.75rem;font-weight:500;color:var(--rpt-color-text-secondary, #334155);background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all .15s ease}.btn-json-action:hover{background:var(--rpt-color-surface-hover, #f1f5f9);border-color:var(--rpt-color-border-hover, #94a3b8);color:var(--rpt-color-text, #0f172a)}.btn-json-action.active{background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);font-weight:600}.theme-dark .btn-json-action{background:#1e293b;border-color:#334155;color:#cbd5e1}.theme-dark .btn-json-action:hover{background:#334155;border-color:#475569;color:#fff}.theme-dark .btn-json-action.active{background:#2563eb40;color:#60a5fa;border-color:#3b82f6}.btn-copy-json{display:inline-flex;align-items:center;gap:6px;padding:5px 13px;font-size:.75rem;font-weight:600;color:#fff;background:var(--rpt-color-primary, #2563eb);border:1px solid var(--rpt-color-primary, #2563eb);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;box-shadow:0 1px 2px #2563eb33;transition:all .15s ease}.btn-copy-json:hover{background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8)}.btn-copy-json.copied{background:#10b981;border-color:#10b981;box-shadow:0 1px 2px #10b98133}.json-viewport{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:#fff;transition:background-color .2s ease}.theme-dark .json-viewport{background:#0f172a}.json-scroll-container{flex:1;min-height:0;overflow:auto}.json-code-table{width:100%;border-collapse:collapse;font-family:var(--rpt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.8125rem;line-height:1.6}.json-code-row{transition:background-color .1s ease}.json-code-row:hover{background:#f8fafc}.theme-dark .json-code-row:hover{background:#1e293b99}.json-line-number{width:44px;min-width:44px;max-width:56px;padding:1px 12px 1px 8px;text-align:right;color:#94a3b8;background:#f8fafc;border-right:1px solid #e2e8f0;-webkit-user-select:none;user-select:none;font-variant-numeric:tabular-nums;vertical-align:top;font-size:.75rem}.theme-dark .json-line-number{background:#0b1120;color:#475569;border-right-color:#1e293b}.json-line-text{padding:1px 16px;white-space:pre;vertical-align:top;color:#1e293b}.wrap-enabled .json-line-text{white-space:pre-wrap;word-break:break-all}.theme-dark .json-line-text{color:#e2e8f0}.json-token-key{color:#1e40af;font-weight:600}.json-token-string{color:#047857}.json-token-number{color:#7c3aed;font-weight:500}.json-token-boolean{color:#d97706;font-weight:600}.json-token-null{color:#dc2626;font-weight:600}.theme-dark .json-token-key{color:#60a5fa;font-weight:600}.theme-dark .json-token-string{color:#4ade80}.theme-dark .json-token-number{color:#c084fc;font-weight:500}.theme-dark .json-token-boolean{color:#fbbf24;font-weight:600}.theme-dark .json-token-null{color:#f87171;font-weight:600}.save-toast{position:absolute;bottom:24px;right:24px;background:#10b981;color:#fff;padding:10px 20px;border-radius:6px;font-size:.85rem;font-weight:600;box-shadow:0 10px 15px -3px #0000001a;z-index:100;animation:rpt-fade-in .2s ease}@keyframes rpt-fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
18855
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:flex;flex-direction:column;flex:1 1 0%;min-width:0;width:100%;height:100%;min-height:0;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif);box-sizing:border-box}.designer-shell{flex:1;min-height:0;display:flex;flex-direction:column;height:100%;background-color:#f8fafc;position:relative;overflow:hidden}.designer-workbench{display:flex;flex:1;overflow:hidden;position:relative;min-height:0}.workbench-left-container{display:flex;position:relative;width:268px;flex-shrink:0;height:100%;transition:width var(--rpt-transition-speed-smooth, .25s) cubic-bezier(.16,1,.3,1);z-index:20}.workbench-left-container.is-collapsed{width:0!important}.workbench-left-panel{width:100%;height:100%;overflow:hidden;border-right:1px solid var(--rpt-color-border, #cbd5e1);background:#fff;box-sizing:border-box}.workbench-left-container.is-collapsed .workbench-left-panel{visibility:hidden;border-right:none}.workbench-center-panel{flex:1;min-height:0;height:100%;overflow:hidden;display:flex;flex-direction:column;min-width:0;position:relative}.workbench-right-container{display:flex;position:relative;width:420px;flex-shrink:0;height:100%;transition:width var(--rpt-transition-speed-smooth, .25s) cubic-bezier(.16,1,.3,1);z-index:20}.workbench-right-container.is-collapsed{width:0!important}.workbench-right-panel{width:100%;height:100%;overflow:hidden;border-left:1px solid var(--rpt-color-border, #cbd5e1);background:#fff;box-sizing:border-box}.workbench-right-container.is-collapsed .workbench-right-panel{visibility:hidden;border-left:none}.compact-workbench-bar,.workbench-drawer-backdrop{display:none}@media (max-width: 900px){.compact-workbench-bar{display:flex;align-items:center;justify-content:space-around;height:48px;background:var(--rpt-color-surface, #ffffff);border-top:1px solid var(--rpt-color-border, #cbd5e1);padding:0 12px;gap:8px;z-index:45;flex-shrink:0;box-shadow:0 -2px 8px #0000000a;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif)}.compact-nav-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;border-radius:var(--rpt-border-radius, 6px);border:1px solid transparent;background:transparent;font-family:var(--rpt-font-family, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif);font-size:var(--rpt-font-size-sm, .75rem);font-weight:var(--rpt-font-weight-medium, 500);letter-spacing:-.01em;line-height:1.4;color:var(--rpt-color-text-secondary, #334155);cursor:pointer;-webkit-user-select:none;user-select:none;transition:all var(--rpt-transition-speed, .15s) ease;white-space:nowrap}.compact-nav-btn rpt-icon{display:inline-flex;align-items:center;justify-content:center;color:var(--rpt-color-text-muted, #64748b);transition:color var(--rpt-transition-speed, .15s) ease}.compact-nav-btn:hover{background:var(--rpt-color-surface-hover, #f1f5f9);color:var(--rpt-color-text, #0f172a);border-color:var(--rpt-color-border-subtle, #e2e8f0)}.compact-nav-btn:hover rpt-icon{color:var(--rpt-color-text, #0f172a)}.compact-nav-btn.active{background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border-color:#2563eb40;font-weight:var(--rpt-font-weight-semibold, 600);box-shadow:0 1px 2px #2563eb14}.compact-nav-btn.active rpt-icon{color:var(--rpt-color-primary, #2563eb)}.compact-nav-btn:focus-visible{outline:2px solid var(--rpt-color-primary, #2563eb);outline-offset:1px}.workbench-drawer-backdrop{display:block;position:absolute;inset:0;background:#0f172a59;backdrop-filter:blur(1px);z-index:50}.workbench-left-container{position:absolute;left:0;top:0;bottom:0;width:280px;max-width:85vw;z-index:60;box-shadow:4px 0 24px #00000026;transform:translate(0);transition:transform .25s cubic-bezier(.16,1,.3,1)}.workbench-left-container.is-collapsed{transform:translate(-100%);width:280px!important}.workbench-right-container{position:absolute;right:0;top:0;bottom:0;width:380px;max-width:95vw;z-index:60;box-shadow:-4px 0 24px #00000026;transform:translate(0);transition:transform .25s cubic-bezier(.16,1,.3,1)}.workbench-right-container.is-collapsed{transform:translate(100%);width:380px!important}}.preview-mode-container{flex:1;min-height:0;overflow-y:auto;padding:16px;background-color:#f1f5f9;box-sizing:border-box}.preview-banner{max-width:1400px;margin:0 auto 16px;background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe;padding:10px 18px;border-radius:var(--rpt-border-radius-lg, 8px);font-size:var(--rpt-font-size-sm, .8rem);font-weight:600;display:flex;align-items:center;gap:8px;box-shadow:var(--rpt-box-shadow-xs, 0 1px 2px rgba(0, 0, 0, .04));box-sizing:border-box}.preview-content{max-width:1400px;margin:0 auto;background:#fff;border-radius:var(--rpt-border-radius-lg, 8px);border:1px solid var(--rpt-color-border, #cbd5e1);box-shadow:0 4px 6px -1px #0000000d;padding:0;min-height:480px;box-sizing:border-box}.json-mode-container{flex:1;min-height:0;padding:20px 24px;background-color:var(--rpt-color-bg, #f8fafc);display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden}.json-editor-card{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border-subtle, #e2e8f0);border-radius:var(--rpt-border-radius-lg, 8px);box-shadow:0 1px 3px #0000000d,0 1px 2px -1px #00000008;overflow:hidden;transition:background-color .2s ease,border-color .2s ease}.json-editor-card.theme-dark{background:#0f172a;border-color:#1e293b;box-shadow:0 4px 12px #00000040}.json-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;background:var(--rpt-color-surface, #ffffff);border-bottom:1px solid var(--rpt-color-border-subtle, #e2e8f0);flex-shrink:0;transition:background-color .2s ease,border-color .2s ease}.theme-dark .json-banner{background:#0b1120;border-bottom-color:#1e293b}.json-banner-left{display:flex;align-items:center;gap:12px;min-width:0}.json-badge-icon{width:32px;height:32px;border-radius:var(--rpt-border-radius, 6px);background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border:1px solid rgba(37,99,235,.18);display:flex;align-items:center;justify-content:center;flex-shrink:0}.theme-dark .json-badge-icon{background:#2563eb33;color:#60a5fa;border-color:#60a5fa4d}.json-title-group{display:flex;flex-direction:column;gap:2px;min-width:0}.json-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.json-title{font-size:.875rem;font-weight:600;letter-spacing:-.01em;color:var(--rpt-color-text, #0f172a)}.theme-dark .json-title{color:#f1f5f9}.json-schema-tag{font-size:.6875rem;font-weight:600;letter-spacing:.02em;padding:1px 7px;border-radius:9999px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;text-transform:uppercase}.theme-dark .json-schema-tag{background:#1e293b;color:#94a3b8;border-color:#334155}.json-meta-row{display:flex;align-items:center;gap:6px;font-size:.75rem;color:var(--rpt-color-text-muted, #64748b)}.theme-dark .json-meta-row{color:#64748b}.json-stat-pill strong{color:var(--rpt-color-text, #0f172a);font-weight:600}.theme-dark .json-stat-pill strong,.json-stat-divider{color:#cbd5e1}.theme-dark .json-stat-divider{color:#334155}.json-banner-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}.btn-json-action{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;font-size:.75rem;font-weight:500;color:var(--rpt-color-text-secondary, #334155);background:var(--rpt-color-surface, #ffffff);border:1px solid var(--rpt-color-border, #cbd5e1);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;transition:all .15s ease}.btn-json-action:hover{background:var(--rpt-color-surface-hover, #f1f5f9);border-color:var(--rpt-color-border-hover, #94a3b8);color:var(--rpt-color-text, #0f172a)}.btn-json-action.active{background:var(--rpt-color-primary-light, #eff6ff);color:var(--rpt-color-primary, #2563eb);border-color:var(--rpt-color-primary, #2563eb);font-weight:600}.theme-dark .btn-json-action{background:#1e293b;border-color:#334155;color:#cbd5e1}.theme-dark .btn-json-action:hover{background:#334155;border-color:#475569;color:#fff}.theme-dark .btn-json-action.active{background:#2563eb40;color:#60a5fa;border-color:#3b82f6}.btn-copy-json{display:inline-flex;align-items:center;gap:6px;padding:5px 13px;font-size:.75rem;font-weight:600;color:#fff;background:var(--rpt-color-primary, #2563eb);border:1px solid var(--rpt-color-primary, #2563eb);border-radius:var(--rpt-border-radius, 6px);cursor:pointer;box-shadow:0 1px 2px #2563eb33;transition:all .15s ease}.btn-copy-json:hover{background:var(--rpt-color-primary-hover, #1d4ed8);border-color:var(--rpt-color-primary-hover, #1d4ed8)}.btn-copy-json.copied{background:#10b981;border-color:#10b981;box-shadow:0 1px 2px #10b98133}.json-viewport{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;background:#fff;transition:background-color .2s ease}.theme-dark .json-viewport{background:#0f172a}.json-scroll-container{flex:1;min-height:0;overflow:auto}.json-code-table{width:100%;border-collapse:collapse;font-family:var(--rpt-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.8125rem;line-height:1.6}.json-code-row{transition:background-color .1s ease}.json-code-row:hover{background:#f8fafc}.theme-dark .json-code-row:hover{background:#1e293b99}.json-line-number{width:44px;min-width:44px;max-width:56px;padding:1px 12px 1px 8px;text-align:right;color:#94a3b8;background:#f8fafc;border-right:1px solid #e2e8f0;-webkit-user-select:none;user-select:none;font-variant-numeric:tabular-nums;vertical-align:top;font-size:.75rem}.theme-dark .json-line-number{background:#0b1120;color:#475569;border-right-color:#1e293b}.json-line-text{padding:1px 16px;white-space:pre;vertical-align:top;color:#1e293b}.wrap-enabled .json-line-text{white-space:pre-wrap;word-break:break-all}.theme-dark .json-line-text{color:#e2e8f0}.json-token-key{color:#1e40af;font-weight:600}.json-token-string{color:#047857}.json-token-number{color:#7c3aed;font-weight:500}.json-token-boolean{color:#d97706;font-weight:600}.json-token-null{color:#dc2626;font-weight:600}.theme-dark .json-token-key{color:#60a5fa;font-weight:600}.theme-dark .json-token-string{color:#4ade80}.theme-dark .json-token-number{color:#c084fc;font-weight:500}.theme-dark .json-token-boolean{color:#fbbf24;font-weight:600}.theme-dark .json-token-null{color:#f87171;font-weight:600}.save-toast{position:absolute;bottom:24px;right:24px;background:#10b981;color:#fff;padding:10px 20px;border-radius:6px;font-size:.85rem;font-weight:600;box-shadow:0 10px 15px -3px #0000001a;z-index:100;animation:rpt-fade-in .2s ease}@keyframes rpt-fade-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
18611
18856
|
}], ctorParameters: () => [], propDecorators: { config: [{
|
|
18612
18857
|
type: Input
|
|
18613
18858
|
}], apiUrl: [{
|
|
@@ -20541,5 +20786,5 @@ const bwaysReportProviders = provideBwaysReport;
|
|
|
20541
20786
|
* Generated bundle index. Do not edit.
|
|
20542
20787
|
*/
|
|
20543
20788
|
|
|
20544
|
-
export { AdapterNotProvidedError, BWAYS_REPORT_ENDPOINTS, BrowserReportStorage, BwaysReportBuilderComponent, BwaysReportMenuComponent, BwaysReportPageComponent, CHART_COMPONENT, ComponentNotRegisteredError, ComponentPaletteComponent, ComponentRegistry, DataSourceError, DesignCanvasComponent, DesignerComponent, DesignerStateService, DesignerToolbarComponent, DynamicFormBuilder, DynamicRendererComponent, EndpointDataSourceAdapter, EndpointLookupAdapter, EndpointMasterDataAdapter, EndpointPersistenceAdapter, EndpointSchemaDiscoveryAdapter, GRID_COMPONENT, HttpDataSourceAdapter, HttpLookupAdapter, HttpMasterDataAdapter, HttpPersistenceAdapter, HttpReportDataSourceAdapter, HttpReportLookupAdapter, HttpReportPersistenceAdapter, HttpReportSchemaDiscoveryAdapter, HttpSchemaDiscoveryAdapter, LocalStorageReportPersistenceAdapter, MasterDataProvider, MemoryReportStorage, MockReportDataSourceAdapter, PALETTE_CATEGORY_MAP, PARAMETER_DATE_FORMATS, PropertyEditorActionComponent, PropertyEditorComponent, REPORTING_CONFIG, REPORT_SESSION_CONTEXT, REPORT_SESSION_PROVIDER, REPORT_STORAGE, ReportApiExecutionService, ReportChartBridgeComponent, ReportDataDiscoveryService, ReportDataSourceAdapter, ReportDefinitionError, ReportExportService, ReportGridBridgeComponent, ReportLookupAdapter, ReportMenuService, ReportPersistenceAdapter, ReportRuntimeComponent, ReportSchemaDiscoveryAdapter, ReportSessionContextService, ReportStorageService, ReportStoreService, ReportTemplateService, ReportTranslationAdapter, ReportVersioningService, ReportingFeatureKind, RoutedReportDesignerComponent, RoutedReportRuntimeComponent, RptButtonComponent, RptCheckboxComponent, RptDateComponent, RptDateRangeComponent, RptDropdownComponent, RptIconComponent, RptInputComponent, RptKpiCardComponent, RptNumberComponent, RptRadioComponent, RptReportComponent, RptReportDesignerComponent, RptSearchableSelectComponent, SchemaValidatorService, SchemaVersionError, SessionContextProvider, bwaysReportProviders, bwaysReportRoutes, createReportRoutes, createValidators, extractLookupOptionItem, extractRowArray, findMissingCanvasFields, formatFilterSummary, formatParameterDate, generateCsvContent, generateExcelXml, generateHtmlContent, generateId, getFieldCaseInsensitive, getValidationMessage, groupReportsByCategory, injectReportMenu, injectReportMenuGroups, migrateDefinition, normalizeBwaysConfig, normalizeParameterNames, parseParameterToken, parseSqlExecStatement, provideBwaysReport, provideBwaysReporting, provideReporting, registerBuiltinComponents, reportResolver, resolveCanvasFieldValue, resolveContextPreset, resolveExecutionDataSource, resolveParameterMappings, resolveParameterValue, sanitizeCsvCell, sanitizeSqlParamLiteral, toFieldKey, validateReportSchema, withHttpAdapters, withLocalStorage, withMockAdapters };
|
|
20789
|
+
export { AdapterNotProvidedError, BWAYS_REPORT_ENDPOINTS, BrowserReportStorage, BwaysReportBuilderComponent, BwaysReportMenuComponent, BwaysReportPageComponent, CHART_COMPONENT, ComponentNotRegisteredError, ComponentPaletteComponent, ComponentRegistry, DataSourceError, DesignCanvasComponent, DesignerComponent, DesignerStateService, DesignerToolbarComponent, DynamicFormBuilder, DynamicRendererComponent, EndpointDataSourceAdapter, EndpointLookupAdapter, EndpointMasterDataAdapter, EndpointPersistenceAdapter, EndpointSchemaDiscoveryAdapter, GRID_COMPONENT, HttpDataSourceAdapter, HttpLookupAdapter, HttpMasterDataAdapter, HttpPersistenceAdapter, HttpReportDataSourceAdapter, HttpReportLookupAdapter, HttpReportPersistenceAdapter, HttpReportSchemaDiscoveryAdapter, HttpSchemaDiscoveryAdapter, LocalStorageReportPersistenceAdapter, MasterDataProvider, MemoryReportStorage, MockReportDataSourceAdapter, PALETTE_CATEGORY_MAP, PARAMETER_DATE_FORMATS, PropertyEditorActionComponent, PropertyEditorComponent, REPORTING_CONFIG, REPORT_SESSION_CONTEXT, REPORT_SESSION_PROVIDER, REPORT_STORAGE, ReportApiExecutionService, ReportChartBridgeComponent, ReportDataDiscoveryService, ReportDataSourceAdapter, ReportDefinitionError, ReportExportService, ReportGridBridgeComponent, ReportLookupAdapter, ReportMenuService, ReportPersistenceAdapter, ReportRuntimeComponent, ReportSchemaDiscoveryAdapter, ReportSessionContextService, ReportStorageService, ReportStoreService, ReportTemplateService, ReportTranslationAdapter, ReportVersioningService, ReportingFeatureKind, RoutedReportDesignerComponent, RoutedReportRuntimeComponent, RptButtonComponent, RptCheckboxComponent, RptDateComponent, RptDateRangeComponent, RptDropdownComponent, RptIconComponent, RptInputComponent, RptKpiCardComponent, RptNumberComponent, RptRadioComponent, RptReportComponent, RptReportDesignerComponent, RptSearchableSelectComponent, SchemaValidatorService, SchemaVersionError, SessionContextProvider, bwaysReportProviders, bwaysReportRoutes, createReportRoutes, createValidators, extractLookupOptionItem, extractRowArray, findMissingCanvasFields, formatFilterSummary, formatParameterDate, generateCsvContent, generateExcelXml, generateHtmlContent, generateId, getFieldCaseInsensitive, getValidationMessage, groupReportsByCategory, injectReportMenu, injectReportMenuGroups, migrateDefinition, normalizeBwaysConfig, normalizeParameterNames, parseParameterToken, parseSqlExecStatement, provideBwaysReport, provideBwaysReporting, provideReporting, registerBuiltinComponents, reportResolver, resolveCanvasFieldValue, resolveContextPreset, resolveExecutionDataSource, resolveParameterMappings, resolveParameterValue, sanitizeCsvCell, sanitizeSqlParamLiteral, setParameterMapping, toFieldKey, validateReportSchema, withHttpAdapters, withLocalStorage, withMockAdapters };
|
|
20545
20790
|
//# sourceMappingURL=bways-report.mjs.map
|