@mmlogic/components 0.5.5 → 0.5.6

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 (62) hide show
  1. package/dist/cjs/{cell-renderer-Mx3pwONr.js → cell-renderer-Coy-aD3k.js} +0 -237
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mosterdcomponents.cjs.js +1 -1
  4. package/dist/cjs/mrd-boolean-field_25.cjs.entry.js +45 -211
  5. package/dist/cjs/mrd-merge-view.cjs.entry.js +3 -3
  6. package/dist/collection/components/fields/mrd-date-field/mrd-date-field.css +4 -55
  7. package/dist/collection/components/fields/mrd-date-field/mrd-date-field.js +8 -118
  8. package/dist/collection/components/fields/mrd-datetime-field/mrd-datetime-field.css +4 -55
  9. package/dist/collection/components/fields/mrd-datetime-field/mrd-datetime-field.js +15 -117
  10. package/dist/collection/components/fields/mrd-email-field/mrd-email-field.js +1 -1
  11. package/dist/collection/components/fields/mrd-file-field/mrd-file-field.js +1 -1
  12. package/dist/collection/components/fields/mrd-image-field/mrd-image-field.js +1 -1
  13. package/dist/collection/components/fields/mrd-longtext-field/mrd-longtext-field.js +1 -1
  14. package/dist/collection/components/fields/mrd-number-field/mrd-number-field.js +1 -1
  15. package/dist/collection/components/fields/mrd-secret-field/mrd-secret-field.js +2 -2
  16. package/dist/collection/components/fields/mrd-text-field/mrd-text-field.js +1 -1
  17. package/dist/collection/components/fields/mrd-textarea-field/mrd-textarea-field.js +1 -1
  18. package/dist/collection/components/fields/mrd-time-field/mrd-time-field.js +1 -1
  19. package/dist/collection/components/form/mrd-field/mrd-field.js +11 -11
  20. package/dist/collection/components/invoice/mrd-invoice-view/mrd-invoice-view.js +1 -1
  21. package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +1 -1
  22. package/dist/collection/components/merge/mrd-merge-view/mrd-merge-view.js +2 -2
  23. package/dist/collection/utils/format.js +0 -160
  24. package/dist/collection/utils/i18n.js +0 -72
  25. package/dist/components/cell-renderer.js +1 -1
  26. package/dist/components/format.js +1 -1
  27. package/dist/components/i18n.js +1 -1
  28. package/dist/components/mrd-date-field2.js +1 -1
  29. package/dist/components/mrd-datetime-field2.js +1 -1
  30. package/dist/components/mrd-document-list2.js +1 -1
  31. package/dist/components/mrd-document-view2.js +1 -1
  32. package/dist/components/mrd-email-field2.js +1 -1
  33. package/dist/components/mrd-email-view2.js +1 -1
  34. package/dist/components/mrd-field2.js +1 -1
  35. package/dist/components/mrd-file-field2.js +1 -1
  36. package/dist/components/mrd-image-field2.js +1 -1
  37. package/dist/components/mrd-invoice-view2.js +1 -1
  38. package/dist/components/mrd-layout-section.js +1 -1
  39. package/dist/components/mrd-longtext-field2.js +1 -1
  40. package/dist/components/mrd-merge-view.js +1 -1
  41. package/dist/components/mrd-number-field2.js +1 -1
  42. package/dist/components/mrd-secret-field2.js +1 -1
  43. package/dist/components/mrd-table2.js +1 -1
  44. package/dist/components/mrd-text-field2.js +1 -1
  45. package/dist/components/mrd-textarea-field2.js +1 -1
  46. package/dist/components/mrd-time-field2.js +1 -1
  47. package/dist/esm/{cell-renderer-UQOYlDv7.js → cell-renderer-Dd_PKH0_.js} +1 -233
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/esm/mosterdcomponents.js +1 -1
  50. package/dist/esm/mrd-boolean-field_25.entry.js +45 -211
  51. package/dist/esm/mrd-merge-view.entry.js +3 -3
  52. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  53. package/dist/mosterdcomponents/{p-d31b71d9.entry.js → p-1fc897f4.entry.js} +1 -1
  54. package/dist/mosterdcomponents/p-53b00783.entry.js +3 -0
  55. package/dist/mosterdcomponents/p-CGm4ff1O.js +1 -0
  56. package/dist/types/components/fields/mrd-date-field/mrd-date-field.d.ts +1 -22
  57. package/dist/types/components/fields/mrd-datetime-field/mrd-datetime-field.d.ts +2 -21
  58. package/dist/types/components.d.ts +0 -26
  59. package/dist/types/utils/format.d.ts +0 -34
  60. package/package.json +1 -1
  61. package/dist/mosterdcomponents/p-8cc374e0.entry.js +0 -3
  62. package/dist/mosterdcomponents/p-CF--ScWr.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, w as writeTask } from './index-CDiBvvJU.js';
2
- import { t, p as parseLocalizedNumber, f as formatNumber, a as formatIsoDate, l as localeDatePattern, b as parseLocalizedDate, c as formatLocalDateTime, d as parseLocalizedDateTime, e as formatDate, g as formatDateTime, h as formatCurrency, C as CellRenderer, i as formatPercentage } from './cell-renderer-UQOYlDv7.js';
2
+ import { t, p as parseLocalizedNumber, f as formatNumber, a as formatDate, b as formatDateTime, c as formatCurrency, C as CellRenderer, d as formatPercentage } from './cell-renderer-Dd_PKH0_.js';
3
3
  import { b as ClientLayoutItemFieldDataType, e as ClientLayoutNavigateBehaviour, a as ClientLayoutItemType, c as ClientLayoutItemRelationDisplayType, d as ClientLayoutItemRelationEditBehavior, r as resolveArchetype, A as ARCHETYPE_DOCUMENT, h as ARCHETYPE_INVOICE_LINE, f as ARCHETYPE_INVOICE, g as ARCHETYPE_EMAIL } from './client-layout-Bc42CfJB.js';
4
4
 
5
5
  const mrdBooleanFieldCss = () => `.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)}`;
@@ -199,7 +199,7 @@ const MrdCurrencyField = class {
199
199
  };
200
200
  MrdCurrencyField.style = mrdCurrencyFieldCss();
201
201
 
202
- const mrdDateFieldCss = () => `.sc-mrd-date-field-h{display:block}.mrd-date-field.sc-mrd-date-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-date-field__label.sc-mrd-date-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-date-field__label--required.sc-mrd-date-field::after{content:" *";color:var(--mrd-color-danger)}.mrd-date-field__control.sc-mrd-date-field{position:relative;display:block}.mrd-date-field__input.sc-mrd-date-field{display:block;width:100%;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-input-padding-x);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-input-color);background-color:var(--mrd-input-bg);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);transition:border-color var(--mrd-transition), box-shadow var(--mrd-transition);outline:none;appearance:none;box-sizing:border-box}.mrd-date-field__input.sc-mrd-date-field::placeholder{color:var(--mrd-input-placeholder-color)}.mrd-date-field__input.sc-mrd-date-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-date-field__input.sc-mrd-date-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-date-field__input--error.sc-mrd-date-field{border-color:var(--mrd-border-color-error)}.mrd-date-field__input--error.sc-mrd-date-field:focus{box-shadow:var(--mrd-shadow-focus-error)}.mrd-date-field__input.sc-mrd-date-field{padding-inline-end:calc(var(--mrd-input-padding-x) + 1.75rem)}.mrd-date-field__picker.sc-mrd-date-field{position:absolute;inset-inline-end:var(--mrd-space-1);top:50%;transform:translateY(-50%);width:1.75rem;height:1.75rem}.mrd-date-field__picker-button.sc-mrd-date-field{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;padding:0;border:0;border-radius:var(--mrd-border-radius-sm);background:transparent;color:var(--mrd-color-neutral-500);cursor:pointer;transition:color var(--mrd-transition), background-color var(--mrd-transition)}.mrd-date-field__picker-button.sc-mrd-date-field svg.sc-mrd-date-field{width:1.125rem;height:1.125rem}.mrd-date-field__picker-button.sc-mrd-date-field:hover:not(:disabled){color:var(--mrd-color-primary);background-color:var(--mrd-color-neutral-100)}.mrd-date-field__picker-button.sc-mrd-date-field:focus-visible{outline:2px solid var(--mrd-border-color-focus);outline-offset:1px}.mrd-date-field__picker-button.sc-mrd-date-field:disabled{cursor:not-allowed;opacity:0.5}.mrd-date-field__picker-native.sc-mrd-date-field{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;opacity:0;pointer-events:none}.mrd-date-field__error.sc-mrd-date-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}`;
202
+ const mrdDateFieldCss = () => `.sc-mrd-date-field-h{display:block}.mrd-date-field.sc-mrd-date-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-date-field__label.sc-mrd-date-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-date-field__label--required.sc-mrd-date-field::after{content:" *";color:var(--mrd-color-danger)}.mrd-date-field__input.sc-mrd-date-field{display:block;width:100%;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-input-padding-x);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-input-color);background-color:var(--mrd-input-bg);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);transition:border-color var(--mrd-transition), box-shadow var(--mrd-transition);outline:none;appearance:none;box-sizing:border-box}.mrd-date-field__input.sc-mrd-date-field::placeholder{color:var(--mrd-input-placeholder-color)}.mrd-date-field__input.sc-mrd-date-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-date-field__input.sc-mrd-date-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-date-field__input--error.sc-mrd-date-field{border-color:var(--mrd-border-color-error)}.mrd-date-field__input--error.sc-mrd-date-field:focus{box-shadow:var(--mrd-shadow-focus-error)}.mrd-date-field__error.sc-mrd-date-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}.mrd-date-field__input.sc-mrd-date-field{cursor:pointer}`;
203
203
 
