@mmlogic/components 0.1.24 → 0.1.25

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.
Files changed (45) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mosterdcomponents.cjs.js +1 -1
  3. package/dist/cjs/mrd-boolean-field_19.cjs.entry.js +3150 -0
  4. package/dist/collection/collection-manifest.json +1 -0
  5. package/dist/collection/components/mrd-layout-section/mrd-layout-section.js +715 -0
  6. package/dist/collection/components/mrd-layout-section/mrd-layout-section.scss +339 -0
  7. package/dist/collection/components/mrd-longtext-field/mrd-longtext-field.js +1 -1
  8. package/dist/collection/components/mrd-number-field/mrd-number-field.js +1 -1
  9. package/dist/collection/components/mrd-table/mrd-table.js +41 -4
  10. package/dist/collection/components/mrd-table/mrd-table.scss +23 -0
  11. package/dist/collection/components/mrd-text-field/mrd-text-field.js +1 -1
  12. package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +1 -1
  13. package/dist/collection/components/mrd-time-field/mrd-time-field.js +1 -1
  14. package/dist/collection/dev/app.js +109 -3
  15. package/dist/collection/dev/example-data.js +324 -0
  16. package/dist/collection/utils/cell-renderer.js +26 -0
  17. package/dist/components/mrd-layout-section.d.ts +11 -0
  18. package/dist/components/mrd-layout-section.js +1 -0
  19. package/dist/components/mrd-longtext-field2.js +1 -1
  20. package/dist/components/mrd-number-field2.js +1 -1
  21. package/dist/components/mrd-table.js +1 -1
  22. package/dist/components/mrd-table2.js +1 -0
  23. package/dist/components/mrd-text-field2.js +1 -1
  24. package/dist/components/mrd-textarea-field2.js +1 -1
  25. package/dist/components/mrd-time-field2.js +1 -1
  26. package/dist/esm/loader.js +1 -1
  27. package/dist/esm/mosterdcomponents.js +1 -1
  28. package/dist/esm/mrd-boolean-field_19.entry.js +3130 -0
  29. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  30. package/dist/mosterdcomponents/p-a3255fc4.entry.js +1 -0
  31. package/dist/types/components/mrd-layout-section/mrd-layout-section.d.ts +92 -0
  32. package/dist/types/components/mrd-table/mrd-table.d.ts +5 -0
  33. package/dist/types/components.d.ts +128 -8
  34. package/dist/types/types/client-layout.d.ts +19 -0
  35. package/dist/types/utils/cell-renderer.d.ts +9 -1
  36. package/package.json +1 -1
  37. package/dist/cjs/format-DExY8_nu.js +0 -328
  38. package/dist/cjs/mrd-boolean-field_17.cjs.entry.js +0 -1554
  39. package/dist/cjs/mrd-table.cjs.entry.js +0 -888
  40. package/dist/esm/format-CcRjWvcb.js +0 -319
  41. package/dist/esm/mrd-boolean-field_17.entry.js +0 -1536
  42. package/dist/esm/mrd-table.entry.js +0 -886
  43. package/dist/mosterdcomponents/p-17fe94c6.entry.js +0 -1
  44. package/dist/mosterdcomponents/p-3d856b27.entry.js +0 -1
  45. package/dist/mosterdcomponents/p-CcRjWvcb.js +0 -1
