@mmlogic/components 0.5.2 → 0.5.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.
Files changed (105) hide show
  1. package/dist/cjs/{cell-renderer-CmaO0CZT.js → cell-renderer-7KX9Qbml.js} +122 -1
  2. package/dist/cjs/{client-layout-RZ3Ix-4a.js → client-layout-CqVuJumR.js} +9 -0
  3. package/dist/cjs/{index-DzRfoAPz.js → index-DVbdkYO3.js} +468 -6
  4. package/dist/cjs/index.cjs.js +4 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/mosterdcomponents.cjs.js +2 -2
  7. package/dist/cjs/{mrd-boolean-field_23.cjs.entry.js → mrd-boolean-field_25.cjs.entry.js} +5618 -5225
  8. package/dist/cjs/mrd-merge-view.cjs.entry.js +5 -5
  9. package/dist/collection/collection-manifest.json +2 -0
  10. package/dist/collection/components/documents/mrd-document-view/mrd-document-view.js +7 -8
  11. package/dist/collection/components/email/mrd-email-view/mrd-email-view.css +126 -0
  12. package/dist/collection/components/email/mrd-email-view/mrd-email-view.js +247 -0
  13. package/dist/collection/components/fields/file-upload-common.js +23 -7
  14. package/dist/collection/components/fields/mrd-boolean-field/mrd-boolean-field.js +1 -1
  15. package/dist/collection/components/fields/mrd-currency-field/mrd-currency-field.js +1 -1
  16. package/dist/collection/components/fields/mrd-date-field/mrd-date-field.js +1 -1
  17. package/dist/collection/components/fields/mrd-datetime-field/mrd-datetime-field.js +1 -1
  18. package/dist/collection/components/fields/mrd-email-field/mrd-email-field.js +1 -1
  19. package/dist/collection/components/fields/mrd-file-field/mrd-file-field.css +20 -1
  20. package/dist/collection/components/fields/mrd-file-field/mrd-file-field.js +108 -47
  21. package/dist/collection/components/fields/mrd-image-field/mrd-image-field.css +44 -0
  22. package/dist/collection/components/fields/mrd-image-field/mrd-image-field.js +126 -58
  23. package/dist/collection/components/fields/mrd-longtext-field/mrd-longtext-field.js +1 -1
  24. package/dist/collection/components/fields/mrd-number-field/mrd-number-field.js +1 -1
  25. package/dist/collection/components/fields/mrd-secret-field/mrd-secret-field.js +2 -2
  26. package/dist/collection/components/fields/mrd-text-field/mrd-text-field.js +1 -1
  27. package/dist/collection/components/fields/mrd-textarea-field/mrd-textarea-field.js +1 -1
  28. package/dist/collection/components/fields/mrd-time-field/mrd-time-field.js +1 -1
  29. package/dist/collection/components/form/mrd-field/mrd-field.js +5 -5
  30. package/dist/collection/components/form/mrd-form/mrd-form.js +55 -6
  31. package/dist/collection/components/invoice/mrd-invoice-view/mrd-invoice-view.css +145 -0
  32. package/dist/collection/components/invoice/mrd-invoice-view/mrd-invoice-view.js +281 -0
  33. package/dist/collection/components/layout/mrd-layout-section/field-value.js +5 -1
  34. package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.css +10 -0
  35. package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +38 -8
  36. package/dist/collection/components/merge/mrd-merge-view/mrd-merge-view.js +2 -2
  37. package/dist/collection/dev/api.js +20 -5
  38. package/dist/collection/dev/app.js +51 -13
  39. package/dist/collection/dev/example-data.js +126 -2
  40. package/dist/collection/types/client-layout.js +6 -0
  41. package/dist/collection/utils/document-attachments.js +27 -14
  42. package/dist/collection/utils/i18n.js +120 -0
  43. package/dist/components/cell-renderer.js +1 -1
  44. package/dist/components/client-layout.js +1 -1
  45. package/dist/components/document-attachments.js +1 -1
  46. package/dist/components/file-upload-common.js +1 -1
  47. package/dist/components/format.js +1 -1
  48. package/dist/components/i18n.js +1 -1
  49. package/dist/components/index.js +1 -1
  50. package/dist/components/mrd-boolean-field2.js +1 -1
  51. package/dist/components/mrd-currency-field2.js +1 -1
  52. package/dist/components/mrd-date-field2.js +1 -1
  53. package/dist/components/mrd-datetime-field2.js +1 -1
  54. package/dist/components/mrd-document-view2.js +1 -1
  55. package/dist/components/mrd-email-field2.js +1 -1
  56. package/dist/components/mrd-email-view.d.ts +11 -0
  57. package/dist/components/mrd-email-view.js +1 -0
  58. package/dist/components/mrd-email-view2.js +1 -0
  59. package/dist/components/mrd-field2.js +1 -1
  60. package/dist/components/mrd-file-field2.js +1 -1
  61. package/dist/components/mrd-form.js +1 -1
  62. package/dist/components/mrd-image-field2.js +1 -1
  63. package/dist/components/mrd-invoice-view.d.ts +11 -0
  64. package/dist/components/mrd-invoice-view.js +1 -0
  65. package/dist/components/mrd-invoice-view2.js +1 -0
  66. package/dist/components/mrd-layout-section.js +1 -1
  67. package/dist/components/mrd-longtext-field2.js +1 -1
  68. package/dist/components/mrd-merge-view.js +1 -1
  69. package/dist/components/mrd-number-field2.js +1 -1
  70. package/dist/components/mrd-secret-field2.js +1 -1
  71. package/dist/components/mrd-table2.js +1 -1
  72. package/dist/components/mrd-text-field2.js +1 -1
  73. package/dist/components/mrd-textarea-field2.js +1 -2
  74. package/dist/components/mrd-time-field2.js +1 -1
  75. package/dist/components/purify.es.js +2 -0
  76. package/dist/esm/{cell-renderer-D63AUZxa.js → cell-renderer-DIsNX9D7.js} +122 -2
  77. package/dist/esm/{client-layout-DCOAAH92.js → client-layout-Bc42CfJB.js} +7 -1
  78. package/dist/esm/{index-DiSe6vjv.js → index-CDiBvvJU.js} +468 -6
  79. package/dist/esm/index.js +1 -1
  80. package/dist/esm/loader.js +3 -3
  81. package/dist/esm/mosterdcomponents.js +3 -3
  82. package/dist/esm/{mrd-boolean-field_23.entry.js → mrd-boolean-field_25.entry.js} +5617 -5226
  83. package/dist/esm/mrd-merge-view.entry.js +5 -5
  84. package/dist/mosterdcomponents/index.esm.js +1 -1
  85. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  86. package/dist/mosterdcomponents/{p-2e16a7d0.entry.js → p-4e061416.entry.js} +1 -1
  87. package/dist/mosterdcomponents/p-910ebfee.entry.js +3 -0
  88. package/dist/mosterdcomponents/{p-DCOAAH92.js → p-Bc42CfJB.js} +1 -1
  89. package/dist/mosterdcomponents/p-CDiBvvJU.js +2 -0
  90. package/dist/mosterdcomponents/p-Ce2QDq0t.js +1 -0
  91. package/dist/types/components/documents/mrd-document-view/mrd-document-view.d.ts +2 -2
  92. package/dist/types/components/email/mrd-email-view/mrd-email-view.d.ts +52 -0
  93. package/dist/types/components/fields/file-upload-common.d.ts +19 -1
  94. package/dist/types/components/fields/mrd-file-field/mrd-file-field.d.ts +24 -10
  95. package/dist/types/components/fields/mrd-image-field/mrd-image-field.d.ts +27 -11
  96. package/dist/types/components/form/mrd-form/mrd-form.d.ts +16 -1
  97. package/dist/types/components/invoice/mrd-invoice-view/mrd-invoice-view.d.ts +60 -0
  98. package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +13 -0
  99. package/dist/types/components.d.ts +294 -19
  100. package/dist/types/types/client-layout.d.ts +6 -0
  101. package/dist/types/utils/document-attachments.d.ts +12 -5
  102. package/package.json +1 -1
  103. package/dist/mosterdcomponents/p-CnqDM0Gb.js +0 -1
  104. package/dist/mosterdcomponents/p-DiSe6vjv.js +0 -2
  105. package/dist/mosterdcomponents/p-b5f38707.entry.js +0 -3
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DzRfoAPz.js');
4
- var clientLayout = require('./client-layout-RZ3Ix-4a.js');
5
- var cellRenderer = require('./cell-renderer-CmaO0CZT.js');
3
+ var index = require('./index-DVbdkYO3.js');
4
+ var clientLayout = require('./client-layout-CqVuJumR.js');
5
+ var cellRenderer = require('./cell-renderer-7KX9Qbml.js');
6
6
 