204
204
  const MrdDateField = class {
205
205
  constructor(hostRef) {
@@ -208,114 +208,28 @@ const MrdDateField = class {
208
208
  this.mrdBlur = createEvent(this, "mrdBlur");
209
209
  this.name = '';
210
210
  this.label = '';
211
- /** ISO date, 'YYYY-MM-DD'. */
212
211
  this.value = '';
213
- /** Overrides the locale-derived pattern placeholder (e.g. 'dd-mm-jjjj'). */
214
- this.placeholder = '';
215
212
  this.required = false;
216
213
  this.disabled = false;
217
214
  this.locale = navigator.language;
218
- /** What the user sees: the value formatted for `locale`, or their raw typing. */
219
- this.displayValue = '';
220
215
  this.error = '';
221
- /** While focused the user owns the text; prop updates must not overwrite it. */
222
- this.focused = false;
223
- this.handleFocus = () => {
224
- this.focused = true;
225
- };
226
- this.handleInput = (e) => {
227
- this.displayValue = e.target.value;
216
+ this.handleChange = (e) => {
217
+ const val = e.target.value;
218
+ this.error = requiredError(val, this.required, this.locale);
219
+ this.mrdChange.emit({ name: this.name, value: val });
228
220
  };
229
221
  this.handleBlur = (e) => {
230
- this.focused = false;
231
- const value = this.commit(e.target.value);
232
- this.mrdChange.emit({ name: this.name, value });
233
- this.mrdBlur.emit({ name: this.name, value });
234
- };
235
- this.handleKeyDown = (e) => {
236
- // Submitting with Enter never fires blur, so commit the typed text here too.
237
- if (e.key !== 'Enter')
238
- return;
239
- const value = this.commit(e.target.value);
240
- this.mrdChange.emit({ name: this.name, value });
241
- };
242
- this.openPicker = () => {
243
- const native = this.nativeInput;
244
- if (!native || this.disabled)
245
- return;
246
- // The blur commit that precedes this click re-renders asynchronously, so sync by hand first.
247
- native.value = this.currentIso();
248
- try {
249
- native.showPicker();
250
- }
251
- catch (_a) {
252
- // Browsers without showPicker(): focusing at least surfaces the platform control.
253
- native.focus();
254
- }
255
- };
256
- this.handlePickerChange = (e) => {
257
- const iso = e.target.value; // native inputs always yield 'YYYY-MM-DD'
258
- this.displayValue = formatIsoDate(iso, this.locale);
259
- this.error = requiredError(iso, this.required, this.locale);
260
- this.mrdChange.emit({ name: this.name, value: iso });
261
- this.mrdBlur.emit({ name: this.name, value: iso });
222
+ const val = e.target.value;
223
+ this.mrdBlur.emit({ name: this.name, value: val });
262
224
  };
263
225
  }
264
- componentWillLoad() {
265
- this.displayValue = formatIsoDate(this.value, this.locale);
266
- }
267
- valueChanged(newValue) {
268
- if (!this.focused)
269
- this.displayValue = formatIsoDate(newValue, this.locale);
270
- }
271
- localeChanged() {
272
- if (!this.focused)
273
- this.displayValue = formatIsoDate(this.value, this.locale);
274
- }
275
- patternPlaceholder() {
276
- if (this.placeholder)
277
- return this.placeholder;
278
- return localeDatePattern(this.locale, {
279
- day: t('date_token_day', this.locale),
280
- month: t('date_token_month', this.locale),
281
- year: t('date_token_year', this.locale),
282
- });
283
- }
284
- /** Parse the typed text, reformat it, and emit the ISO value. */
285
- commit(raw) {
286
- const trimmed = raw.trim();
287
- const iso = trimmed ? parseLocalizedDate(trimmed, this.locale) : '';
288
- if (trimmed && iso === null) {
289
- // Keep the raw text so the user can correct it instead of retyping.
290
- this.error = t('invalid_date', this.locale);
291
- this.displayValue = trimmed;
292
- }
293
- else {
294
- this.error = requiredError(iso, this.required, this.locale);
295
- this.displayValue = iso ? formatIsoDate(iso, this.locale) : '';
296
- }
297
- return iso !== null && iso !== void 0 ? iso : '';
298
- }
299
- /** The ISO value currently shown, so the picker opens on the right date. */
300
- currentIso() {
301
- var _a;
302
- return (_a = (this.displayValue ? parseLocalizedDate(this.displayValue, this.locale) : '')) !== null && _a !== void 0 ? _a : '';
303
- }
304
226
  render() {
305
- return (h(Host, { key: '06ba48bd538ee4c8de4e071285535451f783c259' }, h("div", { key: '73ea6ea23c85fe3325bb151afb755cc11a13cf58', class: "mrd-date-field" }, h(FieldLabel, { key: '527848cf72323aef176fc7d5bcd47dcf2f7e46f6', base: "mrd-date-field", label: this.label, required: this.required }), h("div", { key: '2ff7586f4e6298d1f9b9b131106044533de82c6d', class: "mrd-date-field__control" }, h("input", { key: '68fdf2f1f7961ca049ab6493494c8c0707e6a4af', class: controlClass('mrd-date-field', !!this.error), type: "text", name: this.name, value: this.displayValue, placeholder: this.patternPlaceholder(), autocomplete: "off", required: this.required, disabled: this.disabled, onFocus: this.handleFocus, onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown }), h("span", { key: '9557b7a3f6780b8a05030ab8e7c941c44df9f4a5', class: "mrd-date-field__picker" }, h("button", { key: '586973e0440ed0b74e1fa0affae9e462257024c3', type: "button", class: "mrd-date-field__picker-button", title: t('open_calendar', this.locale), "aria-label": t('open_calendar', this.locale), disabled: this.disabled, onClick: this.openPicker }, h("svg", { key: '144319d3a50d0d38c75c59dd3321d4b9097322a6', viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "aria-hidden": "true" }, h("rect", { key: 'aec01ca5c620bf3116705b7a28052eb3bc210cfd', x: "3", y: "4.5", width: "14", height: "12", rx: "2" }), h("path", { key: 'a0e13dd3a2005bfbee40f5a071b6760270d0d58d', d: "M3 8.5h14M7 2.5v3M13 2.5v3", "stroke-linecap": "round" }))), h("input", { key: 'be02df44f31a59a26ce166ab9a9eab9db2635d89', class: "mrd-date-field__picker-native", type: "date", ref: el => (this.nativeInput = el), value: this.currentIso(), disabled: this.disabled, tabIndex: -1, "aria-hidden": "true", onChange: this.handlePickerChange }))), h(FieldError, { key: '2f8b2072bee32170a35f98ec5c962018774c7e8c', base: "mrd-date-field", error: this.error }))));
227
+ 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 }))));
306
228
  }
307
- static get watchers() { return {
308
- "value": [{
309
- "valueChanged": 0
310
- }],
311
- "locale": [{
312
- "localeChanged": 0
313
- }]
314
- }; }
315
229
  };
316
230
  MrdDateField.style = mrdDateFieldCss();
317
231
 
318
- const mrdDatetimeFieldCss = () => `.sc-mrd-datetime-field-h{display:block}.mrd-datetime-field.sc-mrd-datetime-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-datetime-field__label.sc-mrd-datetime-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-datetime-field__label--required.sc-mrd-datetime-field::after{content:" *";color:var(--mrd-color-danger)}.mrd-datetime-field__control.sc-mrd-datetime-field{position:relative;display:block}.mrd-datetime-field__input.sc-mrd-datetime-field{display:block;width:100%;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-input-padding-x);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-input-color);background-color:var(--mrd-input-bg);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);transition:border-color var(--mrd-transition), box-shadow var(--mrd-transition);outline:none;appearance:none;box-sizing:border-box}.mrd-datetime-field__input.sc-mrd-datetime-field::placeholder{color:var(--mrd-input-placeholder-color)}.mrd-datetime-field__input.sc-mrd-datetime-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-datetime-field__input.sc-mrd-datetime-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-datetime-field__input--error.sc-mrd-datetime-field{border-color:var(--mrd-border-color-error)}.mrd-datetime-field__input--error.sc-mrd-datetime-field:focus{box-shadow:var(--mrd-shadow-focus-error)}.mrd-datetime-field__input.sc-mrd-datetime-field{padding-inline-end:calc(var(--mrd-input-padding-x) + 1.75rem)}.mrd-datetime-field__picker.sc-mrd-datetime-field{position:absolute;inset-inline-end:var(--mrd-space-1);top:50%;transform:translateY(-50%);width:1.75rem;height:1.75rem}.mrd-datetime-field__picker-button.sc-mrd-datetime-field{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;padding:0;border:0;border-radius:var(--mrd-border-radius-sm);background:transparent;color:var(--mrd-color-neutral-500);cursor:pointer;transition:color var(--mrd-transition), background-color var(--mrd-transition)}.mrd-datetime-field__picker-button.sc-mrd-datetime-field svg.sc-mrd-datetime-field{width:1.125rem;height:1.125rem}.mrd-datetime-field__picker-button.sc-mrd-datetime-field:hover:not(:disabled){color:var(--mrd-color-primary);background-color:var(--mrd-color-neutral-100)}.mrd-datetime-field__picker-button.sc-mrd-datetime-field:focus-visible{outline:2px solid var(--mrd-border-color-focus);outline-offset:1px}.mrd-datetime-field__picker-button.sc-mrd-datetime-field:disabled{cursor:not-allowed;opacity:0.5}.mrd-datetime-field__picker-native.sc-mrd-datetime-field{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;opacity:0;pointer-events:none}.mrd-datetime-field__error.sc-mrd-datetime-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}`;
232
+ const mrdDatetimeFieldCss = () => `.sc-mrd-datetime-field-h{display:block}.mrd-datetime-field.sc-mrd-datetime-field{display:flex;flex-direction:column;gap:var(--mrd-space-1);width:100%}.mrd-datetime-field__label.sc-mrd-datetime-field{display:block;font-family:var(--mrd-font-family);font-size:var(--mrd-label-font-size);font-weight:var(--mrd-label-font-weight);color:var(--mrd-label-color)}.mrd-datetime-field__label--required.sc-mrd-datetime-field::after{content:" *";color:var(--mrd-color-danger)}.mrd-datetime-field__input.sc-mrd-datetime-field{display:block;width:100%;height:var(--mrd-input-height);padding:var(--mrd-input-padding-y) var(--mrd-input-padding-x);font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-input-color);background-color:var(--mrd-input-bg);border:var(--mrd-border-width) solid var(--mrd-border-color);border-radius:var(--mrd-border-radius);transition:border-color var(--mrd-transition), box-shadow var(--mrd-transition);outline:none;appearance:none;box-sizing:border-box}.mrd-datetime-field__input.sc-mrd-datetime-field::placeholder{color:var(--mrd-input-placeholder-color)}.mrd-datetime-field__input.sc-mrd-datetime-field:focus{border-color:var(--mrd-border-color-focus);box-shadow:var(--mrd-shadow-focus)}.mrd-datetime-field__input.sc-mrd-datetime-field:disabled{background-color:var(--mrd-input-bg-disabled);cursor:not-allowed;opacity:0.7}.mrd-datetime-field__input--error.sc-mrd-datetime-field{border-color:var(--mrd-border-color-error)}.mrd-datetime-field__input--error.sc-mrd-datetime-field:focus{box-shadow:var(--mrd-shadow-focus-error)}.mrd-datetime-field__error.sc-mrd-datetime-field{font-family:var(--mrd-font-family);font-size:var(--mrd-error-font-size);color:var(--mrd-error-color)}.mrd-datetime-field__input.sc-mrd-datetime-field{cursor:pointer}`;
319
233
 