@@ -0,0 +1,339 @@
1
+ .mrd-layout-section {
2
+ font-family: var(--mrd-font-family);
3
+ font-size: var(--mrd-font-size-base);
4
+ color: var(--mrd-color-neutral-800);
5
+ }
6
+
7
+ .mrd-layout-section__field {
8
+ display: grid;
9
+ grid-template-columns: 200px 1fr;
10
+ align-items: baseline;
11
+ gap: 0 var(--mrd-space-2);
12
+ padding: var(--mrd-space-1) 0;
13
+ }
14
+
15
+ .mrd-layout-section__field-label {
16
+ font-size: var(--mrd-font-size-xs);
17
+ font-weight: var(--mrd-font-weight-normal);
18
+ color: var(--mrd-color-neutral-500);
19
+ padding-top: 1px;
20
+ }
21
+
22
+ .mrd-layout-section__field-value {
23
+ font-size: var(--mrd-font-size-sm);
24
+ font-weight: var(--mrd-font-weight-medium);
25
+ color: var(--mrd-color-neutral-800);
26
+ word-break: break-word;
27
+ }
28
+
29
+ .mrd-layout-section__field-header {
30
+ font-size: var(--mrd-font-size-2xl);
31
+ font-weight: var(--mrd-font-weight-bold);
32
+ color: var(--mrd-color-neutral-900);
33
+ margin: 0 0 var(--mrd-space-4) 0;
34
+ padding: 0;
35
+ }
36
+
37
+ .mrd-layout-section__header {
38
+ font-size: var(--mrd-font-size-xl);
39
+ font-weight: var(--mrd-font-weight-semibold);
40
+ color: var(--mrd-color-neutral-800);
41
+ margin: var(--mrd-space-4) 0 var(--mrd-space-2) 0;
42
+ padding: 0;
43
+ }
44
+
45
+ .mrd-layout-section__text {
46
+ font-size: var(--mrd-font-size-base);
47
+ color: var(--mrd-color-neutral-700);
48
+ line-height: var(--mrd-line-height-relaxed);
49
+ margin: var(--mrd-space-2) 0;
50
+ }
51
+
52
+ .mrd-layout-section__navigate {
53
+ display: inline-flex;
54
+ align-items: center;
55
+ gap: var(--mrd-space-2);
56
+ padding: var(--mrd-space-2) var(--mrd-space-3);
57
+ background: none;
58
+ border: 1px solid var(--mrd-color-neutral-300);
59
+ border-radius: var(--mrd-border-radius);
60
+ font-family: var(--mrd-font-family);
61
+ font-size: var(--mrd-font-size-sm);
62
+ color: var(--mrd-color-primary);
63
+ cursor: pointer;
64
+ margin: var(--mrd-space-2) 0;
65
+ }
66
+
67
+ .mrd-layout-section__navigate:hover {
68
+ background-color: var(--mrd-color-primary-light);
69
+ border-color: var(--mrd-color-primary);
70
+ }
71
+
72
+ .mrd-layout-section__link {
73
+ color: var(--mrd-color-primary);
74
+ text-decoration: none;
75
+ }
76
+
77
+ .mrd-layout-section__link:hover {
78
+ text-decoration: underline;
79
+ }
80
+
81
+ .mrd-layout-section__relation-link {
82
+ background: none;
83
+ border: none;
84
+ padding: 0;
85
+ font-family: var(--mrd-font-family);
86
+ font-size: var(--mrd-font-size-sm);
87
+ font-weight: var(--mrd-font-weight-semibold);
88
+ color: var(--mrd-color-primary);
89
+ cursor: pointer;
90
+ text-align: left;
91
+ }
92
+
93
+ .mrd-layout-section__relation-link:hover {
94
+ text-decoration: underline;
95
+ }
96
+
97
+ .mrd-layout-section__download-link {
98
+ background: none;
99
+ border: none;
100
+ padding: 0;
101
+ font-family: var(--mrd-font-family);
102
+ font-size: var(--mrd-font-size-sm);
103
+ color: var(--mrd-color-primary);
104
+ cursor: pointer;
105
+ text-decoration: underline;
106
+ text-align: left;
107
+ }
108
+
109
+ .mrd-layout-section__boolean--true {
110
+ color: var(--mrd-color-success);
111
+ font-weight: var(--mrd-font-weight-semibold);
112
+ }
113
+
114
+ .mrd-layout-section__boolean--false {
115
+ color: var(--mrd-color-neutral-400);
116
+ }
117
+
118
+ .mrd-layout-section__field--block {
119
+ grid-template-columns: 1fr;
120
+ }
121
+
122
+ .mrd-layout-section__badge {
123
+ display: inline-block;
124
+ font-size: var(--mrd-font-size-xs);
125
+ font-weight: var(--mrd-font-weight-medium);
126
+ padding: 2px var(--mrd-space-3);
127
+ border-radius: 10px;
128
+ }
129
+
130
+ .mrd-layout-section__badge-dot-row {
131
+ display: inline-flex;
132
+ align-items: center;
133
+ gap: var(--mrd-space-2);
134
+ }
135
+
136
+ .mrd-layout-section__badge-dot {
137
+ display: inline-block;
138
+ width: 10px;
139
+ height: 10px;
140
+ border-radius: 50%;
141
+ flex-shrink: 0;
142
+ }
143
+
144
+ .mrd-layout-section__pre {
145
+ font-family: var(--mrd-font-family-mono);
146
+ font-size: var(--mrd-font-size-xs);
147
+ background-color: var(--mrd-color-neutral-50);
148
+ border: 1px solid var(--mrd-color-neutral-200);
149
+ border-radius: var(--mrd-border-radius);
150
+ padding: var(--mrd-space-3);
151
+ margin: 0;
152
+ overflow-x: auto;
153
+ white-space: pre-wrap;
154
+ word-break: break-word;
155
+ }
156
+
157
+ .mrd-layout-section__group {
158
+ margin: var(--mrd-space-4) 0;
159
+ }
160
+
161
+ .mrd-layout-section__group-title {
162
+ font-size: var(--mrd-font-size-sm);
163
+ font-weight: var(--mrd-font-weight-semibold);
164
+ color: var(--mrd-color-neutral-500);
165
+ margin: 0 0 var(--mrd-space-2) 0;
166
+ padding-bottom: 0;
167
+ text-transform: uppercase;
168
+ letter-spacing: 0.05em;
169
+ }
170
+
171
+ .mrd-layout-section__related-view {
172
+ margin: var(--mrd-space-4) 0;
173
+ }
174
+
175
+ .mrd-layout-section__related-view-title {
176
+ font-size: var(--mrd-font-size-lg);
177
+ font-weight: var(--mrd-font-weight-semibold);
178
+ color: var(--mrd-color-neutral-800);
179
+ margin: 0 0 var(--mrd-space-3) 0;
180
+ }
181
+
182
+ .mrd-layout-section__search {
183
+ position: relative;
184
+ margin: var(--mrd-space-2) 0;
185
+ }
186
+
187
+ .mrd-layout-section__search-input {
188
+ display: block;
189
+ width: 100%;
190
+ height: var(--mrd-input-height);
191
+ padding: var(--mrd-input-padding-y) var(--mrd-input-padding-x);
192
+ font-family: var(--mrd-font-family);
193
+ font-size: var(--mrd-font-size-base);
194
+ color: var(--mrd-input-color);
195
+ background-color: var(--mrd-input-bg);
196
+ border: var(--mrd-border-width) solid var(--mrd-border-color);
197
+ border-radius: var(--mrd-border-radius);
198
+ outline: none;
199
+ appearance: none;
200
+ box-sizing: border-box;
201
+ }
202
+
203
+ .mrd-layout-section__search-input:focus {
204
+ border-color: var(--mrd-border-color-focus);
205
+ box-shadow: var(--mrd-shadow-focus);
206
+ }
207
+
208
+ .mrd-layout-section__search-input::placeholder {
209
+ color: var(--mrd-input-placeholder-color);
210
+ }
211
+
212
+ .mrd-layout-section__search-results {
213
+ position: absolute;
214
+ top: 100%;
215
+ left: 0;
216
+ right: 0;
217
+ background-color: var(--mrd-color-white);
218
+ border: 1px solid var(--mrd-color-neutral-300);
219
+ border-top: none;
220
+ border-radius: 0 0 var(--mrd-border-radius) var(--mrd-border-radius);
221
+ box-shadow: var(--mrd-shadow-sm);
222
+ z-index: 100;
223
+ max-height: 300px;
224
+ overflow-y: auto;
225
+ list-style: none;
226
+ margin: 0;
227
+ padding: var(--mrd-space-1) 0;
228
+ }
229
+
230
+ .mrd-layout-section__search-result {
231
+ margin: 0;
232
+ padding: 0;
233
+ }
234
+
235
+ .mrd-layout-section__search-result-btn {
236
+ display: flex;
237
+ flex-direction: column;
238
+ width: 100%;
239
+ padding: var(--mrd-space-2) var(--mrd-space-3);
240
+ background: none;
241
+ border: none;
242
+ text-align: left;
243
+ cursor: pointer;
244
+ font-family: var(--mrd-font-family);
245
+ }
246
+
247
+ .mrd-layout-section__search-result-btn:hover {
248
+ background-color: var(--mrd-color-primary-light);
249
+ }
250
+
251
+ .mrd-layout-section__search-result-label {
252
+ font-size: var(--mrd-font-size-sm);
253
+ font-weight: var(--mrd-font-weight-medium);
254
+ color: var(--mrd-color-neutral-800);
255
+ }
256
+
257
+ .mrd-layout-section__search-result-desc {
258
+ font-size: var(--mrd-font-size-xs);
259
+ color: var(--mrd-color-neutral-500);
260
+ margin-top: var(--mrd-space-1);
261
+ }
262
+
263
+ .mrd-layout-section__image-thumb-btn {
264
+ background: none;
265
+ border: none;
266
+ padding: 0;
267
+ cursor: pointer;
268
+ display: inline-block;
269
+ border-radius: var(--mrd-border-radius);
270
+ overflow: hidden;
271
+ line-height: 0;
272
+ }
273
+
274
+ .mrd-layout-section__image-thumb-btn:hover .mrd-layout-section__image-thumb {
275
+ opacity: 0.85;
276
+ }
277
+
278
+ .mrd-layout-section__image-thumb {
279
+ display: block;
280
+ max-width: 160px;
281
+ max-height: 100px;
282
+ border-radius: var(--mrd-border-radius);
283
+ object-fit: cover;
284
+ transition: opacity 0.15s;
285
+ }
286
+
287
+ .mrd-layout-section__modal-backdrop {
288
+ position: fixed;
289
+ inset: 0;
290
+ background: rgba(0, 0, 0, 0.6);
291
+ z-index: 300;
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: center;
295
+ }
296
+
297
+ .mrd-layout-section__modal {
298
+ position: relative;
299
+ background: #fff;
300
+ border-radius: var(--mrd-border-radius);
301
+ padding: var(--mrd-space-3);
302
+ max-width: min(90vw, 900px);
303
+ max-height: 90vh;
304
+ display: flex;
305
+ align-items: center;
306
+ justify-content: center;
307
+ box-shadow: var(--mrd-shadow-lg);
308
+ }
309
+
310
+ .mrd-layout-section__modal-close {
311
+ position: absolute;
312
+ top: var(--mrd-space-2);
313
+ right: var(--mrd-space-2);
314
+ background: rgba(0, 0, 0, 0.5);
315
+ border: none;
316
+ border-radius: 50%;
317
+ width: 28px;
318
+ height: 28px;
319
+ display: flex;
320
+ align-items: center;
321
+ justify-content: center;
322
+ color: #fff;
323
+ cursor: pointer;
324
+ font-size: var(--mrd-font-size-sm);
325
+ line-height: 1;
326
+ z-index: 1;
327
+ }
328
+
329
+ .mrd-layout-section__modal-close:hover {
330
+ background: rgba(0, 0, 0, 0.8);
331
+ }
332
+
333
+ .mrd-layout-section__modal-image {
334
+ display: block;
335
+ max-width: 100%;
336
+ max-height: calc(90vh - 2rem);
337
+ border-radius: var(--mrd-border-radius);
338
+ object-fit: contain;
339
+ }
@@ -28,7 +28,7 @@ export class MrdLongtextField {
28
28
  }
