@dashboard-designer/ui 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/dist/styles.css CHANGED
@@ -3404,155 +3404,17 @@ select.dd-input[multiple] {
3404
3404
  /* —— Print / Export PDF ——
3405
3405
  Grid layout uses absolute positioning; forcing height:auto collapses it to a
3406
3406
  blank page. In print mode we flatten items into normal document flow. */
3407
+ .dd-print-snapshot { display: none; }
3407
3408
  @media print {
3408
- @page {
3409
- size: auto;
3410
- margin: 10mm;
3411
- }
3412
-
3413
- html.dd-print-mode,
3414
- html.dd-print-mode body,
3415
- html.dd-print-mode #root {
3416
- height: auto !important;
3417
- min-height: 0 !important;
3418
- overflow: visible !important;
3419
- background: #fff !important;
3420
- }
3421
-
3422
- html.dd-print-mode .app-shell,
3423
- html.dd-print-mode .app-content,
3424
- html.dd-print-mode .dd-root,
3425
- html.dd-print-mode .dd-workspace,
3426
- html.dd-print-mode .dd-main,
3427
- html.dd-print-mode .dd-canvas {
3428
- display: block !important;
3429
- position: static !important;
3430
- height: auto !important;
3431
- min-height: 0 !important;
3432
- max-height: none !important;
3433
- overflow: visible !important;
3434
- flex: none !important;
3435
- width: 100% !important;
3436
- margin: 0 !important;
3437
- padding: 0 !important;
3438
- border: none !important;
3439
- box-shadow: none !important;
3440
- background: #fff !important;
3441
- contain: none !important;
3442
- isolation: auto !important;
3443
- }
3444
-
3445
- html.dd-print-mode .app-topbar,
3446
- html.dd-print-mode .app-nav,
3447
- html.dd-print-mode .app-sidebar,
3448
- html.dd-print-mode .dd-toolbar,
3449
- html.dd-print-mode .dd-filters-side,
3450
- html.dd-print-mode .dd-filter-bar,
3451
- html.dd-print-mode .dd-modal-backdrop,
3452
- html.dd-print-mode .dd-widget-edit,
3453
- html.dd-print-mode .dd-widget-delete,
3454
- html.dd-print-mode .dd-widget-header-actions,
3455
- html.dd-print-mode .dd-widget-drag-grip,
3456
- html.dd-print-mode .dd-canvas-empty,
3457
- html.dd-print-mode .dd-badge,
3458
- html.dd-print-mode .dd-grid-resize-handle,
3459
- html.dd-print-mode .react-resizable-handle {
3460
- display: none !important;
3461
- }
3462
-
3463
- html.dd-print-mode .dd-canvas {
3464
- padding: 0 !important;
3465
- }
3466
-
3467
- html.dd-print-mode .dd-canvas .react-grid-layout {
3468
- display: block !important;
3469
- position: static !important;
3470
- height: auto !important;
3471
- min-height: 0 !important;
3472
- width: 100% !important;
3473
- }
3474
-
3475
- html.dd-print-mode .dd-canvas .react-grid-item {
3476
- position: static !important;
3477
- left: auto !important;
3478
- top: auto !important;
3479
- right: auto !important;
3480
- bottom: auto !important;
3481
- width: 100% !important;
3482
- height: auto !important;
3483
- min-height: 0 !important;
3484
- margin: 0 0 14px !important;
3485
- padding: 0 !important;
3486
- transform: none !important;
3487
- transition: none !important;
3488
- break-inside: avoid;
3489
- page-break-inside: avoid;
3490
- }
3491
-
3492
- html.dd-print-mode .dd-canvas .react-grid-item > .dd-widget,
3493
- html.dd-print-mode .dd-canvas .react-grid-item > div {
3494
- height: auto !important;
3495
- min-height: 0 !important;
3496
- }
3497
-
3498
- html.dd-print-mode .dd-widget {
3499
- height: auto !important;
3500
- max-height: none !important;
3501
- overflow: visible !important;
3502
- break-inside: avoid;
3503
- page-break-inside: avoid;
3504
- box-shadow: none !important;
3505
- border: 1px solid #cfdcd5 !important;
3506
- border-radius: 8px !important;
3507
- background: #fff !important;
3508
- }
3509
-
3510
- html.dd-print-mode .dd-widget.selected {
3511
- outline: none !important;
3512
- box-shadow: none !important;
3513
- border-color: #cfdcd5 !important;
3514
- }
3515
-
3516
- html.dd-print-mode .dd-widget-body {
3517
- overflow: visible !important;
3518
- height: auto !important;
3519
- min-height: 0 !important;
3520
- }
3521
-
3522
- html.dd-print-mode .dd-chart-fill {
3523
- height: 260px !important;
3524
- min-height: 260px !important;
3525
- max-height: none !important;
3526
- overflow: visible !important;
3527
- }
3528
-
3529
- html.dd-print-mode .recharts-responsive-container,
3530
- html.dd-print-mode .recharts-wrapper,
3531
- html.dd-print-mode .recharts-surface {
3532
- width: 100% !important;
3533
- overflow: visible !important;
3534
- }
3535
-
3536
- html.dd-print-mode .dd-kpi {
3537
- min-height: 80px;
3538
- padding: 12px !important;
3539
- }
3540
-
3541
- html.dd-print-mode .dd-table-wrap,
3542
- html.dd-print-mode .dd-listbox,
3543
- html.dd-print-mode .dd-listbox-scroll,
3544
- html.dd-print-mode .dd-query-data-scroll {
3545
- height: auto !important;
3546
- max-height: none !important;
3547
- overflow: visible !important;
3548
- }
3549
-
3550
- html.dd-print-mode .dd-listbox-item {
3551
- break-inside: avoid;
3552
- }
3409
+ @page { size: A4 landscape; margin: 10mm; }
3410
+ html.dd-print-mode, html.dd-print-mode body { margin: 0 !important; padding: 0 !important; height: auto !important; min-height: 0 !important; overflow: visible !important; background: white !important; }
3411
+ html.dd-print-mode body > :not(.dd-print-snapshot) { display: none !important; }
3412
+ html.dd-print-mode .dd-print-snapshot { display: block !important; width: max-content; zoom: var(--dd-print-scale); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
3413
+ html.dd-print-mode .dd-print-snapshot * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
3553
3414
  }
3554
3415
 
3555
3416
 
3417
+
3556
3418
  .dd-table-sort { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
3557
3419
  .dd-table-sort:hover { color: var(--dd-accent); }
3558
3420
 
@@ -3634,6 +3496,135 @@ select.dd-input[multiple] {
3634
3496
  .dd-custom-toolbar-spinner { animation: dd-toolbar-spin 1s linear infinite; }
3635
3497
  @keyframes dd-toolbar-spin { to { transform:rotate(360deg); } }
3636
3498
  @media(prefers-reduced-motion:reduce) { .dd-custom-toolbar-spinner { animation:none; } }
3499
+
3500
+ /* Compact, responsive filters scoped to the widget. */
3501
+ .dd-widget-filters {
3502
+ padding: 8px 12px;
3503
+ border-bottom: 1px solid var(--dd-border);
3504
+ background: var(--dd-surface);
3505
+ flex: 0 0 auto;
3506
+ max-height: 150px;
3507
+ overflow: auto;
3508
+ }
3509
+ .dd-widget-filters .dd-filter-row {
3510
+ display: flex;
3511
+ flex-direction: row;
3512
+ flex-wrap: wrap;
3513
+ align-items: flex-start;
3514
+ gap: 8px 16px;
3515
+ }
3516
+ .dd-widget-filters .dd-filter-item-readonly {
3517
+ display: flex;
3518
+ flex-direction: row;
3519
+ flex-wrap: wrap;
3520
+ align-items: center;
3521
+ gap: 8px;
3522
+ flex: 0 1 420px;
3523
+ width: auto;
3524
+ max-width: 100%;
3525
+ min-width: 0;
3526
+ min-height: 32px;
3527
+ padding: 0;
3528
+ border: 0;
3529
+ border-radius: 0;
3530
+ background: transparent;
3531
+ }
3532
+ .dd-widget-filters .dd-filter-readonly-field {
3533
+ display: flex;
3534
+ align-items: center;
3535
+ gap: 6px;
3536
+ flex-wrap: wrap;
3537
+ }
3538
+ .dd-widget-filters .dd-filter-label { font-size: 12px; font-weight: 600; }
3539
+ .dd-widget-filters .dd-filter-op-text { font-size: 11px; color: var(--dd-muted); }
3540
+ .dd-widget-filters .dd-filter-value,
3541
+ .dd-widget-filters .dd-filter-value-to { flex: 1 1 160px; min-width: 0; }
3542
+ .dd-widget-filters .dd-input {
3543
+ box-sizing: border-box;
3544
+ width: 100%;
3545
+ min-width: 0;
3546
+ height: 32px;
3547
+ border-radius: 6px;
3548
+ }
3549
+
3550
+ .dd-widget-filters .dd-filter-clear, .dd-widget-filters .dd-filter-clear-all {
3551
+ display: inline-flex; align-items: center; justify-content: center; gap: 5px;
3552
+ flex: 0 0 auto; height: 28px; padding: 0 6px; border: 0; border-radius: 5px;
3553
+ background: transparent; color: var(--dd-muted); cursor: pointer; font: inherit; font-size: 12px;
3554
+ }
3555
+ .dd-widget-filters .dd-filter-clear-all { margin-inline-start: auto; align-self: center; white-space: nowrap; }
3556
+ .dd-widget-filters .dd-filter-clear:hover:not(:disabled), .dd-widget-filters .dd-filter-clear-all:hover:not(:disabled) { background: var(--dd-border); color: var(--dd-ink); }
3557
+ .dd-widget-filters .dd-filter-clear:disabled, .dd-widget-filters .dd-filter-clear-all:disabled { opacity: .35; cursor: default; }
3558
+
3559
+ /* Keep several widget filters in one row when space permits. */
3560
+ .dd-widget-filters .dd-filter-item-readonly { flex: 0 1 auto; max-width: 100%; gap: 6px; }
3561
+ .dd-widget-filters .dd-filter-value, .dd-widget-filters .dd-filter-value-to { position: relative; flex: 0 1 190px; width: 190px; max-width: 100%; }
3562
+ .dd-widget-filters .dd-filter-value:has(.dd-filter-clear) .dd-input { padding-inline-end: 52px; }
3563
+ .dd-widget-filters .dd-filter-value .dd-filter-clear { position: absolute; inset-inline-end: 23px; top: 2px; width: 24px; height: 28px; padding: 0; z-index: 1; }
3564
+ .dd-column-filter-trigger { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; margin-inline-start:4px; padding:4px; border:0; border-radius:4px; background:transparent; color:inherit; cursor:pointer; vertical-align:middle; }
3565
+ .dd-column-filter-trigger:hover, .dd-column-filter-trigger[aria-pressed="true"] { color:#0d6b54; background:#dceee7; }
3566
+ .dd-column-dialog { box-sizing:border-box; width:360px; max-width:calc(100vw - 32px); max-height:calc(100vh - 48px); padding:16px; border:1px solid #cbdad5; border-radius:12px; background:#fff; color:#142920; box-shadow:0 16px 48px #0003; font:13px system-ui,sans-serif; }
3567
+ .dd-column-dialog::backdrop { background:#14292040; }
3568
+ .dd-column-dialog header, .dd-column-dialog footer, .dd-column-filter-tools { display:flex; align-items:center; gap:8px; }
3569
+ .dd-column-dialog header { justify-content:space-between; margin-bottom:12px; }
3570
+ .dd-column-dialog header strong { overflow-wrap:anywhere; }
3571
+ .dd-column-dialog > .dd-input { box-sizing:border-box; width:100%; }
3572
+ .dd-column-filter-tools { margin:10px 0; }
3573
+ .dd-column-filter-values { max-height: min(300px, 40vh); overflow:auto; border-block:1px solid #e0e8e4; padding:6px 0; }
3574
+ .dd-column-filter-values label { display:flex; align-items:center; gap:8px; padding:7px 4px; font-weight:400; cursor:pointer; }
3575
+ .dd-column-filter-values label:hover { background:#f1f7f4; }
3576
+ .dd-column-filter-values span { overflow-wrap:anywhere; min-width:0; }
3577
+ .dd-column-dialog footer { justify-content:flex-end; margin-top:12px; flex-wrap:wrap; }
3578
+
3579
+ .dd-table th:has(.dd-column-filter-trigger) .dd-table-sort { display: inline-flex; width: auto; vertical-align: middle; }
3580
+
3581
+ .dd-print-options > label { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; font-weight:600; }
3582
+ .dd-print-options select { width:100%; }
3583
+ @media print { .dd-print-sheet { break-after:page; page-break-after:always; overflow:hidden; } .dd-print-sheet:last-child { break-after:auto; page-break-after:auto; } }
3584
+
3585
+ @media print {
3586
+ .dd-print-snapshot { max-width:100% !important; }
3587
+ .dd-print-widget-row { display:flex; align-items:flex-start; gap:12px; margin-bottom:12px; break-inside:avoid; page-break-inside:avoid; }
3588
+ .dd-print-widget-cell { flex:none; min-width:0; }
3589
+ .dd-print-full-table { display:block !important; width:100% !important; height:auto !important; overflow:visible !important; break-inside:auto !important; }
3590
+ .dd-print-full-table .dd-widget-body, .dd-print-full-table .dd-chart-fill, .dd-print-full-table .dd-table-wrap, .dd-print-full-table dd-chart-renderer { display:block !important; height:auto !important; overflow:visible !important; }
3591
+ .dd-print-full-table table { display:table !important; width:100% !important; table-layout:fixed !important; border-collapse:collapse !important; }
3592
+ .dd-print-full-table thead { display:table-header-group !important; position:static !important; }
3593
+ .dd-print-full-table tbody { display:table-row-group !important; }
3594
+ .dd-print-full-table tr { display:table-row !important; break-inside:avoid; page-break-inside:avoid; }
3595
+ .dd-print-full-table th, .dd-print-full-table td { display:table-cell !important; position:static !important; white-space:normal !important; overflow:visible !important; text-overflow:clip !important; overflow-wrap:anywhere !important; height:auto !important; }
3596
+ .dd-print-full-table .dd-widget-filters, .dd-print-full-table .dd-widget-header-actions, .dd-print-full-table .dd-column-filter-trigger { display:none !important; }
3597
+ }
3598
+
3599
+ .dd-column-dialog.dd-print-options { width:1100px; }
3600
+ .dd-print-options-body { display:grid; grid-template-columns:minmax(0,1fr) 230px; grid-template-areas:"preview controls"; gap:20px; }
3601
+ .dd-print-options-controls { grid-area:controls; }
3602
+ .dd-print-options-controls > label { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; font-weight:600; }
3603
+ .dd-print-preview-panel { grid-area:preview; min-width:0; }
3604
+ .dd-print-preview-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:6px; }
3605
+ .dd-print-preview-heading span { font-size:12px; color:var(--dd-muted); }
3606
+ .dd-print-preview { margin-top:10px; height:55vh; overflow:auto; padding:16px; box-sizing:border-box; background:#e9eeec; border:1px solid #d4ded9; border-radius:8px; }
3607
+ .dd-print-snapshot.dd-print-preview-content { display:block; background:white; box-shadow:0 2px 8px #0002; margin:0 auto; overflow:visible; pointer-events:none; }
3608
+ @media (max-width:700px) { .dd-print-options-body { grid-template-columns:1fr; grid-template-areas:"controls" "preview"; } .dd-print-preview { height:40vh; } }
3609
+
3610
+
3611
+ .dd-print-preview-content .dd-print-widget-row { display:flex; align-items:flex-start; gap:12px; margin-bottom:12px; break-inside:avoid; page-break-inside:avoid; }
3612
+ .dd-print-preview-content .dd-print-widget-cell { flex:none; min-width:0; }
3613
+ .dd-print-preview-content .dd-print-full-table { display:block !important; width:100% !important; height:auto !important; overflow:visible !important; break-inside:auto !important; }
3614
+ .dd-print-preview-content .dd-print-full-table .dd-widget-body, .dd-print-preview-content .dd-print-full-table .dd-chart-fill, .dd-print-preview-content .dd-print-full-table .dd-table-wrap, .dd-print-preview-content .dd-print-full-table dd-chart-renderer { display:block !important; height:auto !important; overflow:visible !important; }
3615
+ .dd-print-preview-content .dd-print-full-table table { display:table !important; width:100% !important; table-layout:fixed !important; border-collapse:collapse !important; }
3616
+ .dd-print-preview-content .dd-print-full-table thead { display:table-header-group !important; position:static !important; }
3617
+ .dd-print-preview-content .dd-print-full-table tbody { display:table-row-group !important; }
3618
+ .dd-print-preview-content .dd-print-full-table tr { display:table-row !important; break-inside:avoid; page-break-inside:avoid; }
3619
+ .dd-print-preview-content .dd-print-full-table th, .dd-print-preview-content .dd-print-full-table td { display:table-cell !important; position:static !important; white-space:normal !important; overflow:visible !important; text-overflow:clip !important; overflow-wrap:anywhere !important; height:auto !important; }
3620
+ .dd-print-preview-content .dd-print-full-table .dd-widget-filters, .dd-print-preview-content .dd-print-full-table .dd-widget-header-actions, .dd-print-preview-content .dd-print-full-table .dd-column-filter-trigger { display:none !important; }
3621
+
3622
+ .dd-loading-status { display:flex; align-items:center; justify-content:center; gap:9px; padding:14px; font-size:13px; color:var(--dd-muted,#52665d); }
3623
+ .dd-loading-spinner { display:inline-block; width:18px; height:18px; flex:0 0 18px; border:2px solid #cfddd6; border-top-color:var(--dd-accent,#0d6b54); border-radius:50%; animation:dd-loading-turn .75s linear infinite; }
3624
+ @keyframes dd-loading-turn { to { transform:rotate(360deg); } }
3625
+ .dd-print-preview[aria-busy="true"] { display:grid; place-items:center; }
3626
+ .dd-print-loading-overlay { position:fixed; inset:0; z-index:2147483647; background:#ffffffe6; color:#243b30; }
3627
+ @media (prefers-reduced-motion:reduce) { .dd-loading-spinner { animation:none; } }
3637
3628
 
3638
3629
 
3639
3630
  /* --- table-empty-overrides.css --- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashboard-designer/ui",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "react-i18next": "^15.4.1",
29
29
  "react-resizable": "^3.0.5",
30
30
  "recharts": "^2.15.1",
31
- "@dashboard-designer/core": "0.2.1"
31
+ "@dashboard-designer/core": "0.2.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/react": "^19.0.10",