7
7
  /**
8
8
  * Whether a layout item can appear in the merge diff at all. m-n relations
@@ -257,14 +257,14 @@ const MrdMergeView = class {
257
257
  var _a, _b;
258
258
  let stepContent;
259
259
  if (this.step === 'search') {
260
- stepContent = (index.h(MergeSearchStep, { key: '4b79504f62f85274c9cd9681b6819c2318f4246a', locale: this.locale, searchQuery: this.searchQuery, searchResults: this.searchResults, isLoading: this.isLoading, onSearchInput: this.handleSearchInput, onSelect: this.handleSelect }));
260
+ stepContent = (index.h(MergeSearchStep, { key: '3adb36fb46aa7260641a46a2cf27cc0ef320876f', locale: this.locale, searchQuery: this.searchQuery, searchResults: this.searchResults, isLoading: this.isLoading, onSearchInput: this.handleSearchInput, onSelect: this.handleSelect }));
261
261
  }
262
262
  else {
263
263
  const diff = diffFields(this.fields, this.currentRecord, this.candidate);
264
264
  const bLabel = candidateLabel(this.candidate);
265
265
  stepContent = this.step === 'compare' ? (index.h(MergeCompareStep, { locale: this.locale, currentLabel: this.currentLabel, candidateLabel: bLabel, conflicts: diff.conflicts, autoFilled: diff.autoFilled, recordA: this.currentRecord, recordB: (_a = this.candidate) !== null && _a !== void 0 ? _a : {}, resolutions: this.resolutions, openHistoryKey: this.openHistoryKey, onResolve: this.handleResolve, onToggleHistory: this.handleToggleHistory, onChangeCandidate: this.handleChangeCandidate, onContinue: this.handleContinue })) : (index.h(MergeConfirmStep, { locale: this.locale, candidateLabel: bLabel, conflicts: diff.conflicts, autoFilled: diff.autoFilled, resolutions: this.resolutions, recordB: (_b = this.candidate) !== null && _b !== void 0 ? _b : {}, openHistoryKey: this.openHistoryKey, onToggleHistory: this.handleToggleHistory, onBack: this.handleBack, onConfirm: this.handleConfirm }));
266
266
  }
267
- return (index.h(index.Host, { key: 'f3fc046fa728646e2ff686d2eae30024da3121e1' }, index.h("div", { key: '55bef786973d22dce49be021cfb78588b119139c', class: "mrd-merge-view" }, stepContent)));
267
+ return (index.h(index.Host, { key: 'e33a6d66a220b28cc9533da78dc274e2d7ec5c4a' }, index.h("div", { key: 'b5fb1390d86192f9f6f15e3ccb89e2d21d9c7c8b', class: "mrd-merge-view" }, stepContent)));
268
268
  }
269
269
  get el() { return index.getElement(this); }
270
270
  };
@@ -3,6 +3,7 @@
3
3
  "components/documents/mrd-document-container/mrd-document-container.js",
4
4
  "components/documents/mrd-document-list/mrd-document-list.js",
5
5
  "components/documents/mrd-document-view/mrd-document-view.js",
6
+ "components/email/mrd-email-view/mrd-email-view.js",
6
7
  "components/fields/mrd-boolean-field/mrd-boolean-field.js",
7
8
  "components/fields/mrd-currency-field/mrd-currency-field.js",
8
9
  "components/fields/mrd-date-field/mrd-date-field.js",
@@ -21,6 +22,7 @@
21
22
  "components/fields/mrd-time-field/mrd-time-field.js",
22
23
  "components/form/mrd-field/mrd-field.js",
23
24
  "components/form/mrd-form/mrd-form.js",
25
+ "components/invoice/mrd-invoice-view/mrd-invoice-view.js",
24
26
  "components/layout/mrd-layout-section/mrd-layout-section.js",
25
27
  "components/merge/mrd-merge-view/mrd-merge-view.js",
26
28
  "components/table/mrd-table/mrd-table.js"
@@ -1,7 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { t } from "../../../utils/i18n";
3
3
  import { formatDate } from "../../../utils/format";
4
- import { attachmentsFromRecord } from "../../../utils/document-attachments";
4
+ import { attachmentsFromRecord, attachmentsKey } from "../../../utils/document-attachments";
5
5
  /**
6
6
  * Archetype-driven single-document view. Given a `commons.document` binding and a
7
7
  * data record, renders the document recognisably — title, date, a navigation
@@ -24,9 +24,9 @@ export class MrdDocumentView {
24
24
  /** The data record from the /data endpoint. Fields keyed by name; relations under `_links`. */