29
29
  render() {
30
30
  const hasError = !!this.error;
31
- return (h(Host, { key: '0b1764adfb7ddce8c5e645a5d96c69c715652365' }, h("div", { key: '3c0c6bf77bfcd3f1bc97103baf9e5f6588f541f2', class: "mrd-longtext-field" }, this.label && (h("label", { key: 'f096b24c785a8c4b473fe0491a8cfdd7da4770bc', class: `mrd-longtext-field__label${this.required ? ' mrd-longtext-field__label--required' : ''}` }, this.label)), this.disabled ? (h("pre", { class: "mrd-longtext-field__content" }, this.value)) : (h("textarea", { class: `mrd-longtext-field__input${hasError ? ' mrd-longtext-field__input--error' : ''}`, name: this.name, placeholder: this.placeholder, required: this.required, rows: 10, onInput: this.handleInput, onBlur: this.handleBlur }, this.value)), hasError && h("span", { key: '74b6bcecf81ca86172015abd5e3512ad288ae88e', class: "mrd-longtext-field__error" }, this.error))));
31
+ return (h(Host, { key: '3142f97e26fdef5547c8dd9d236ed8bc40d5c65f' }, h("div", { key: 'b78567596d8c6459c8e9b28ea6b02d3fe65fd16c', class: "mrd-longtext-field" }, this.label && (h("label", { key: 'e85d8657fcc49fc7e15c06b8a98b34c03738ef5b', class: `mrd-longtext-field__label${this.required ? ' mrd-longtext-field__label--required' : ''}` }, this.label)), this.disabled ? (h("pre", { class: "mrd-longtext-field__content" }, this.value)) : (h("textarea", { class: `mrd-longtext-field__input${hasError ? ' mrd-longtext-field__input--error' : ''}`, name: this.name, placeholder: this.placeholder, required: this.required, rows: 10, onInput: this.handleInput, onBlur: this.handleBlur }, this.value)), hasError && h("span", { key: '63cdcaf136e345197c42516f150752ec1d8665fa', class: "mrd-longtext-field__error" }, this.error))));
32
32
  }