320
234
  const MrdDatetimeField = class {
321
235
  constructor(hostRef) {
@@ -324,72 +238,30 @@ const MrdDatetimeField = class {
324
238
  this.mrdBlur = createEvent(this, "mrdBlur");
325
239
  this.name = '';
326
240
  this.label = '';
327
- /** UTC ISO string, e.g. '2026-07-06T12:30:00Z'. */
328
241
  this.value = '';
329
- /** Overrides the locale-derived pattern placeholder (e.g. 'dd-mm-jjjj uu:mm'). */
330
- this.placeholder = '';
331
242
  this.required = false;
332
243
  this.disabled = false;
333
244
  this.locale = navigator.language;
334
- /** What the user sees: the value formatted for `locale`, or their raw typing. */
335
- this.displayValue = '';
336
245
  this.error = '';
337
- /** While focused the user owns the text; prop updates must not overwrite it. */
338
- this.focused = false;
339
- this.handleFocus = () => {
340
- this.focused = true;
341
- };
342
- this.handleInput = (e) => {
343
- this.displayValue = e.target.value;
246
+ this.localValue = '';
247
+ this.handleChange = (e) => {
248
+ const localVal = e.target.value;
249
+ this.localValue = localVal;
250
+ this.error = requiredError(localVal, this.required, this.locale);
251
+ this.mrdChange.emit({ name: this.name, value: this.localToUtc(localVal) });
344
252
  };
345
253
  this.handleBlur = (e) => {
346
- this.focused = false;
347
- const value = this.commit(e.target.value);
348
- this.mrdChange.emit({ name: this.name, value });
349
- this.mrdBlur.emit({ name: this.name, value });
350
- };
351
- this.handleKeyDown = (e) => {
352
- // Submitting with Enter never fires blur, so commit the typed text here too.
353
- if (e.key !== 'Enter')
354
- return;
355
- const value = this.commit(e.target.value);
356
- this.mrdChange.emit({ name: this.name, value });
357
- };
358
- this.openPicker = () => {
359
- const native = this.nativeInput;
360
- if (!native || this.disabled)
361
- return;
362
- // The blur commit that precedes this click re-renders asynchronously, so sync by hand first.
363
- native.value = this.currentLocal();
364
- try {
365
- native.showPicker();
366
- }
367
- catch (_a) {
368
- // Browsers without showPicker(): focusing at least surfaces the platform control.
369
- native.focus();
370
- }
371
- };
372
- this.handlePickerChange = (e) => {
373
- const local = e.target.value; // native inputs always yield 'YYYY-MM-DDTHH:mm'
374
- this.displayValue = formatLocalDateTime(local, this.locale);
375
- this.error = requiredError(local, this.required, this.locale);
376
- const value = this.localToUtc(local);
377
- this.mrdChange.emit({ name: this.name, value });
378
- this.mrdBlur.emit({ name: this.name, value });
254
+ const localVal = e.target.value;
255
+ this.mrdBlur.emit({ name: this.name, value: this.localToUtc(localVal) });
379
256
  };
380
257
  }
381
258
  componentWillLoad() {
382
- this.displayValue = this.toDisplay(this.value);
259
+ this.localValue = this.utcToLocal(this.value);
383
260
  }
384
261
  valueChanged(newVal) {
385
- if (!this.focused)
386
- this.displayValue = this.toDisplay(newVal);
387
- }
388
- localeChanged() {
389
- if (!this.focused)
390
- this.displayValue = this.toDisplay(this.value);
262
+ this.localValue = this.utcToLocal(newVal);
391
263
  }
392
- // UTC ISO string → "YYYY-MM-DDTHH:mm" in local timezone
264
+ // UTC ISO string → "YYYY-MM-DDTHH:mm" in local timezone (for datetime-local input)
393
265
  utcToLocal(utcStr) {
394
266
  if (!utcStr)
395
267
  return '';
@@ -408,50 +280,12 @@ const MrdDatetimeField = class {
408
280
  return '';
409
281
  return d.toISOString().replace(/\.\d{3}Z$/, 'Z');
410
282
  }
411
- // UTC ISO string → locale-formatted text for the input
412
- toDisplay(utcStr) {
413
- return formatLocalDateTime(this.utcToLocal(utcStr), this.locale);
414
- }
415
- patternPlaceholder() {
416
- if (this.placeholder)
417
- return this.placeholder;
418
- return localeDatePattern(this.locale, {
419
- day: t('date_token_day', this.locale),
420
- month: t('date_token_month', this.locale),
421
- year: t('date_token_year', this.locale),
422
- hour: t('time_token_hour', this.locale),
423
- minute: t('time_token_minute', this.locale),
424
- });
425
- }
426
- /** Parse the typed text, reformat it, and return the UTC value to emit. */
427
- commit(raw) {
428
- const trimmed = raw.trim();
429
- const local = trimmed ? parseLocalizedDateTime(trimmed, this.locale) : '';
430
- if (trimmed && local === null) {
431
- // Keep the raw text so the user can correct it instead of retyping.
432
- this.error = t('invalid_datetime', this.locale);
433
- this.displayValue = trimmed;
434
- return '';
435
- }
436
- const localValue = local !== null && local !== void 0 ? local : '';
437
- this.error = requiredError(localValue, this.required, this.locale);
438
- this.displayValue = localValue ? formatLocalDateTime(localValue, this.locale) : '';
439
- return this.localToUtc(localValue);
440
- }
441
- /** The local 'YYYY-MM-DDTHH:mm' currently shown, so the picker opens on the right moment. */
442
- currentLocal() {
443
- var _a;
444
- return (_a = (this.displayValue ? parseLocalizedDateTime(this.displayValue, this.locale) : '')) !== null && _a !== void 0 ? _a : '';
445
- }
446
283
  render() {
447
- return (h(Host, { key: 'e075e65c76a627a8f19db488c07704e2b1a7270b' }, h("div", { key: 'a6b5a5df3168272f1f775933dfc372e1b2ccbd95', class: "mrd-datetime-field" }, h(FieldLabel, { key: '39e232c066b8c354eeda7df9bcba4e3f95c18ee5', base: "mrd-datetime-field", label: this.label, required: this.required }), h("div", { key: '4ffac4089cbb9e5506aa0854c8b1f15862bc8456', class: "mrd-datetime-field__control" }, h("input", { key: 'd33400133173c7f3e8b045339f44fbeba7f0b35a', class: controlClass('mrd-datetime-field', !!this.error), type: "text", name: this.name, value: this.displayValue, placeholder: this.patternPlaceholder(), autocomplete: "off", required: this.required, disabled: this.disabled, onFocus: this.handleFocus, onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown }), h("span", { key: '54d8d3b1f508d6226d1341d87c1fec19d5914a10', class: "mrd-datetime-field__picker" }, h("button", { key: '27cd3977984eedd9e3471dd039fc73798f1c7abc', type: "button", class: "mrd-datetime-field__picker-button", title: t('open_calendar', this.locale), "aria-label": t('open_calendar', this.locale), disabled: this.disabled, onClick: this.openPicker }, h("svg", { key: '634ca817fa001263933795e35e1a215a06da7a77', viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "aria-hidden": "true" }, h("rect", { key: '66eadf6b2cfee53376f6ea0f50dbd2ec04fc5663', x: "3", y: "4.5", width: "14", height: "12", rx: "2" }), h("path", { key: '4bb61793e0501bd18bb16c4e203b20f509692970', d: "M3 8.5h14M7 2.5v3M13 2.5v3", "stroke-linecap": "round" }))), h("input", { key: '8877da44e4dc527e7c05244359a0caf9d2e81fdd', class: "mrd-datetime-field__picker-native", type: "datetime-local", ref: el => (this.nativeInput = el), value: this.currentLocal(), disabled: this.disabled, tabIndex: -1, "aria-hidden": "true", onChange: this.handlePickerChange }))), h(FieldError, { key: '4ee97180614972c4dd334d68873a9fb7f91e48f5', base: "mrd-datetime-field", error: this.error }))));
284
+ 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 }))));
448
285
  }
449
286
  static get watchers() { return {
450
287
  "value": [{
451
288
  "valueChanged": 0
452
- }],
453
- "locale": [{
454
- "localeChanged": 0
455
289
  }]
456
290
  }; }
457
291
  };