25
25
  this.data = {};
26
26
  this.locale = navigator.language;
27
- /** Tracks the href attachments were last emitted for, so componentDidLoad and
27
+ /** Tracks the key attachments were last emitted for, so componentDidLoad and
28
28
  * the data watcher don't emit duplicate events for the same file. */
29
- this.lastAttachmentHref = null;
29
+ this.lastAttachmentKey = null;
30
30
  }
31
31
  componentDidLoad() {
32
32
  this.emitAttachmentsIfNeeded();
@@ -35,12 +35,11 @@ export class MrdDocumentView {
35
35
  this.emitAttachmentsIfNeeded();
36
36
  }
37
37
  emitAttachmentsIfNeeded() {
38
- var _a, _b;
39
38
  const attachments = attachmentsFromRecord(this.archetype, this.data);
40
- const href = (_b = (_a = attachments[0]) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : null;
41
- if (href === this.lastAttachmentHref)
39
+ const key = attachmentsKey(attachments);
40
+ if (key === this.lastAttachmentKey)
42
41
  return;
43
- this.lastAttachmentHref = href;
42
+ this.lastAttachmentKey = key;
44
43
  this.mrdAttachments.emit({ attachments });
45
44
  }
46
45
  /** Value of a value-slot: reads data[field] via the slot→field map. */
@@ -88,7 +87,7 @@ export class MrdDocumentView {
88
87
  const fileRaw = this.slotValue('file');
89
88
  const fileHref = (_a = fileRaw === null || fileRaw === void 0 ? void 0 : fileRaw.href) !== null && _a !== void 0 ? _a : '';
90
89
  const fileName = (_b = fileRaw === null || fileRaw === void 0 ? void 0 : fileRaw.fileName) !== null && _b !== void 0 ? _b : (fileRaw ? String(fileRaw) : '');
91
- return (h(Host, { key: 'd4e8d4a6c5c66677df3d4e80943fc4538d9a2be7' }, h("div", { key: 'c67bb1742590dc3ab3cec959f20dfa9030268411', class: "mrd-document-view" }, h("div", { key: '5da6e15d1f67990a9ee06bc07b717e5fa17a2ee7', class: "mrd-document-view__body" }, h("div", { key: '0fc38933add3fff48096c48d2fb6cd06fb5d1eac', class: "mrd-document-view__meta" }, title && h("h1", { key: 'e9ac8d99f9afae6b64dd7e6bd461c54b92a6ea39', class: "mrd-document-view__title" }, title), date && h("p", { key: '8591d77b300ed3c021cfa64b8e9564dee98199cd', class: "mrd-document-view__date" }, date), this.renderContainer(), fileRaw && this.renderFileMeta(fileName, fileHref), summary && (h("div", { key: '8a6d630afcf187fa86c9bab77d06d93695fd5c9f', class: "mrd-document-view__summary" }, h("div", { key: 'bd98e2cf740d08837accd8d260973d4e51cd24f7', class: "mrd-document-view__summary-body", innerHTML: summary }))))))));
90
+ return (h(Host, { key: '405890ef9135d4e9f15532dbc669c4d8d1e8b201' }, h("div", { key: 'be60f0867664a0ded6a85b17999ab207f042d8e2', class: "mrd-document-view" }, h("div", { key: 'f0202da7e83a05f782ba70c3cff91049d56c3e04', class: "mrd-document-view__body" }, h("div", { key: '85d5075c6751200ae3840b1d9e4544792ea52b5e', class: "mrd-document-view__meta" }, title && h("h1", { key: '63a4676ef488f2b0cf2347e0aa4e3c728b2d9351', class: "mrd-document-view__title" }, title), date && h("p", { key: '4ff630a9967509f661050ba04eece5ca26773ce2', class: "mrd-document-view__date" }, date), this.renderContainer(), fileRaw && this.renderFileMeta(fileName, fileHref), summary && (h("div", { key: '412e4934755e801e8a6cd10f5d00da82f9b6aa6a', class: "mrd-document-view__summary" }, h("div", { key: 'fc5c1b88cdba2f2398d09b42ede0b4dc556cd0f3', class: "mrd-document-view__summary-body", innerHTML: summary }))))))));
92
91
  }
93
92
  static get is() { return "mrd-document-view"; }
94
93
  static get encapsulation() { return "scoped"; }
@@ -0,0 +1,126 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+
5
+ .mrd-email-view {
6
+ max-width: 720px;
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: var(--mrd-space-4);
10
+ }
11
+ .mrd-email-view__subject {
12
+ font-size: var(--mrd-font-size-2xl);
13
+ font-weight: var(--mrd-font-weight-bold);
14
+ color: var(--mrd-color-neutral-900);
15
+ letter-spacing: -0.02em;
16
+ margin: 0;
17
+ }
18
+ .mrd-email-view__header {
19
+ display: flex;
20
+ flex-direction: column;
21
+ gap: var(--mrd-space-1);
22
+ }
23
+ .mrd-email-view__header-row {
24
+ display: flex;
25
+ gap: var(--mrd-space-3);
26
+ font-size: var(--mrd-font-size-sm);
27
+ }
28
+ .mrd-email-view__header-label {
29
+ flex-shrink: 0;
30
+ width: 3rem;
31
+ font-weight: var(--mrd-font-weight-medium);
32
+ color: var(--mrd-color-neutral-400);
33
+ }
34
+ .mrd-email-view__header-value {
35
+ color: var(--mrd-color-neutral-700);
36
+ }
37
+ .mrd-email-view__link {
38
+ background: none;
39
+ border: none;
40
+ padding: 0;
41
+ font-family: var(--mrd-font-family);
42
+ font-size: inherit;
43
+ font-weight: var(--mrd-font-weight-medium);
44
+ color: var(--mrd-color-primary);
45
+ cursor: pointer;
46
+ }
47
+ .mrd-email-view__link:hover {
48
+ text-decoration: underline;
49
+ }
50
+ .mrd-email-view__container-link {
51
+ align-self: flex-start;
52
+ background: none;
53
+ border: none;
54
+ padding: 0;
55
+ font-family: var(--mrd-font-family);
56
+ font-size: var(--mrd-font-size-sm);
57
+ font-weight: var(--mrd-font-weight-semibold);
58
+ color: var(--mrd-color-primary);
59
+ cursor: pointer;
60
+ }
61
+ .mrd-email-view__container-link:hover {
62
+ text-decoration: underline;
63
+ }
64
+ .mrd-email-view__divider {
65
+ height: var(--mrd-border-width);
66
+ background: var(--mrd-color-neutral-200);
67
+ }
68
+ .mrd-email-view__body-html {
69
+ font-size: var(--mrd-font-size-base);
70
+ color: var(--mrd-color-neutral-700);
71
+ line-height: var(--mrd-line-height-relaxed);
72
+ word-break: break-word;
73
+ }
74
+ .mrd-email-view__body-text {
75
+ font-size: var(--mrd-font-size-base);
76
+ color: var(--mrd-color-neutral-700);
77
+ line-height: var(--mrd-line-height-relaxed);
78
+ white-space: pre-wrap;
79
+ word-break: break-word;
80
+ }
81
+ .mrd-email-view__attachments {
82
+ display: flex;
83
+ flex-direction: column;
84
+ gap: var(--mrd-space-2);
85
+ }
86
+ .mrd-email-view__attachment {
87
+ display: inline-flex;
88
+ align-items: center;
89
+ gap: var(--mrd-space-2);
90
+ align-self: flex-start;
91
+ height: 2rem;
92
+ padding: 0 var(--mrd-space-3);
93
+ background: var(--mrd-color-white);
94
+ border: 1px solid var(--mrd-color-neutral-300);
95
+ border-radius: var(--mrd-border-radius);
96
+ font-family: var(--mrd-font-family);
97
+ font-size: var(--mrd-font-size-sm);
98
+ font-weight: var(--mrd-font-weight-medium);
99
+ color: var(--mrd-color-neutral-700);
100
+ cursor: pointer;
101
+ }
102
+ .mrd-email-view__attachment:hover {
103
+ background: var(--mrd-color-neutral-100);
104
+ color: var(--mrd-color-neutral-900);
105
+ }
106
+ .mrd-email-view__attachment-icon {
107
+ width: 0.9375rem;
108
+ height: 0.9375rem;
109
+ flex-shrink: 0;
110
+ }
111
+ .mrd-email-view__headers {
112
+ font-size: var(--mrd-font-size-xs);
113
+ color: var(--mrd-color-neutral-400);
114
+ }
115
+ .mrd-email-view__headers summary {
116
+ cursor: pointer;
117
+ font-weight: var(--mrd-font-weight-medium);
118
+ }
119
+ .mrd-email-view__headers-body {
120
+ margin: var(--mrd-space-2) 0 0 0;
121
+ padding: var(--mrd-space-3);
122
+ background: var(--mrd-color-neutral-50);
123
+ border-radius: var(--mrd-border-radius);
124
+ white-space: pre-wrap;
125
+ word-break: break-word;
126
+ }
@@ -0,0 +1,247 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import DOMPurify from "dompurify";
3
+ import { t } from "../../../utils/i18n";
4
+ import { formatDateTime } from "../../../utils/format";
5
+ import { attachmentsFromRecord, attachmentsKey } from "../../../utils/document-attachments";
6
+ /**
7
+ * Archetype-driven single-email view. Given a `commons.email` binding and a data
8
+ * record, renders the message the way an Outlook printout would — subject, a
9
+ * compact From/To/CC/Date header block, the body and attachments — instead of a
10
+ * generic field form. Fully read-only: emails arrive through other channels (mail
11
+ * ingestion gateways), never edited here.
12
+ *
13
+ * Like `mrd-document-view`/`mrd-invoice-view`, this component never resolves file
14
+ * hrefs itself — it only exposes attachment references via `mrdAttachments` (an
15
+ * email can have several) and plain download buttons; the host decides how/whether
16
+ * to render them.
17
+ */
18
+ export class MrdEmailView {
19
+ constructor() {
20
+ /** The data record from the /data endpoint. Fields keyed by name; relations under `_links`. */
21
+ this.data = {};
22
+ this.locale = navigator.language;
23
+ /** Tracks the key attachments were last emitted for, so componentDidLoad and the
24
+ * data watcher don't emit duplicate events for the same set of files. */
25
+ this.lastAttachmentKey = null;
26
+ }
27
+ componentDidLoad() {
28
+ this.emitAttachmentsIfNeeded();
29
+ }
30
+ dataChanged() {
31
+ this.emitAttachmentsIfNeeded();
32
+ }
33
+ emitAttachmentsIfNeeded() {
34
+ const attachments = attachmentsFromRecord(this.archetype, this.data, 'attachments');
35
+ const key = attachmentsKey(attachments);
36
+ if (key === this.lastAttachmentKey)
37
+ return;
38
+ this.lastAttachmentKey = key;
39
+ this.mrdAttachments.emit({ attachments });
40
+ }
41
+ /** Value of a value-slot: reads data[field] via the slot→field map. */
42
+ slotValue(slot) {
43
+ var _a, _b;
44
+ const field = (_b = (_a = this.archetype) === null || _a === void 0 ? void 0 : _a.slots) === null || _b === void 0 ? void 0 : _b[slot];
45
+ if (!field)
46
+ return undefined;
47
+ return this.data[field];
48
+ }
49
+ /** Relation link for a relation-slot: reads data._links[field]. */
50
+ slotLink(slot) {
51
+ var _a, _b, _c, _d;
52
+ const field = (_b = (_a = this.archetype) === null || _a === void 0 ? void 0 : _a.slots) === null || _b === void 0 ? void 0 : _b[slot];
53
+ if (!field)
54
+ return undefined;
55
+ const links = ((_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c._links) !== null && _d !== void 0 ? _d : {});
56
+ return links[field];
57
+ }
58
+ renderAddressRow(slot, label) {
59
+ var _a;
60
+ const link = this.slotLink(slot);
61
+ const entries = ((_a = link === null || link === void 0 ? void 0 : link.values) === null || _a === void 0 ? void 0 : _a.length)
62
+ ? link.values
63
+ : (link === null || link === void 0 ? void 0 : link.href) && (link === null || link === void 0 ? void 0 : link.name) ? [{ href: link.href, name: link.name }] : [];
64
+ if (!entries.length)
65
+ return null;
66
+ return (h("div", { class: "mrd-email-view__header-row" }, h("span", { class: "mrd-email-view__header-label" }, label), h("span", { class: "mrd-email-view__header-value" }, entries.map((entry, i) => (h("span", { key: entry.href }, h("button", { type: "button", class: "mrd-email-view__link", onClick: () => this.mrdNavigate.emit({ href: entry.href, label: entry.name }) }, entry.name), i < entries.length - 1 ? ', ' : ''))))));
67
+ }
68
+ renderContainer() {
69
+ const link = this.slotLink('container');
70
+ if (!(link === null || link === void 0 ? void 0 : link.href) || !link.name)
71
+ return null;
72
+ return (h("button", { type: "button", class: "mrd-email-view__container-link", onClick: () => this.mrdNavigate.emit({ href: link.href, label: link.name }) }, link.name));
73
+ }
74
+ renderBody() {
75
+ const bodyHtmlRaw = this.slotValue('bodyHtml');
76
+ if (bodyHtmlRaw != null && bodyHtmlRaw !== '') {
77
+ return h("div", { class: "mrd-email-view__body-html", innerHTML: DOMPurify.sanitize(String(bodyHtmlRaw)) });
78
+ }
79
+ const bodyTextRaw = this.slotValue('bodyText');
80
+ if (bodyTextRaw != null && bodyTextRaw !== '') {
81
+ return h("div", { class: "mrd-email-view__body-text" }, String(bodyTextRaw));
82
+ }
83
+ return null;
84
+ }
85
+ renderHeaders() {
86
+ const headersRaw = this.slotValue('headers');
87
+ if (headersRaw == null || headersRaw === '')
88
+ return null;
89
+ return (h("details", { class: "mrd-email-view__headers" }, h("summary", null, t('email_show_headers', this.locale)), h("pre", { class: "mrd-email-view__headers-body" }, String(headersRaw))));
90
+ }
91
+ renderAttachments() {
92
+ const attachments = attachmentsFromRecord(this.archetype, this.data, 'attachments');
93
+ if (!attachments.length)
94
+ return null;
95
+ return (h("div", { class: "mrd-email-view__attachments" }, attachments.map(a => (h("button", { type: "button", key: a.href, class: "mrd-email-view__attachment", onClick: () => this.mrdDownload.emit({ href: a.href, fileName: a.fileName }) }, h("svg", { class: "mrd-email-view__attachment-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M21.44 11.05l-9.19 9.19a5 5 0 01-7.07-7.07l9.19-9.19a3 3 0 014.24 4.24l-9.2 9.19a1 1 0 01-1.41-1.41l8.49-8.48" })), a.fileName)))));
96
+ }
97
+ render() {
98
+ const subjectRaw = this.slotValue('subject');
99
+ const subject = subjectRaw != null && subjectRaw !== '' ? String(subjectRaw) : null;
100
+ const dateRaw = this.slotValue('date');
101
+ return (h(Host, { key: '3f36e4df048a71075193d61d0455f94a9121cacf' }, h("div", { key: '164a3d686a462ede237d1aa0892c041ec7ee30b5', class: "mrd-email-view" }, subject && h("h1", { key: '46111bedb40e60189f00232ec5f670c9d027c781', class: "mrd-email-view__subject" }, subject), h("div", { key: '492616cf77aa2351c680509c14328178426be7ed', class: "mrd-email-view__header" }, this.renderAddressRow('from', t('email_from', this.locale)), this.renderAddressRow('to', t('email_to', this.locale)), this.renderAddressRow('cc', t('email_cc', this.locale)), dateRaw != null && dateRaw !== '' && (h("div", { key: 'bc89fb4adec45280b3cbb7216455a7a8a5530f51', class: "mrd-email-view__header-row" }, h("span", { key: '2c0a90c5061261b8b70ba3eb0bf8b9fab793cc7d', class: "mrd-email-view__header-label" }, t('email_date', this.locale)), h("span", { key: 'de3edda49ec15795c9e91297ade9535f06b53b29', class: "mrd-email-view__header-value" }, formatDateTime(dateRaw, this.locale))))), this.renderContainer(), h("div", { key: '6e834f73168f167dac9b90a492db168b0dacc62e', class: "mrd-email-view__divider" }), this.renderBody(), this.renderAttachments(), this.renderHeaders())));
102
+ }
103
+ static get is() { return "mrd-email-view"; }
104
+ static get encapsulation() { return "scoped"; }
105
+ static get originalStyleUrls() {
106
+ return {
107
+ "$": ["mrd-email-view.scss"]
108
+ };
109
+ }
110
+ static get styleUrls() {
111
+ return {
112
+ "$": ["mrd-email-view.css"]
113
+ };
114
+ }
115
+ static get properties() {
116
+ return {
117
+ "archetype": {
118
+ "type": "unknown",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "ClientArchetype",
122
+ "resolved": "ClientArchetype",
123
+ "references": {
124
+ "ClientArchetype": {
125
+ "location": "import",
126
+ "path": "../../../types/client-layout",
127
+ "id": "src/types/client-layout.ts::ClientArchetype",
128
+ "referenceLocation": "ClientArchetype"
129
+ }
130
+ }
131
+ },
132
+ "required": true,
133
+ "optional": false,
134
+ "docs": {
135
+ "tags": [],
136
+ "text": "Resolved `commons.email` binding: slot name \u2192 concrete field/relation name."
137
+ },
138
+ "getter": false,
139
+ "setter": false
140
+ },
141
+ "data": {
142
+ "type": "unknown",
143
+ "mutable": false,
144
+ "complexType": {
145
+ "original": "Record<string, unknown>",
146
+ "resolved": "string | unknown",
147
+ "references": {
148
+ "Record": {
149
+ "location": "global",
150
+ "id": "global::Record"
151
+ }
152
+ }
153
+ },
154
+ "required": false,
155
+ "optional": false,
156
+ "docs": {
157
+ "tags": [],
158
+ "text": "The data record from the /data endpoint. Fields keyed by name; relations under `_links`."
159
+ },
160
+ "getter": false,
161
+ "setter": false,
162
+ "defaultValue": "{}"
163
+ },
164
+ "locale": {
165
+ "type": "string",
166
+ "mutable": false,
167
+ "complexType": {
168
+ "original": "string",
169
+ "resolved": "string",
170
+ "references": {}
171
+ },
172
+ "required": false,
173
+ "optional": false,
174
+ "docs": {
175
+ "tags": [],
176
+ "text": ""
177
+ },
178
+ "getter": false,
179
+ "setter": false,
180
+ "reflect": false,
181
+ "attribute": "locale",
182
+ "defaultValue": "navigator.language"
183
+ }
184
+ };
185
+ }
186
+ static get events() {
187
+ return [{
188
+ "method": "mrdNavigate",
189
+ "name": "mrdNavigate",
190
+ "bubbles": true,
191
+ "cancelable": true,
192
+ "composed": true,
193
+ "docs": {
194
+ "tags": [],
195
+ "text": "Navigate to a sender/recipient or the container. Host resolves the href and routes."
196
+ },
197
+ "complexType": {
198
+ "original": "{ href?: string; label: string }",
199
+ "resolved": "{ href?: string | undefined; label: string; }",
200
+ "references": {}
201
+ }
202
+ }, {
203
+ "method": "mrdDownload",
204
+ "name": "mrdDownload",
205
+ "bubbles": true,
206
+ "cancelable": true,
207
+ "composed": true,
208
+ "docs": {
209
+ "tags": [],
210
+ "text": "Download an attachment. Host resolves the href to a signed URL."
211
+ },
212
+ "complexType": {
213
+ "original": "{ href: string; fileName: string }",
214
+ "resolved": "{ href: string; fileName: string; }",
215
+ "references": {}
216
+ }
217
+ }, {
218
+ "method": "mrdAttachments",
219
+ "name": "mrdAttachments",
220
+ "bubbles": true,
221
+ "cancelable": true,
222
+ "composed": true,
223
+ "docs": {
224
+ "tags": [],
225
+ "text": "The file(s) belonging to this email, fired once on load and again whenever the\nattachments slot's value changes. The host resolves the href(s) itself."
226
+ },
227
+ "complexType": {
228
+ "original": "{ attachments: DocumentAttachment[] }",
229
+ "resolved": "{ attachments: DocumentAttachment[]; }",
230
+ "references": {
231
+ "DocumentAttachment": {
232
+ "location": "import",
233
+ "path": "../../../types/client-layout",
234
+ "id": "src/types/client-layout.ts::DocumentAttachment",
235
+ "referenceLocation": "DocumentAttachment"
236
+ }
237
+ }
238
+ }
239
+ }];
240
+ }
241
+ static get watchers() {
242
+ return [{
243
+ "propName": "data",
244
+ "methodName": "dataChanged"
245
+ }];
246
+ }
247
+ }
@@ -1,8 +1,24 @@
1
1
  import { t } from "../../utils/i18n";