33
33
  static get is() { return "mrd-longtext-field"; }
34
34
  static get encapsulation() { return "scoped"; }
@@ -69,7 +69,7 @@ export class MrdNumberField {
69
69
  const hasError = !!this.error;
70
70
  const suffix = this.dataType === ClientLayoutItemFieldDataType.PERCENTAGE ? '%' :
71
71
  this.dataType === ClientLayoutItemFieldDataType.DECIMAL ? '' : '';
72
- return (h(Host, { key: '676e773fd4cc22936e64626b16e58c76f74ad8a7' }, h("div", { key: 'c646eab29793326f439d9838ecdab68249c487f1', class: "mrd-number-field" }, this.label && (h("label", { key: 'fb4fdac8f71b513fed52262ed8f5b5a5258f8f0b', class: `mrd-number-field__label${this.required ? ' mrd-number-field__label--required' : ''}` }, this.label)), h("div", { key: '5f7540318761da01f9793430ca709ba014204a11', class: "mrd-number-field__input-wrapper" }, h("input", { key: 'a102a89f9b7d91b29cf65afd5772552002d4c4cc', class: `mrd-number-field__input${hasError ? ' mrd-number-field__input--error' : ''}`, type: "text", inputMode: "decimal", name: this.name, value: this.displayValue, placeholder: this.placeholder || (suffix ? `0${suffix}` : '0'), required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus })), hasError && h("span", { key: 'eb00631f61d2c9ee6a94343a0c79847a21e8316c', class: "mrd-number-field__error" }, this.error))));
72
+ return (h(Host, { key: 'ba3488fb12f72bb04164e3e94c028fb8a085f1f2' }, h("div", { key: '582e30a2a256c16cc3b0cab6e64460a0a5ec1fa2', class: "mrd-number-field" }, this.label && (h("label", { key: '87fe77ce80e888406ecedaa450e8c3d2a61c790a', class: `mrd-number-field__label${this.required ? ' mrd-number-field__label--required' : ''}` }, this.label)), h("div", { key: 'e3d8cf06f585add372e385d6e6ef7d60ece8071b', class: "mrd-number-field__input-wrapper" }, h("input", { key: '04710b67ee0dcb9db327e25b2467b1b3499bc9a8', class: `mrd-number-field__input${hasError ? ' mrd-number-field__input--error' : ''}`, type: "text", inputMode: "decimal", name: this.name, value: this.displayValue, placeholder: this.placeholder || (suffix ? `0${suffix}` : '0'), required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus })), hasError && h("span", { key: '9713244d784c82213ea835a5a6d47d468ccb0bb9', class: "mrd-number-field__error" }, this.error))));
73
73
  }
