@mmlogic/components 0.5.5 → 0.5.7

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 (84) hide show
  1. package/dist/cjs/{cell-renderer-Mx3pwONr.js → cell-renderer-pwUGEDql.js} +8 -261
  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 +234 -262
  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/components/table/mrd-table/mrd-table.css +52 -22
  24. package/dist/collection/components/table/mrd-table/mrd-table.js +175 -45
  25. package/dist/collection/components/table/mrd-table/table-parts.js +6 -3
  26. package/dist/collection/components/table/mrd-table/virtual-scroll.js +8 -3
  27. package/dist/collection/utils/format.js +0 -160
  28. package/dist/collection/utils/i18n.js +8 -96
  29. package/dist/components/cell-renderer.js +1 -1
  30. package/dist/components/format.js +1 -1
  31. package/dist/components/i18n.js +1 -1
  32. package/dist/components/mrd-date-field2.js +1 -1
  33. package/dist/components/mrd-datetime-field2.js +1 -1
  34. package/dist/components/mrd-document-list2.js +1 -1
  35. package/dist/components/mrd-document-view2.js +1 -1
  36. package/dist/components/mrd-email-field2.js +1 -1
  37. package/dist/components/mrd-email-view2.js +1 -1
  38. package/dist/components/mrd-field2.js +1 -1
  39. package/dist/components/mrd-file-field2.js +1 -1
  40. package/dist/components/mrd-image-field2.js +1 -1
  41. package/dist/components/mrd-invoice-view2.js +1 -1
  42. package/dist/components/mrd-layout-section.js +1 -1
  43. package/dist/components/mrd-longtext-field2.js +1 -1
  44. package/dist/components/mrd-merge-view.js +1 -1
  45. package/dist/components/mrd-number-field2.js +1 -1
  46. package/dist/components/mrd-secret-field2.js +1 -1
  47. package/dist/components/mrd-table2.js +1 -1
  48. package/dist/components/mrd-text-field2.js +1 -1
  49. package/dist/components/mrd-textarea-field2.js +1 -1
  50. package/dist/components/mrd-time-field2.js +1 -1
  51. package/dist/esm/{cell-renderer-UQOYlDv7.js → cell-renderer-B8rJpnq8.js} +9 -257
  52. package/dist/esm/loader.js +1 -1
  53. package/dist/esm/mosterdcomponents.js +1 -1
  54. package/dist/esm/mrd-boolean-field_25.entry.js +234 -262
  55. package/dist/esm/mrd-merge-view.entry.js +3 -3
  56. package/dist/mosterdcomponents/cell-renderer-B8u5BCK-.js.map +1 -0
  57. package/dist/mosterdcomponents/client-layout-Bc42CfJB.js.map +1 -0
  58. package/dist/mosterdcomponents/document-attachments-BufPmMRv.js.map +1 -0
  59. package/dist/mosterdcomponents/field-helpers-CUJsHr1V.js.map +1 -0
  60. package/dist/mosterdcomponents/file-upload-common-DdTDuxEU.js.map +1 -0
  61. package/dist/mosterdcomponents/format-gcecItcD.js.map +1 -0
  62. package/dist/mosterdcomponents/i18n-Ba7_jO9I.js.map +1 -0
  63. package/dist/mosterdcomponents/index-1ayBojyN.js.map +1 -0
  64. package/dist/mosterdcomponents/index-DhffneUF.js.map +1 -0
  65. package/dist/mosterdcomponents/index.esm.js.map +1 -0
  66. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  67. package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +1 -0
  68. package/dist/mosterdcomponents/p-5614d8f5.entry.js +3 -0
  69. package/dist/mosterdcomponents/{p-d31b71d9.entry.js → p-e540de6a.entry.js} +1 -1
  70. package/dist/mosterdcomponents/p-rTM1tU_M.js +1 -0
  71. package/dist/mosterdcomponents/purify.es-_duHfPgC.js.map +1 -0
  72. package/dist/mosterdcomponents/query-params-BZbQoeYF.js.map +1 -0
  73. package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +1 -0
  74. package/dist/mosterdcomponents/validation-CjjTt66G.js.map +1 -0
  75. package/dist/types/components/fields/mrd-date-field/mrd-date-field.d.ts +1 -22
  76. package/dist/types/components/fields/mrd-datetime-field/mrd-datetime-field.d.ts +2 -21
  77. package/dist/types/components/table/mrd-table/mrd-table.d.ts +47 -5
  78. package/dist/types/components/table/mrd-table/table-parts.d.ts +0 -2
  79. package/dist/types/components/table/mrd-table/virtual-scroll.d.ts +6 -1
  80. package/dist/types/components.d.ts +0 -26
  81. package/dist/types/utils/format.d.ts +0 -34
  82. package/package.json +1 -1
  83. package/dist/mosterdcomponents/p-8cc374e0.entry.js +0 -3
  84. package/dist/mosterdcomponents/p-CF--ScWr.js +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-CjjTt66G.js","sources":["src/utils/validation.ts"],"sourcesContent":["import { ClientLayoutItemFieldDataType } from '../types';\n\nexport function validateRequired(value: unknown): boolean {\n if (value === null || value === undefined) return false;\n if (typeof value === 'string') return value.trim().length > 0;\n if (Array.isArray(value)) return value.length > 0;\n if (typeof value === 'object') {\n // HyperlinkValue check\n const hv = value as { href?: unknown };\n if ('href' in hv) return typeof hv.href === 'string' && hv.href.trim().length > 0;\n // CurrencyValue check\n const cv = value as { amount?: unknown };\n if ('amount' in cv) return cv.amount !== null && cv.amount !== undefined && cv.amount !== '';\n }\n return true;\n}\n\nexport function validateEmail(value: string): boolean {\n if (!value) return true;\n return /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value);\n}\n\nexport function validateUrl(value: string): boolean {\n if (!value) return true;\n try {\n const url = new URL(value);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nexport function validateNumber(value: unknown, dataType: ClientLayoutItemFieldDataType): boolean {\n if (value === null || value === undefined || value === '') return true;\n const num = Number(value);\n if (isNaN(num)) return false;\n if (dataType === ClientLayoutItemFieldDataType.INTEGER) {\n return Number.isInteger(num);\n }\n if (dataType === ClientLayoutItemFieldDataType.PERCENTAGE) {\n return num >= 0 && num <= 100;\n }\n return true;\n}\n"],"names":[],"mappings":";;;AAEM,SAAU,gBAAgB,CAAC,KAAc,EAAA;AAC7C,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,KAAK;IACvD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;AAC7D,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;AACjD,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;;QAE7B,MAAM,EAAE,GAAG,KAA2B;QACtC,IAAI,MAAM,IAAI,EAAE;AAAE,YAAA,OAAO,OAAO,EAAE,CAAC,IAAI,KAAK,QAAQ,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;;QAEjF,MAAM,EAAE,GAAG,KAA6B;QACxC,IAAI,QAAQ,IAAI,EAAE;AAAE,YAAA,OAAO,EAAE,CAAC,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE;;AAE9F,IAAA,OAAO,IAAI;AACb;AAEM,SAAU,aAAa,CAAC,KAAa,EAAA;AACzC,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;AACvB,IAAA,OAAO,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC;AACjD;AAEM,SAAU,WAAW,CAAC,KAAa,EAAA;AACvC,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;AACvB,IAAA,IAAI;AACF,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC;QAC1B,OAAO,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ;;IAC5D,OAAA,EAAA,EAAM;AACN,QAAA,OAAO,KAAK;;AAEhB;AAEM,SAAU,cAAc,CAAC,KAAc,EAAE,QAAuC,EAAA;IACpF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;AAAE,QAAA,OAAO,IAAI;AACtE,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;IACzB,IAAI,KAAK,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;AAC5B,IAAA,IAAI,QAAQ,KAAK,6BAA6B,CAAC,OAAO,EAAE;AACtD,QAAA,OAAO,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;;AAE9B,IAAA,IAAI,QAAQ,KAAK,6BAA6B,CAAC,UAAU,EAAE;AACzD,QAAA,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG;;AAE/B,IAAA,OAAO,IAAI;AACb;;;;"}
@@ -2,20 +2,11 @@ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdDateField {
3
3
  name: string;
4
4
  label: string;
5
- /** ISO date, 'YYYY-MM-DD'. */
6
5
  value: string;
7
- /** Overrides the locale-derived pattern placeholder (e.g. 'dd-mm-jjjj'). */
8
- placeholder: string;
9
6
  required: boolean;
10
7
  disabled: boolean;
11
8
  locale: string;
12
- /** What the user sees: the value formatted for `locale`, or their raw typing. */
13
- displayValue: string;
14
9
  error: string;
15
- /** While focused the user owns the text; prop updates must not overwrite it. */
16
- private focused;
17
- /** Hidden native date input; only used as the platform picker's anchor. */
18
- private nativeInput?;
19
10
  mrdChange: EventEmitter<{
20
11
  name: string;
21
12
  value: string;
@@ -24,19 +15,7 @@ export declare class MrdDateField {
24
15
  name: string;
25
16
  value: string;
26
17
  }>;
27
- componentWillLoad(): void;
28
- valueChanged(newValue: string): void;
29
- localeChanged(): void;
30
- private patternPlaceholder;
31
- /** Parse the typed text, reformat it, and emit the ISO value. */
32
- private commit;
33
- private handleFocus;
34
- private handleInput;
18
+ private handleChange;
35
19
  private handleBlur;
36
- private handleKeyDown;
37
- /** The ISO value currently shown, so the picker opens on the right date. */
38
- private currentIso;
39
- private openPicker;
40
- private handlePickerChange;
41
20
  render(): any;
42
21
  }
@@ -2,20 +2,12 @@ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdDatetimeField {
3
3
  name: string;
4
4
  label: string;
5
- /** UTC ISO string, e.g. '2026-07-06T12:30:00Z'. */
6
5
  value: string;
7
- /** Overrides the locale-derived pattern placeholder (e.g. 'dd-mm-jjjj uu:mm'). */
8
- placeholder: string;
9
6
  required: boolean;
10
7
  disabled: boolean;
11
8
  locale: string;
12
- /** What the user sees: the value formatted for `locale`, or their raw typing. */
13
- displayValue: string;
14
9
  error: string;
15
- /** While focused the user owns the text; prop updates must not overwrite it. */
16
- private focused;
17
- /** Hidden native datetime-local input; only used as the platform picker's anchor. */
18
- private nativeInput?;
10
+ localValue: string;
19
11
  mrdChange: EventEmitter<{
20
12
  name: string;
21
13
  value: string;
@@ -26,20 +18,9 @@ export declare class MrdDatetimeField {
26
18
  }>;
27
19
  componentWillLoad(): void;
28
20
  valueChanged(newVal: string): void;
29
- localeChanged(): void;
30
21
  private utcToLocal;
31
22
  private localToUtc;
32
- private toDisplay;
33
- private patternPlaceholder;
34
- /** Parse the typed text, reformat it, and return the UTC value to emit. */
35
- private commit;
36
- private handleFocus;
37
- private handleInput;
23
+ private handleChange;
38
24
  private handleBlur;
39
- private handleKeyDown;
40
- /** The local 'YYYY-MM-DDTHH:mm' currently shown, so the picker opens on the right moment. */
41
- private currentLocal;
42
- private openPicker;
43
- private handlePickerChange;
44
25
  render(): any;
45
26
  }
@@ -17,6 +17,13 @@ export declare class MrdTable {
17
17
  private viewPopoverClickHandler;
18
18
  /** Guards against scheduling more than one column-width measurement per freeze. */
19
19
  private colWidthMeasureScheduled;
20
+ /** Drag origin of the running column resize (null = no drag in progress). */
21
+ private resizeOrigin;
22
+ /** True once the user has dragged (or auto-fitted) a column — see colWidthsUserSet usages. */
23
+ private colWidthsUserSet;
24
+ /** Set once the host drives this table through init()/setPage(). Never cleared: it has to
25
+ * survive resetPages(), which empties loadedPages — see the isPaginated getter. */
26
+ private paginationActivated;
20
27
  /** The VIEW or RELATED_VIEW layout item. Contains view config, dataClass, fromClass, actions etc. */
21
28
  item: ClientLayoutItem | null;
22
29
  /** Parent record id — required for RELATED_VIEW to build /{fromClass}/{parentId}/{dataClass}. */
@@ -35,7 +42,10 @@ export declare class MrdTable {
35
42
  /** Time (ms) to wait for setPage() before retrying a page request; after
36
43
  * MAX_RETRY_ATTEMPTS retries the page is marked failed (see failedPages). */
37
44
  requestTimeoutMs: number;
38
- /** Clamp renderEnd when totalElements shrinks (e.g. after a filter is applied). */
45
+ /** Clamp renderEnd when totalElements shrinks (e.g. after a filter is applied).
46
+ * 0 means "unknown" (hosts that rely on minKnownTotal never set it, and some reset it
47
+ * while a filter is being applied) — clamping to it would collapse the window to a
48
+ * single row, so leave the window alone and let the render pass clamp it. */
39
49
  totalElementsChanged(newVal: number): void;
40
50
  /** Reset to primary view when the item prop is replaced from outside. */
41
51
  itemChanged(newVal: ClientLayoutItem | null): void;
@@ -48,10 +58,10 @@ export declare class MrdTable {
48
58
  renderStart: number;
49
59
  renderEnd: number;
50
60
  colWidths: number[];
61
+ /** Index of the column currently being dragged by its resize handle (null = not resizing). */
62
+ resizingCol: number | null;
51
63
  sortField: string;
52
64
  sortDir: 'asc' | 'desc';
53
- /** Whether the filter UI is visible on column headers. */
54
- filterMode: boolean;
55
65
  /** Active filters keyed by field name. */
56
66
  activeFilters: Map<string, ColumnFilter>;
57
67
  /** Field name of the currently open filter popup (null = closed). */
@@ -150,6 +160,29 @@ export declare class MrdTable {
150
160
  setAggregations(data: AggregationResult): Promise<void>;
151
161
  disconnectedCallback(): void;
152
162
  componentDidRender(): void;
163
+ /** Current rendered header widths, or null when they can't be trusted (header not laid out yet). */
164
+ private measureColWidths;
165
+ /** Locks the columns at their current rendered widths if they aren't locked yet. */
166
+ private ensureColWidths;
167
+ private setColWidth;
168
+ private handleResizeStart;
169
+ private handleResizeMove;
170
+ private handleResizeEnd;
171
+ /** Double-click on the handle: widen the column to fit its widest *rendered* cell.
172
+ * Only rows currently in the virtual-scroll window are measured — off-screen pages
173
+ * aren't in the DOM at all, so this is "fit what you can see", not "fit all data". */
174
+ private handleResizeAutoFit;
175
+ /** Inline table style once the column widths are locked, undefined while still auto-layout.
176
+ * Once locked the table gets an explicit pixel width (the sum of the columns) instead of
177
+ * the stylesheet's `min-width: max-content`. max-content is re-derived from the cell
178
+ * contents, so every page that scrolled in with a longer value widened the table and
179
+ * re-proportioned all columns — the jitter this replaces.
180
+ * `minWidth: 100%` keeps an auto-measured table stretched to its container, but is dropped
181
+ * once the user resizes by hand: with it, the space freed by narrowing a column is
182
+ * redistributed over all columns, so a drag would partly spring back. */
183
+ private lockedTableStyle;
184
+ /** The resize handle rendered in the right edge of every header cell. */
185
+ private renderColResizer;
153
186
  private visibleCount;
154
187
  private sortParam;
155
188
  /** Stable ordered list: primary view first, then alternatives (from the item prop). */
@@ -165,6 +198,15 @@ export declare class MrdTable {
165
198
  private buildDataPath;
166
199
  /** Build query params for a page request from current sort, view filters, filterClass and active column filters. */
167
200
  private buildQueryParams;
201
+ /** True when the table is in paginated / virtual-scroll mode rather than driven by the
202
+ * rows prop. Mirrors the branch taken in render().
203
+ *
204
+ * The filter handlers gate their reload on this. They used to test minKnownTotal, which is
205
+ * 0 after a filter returned no rows at all — so clearing that filter reloaded nothing and
206
+ * the table stayed empty. Hosts that omit totalElements have the same problem, hence the
207
+ * sticky flag rather than loadedPages.size: resetPages() clears the loaded pages, and the
208
+ * mode must not flip back to the rows prop (and its "no results") while page 0 is in flight. */
209
+ private get isPaginated();
168
210
  private get columns();
169
211
  private get tableActions();
170
212
  private toggleCreatePicker;
@@ -179,7 +221,8 @@ export declare class MrdTable {
179
221
  private emitLoadAggregations;
180
222
  /** Reset pagination state and scroll to top (used after sort or filter change). */
181
223
  private resetPages;
182
- private handleSortClick;
224
+ /** Sorting runs through the column popup's sort section (applySort); there is no
225
+ * separate click-to-sort mode any more. */
183
226
  private applySort;
184
227
  /** Emits mrdLoadPage for a page and records the request timestamp for stale-request detection. */
185
228
  private emitLoadPage;
@@ -193,7 +236,6 @@ export declare class MrdTable {
193
236
  /** Manually retry a page the user gave up on (clicked the retry row). */
194
237
  private retryPage;
195
238
  private handleScroll;
196
- private handleFilterToggle;
197
239
  private handleFilterOpen;
198
240
  private closeFilterPopup;
199
241
  private openTextblockModal;
@@ -35,7 +35,6 @@ export declare const JsonModal: FunctionalComponent<{
35
35
  onClose: () => void;
36
36
  }>;
37
37
  export interface ToolbarCallbacks {
38
- onFilterToggle: () => void;
39
38
  onClearAllFilters: () => void;
40
39
  onViewSwitch: (idx: number) => void;
41
40
  onToggleViewPopover: (e: MouseEvent) => void;
@@ -47,7 +46,6 @@ export interface ToolbarCallbacks {
47
46
  }
48
47
  export declare const Toolbar: FunctionalComponent<{
49
48
  locale: string;
50
- filterMode: boolean;
51
49
  filterCount: number;
52
50
  actions: TableAction[];
53
51
  views: Array<{
@@ -12,7 +12,12 @@ export declare const REQUEST_TIMEOUT_MS = 15000;
12
12
  /** Max retries for a stale page request before giving up and showing a retry row. */
13
13
  export declare const MAX_RETRY_ATTEMPTS = 3;
14
14
  export declare function visibleCount(tableHeight: number, rowHeight: number): number;
15
- /** Render window (with buffer) for the given scroll offset. */
15
+ /** Render window (with buffer) for the given scroll offset.
16
+ * total <= 0 means "not known yet" (no totalElements prop, no aggregation total and no page
17
+ * loaded — e.g. right after a filter reset), *not* "no rows". Clamping to total - 1 would
18
+ * collapse the window to renderEnd = -1, so nothing renders and no page is ever requested;
19
+ * the window is left unclamped instead and the render pass clamps it against
20
+ * effectiveTotal once real data has landed. */
16
21
  export declare function computeWindow(scrollTop: number, rowHeight: number, tableHeight: number, total: number): {
17
22
  renderStart: number;
18
23
  renderEnd: number;
@@ -85,17 +85,11 @@ export namespace Components {
85
85
  * @default ''
86
86
  */
87
87
  "name": string;
88
- /**
89
- * Overrides the locale-derived pattern placeholder (e.g. 'dd-mm-jjjj').
90
- * @default ''
91
- */
92
- "placeholder": string;
93
88
  /**
94
89
  * @default false
95
90
  */
96
91
  "required": boolean;
97
92
  /**
98
- * ISO date, 'YYYY-MM-DD'.
99
93
  * @default ''
100
94
  */
101
95
  "value": string;
@@ -117,17 +111,11 @@ export namespace Components {
117
111
  * @default ''
118
112
  */
119
113
  "name": string;
120
- /**
121
- * Overrides the locale-derived pattern placeholder (e.g. 'dd-mm-jjjj uu:mm').
122
- * @default ''
123
- */
124
- "placeholder": string;
125
114
  /**
126
115
  * @default false
127
116
  */
128
117
  "required": boolean;
129
118
  /**
130
- * UTC ISO string, e.g. '2026-07-06T12:30:00Z'.
131
119
  * @default ''
132
120
  */
133
121
  "value": string;
@@ -1749,17 +1737,11 @@ declare namespace LocalJSX {
1749
1737
  "name"?: string;
1750
1738
  "onMrdBlur"?: (event: MrdDateFieldCustomEvent<{ name: string; value: string }>) => void;
1751
1739
  "onMrdChange"?: (event: MrdDateFieldCustomEvent<{ name: string; value: string }>) => void;
1752
- /**
1753
- * Overrides the locale-derived pattern placeholder (e.g. 'dd-mm-jjjj').
1754
- * @default ''
1755
- */
1756
- "placeholder"?: string;
1757
1740
  /**
1758
1741
  * @default false
1759
1742
  */
1760
1743
  "required"?: boolean;
1761
1744
  /**
1762
- * ISO date, 'YYYY-MM-DD'.
1763
1745
  * @default ''
1764
1746
  */
1765
1747
  "value"?: string;
@@ -1783,17 +1765,11 @@ declare namespace LocalJSX {
1783
1765
  "name"?: string;
1784
1766
  "onMrdBlur"?: (event: MrdDatetimeFieldCustomEvent<{ name: string; value: string }>) => void;
1785
1767
  "onMrdChange"?: (event: MrdDatetimeFieldCustomEvent<{ name: string; value: string }>) => void;
1786
- /**
1787
- * Overrides the locale-derived pattern placeholder (e.g. 'dd-mm-jjjj uu:mm').
1788
- * @default ''
1789
- */
1790
- "placeholder"?: string;
1791
1768
  /**
1792
1769
  * @default false
1793
1770
  */
1794
1771
  "required"?: boolean;
1795
1772
  /**
1796
- * UTC ISO string, e.g. '2026-07-06T12:30:00Z'.
1797
1773
  * @default ''
1798
1774
  */
1799
1775
  "value"?: string;
@@ -2773,7 +2749,6 @@ declare namespace LocalJSX {
2773
2749
  "name": string;
2774
2750
  "label": string;
2775
2751
  "value": string;
2776
- "placeholder": string;
2777
2752
  "required": boolean;
2778
2753
  "disabled": boolean;
2779
2754
  "locale": string;
@@ -2782,7 +2757,6 @@ declare namespace LocalJSX {
2782
2757
  "name": string;
2783
2758
  "label": string;
2784
2759
  "value": string;
2785
- "placeholder": string;
2786
2760
  "required": boolean;
2787
2761
  "disabled": boolean;
2788
2762
  "locale": string;
@@ -4,38 +4,4 @@ export declare function formatPercentage(value: number, locale: string, decimalP
4
4
  export declare function formatDate(value: string | Date, locale: string): string;
5
5
  export declare function formatDateTime(value: string | Date, locale: string): string;
6
6
  export declare function formatTime(value: string, locale: string): string;
7
- /** Tokens used to build the input placeholder, e.g. { day: 'dd', month: 'mm', year: 'jjjj' }. */
8
- export interface DatePatternTokens {
9
- day: string;
10
- month: string;
11
- year: string;
12
- hour?: string;
13
- minute?: string;
14
- }
15
- /**
16
- * Placeholder showing the locale's date order, e.g. 'dd-mm-jjjj' (nl-NL) or
17
- * 'mm/dd/yyyy' (en-US). Pass `hour`/`minute` tokens to include the time part.
18
- */
19
- export declare function localeDatePattern(locale: string, tokens: DatePatternTokens): string;
20
- /**
21
- * Parses a date the user typed in their own locale format → 'YYYY-MM-DD'.
22
- * Accepts any separator, one- or two-digit day/month, two-digit years, and
23
- * plain ISO input (pasted values). Returns null when it is not a valid date.
24
- */
25
- export declare function parseLocalizedDate(input: string, locale: string): string | null;
26
- /**
27
- * Parses a date+time the user typed in their own locale format →
28
- * 'YYYY-MM-DDTHH:mm' in local time (the shape mrd-datetime-field converts to
29
- * UTC before emitting). A missing time defaults to 00:00; am/pm is recognised
30
- * both in English and in the locale's own markers.
31
- */
32
- export declare function parseLocalizedDateTime(input: string, locale: string): string | null;
33
- /**
34
- * 'YYYY-MM-DD' → localized display string. Parsed as a *local* date, unlike
35
- * formatDate(), which would read a date-only string as UTC midnight and shift
36
- * the day in negative-offset timezones.
37
- */
38
- export declare function formatIsoDate(iso: string, locale: string): string;
39
- /** 'YYYY-MM-DDTHH:mm' in local time → localized display string. */
40
- export declare function formatLocalDateTime(local: string, locale: string): string;
41
7
  export declare function parseLocalizedNumber(str: string, locale: string): number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmlogic/components",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "Stencil.js web component library for dynamic forms and virtual-scroll data tables",
5
5
  "license": "MIT",
6
6
  "author": "Mosterd",