@mmlogic/components 0.1.11 → 0.1.14

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.
@@ -26,6 +26,7 @@ const translations = {
26
26
  no: 'Nee',
27
27
  // mrd-table footer
28
28
  table_of: 'van',
29
+ download: 'Downloaden',
29
30
  // mrd-table toolbar
30
31
  table_filter: 'Filteren',
31
32
  table_filter_hide: 'Filter verbergen',
@@ -80,6 +81,7 @@ const translations = {
80
81
  no: 'No',
81
82
  // mrd-table footer
82
83
  table_of: 'of',
84
+ download: 'Download',
83
85
  // mrd-table toolbar
84
86
  table_filter: 'Filter',
85
87
  table_filter_hide: 'Hide filter',
@@ -134,6 +136,7 @@ const translations = {
134
136
  no: 'لا',
135
137
  // mrd-table footer
136
138
  table_of: 'من أصل',
139
+ download: 'تنزيل',
137
140
  // mrd-table toolbar
138
141
  table_filter: 'تصفية',
139
142
  table_filter_hide: 'إخفاء التصفية',
@@ -188,6 +191,7 @@ const translations = {
188
191
  no: 'Non',
189
192
  // mrd-table footer
190
193
  table_of: 'sur',
194
+ download: 'Télécharger',
191
195
  // mrd-table toolbar
192
196
  table_filter: 'Filtrer',
193
197
  table_filter_hide: 'Masquer le filtre',
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-BPj2cBXs.js');
4
- var format = require('./format-DBr-GTvS.js');
4
+ var format = require('./format-BT6-_W7X.js');
5
5
  var index$1 = require('./index.cjs.js');
6
6
 
7
7
  const mrdBooleanFieldScss = () => `.sc-mrd-boolean-field-h{display:block}.mrd-boolean-field.sc-mrd-boolean-field{display:flex;align-items:center;width:100%}.mrd-boolean-field__toggle-label.sc-mrd-boolean-field{display:flex;align-items:center;gap:var(--mrd-space-3);cursor:pointer;user-select:none}.mrd-boolean-field__checkbox.sc-mrd-boolean-field{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:checked+.mrd-boolean-field__toggle.sc-mrd-boolean-field{background-color:var(--mrd-color-primary)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:checked+.mrd-boolean-field__toggle.sc-mrd-boolean-field::after{transform:translateX(20px)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:focus+.mrd-boolean-field__toggle.sc-mrd-boolean-field{box-shadow:var(--mrd-shadow-focus)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:disabled+.mrd-boolean-field__toggle.sc-mrd-boolean-field{opacity:0.5;cursor:not-allowed}.mrd-boolean-field__toggle.sc-mrd-boolean-field{position:relative;display:inline-block;width:44px;height:24px;background-color:var(--mrd-color-neutral-300);border-radius:var(--mrd-border-radius-full);transition:background-color var(--mrd-transition);flex-shrink:0}.mrd-boolean-field__toggle.sc-mrd-boolean-field::after{content:'';position:absolute;top:2px;left:2px;width:20px;height:20px;background-color:var(--mrd-color-white);border-radius:50%;transition:transform var(--mrd-transition);box-shadow:var(--mrd-shadow-sm)}.mrd-boolean-field__text.sc-mrd-boolean-field{font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-color-neutral-800)}.mrd-boolean-field__text--required.sc-mrd-boolean-field::after{content:' *';color:var(--mrd-color-danger)}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index$1 = require('./index-BPj2cBXs.js');
4
- var format = require('./format-DBr-GTvS.js');
4
+ var format = require('./format-BT6-_W7X.js');
5
5
  var index = require('./index.cjs.js');
6
6
 
7
7
  class CellRenderer {
@@ -29,7 +29,7 @@ class CellRenderer {
29
29
  .join(', ');
30
30
  }
31
31
  static renderValue(dataType, value, listItems, locale) {
32
- var _a;
32
+ var _a, _b;
33
33
  switch (dataType) {
34
34
  case 'INTEGER':
35
35
  return format.formatNumber(Number(value), locale, { maximumFractionDigits: 0 });
@@ -53,9 +53,12 @@ class CellRenderer {
53
53
  return format.formatTime(value, locale);
54
54
  case 'BOOLEAN':
55
55
  return value ? '✓' : '';
56
+ case 'FILE':
57
+ case 'IMAGE':
58
+ return typeof value === 'object' && value !== null ? ((_a = value.fileName) !== null && _a !== void 0 ? _a : '') : '';
56
59
  case 'LIST': {
57
60
  const item = listItems.find(li => li.key === String(value));
58
- return (_a = item === null || item === void 0 ? void 0 : item.label) !== null && _a !== void 0 ? _a : String(value);
61
+ return (_b = item === null || item === void 0 ? void 0 : item.label) !== null && _b !== void 0 ? _b : String(value);
59
62
  }
60
63
  case 'TEXTBLOCK':
61
64
  return String(value).replace(/<[^>]*>/g, '').trim();
@@ -65,7 +68,7 @@ class CellRenderer {
65
68
  }
66
69
  }
67
70
 
68
- const mrdTableScss = () => `.sc-mrd-table-h{display:block;width:100%}.mrd-table__scroll.sc-mrd-table{overflow-y:auto;overflow-x:auto;border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);overflow-anchor:none}.mrd-table.sc-mrd-table{overflow-x:auto}.mrd-table__table.sc-mrd-table{width:auto;min-width:100%;border-collapse:collapse;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-900)}.mrd-table__scroll.sc-mrd-table .mrd-table__table.sc-mrd-table{min-width:max-content}.mrd-table__header.sc-mrd-table{position:sticky;top:0;z-index:1;background:var(--mrd-color-white);text-align:left;padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:2px solid var(--mrd-border-color);color:var(--mrd-color-neutral-600);font-weight:var(--mrd-font-weight-medium);white-space:nowrap;font-size:var(--mrd-font-size-xs);text-transform:uppercase;letter-spacing:0.04em}.mrd-table__header--sortable.sc-mrd-table{cursor:pointer;user-select:none}.mrd-table__header--sortable.sc-mrd-table:hover{background:var(--mrd-color-neutral-50);color:var(--mrd-color-neutral-800)}.mrd-table__header--sorted-asc.sc-mrd-table,.mrd-table__header--sorted-desc.sc-mrd-table{color:var(--mrd-color-primary);border-bottom-color:var(--mrd-color-primary)}.mrd-table__header-label.sc-mrd-table{margin-right:var(--mrd-space-1)}.mrd-table__sort-icon.sc-mrd-table{font-size:0.65rem;opacity:0.4;vertical-align:middle}.mrd-table__header--sorted-asc.sc-mrd-table .mrd-table__sort-icon.sc-mrd-table,.mrd-table__header--sorted-desc.sc-mrd-table .mrd-table__sort-icon.sc-mrd-table{opacity:1;color:var(--mrd-color-primary)}.mrd-table__row.sc-mrd-table{border-bottom:1px solid var(--mrd-border-color)}.mrd-table__row.sc-mrd-table:hover{background:var(--mrd-color-neutral-200) !important}.mrd-table__row--clickable.sc-mrd-table{cursor:pointer}.mrd-table__spacer.sc-mrd-table{border:none}.mrd-table__spacer.sc-mrd-table td.sc-mrd-table{padding:0;border:none}.mrd-table__cell.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);vertical-align:top;white-space:nowrap}.mrd-table__cell--numeric.sc-mrd-table{text-align:right;font-variant-numeric:tabular-nums}.mrd-table__row--loading.sc-mrd-table{background:transparent}.mrd-table__cell--placeholder.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__placeholder-bar.sc-mrd-table{display:block;height:0.75rem;width:55%;border-radius:var(--mrd-border-radius-sm);background:linear-gradient( 90deg, var(--mrd-color-neutral-200) 25%, var(--mrd-color-neutral-100) 50%, var(--mrd-color-neutral-200) 75% );background-size:200% 100%;animation:mrd-shimmer 1.4s ease infinite}@keyframes mrd-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}.mrd-table__toolbar.sc-mrd-table{display:flex;align-items:center;justify-content:space-between;padding-bottom:var(--mrd-space-2)}.mrd-table__toolbar-left.sc-mrd-table,.mrd-table__toolbar-right.sc-mrd-table{display:flex;gap:var(--mrd-space-2);align-items:center}.mrd-table__action.sc-mrd-table{position:relative;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;background:transparent;border:1px solid transparent;border-radius:var(--mrd-border-radius);cursor:pointer;color:var(--mrd-color-neutral-400);transition:background-color 0.15s, border-color 0.15s, color 0.15s}.mrd-table__action.sc-mrd-table:hover{background-color:var(--mrd-color-neutral-100);border-color:var(--mrd-color-neutral-300);color:var(--mrd-color-neutral-700)}.mrd-table__action.sc-mrd-table:disabled{opacity:0.4;cursor:not-allowed}.mrd-table__action--primary.sc-mrd-table{color:var(--mrd-color-neutral-500)}.mrd-table__action--primary.sc-mrd-table:hover{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__action--danger.sc-mrd-table{color:var(--mrd-color-error)}.mrd-table__action--danger.sc-mrd-table:hover{background-color:var(--mrd-color-error-light, #fef2f2);border-color:var(--mrd-color-error)}.mrd-table__action-icon.sc-mrd-table{width:1.25rem;height:1.25rem;pointer-events:none;fill:currentColor}.mrd-table__action-tooltip.sc-mrd-table{display:none;position:absolute;bottom:calc(100% + 6px);right:0;padding:var(--mrd-space-1) var(--mrd-space-2);font-size:var(--mrd-font-size-xs);white-space:nowrap;background:var(--mrd-color-tooltip, #fffce1);color:var(--mrd-color-neutral-900);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius-sm, var(--mrd-border-radius));pointer-events:none;z-index:10}.mrd-table__action.sc-mrd-table:hover .mrd-table__action-tooltip.sc-mrd-table{display:block}.mrd-table__filter-toggle--active.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-toggle--active.sc-mrd-table:hover{background:var(--mrd-color-primary-dark, var(--mrd-color-primary));border-color:var(--mrd-color-primary-dark, var(--mrd-color-primary));color:var(--mrd-color-white)}.mrd-table__filter-badge.sc-mrd-table{position:absolute;top:-6px;right:-6px;min-width:1.25rem;height:1.25rem;padding:0 3px;background:var(--mrd-color-error, #e53e3e);color:var(--mrd-color-white);border-radius:9999px;font-size:0.65rem;font-weight:var(--mrd-font-weight-medium);line-height:1.25rem;text-align:center;pointer-events:none}.mrd-table__header--filtered.sc-mrd-table{color:var(--mrd-color-primary);border-bottom-color:var(--mrd-color-primary)}.mrd-table__header-filter-btn.sc-mrd-table{display:inline-flex;align-items:center;justify-content:center;margin-left:var(--mrd-space-1);padding:0 3px;background:transparent;border:none;border-radius:3px;cursor:pointer;color:var(--mrd-color-neutral-500);font-size:0.8rem;line-height:1;vertical-align:middle}.mrd-table__header-filter-btn.sc-mrd-table:hover{background:var(--mrd-color-neutral-200);color:var(--mrd-color-neutral-800)}.mrd-table__header-filter-btn--active.sc-mrd-table{color:var(--mrd-color-primary)}.mrd-table__filter-popup.sc-mrd-table{position:fixed;width:280px;background:var(--mrd-color-white);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);box-shadow:var(--mrd-shadow-md, 0 4px 12px rgba(0,0,0,.12));z-index:var(--mrd-z-dropdown, 200);font-size:var(--mrd-font-size-sm)}.mrd-table__filter-popup-header.sc-mrd-table{display:flex;align-items:center;justify-content:space-between;padding:var(--mrd-space-2) var(--mrd-space-3);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__filter-popup-title.sc-mrd-table{font-weight:var(--mrd-font-weight-medium);color:var(--mrd-color-neutral-800);font-size:var(--mrd-font-size-sm)}.mrd-table__filter-close.sc-mrd-table{background:transparent;border:none;cursor:pointer;color:var(--mrd-color-neutral-500);font-size:0.9rem;padding:2px 4px;border-radius:3px;line-height:1}.mrd-table__filter-close.sc-mrd-table:hover{background:var(--mrd-color-neutral-100);color:var(--mrd-color-neutral-800)}.mrd-table__filter-section.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-3)}.mrd-table__filter-section-label.sc-mrd-table{font-size:var(--mrd-font-size-xs);font-weight:var(--mrd-font-weight-medium);text-transform:uppercase;letter-spacing:0.04em;color:var(--mrd-color-neutral-500);margin-bottom:var(--mrd-space-2)}.mrd-table__filter-sort-buttons.sc-mrd-table{display:flex;gap:var(--mrd-space-2)}.mrd-table__filter-sort-btn.sc-mrd-table{flex:1;padding:var(--mrd-space-1) var(--mrd-space-2);background:transparent;border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);cursor:pointer;font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-700)}.mrd-table__filter-sort-btn.sc-mrd-table:hover{background:var(--mrd-color-neutral-100)}.mrd-table__filter-sort-btn--active.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-divider.sc-mrd-table{height:1px;background:var(--mrd-border-color);margin:0}.mrd-table__filter-editor.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-2)}.mrd-table__filter-select.sc-mrd-table,.mrd-table__filter-input.sc-mrd-table{width:100%;padding:var(--mrd-space-1) var(--mrd-space-2);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-900);background:var(--mrd-color-white);box-sizing:border-box}.mrd-table__filter-select.sc-mrd-table:focus,.mrd-table__filter-input.sc-mrd-table:focus{outline:none;border-color:var(--mrd-color-primary);box-shadow:0 0 0 2px rgba(0,0,0,.06)}.mrd-table__filter-range.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1)}.mrd-table__filter-range.sc-mrd-table .mrd-table__filter-input.sc-mrd-table{flex:1;min-width:0}.mrd-table__filter-range-sep.sc-mrd-table{color:var(--mrd-color-neutral-400);flex-shrink:0}.mrd-table__filter-radio-group.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-1)}.mrd-table__filter-radio-group--inline.sc-mrd-table{flex-direction:row;gap:var(--mrd-space-3)}.mrd-table__filter-radio-label.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1);cursor:pointer;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-table__filter-list.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-1);max-height:180px;overflow-y:auto}.mrd-table__filter-list-controls.sc-mrd-table{display:flex;gap:var(--mrd-space-2);margin-bottom:var(--mrd-space-1)}.mrd-table__filter-list-btn.sc-mrd-table{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-primary);background:transparent;border:none;cursor:pointer;padding:0;text-decoration:underline}.mrd-table__filter-checkbox-label.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1);cursor:pointer;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-table__filter-no-support.sc-mrd-table{font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-500);margin:0;font-style:italic}.mrd-table__filter-popup-footer.sc-mrd-table{display:flex;justify-content:flex-end;gap:var(--mrd-space-2);padding:var(--mrd-space-2) var(--mrd-space-3);border-top:1px solid var(--mrd-border-color)}.mrd-table__filter-btn.sc-mrd-table{padding:var(--mrd-space-1) var(--mrd-space-3);border-radius:var(--mrd-border-radius);border:1px solid var(--mrd-border-color);font-size:var(--mrd-font-size-sm);cursor:pointer}.mrd-table__filter-btn--clear.sc-mrd-table{background:transparent;color:var(--mrd-color-neutral-600)}.mrd-table__filter-btn--clear.sc-mrd-table:hover{background:var(--mrd-color-neutral-100)}.mrd-table__filter-btn--apply.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-btn--apply.sc-mrd-table:hover{background:var(--mrd-color-primary-dark, var(--mrd-color-primary));border-color:var(--mrd-color-primary-dark, var(--mrd-color-primary))}.mrd-table__footer.sc-mrd-table{padding:var(--mrd-space-1) var(--mrd-space-2);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);text-align:right}.mrd-table__empty.sc-mrd-table{padding:var(--mrd-space-4) var(--mrd-space-3);color:var(--mrd-color-neutral-500);font-size:var(--mrd-font-size-sm);text-align:center;margin:0}`;
71
+ const mrdTableScss = () => `.sc-mrd-table-h{display:block;width:100%}.mrd-table__scroll.sc-mrd-table{overflow-y:auto;overflow-x:auto;border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);overflow-anchor:none}.mrd-table.sc-mrd-table{overflow-x:auto}.mrd-table__table.sc-mrd-table{width:auto;min-width:100%;border-collapse:collapse;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-900)}.mrd-table__scroll.sc-mrd-table .mrd-table__table.sc-mrd-table{min-width:max-content}.mrd-table__header.sc-mrd-table{position:sticky;top:0;z-index:1;background:var(--mrd-color-white);text-align:left;padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:2px solid var(--mrd-border-color);color:var(--mrd-color-neutral-600);font-weight:var(--mrd-font-weight-medium);white-space:nowrap;font-size:var(--mrd-font-size-xs);text-transform:uppercase;letter-spacing:0.04em}.mrd-table__header--sortable.sc-mrd-table{cursor:pointer;user-select:none}.mrd-table__header--sortable.sc-mrd-table:hover{background:var(--mrd-color-neutral-50);color:var(--mrd-color-neutral-800)}.mrd-table__header--sorted-asc.sc-mrd-table,.mrd-table__header--sorted-desc.sc-mrd-table{color:var(--mrd-color-primary);border-bottom-color:var(--mrd-color-primary)}.mrd-table__header-label.sc-mrd-table{margin-right:var(--mrd-space-1)}.mrd-table__sort-icon.sc-mrd-table{font-size:0.65rem;opacity:0.4;vertical-align:middle}.mrd-table__header--sorted-asc.sc-mrd-table .mrd-table__sort-icon.sc-mrd-table,.mrd-table__header--sorted-desc.sc-mrd-table .mrd-table__sort-icon.sc-mrd-table{opacity:1;color:var(--mrd-color-primary)}.mrd-table__row.sc-mrd-table{border-bottom:1px solid var(--mrd-border-color)}.mrd-table__row.sc-mrd-table:hover{background:var(--mrd-color-neutral-200) !important}.mrd-table__row--clickable.sc-mrd-table{cursor:pointer}.mrd-table__spacer.sc-mrd-table{border:none}.mrd-table__spacer.sc-mrd-table td.sc-mrd-table{padding:0;border:none}.mrd-table__cell.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);vertical-align:top;white-space:nowrap}.mrd-table__cell--numeric.sc-mrd-table{text-align:right;font-variant-numeric:tabular-nums}.mrd-table__row--loading.sc-mrd-table{background:transparent}.mrd-table__cell--placeholder.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-4);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__placeholder-bar.sc-mrd-table{display:block;height:0.75rem;width:55%;border-radius:var(--mrd-border-radius-sm);background:linear-gradient( 90deg, var(--mrd-color-neutral-200) 25%, var(--mrd-color-neutral-100) 50%, var(--mrd-color-neutral-200) 75% );background-size:200% 100%;animation:mrd-shimmer 1.4s ease infinite}@keyframes mrd-shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}.mrd-table__toolbar.sc-mrd-table{display:flex;align-items:center;justify-content:space-between;padding-bottom:var(--mrd-space-2)}.mrd-table__toolbar-left.sc-mrd-table,.mrd-table__toolbar-right.sc-mrd-table{display:flex;gap:var(--mrd-space-2);align-items:center}.mrd-table__action.sc-mrd-table{position:relative;display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;background:transparent;border:1px solid transparent;border-radius:var(--mrd-border-radius);cursor:pointer;color:var(--mrd-color-neutral-400);transition:background-color 0.15s, border-color 0.15s, color 0.15s}.mrd-table__action.sc-mrd-table:hover{background-color:var(--mrd-color-neutral-100);border-color:var(--mrd-color-neutral-300);color:var(--mrd-color-neutral-700)}.mrd-table__action.sc-mrd-table:disabled{opacity:0.4;cursor:not-allowed}.mrd-table__action--primary.sc-mrd-table{color:var(--mrd-color-neutral-500)}.mrd-table__action--primary.sc-mrd-table:hover{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__action--danger.sc-mrd-table{color:var(--mrd-color-error)}.mrd-table__action--danger.sc-mrd-table:hover{background-color:var(--mrd-color-error-light, #fef2f2);border-color:var(--mrd-color-error)}.mrd-table__action-icon.sc-mrd-table{width:1.25rem;height:1.25rem;pointer-events:none;fill:currentColor}.mrd-table__action-tooltip.sc-mrd-table{display:none;position:absolute;bottom:calc(100% + 6px);right:0;padding:var(--mrd-space-1) var(--mrd-space-2);font-size:var(--mrd-font-size-xs);white-space:nowrap;background:var(--mrd-color-tooltip, #fffce1);color:var(--mrd-color-neutral-900);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius-sm, var(--mrd-border-radius));pointer-events:none;z-index:10}.mrd-table__action.sc-mrd-table:hover .mrd-table__action-tooltip.sc-mrd-table{display:block}.mrd-table__filter-toggle--active.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-toggle--active.sc-mrd-table:hover{background:var(--mrd-color-primary-dark, var(--mrd-color-primary));border-color:var(--mrd-color-primary-dark, var(--mrd-color-primary));color:var(--mrd-color-white)}.mrd-table__filter-badge.sc-mrd-table{position:absolute;top:-6px;right:-6px;min-width:1.25rem;height:1.25rem;padding:0 3px;background:var(--mrd-color-error, #e53e3e);color:var(--mrd-color-white);border-radius:9999px;font-size:0.65rem;font-weight:var(--mrd-font-weight-medium);line-height:1.25rem;text-align:center;pointer-events:none}.mrd-table__header--filtered.sc-mrd-table{color:var(--mrd-color-primary);border-bottom-color:var(--mrd-color-primary)}.mrd-table__header-filter-btn.sc-mrd-table{display:inline-flex;align-items:center;justify-content:center;margin-left:var(--mrd-space-1);padding:0 3px;background:transparent;border:none;border-radius:3px;cursor:pointer;color:var(--mrd-color-neutral-500);font-size:0.8rem;line-height:1;vertical-align:middle}.mrd-table__header-filter-btn.sc-mrd-table:hover{background:var(--mrd-color-neutral-200);color:var(--mrd-color-neutral-800)}.mrd-table__header-filter-btn--active.sc-mrd-table{color:var(--mrd-color-primary)}.mrd-table__filter-popup.sc-mrd-table{position:fixed;width:280px;background:var(--mrd-color-white);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);box-shadow:var(--mrd-shadow-md, 0 4px 12px rgba(0,0,0,.12));z-index:var(--mrd-z-dropdown, 200);font-size:var(--mrd-font-size-sm)}.mrd-table__filter-popup-header.sc-mrd-table{display:flex;align-items:center;justify-content:space-between;padding:var(--mrd-space-2) var(--mrd-space-3);border-bottom:1px solid var(--mrd-border-color)}.mrd-table__filter-popup-title.sc-mrd-table{font-weight:var(--mrd-font-weight-medium);color:var(--mrd-color-neutral-800);font-size:var(--mrd-font-size-sm)}.mrd-table__filter-close.sc-mrd-table{background:transparent;border:none;cursor:pointer;color:var(--mrd-color-neutral-500);font-size:0.9rem;padding:2px 4px;border-radius:3px;line-height:1}.mrd-table__filter-close.sc-mrd-table:hover{background:var(--mrd-color-neutral-100);color:var(--mrd-color-neutral-800)}.mrd-table__filter-section.sc-mrd-table{padding:var(--mrd-space-2) var(--mrd-space-3)}.mrd-table__filter-section-label.sc-mrd-table{font-size:var(--mrd-font-size-xs);font-weight:var(--mrd-font-weight-medium);text-transform:uppercase;letter-spacing:0.04em;color:var(--mrd-color-neutral-500);margin-bottom:var(--mrd-space-2)}.mrd-table__filter-sort-buttons.sc-mrd-table{display:flex;gap:var(--mrd-space-2)}.mrd-table__filter-sort-btn.sc-mrd-table{flex:1;padding:var(--mrd-space-1) var(--mrd-space-2);background:transparent;border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);cursor:pointer;font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-700)}.mrd-table__filter-sort-btn.sc-mrd-table:hover{background:var(--mrd-color-neutral-100)}.mrd-table__filter-sort-btn--active.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-divider.sc-mrd-table{height:1px;background:var(--mrd-border-color);margin:0}.mrd-table__filter-editor.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-2)}.mrd-table__filter-select.sc-mrd-table,.mrd-table__filter-input.sc-mrd-table{width:100%;padding:var(--mrd-space-1) var(--mrd-space-2);border:1px solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-900);background:var(--mrd-color-white);box-sizing:border-box}.mrd-table__filter-select.sc-mrd-table:focus,.mrd-table__filter-input.sc-mrd-table:focus{outline:none;border-color:var(--mrd-color-primary);box-shadow:0 0 0 2px rgba(0,0,0,.06)}.mrd-table__filter-range.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1)}.mrd-table__filter-range.sc-mrd-table .mrd-table__filter-input.sc-mrd-table{flex:1;min-width:0}.mrd-table__filter-range-sep.sc-mrd-table{color:var(--mrd-color-neutral-400);flex-shrink:0}.mrd-table__filter-radio-group.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-1)}.mrd-table__filter-radio-group--inline.sc-mrd-table{flex-direction:row;gap:var(--mrd-space-3)}.mrd-table__filter-radio-label.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1);cursor:pointer;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-table__filter-list.sc-mrd-table{display:flex;flex-direction:column;gap:var(--mrd-space-1);max-height:180px;overflow-y:auto}.mrd-table__filter-list-controls.sc-mrd-table{display:flex;gap:var(--mrd-space-2);margin-bottom:var(--mrd-space-1)}.mrd-table__filter-list-btn.sc-mrd-table{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-primary);background:transparent;border:none;cursor:pointer;padding:0;text-decoration:underline}.mrd-table__filter-checkbox-label.sc-mrd-table{display:flex;align-items:center;gap:var(--mrd-space-1);cursor:pointer;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-table__filter-no-support.sc-mrd-table{font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-500);margin:0;font-style:italic}.mrd-table__filter-popup-footer.sc-mrd-table{display:flex;justify-content:flex-end;gap:var(--mrd-space-2);padding:var(--mrd-space-2) var(--mrd-space-3);border-top:1px solid var(--mrd-border-color)}.mrd-table__filter-btn.sc-mrd-table{padding:var(--mrd-space-1) var(--mrd-space-3);border-radius:var(--mrd-border-radius);border:1px solid var(--mrd-border-color);font-size:var(--mrd-font-size-sm);cursor:pointer}.mrd-table__filter-btn--clear.sc-mrd-table{background:transparent;color:var(--mrd-color-neutral-600)}.mrd-table__filter-btn--clear.sc-mrd-table:hover{background:var(--mrd-color-neutral-100)}.mrd-table__filter-btn--apply.sc-mrd-table{background:var(--mrd-color-primary);border-color:var(--mrd-color-primary);color:var(--mrd-color-white)}.mrd-table__filter-btn--apply.sc-mrd-table:hover{background:var(--mrd-color-primary-dark, var(--mrd-color-primary));border-color:var(--mrd-color-primary-dark, var(--mrd-color-primary))}.mrd-table__footer.sc-mrd-table{padding:var(--mrd-space-1) var(--mrd-space-2);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);text-align:right}.mrd-table__empty.sc-mrd-table{padding:var(--mrd-space-4) var(--mrd-space-3);color:var(--mrd-color-neutral-500);font-size:var(--mrd-font-size-sm);text-align:center;margin:0}.mrd-table__file-btn.sc-mrd-table{display:inline-flex;align-items:center;gap:var(--mrd-space-1);background:none;border:none;padding:0;cursor:pointer;color:var(--mrd-color-primary);font-size:var(--mrd-font-size-sm);font-family:inherit;max-width:100%;overflow:hidden}.mrd-table__file-btn.sc-mrd-table:hover{text-decoration:underline;color:var(--mrd-color-primary-dark)}.mrd-table__file-icon.sc-mrd-table{flex-shrink:0;width:1rem;height:1rem}`;
69
72
 
70
73
  const BUFFER = 10;
71
74
  /** Wacht deze tijd (ms) na het laatste scroll-event voordat pagina's worden
@@ -84,6 +87,7 @@ const MrdTable = class {
84
87
  this.mrdRowClick = index$1.createEvent(this, "mrdRowClick");
85
88
  this.mrdAction = index$1.createEvent(this, "mrdAction");
86
89
  this.mrdFilter = index$1.createEvent(this, "mrdFilter");
90
+ this.mrdDownload = index$1.createEvent(this, "mrdDownload");
87
91
  // ── Non-state internals ────────────────────────────────────────────────────
88
92
  this.pendingPages = new Set();
89
93
  this.debounceTimer = null;
@@ -341,7 +345,12 @@ const MrdTable = class {
341
345
  const name = this.colName(col);
342
346
  const dataType = this.colDataType(col);
343
347
  const existing = this.activeFilters.get(name);
344
- this.pendingFilter = existing ? Object.assign({}, existing) : { field: name, dataType };
348
+ // Set the default operator explicitly so it is present in the ColumnFilter
349
+ // even when the user never touches the operator dropdown.
350
+ const defaultOperator = (TEXT_TYPES.has(dataType) || dataType === 'RELATION')
351
+ ? 'startsWith'
352
+ : undefined;
353
+ this.pendingFilter = existing ? Object.assign({}, existing) : { field: name, dataType, operator: defaultOperator };
345
354
  this.openFilterCol = name;
346
355
  // Close on outside click — re-register to replace any stale handler
347
356
  if (this.outsideClickHandler)
@@ -513,12 +522,31 @@ const MrdTable = class {
513
522
  const to = Math.min(Math.ceil((this.scrollTop + this.tableHeight) / this.rowHeight), displayTotal);
514
523
  return (index$1.h("div", { class: "mrd-table__footer" }, from, "\u2013", to, " ", format.t('table_of', this.locale), " ", displayTotal));
515
524
  }
525
+ // ── Render: cell ──────────────────────────────────────────────────────────
526
+ renderCell(col, row) {
527
+ var _a, _b, _c, _d;
528
+ const numericTypes = new Set(['INTEGER', 'DECIMAL', 'PERCENTAGE', 'CURRENCY']);
529
+ const dataType = (_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : '';
530
+ const isNumeric = col.type === 'FIELD' && numericTypes.has(dataType);
531
+ const isFile = col.type === 'FIELD' && (dataType === 'FILE' || dataType === 'IMAGE');
532
+ if (isFile) {
533
+ const name = (_d = (_c = col.field) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : '';
534
+ const fileVal = row === null || row === void 0 ? void 0 : row[name];
535
+ const href = fileVal === null || fileVal === void 0 ? void 0 : fileVal.href;
536
+ const fileName = fileVal === null || fileVal === void 0 ? void 0 : fileVal.fileName;
537
+ return (index$1.h("td", { class: "mrd-table__cell" }, href && fileName ? (index$1.h("button", { class: "mrd-table__file-btn", title: fileName, onClick: (e) => {
538
+ e.stopPropagation();
539
+ this.mrdDownload.emit({ href, fileName });
540
+ } }, index$1.h("svg", { class: "mrd-table__file-icon", viewBox: "0 0 24 24", "aria-hidden": "true" }, index$1.h("path", { fill: "currentColor", d: "M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zm-3 8l-3-3 1.41-1.41L10 14.17l4.59-4.58L16 11l-6 6z" })), format.t('download', this.locale))) : ''));
541
+ }
542
+ const value = CellRenderer.render(col, row, this.locale);
543
+ return (index$1.h("td", { class: `mrd-table__cell${isNumeric ? ' mrd-table__cell--numeric' : ''}` }, value));
544
+ }
516
545
  // ── Render ─────────────────────────────────────────────────────────────────
517
546
  render() {
518
547
  var _a, _b, _c;
519
548
  if (!((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length))
520
549
  return null;
521
- const numericTypes = new Set(['INTEGER', 'DECIMAL', 'PERCENTAGE', 'CURRENCY']);
522
550
  // ── Non-paginated mode ──────────────────────────────────────────────────
523
551
  if (this.totalElements === 0) {
524
552
  return (index$1.h(index$1.Host, null, this.renderToolbar(), index$1.h("div", { class: "mrd-table" }, index$1.h("table", { class: "mrd-table__table" }, index$1.h("thead", null, index$1.h("tr", null, this.columns.map(col => {
@@ -526,12 +554,7 @@ const MrdTable = class {
526
554
  const name = this.colName(col);
527
555
  const isFiltered = this.activeFilters.has(name);
528
556
  return (index$1.h("th", { class: `mrd-table__header${isFiltered ? ' mrd-table__header--filtered' : ''}` }, index$1.h("span", { class: "mrd-table__header-label" }, (_d = (_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : (_c = col.relation) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : ''), this.filterMode && (index$1.h("button", { class: `mrd-table__header-filter-btn${isFiltered ? ' mrd-table__header-filter-btn--active' : ''}`, onClick: (e) => this.handleFilterOpen(col, e) }, "\u25BE"))));
529
- }))), index$1.h("tbody", null, (_b = this.rows) === null || _b === void 0 ? void 0 : _b.map((row, i) => (index$1.h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit(row) }, this.columns.map(col => {
530
- var _a, _b;
531
- const value = CellRenderer.render(col, row, this.locale);
532
- const isNumeric = col.type === 'FIELD' && numericTypes.has((_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : '');
533
- return (index$1.h("td", { class: `mrd-table__cell${isNumeric ? ' mrd-table__cell--numeric' : ''}` }, value));
534
- })))))), (!this.rows || this.rows.length === 0) && (index$1.h("p", { class: "mrd-table__empty" }, format.t('no_results', this.locale)))), this.renderFooter((_c = this.rows) === null || _c === void 0 ? void 0 : _c.length), this.renderFilterPopup()));
557
+ }))), index$1.h("tbody", null, (_b = this.rows) === null || _b === void 0 ? void 0 : _b.map((row, i) => (index$1.h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit(row) }, this.columns.map(col => this.renderCell(col, row))))))), (!this.rows || this.rows.length === 0) && (index$1.h("p", { class: "mrd-table__empty" }, format.t('no_results', this.locale)))), this.renderFooter((_c = this.rows) === null || _c === void 0 ? void 0 : _c.length), this.renderFilterPopup()));
535
558
  }
536
559
  // ── Paginated / virtual-scroll mode ────────────────────────────────────
537
560
  // Derive the authoritative row count from loaded pages:
@@ -559,12 +582,7 @@ const MrdTable = class {
559
582
  renderedRows.push(index$1.h("tr", { class: "mrd-table__row mrd-table__row--loading" }, index$1.h("td", { class: "mrd-table__cell--placeholder", colSpan: colCount }, index$1.h("span", { class: "mrd-table__placeholder-bar" }))));
560
583
  }
561
584
  else {
562
- renderedRows.push(index$1.h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit(row) }, this.columns.map(col => {
563
- var _a, _b;
564
- const value = CellRenderer.render(col, row, this.locale);
565
- const isNumeric = col.type === 'FIELD' && numericTypes.has((_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : '');
566
- return (index$1.h("td", { class: `mrd-table__cell${isNumeric ? ' mrd-table__cell--numeric' : ''}` }, value));
567
- })));
585
+ renderedRows.push(index$1.h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit(row) }, this.columns.map(col => this.renderCell(col, row))));
568
586
  }
569
587
  }
570
588
  return (index$1.h(index$1.Host, null, this.renderToolbar(), index$1.h("div", { class: "mrd-table__scroll", style: { height: `${this.tableHeight}px` }, onScroll: this.handleScroll }, index$1.h("table", { class: "mrd-table__table", style: tableStyle }, index$1.h("thead", null, index$1.h("tr", null, this.columns.map((col, idx) => {
@@ -270,7 +270,12 @@ export class MrdTable {
270
270
  const name = this.colName(col);
271
271
  const dataType = this.colDataType(col);
272
272
  const existing = this.activeFilters.get(name);
273
- this.pendingFilter = existing ? Object.assign({}, existing) : { field: name, dataType };
273
+ // Set the default operator explicitly so it is present in the ColumnFilter
274
+ // even when the user never touches the operator dropdown.
275
+ const defaultOperator = (TEXT_TYPES.has(dataType) || dataType === 'RELATION')
276
+ ? 'startsWith'
277
+ : undefined;
278
+ this.pendingFilter = existing ? Object.assign({}, existing) : { field: name, dataType, operator: defaultOperator };
274
279
  this.openFilterCol = name;
275
280
  // Close on outside click — re-register to replace any stale handler
276
281
  if (this.outsideClickHandler)
@@ -442,12 +447,31 @@ export class MrdTable {
442
447
  const to = Math.min(Math.ceil((this.scrollTop + this.tableHeight) / this.rowHeight), displayTotal);
443
448
  return (h("div", { class: "mrd-table__footer" }, from, "\u2013", to, " ", t('table_of', this.locale), " ", displayTotal));
444
449
  }
450
+ // ── Render: cell ──────────────────────────────────────────────────────────
451
+ renderCell(col, row) {
452
+ var _a, _b, _c, _d;
453
+ const numericTypes = new Set(['INTEGER', 'DECIMAL', 'PERCENTAGE', 'CURRENCY']);
454
+ const dataType = (_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : '';
455
+ const isNumeric = col.type === 'FIELD' && numericTypes.has(dataType);
456
+ const isFile = col.type === 'FIELD' && (dataType === 'FILE' || dataType === 'IMAGE');
457
+ if (isFile) {
458
+ const name = (_d = (_c = col.field) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : '';
459
+ const fileVal = row === null || row === void 0 ? void 0 : row[name];
460
+ const href = fileVal === null || fileVal === void 0 ? void 0 : fileVal.href;
461
+ const fileName = fileVal === null || fileVal === void 0 ? void 0 : fileVal.fileName;
462
+ return (h("td", { class: "mrd-table__cell" }, href && fileName ? (h("button", { class: "mrd-table__file-btn", title: fileName, onClick: (e) => {
463
+ e.stopPropagation();
464
+ this.mrdDownload.emit({ href, fileName });
465
+ } }, h("svg", { class: "mrd-table__file-icon", viewBox: "0 0 24 24", "aria-hidden": "true" }, h("path", { fill: "currentColor", d: "M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zm-3 8l-3-3 1.41-1.41L10 14.17l4.59-4.58L16 11l-6 6z" })), t('download', this.locale))) : ''));
466
+ }
467
+ const value = CellRenderer.render(col, row, this.locale);
468
+ return (h("td", { class: `mrd-table__cell${isNumeric ? ' mrd-table__cell--numeric' : ''}` }, value));
469
+ }
445
470
  // ── Render ─────────────────────────────────────────────────────────────────
446
471
  render() {
447
472
  var _a, _b, _c;
448
473
  if (!((_a = this.columns) === null || _a === void 0 ? void 0 : _a.length))
449
474
  return null;
450
- const numericTypes = new Set(['INTEGER', 'DECIMAL', 'PERCENTAGE', 'CURRENCY']);
451
475
  // ── Non-paginated mode ──────────────────────────────────────────────────
452
476
  if (this.totalElements === 0) {
453
477
  return (h(Host, null, this.renderToolbar(), h("div", { class: "mrd-table" }, h("table", { class: "mrd-table__table" }, h("thead", null, h("tr", null, this.columns.map(col => {
@@ -455,12 +479,7 @@ export class MrdTable {
455
479
  const name = this.colName(col);
456
480
  const isFiltered = this.activeFilters.has(name);
457
481
  return (h("th", { class: `mrd-table__header${isFiltered ? ' mrd-table__header--filtered' : ''}` }, h("span", { class: "mrd-table__header-label" }, (_d = (_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : (_c = col.relation) === null || _c === void 0 ? void 0 : _c.label) !== null && _d !== void 0 ? _d : ''), this.filterMode && (h("button", { class: `mrd-table__header-filter-btn${isFiltered ? ' mrd-table__header-filter-btn--active' : ''}`, onClick: (e) => this.handleFilterOpen(col, e) }, "\u25BE"))));
458
- }))), h("tbody", null, (_b = this.rows) === null || _b === void 0 ? void 0 : _b.map((row, i) => (h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit(row) }, this.columns.map(col => {
459
- var _a, _b;
460
- const value = CellRenderer.render(col, row, this.locale);
461
- const isNumeric = col.type === 'FIELD' && numericTypes.has((_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : '');
462
- return (h("td", { class: `mrd-table__cell${isNumeric ? ' mrd-table__cell--numeric' : ''}` }, value));
463
- })))))), (!this.rows || this.rows.length === 0) && (h("p", { class: "mrd-table__empty" }, t('no_results', this.locale)))), this.renderFooter((_c = this.rows) === null || _c === void 0 ? void 0 : _c.length), this.renderFilterPopup()));
482
+ }))), h("tbody", null, (_b = this.rows) === null || _b === void 0 ? void 0 : _b.map((row, i) => (h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit(row) }, this.columns.map(col => this.renderCell(col, row))))))), (!this.rows || this.rows.length === 0) && (h("p", { class: "mrd-table__empty" }, t('no_results', this.locale)))), this.renderFooter((_c = this.rows) === null || _c === void 0 ? void 0 : _c.length), this.renderFilterPopup()));
464
483
  }
465
484
  // ── Paginated / virtual-scroll mode ────────────────────────────────────
466
485
  // Derive the authoritative row count from loaded pages:
@@ -488,12 +507,7 @@ export class MrdTable {
488
507
  renderedRows.push(h("tr", { class: "mrd-table__row mrd-table__row--loading" }, h("td", { class: "mrd-table__cell--placeholder", colSpan: colCount }, h("span", { class: "mrd-table__placeholder-bar" }))));
489
508
  }
490
509
  else {
491
- renderedRows.push(h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit(row) }, this.columns.map(col => {
492
- var _a, _b;
493
- const value = CellRenderer.render(col, row, this.locale);
494
- const isNumeric = col.type === 'FIELD' && numericTypes.has((_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : '');
495
- return (h("td", { class: `mrd-table__cell${isNumeric ? ' mrd-table__cell--numeric' : ''}` }, value));
496
- })));
510
+ renderedRows.push(h("tr", { class: "mrd-table__row mrd-table__row--clickable", style: { background: i % 2 === 0 ? '' : 'var(--mrd-color-neutral-100)' }, onClick: () => this.mrdRowClick.emit(row) }, this.columns.map(col => this.renderCell(col, row))));
497
511
  }
498
512
  }
499
513
  return (h(Host, null, this.renderToolbar(), h("div", { class: "mrd-table__scroll", style: { height: `${this.tableHeight}px` }, onScroll: this.handleScroll }, h("table", { class: "mrd-table__table", style: tableStyle }, h("thead", null, h("tr", null, this.columns.map((col, idx) => {
@@ -809,6 +823,21 @@ export class MrdTable {
809
823
  }
810
824
  }
811
825
  }
826
+ }, {
827
+ "method": "mrdDownload",
828
+ "name": "mrdDownload",
829
+ "bubbles": true,
830
+ "cancelable": true,
831
+ "composed": true,
832
+ "docs": {
833
+ "tags": [],
834
+ "text": "Fired when a FILE or IMAGE cell is clicked. Host resolves the href to a signed download URL."
835
+ },
836
+ "complexType": {
837
+ "original": "{ href: string; fileName: string }",
838
+ "resolved": "{ href: string; fileName: string; }",
839
+ "references": {}
840
+ }
812
841
  }];
813
842
  }
814
843
  static get methods() {
@@ -548,3 +548,31 @@
548
548
  text-align: center;
549
549
  margin: 0;
550
550
  }
551
+
552
+ /* ── File / image download cell ─────────────────────────────────────────── */
553
+ .mrd-table__file-btn {
554
+ display: inline-flex;
555
+ align-items: center;
556
+ gap: var(--mrd-space-1);
557
+ background: none;
558
+ border: none;
559
+ padding: 0;
560
+ cursor: pointer;
561
+ color: var(--mrd-color-primary);
562
+ font-size: var(--mrd-font-size-sm);
563
+ font-family: inherit;
564
+ max-width: 100%;
565
+ overflow: hidden;
566
+ }
567
+
568
+ .mrd-table__file-btn:hover {
569
+ text-decoration: underline;
570
+ color: var(--mrd-color-primary-dark);
571
+ }
572
+
573
+ .mrd-table__file-icon {
574
+ flex-shrink: 0;
575
+ width: 1rem;
576
+ height: 1rem;
577
+ }
578
+
@@ -25,7 +25,7 @@ export class CellRenderer {
25
25
  .join(', ');
26
26
  }
27
27
  static renderValue(dataType, value, listItems, locale) {
28
- var _a;
28
+ var _a, _b;
29
29
  switch (dataType) {
30
30
  case 'INTEGER':
31
31
  return formatNumber(Number(value), locale, { maximumFractionDigits: 0 });
@@ -49,9 +49,12 @@ export class CellRenderer {
49
49
  return formatTime(value, locale);
50
50
  case 'BOOLEAN':
51
51
  return value ? '✓' : '';
52
+ case 'FILE':
53
+ case 'IMAGE':
54
+ return typeof value === 'object' && value !== null ? ((_a = value.fileName) !== null && _a !== void 0 ? _a : '') : '';
52
55
  case 'LIST': {
53
56
  const item = listItems.find(li => li.key === String(value));
54
- return (_a = item === null || item === void 0 ? void 0 : item.label) !== null && _a !== void 0 ? _a : String(value);
57
+ return (_b = item === null || item === void 0 ? void 0 : item.label) !== null && _b !== void 0 ? _b : String(value);
55
58
  }
56
59
  case 'TEXTBLOCK':
57
60
  return String(value).replace(/<[^>]*>/g, '').trim();
@@ -24,6 +24,7 @@ const translations = {
24
24
  no: 'Nee',
25
25
  // mrd-table footer
26
26
  table_of: 'van',
27
+ download: 'Downloaden',
27
28
  // mrd-table toolbar
28
29
  table_filter: 'Filteren',
29
30
  table_filter_hide: 'Filter verbergen',
@@ -78,6 +79,7 @@ const translations = {
78
79
  no: 'No',
79
80
  // mrd-table footer
80
81
  table_of: 'of',
82
+ download: 'Download',
81
83
  // mrd-table toolbar
82
84
  table_filter: 'Filter',
83
85
  table_filter_hide: 'Hide filter',
@@ -132,6 +134,7 @@ const translations = {
132
134
  no: 'لا',
133
135
  // mrd-table footer
134
136
  table_of: 'من أصل',
137
+ download: 'تنزيل',
135
138
  // mrd-table toolbar
136
139
  table_filter: 'تصفية',
137
140
  table_filter_hide: 'إخفاء التصفية',
@@ -186,6 +189,7 @@ const translations = {
186
189
  no: 'Non',
187
190
  // mrd-table footer
188
191
  table_of: 'sur',
192
+ download: 'Télécharger',
189
193
  // mrd-table toolbar
190
194
  table_filter: 'Filtrer',
191
195
  table_filter_hide: 'Masquer le filtre',
@@ -1 +1 @@
1
- const e={nl:{required:"Dit veld is verplicht",select_placeholder:"Selecteer een optie",search_placeholder:"Zoeken...",upload_file:"Bestand uploaden",choose_file:"Bestand kiezen",clear:"Wissen",today:"Vandaag",invalid_email:"Voer een geldig e-mailadres in",invalid_url:"Voer een geldige URL in",invalid_number:"Voer een geldig getal in",drop_file_here:"Sleep bestand hierheen of",browse:"bladeren",file_too_large:"Bestand is te groot",search_results:"Zoekresultaten",no_results:"Geen resultaten gevonden",loading:"Laden...",submit:"Opslaan",cancel:"Annuleren",remove:"Verwijderen",add:"Toevoegen",yes:"Ja",no:"Nee",table_of:"van",table_filter:"Filteren",table_filter_hide:"Filter verbergen",table_filter_active:"actief",table_filter_clear_all:"Alle filters wissen",table_new_record:"Nieuw record",table_export_excel:"Exporteer naar Excel",filter_sorting:"Sortering",filter_ascending:"Oplopend",filter_descending:"Aflopend",filter_section:"Filter",filter_apply:"Toepassen",filter_clear:"Wissen",filter_contains:"Bevat",filter_starts_with:"Begint met",filter_equals:"Gelijk aan",filter_is_empty:"Is leeg",filter_is_not_empty:"Is niet leeg",filter_exact:"Exact",filter_range:"Bereik",filter_from:"Van",filter_to:"Tot",filter_all:"Alle",filter_select_all:"Alles",filter_select_none:"Geen",filter_search_value:"Zoekwaarde...",filter_no_support:"Geen filtering beschikbaar voor dit veldtype."},en:{required:"This field is required",select_placeholder:"Select an option",search_placeholder:"Search...",upload_file:"Upload file",choose_file:"Choose file",clear:"Clear",today:"Today",invalid_email:"Please enter a valid email address",invalid_url:"Please enter a valid URL",invalid_number:"Please enter a valid number",drop_file_here:"Drop file here or",browse:"browse",file_too_large:"File is too large",search_results:"Search results",no_results:"No results found",loading:"Loading...",submit:"Save",cancel:"Cancel",remove:"Remove",add:"Add",yes:"Yes",no:"No",table_of:"of",table_filter:"Filter",table_filter_hide:"Hide filter",table_filter_active:"active",table_filter_clear_all:"Clear all filters",table_new_record:"New record",table_export_excel:"Export to Excel",filter_sorting:"Sorting",filter_ascending:"Ascending",filter_descending:"Descending",filter_section:"Filter",filter_apply:"Apply",filter_clear:"Clear",filter_contains:"Contains",filter_starts_with:"Starts with",filter_equals:"Equals",filter_is_empty:"Is empty",filter_is_not_empty:"Is not empty",filter_exact:"Exact",filter_range:"Range",filter_from:"From",filter_to:"To",filter_all:"All",filter_select_all:"All",filter_select_none:"None",filter_search_value:"Search value...",filter_no_support:"Filtering is not available for this field type."},ar:{required:"هذا الحقل مطلوب",select_placeholder:"اختر خياراً",search_placeholder:"بحث...",upload_file:"رفع ملف",choose_file:"اختر ملفاً",clear:"مسح",today:"اليوم",invalid_email:"يرجى إدخال عنوان بريد إلكتروني صحيح",invalid_url:"يرجى إدخال رابط صحيح",invalid_number:"يرجى إدخال رقم صحيح",drop_file_here:"اسحب الملف هنا أو",browse:"تصفح",file_too_large:"الملف كبير جداً",search_results:"نتائج البحث",no_results:"لم يتم العثور على نتائج",loading:"جار التحميل...",submit:"حفظ",cancel:"إلغاء",remove:"إزالة",add:"إضافة",yes:"نعم",no:"لا",table_of:"من أصل",table_filter:"تصفية",table_filter_hide:"إخفاء التصفية",table_filter_active:"نشط",table_filter_clear_all:"مسح جميع الفلاتر",table_new_record:"سجل جديد",table_export_excel:"تصدير إلى Excel",filter_sorting:"الترتيب",filter_ascending:"تصاعدي",filter_descending:"تنازلي",filter_section:"تصفية",filter_apply:"تطبيق",filter_clear:"مسح",filter_contains:"يحتوي على",filter_starts_with:"يبدأ بـ",filter_equals:"يساوي",filter_is_empty:"فارغ",filter_is_not_empty:"ليس فارغاً",filter_exact:"دقيق",filter_range:"نطاق",filter_from:"من",filter_to:"إلى",filter_all:"الكل",filter_select_all:"الكل",filter_select_none:"لا شيء",filter_search_value:"قيمة البحث...",filter_no_support:"التصفية غير متاحة لهذا النوع من الحقول."},fr:{required:"Ce champ est obligatoire",select_placeholder:"Sélectionner une option",search_placeholder:"Rechercher...",upload_file:"Télécharger un fichier",choose_file:"Choisir un fichier",clear:"Effacer",today:"Aujourd'hui",invalid_email:"Veuillez saisir une adresse e-mail valide",invalid_url:"Veuillez saisir une URL valide",invalid_number:"Veuillez saisir un nombre valide",drop_file_here:"Déposez le fichier ici ou",browse:"parcourir",file_too_large:"Le fichier est trop volumineux",search_results:"Résultats de recherche",no_results:"Aucun résultat trouvé",loading:"Chargement...",submit:"Enregistrer",cancel:"Annuler",remove:"Supprimer",add:"Ajouter",yes:"Oui",no:"Non",table_of:"sur",table_filter:"Filtrer",table_filter_hide:"Masquer le filtre",table_filter_active:"actif",table_filter_clear_all:"Effacer tous les filtres",table_new_record:"Nouvel enregistrement",table_export_excel:"Exporter vers Excel",filter_sorting:"Tri",filter_ascending:"Croissant",filter_descending:"Décroissant",filter_section:"Filtre",filter_apply:"Appliquer",filter_clear:"Effacer",filter_contains:"Contient",filter_starts_with:"Commence par",filter_equals:"Égal à",filter_is_empty:"Est vide",filter_is_not_empty:"N'est pas vide",filter_exact:"Exact",filter_range:"Plage",filter_from:"De",filter_to:"À",filter_all:"Tous",filter_select_all:"Tous",filter_select_none:"Aucun",filter_search_value:"Valeur de recherche...",filter_no_support:"Le filtrage n'est pas disponible pour ce type de champ."}};function l(l,r){var i,t,a;const _=r.split("-")[0].toLowerCase();return null!==(a=null!==(t=(null!==(i=e[_])&&void 0!==i?i:e.en)[l])&&void 0!==t?t:e.en[l])&&void 0!==a?a:l}export{l as t}
1
+ const e={nl:{required:"Dit veld is verplicht",select_placeholder:"Selecteer een optie",search_placeholder:"Zoeken...",upload_file:"Bestand uploaden",choose_file:"Bestand kiezen",clear:"Wissen",today:"Vandaag",invalid_email:"Voer een geldig e-mailadres in",invalid_url:"Voer een geldige URL in",invalid_number:"Voer een geldig getal in",drop_file_here:"Sleep bestand hierheen of",browse:"bladeren",file_too_large:"Bestand is te groot",search_results:"Zoekresultaten",no_results:"Geen resultaten gevonden",loading:"Laden...",submit:"Opslaan",cancel:"Annuleren",remove:"Verwijderen",add:"Toevoegen",yes:"Ja",no:"Nee",table_of:"van",download:"Downloaden",table_filter:"Filteren",table_filter_hide:"Filter verbergen",table_filter_active:"actief",table_filter_clear_all:"Alle filters wissen",table_new_record:"Nieuw record",table_export_excel:"Exporteer naar Excel",filter_sorting:"Sortering",filter_ascending:"Oplopend",filter_descending:"Aflopend",filter_section:"Filter",filter_apply:"Toepassen",filter_clear:"Wissen",filter_contains:"Bevat",filter_starts_with:"Begint met",filter_equals:"Gelijk aan",filter_is_empty:"Is leeg",filter_is_not_empty:"Is niet leeg",filter_exact:"Exact",filter_range:"Bereik",filter_from:"Van",filter_to:"Tot",filter_all:"Alle",filter_select_all:"Alles",filter_select_none:"Geen",filter_search_value:"Zoekwaarde...",filter_no_support:"Geen filtering beschikbaar voor dit veldtype."},en:{required:"This field is required",select_placeholder:"Select an option",search_placeholder:"Search...",upload_file:"Upload file",choose_file:"Choose file",clear:"Clear",today:"Today",invalid_email:"Please enter a valid email address",invalid_url:"Please enter a valid URL",invalid_number:"Please enter a valid number",drop_file_here:"Drop file here or",browse:"browse",file_too_large:"File is too large",search_results:"Search results",no_results:"No results found",loading:"Loading...",submit:"Save",cancel:"Cancel",remove:"Remove",add:"Add",yes:"Yes",no:"No",table_of:"of",download:"Download",table_filter:"Filter",table_filter_hide:"Hide filter",table_filter_active:"active",table_filter_clear_all:"Clear all filters",table_new_record:"New record",table_export_excel:"Export to Excel",filter_sorting:"Sorting",filter_ascending:"Ascending",filter_descending:"Descending",filter_section:"Filter",filter_apply:"Apply",filter_clear:"Clear",filter_contains:"Contains",filter_starts_with:"Starts with",filter_equals:"Equals",filter_is_empty:"Is empty",filter_is_not_empty:"Is not empty",filter_exact:"Exact",filter_range:"Range",filter_from:"From",filter_to:"To",filter_all:"All",filter_select_all:"All",filter_select_none:"None",filter_search_value:"Search value...",filter_no_support:"Filtering is not available for this field type."},ar:{required:"هذا الحقل مطلوب",select_placeholder:"اختر خياراً",search_placeholder:"بحث...",upload_file:"رفع ملف",choose_file:"اختر ملفاً",clear:"مسح",today:"اليوم",invalid_email:"يرجى إدخال عنوان بريد إلكتروني صحيح",invalid_url:"يرجى إدخال رابط صحيح",invalid_number:"يرجى إدخال رقم صحيح",drop_file_here:"اسحب الملف هنا أو",browse:"تصفح",file_too_large:"الملف كبير جداً",search_results:"نتائج البحث",no_results:"لم يتم العثور على نتائج",loading:"جار التحميل...",submit:"حفظ",cancel:"إلغاء",remove:"إزالة",add:"إضافة",yes:"نعم",no:"لا",table_of:"من أصل",download:"تنزيل",table_filter:"تصفية",table_filter_hide:"إخفاء التصفية",table_filter_active:"نشط",table_filter_clear_all:"مسح جميع الفلاتر",table_new_record:"سجل جديد",table_export_excel:"تصدير إلى Excel",filter_sorting:"الترتيب",filter_ascending:"تصاعدي",filter_descending:"تنازلي",filter_section:"تصفية",filter_apply:"تطبيق",filter_clear:"مسح",filter_contains:"يحتوي على",filter_starts_with:"يبدأ بـ",filter_equals:"يساوي",filter_is_empty:"فارغ",filter_is_not_empty:"ليس فارغاً",filter_exact:"دقيق",filter_range:"نطاق",filter_from:"من",filter_to:"إلى",filter_all:"الكل",filter_select_all:"الكل",filter_select_none:"لا شيء",filter_search_value:"قيمة البحث...",filter_no_support:"التصفية غير متاحة لهذا النوع من الحقول."},fr:{required:"Ce champ est obligatoire",select_placeholder:"Sélectionner une option",search_placeholder:"Rechercher...",upload_file:"Télécharger un fichier",choose_file:"Choisir un fichier",clear:"Effacer",today:"Aujourd'hui",invalid_email:"Veuillez saisir une adresse e-mail valide",invalid_url:"Veuillez saisir une URL valide",invalid_number:"Veuillez saisir un nombre valide",drop_file_here:"Déposez le fichier ici ou",browse:"parcourir",file_too_large:"Le fichier est trop volumineux",search_results:"Résultats de recherche",no_results:"Aucun résultat trouvé",loading:"Chargement...",submit:"Enregistrer",cancel:"Annuler",remove:"Supprimer",add:"Ajouter",yes:"Oui",no:"Non",table_of:"sur",download:"Télécharger",table_filter:"Filtrer",table_filter_hide:"Masquer le filtre",table_filter_active:"actif",table_filter_clear_all:"Effacer tous les filtres",table_new_record:"Nouvel enregistrement",table_export_excel:"Exporter vers Excel",filter_sorting:"Tri",filter_ascending:"Croissant",filter_descending:"Décroissant",filter_section:"Filtre",filter_apply:"Appliquer",filter_clear:"Effacer",filter_contains:"Contient",filter_starts_with:"Commence par",filter_equals:"Égal à",filter_is_empty:"Est vide",filter_is_not_empty:"N'est pas vide",filter_exact:"Exact",filter_range:"Plage",filter_from:"De",filter_to:"À",filter_all:"Tous",filter_select_all:"Tous",filter_select_none:"Aucun",filter_search_value:"Valeur de recherche...",filter_no_support:"Le filtrage n'est pas disponible pour ce type de champ."}};function l(l,r){var i,t,a;const _=r.split("-")[0].toLowerCase();return null!==(a=null!==(t=(null!==(i=e[_])&&void 0!==i?i:e.en)[l])&&void 0!==t?t:e.en[l])&&void 0!==a?a:l}export{l as t}