74
74
  static get is() { return "mrd-number-field"; }
75
75
  static get encapsulation() { return "scoped"; }
@@ -12,6 +12,8 @@ const TEXT_TYPES = new Set(['TEXT', 'TEXTBLOCK', 'EMAIL', 'HYPERLINK']);
12
12
  const NUMERIC_TYPES = new Set(['INTEGER', 'DECIMAL', 'PERCENTAGE', 'CURRENCY']);
13
13
  const DATE_TYPES = new Set(['DATE', 'DATETIME', 'TIME']);
14
14
  const NO_FILTER_TYPES = new Set(['FILE', 'IMAGE']);
15
+ /** Column types that cannot be sorted or filtered (not stored in PostgreSQL). */
16
+ const NON_INTERACTIVE_TYPES = new Set(['LONGTEXT', 'JSON']);
15
17
  export class MrdTable {
16
18
  constructor() {
17
19
  // ── Non-state internals ────────────────────────────────────────────────────
@@ -64,6 +66,8 @@ export class MrdTable {
64
66
  this.scrollTop = 0;
65
67
  /** Full text shown in the TEXTBLOCK expand modal (null = closed). */
66
68
  this.textblockModal = null;
69
+ /** Syntax-highlighted JSON HTML shown in the JSON expand modal (null = closed). */
70
+ this.jsonModal = null;
67
71
  /** Aggregation totals received from the host via setAggregations(). Null = not yet loaded. */
68
72
  this.aggregations = null;
69
73
  /** Whether the view switcher dropdown is open. */
@@ -401,6 +405,23 @@ export class MrdTable {
401
405
  this.keydownHandler = null;
402
406
  }
403
407
  }
408
+ openJsonModal(html) {
409
+ this.jsonModal = html;
410
+ if (this.keydownHandler)
411
+ document.removeEventListener('keydown', this.keydownHandler);
412
+ this.keydownHandler = (ev) => {
413
+ if (ev.key === 'Escape')
414
+ this.closeJsonModal();
415
+ };
416
+ document.addEventListener('keydown', this.keydownHandler);
417
+ }
418
+ closeJsonModal() {
419
+ this.jsonModal = null;
420
+ if (this.keydownHandler) {
421
+ document.removeEventListener('keydown', this.keydownHandler);
422
+ this.keydownHandler = null;
423
+ }
424
+ }
404
425
  setPending(key, val) {
405
426
  this.pendingFilter = Object.assign(Object.assign({}, this.pendingFilter), { [key]: val });
406
427
  }
@@ -680,7 +701,7 @@ export class MrdTable {
680
701
  }
681
702
  // ── Render: cell ──────────────────────────────────────────────────────────
682
703
  renderCell(col, row) {
683
- var _a, _b, _c, _d;
704
+ var _a, _b, _c, _d, _e, _f;
684
705
  const numericTypes = new Set(['INTEGER', 'DECIMAL', 'PERCENTAGE', 'CURRENCY']);
685
706
  const dataType = (_b = (_a = col.field) === null || _a === void 0 ? void 0 : _a.dataType) !== null && _b !== void 0 ? _b : '';
686
707
  const isNumeric = col.type === 'FIELD' && numericTypes.has(dataType);
@@ -695,6 +716,15 @@ export class MrdTable {
695
716
  this.mrdDownload.emit({ href, fileName });
696
717
  } }, 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))) : ''));