2
- /**
3
- * Shared upload behaviour for mrd-file-field and mrd-image-field:
4
- * file validation, drop-zone class building and drag-drop wiring.
5
- */
2
+ /** True while the entry is still a local `File` awaiting upload resolution. */
3
+ export function isPending(entry) {
4
+ return entry instanceof File;
5
+ }
6
+ /** Display name for an entry: the `File`'s own name, the resolved `fileName`, or — for the
7
+ * legacy bare-href shape — a best-effort basename of the URI. */
8
+ export function entryLabel(entry) {
9
+ var _a;
10
+ if (entry instanceof File)
11
+ return entry.name;
12
+ if (typeof entry !== 'string')
13
+ return entry.fileName || entry.href;
14
+ const base = (_a = entry.split('/').pop()) !== null && _a !== void 0 ? _a : entry;
15
+ try {
16
+ return decodeURIComponent(base);
17
+ }
18
+ catch (_b) {
19
+ return base;
20
+ }
21
+ }
6
22
  /** Validates a selected/dropped file; returns a localised error message or '' when accepted. */
7
23
  export function validateUploadFile(file, maxSize, locale, requireImage = false) {
8
24
  if (maxSize > 0 && file.size > maxSize)
@@ -21,7 +37,7 @@ export function uploadZoneClass(base, opts) {
21
37
  ].filter(Boolean).join(' ');
22
38
  }
