@mmlogic/components 0.3.9 → 0.3.11
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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mosterdcomponents.cjs.js +1 -1
- package/dist/cjs/{mrd-boolean-field_22.cjs.entry.js → mrd-boolean-field_23.cjs.entry.js} +684 -41
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/mrd-document-container/mrd-document-container.js +421 -0
- package/dist/collection/components/mrd-document-container/mrd-document-container.scss +79 -0
- package/dist/collection/components/mrd-document-list/mrd-document-list.js +653 -16
- package/dist/collection/components/mrd-document-list/mrd-document-list.scss +66 -0
- package/dist/collection/components/mrd-document-view/mrd-document-view.js +1 -1
- package/dist/collection/components/mrd-email-field/mrd-email-field.js +1 -1
- package/dist/collection/components/mrd-file-field/mrd-file-field.js +1 -1
- package/dist/collection/components/mrd-image-field/mrd-image-field.js +1 -1
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.js +165 -14
- package/dist/collection/components/mrd-layout-section/mrd-layout-section.scss +0 -44
- package/dist/collection/components/mrd-longtext-field/mrd-longtext-field.js +1 -1
- package/dist/collection/components/mrd-number-field/mrd-number-field.js +1 -1
- package/dist/collection/components/mrd-secret-field/mrd-secret-field.js +2 -2
- package/dist/collection/components/mrd-text-field/mrd-text-field.js +1 -1
- package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +1 -1
- package/dist/collection/components/mrd-time-field/mrd-time-field.js +1 -1
- package/dist/collection/dev/app.js +47 -0
- package/dist/collection/utils/i18n.js +12 -0
- package/dist/components/i18n.js +1 -1
- package/dist/components/mrd-document-container.d.ts +11 -0
- package/dist/components/mrd-document-container.js +1 -0
- package/dist/components/mrd-document-container2.js +1 -0
- package/dist/components/mrd-document-list2.js +1 -1
- package/dist/components/mrd-document-view2.js +1 -1
- package/dist/components/mrd-email-field2.js +1 -1
- package/dist/components/mrd-file-field2.js +1 -1
- package/dist/components/mrd-image-field2.js +1 -1
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-longtext-field2.js +1 -1
- package/dist/components/mrd-number-field2.js +1 -1
- package/dist/components/mrd-secret-field2.js +1 -1
- package/dist/components/mrd-text-field2.js +1 -1
- package/dist/components/mrd-textarea-field2.js +1 -1
- package/dist/components/mrd-time-field2.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mosterdcomponents.js +1 -1
- package/dist/esm/{mrd-boolean-field_22.entry.js → mrd-boolean-field_23.entry.js} +684 -42
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/p-a9618055.entry.js +1 -0
- package/dist/types/components/mrd-document-container/mrd-document-container.d.ts +99 -0
- package/dist/types/components/mrd-document-list/mrd-document-list.d.ts +126 -1
- package/dist/types/components/mrd-layout-section/mrd-layout-section.d.ts +32 -5
- package/dist/types/components.d.ts +250 -0
- package/dist/types/types/client-layout.d.ts +5 -0
- package/package.json +1 -1
- package/dist/mosterdcomponents/p-b547291b.entry.js +0 -1
|
@@ -118,6 +118,52 @@ export namespace Components {
|
|
|
118
118
|
*/
|
|
119
119
|
"value": string;
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Owns a document collection view: a single toolbar (view switch + collection
|
|
123
|
+
* actions like "New folder", and — later — upload / drag-drop) plus the two
|
|
124
|
+
* interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
|
|
125
|
+
* table (`mrd-table`).
|
|
126
|
+
* `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
|
|
127
|
+
* forwards the re-emitted load/navigate/action events to the host. The embedded
|
|
128
|
+
* table/list keep their `data-view` / `data-doclist` attributes so the host's
|
|
129
|
+
* existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
|
|
130
|
+
* (recursive querySelector) still resolve them unchanged.
|
|
131
|
+
*/
|
|
132
|
+
interface MrdDocumentContainer {
|
|
133
|
+
/**
|
|
134
|
+
* Resolved `commons.document` archetype binding for the folder tree.
|
|
135
|
+
*/
|
|
136
|
+
"archetype": ClientArchetype;
|
|
137
|
+
/**
|
|
138
|
+
* Canonical parent href, forwarded to the folder tree for single-container seeding.
|
|
139
|
+
* @default ''
|
|
140
|
+
*/
|
|
141
|
+
"containerHref": string;
|
|
142
|
+
/**
|
|
143
|
+
* Fixed height (px) of the scrolling folder-tree body — the toolbar stays put on top, Finder-style. The table manages its own height.
|
|
144
|
+
* @default 460
|
|
145
|
+
*/
|
|
146
|
+
"height": number;
|
|
147
|
+
/**
|
|
148
|
+
* The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
|
|
149
|
+
* @default null
|
|
150
|
+
*/
|
|
151
|
+
"item": ClientLayoutItem | null;
|
|
152
|
+
/**
|
|
153
|
+
* @default navigator.language
|
|
154
|
+
*/
|
|
155
|
+
"locale": string;
|
|
156
|
+
/**
|
|
157
|
+
* Parent record id — required for RELATED_VIEW path building.
|
|
158
|
+
* @default ''
|
|
159
|
+
*/
|
|
160
|
+
"parentId": string;
|
|
161
|
+
/**
|
|
162
|
+
* Lookup key used for the embedded `data-doclist` / `data-view` attributes.
|
|
163
|
+
* @default ''
|
|
164
|
+
*/
|
|
165
|
+
"viewKey": string;
|
|
166
|
+
}
|
|
121
167
|
/**
|
|
122
168
|
* Archetype-driven document collection view. Renders documents as a lazy,
|
|
123
169
|
* file-explorer-style folder tree, grouped by the `commons.document` archetype's
|
|
@@ -138,6 +184,15 @@ export namespace Components {
|
|
|
138
184
|
* Resolved `commons.document` binding: slot name → concrete field/relation name.
|
|
139
185
|
*/
|
|
140
186
|
"archetype": ClientArchetype;
|
|
187
|
+
/**
|
|
188
|
+
* Canonical parent href (`/{base}/{tenant}/{fromClass}/{parentId}`) supplied by the host. When the RELATED_VIEW's `inverseRelation` equals the archetype `container` slot, this seeds a single container so an empty dossier still accepts file drops and folder creation.
|
|
189
|
+
* @default ''
|
|
190
|
+
*/
|
|
191
|
+
"containerHref": string;
|
|
192
|
+
/**
|
|
193
|
+
* Start creating a folder under the current target. Called by the host toolbar (mrd-document-container). No-op when there is no valid target.
|
|
194
|
+
*/
|
|
195
|
+
"createFolder": () => Promise<void>;
|
|
141
196
|
/**
|
|
142
197
|
* The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
|
|
143
198
|
* @default null
|
|
@@ -152,6 +207,10 @@ export namespace Components {
|
|
|
152
207
|
* @default ''
|
|
153
208
|
*/
|
|
154
209
|
"parentId": string;
|
|
210
|
+
/**
|
|
211
|
+
* Host callback with the created document's self href, so the optimistic row becomes navigable without waiting for a reload.
|
|
212
|
+
*/
|
|
213
|
+
"setCreatedHref": (href: string) => Promise<void>;
|
|
155
214
|
/**
|
|
156
215
|
* Inject distinct values for a node. `nodeId` is the sentinel root (containers) or a container node id (folders).
|
|
157
216
|
*/
|
|
@@ -160,6 +219,10 @@ export namespace Components {
|
|
|
160
219
|
* Inject the documents loaded for one folder node.
|
|
161
220
|
*/
|
|
162
221
|
"setDocuments": (nodeId: string, docs: DocRow[]) => Promise<void>;
|
|
222
|
+
/**
|
|
223
|
+
* Host callback with the uploaded file reference. Builds the create payload from the archetype slots and requests the new document.
|
|
224
|
+
*/
|
|
225
|
+
"setFileReference": (uri: string) => Promise<void>;
|
|
163
226
|
}
|
|
164
227
|
/**
|
|
165
228
|
* Archetype-driven single-document view. Given a `commons.document` binding and a
|
|
@@ -394,10 +457,18 @@ export namespace Components {
|
|
|
394
457
|
* Inject aggregation totals into an embedded mrd-table for a VIEW or RELATED_VIEW item.
|
|
395
458
|
*/
|
|
396
459
|
"setViewAggregations": (name: string, data: any) => Promise<void>;
|
|
460
|
+
/**
|
|
461
|
+
* Inject the created document's href after a file-drop create, so the optimistic row becomes navigable (see mrdCreateObject).
|
|
462
|
+
*/
|
|
463
|
+
"setViewCreatedObject": (name: string, href: string) => Promise<void>;
|
|
397
464
|
/**
|
|
398
465
|
* Inject distinct values into an embedded mrd-document-list for a document view.
|
|
399
466
|
*/
|
|
400
467
|
"setViewDistinct": (name: string, nodeId: string, values: DistinctValue1[]) => Promise<void>;
|
|
468
|
+
/**
|
|
469
|
+
* Inject the uploaded file reference for a dropped file, so the document view can request creation of the new document (see mrdViewUpload).
|
|
470
|
+
*/
|
|
471
|
+
"setViewFileReference": (name: string, uri: string) => Promise<void>;
|
|
401
472
|
/**
|
|
402
473
|
* Inject rows for a VIEW / RELATED_VIEW item. - Table view: injects the page into the embedded mrd-table (pass totalElements/hasNext). - Document view: pass `nodeId` to route the rows to that folder node in the embedded mrd-document-list. Folder loading is just a filtered list load, so it reuses this method.
|
|
403
474
|
*/
|
|
@@ -750,6 +821,10 @@ export interface MrdDatetimeFieldCustomEvent<T> extends CustomEvent<T> {
|
|
|
750
821
|
detail: T;
|
|
751
822
|
target: HTMLMrdDatetimeFieldElement;
|
|
752
823
|
}
|
|
824
|
+
export interface MrdDocumentContainerCustomEvent<T> extends CustomEvent<T> {
|
|
825
|
+
detail: T;
|
|
826
|
+
target: HTMLMrdDocumentContainerElement;
|
|
827
|
+
}
|
|
753
828
|
export interface MrdDocumentListCustomEvent<T> extends CustomEvent<T> {
|
|
754
829
|
detail: T;
|
|
755
830
|
target: HTMLMrdDocumentListElement;
|
|
@@ -895,10 +970,49 @@ declare global {
|
|
|
895
970
|
prototype: HTMLMrdDatetimeFieldElement;
|
|
896
971
|
new (): HTMLMrdDatetimeFieldElement;
|
|
897
972
|
};
|
|
973
|
+
interface HTMLMrdDocumentContainerElementEventMap {
|
|
974
|
+
"mrdLoadPage": { page: number; sort: string; path: string; qs: string; nodeId?: string };
|
|
975
|
+
"mrdLoadDistinct": { nodeId: string; distinct: string; path: string; qs: string };
|
|
976
|
+
"mrdLoadAggregations": { path: string; qs: string; aggQs: string };
|
|
977
|
+
"mrdNavigate": { href?: string; label: string };
|
|
978
|
+
"mrdAction": { action: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string };
|
|
979
|
+
"mrdUpdateObject": { href: string; values: Record<string, unknown> };
|
|
980
|
+
"mrdUpload": { file: File };
|
|
981
|
+
"mrdCreateObject": { path: string; values: Record<string, unknown> };
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* Owns a document collection view: a single toolbar (view switch + collection
|
|
985
|
+
* actions like "New folder", and — later — upload / drag-drop) plus the two
|
|
986
|
+
* interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
|
|
987
|
+
* table (`mrd-table`).
|
|
988
|
+
* `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
|
|
989
|
+
* forwards the re-emitted load/navigate/action events to the host. The embedded
|
|
990
|
+
* table/list keep their `data-view` / `data-doclist` attributes so the host's
|
|
991
|
+
* existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
|
|
992
|
+
* (recursive querySelector) still resolve them unchanged.
|
|
993
|
+
*/
|
|
994
|
+
interface HTMLMrdDocumentContainerElement extends Components.MrdDocumentContainer, HTMLStencilElement {
|
|
995
|
+
addEventListener<K extends keyof HTMLMrdDocumentContainerElementEventMap>(type: K, listener: (this: HTMLMrdDocumentContainerElement, ev: MrdDocumentContainerCustomEvent<HTMLMrdDocumentContainerElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
996
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
997
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
998
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
999
|
+
removeEventListener<K extends keyof HTMLMrdDocumentContainerElementEventMap>(type: K, listener: (this: HTMLMrdDocumentContainerElement, ev: MrdDocumentContainerCustomEvent<HTMLMrdDocumentContainerElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1000
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1001
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1002
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1003
|
+
}
|
|
1004
|
+
var HTMLMrdDocumentContainerElement: {
|
|
1005
|
+
prototype: HTMLMrdDocumentContainerElement;
|
|
1006
|
+
new (): HTMLMrdDocumentContainerElement;
|
|
1007
|
+
};
|
|
898
1008
|
interface HTMLMrdDocumentListElementEventMap {
|
|
899
1009
|
"mrdLoadDistinct": { nodeId: string; distinct: string; path: string; qs: string };
|
|
900
1010
|
"mrdLoadPage": { nodeId: string; page: number; sort: string; path: string; qs: string };
|
|
901
1011
|
"mrdNavigate": { href?: string; label: string };
|
|
1012
|
+
"mrdCanCreate": boolean;
|
|
1013
|
+
"mrdUpdateObject": { href: string; values: Record<string, unknown> };
|
|
1014
|
+
"mrdUpload": { file: File };
|
|
1015
|
+
"mrdCreateObject": { path: string; values: Record<string, unknown> };
|
|
902
1016
|
}
|
|
903
1017
|
/**
|
|
904
1018
|
* Archetype-driven document collection view. Renders documents as a lazy,
|
|
@@ -1081,6 +1195,9 @@ declare global {
|
|
|
1081
1195
|
"mrdViewAction": { name: string; action: string; dataClass: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string };
|
|
1082
1196
|
"mrdLoadViewAggregations": { name: string; dataClass: string; path: string; qs: string; aggQs: string };
|
|
1083
1197
|
"mrdLoadViewDistinct": { name: string; nodeId: string; distinct: string; path: string; qs: string };
|
|
1198
|
+
"mrdUpdateObject": { href: string; values: Record<string, unknown> };
|
|
1199
|
+
"mrdViewUpload": { name: string; file: File };
|
|
1200
|
+
"mrdCreateObject": { name: string; path: string; values: Record<string, unknown> };
|
|
1084
1201
|
}
|
|
1085
1202
|
interface HTMLMrdLayoutSectionElement extends Components.MrdLayoutSection, HTMLStencilElement {
|
|
1086
1203
|
addEventListener<K extends keyof HTMLMrdLayoutSectionElementEventMap>(type: K, listener: (this: HTMLMrdLayoutSectionElement, ev: MrdLayoutSectionCustomEvent<HTMLMrdLayoutSectionElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -1268,6 +1385,7 @@ declare global {
|
|
|
1268
1385
|
"mrd-currency-field": HTMLMrdCurrencyFieldElement;
|
|
1269
1386
|
"mrd-date-field": HTMLMrdDateFieldElement;
|
|
1270
1387
|
"mrd-datetime-field": HTMLMrdDatetimeFieldElement;
|
|
1388
|
+
"mrd-document-container": HTMLMrdDocumentContainerElement;
|
|
1271
1389
|
"mrd-document-list": HTMLMrdDocumentListElement;
|
|
1272
1390
|
"mrd-document-view": HTMLMrdDocumentViewElement;
|
|
1273
1391
|
"mrd-email-field": HTMLMrdEmailFieldElement;
|
|
@@ -1401,6 +1519,84 @@ declare namespace LocalJSX {
|
|
|
1401
1519
|
*/
|
|
1402
1520
|
"value"?: string;
|
|
1403
1521
|
}
|
|
1522
|
+
/**
|
|
1523
|
+
* Owns a document collection view: a single toolbar (view switch + collection
|
|
1524
|
+
* actions like "New folder", and — later — upload / drag-drop) plus the two
|
|
1525
|
+
* interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
|
|
1526
|
+
* table (`mrd-table`).
|
|
1527
|
+
* `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
|
|
1528
|
+
* forwards the re-emitted load/navigate/action events to the host. The embedded
|
|
1529
|
+
* table/list keep their `data-view` / `data-doclist` attributes so the host's
|
|
1530
|
+
* existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
|
|
1531
|
+
* (recursive querySelector) still resolve them unchanged.
|
|
1532
|
+
*/
|
|
1533
|
+
interface MrdDocumentContainer {
|
|
1534
|
+
/**
|
|
1535
|
+
* Resolved `commons.document` archetype binding for the folder tree.
|
|
1536
|
+
*/
|
|
1537
|
+
"archetype": ClientArchetype;
|
|
1538
|
+
/**
|
|
1539
|
+
* Canonical parent href, forwarded to the folder tree for single-container seeding.
|
|
1540
|
+
* @default ''
|
|
1541
|
+
*/
|
|
1542
|
+
"containerHref"?: string;
|
|
1543
|
+
/**
|
|
1544
|
+
* Fixed height (px) of the scrolling folder-tree body — the toolbar stays put on top, Finder-style. The table manages its own height.
|
|
1545
|
+
* @default 460
|
|
1546
|
+
*/
|
|
1547
|
+
"height"?: number;
|
|
1548
|
+
/**
|
|
1549
|
+
* The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
|
|
1550
|
+
* @default null
|
|
1551
|
+
*/
|
|
1552
|
+
"item"?: ClientLayoutItem | null;
|
|
1553
|
+
/**
|
|
1554
|
+
* @default navigator.language
|
|
1555
|
+
*/
|
|
1556
|
+
"locale"?: string;
|
|
1557
|
+
/**
|
|
1558
|
+
* A table toolbar action was triggered.
|
|
1559
|
+
*/
|
|
1560
|
+
"onMrdAction"?: (event: MrdDocumentContainerCustomEvent<{ action: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string }>) => void;
|
|
1561
|
+
/**
|
|
1562
|
+
* Create a new document from an uploaded file; host POSTs `values` to `path`.
|
|
1563
|
+
*/
|
|
1564
|
+
"onMrdCreateObject"?: (event: MrdDocumentContainerCustomEvent<{ path: string; values: Record<string, unknown> }>) => void;
|
|
1565
|
+
/**
|
|
1566
|
+
* Re-emitted from the embedded table.
|
|
1567
|
+
*/
|
|
1568
|
+
"onMrdLoadAggregations"?: (event: MrdDocumentContainerCustomEvent<{ path: string; qs: string; aggQs: string }>) => void;
|
|
1569
|
+
/**
|
|
1570
|
+
* Re-emitted from the embedded folder tree.
|
|
1571
|
+
*/
|
|
1572
|
+
"onMrdLoadDistinct"?: (event: MrdDocumentContainerCustomEvent<{ nodeId: string; distinct: string; path: string; qs: string }>) => void;
|
|
1573
|
+
/**
|
|
1574
|
+
* Re-emitted from the embedded list/table. `nodeId` present for a folder load.
|
|
1575
|
+
*/
|
|
1576
|
+
"onMrdLoadPage"?: (event: MrdDocumentContainerCustomEvent<{ page: number; sort: string; path: string; qs: string; nodeId?: string }>) => void;
|
|
1577
|
+
/**
|
|
1578
|
+
* A row / document was activated. Host routes to the object page.
|
|
1579
|
+
*/
|
|
1580
|
+
"onMrdNavigate"?: (event: MrdDocumentContainerCustomEvent<{ href?: string; label: string }>) => void;
|
|
1581
|
+
/**
|
|
1582
|
+
* Generic "update an existing object" request, re-emitted from the folder tree (a document was dragged into another folder/container).
|
|
1583
|
+
*/
|
|
1584
|
+
"onMrdUpdateObject"?: (event: MrdDocumentContainerCustomEvent<{ href: string; values: Record<string, unknown> }>) => void;
|
|
1585
|
+
/**
|
|
1586
|
+
* An external file was dropped on a folder; host uploads and calls back.
|
|
1587
|
+
*/
|
|
1588
|
+
"onMrdUpload"?: (event: MrdDocumentContainerCustomEvent<{ file: File }>) => void;
|
|
1589
|
+
/**
|
|
1590
|
+
* Parent record id — required for RELATED_VIEW path building.
|
|
1591
|
+
* @default ''
|
|
1592
|
+
*/
|
|
1593
|
+
"parentId"?: string;
|
|
1594
|
+
/**
|
|
1595
|
+
* Lookup key used for the embedded `data-doclist` / `data-view` attributes.
|
|
1596
|
+
* @default ''
|
|
1597
|
+
*/
|
|
1598
|
+
"viewKey"?: string;
|
|
1599
|
+
}
|
|
1404
1600
|
/**
|
|
1405
1601
|
* Archetype-driven document collection view. Renders documents as a lazy,
|
|
1406
1602
|
* file-explorer-style folder tree, grouped by the `commons.document` archetype's
|
|
@@ -1421,6 +1617,11 @@ declare namespace LocalJSX {
|
|
|
1421
1617
|
* Resolved `commons.document` binding: slot name → concrete field/relation name.
|
|
1422
1618
|
*/
|
|
1423
1619
|
"archetype": ClientArchetype;
|
|
1620
|
+
/**
|
|
1621
|
+
* Canonical parent href (`/{base}/{tenant}/{fromClass}/{parentId}`) supplied by the host. When the RELATED_VIEW's `inverseRelation` equals the archetype `container` slot, this seeds a single container so an empty dossier still accepts file drops and folder creation.
|
|
1622
|
+
* @default ''
|
|
1623
|
+
*/
|
|
1624
|
+
"containerHref"?: string;
|
|
1424
1625
|
/**
|
|
1425
1626
|
* The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
|
|
1426
1627
|
* @default null
|
|
@@ -1430,6 +1631,14 @@ declare namespace LocalJSX {
|
|
|
1430
1631
|
* @default navigator.language
|
|
1431
1632
|
*/
|
|
1432
1633
|
"locale"?: string;
|
|
1634
|
+
/**
|
|
1635
|
+
* Emitted whenever the "can create a folder here" state changes, so a host toolbar (mrd-document-container) can enable/disable its New folder button.
|
|
1636
|
+
*/
|
|
1637
|
+
"onMrdCanCreate"?: (event: MrdDocumentListCustomEvent<boolean>) => void;
|
|
1638
|
+
/**
|
|
1639
|
+
* Fired once the dropped file is uploaded — requests creation of a new document. Host POSTs `values` to `path` (on a 400 it can open the create form itself).
|
|
1640
|
+
*/
|
|
1641
|
+
"onMrdCreateObject"?: (event: MrdDocumentListCustomEvent<{ path: string; values: Record<string, unknown> }>) => void;
|
|
1433
1642
|
/**
|
|
1434
1643
|
* Request distinct values for a field/relation. Host fetches `{path}?{qs}` and calls `setDistinct(nodeId, values)`.
|
|
1435
1644
|
*/
|
|
@@ -1442,6 +1651,14 @@ declare namespace LocalJSX {
|
|
|
1442
1651
|
* A document row was clicked. Host routes to the document object page.
|
|
1443
1652
|
*/
|
|
1444
1653
|
"onMrdNavigate"?: (event: MrdDocumentListCustomEvent<{ href?: string; label: string }>) => void;
|
|
1654
|
+
/**
|
|
1655
|
+
* Generic "update an existing object" request — fired when a document is dragged into another folder/container. Host PATCHes `href` with `values` (no move/folder knowledge needed). `values` carries the new folder string (or null for the container root) and, on a cross-container move, the new container relation href.
|
|
1656
|
+
*/
|
|
1657
|
+
"onMrdUpdateObject"?: (event: MrdDocumentListCustomEvent<{ href: string; values: Record<string, unknown> }>) => void;
|
|
1658
|
+
/**
|
|
1659
|
+
* An external file was dropped onto a folder/container. Same flow as mrd-form: host uploads the file and calls `setFileReference(uri)` with the result.
|
|
1660
|
+
*/
|
|
1661
|
+
"onMrdUpload"?: (event: MrdDocumentListCustomEvent<{ file: File }>) => void;
|
|
1445
1662
|
/**
|
|
1446
1663
|
* Parent record id — required for RELATED_VIEW path building.
|
|
1447
1664
|
* @default ''
|
|
@@ -1698,6 +1915,10 @@ declare namespace LocalJSX {
|
|
|
1698
1915
|
* @default navigator.language
|
|
1699
1916
|
*/
|
|
1700
1917
|
"locale"?: string;
|
|
1918
|
+
/**
|
|
1919
|
+
* Create a new document from an uploaded file; host POSTs `values` to `path`, then calls setViewCreatedObject(name, href) with the new object's href.
|
|
1920
|
+
*/
|
|
1921
|
+
"onMrdCreateObject"?: (event: MrdLayoutSectionCustomEvent<{ name: string; path: string; values: Record<string, unknown> }>) => void;
|
|
1701
1922
|
"onMrdDownload"?: (event: MrdLayoutSectionCustomEvent<{ href: string; fileName: string }>) => void;
|
|
1702
1923
|
/**
|
|
1703
1924
|
* Fired once on load for each IMAGE field that has an href; host resolves the URL and calls setImagePreview().
|
|
@@ -1717,10 +1938,18 @@ declare namespace LocalJSX {
|
|
|
1717
1938
|
"onMrdLoadViewPage"?: (event: MrdLayoutSectionCustomEvent<{ name: string; page: number; sort: string; path: string; qs: string; nodeId?: string }>) => void;
|
|
1718
1939
|
"onMrdNavigate"?: (event: MrdLayoutSectionCustomEvent<{ href?: string; label: string; navigate?: ClientLayoutItemNavigate }>) => void;
|
|
1719
1940
|
"onMrdSearch"?: (event: MrdLayoutSectionCustomEvent<{ query: string; dataClass: string }>) => void;
|
|
1941
|
+
/**
|
|
1942
|
+
* Generic "update an existing object" request from an embedded document view (a document dragged into another folder). Host PATCHes `href` with `values`.
|
|
1943
|
+
*/
|
|
1944
|
+
"onMrdUpdateObject"?: (event: MrdLayoutSectionCustomEvent<{ href: string; values: Record<string, unknown> }>) => void;
|
|
1720
1945
|
/**
|
|
1721
1946
|
* Re-emitted from an embedded mrd-table's mrdAction; host builds the target URL from dataClass.
|
|
1722
1947
|
*/
|
|
1723
1948
|
"onMrdViewAction"?: (event: MrdLayoutSectionCustomEvent<{ name: string; action: string; dataClass: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string }>) => void;
|
|
1949
|
+
/**
|
|
1950
|
+
* An external file was dropped on a document view; host uploads and calls setViewFileReference(name, uri).
|
|
1951
|
+
*/
|
|
1952
|
+
"onMrdViewUpload"?: (event: MrdLayoutSectionCustomEvent<{ name: string; file: File }>) => void;
|
|
1724
1953
|
/**
|
|
1725
1954
|
* Legacy: view metadata map (ClientDashboardMetadata.views). Not needed in new flat format.
|
|
1726
1955
|
* @default {}
|
|
@@ -2107,8 +2336,16 @@ declare namespace LocalJSX {
|
|
|
2107
2336
|
"disabled": boolean;
|
|
2108
2337
|
"locale": string;
|
|
2109
2338
|
}
|
|
2339
|
+
interface MrdDocumentContainerAttributes {
|
|
2340
|
+
"parentId": string;
|
|
2341
|
+
"containerHref": string;
|
|
2342
|
+
"viewKey": string;
|
|
2343
|
+
"height": number;
|
|
2344
|
+
"locale": string;
|
|
2345
|
+
}
|
|
2110
2346
|
interface MrdDocumentListAttributes {
|
|
2111
2347
|
"parentId": string;
|
|
2348
|
+
"containerHref": string;
|
|
2112
2349
|
"locale": string;
|
|
2113
2350
|
}
|
|
2114
2351
|
interface MrdDocumentViewAttributes {
|
|
@@ -2254,6 +2491,7 @@ declare namespace LocalJSX {
|
|
|
2254
2491
|
"mrd-currency-field": Omit<MrdCurrencyField, keyof MrdCurrencyFieldAttributes> & { [K in keyof MrdCurrencyField & keyof MrdCurrencyFieldAttributes]?: MrdCurrencyField[K] } & { [K in keyof MrdCurrencyField & keyof MrdCurrencyFieldAttributes as `attr:${K}`]?: MrdCurrencyFieldAttributes[K] } & { [K in keyof MrdCurrencyField & keyof MrdCurrencyFieldAttributes as `prop:${K}`]?: MrdCurrencyField[K] };
|
|
2255
2492
|
"mrd-date-field": Omit<MrdDateField, keyof MrdDateFieldAttributes> & { [K in keyof MrdDateField & keyof MrdDateFieldAttributes]?: MrdDateField[K] } & { [K in keyof MrdDateField & keyof MrdDateFieldAttributes as `attr:${K}`]?: MrdDateFieldAttributes[K] } & { [K in keyof MrdDateField & keyof MrdDateFieldAttributes as `prop:${K}`]?: MrdDateField[K] };
|
|
2256
2493
|
"mrd-datetime-field": Omit<MrdDatetimeField, keyof MrdDatetimeFieldAttributes> & { [K in keyof MrdDatetimeField & keyof MrdDatetimeFieldAttributes]?: MrdDatetimeField[K] } & { [K in keyof MrdDatetimeField & keyof MrdDatetimeFieldAttributes as `attr:${K}`]?: MrdDatetimeFieldAttributes[K] } & { [K in keyof MrdDatetimeField & keyof MrdDatetimeFieldAttributes as `prop:${K}`]?: MrdDatetimeField[K] };
|
|
2494
|
+
"mrd-document-container": Omit<MrdDocumentContainer, keyof MrdDocumentContainerAttributes> & { [K in keyof MrdDocumentContainer & keyof MrdDocumentContainerAttributes]?: MrdDocumentContainer[K] } & { [K in keyof MrdDocumentContainer & keyof MrdDocumentContainerAttributes as `attr:${K}`]?: MrdDocumentContainerAttributes[K] } & { [K in keyof MrdDocumentContainer & keyof MrdDocumentContainerAttributes as `prop:${K}`]?: MrdDocumentContainer[K] };
|
|
2257
2495
|
"mrd-document-list": Omit<MrdDocumentList, keyof MrdDocumentListAttributes> & { [K in keyof MrdDocumentList & keyof MrdDocumentListAttributes]?: MrdDocumentList[K] } & { [K in keyof MrdDocumentList & keyof MrdDocumentListAttributes as `attr:${K}`]?: MrdDocumentListAttributes[K] } & { [K in keyof MrdDocumentList & keyof MrdDocumentListAttributes as `prop:${K}`]?: MrdDocumentList[K] };
|
|
2258
2496
|
"mrd-document-view": Omit<MrdDocumentView, keyof MrdDocumentViewAttributes> & { [K in keyof MrdDocumentView & keyof MrdDocumentViewAttributes]?: MrdDocumentView[K] } & { [K in keyof MrdDocumentView & keyof MrdDocumentViewAttributes as `attr:${K}`]?: MrdDocumentViewAttributes[K] } & { [K in keyof MrdDocumentView & keyof MrdDocumentViewAttributes as `prop:${K}`]?: MrdDocumentView[K] };
|
|
2259
2497
|
"mrd-email-field": Omit<MrdEmailField, keyof MrdEmailFieldAttributes> & { [K in keyof MrdEmailField & keyof MrdEmailFieldAttributes]?: MrdEmailField[K] } & { [K in keyof MrdEmailField & keyof MrdEmailFieldAttributes as `attr:${K}`]?: MrdEmailFieldAttributes[K] } & { [K in keyof MrdEmailField & keyof MrdEmailFieldAttributes as `prop:${K}`]?: MrdEmailField[K] };
|
|
@@ -2282,6 +2520,18 @@ declare module "@stencil/core" {
|
|
|
2282
2520
|
"mrd-currency-field": LocalJSX.IntrinsicElements["mrd-currency-field"] & JSXBase.HTMLAttributes<HTMLMrdCurrencyFieldElement>;
|
|
2283
2521
|
"mrd-date-field": LocalJSX.IntrinsicElements["mrd-date-field"] & JSXBase.HTMLAttributes<HTMLMrdDateFieldElement>;
|
|
2284
2522
|
"mrd-datetime-field": LocalJSX.IntrinsicElements["mrd-datetime-field"] & JSXBase.HTMLAttributes<HTMLMrdDatetimeFieldElement>;
|
|
2523
|
+
/**
|
|
2524
|
+
* Owns a document collection view: a single toolbar (view switch + collection
|
|
2525
|
+
* actions like "New folder", and — later — upload / drag-drop) plus the two
|
|
2526
|
+
* interchangeable bodies, the folder tree (`mrd-document-list`) and the flat
|
|
2527
|
+
* table (`mrd-table`).
|
|
2528
|
+
* `mrd-layout-section` renders one of these per document VIEW / RELATED_VIEW and
|
|
2529
|
+
* forwards the re-emitted load/navigate/action events to the host. The embedded
|
|
2530
|
+
* table/list keep their `data-view` / `data-doclist` attributes so the host's
|
|
2531
|
+
* existing `setViewPage` / `setViewDistinct` / `setViewAggregations` lookups
|
|
2532
|
+
* (recursive querySelector) still resolve them unchanged.
|
|
2533
|
+
*/
|
|
2534
|
+
"mrd-document-container": LocalJSX.IntrinsicElements["mrd-document-container"] & JSXBase.HTMLAttributes<HTMLMrdDocumentContainerElement>;
|
|
2285
2535
|
/**
|
|
2286
2536
|
* Archetype-driven document collection view. Renders documents as a lazy,
|
|
2287
2537
|
* file-explorer-style folder tree, grouped by the `commons.document` archetype's
|
|
@@ -228,6 +228,11 @@ export interface ClientLayoutItem {
|
|
|
228
228
|
dataClass?: string;
|
|
229
229
|
fromClass?: string | null;
|
|
230
230
|
filterClass?: string | null;
|
|
231
|
+
/** Name of the relation on the related object that points back to the
|
|
232
|
+
* `fromClass` parent (e.g. a document's `dossier` relation). When it equals
|
|
233
|
+
* the `commons.document` archetype's `container` slot, the view is a single
|
|
234
|
+
* container context (see mrd-document-list seeding). */
|
|
235
|
+
inverseRelation?: string | null;
|
|
231
236
|
icon?: string | null;
|
|
232
237
|
navigationType?: string | null;
|
|
233
238
|
actionType?: string;
|