697
718
  }
719
+ if (dataType === 'JSON') {
720
+ const name = (_f = (_e = col.field) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : '';
721
+ const rawValue = name ? row === null || row === void 0 ? void 0 : row[name] : undefined;
722
+ if (rawValue == null || rawValue === '')
723
+ return h("td", { class: "mrd-table__cell" });
724
+ const compactHtml = CellRenderer.formatJson(rawValue, true);
725
+ const prettyHtml = CellRenderer.formatJson(rawValue, false);
726
+ return (h("td", { class: "mrd-table__cell" }, h("span", { class: "mrd-table__json-preview", innerHTML: compactHtml }), h("button", { class: "mrd-table__textblock-btn", onClick: (e) => { e.stopPropagation(); this.openJsonModal(prettyHtml); }, "aria-label": t('textblock_show_more', this.locale) }, "\u22EF")));
727
+ }
698
728
  const TEXTBLOCK_MAX = 200;
699
729
  if (dataType === 'TEXTBLOCK') {
700
730
  const full = CellRenderer.render(col, row, this.locale);
@@ -737,7 +767,7 @@ export class MrdTable {
737
767
  this.filterMode ? 'mrd-table__header--sortable' : '',
738
768
  ].filter(Boolean).join(' ');
739
769
  return (h("th", { class: cls, onClick: this.filterMode ? (e) => this.handleFilterOpen(col, e) : undefined }, 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 : ''), isFiltered && this.renderFilterIcon()));
740
- }))), 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.renderTotalsRow()), (!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(), this.renderTextblockModal()));
770
+ }))), 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.renderTotalsRow()), (!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(), this.renderTextblockModal(), this.renderJsonModal()));
741
771
  }
742
772
  // ── Paginated / virtual-scroll mode ────────────────────────────────────
743
773
  // Derive the authoritative row count from loaded pages:
@@ -773,13 +803,14 @@ export class MrdTable {
773
803
  const name = this.colName(col);
774
804
  const isActive = this.sortField === name;
775
805
  const isFiltered = this.activeFilters.has(name);
806
+ const isInteractive = !NON_INTERACTIVE_TYPES.has(this.colDataType(col));
776
807
  const cls = [
777
808
  'mrd-table__header',
778
- 'mrd-table__header--sortable',
809
+ isInteractive ? 'mrd-table__header--sortable' : '',
779
810
  isActive ? `mrd-table__header--sorted-${this.sortDir}` : '',
780
811
  isFiltered ? 'mrd-table__header--filtered' : '',
781
812
  ].filter(Boolean).join(' ');
782
- return (h("th", { class: cls, style: this.colWidths[idx] ? { width: `${this.colWidths[idx]}px` } : undefined, onClick: (e) => this.filterMode ? this.handleFilterOpen(col, e) : this.handleSortClick(col) }, 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 : ''), isActive && (h("span", { class: "mrd-table__sort-icon", "aria-hidden": "true" }, this.sortDir === 'asc' ? '▲' : '▼')), !isActive && !this.filterMode && (h("span", { class: "mrd-table__sort-icon", "aria-hidden": "true" }, "\u21C5")), isFiltered && this.renderFilterIcon()));
813
+ return (h("th", { class: cls, style: this.colWidths[idx] ? { width: `${this.colWidths[idx]}px` } : undefined, onClick: isInteractive ? ((e) => this.filterMode ? this.handleFilterOpen(col, e) : this.handleSortClick(col)) : undefined }, 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 : ''), isInteractive && isActive && (h("span", { class: "mrd-table__sort-icon", "aria-hidden": "true" }, this.sortDir === 'asc' ? '▲' : '▼')), isInteractive && !isActive && !this.filterMode && (h("span", { class: "mrd-table__sort-icon", "aria-hidden": "true" }, "\u21C5")), isInteractive && isFiltered && this.renderFilterIcon()));
783
814
  }))), h("tbody", null, topSpacerHeight > 0 && (h("tr", { class: "mrd-table__spacer", style: { height: `${topSpacerHeight}px` } }, h("td", { colSpan: colCount }))), renderedRows, bottomSpacerHeight > 0 && (h("tr", { class: "mrd-table__spacer", style: { height: `${bottomSpacerHeight}px` } }, h("td", { colSpan: colCount })))), this.renderTotalsRow())), effectiveTotal === 0 && this.loadedPages.has(0) && (h("p", { class: "mrd-table__empty" }, t('no_results', this.locale))), effectiveTotal > 0 && this.renderFooter(undefined, effectiveTotal), this.renderFilterPopup(), this.renderTextblockModal()));