@@ -1675,7 +1509,7 @@ const MrdEmailField = class {
1675
1509
  };
1676
1510
  }
1677
1511
  render() {
1678
- return (h(Host, { key: 'e185145e628e3a23dd338d93dd8e42bf11569728' }, h("div", { key: '7d77dd982543a8add5fa1f47aa7985cc15079080', class: "mrd-email-field" }, h(FieldLabel, { key: '14eb00a535a052ebe3cb2793cc7dfc05168c402b', base: "mrd-email-field", label: this.label, required: this.required }), h("input", { key: '11fb9856144f7da30a054b4433350d80d316de64', 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: 'be33c0a43cd99a7152c1d10b7067ea5e52834742', base: "mrd-email-field", error: this.error }))));
1512
+ 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 }))));
1679
1513
  }
1680
1514
  };
1681
1515
  MrdEmailField.style = mrdEmailFieldCss();
@@ -4308,7 +4142,7 @@ const MrdField = class {
4308
4142
  return (h("div", { class: "mrd-field__history-editor" }, this.historyEntries.length > 0 && (h("span", { class: "mrd-field__history-editor-label" }, t('history_badge_tooltip', locale))), this.historyEntries.map((entry, i) => (h("div", { key: String(i), class: "mrd-field__history-editor-row" }, h("input", { class: "mrd-field__history-editor-value", type: valueType, value: entry.value, onInput: (e) => updateEntry(i, 'value', e.target.value) }), h("span", { class: "mrd-field__history-editor-sep" }, t('history_until', locale)), h("input", { class: "mrd-field__history-editor-until", type: "date", value: entry.until, onInput: (e) => updateEntry(i, 'until', e.target.value) }), h("button", { type: "button", class: "mrd-field__history-editor-remove", onClick: () => removeEntry(i), "aria-label": t('remove', locale) }, h("svg", { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M8.75 1A2.75 2.75 0 006 3.75v.443c-.795.077-1.584.176-2.365.298a.75.75 0 10.23 1.482l.149-.022.841 10.518A2.75 2.75 0 007.596 19h4.807a2.75 2.75 0 002.742-2.53l.841-10.52.149.023a.75.75 0 00.23-1.482A41.03 41.03 0 0014 4.193V3.75A2.75 2.75 0 0011.25 1h-2.5zM10 4c.84 0 1.673.025 2.5.075V3.75c0-.69-.56-1.25-1.25-1.25h-2.5c-.69 0-1.25.56-1.25 1.25v.325C8.327 4.025 9.16 4 10 4zM8.58 7.72a.75.75 0 00-1.5.06l.3 7.5a.75.75 0 101.5-.06l-.3-7.5zm4.34.06a.75.75 0 10-1.5-.06l-.3 7.5a.75.75 0 101.5.06l.3-7.5z", "clip-rule": "evenodd" })))))), h("button", { type: "button", class: "mrd-field__history-editor-add", onClick: addEntry }, "+ ", t('add', locale))));
4309
4143
  }
4310
4144
  renderLeafField(displayValue) {
4311
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
4145
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
4312
4146
  const { item, locale } = this;
4313
4147
  const commonProps = {
4314
4148
  name: item.name,
@@ -4333,25 +4167,25 @@ const MrdField = class {
4333
4167
  case ClientLayoutItemFieldDataType.BOOLEAN:
4334
4168
  return (h("mrd-boolean-field", Object.assign({}, commonProps, { value: (_l = displayValue) !== null && _l !== void 0 ? _l : false })));
4335
4169
  case ClientLayoutItemFieldDataType.DATE:
4336
- return (h("mrd-date-field", Object.assign({}, commonProps, { value: (_m = displayValue) !== null && _m !== void 0 ? _m : '', placeholder: (_o = item.placeholder) !== null && _o !== void 0 ? _o : '' })));
4170
+ return (h("mrd-date-field", Object.assign({}, commonProps, { value: (_m = displayValue) !== null && _m !== void 0 ? _m : '' })));
4337
4171
  case ClientLayoutItemFieldDataType.DATETIME:
4338
- return (h("mrd-datetime-field", Object.assign({}, commonProps, { value: (_p = displayValue) !== null && _p !== void 0 ? _p : '', placeholder: (_q = item.placeholder) !== null && _q !== void 0 ? _q : '' })));
4172
+ return (h("mrd-datetime-field", Object.assign({}, commonProps, { value: (_o = displayValue) !== null && _o !== void 0 ? _o : '' })));
4339
4173
  case ClientLayoutItemFieldDataType.TIME:
4340
- return (h("mrd-time-field", Object.assign({}, commonProps, { value: (_r = displayValue) !== null && _r !== void 0 ? _r : '' })));
4174
+ return (h("mrd-time-field", Object.assign({}, commonProps, { value: (_p = displayValue) !== null && _p !== void 0 ? _p : '' })));
4341
4175
  case ClientLayoutItemFieldDataType.EMAIL:
4342
- return (h("mrd-email-field", Object.assign({}, commonProps, { value: (_s = displayValue) !== null && _s !== void 0 ? _s : '', placeholder: (_t = item.placeholder) !== null && _t !== void 0 ? _t : '' })));
4176
+ return (h("mrd-email-field", Object.assign({}, commonProps, { value: (_q = displayValue) !== null && _q !== void 0 ? _q : '', placeholder: (_r = item.placeholder) !== null && _r !== void 0 ? _r : '' })));
4343
4177
  case ClientLayoutItemFieldDataType.HYPERLINK:
4344
- return (h("mrd-hyperlink-field", Object.assign({}, commonProps, { value: (_u = displayValue) !== null && _u !== void 0 ? _u : '', placeholder: (_v = item.placeholder) !== null && _v !== void 0 ? _v : '' })));
4178
+ return (h("mrd-hyperlink-field", Object.assign({}, commonProps, { value: (_s = displayValue) !== null && _s !== void 0 ? _s : '', placeholder: (_t = item.placeholder) !== null && _t !== void 0 ? _t : '' })));
4345
4179
  case ClientLayoutItemFieldDataType.LIST:
4346
- return (h("mrd-list-field", Object.assign({}, commonProps, { value: (_w = displayValue) !== null && _w !== void 0 ? _w : '', multiple: (_x = item.multiple) !== null && _x !== void 0 ? _x : false, listItems: (_y = item.listItems) !== null && _y !== void 0 ? _y : [] })));
4180
+ return (h("mrd-list-field", Object.assign({}, commonProps, { value: (_u = displayValue) !== null && _u !== void 0 ? _u : '', multiple: (_v = item.multiple) !== null && _v !== void 0 ? _v : false, listItems: (_w = item.listItems) !== null && _w !== void 0 ? _w : [] })));
4347
4181
  case ClientLayoutItemFieldDataType.FILE:
4348
- return (h("mrd-file-field", Object.assign({}, commonProps, { value: displayValue, accept: (_z = item.accept) !== null && _z !== void 0 ? _z : '', maxSize: (_0 = item.maxSize) !== null && _0 !== void 0 ? _0 : 0, multiple: (_1 = item.multiple) !== null && _1 !== void 0 ? _1 : false, onMrdUpload: this.handleUpload })));
4182
+ return (h("mrd-file-field", Object.assign({}, commonProps, { value: displayValue, accept: (_x = item.accept) !== null && _x !== void 0 ? _x : '', maxSize: (_y = item.maxSize) !== null && _y !== void 0 ? _y : 0, multiple: (_z = item.multiple) !== null && _z !== void 0 ? _z : false, onMrdUpload: this.handleUpload })));
4349
4183
  case ClientLayoutItemFieldDataType.IMAGE:
4350
- return (h("mrd-image-field", Object.assign({}, commonProps, { value: displayValue, accept: (_2 = item.accept) !== null && _2 !== void 0 ? _2 : 'image/*', maxSize: (_3 = item.maxSize) !== null && _3 !== void 0 ? _3 : 0, multiple: (_4 = item.multiple) !== null && _4 !== void 0 ? _4 : false, onMrdUpload: this.handleUpload })));
4184
+ return (h("mrd-image-field", Object.assign({}, commonProps, { value: displayValue, accept: (_0 = item.accept) !== null && _0 !== void 0 ? _0 : 'image/*', maxSize: (_1 = item.maxSize) !== null && _1 !== void 0 ? _1 : 0, multiple: (_2 = item.multiple) !== null && _2 !== void 0 ? _2 : false, onMrdUpload: this.handleUpload })));
4351
4185
  case ClientLayoutItemFieldDataType.LONGTEXT:
4352
- return (h("mrd-longtext-field", Object.assign({}, commonProps, { value: (_5 = displayValue) !== null && _5 !== void 0 ? _5 : '', placeholder: (_6 = item.placeholder) !== null && _6 !== void 0 ? _6 : '' })));
4186
+ return (h("mrd-longtext-field", Object.assign({}, commonProps, { value: (_3 = displayValue) !== null && _3 !== void 0 ? _3 : '', placeholder: (_4 = item.placeholder) !== null && _4 !== void 0 ? _4 : '' })));
4353
4187
  case ClientLayoutItemFieldDataType.SECRET:
4354
- return (h("mrd-secret-field", Object.assign({}, commonProps, { value: (_7 = displayValue) !== null && _7 !== void 0 ? _7 : '', placeholder: (_8 = item.placeholder) !== null && _8 !== void 0 ? _8 : '' })));
4188
+ return (h("mrd-secret-field", Object.assign({}, commonProps, { value: (_5 = displayValue) !== null && _5 !== void 0 ? _5 : '', placeholder: (_6 = item.placeholder) !== null && _6 !== void 0 ? _6 : '' })));
4355
4189
  default:
4356
4190
  return null;
4357
4191
  }
@@ -4547,7 +4381,7 @@ const MrdFileField = class {
4547
4381
  error: hasError,
4548
4382
  disabled: this.disabled || this.zoneBusy,
4549
4383
  });
4550
- return (h(Host, { key: '36f9660fd297e7b2e7b2ac1816f4dcbc70d5cfcb' }, h("div", { key: 'a33534d3fedae04bad0eefc9d2d297ea148c5784', class: "mrd-file-field" }, h(FieldLabel, { key: '833f8ff178ec259c8066ddf542bdd1930bac486f', base: "mrd-file-field", label: this.label, required: this.required }), h("div", { key: 'd3bd00b25329b8cc716c5fcc526919d8f2c14bce', class: zoneClass, onClick: this.handleZoneClick, onDragOver: this.drag.onDragOver, onDragLeave: this.drag.onDragLeave, onDrop: this.drag.onDrop }, h("input", { key: '4b98ee338e8a5e4e6f94e5b5614ca88c90f802ee', ref: el => (this.fileInputRef = el), class: "mrd-file-field__input", type: "file", name: this.name, accept: this.accept, multiple: this.multiple, disabled: this.disabled || this.zoneBusy, required: this.required && !hasEntries, onChange: this.handleInputChange }), hasEntries && !this.multiple ? (h("div", { class: "mrd-file-field__selected" }, this.renderEntry(this.entries[0], 0))) : (h("div", { class: "mrd-file-field__prompt" }, h("svg", { class: "mrd-file-field__upload-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { points: "16 16 12 12 8 16" }), h("line", { x1: "12", y1: "12", x2: "12", y2: "21" }), h("path", { d: "M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" })), h("span", null, t('drop_file_here', this.locale), ' ', h("span", { class: "mrd-file-field__browse" }, t('browse', this.locale)))))), this.multiple && hasEntries && (h("ul", { key: '6e6e1d62738d0a824eb86e0dbb01b63a0227580d', class: "mrd-file-field__list" }, this.entries.map((entry, index) => (h("li", { class: "mrd-file-field__item", key: `${index}-${entryLabel(entry)}` }, this.renderEntry(entry, index)))))), h(FieldError, { key: 'df6427015d3f813a72e8998f9fa6152f6caef90e', base: "mrd-file-field", error: this.error }))));
4384
+ return (h(Host, { key: '2e740a0857b069740a6a13616d0a0dfee2b945be' }, h("div", { key: '069b25ced3b2f1ce547819086dadbd53ade2378c', class: "mrd-file-field" }, h(FieldLabel, { key: 'd13f3cb0af766d6328772dab865b2079c85ec075', base: "mrd-file-field", label: this.label, required: this.required }), h("div", { key: '9ffdbb508e3934854034c46e6f719a88d4175920', class: zoneClass, onClick: this.handleZoneClick, onDragOver: this.drag.onDragOver, onDragLeave: this.drag.onDragLeave, onDrop: this.drag.onDrop }, h("input", { key: 'c5d6954b8fa050889b5b65e15fde229dd64d7cc7', ref: el => (this.fileInputRef = el), class: "mrd-file-field__input", type: "file", name: this.name, accept: this.accept, multiple: this.multiple, disabled: this.disabled || this.zoneBusy, required: this.required && !hasEntries, onChange: this.handleInputChange }), hasEntries && !this.multiple ? (h("div", { class: "mrd-file-field__selected" }, this.renderEntry(this.entries[0], 0))) : (h("div", { class: "mrd-file-field__prompt" }, h("svg", { class: "mrd-file-field__upload-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { points: "16 16 12 12 8 16" }), h("line", { x1: "12", y1: "12", x2: "12", y2: "21" }), h("path", { d: "M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3" })), h("span", null, t('drop_file_here', this.locale), ' ', h("span", { class: "mrd-file-field__browse" }, t('browse', this.locale)))))), this.multiple && hasEntries && (h("ul", { key: '910a3e89f74d93ab16fb9f677a4276d5ad88897d', class: "mrd-file-field__list" }, this.entries.map((entry, index) => (h("li", { class: "mrd-file-field__item", key: `${index}-${entryLabel(entry)}` }, this.renderEntry(entry, index)))))), h(FieldError, { key: '4f0f071b0a1460ea1d6067a8fa4f588ebc620f2a', base: "mrd-file-field", error: this.error }))));
4551
4385
  }
4552
4386
  static get watchers() { return {
4553
4387
  "value": [{
@@ -5175,7 +5009,7 @@ const MrdImageField = class {
5175
5009
  error: hasError,
5176
5010
  disabled: this.disabled || this.zoneBusy,
5177
5011
  });
5178
- return (h(Host, { key: '5009b2db845c8f85f395c7230e2d5c464c56ea14' }, h("div", { key: 'fcae7821876ee3d71aac576cdea44c3c4f169890', class: "mrd-image-field" }, h(FieldLabel, { key: '834638e3f7b2073508d98b6dd5ecb437b0bb52ad', base: "mrd-image-field", label: this.label, required: this.required }), h("div", { key: '50e9bdaa1ebb3ec87f36e0d37dc6c2f8dc79848d', class: zoneClass, onClick: this.handleZoneClick, onDragOver: this.drag.onDragOver, onDragLeave: this.drag.onDragLeave, onDrop: this.drag.onDrop }, h("input", { key: '38e115fae5b3e2c3371857d284fbd54ea23812df', ref: el => (this.fileInputRef = el), class: "mrd-image-field__input", type: "file", name: this.name, accept: this.accept, multiple: this.multiple, disabled: this.disabled || this.zoneBusy, required: this.required && !hasEntries, onChange: this.handleInputChange }), hasEntries && !this.multiple ? (this.renderSingle(this.entries[0])) : (h("div", { class: "mrd-image-field__prompt" }, h("svg", { class: "mrd-image-field__upload-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), h("circle", { cx: "8.5", cy: "8.5", r: "1.5" }), h("polyline", { points: "21 15 16 10 5 21" })), h("span", null, t('drop_file_here', this.locale), ' ', h("span", { class: "mrd-image-field__browse" }, t('browse', this.locale)))))), this.multiple && hasEntries && (h("ul", { key: '67bad2f2142f78d7f25b8f35819b6adba48ea597', class: "mrd-image-field__grid" }, this.entries.map((entry, index) => this.renderGridItem(entry, index)))), h(FieldError, { key: 'ef07863946f0b4c94aa30b97d0ecb9616303e793', base: "mrd-image-field", error: this.error }))));
5012
+ return (h(Host, { key: '51d39ea80195565a5dc780ff6a7923a976cfb0a7' }, h("div", { key: 'd76edb7ac9f1efea8c7c3d5b04e906ad4ab4c761', class: "mrd-image-field" }, h(FieldLabel, { key: 'b46a67a76188047677c40ce3f406daed7d8de141', base: "mrd-image-field", label: this.label, required: this.required }), h("div", { key: '0156a9722ea48d84e3ea1a829e4266425a594a6a', class: zoneClass, onClick: this.handleZoneClick, onDragOver: this.drag.onDragOver, onDragLeave: this.drag.onDragLeave, onDrop: this.drag.onDrop }, h("input", { key: '1b8e41da71bb57254bfd2e5527b05e1aeb32eb2f', ref: el => (this.fileInputRef = el), class: "mrd-image-field__input", type: "file", name: this.name, accept: this.accept, multiple: this.multiple, disabled: this.disabled || this.zoneBusy, required: this.required && !hasEntries, onChange: this.handleInputChange }), hasEntries && !this.multiple ? (this.renderSingle(this.entries[0])) : (h("div", { class: "mrd-image-field__prompt" }, h("svg", { class: "mrd-image-field__upload-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }), h("circle", { cx: "8.5", cy: "8.5", r: "1.5" }), h("polyline", { points: "21 15 16 10 5 21" })), h("span", null, t('drop_file_here', this.locale), ' ', h("span", { class: "mrd-image-field__browse" }, t('browse', this.locale)))))), this.multiple && hasEntries && (h("ul", { key: '9211b5212eae0629f7c9b2b49d80e2b658a9ddd3', class: "mrd-image-field__grid" }, this.entries.map((entry, index) => this.renderGridItem(entry, index)))), h(FieldError, { key: '5f49c03156ed18e7c8307adff679b149658ca4a6', base: "mrd-image-field", error: this.error }))));
5179
5013
  }
5180
5014
  static get watchers() { return {
5181
5015
  "value": [{
@@ -5280,7 +5114,7 @@ const MrdInvoiceView = class {
5280
5114
  const invoiceDateRaw = this.slotValue('invoiceDate');
5281
5115
  const dueDateRaw = this.slotValue('dueDate');
5282
5116
  const hasLines = !!((_b = (_a = this.archetype) === null || _a === void 0 ? void 0 : _a.slots) === null || _b === void 0 ? void 0 : _b['lines']);
5283
- return (h(Host, { key: '8005640e6d13004ae2fdf5f48129214fbc8c55fc' }, h("div", { key: '992f925691e2455c8888df76f93176cec5866210', class: "mrd-invoice-view" }, h("div", { key: 'aa418658cfe830be4e0f8bf77af42a898c9170db', class: "mrd-invoice-view__header" }, h("div", { key: 'ce10fef2072c26a0eb8f7ead620cb460af6646f0', class: "mrd-invoice-view__title-row" }, invoiceNumber && h("h1", { key: '992486cd5dc0bfb9761bdc94bcd237e6bd6e3d24', class: "mrd-invoice-view__title" }, t('invoice_title', this.locale), " ", invoiceNumber), this.renderStatus()), h("div", { key: 'a8c5d2516b737d4dcd5d0f966aadcda4d47a63ad', class: "mrd-invoice-view__dates" }, invoiceDateRaw != null && invoiceDateRaw !== '' && (h("span", { key: 'dd728929fc408c280ad81e212bdfac5905cda02d' }, t('invoice_date', this.locale), ": ", formatDate(invoiceDateRaw, this.locale))), dueDateRaw != null && dueDateRaw !== '' && (h("span", { key: 'd4226d5cc37f0152950f44a3b63a88f0454919bd' }, t('invoice_due_date', this.locale), ": ", formatDate(dueDateRaw, this.locale)))), this.renderContainer()), h("div", { key: 'c40b00c852d005963be7b5006e13804e72ba032a', class: "mrd-invoice-view__parties" }, this.renderPartyLink('customer', t('invoice_customer', this.locale)), this.renderPartyLink('supplier', t('invoice_supplier', this.locale))), hasLines && (h("div", { key: '000e991c64daa582194631b2eac6b1acba418e97', class: "mrd-invoice-view__lines" }, h("slot", { key: '97ba2acb750137eeb5ed6b5e9e5d277f638d4f0a', name: "lines" }))), this.renderAmounts(), this.renderAttachments())));
5117
+ return (h(Host, { key: 'a97c51e53e39ace913c902ad2ba6813eb85e4561' }, h("div", { key: '6938267848bceed5b28b56c3cdd6d6693e57cdbf', class: "mrd-invoice-view" }, h("div", { key: '7a0b3346232abfc1e35805e4e92c19d35698f881', class: "mrd-invoice-view__header" }, h("div", { key: '5c0471dd8ebd94dd9b374897268c7c03bec66ec7', class: "mrd-invoice-view__title-row" }, invoiceNumber && h("h1", { key: '86b4c0ebd0a5b83ae03b731b7e41394645aae954', class: "mrd-invoice-view__title" }, t('invoice_title', this.locale), " ", invoiceNumber), this.renderStatus()), h("div", { key: 'd209bc34d989146b5f510f2bcdc4c484d723378c', class: "mrd-invoice-view__dates" }, invoiceDateRaw != null && invoiceDateRaw !== '' && (h("span", { key: '8fffcd1ab10e511c9d939c351ea93e4d8a902688' }, t('invoice_date', this.locale), ": ", formatDate(invoiceDateRaw, this.locale))), dueDateRaw != null && dueDateRaw !== '' && (h("span", { key: '8d13c6660798108cc2f54137c8415173326d5bf2' }, t('invoice_due_date', this.locale), ": ", formatDate(dueDateRaw, this.locale)))), this.renderContainer()), h("div", { key: 'cb08c6fd7e6b46a46a69f11aafa960ab5cb35544', class: "mrd-invoice-view__parties" }, this.renderPartyLink('customer', t('invoice_customer', this.locale)), this.renderPartyLink('supplier', t('invoice_supplier', this.locale))), hasLines && (h("div", { key: '8321e74171fe933a4e10fc202b66cd3720ba959e', class: "mrd-invoice-view__lines" }, h("slot", { key: 'eb31d97080173413e74e5b0024984a4b06aa5bdd', name: "lines" }))), this.renderAmounts(), this.renderAttachments())));
5284
5118
  }
5285
5119
  static get watchers() { return {
5286
5120
  "data": [{
@@ -5808,7 +5642,7 @@ const MrdLayoutSection = class {
5808
5642
  const docArchetype = resolveArchetype(this.archetypes, ARCHETYPE_DOCUMENT);
5809
5643
  const invoiceArchetype = !docArchetype ? resolveArchetype(this.archetypes, ARCHETYPE_INVOICE) : undefined;
5810
5644
  const emailArchetype = !docArchetype && !invoiceArchetype ? resolveArchetype(this.archetypes, ARCHETYPE_EMAIL) : undefined;
5811
- return (h(Host, { key: '8c4e0a0e71d777295010702584b4aa8f7817cafb' }, h("div", { key: 'fe021021eba48acad3d52ee4849ebe355e83c348', class: "mrd-layout-section" }, docArchetype && this.renderDocumentObject(docArchetype), invoiceArchetype && this.renderInvoiceObject(invoiceArchetype), emailArchetype && this.renderEmailObject(emailArchetype), !docArchetype && !invoiceArchetype && !emailArchetype && this.items.map(item => this.renderItem(item))), this.renderImageModal()));
5645
+ return (h(Host, { key: 'ccae8e82b4dd549ab24239fe685a6830a508061d' }, h("div", { key: '4072cc4ecdd2b087c54a5515e653f7f713b2150f', class: "mrd-layout-section" }, docArchetype && this.renderDocumentObject(docArchetype), invoiceArchetype && this.renderInvoiceObject(invoiceArchetype), emailArchetype && this.renderEmailObject(emailArchetype), !docArchetype && !invoiceArchetype && !emailArchetype && this.items.map(item => this.renderItem(item))), this.renderImageModal()));
5812
5646
  }
5813
5647
  get el() { return getElement(this); }
5814
5648
  static get watchers() { return {
@@ -5927,7 +5761,7 @@ const MrdLongtextField = class {
5927
5761
  };
5928
5762
  }
5929
5763
  render() {
5930
- return (h(Host, { key: 'a43ce67cb05e96853193e56c175d99e51d07cbab' }, h("div", { key: 'eb7d09bcae010736dd17b5f17bcb1cb32a6b1c4e', class: "mrd-longtext-field" }, h(FieldLabel, { key: 'd3a47993cc977c06b845eda4575b93d238eaf15a', base: "mrd-longtext-field", label: this.label, required: this.required }), this.disabled ? (h("pre", { class: "mrd-longtext-field__content" }, this.value)) : (h("textarea", { class: controlClass('mrd-longtext-field', !!this.error), name: this.name, placeholder: this.placeholder, required: this.required, rows: 10, onInput: this.handleInput, onBlur: this.handleBlur }, this.value)), h(FieldError, { key: '89f801af61fc0b874db44dbfca6eb33ffe285a84', base: "mrd-longtext-field", error: this.error }))));
5764
+ return (h(Host, { key: 'e53fec4d4eafbd68d9cffb1f064d8e0c4c37839c' }, h("div", { key: '8843a23e42b0545c269fc6c924e7ae295770064e', class: "mrd-longtext-field" }, h(FieldLabel, { key: '8767676dd35f25f9bf5ebdb26887edc0882582e0', base: "mrd-longtext-field", label: this.label, required: this.required }), this.disabled ? (h("pre", { class: "mrd-longtext-field__content" }, this.value)) : (h("textarea", { class: controlClass('mrd-longtext-field', !!this.error), name: this.name, placeholder: this.placeholder, required: this.required, rows: 10, onInput: this.handleInput, onBlur: this.handleBlur }, this.value)), h(FieldError, { key: '54dc790173575e8a02764e5b14040b900c2eb609', base: "mrd-longtext-field", error: this.error }))));
5931
5765
  }
5932
5766
  };
5933
5767
  MrdLongtextField.style = mrdLongtextFieldCss();
@@ -6019,7 +5853,7 @@ const MrdNumberField = class {
6019
5853
  const hasError = !!this.error;
6020
5854
  const suffix = this.dataType === ClientLayoutItemFieldDataType.PERCENTAGE ? '%' :
6021
5855
  this.dataType === ClientLayoutItemFieldDataType.DECIMAL ? '' : '';
6022
- return (h(Host, { key: 'bd5eb25cf7b97ef2ddb67a6bc6d6d96c9bff7510' }, h("div", { key: '68b15887a045f743a7f177e7a178146a9f4e0400', class: "mrd-number-field" }, h(FieldLabel, { key: '72e88a34a390e36ee11f5840d87dedd9d4d7fb12', base: "mrd-number-field", label: this.label, required: this.required }), h("div", { key: 'd97dae69eedf4c0ed1c872065754327dbffb5ba7', class: "mrd-number-field__input-wrapper" }, h("input", { key: '5767f6c34a08f503a1a157390c679382c857ff01', class: controlClass('mrd-number-field', hasError), 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 })), h(FieldError, { key: '1d4f8ffd3fcdf2ae2e8eb1eb68c051619d66c954', base: "mrd-number-field", error: this.error }))));
5856
+ return (h(Host, { key: '7343dbca882b5054f22de17672ac748a8e3eca11' }, h("div", { key: 'cef10b39515b48fc9c44e651910c6a0c2a847628', class: "mrd-number-field" }, h(FieldLabel, { key: '66f178cf20f1f2f0587bd9614db150d6ae63023e', base: "mrd-number-field", label: this.label, required: this.required }), h("div", { key: 'c57c22e663a570f6e5a70b07b817970f135e850c', class: "mrd-number-field__input-wrapper" }, h("input", { key: '388b20ac11fa4aaf78df124c858b579e12f53619', class: controlClass('mrd-number-field', hasError), 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 })), h(FieldError, { key: 'f99bb85668b047a97162ffee2582eb45dc0589ae', base: "mrd-number-field", error: this.error }))));
6023
5857
  }
6024
5858
  static get watchers() { return {
6025
5859
  "value": [{
@@ -6315,9 +6149,9 @@ const MrdSecretField = class {
6315
6149
  };
6316
6150
  }
6317
6151
  render() {
6318
- return (h(Host, { key: 'd3d204242898c1f258b088e7b5428421cde8d7a7' }, h("div", { key: '11d284625cdd1e0def58cc31eab9bbe59346649d', class: "mrd-secret-field" }, h(FieldLabel, { key: '333e5b23d2379125a393f555b936be7bc521fdb4', base: "mrd-secret-field", label: this.label, required: this.required }), this.disabled
6152
+ return (h(Host, { key: 'e06d04fdae34b42441976e21605fe94ad935382e' }, h("div", { key: '2889e1eb1b6d0887ae531523a0b9b43c49ef6f99', class: "mrd-secret-field" }, h(FieldLabel, { key: 'c40907905292cdef8bb0b8b9b0c03e05650bef37', base: "mrd-secret-field", label: this.label, required: this.required }), this.disabled
6319
6153
  ? (h("span", { class: "mrd-secret-field__masked", "aria-label": this.label }, this.value ? '••••••••' : ''))
6320
- : (h("input", { class: controlClass('mrd-secret-field', !!this.error), type: "password", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, autocomplete: "new-password", onInput: this.handleInput, onBlur: this.handleBlur })), h(FieldError, { key: 'cc202197fdab62da7b5083e078e69efd86e673ca', base: "mrd-secret-field", error: this.error }))));
6154
+ : (h("input", { class: controlClass('mrd-secret-field', !!this.error), type: "password", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, autocomplete: "new-password", onInput: this.handleInput, onBlur: this.handleBlur })), h(FieldError, { key: '6353e4b40566852dbc1994c7c9c409d0d0aa1b37', base: "mrd-secret-field", error: this.error }))));
6321
6155
  }
6322
6156
  };
6323
6157
  MrdSecretField.style = mrdSecretFieldCss();
@@ -7645,7 +7479,7 @@ const MrdTextField = class {
7645
7479
  };
7646
7480
  }
7647
7481
  render() {
7648
- return (h(Host, { key: '145aa80d06459fe85650702ced893e102762afa8' }, h("div", { key: '8f08af9acff56e704d216dc185a5d344b5b9f671', class: "mrd-text-field" }, h(FieldLabel, { key: '4e0204ffe7e8460eaf9a4be1535252cc11d0bab7', base: "mrd-text-field", label: this.label, required: this.required }), h("input", { key: '4d519077ad96c121ede51e188a2151efe72811db', class: controlClass('mrd-text-field', !!this.error), type: "text", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur }), h(FieldError, { key: '3c5af47037f6d6851503d769429d6c0f786d389d', base: "mrd-text-field", error: this.error }))));
7482
+ return (h(Host, { key: '3153f0c6f8ab4d9dae93306f7507399aeda75eaf' }, h("div", { key: '5d9c28023fdfb5472fc115c66bc3df509506e10f', class: "mrd-text-field" }, h(FieldLabel, { key: '1e21139aae0cc1ae95aa3297271b618a40043e77', base: "mrd-text-field", label: this.label, required: this.required }), h("input", { key: '46f98d5e39bb834075449fac7096b077a1ae7bb3', class: controlClass('mrd-text-field', !!this.error), type: "text", name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, disabled: this.disabled, onInput: this.handleInput, onBlur: this.handleBlur }), h(FieldError, { key: '10b6ddae9cd9f36dc9d7176167d79df8e4102c03', base: "mrd-text-field", error: this.error }))));
7649
7483
  }
7650
7484
  };
7651
7485
  MrdTextField.style = mrdTextFieldCss();
@@ -7717,7 +7551,7 @@ const MrdTextareaField = class {
7717
7551
  return purify.sanitize(html);
7718
7552
  }
7719
7553
  render() {
7720
- return (h(Host, { key: 'e7c53e9cf54bd4138b42ca3bc7bb5381aad3e4ac' }, h("div", { key: 'bf580a74d2233704852c7d3083ec91c9bbe868ad', class: "mrd-textarea-field" }, h(FieldLabel, { key: '7de50cb2865e83c7fe1ef9b6b099b639e165909c', base: "mrd-textarea-field", label: this.label, required: this.required }), h("div", { key: 'c78e914091cd70b52c1e9cd0046e7c97bcc7e799', class: controlClass('mrd-textarea-field', !!this.error, 'container') }, h("div", { key: '604a157e82ca8a4d98bbd1c928e9f8b41d031227', class: "mrd-textarea-field__editor" })), h(FieldError, { key: 'd0263a7285b928be6ed377e7e0fa3f53a555dadd', base: "mrd-textarea-field", error: this.error }))));
7554
+ return (h(Host, { key: 'e132531881f68f373e700617aac8033c8ebccb47' }, h("div", { key: 'fec0cf56cd7868d3fcd5a4e8a382b2dcdb6e5c50', class: "mrd-textarea-field" }, h(FieldLabel, { key: '333aa2ff57cce9e3178f0c4be4a1df1077884248', base: "mrd-textarea-field", label: this.label, required: this.required }), h("div", { key: '40025207580eb5768981b85aaa0a8ff95fce7234', class: controlClass('mrd-textarea-field', !!this.error, 'container') }, h("div", { key: '621987b3b2b1d8b4836bff065075ba527a82db81', class: "mrd-textarea-field__editor" })), h(FieldError, { key: 'ac2d8de22f008cd1c91842137ccd0cd36eb9ce19', base: "mrd-textarea-field", error: this.error }))));
7721
7555
  }
7722
7556
  get el() { return getElement(this); }
7723
7557
  };
@@ -7748,7 +7582,7 @@ const MrdTimeField = class {
7748
7582
  };
7749
7583
  }
7750
7584
  render() {
7751
- return (h(Host, { key: 'ef3876dd5c1d72bdbdb65cba00ea0992ba2ab2b6' }, h("div", { key: '6b217f6c6ec0dbb8b3249dfab6443b8f6140891c', class: "mrd-time-field" }, h(FieldLabel, { key: '87adbcc4bf1ccad07d899a315cb14a00650af09c', base: "mrd-time-field", label: this.label, required: this.required }), h("input", { key: '870fcf7e0df2ee2804f95fdc79c890b3e27bba3f', class: controlClass('mrd-time-field', !!this.error), type: "time", name: this.name, value: this.value, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), h(FieldError, { key: '03c21d23fbc039ffd79856134d181dffcb9e3621', base: "mrd-time-field", error: this.error }))));
7585
+ return (h(Host, { key: 'd521c654bc7beda71a31542a25198edaaf53b838' }, h("div", { key: '084ab16ac8aed952bd0ec50e0430591d4db5bd4b', class: "mrd-time-field" }, h(FieldLabel, { key: '43938ad7c5a9765353f6523d399d4b74cbb9ec6f', base: "mrd-time-field", label: this.label, required: this.required }), h("input", { key: 'e46eda620e7a5f1bb3b433a4c051e913675c33f9', class: controlClass('mrd-time-field', !!this.error), type: "time", name: this.name, value: this.value, required: this.required, disabled: this.disabled, onChange: this.handleChange, onBlur: this.handleBlur }), h(FieldError, { key: '34bc1eaa1b969951dffaaacad73af532b6d290fb', base: "mrd-time-field", error: this.error }))));
7752
7586
  }
7753
7587
  };
7754
7588
  MrdTimeField.style = mrdTimeFieldCss();
@@ -1,6 +1,6 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-CDiBvvJU.js';
2
2
  import { a as ClientLayoutItemType } from './client-layout-Bc42CfJB.js';
3
- import { t, C as CellRenderer, e as formatDate } from './cell-renderer-UQOYlDv7.js';
3
+ import { t, C as CellRenderer, a as formatDate } from './cell-renderer-Dd_PKH0_.js';
4
4
 
5
5
  /**
6
6
  * Whether a layout item can appear in the merge diff at all. m-n relations
@@ -255,14 +255,14 @@ const MrdMergeView = class {
255
255
  var _a, _b;
256
256
  let stepContent;
257
257
  if (this.step === 'search') {
258
- stepContent = (h(MergeSearchStep, { key: 'b965c21176faf7844e58cb156958fa1305d07cdc', locale: this.locale, searchQuery: this.searchQuery, searchResults: this.searchResults, isLoading: this.isLoading, onSearchInput: this.handleSearchInput, onSelect: this.handleSelect }));
258
+ stepContent = (h(MergeSearchStep, { key: '3adb36fb46aa7260641a46a2cf27cc0ef320876f', locale: this.locale, searchQuery: this.searchQuery, searchResults: this.searchResults, isLoading: this.isLoading, onSearchInput: this.handleSearchInput, onSelect: this.handleSelect }));
259
259
  }
260
260
  else {
261
261
  const diff = diffFields(this.fields, this.currentRecord, this.candidate);
262
262
  const bLabel = candidateLabel(this.candidate);
263
263
  stepContent = this.step === 'compare' ? (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 })) : (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 }));
264
264
  }
265
- return (h(Host, { key: 'e9cffda6c5cff51f802b044f3d8e417df83b7846' }, h("div", { key: '26690ef2db7489cbf7994191ad19491a0fdd7002', class: "mrd-merge-view" }, stepContent)));
265
+ return (h(Host, { key: 'e33a6d66a220b28cc9533da78dc274e2d7ec5c4a' }, h("div", { key: 'b5fb1390d86192f9f6f15e3ccb89e2d21d9c7c8b', class: "mrd-merge-view" }, stepContent)));
266
266
  }
267
267
  get el() { return getElement(this); }
268
268
  };
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-CDiBvvJU.js";export{s as setNonce}from"./p-CDiBvvJU.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-d31b71d9",[[2,"mrd-merge-view",{locale:[1],basicType:[1,"basic-type"],mostSignificantClass:[1,"most-significant-class"],fields:[16],currentHref:[1,"current-href"],currentRecord:[16],currentLabel:[1,"current-label"],step:[32],searchQuery:[32],searchResults:[32],isLoading:[32],candidate:[32],resolutions:[32],openHistoryKey:[32],setSearchResults:[64],setLoading:[64]}]]],["p-8cc374e0",[[2,"mrd-form",{layout:[16],locale:[1],values:[16],referenceHref:[1,"reference-href"],referenceClass:[1,"reference-class"],showCancel:[4,"show-cancel"],me:[16],formValues:[32],errors:[32],submitted:[32],setFieldValue:[64]},null,{values:[{valuesChanged:0}],me:[{meChanged:0}]}],[2,"mrd-layout-section",{items:[16],data:[16],views:[16],links:[16],locale:[1],archetypes:[16],searchQueryMap:[32],searchResultsMap:[32],imagePreviewUrl:[32],imagePreviews:[32],openHistoryField:[32],setSearchResults:[64],setViewPage:[64],setViewAggregations:[64],setViewDistinct:[64],setViewFileReference:[64],setViewCreatedObject:[64],setImagePreview:[64],openImagePreview:[64]},null,{data:[{dataChanged:0}]}],[2,"mrd-field",{item:[16],locale:[1],value:[16],historyEntries:[32],currentValue:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-document-container",{item:[16],archetype:[16],parentId:[1,"parent-id"],containerHref:[1,"container-href"],viewKey:[1,"view-key"],height:[2],locale:[1],mode:[32],canCreate:[32],targetLabel:[32]}],[2,"mrd-document-view",{archetype:[16],data:[16],locale:[1]},null,{data:[{dataChanged:0}]}],[2,"mrd-email-view",{archetype:[16],data:[16],locale:[1]},null,{data:[{dataChanged:0}]}],[262,"mrd-invoice-view",{archetype:[16],data:[16],locale:[1],statusListItems:[16]},null,{data:[{dataChanged:0}]}],[2,"mrd-boolean-field",{name:[1],label:[1],value:[4],required:[4],disabled:[4],locale:[1],checked:[32]}],[2,"mrd-currency-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],amountDisplay:[32],currency:[32],error:[32]},null,{value:[{valueChanged:0}],locale:[{localeChanged:0}]}],[2,"mrd-date-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],displayValue:[32],error:[32]},null,{value:[{valueChanged:0}],locale:[{localeChanged:0}]}],[2,"mrd-datetime-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],displayValue:[32],error:[32]},null,{value:[{valueChanged:0}],locale:[{localeChanged:0}]}],[2,"mrd-document-list",{item:[16],archetype:[16],parentId:[1,"parent-id"],containerHref:[1,"container-href"],locale:[1],containers:[32],rootLoading:[32],singleContainer:[32],selectedId:[32],dropTargetId:[32],uploadingNodeId:[32],rootDropActive:[32],setDistinct:[64],setDocuments:[64],createFolder:[64],uploadFile:[64],setFileReference:[64],setCreatedHref:[64]}],[2,"mrd-email-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-file-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],multiple:[4],entries:[32],isDragging:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-hyperlink-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],internalHref:[32],internalName:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-image-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],multiple:[4],entries:[32],isDragging:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-list-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],multiple:[4],locale:[1],listItems:[16],error:[32],selected:[32]}],[2,"mrd-longtext-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-number-field",{name:[1],label:[1],value:[2],placeholder:[1],required:[4],disabled:[4],locale:[1],dataType:[1,"data-type"],decimalPrecision:[2,"decimal-precision"],displayValue:[32],error:[32]},null,{value:[{valueChanged:0}],locale:[{localeChanged:0}]}],[2,"mrd-relation-field",{name:[1],label:[1],required:[4],disabled:[4],locale:[1],relatedClass:[1,"related-class"],mostSignificantClass:[1,"most-significant-class"],displayType:[1,"display-type"],editBehavior:[1,"edit-behavior"],commonRelation:[1,"common-relation"],multiple:[4],dropdownValues:[16],value:[1],searchQuery:[32],searchResults:[32],allRecords:[32],isLoading:[32],selectedItems:[32],showResults:[32],error:[32],highlightedIndex:[32],setAllRecords:[64],setSearchResults:[64],setLoading:[64]},null,{allRecords:[{allRecordsChanged:0}],value:[{valueChanged:0}]}],[2,"mrd-secret-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-table",{item:[16],parentId:[1,"parent-id"],rows:[16],locale:[1],totalElements:[2,"total-elements"],pageSize:[2,"page-size"],rowHeight:[2,"row-height"],tableHeight:[2,"table-height"],requestTimeoutMs:[2,"request-timeout-ms"],activeViewIdx:[32],loadedPages:[32],requestedPages:[32],failedPages:[32],renderStart:[32],renderEnd:[32],colWidths:[32],sortField:[32],sortDir:[32],filterMode:[32],activeFilters:[32],openFilterCol:[32],pendingFilter:[32],popupPos:[32],createPickerOpen:[32],viewPopoverOpen:[32],scrollTop:[32],textblockModal:[32],jsonModal:[32],aggregations:[32],aggregationsTotal:[32],minKnownTotal:[32],init:[64],setPage:[64],setAggregations:[64]},null,{totalElements:[{totalElementsChanged:0}],item:[{itemChanged:0}]}],[2,"mrd-text-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-textarea-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32],editorReady:[32]}],[2,"mrd-time-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32]}]]]],e))));
1
+ import{p as e,b as a}from"./p-CDiBvvJU.js";export{s as setNonce}from"./p-CDiBvvJU.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-1fc897f4",[[2,"mrd-merge-view",{locale:[1],basicType:[1,"basic-type"],mostSignificantClass:[1,"most-significant-class"],fields:[16],currentHref:[1,"current-href"],currentRecord:[16],currentLabel:[1,"current-label"],step:[32],searchQuery:[32],searchResults:[32],isLoading:[32],candidate:[32],resolutions:[32],openHistoryKey:[32],setSearchResults:[64],setLoading:[64]}]]],["p-53b00783",[[2,"mrd-form",{layout:[16],locale:[1],values:[16],referenceHref:[1,"reference-href"],referenceClass:[1,"reference-class"],showCancel:[4,"show-cancel"],me:[16],formValues:[32],errors:[32],submitted:[32],setFieldValue:[64]},null,{values:[{valuesChanged:0}],me:[{meChanged:0}]}],[2,"mrd-layout-section",{items:[16],data:[16],views:[16],links:[16],locale:[1],archetypes:[16],searchQueryMap:[32],searchResultsMap:[32],imagePreviewUrl:[32],imagePreviews:[32],openHistoryField:[32],setSearchResults:[64],setViewPage:[64],setViewAggregations:[64],setViewDistinct:[64],setViewFileReference:[64],setViewCreatedObject:[64],setImagePreview:[64],openImagePreview:[64]},null,{data:[{dataChanged:0}]}],[2,"mrd-field",{item:[16],locale:[1],value:[16],historyEntries:[32],currentValue:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-document-container",{item:[16],archetype:[16],parentId:[1,"parent-id"],containerHref:[1,"container-href"],viewKey:[1,"view-key"],height:[2],locale:[1],mode:[32],canCreate:[32],targetLabel:[32]}],[2,"mrd-document-view",{archetype:[16],data:[16],locale:[1]},null,{data:[{dataChanged:0}]}],[2,"mrd-email-view",{archetype:[16],data:[16],locale:[1]},null,{data:[{dataChanged:0}]}],[262,"mrd-invoice-view",{archetype:[16],data:[16],locale:[1],statusListItems:[16]},null,{data:[{dataChanged:0}]}],[2,"mrd-boolean-field",{name:[1],label:[1],value:[4],required:[4],disabled:[4],locale:[1],checked:[32]}],[2,"mrd-currency-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],amountDisplay:[32],currency:[32],error:[32]},null,{value:[{valueChanged:0}],locale:[{localeChanged:0}]}],[2,"mrd-date-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-datetime-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32],localValue:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-document-list",{item:[16],archetype:[16],parentId:[1,"parent-id"],containerHref:[1,"container-href"],locale:[1],containers:[32],rootLoading:[32],singleContainer:[32],selectedId:[32],dropTargetId:[32],uploadingNodeId:[32],rootDropActive:[32],setDistinct:[64],setDocuments:[64],createFolder:[64],uploadFile:[64],setFileReference:[64],setCreatedHref:[64]}],[2,"mrd-email-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-file-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],multiple:[4],entries:[32],isDragging:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-hyperlink-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],internalHref:[32],internalName:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-image-field",{name:[1],label:[1],value:[16],required:[4],disabled:[4],locale:[1],accept:[1],maxSize:[2,"max-size"],multiple:[4],entries:[32],isDragging:[32],error:[32]},null,{value:[{valueChanged:0}]}],[2,"mrd-list-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],multiple:[4],locale:[1],listItems:[16],error:[32],selected:[32]}],[2,"mrd-longtext-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-number-field",{name:[1],label:[1],value:[2],placeholder:[1],required:[4],disabled:[4],locale:[1],dataType:[1,"data-type"],decimalPrecision:[2,"decimal-precision"],displayValue:[32],error:[32]},null,{value:[{valueChanged:0}],locale:[{localeChanged:0}]}],[2,"mrd-relation-field",{name:[1],label:[1],required:[4],disabled:[4],locale:[1],relatedClass:[1,"related-class"],mostSignificantClass:[1,"most-significant-class"],displayType:[1,"display-type"],editBehavior:[1,"edit-behavior"],commonRelation:[1,"common-relation"],multiple:[4],dropdownValues:[16],value:[1],searchQuery:[32],searchResults:[32],allRecords:[32],isLoading:[32],selectedItems:[32],showResults:[32],error:[32],highlightedIndex:[32],setAllRecords:[64],setSearchResults:[64],setLoading:[64]},null,{allRecords:[{allRecordsChanged:0}],value:[{valueChanged:0}]}],[2,"mrd-secret-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-table",{item:[16],parentId:[1,"parent-id"],rows:[16],locale:[1],totalElements:[2,"total-elements"],pageSize:[2,"page-size"],rowHeight:[2,"row-height"],tableHeight:[2,"table-height"],requestTimeoutMs:[2,"request-timeout-ms"],activeViewIdx:[32],loadedPages:[32],requestedPages:[32],failedPages:[32],renderStart:[32],renderEnd:[32],colWidths:[32],sortField:[32],sortDir:[32],filterMode:[32],activeFilters:[32],openFilterCol:[32],pendingFilter:[32],popupPos:[32],createPickerOpen:[32],viewPopoverOpen:[32],scrollTop:[32],textblockModal:[32],jsonModal:[32],aggregations:[32],aggregationsTotal:[32],minKnownTotal:[32],init:[64],setPage:[64],setAggregations:[64]},null,{totalElements:[{totalElementsChanged:0}],item:[{itemChanged:0}]}],[2,"mrd-text-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32]}],[2,"mrd-textarea-field",{name:[1],label:[1],value:[1],placeholder:[1],required:[4],disabled:[4],locale:[1],error:[32],editorReady:[32]}],[2,"mrd-time-field",{name:[1],label:[1],value:[1],required:[4],disabled:[4],locale:[1],error:[32]}]]]],e))));