23
39
  /** Drag-drop handlers for the drop zone; the component owns the dragging state and file handling. */
24
- export function makeDragHandlers(setDragging, onFile) {
40
+ export function makeDragHandlers(setDragging, onFiles) {
25
41
  return {
26
42
  onDragOver: (e) => {
27
43
  e.preventDefault();
@@ -29,10 +45,10 @@ export function makeDragHandlers(setDragging, onFile) {
29
45
  },
30
46
  onDragLeave: () => setDragging(false),
31
47
  onDrop: (e) => {
32
- var _a, _b, _c;
48
+ var _a, _b;
33
49
  e.preventDefault();
34
50
  setDragging(false);
35
- onFile((_c = (_b = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0]) !== null && _c !== void 0 ? _c : null);
51
+ onFiles(Array.from((_b = (_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : []));
36
52
  },
37
53
  };
38
54
  }
@@ -20,7 +20,7 @@ export class MrdBooleanField {
20
20
  this.checked = !!this.value;
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: 'c0e92a50b1512d7b7f36f151b34bcb5b9497ca59' }, h("div", { key: 'e3f70c88321d8e72784b81092a9ebc0451ba330d', class: "mrd-boolean-field" }, h("label", { key: '3e6d907b72a5e1da7e268685c67811ebf264d5d8', class: "mrd-boolean-field__toggle-label" }, h("input", { key: '2b6df62a72cba19aa26374a2448c26666e28b03d', class: "mrd-boolean-field__checkbox", type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), h("span", { key: '77cbe5c1a25153de745f5e91eef589f40cb3237d', class: "mrd-boolean-field__toggle", "aria-hidden": "true" }), this.label && (h("span", { key: '34daaa269ed64ed3be71ecfd15d79eb42d746247', class: `mrd-boolean-field__text${this.required ? ' mrd-boolean-field__text--required' : ''}` }, this.label))))));
23
+ return (h(Host, { key: 'd60835bfd40ab3708692991f3c9862dfcbe98191' }, h("div", { key: 'b6ab1893b75f2a826e4bbac11a465e3d2b88f5d7', class: "mrd-boolean-field" }, h("label", { key: '86562c85d903cbf7295e69a11c4c724f0f8beeb5', class: "mrd-boolean-field__toggle-label" }, h("input", { key: '3e92957abb190ff8d0b9c3294c44cb27b81947d0', class: "mrd-boolean-field__checkbox", type: "checkbox", name: this.name, checked: this.checked, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), h("span", { key: 'b632d9da279ebb823120e38540506568bff9ebbb', class: "mrd-boolean-field__toggle", "aria-hidden": "true" }), this.label && (h("span", { key: '9e0eeb0ba9056bf5ae18b893c0566fed2ad2fda2', class: `mrd-boolean-field__text${this.required ? ' mrd-boolean-field__text--required' : ''}` }, this.label))))));
24
24
  }
25
25
  static get is() { return "mrd-boolean-field"; }
26
26
  static get encapsulation() { return "scoped"; }
@@ -42,7 +42,7 @@ export class MrdCurrencyField {
42
42
  }
43
43
  render() {
44
44
  const hasError = !!this.error;
45
- return (h(Host, { key: '7265395c3b93c3b4daf4c4221da13e01b2fed2e8' }, h("div", { key: 'e644b67a7aba6e8f5b7175f5f79a4bf5e99cb611', class: "mrd-currency-field" }, h(FieldLabel, { key: 'd47a215c0684aea8a3253ae6edc4628d20733d90', base: "mrd-currency-field", label: this.label, required: this.required }), h("div", { key: 'b8f67f8188ad9cd8ba2b6869fcb2b4cd413dec32', class: "mrd-currency-field__row" }, h("input", { key: '8d643424d8932d11ceea0435353c54bc9399c187', class: controlClass('mrd-currency-field', hasError, 'amount'), type: "text", inputMode: "decimal", name: `${this.name}_amount`, value: this.amountDisplay, placeholder: "0.00", required: this.required, disabled: this.disabled, onInput: this.handleAmountInput, onBlur: this.handleAmountBlur }), h("select", { key: '55b12e960646c2420883df848ae440d45f808300', class: "mrd-currency-field__currency", disabled: this.disabled, onChange: this.handleCurrencyChange }, COMMON_CURRENCIES.map(c => (h("option", { key: c, value: c, selected: c === this.currency }, c))))), h(FieldError, { key: 'd0a6adbb83af8fde047eff22c8efd9bbe1ae638f', base: "mrd-currency-field", error: this.error }))));
45
+ return (h(Host, { key: 'e1a76ab778820c0d781d5ec1549448716d368c1f' }, h("div", { key: '8298720abac7f689fe3e697c3c4410702e6a87f2', class: "mrd-currency-field" }, h(FieldLabel, { key: 'b23782aef9a866f1fb72e152cb91aeae00a975fa', base: "mrd-currency-field", label: this.label, required: this.required }), h("div", { key: '51e5177f9be3c5a6bdf3a5c1187f9261fcc349cf', class: "mrd-currency-field__row" }, h("input", { key: 'c6bda6cc92f3a2a34861d44b6163d417e200a6e4', class: controlClass('mrd-currency-field', hasError, 'amount'), type: "text", inputMode: "decimal", name: `${this.name}_amount`, value: this.amountDisplay, placeholder: "0.00", required: this.required, disabled: this.disabled, onInput: this.handleAmountInput, onBlur: this.handleAmountBlur }), h("select", { key: '29231cfa142d26aa81594609f1bf7bd5168df073', class: "mrd-currency-field__currency", disabled: this.disabled, onChange: this.handleCurrencyChange }, COMMON_CURRENCIES.map(c => (h("option", { key: c, value: c, selected: c === this.currency }, c))))), h(FieldError, { key: 'bea9615466427631f08a6ac8a779ae77695d36e3', base: "mrd-currency-field", error: this.error }))));
46
46
  }
47
47
  static get is() { return "mrd-currency-field"; }
48
48
  static get encapsulation() { return "scoped"; }
@@ -20,7 +20,7 @@ export class MrdDateField {
20
20
  };
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: 'c0b9d684c5e0b5e3da785c383472ed5d6c13c39f' }, h("div", { key: '304c9b5c9570a369258f5f6fd0877a01a87d98d5', class: "mrd-date-field" }, h(FieldLabel, { key: '72c5ec21699a314920ea1217aee9a353bc8b4b7e', base: "mrd-date-field", label: this.label, required: this.required }), h("input", { key: 'be18df6c7e5fe89bf00cef38484711a9a685e0dc', class: controlClass('mrd-date-field', !!this.error), type: "date", name: this.name, value: this.value, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), h(FieldError, { key: 'f16ffb7e14f9ac9af4a34a96361a25dd4d738d68', base: "mrd-date-field", error: this.error }))));
23
+ return (h(Host, { key: 'd83beef11c2b9402e251a50885b92e7a057f02ee' }, h("div", { key: '6a26e4969e9bde8c5c87771d7b8c7b4d6c1dd942', class: "mrd-date-field" }, h(FieldLabel, { key: 'a7bc1b1c56e933a51f6b1b1feb794a4678d9d334', base: "mrd-date-field", label: this.label, required: this.required }), h("input", { key: '82e3855654f3b3c554f80d647e783234cca8dae1', class: controlClass('mrd-date-field', !!this.error), type: "date", name: this.name, value: this.value, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), h(FieldError, { key: '294b3cdc1004725267aa8265366f5009ab324203', base: "mrd-date-field", error: this.error }))));
24
24
  }
25
25
  static get is() { return "mrd-date-field"; }
26
26
  static get encapsulation() { return "scoped"; }
@@ -47,7 +47,7 @@ export class MrdDatetimeField {
47
47
  return d.toISOString().replace(/\.\d{3}Z$/, 'Z');
48
48
  }
49
49
  render() {
50
- return (h(Host, { key: '0ee285553f3d5e1a9984619795543d67d581c76f' }, h("div", { key: '2c93dffe3701da9099f4b34a9d7c1d0619fa824e', class: "mrd-datetime-field" }, h(FieldLabel, { key: 'ebda087fdcb2a956933758e6250a8e4dc0484ef9', base: "mrd-datetime-field", label: this.label, required: this.required }), h("input", { key: '06b012fc78c76e3b08ef24af5e134aa691975285', class: controlClass('mrd-datetime-field', !!this.error), type: "datetime-local", name: this.name, value: this.localValue, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), h(FieldError, { key: '54e7acdd051c00893eb17cbf4911917fceddb54f', base: "mrd-datetime-field", error: this.error }))));
50
+ return (h(Host, { key: '6f8020590ac879992058aa9547b90c11250fa303' }, h("div", { key: '76abff48cae58d156540181a6577729a449bb888', class: "mrd-datetime-field" }, h(FieldLabel, { key: 'a8c3688980347a27d6467987f11a3c4135ac5234', base: "mrd-datetime-field", label: this.label, required: this.required }), h("input", { key: '1bb1aa7536a6a82313f51240030c828028cafd76', class: controlClass('mrd-datetime-field', !!this.error), type: "datetime-local", name: this.name, value: this.localValue, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), h(FieldError, { key: 'c97301640980bf04311751124fc8e87023d59f87', base: "mrd-datetime-field", error: this.error }))));
51
51
  }
52
52
  static get is() { return "mrd-datetime-field"; }
53
53
  static get encapsulation() { return "scoped"; }
@@ -24,7 +24,7 @@ export class MrdEmailField {
24
24
  };
25
25
  }
26
26
  render() {
27
- return (h(Host, { key: 'e113fb3958c06ee4d4e870b6005e07b1793835a1' }, h("div", { key: '9393b859167f1474d944575f464e1523f1dcf469', class: "mrd-email-field" }, h(FieldLabel, { key: '57c134921adb7f941c19d2fa36cce213bc12ae1e', base: "mrd-email-field", label: this.label, required: this.required }), h("input", { key: '67496689526d2fa96a087b00a9436e9de4d69415', class: controlClass('mrd-email-field', !!this.error), type: "email", name: this.name, value: this.value, placeholder: this.placeholder || 'name@example.com', required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur }), h(FieldError, { key: '5a151c2995db77771fe8f98a24c627b0060f655a', base: "mrd-email-field", error: this.error }))));
27
+ return (h(Host, { key: '3253124dadc7f0b3f120c11f8c35604a2f671b0a' }, h("div", { key: 'db820652452145c30f21b41a65942c0a4c6f45f1', class: "mrd-email-field" }, h(FieldLabel, { key: '8b1c5a84afce9fd18c3f644e5c92f07363e116d4', base: "mrd-email-field", label: this.label, required: this.required }), h("input", { key: 'dc4bada3208aa6cb7585b1872f53605177371493', class: controlClass('mrd-email-field', !!this.error), type: "email", name: this.name, value: this.value, placeholder: this.placeholder || 'name@example.com', required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur }), h(FieldError, { key: 'c44377d1b6a4a4c468b080b23eecd4ba9ca326e1', base: "mrd-email-field", error: this.error }))));
28
28
  }
29
29
  static get is() { return "mrd-email-field"; }
30
30
  static get encapsulation() { return "scoped"; }
@@ -92,6 +92,25 @@
92
92
  font-size: var(--mrd-font-size-sm);
93
93
  color: var(--mrd-color-neutral-700);
94
94
  }
95
+ .mrd-file-field__list {
96
+ list-style: none;
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: var(--mrd-space-1);
100
+ margin: var(--mrd-space-2) 0 0;
101
+ padding: 0;
102
+ }
103
+ .mrd-file-field__item {
104
+ display: flex;
105
+ align-items: center;
106
+ gap: var(--mrd-space-2);
107
+ padding: var(--mrd-space-1) var(--mrd-space-2);
108
+ border: var(--mrd-border-width) solid var(--mrd-border-color);
109
+ border-radius: var(--mrd-border-radius-sm);
110
+ font-family: var(--mrd-font-family);
111
+ font-size: var(--mrd-font-size-sm);
112
+ color: var(--mrd-color-neutral-700);
113
+ }
95
114
  .mrd-file-field__icon {
96
115
  width: 20px;
97
116
  height: 20px;
@@ -100,10 +119,10 @@
100
119
  }
101
120
  .mrd-file-field__filename {
102
121
  flex: 1;
122
+ min-width: 0;
103
123
  overflow: hidden;
104
124
  text-overflow: ellipsis;
105
125
  white-space: nowrap;
106
- max-width: 200px;
107
126
  }
108
127
  .mrd-file-field__clear {
109
128
  background: none;