784
815
  }
785
816
  renderFilterIcon() {
@@ -790,6 +821,11 @@ export class MrdTable {
790
821
  return null;
791
822
  return (h("div", { class: "mrd-table__modal-backdrop", onClick: () => this.closeTextblockModal(), role: "dialog", "aria-modal": "true" }, h("div", { class: "mrd-table__modal", onClick: (e) => e.stopPropagation() }, h("button", { class: "mrd-table__modal-close", onClick: () => this.closeTextblockModal(), "aria-label": t('close', this.locale) }, "\u2715"), h("p", { class: "mrd-table__modal-text" }, this.textblockModal))));
792
823
  }
824
+ renderJsonModal() {
825
+ if (this.jsonModal === null)
826
+ return null;
827
+ return (h("div", { class: "mrd-table__modal-backdrop", onClick: () => this.closeJsonModal(), role: "dialog", "aria-modal": "true" }, h("div", { class: "mrd-table__modal", onClick: (e) => e.stopPropagation() }, h("button", { class: "mrd-table__modal-close", onClick: () => this.closeJsonModal(), "aria-label": t('close', this.locale) }, "\u2715"), h("pre", { class: "mrd-table__modal-json", innerHTML: this.jsonModal }))));
828
+ }
793
829
  static get is() { return "mrd-table"; }
794
830
  static get encapsulation() { return "scoped"; }
795
831
  static get originalStyleUrls() {
@@ -1060,6 +1096,7 @@ export class MrdTable {
1060
1096
  "popupPos": {},
1061
1097
  "scrollTop": {},
1062
1098
  "textblockModal": {},
1099
+ "jsonModal": {},
1063
1100
  "aggregations": {},
1064
1101
  "viewSwitcherOpen": {}
1065
1102
  };
@@ -746,3 +746,26 @@
746
746
  line-height: 1.6;
747
747
  }
748
748
 
749
+ .mrd-table__json-preview {
750
+ font-family: var(--mrd-font-family-mono);
751
+ font-size: var(--mrd-font-size-xs);
752
+ overflow: hidden;
753
+ white-space: nowrap;
754
+ text-overflow: ellipsis;
755
+ display: inline-block;
756
+ max-width: calc(100% - 1.5rem);
757
+ vertical-align: middle;
758
+ }
759
+
760
+ .mrd-table__modal-json {
761
+ margin: 0;
762
+ padding-right: var(--mrd-space-6);
763
+ font-family: var(--mrd-font-family-mono);
764
+ font-size: var(--mrd-font-size-xs);
765
+ white-space: pre-wrap;
766
+ word-break: break-word;
767
+ line-height: 1.6;
768
+ background: none;
769
+ border: none;
770
+ }
771
+
@@ -28,7 +28,7 @@ export class MrdTextField {
28
28
  }
29
29
  render() {
30
30
  const hasError = !!this.error;
31
- return (h(Host, { key: '8909be24f6452fd4f485b209b226edd4a7718d6b' }, h("div", { key: '18680ffdd64384b8725c408360da8f0f288ee6fc', class: "mrd-text-field" }, this.label && (h("label", { key: 'c4d014056181d4a92ca74a505ae48cb2cb81236d', class: `mrd-text-field__label${this.required ? ' mrd-text-field__label--required' : ''}` }, this.label)), h("input", { key: '76f862523928100f1f1089fc747b2964312d77a2', class: `mrd-text-field__input${hasError ? ' mrd-text-field__input--error' : ''}`, type: "text", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur }), hasError && h("span", { key: 'd0a1e04caea7a2d5058bc753e0885f25db302575', class: "mrd-text-field__error" }, this.error))));
31
+ return (h(Host, { key: 'b1ea3dce848a4ad41b60599804c69a35ccd35570' }, h("div", { key: '2e327824843fe02c5851beae96d52f9eb9ee67ce', class: "mrd-text-field" }, this.label && (h("label", { key: '99026834b30a53d7cf715c59099895211ff6ddb7', class: `mrd-text-field__label${this.required ? ' mrd-text-field__label--required' : ''}` }, this.label)), h("input", { key: '0e56c9115b2016ad3cb3ce8e734297354c70c7e2', class: `mrd-text-field__input${hasError ? ' mrd-text-field__input--error' : ''}`, type: "text", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur }), hasError && h("span", { key: '0430c32b083484747962147e167b11ed7a1597cc', class: "mrd-text-field__error" }, this.error))));
32
32
  }
33
33
  static get is() { return "mrd-text-field"; }
34
34
  static get encapsulation() { return "scoped"; }
@@ -66,7 +66,7 @@ export class MrdTextareaField {
66
66
  }
67
67
  }
68
68
  render() {
69
- return (h(Host, { key: '41b9f19dc589c26545a11db883c00b7ffe5d1c04' }, h("div", { key: '62b01e407efe1d5b8885e769f62705938f931817', class: "mrd-textarea-field" }, this.label && (h("label", { key: '284e3355dfe15c0aedcb9bafdd829269a0eea93a', class: `mrd-textarea-field__label${this.required ? ' mrd-textarea-field__label--required' : ''}` }, this.label)), h("div", { key: '0dba936a6eba64457f5cc69164d0f0eaf4563698', class: `mrd-textarea-field__container${this.error ? ' mrd-textarea-field__container--error' : ''}` }, h("div", { key: '0c47c25bd86d5002575a1f19848b0b0af2e87982', class: "mrd-textarea-field__editor" })), this.error && h("span", { key: 'e678046a6c27544dd9007a6c66083cce089cb991', class: "mrd-textarea-field__error" }, this.error))));
69
+ return (h(Host, { key: '7bc05fae8d48c43b56bde892537930552605727a' }, h("div", { key: '3416e9c5fdf6362602715de8427c5d2ccfa52925', class: "mrd-textarea-field" }, this.label && (h("label", { key: 'c6bd35076738b1a700b53092fb0754250c73e085', class: `mrd-textarea-field__label${this.required ? ' mrd-textarea-field__label--required' : ''}` }, this.label)), h("div", { key: 'ed0483a25a62399d1ac8ee14bc59e3eb44b91814', class: `mrd-textarea-field__container${this.error ? ' mrd-textarea-field__container--error' : ''}` }, h("div", { key: 'd17c6997602b81e8b7f66f1e5cfb12b4836cb892', class: "mrd-textarea-field__editor" })), this.error && h("span", { key: '30a068872e73ca78781c9a5e1fac2c9e3ce30765', class: "mrd-textarea-field__error" }, this.error))));
70
70
  }
71
71
  static get is() { return "mrd-textarea-field"; }
72
72
  static get encapsulation() { return "scoped"; }
@@ -27,7 +27,7 @@ export class MrdTimeField {
27
27
  }
28
28
  render() {
29
29
  const hasError = !!this.error;
30
- return (h(Host, { key: 'f5325429315ff23757f2a575b8d317c76e23f579' }, h("div", { key: '2c2a4a49984d61cf62f94f1923d6a2a1e550fb1c', class: "mrd-time-field" }, this.label && (h("label", { key: '3ef4da8ecc8406eacf3e91e188a1ea20f8eb8779', class: `mrd-time-field__label${this.required ? ' mrd-time-field__label--required' : ''}` }, this.label)), h("input", { key: '284527457812d72f5341128d3ba7873f52d5694f', class: `mrd-time-field__input${hasError ? ' mrd-time-field__input--error' : ''}`, type: "time", name: this.name, value: this.value, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), hasError && h("span", { key: '7563dcb10e813c583a0fb29e07f6e7f2340609bf', class: "mrd-time-field__error" }, this.error))));
30
+ return (h(Host, { key: '6a6828d9c5224ddfcc5d17124523037512f4970c' }, h("div", { key: '468d5295170cefc93b1e2d49b7189c8366d306b7', class: "mrd-time-field" }, this.label && (h("label", { key: '52ea233ea0a7e8563145c326c4ef9d27557b6dc8', class: `mrd-time-field__label${this.required ? ' mrd-time-field__label--required' : ''}` }, this.label)), h("input", { key: 'e9f0f75517638bf4e4ead95bf69530b5c395f8bc', class: `mrd-time-field__input${hasError ? ' mrd-time-field__input--error' : ''}`, type: "time", name: this.name, value: this.value, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), hasError && h("span", { key: '4f734c3373444df4f686a7ae6bde84a2ee39d9f4', class: "mrd-time-field__error" }, this.error))));
31
31
  }
32
32
  static get is() { return "mrd-time-field"; }
33
33
  static get encapsulation() { return "scoped"; }