@mmlogic/components 0.5.13 → 0.5.15
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/{cell-renderer-BBebjBVz.js → cell-renderer-CLVKTVVQ.js} +113 -1
- package/dist/cjs/{client-layout-CqVuJumR.js → client-layout-Eg2VwW-7.js} +2 -0
- package/dist/cjs/index.cjs.js +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mosterdcomponents.cjs.js +1 -1
- package/dist/cjs/{mrd-boolean-field_25.cjs.entry.js → mrd-boolean-field_28.cjs.entry.js} +1163 -356
- package/dist/cjs/mrd-merge-view.cjs.entry.js +4 -4
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/fields/mrd-textarea-field/mrd-textarea-field.js +47 -2
- package/dist/collection/components/form/mrd-form/mrd-form.css +29 -0
- package/dist/collection/components/form/mrd-form/mrd-form.js +44 -8
- package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +126 -13
- package/dist/collection/components/memo/mrd-memo-container/mrd-memo-container.css +204 -0
- package/dist/collection/components/memo/mrd-memo-container/mrd-memo-container.js +694 -0
- package/dist/collection/components/memo/mrd-memo-list/mrd-memo-list.css +150 -0
- package/dist/collection/components/memo/mrd-memo-list/mrd-memo-list.js +511 -0
- package/dist/collection/components/memo/mrd-memo-view/mrd-memo-view.css +108 -0
- package/dist/collection/components/memo/mrd-memo-view/mrd-memo-view.js +204 -0
- package/dist/collection/components/merge/mrd-merge-view/mrd-merge-view.js +2 -2
- package/dist/collection/components/table/mrd-table/mrd-table.css +36 -0
- package/dist/collection/components/table/mrd-table/mrd-table.js +146 -31
- package/dist/collection/components/table/mrd-table/table-parts.js +6 -2
- package/dist/collection/components/table/mrd-table/table-query.js +6 -0
- package/dist/collection/dev/app.js +17 -0
- package/dist/collection/types/client-layout.js +1 -0
- package/dist/collection/utils/i18n.js +112 -0
- package/dist/collection/utils/query-params.js +9 -0
- package/dist/components/client-layout.js +1 -1
- package/dist/components/i18n.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/mrd-form.js +1 -1
- package/dist/components/mrd-layout-section.js +1 -1
- package/dist/components/mrd-memo-container.d.ts +11 -0
- package/dist/components/mrd-memo-container.js +1 -0
- package/dist/components/mrd-memo-container2.js +1 -0
- package/dist/components/mrd-memo-list.d.ts +11 -0
- package/dist/components/mrd-memo-list.js +1 -0
- package/dist/components/mrd-memo-list2.js +1 -0
- package/dist/components/mrd-memo-view.d.ts +11 -0
- package/dist/components/mrd-memo-view.js +1 -0
- package/dist/components/mrd-memo-view2.js +1 -0
- package/dist/components/mrd-merge-view.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/components/mrd-textarea-field2.js +1 -1
- package/dist/components/query-params.js +1 -1
- package/dist/components/table-query.js +1 -0
- package/dist/esm/{cell-renderer-CC8-MtvQ.js → cell-renderer-4NKEzZWw.js} +113 -1
- package/dist/esm/{client-layout-Bc42CfJB.js → client-layout-BJkVeSq6.js} +2 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mosterdcomponents.js +1 -1
- package/dist/esm/{mrd-boolean-field_25.entry.js → mrd-boolean-field_28.entry.js} +1161 -357
- package/dist/esm/mrd-merge-view.entry.js +4 -4
- package/dist/mosterdcomponents/index.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/{p-Bc42CfJB.js → p-BJkVeSq6.js} +1 -1
- package/dist/mosterdcomponents/p-BMx6VAJ6.js +1 -0
- package/dist/mosterdcomponents/p-d64ba1f2.entry.js +3 -0
- package/dist/mosterdcomponents/{p-a7e8f6a3.entry.js → p-e68dfbb0.entry.js} +1 -1
- package/dist/types/components/fields/mrd-textarea-field/mrd-textarea-field.d.ts +10 -0
- package/dist/types/components/form/mrd-form/mrd-form.d.ts +6 -0
- package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +20 -1
- package/dist/types/components/memo/mrd-memo-container/mrd-memo-container.d.ts +152 -0
- package/dist/types/components/memo/mrd-memo-list/mrd-memo-list.d.ts +79 -0
- package/dist/types/components/memo/mrd-memo-view/mrd-memo-view.d.ts +33 -0
- package/dist/types/components/table/mrd-table/mrd-table.d.ts +48 -1
- package/dist/types/components/table/mrd-table/table-parts.d.ts +15 -0
- package/dist/types/components/table/mrd-table/table-query.d.ts +6 -0
- package/dist/types/components.d.ts +528 -1
- package/dist/types/types/client-layout.d.ts +1 -0
- package/dist/types/utils/query-params.d.ts +16 -0
- package/package.json +1 -1
- package/dist/mosterdcomponents/p-07b148b2.entry.js +0 -3
- package/dist/mosterdcomponents/p-D5ZPfX3-.js +0 -1
|
@@ -403,6 +403,11 @@ export namespace Components {
|
|
|
403
403
|
* @default false
|
|
404
404
|
*/
|
|
405
405
|
"showCancel": boolean;
|
|
406
|
+
/**
|
|
407
|
+
* When true, a delete button is shown next to the submit button (edit mode only — the host decides when a delete affordance makes sense, e.g. only for an existing record). Deletion itself (confirmation, the actual API call) is entirely the host's responsibility; mrd-form only emits the request via mrdDelete.
|
|
408
|
+
* @default false
|
|
409
|
+
*/
|
|
410
|
+
"showDelete": boolean;
|
|
406
411
|
/**
|
|
407
412
|
* @default {}
|
|
408
413
|
*/
|
|
@@ -535,6 +540,11 @@ export namespace Components {
|
|
|
535
540
|
* @default navigator.language
|
|
536
541
|
*/
|
|
537
542
|
"locale": string;
|
|
543
|
+
/**
|
|
544
|
+
* The active account's linked person record (userProfile.links.person), if any. Threaded to mrd-memo-container so a top-level memo VIEW (no parent record to attach a new memo to) can still offer "New memo" by falling back to the account's own record as the container.
|
|
545
|
+
* @default null
|
|
546
|
+
*/
|
|
547
|
+
"me": RelationSearchResult1 | null;
|
|
538
548
|
/**
|
|
539
549
|
* Open the lightbox directly with a URL (e.g. after mrdDownload on a FILE field).
|
|
540
550
|
*/
|
|
@@ -557,7 +567,7 @@ export namespace Components {
|
|
|
557
567
|
*/
|
|
558
568
|
"setViewAggregations": (name: string, data: any) => Promise<void>;
|
|
559
569
|
/**
|
|
560
|
-
* Inject the created document's href after a file-drop create, so the optimistic row becomes navigable (see mrdCreateObject).
|
|
570
|
+
* Inject the created document's href after a file-drop create, so the optimistic row becomes navigable (see mrdCreateObject). For a memo quick-create there is no optimistic row to resolve — simply reload the container's current body so the new memo shows up.
|
|
561
571
|
*/
|
|
562
572
|
"setViewCreatedObject": (name: string, href: string) => Promise<void>;
|
|
563
573
|
/**
|
|
@@ -643,6 +653,162 @@ export namespace Components {
|
|
|
643
653
|
*/
|
|
644
654
|
"value": string;
|
|
645
655
|
}
|
|
656
|
+
/**
|
|
657
|
+
* Owns a memo collection view: a single toolbar (view switch + "New memo") plus
|
|
658
|
+
* the two interchangeable bodies — the card list (`mrd-memo-list`) and the flat
|
|
659
|
+
* table (`mrd-table`). Mirrors `mrd-document-container`'s structure.
|
|
660
|
+
* There is no memo detail page: both "New memo" and clicking an existing memo
|
|
661
|
+
* (card or table row) open the same small dialog — just the fields a person
|
|
662
|
+
* actually fills in (body, and only the optional slots the archetype actually
|
|
663
|
+
* maps: title/labels/important). date/author/container are already known
|
|
664
|
+
* context and never shown. Create emits `mrdCreateObject` (same contract
|
|
665
|
+
* mrd-document-list already uses for its inline file-drop create); editing an
|
|
666
|
+
* existing memo emits `mrdUpdateObject` (same generic PATCH contract used
|
|
667
|
+
* elsewhere, e.g. mrd-document-list's drag-move) and optimistically patches the
|
|
668
|
+
* displayed row/card itself, since that PATCH is fire-and-forget on the host.
|
|
669
|
+
* `mrd-layout-section` renders one of these per memo VIEW / RELATED_VIEW and
|
|
670
|
+
* forwards the re-emitted load/action/create/update events to the host.
|
|
671
|
+
*/
|
|
672
|
+
interface MrdMemoContainer {
|
|
673
|
+
/**
|
|
674
|
+
* Resolved `commons.memo` archetype binding.
|
|
675
|
+
*/
|
|
676
|
+
"archetype": ClientArchetype;
|
|
677
|
+
/**
|
|
678
|
+
* Canonical parent href — set when this is a RELATED_VIEW embedded under a parent record, which already gives a new memo something to attach to.
|
|
679
|
+
* @default ''
|
|
680
|
+
*/
|
|
681
|
+
"containerHref": string;
|
|
682
|
+
/**
|
|
683
|
+
* The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
|
|
684
|
+
* @default null
|
|
685
|
+
*/
|
|
686
|
+
"item": ClientLayoutItem | null;
|
|
687
|
+
/**
|
|
688
|
+
* listItems of the FIELD bound to the `labels` slot; forwarded to whichever body is mounted and used to render the dialog's label checkboxes.
|
|
689
|
+
* @default null
|
|
690
|
+
*/
|
|
691
|
+
"labelsListItems": ClientListValue[] | null;
|
|
692
|
+
/**
|
|
693
|
+
* @default navigator.language
|
|
694
|
+
*/
|
|
695
|
+
"locale": string;
|
|
696
|
+
/**
|
|
697
|
+
* The active account's linked person record (userProfile.links.person), if any. Used both to gate "New memo" (see effectiveContainerHref) and, on submit, to fill the author slot.
|
|
698
|
+
* @default null
|
|
699
|
+
*/
|
|
700
|
+
"me": RelationSearchResult1 | null;
|
|
701
|
+
/**
|
|
702
|
+
* Parent record id — required for RELATED_VIEW path building.
|
|
703
|
+
* @default ''
|
|
704
|
+
*/
|
|
705
|
+
"parentId": string;
|
|
706
|
+
/**
|
|
707
|
+
* When true, this dashboard is read-only: "New memo" is disabled with a tooltip, cards/rows are not clickable, and the embedded table's own create action is disabled too.
|
|
708
|
+
* @default false
|
|
709
|
+
*/
|
|
710
|
+
"readOnly": boolean;
|
|
711
|
+
/**
|
|
712
|
+
* Re-request page 0 of whichever body is currently mounted — called by mrd-layout-section after a successful mrdCreateObject, and by this component itself after an edit to a table row (which has no per-row optimistic-patch method the way mrd-memo-list does).
|
|
713
|
+
*/
|
|
714
|
+
"refresh": () => Promise<void>;
|
|
715
|
+
/**
|
|
716
|
+
* Lookup key used for the embedded `data-view` attribute.
|
|
717
|
+
* @default ''
|
|
718
|
+
*/
|
|
719
|
+
"viewKey": string;
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* Card-view body for a `commons.memo` collection — the alternative to the flat
|
|
723
|
+
* `mrd-table` a `mrd-memo-container` can switch to. Deliberately simpler than
|
|
724
|
+
* `mrd-table`'s virtual-scroll internals: memo cards accumulate via a plain
|
|
725
|
+
* "load more" affordance rather than windowed rendering, since a bounded card
|
|
726
|
+
* list of notes doesn't need that complexity.
|
|
727
|
+
* Mirrors `mrd-table`'s external contract for the parts a host / mrd-layout-
|
|
728
|
+
* section already knows how to drive — `init()`, `setPage()`, the `mrdLoadPage`
|
|
729
|
+
* event shape `{ page, sort, path, qs }` — so no new host-side wiring is needed
|
|
730
|
+
* to feed it data.
|
|
731
|
+
* There is no separate memo detail page: clicking a card opens mrd-memo-
|
|
732
|
+
* container's quick-edit dialog directly (mrdEdit), the same dialog "New memo"
|
|
733
|
+
* uses for creation.
|
|
734
|
+
*/
|
|
735
|
+
interface MrdMemoList {
|
|
736
|
+
/**
|
|
737
|
+
* Resolved `commons.memo` archetype binding.
|
|
738
|
+
*/
|
|
739
|
+
"archetype": ClientArchetype;
|
|
740
|
+
/**
|
|
741
|
+
* Reset and request page 0. Call after setting all props, mirrors mrd-table.init().
|
|
742
|
+
*/
|
|
743
|
+
"init": () => Promise<void>;
|
|
744
|
+
/**
|
|
745
|
+
* The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
|
|
746
|
+
* @default null
|
|
747
|
+
*/
|
|
748
|
+
"item": ClientLayoutItem | null;
|
|
749
|
+
/**
|
|
750
|
+
* listItems of the FIELD bound to the `labels` slot, resolved by mrd-layout-section from its own items array, same reason mrd-memo-view needs it.
|
|
751
|
+
* @default null
|
|
752
|
+
*/
|
|
753
|
+
"labelsListItems": ClientListValue[] | null;
|
|
754
|
+
/**
|
|
755
|
+
* @default navigator.language
|
|
756
|
+
*/
|
|
757
|
+
"locale": string;
|
|
758
|
+
/**
|
|
759
|
+
* Records per page (must match API page size).
|
|
760
|
+
* @default 20
|
|
761
|
+
*/
|
|
762
|
+
"pageSize": number;
|
|
763
|
+
/**
|
|
764
|
+
* Parent record id — required for RELATED_VIEW path building.
|
|
765
|
+
* @default ''
|
|
766
|
+
*/
|
|
767
|
+
"parentId": string;
|
|
768
|
+
/**
|
|
769
|
+
* Optimistically merge an edit into the matching row — mrdUpdateObject's PATCH is fire-and-forget on the host side, so this is what makes an edit visible immediately rather than only after the next full reload.
|
|
770
|
+
*/
|
|
771
|
+
"patchRow": (href: string, values: Record<string, unknown>) => Promise<void>;
|
|
772
|
+
/**
|
|
773
|
+
* When true, cards are not clickable (no mrdEdit) — matches mrd-table's own readOnly gating on its create action.
|
|
774
|
+
* @default false
|
|
775
|
+
*/
|
|
776
|
+
"readOnly": boolean;
|
|
777
|
+
/**
|
|
778
|
+
* Optimistically drop a deleted row — mrdDeleteObject's DELETE is fire-and- forget on the host side, same reasoning as patchRow().
|
|
779
|
+
*/
|
|
780
|
+
"removeRow": (href: string) => Promise<void>;
|
|
781
|
+
/**
|
|
782
|
+
* Inject the rows for a page (0-based); page 0 replaces, later pages append.
|
|
783
|
+
*/
|
|
784
|
+
"setPage": (pageNumber: number, rows: Record<string, unknown>[], hasNext?: boolean) => Promise<void>;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* Archetype-driven single-memo view. Given a `commons.memo` binding and a data
|
|
788
|
+
* record, renders the memo the way a note should read: the title and body are
|
|
789
|
+
* the prominent content, author and timestamp sit below as a subtle metadata
|
|
790
|
+
* line — not the other way around.
|
|
791
|
+
*/
|
|
792
|
+
interface MrdMemoView {
|
|
793
|
+
/**
|
|
794
|
+
* Resolved `commons.memo` binding: slot name → concrete field/relation name.
|
|
795
|
+
*/
|
|
796
|
+
"archetype": ClientArchetype;
|
|
797
|
+
/**
|
|
798
|
+
* The data record from the /data endpoint. Fields keyed by name; relations under `_links`.
|
|
799
|
+
* @default {}
|
|
800
|
+
*/
|
|
801
|
+
"data": Record<string, unknown>;
|
|
802
|
+
/**
|
|
803
|
+
* listItems of the FIELD bound to the `labels` slot, resolved by mrd-layout-section from its own items array (archetype metadata does not publish listItems), so the label badges get a real label/color instead of the raw stored key.
|
|
804
|
+
* @default null
|
|
805
|
+
*/
|
|
806
|
+
"labelsListItems": ClientListValue[] | null;
|
|
807
|
+
/**
|
|
808
|
+
* @default navigator.language
|
|
809
|
+
*/
|
|
810
|
+
"locale": string;
|
|
811
|
+
}
|
|
646
812
|
/**
|
|
647
813
|
* Merges two DataObjects of the same basic type (FINDING-0114 / TASK-0177).
|
|
648
814
|
* Never performs network I/O itself: it emits `mrdSearch` (host searches and
|
|
@@ -909,6 +1075,11 @@ export namespace Components {
|
|
|
909
1075
|
"value": string;
|
|
910
1076
|
}
|
|
911
1077
|
interface MrdTextareaField {
|
|
1078
|
+
/**
|
|
1079
|
+
* Focus the editor as soon as it's ready — opt-in, since auto-focusing every textarea field on mount would be wrong for a regular multi-field form.
|
|
1080
|
+
* @default false
|
|
1081
|
+
*/
|
|
1082
|
+
"autofocus": boolean;
|
|
912
1083
|
/**
|
|
913
1084
|
* @default false
|
|
914
1085
|
*/
|
|
@@ -1037,6 +1208,18 @@ export interface MrdLongtextFieldCustomEvent<T> extends CustomEvent<T> {
|
|
|
1037
1208
|
detail: T;
|
|
1038
1209
|
target: HTMLMrdLongtextFieldElement;
|
|
1039
1210
|
}
|
|
1211
|
+
export interface MrdMemoContainerCustomEvent<T> extends CustomEvent<T> {
|
|
1212
|
+
detail: T;
|
|
1213
|
+
target: HTMLMrdMemoContainerElement;
|
|
1214
|
+
}
|
|
1215
|
+
export interface MrdMemoListCustomEvent<T> extends CustomEvent<T> {
|
|
1216
|
+
detail: T;
|
|
1217
|
+
target: HTMLMrdMemoListElement;
|
|
1218
|
+
}
|
|
1219
|
+
export interface MrdMemoViewCustomEvent<T> extends CustomEvent<T> {
|
|
1220
|
+
detail: T;
|
|
1221
|
+
target: HTMLMrdMemoViewElement;
|
|
1222
|
+
}
|
|
1040
1223
|
export interface MrdMergeViewCustomEvent<T> extends CustomEvent<T> {
|
|
1041
1224
|
detail: T;
|
|
1042
1225
|
target: HTMLMrdMergeViewElement;
|
|
@@ -1341,6 +1524,7 @@ declare global {
|
|
|
1341
1524
|
interface HTMLMrdFormElementEventMap {
|
|
1342
1525
|
"mrdSubmit": Record<string, unknown>;
|
|
1343
1526
|
"mrdCancel": void;
|
|
1527
|
+
"mrdDelete": void;
|
|
1344
1528
|
"mrdSearch": { name: string; query: string; relatedClass: string };
|
|
1345
1529
|
"mrdFetchAll": { name: string; relatedClass: string; mostSignificantClass?: string; commonRelation?: string; filter?: string; filterValue?: string };
|
|
1346
1530
|
"mrdUpload": { name: string; file: File };
|
|
@@ -1440,6 +1624,7 @@ declare global {
|
|
|
1440
1624
|
"mrdLoadViewAggregations": { name: string; dataClass: string; path: string; qs: string; aggQs: string };
|
|
1441
1625
|
"mrdLoadViewDistinct": { name: string; nodeId: string; distinct: string; path: string; qs: string };
|
|
1442
1626
|
"mrdUpdateObject": { href: string; values: Record<string, unknown> };
|
|
1627
|
+
"mrdDeleteObject": { href: string };
|
|
1443
1628
|
"mrdViewUpload": { name: string; file: File };
|
|
1444
1629
|
"mrdCreateObject": { name: string; path: string; values: Record<string, unknown> };
|
|
1445
1630
|
}
|
|
@@ -1493,6 +1678,99 @@ declare global {
|
|
|
1493
1678
|
prototype: HTMLMrdLongtextFieldElement;
|
|
1494
1679
|
new (): HTMLMrdLongtextFieldElement;
|
|
1495
1680
|
};
|
|
1681
|
+
interface HTMLMrdMemoContainerElementEventMap {
|
|
1682
|
+
"mrdLoadPage": { page: number; sort: string; path: string; qs: string };
|
|
1683
|
+
"mrdLoadAggregations": { path: string; qs: string; aggQs: string };
|
|
1684
|
+
"mrdAction": { action: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string };
|
|
1685
|
+
"mrdCreateObject": { path: string; values: Record<string, unknown> };
|
|
1686
|
+
"mrdUpdateObject": { href: string; values: Record<string, unknown> };
|
|
1687
|
+
"mrdDeleteObject": { href: string };
|
|
1688
|
+
}
|
|
1689
|
+
/**
|
|
1690
|
+
* Owns a memo collection view: a single toolbar (view switch + "New memo") plus
|
|
1691
|
+
* the two interchangeable bodies — the card list (`mrd-memo-list`) and the flat
|
|
1692
|
+
* table (`mrd-table`). Mirrors `mrd-document-container`'s structure.
|
|
1693
|
+
* There is no memo detail page: both "New memo" and clicking an existing memo
|
|
1694
|
+
* (card or table row) open the same small dialog — just the fields a person
|
|
1695
|
+
* actually fills in (body, and only the optional slots the archetype actually
|
|
1696
|
+
* maps: title/labels/important). date/author/container are already known
|
|
1697
|
+
* context and never shown. Create emits `mrdCreateObject` (same contract
|
|
1698
|
+
* mrd-document-list already uses for its inline file-drop create); editing an
|
|
1699
|
+
* existing memo emits `mrdUpdateObject` (same generic PATCH contract used
|
|
1700
|
+
* elsewhere, e.g. mrd-document-list's drag-move) and optimistically patches the
|
|
1701
|
+
* displayed row/card itself, since that PATCH is fire-and-forget on the host.
|
|
1702
|
+
* `mrd-layout-section` renders one of these per memo VIEW / RELATED_VIEW and
|
|
1703
|
+
* forwards the re-emitted load/action/create/update events to the host.
|
|
1704
|
+
*/
|
|
1705
|
+
interface HTMLMrdMemoContainerElement extends Components.MrdMemoContainer, HTMLStencilElement {
|
|
1706
|
+
addEventListener<K extends keyof HTMLMrdMemoContainerElementEventMap>(type: K, listener: (this: HTMLMrdMemoContainerElement, ev: MrdMemoContainerCustomEvent<HTMLMrdMemoContainerElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1707
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1708
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1709
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1710
|
+
removeEventListener<K extends keyof HTMLMrdMemoContainerElementEventMap>(type: K, listener: (this: HTMLMrdMemoContainerElement, ev: MrdMemoContainerCustomEvent<HTMLMrdMemoContainerElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1711
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1712
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1713
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1714
|
+
}
|
|
1715
|
+
var HTMLMrdMemoContainerElement: {
|
|
1716
|
+
prototype: HTMLMrdMemoContainerElement;
|
|
1717
|
+
new (): HTMLMrdMemoContainerElement;
|
|
1718
|
+
};
|
|
1719
|
+
interface HTMLMrdMemoListElementEventMap {
|
|
1720
|
+
"mrdLoadPage": { page: number; sort: string; path: string; qs: string };
|
|
1721
|
+
"mrdEdit": { row: Record<string, unknown> };
|
|
1722
|
+
}
|
|
1723
|
+
/**
|
|
1724
|
+
* Card-view body for a `commons.memo` collection — the alternative to the flat
|
|
1725
|
+
* `mrd-table` a `mrd-memo-container` can switch to. Deliberately simpler than
|
|
1726
|
+
* `mrd-table`'s virtual-scroll internals: memo cards accumulate via a plain
|
|
1727
|
+
* "load more" affordance rather than windowed rendering, since a bounded card
|
|
1728
|
+
* list of notes doesn't need that complexity.
|
|
1729
|
+
* Mirrors `mrd-table`'s external contract for the parts a host / mrd-layout-
|
|
1730
|
+
* section already knows how to drive — `init()`, `setPage()`, the `mrdLoadPage`
|
|
1731
|
+
* event shape `{ page, sort, path, qs }` — so no new host-side wiring is needed
|
|
1732
|
+
* to feed it data.
|
|
1733
|
+
* There is no separate memo detail page: clicking a card opens mrd-memo-
|
|
1734
|
+
* container's quick-edit dialog directly (mrdEdit), the same dialog "New memo"
|
|
1735
|
+
* uses for creation.
|
|
1736
|
+
*/
|
|
1737
|
+
interface HTMLMrdMemoListElement extends Components.MrdMemoList, HTMLStencilElement {
|
|
1738
|
+
addEventListener<K extends keyof HTMLMrdMemoListElementEventMap>(type: K, listener: (this: HTMLMrdMemoListElement, ev: MrdMemoListCustomEvent<HTMLMrdMemoListElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1739
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1740
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1741
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1742
|
+
removeEventListener<K extends keyof HTMLMrdMemoListElementEventMap>(type: K, listener: (this: HTMLMrdMemoListElement, ev: MrdMemoListCustomEvent<HTMLMrdMemoListElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1743
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1744
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1745
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1746
|
+
}
|
|
1747
|
+
var HTMLMrdMemoListElement: {
|
|
1748
|
+
prototype: HTMLMrdMemoListElement;
|
|
1749
|
+
new (): HTMLMrdMemoListElement;
|
|
1750
|
+
};
|
|
1751
|
+
interface HTMLMrdMemoViewElementEventMap {
|
|
1752
|
+
"mrdNavigate": { href?: string; label: string };
|
|
1753
|
+
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Archetype-driven single-memo view. Given a `commons.memo` binding and a data
|
|
1756
|
+
* record, renders the memo the way a note should read: the title and body are
|
|
1757
|
+
* the prominent content, author and timestamp sit below as a subtle metadata
|
|
1758
|
+
* line — not the other way around.
|
|
1759
|
+
*/
|
|
1760
|
+
interface HTMLMrdMemoViewElement extends Components.MrdMemoView, HTMLStencilElement {
|
|
1761
|
+
addEventListener<K extends keyof HTMLMrdMemoViewElementEventMap>(type: K, listener: (this: HTMLMrdMemoViewElement, ev: MrdMemoViewCustomEvent<HTMLMrdMemoViewElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1762
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1763
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1764
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1765
|
+
removeEventListener<K extends keyof HTMLMrdMemoViewElementEventMap>(type: K, listener: (this: HTMLMrdMemoViewElement, ev: MrdMemoViewCustomEvent<HTMLMrdMemoViewElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
1766
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1767
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
1768
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
1769
|
+
}
|
|
1770
|
+
var HTMLMrdMemoViewElement: {
|
|
1771
|
+
prototype: HTMLMrdMemoViewElement;
|
|
1772
|
+
new (): HTMLMrdMemoViewElement;
|
|
1773
|
+
};
|
|
1496
1774
|
interface HTMLMrdMergeViewElementEventMap {
|
|
1497
1775
|
"mrdSearch": { query: string; basicType: string; mostSignificantClass?: string };
|
|
1498
1776
|
"mrdMerge": { winnerHref: string; loserHref: string; patch: Record<string, unknown> };
|
|
@@ -1672,6 +1950,9 @@ declare global {
|
|
|
1672
1950
|
"mrd-layout-section": HTMLMrdLayoutSectionElement;
|
|
1673
1951
|
"mrd-list-field": HTMLMrdListFieldElement;
|
|
1674
1952
|
"mrd-longtext-field": HTMLMrdLongtextFieldElement;
|
|
1953
|
+
"mrd-memo-container": HTMLMrdMemoContainerElement;
|
|
1954
|
+
"mrd-memo-list": HTMLMrdMemoListElement;
|
|
1955
|
+
"mrd-memo-view": HTMLMrdMemoViewElement;
|
|
1675
1956
|
"mrd-merge-view": HTMLMrdMergeViewElement;
|
|
1676
1957
|
"mrd-number-field": HTMLMrdNumberFieldElement;
|
|
1677
1958
|
"mrd-relation-field": HTMLMrdRelationFieldElement;
|
|
@@ -2137,6 +2418,7 @@ declare namespace LocalJSX {
|
|
|
2137
2418
|
*/
|
|
2138
2419
|
"me"?: RelationSearchResult | null;
|
|
2139
2420
|
"onMrdCancel"?: (event: MrdFormCustomEvent<void>) => void;
|
|
2421
|
+
"onMrdDelete"?: (event: MrdFormCustomEvent<void>) => void;
|
|
2140
2422
|
"onMrdFetchAll"?: (event: MrdFormCustomEvent<{ name: string; relatedClass: string; mostSignificantClass?: string; commonRelation?: string; filter?: string; filterValue?: string }>) => void;
|
|
2141
2423
|
"onMrdSearch"?: (event: MrdFormCustomEvent<{ name: string; query: string; relatedClass: string }>) => void;
|
|
2142
2424
|
"onMrdSubmit"?: (event: MrdFormCustomEvent<Record<string, unknown>>) => void;
|
|
@@ -2156,6 +2438,11 @@ declare namespace LocalJSX {
|
|
|
2156
2438
|
* @default false
|
|
2157
2439
|
*/
|
|
2158
2440
|
"showCancel"?: boolean;
|
|
2441
|
+
/**
|
|
2442
|
+
* When true, a delete button is shown next to the submit button (edit mode only — the host decides when a delete affordance makes sense, e.g. only for an existing record). Deletion itself (confirmation, the actual API call) is entirely the host's responsibility; mrd-form only emits the request via mrdDelete.
|
|
2443
|
+
* @default false
|
|
2444
|
+
*/
|
|
2445
|
+
"showDelete"?: boolean;
|
|
2159
2446
|
/**
|
|
2160
2447
|
* @default {}
|
|
2161
2448
|
*/
|
|
@@ -2308,6 +2595,11 @@ declare namespace LocalJSX {
|
|
|
2308
2595
|
* @default navigator.language
|
|
2309
2596
|
*/
|
|
2310
2597
|
"locale"?: string;
|
|
2598
|
+
/**
|
|
2599
|
+
* The active account's linked person record (userProfile.links.person), if any. Threaded to mrd-memo-container so a top-level memo VIEW (no parent record to attach a new memo to) can still offer "New memo" by falling back to the account's own record as the container.
|
|
2600
|
+
* @default null
|
|
2601
|
+
*/
|
|
2602
|
+
"me"?: RelationSearchResult1 | null;
|
|
2311
2603
|
/**
|
|
2312
2604
|
* Re-emitted from an embedded mrd-document-view (commons.document single-object view) whenever its file slot's value changes. The component never renders the file itself — the host resolves the href(s) and decides how/whether to show them, e.g. in a panel next to this mrd-layout-section.
|
|
2313
2605
|
*/
|
|
@@ -2316,6 +2608,10 @@ declare namespace LocalJSX {
|
|
|
2316
2608
|
* Create a new document from an uploaded file; host POSTs `values` to `path`, then calls setViewCreatedObject(name, href) with the new object's href.
|
|
2317
2609
|
*/
|
|
2318
2610
|
"onMrdCreateObject"?: (event: MrdLayoutSectionCustomEvent<{ name: string; path: string; values: Record<string, unknown> }>) => void;
|
|
2611
|
+
/**
|
|
2612
|
+
* Confirmed delete from an embedded memo dialog. Host DELETEs `href` — fire- and-forget, the row is already removed optimistically on the component side.
|
|
2613
|
+
*/
|
|
2614
|
+
"onMrdDeleteObject"?: (event: MrdLayoutSectionCustomEvent<{ href: string }>) => void;
|
|
2319
2615
|
"onMrdDownload"?: (event: MrdLayoutSectionCustomEvent<{ href: string; fileName: string }>) => void;
|
|
2320
2616
|
/**
|
|
2321
2617
|
* Fired once on load for each IMAGE field that has an href; host resolves the URL and calls setImagePreview().
|
|
@@ -2430,6 +2726,172 @@ declare namespace LocalJSX {
|
|
|
2430
2726
|
*/
|
|
2431
2727
|
"value"?: string;
|
|
2432
2728
|
}
|
|
2729
|
+
/**
|
|
2730
|
+
* Owns a memo collection view: a single toolbar (view switch + "New memo") plus
|
|
2731
|
+
* the two interchangeable bodies — the card list (`mrd-memo-list`) and the flat
|
|
2732
|
+
* table (`mrd-table`). Mirrors `mrd-document-container`'s structure.
|
|
2733
|
+
* There is no memo detail page: both "New memo" and clicking an existing memo
|
|
2734
|
+
* (card or table row) open the same small dialog — just the fields a person
|
|
2735
|
+
* actually fills in (body, and only the optional slots the archetype actually
|
|
2736
|
+
* maps: title/labels/important). date/author/container are already known
|
|
2737
|
+
* context and never shown. Create emits `mrdCreateObject` (same contract
|
|
2738
|
+
* mrd-document-list already uses for its inline file-drop create); editing an
|
|
2739
|
+
* existing memo emits `mrdUpdateObject` (same generic PATCH contract used
|
|
2740
|
+
* elsewhere, e.g. mrd-document-list's drag-move) and optimistically patches the
|
|
2741
|
+
* displayed row/card itself, since that PATCH is fire-and-forget on the host.
|
|
2742
|
+
* `mrd-layout-section` renders one of these per memo VIEW / RELATED_VIEW and
|
|
2743
|
+
* forwards the re-emitted load/action/create/update events to the host.
|
|
2744
|
+
*/
|
|
2745
|
+
interface MrdMemoContainer {
|
|
2746
|
+
/**
|
|
2747
|
+
* Resolved `commons.memo` archetype binding.
|
|
2748
|
+
*/
|
|
2749
|
+
"archetype": ClientArchetype;
|
|
2750
|
+
/**
|
|
2751
|
+
* Canonical parent href — set when this is a RELATED_VIEW embedded under a parent record, which already gives a new memo something to attach to.
|
|
2752
|
+
* @default ''
|
|
2753
|
+
*/
|
|
2754
|
+
"containerHref"?: string;
|
|
2755
|
+
/**
|
|
2756
|
+
* The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
|
|
2757
|
+
* @default null
|
|
2758
|
+
*/
|
|
2759
|
+
"item"?: ClientLayoutItem | null;
|
|
2760
|
+
/**
|
|
2761
|
+
* listItems of the FIELD bound to the `labels` slot; forwarded to whichever body is mounted and used to render the dialog's label checkboxes.
|
|
2762
|
+
* @default null
|
|
2763
|
+
*/
|
|
2764
|
+
"labelsListItems"?: ClientListValue[] | null;
|
|
2765
|
+
/**
|
|
2766
|
+
* @default navigator.language
|
|
2767
|
+
*/
|
|
2768
|
+
"locale"?: string;
|
|
2769
|
+
/**
|
|
2770
|
+
* The active account's linked person record (userProfile.links.person), if any. Used both to gate "New memo" (see effectiveContainerHref) and, on submit, to fill the author slot.
|
|
2771
|
+
* @default null
|
|
2772
|
+
*/
|
|
2773
|
+
"me"?: RelationSearchResult1 | null;
|
|
2774
|
+
/**
|
|
2775
|
+
* Only the embedded table's own toolbar (export, etc.) still routes through this.
|
|
2776
|
+
*/
|
|
2777
|
+
"onMrdAction"?: (event: MrdMemoContainerCustomEvent<{ action: string; path?: string; qs?: string; parentPath?: string | null; basicType?: string }>) => void;
|
|
2778
|
+
/**
|
|
2779
|
+
* Quick-create submit. Host POSTs `values` to `path`, same as mrd-document-list's.
|
|
2780
|
+
*/
|
|
2781
|
+
"onMrdCreateObject"?: (event: MrdMemoContainerCustomEvent<{ path: string; values: Record<string, unknown> }>) => void;
|
|
2782
|
+
/**
|
|
2783
|
+
* Confirmed delete. Host DELETEs `href` — fire-and-forget, same as mrdUpdateObject; the row is removed optimistically here rather than waiting on a callback.
|
|
2784
|
+
*/
|
|
2785
|
+
"onMrdDeleteObject"?: (event: MrdMemoContainerCustomEvent<{ href: string }>) => void;
|
|
2786
|
+
"onMrdLoadAggregations"?: (event: MrdMemoContainerCustomEvent<{ path: string; qs: string; aggQs: string }>) => void;
|
|
2787
|
+
"onMrdLoadPage"?: (event: MrdMemoContainerCustomEvent<{ page: number; sort: string; path: string; qs: string }>) => void;
|
|
2788
|
+
/**
|
|
2789
|
+
* Quick-edit submit. Host PATCHes `href` with `values`, same as mrd-document-list's drag-move.
|
|
2790
|
+
*/
|
|
2791
|
+
"onMrdUpdateObject"?: (event: MrdMemoContainerCustomEvent<{ href: string; values: Record<string, unknown> }>) => void;
|
|
2792
|
+
/**
|
|
2793
|
+
* Parent record id — required for RELATED_VIEW path building.
|
|
2794
|
+
* @default ''
|
|
2795
|
+
*/
|
|
2796
|
+
"parentId"?: string;
|
|
2797
|
+
/**
|
|
2798
|
+
* When true, this dashboard is read-only: "New memo" is disabled with a tooltip, cards/rows are not clickable, and the embedded table's own create action is disabled too.
|
|
2799
|
+
* @default false
|
|
2800
|
+
*/
|
|
2801
|
+
"readOnly"?: boolean;
|
|
2802
|
+
/**
|
|
2803
|
+
* Lookup key used for the embedded `data-view` attribute.
|
|
2804
|
+
* @default ''
|
|
2805
|
+
*/
|
|
2806
|
+
"viewKey"?: string;
|
|
2807
|
+
}
|
|
2808
|
+
/**
|
|
2809
|
+
* Card-view body for a `commons.memo` collection — the alternative to the flat
|
|
2810
|
+
* `mrd-table` a `mrd-memo-container` can switch to. Deliberately simpler than
|
|
2811
|
+
* `mrd-table`'s virtual-scroll internals: memo cards accumulate via a plain
|
|
2812
|
+
* "load more" affordance rather than windowed rendering, since a bounded card
|
|
2813
|
+
* list of notes doesn't need that complexity.
|
|
2814
|
+
* Mirrors `mrd-table`'s external contract for the parts a host / mrd-layout-
|
|
2815
|
+
* section already knows how to drive — `init()`, `setPage()`, the `mrdLoadPage`
|
|
2816
|
+
* event shape `{ page, sort, path, qs }` — so no new host-side wiring is needed
|
|
2817
|
+
* to feed it data.
|
|
2818
|
+
* There is no separate memo detail page: clicking a card opens mrd-memo-
|
|
2819
|
+
* container's quick-edit dialog directly (mrdEdit), the same dialog "New memo"
|
|
2820
|
+
* uses for creation.
|
|
2821
|
+
*/
|
|
2822
|
+
interface MrdMemoList {
|
|
2823
|
+
/**
|
|
2824
|
+
* Resolved `commons.memo` archetype binding.
|
|
2825
|
+
*/
|
|
2826
|
+
"archetype": ClientArchetype;
|
|
2827
|
+
/**
|
|
2828
|
+
* The VIEW or RELATED_VIEW layout item (dataClass, fromClass, view config).
|
|
2829
|
+
* @default null
|
|
2830
|
+
*/
|
|
2831
|
+
"item"?: ClientLayoutItem | null;
|
|
2832
|
+
/**
|
|
2833
|
+
* listItems of the FIELD bound to the `labels` slot, resolved by mrd-layout-section from its own items array, same reason mrd-memo-view needs it.
|
|
2834
|
+
* @default null
|
|
2835
|
+
*/
|
|
2836
|
+
"labelsListItems"?: ClientListValue[] | null;
|
|
2837
|
+
/**
|
|
2838
|
+
* @default navigator.language
|
|
2839
|
+
*/
|
|
2840
|
+
"locale"?: string;
|
|
2841
|
+
/**
|
|
2842
|
+
* A card was clicked (and not read-only). mrd-memo-container opens its quick- edit dialog pre-filled from `row` — no navigation, no detail page.
|
|
2843
|
+
*/
|
|
2844
|
+
"onMrdEdit"?: (event: MrdMemoListCustomEvent<{ row: Record<string, unknown> }>) => void;
|
|
2845
|
+
/**
|
|
2846
|
+
* Fired when a page needs fetching; same shape as mrd-table's mrdLoadPage minus `qs`'s column-filter support (cards have no filter UI) — host calls setPage() with the result.
|
|
2847
|
+
*/
|
|
2848
|
+
"onMrdLoadPage"?: (event: MrdMemoListCustomEvent<{ page: number; sort: string; path: string; qs: string }>) => void;
|
|
2849
|
+
/**
|
|
2850
|
+
* Records per page (must match API page size).
|
|
2851
|
+
* @default 20
|
|
2852
|
+
*/
|
|
2853
|
+
"pageSize"?: number;
|
|
2854
|
+
/**
|
|
2855
|
+
* Parent record id — required for RELATED_VIEW path building.
|
|
2856
|
+
* @default ''
|
|
2857
|
+
*/
|
|
2858
|
+
"parentId"?: string;
|
|
2859
|
+
/**
|
|
2860
|
+
* When true, cards are not clickable (no mrdEdit) — matches mrd-table's own readOnly gating on its create action.
|
|
2861
|
+
* @default false
|
|
2862
|
+
*/
|
|
2863
|
+
"readOnly"?: boolean;
|
|
2864
|
+
}
|
|
2865
|
+
/**
|
|
2866
|
+
* Archetype-driven single-memo view. Given a `commons.memo` binding and a data
|
|
2867
|
+
* record, renders the memo the way a note should read: the title and body are
|
|
2868
|
+
* the prominent content, author and timestamp sit below as a subtle metadata
|
|
2869
|
+
* line — not the other way around.
|
|
2870
|
+
*/
|
|
2871
|
+
interface MrdMemoView {
|
|
2872
|
+
/**
|
|
2873
|
+
* Resolved `commons.memo` binding: slot name → concrete field/relation name.
|
|
2874
|
+
*/
|
|
2875
|
+
"archetype": ClientArchetype;
|
|
2876
|
+
/**
|
|
2877
|
+
* The data record from the /data endpoint. Fields keyed by name; relations under `_links`.
|
|
2878
|
+
* @default {}
|
|
2879
|
+
*/
|
|
2880
|
+
"data"?: Record<string, unknown>;
|
|
2881
|
+
/**
|
|
2882
|
+
* listItems of the FIELD bound to the `labels` slot, resolved by mrd-layout-section from its own items array (archetype metadata does not publish listItems), so the label badges get a real label/color instead of the raw stored key.
|
|
2883
|
+
* @default null
|
|
2884
|
+
*/
|
|
2885
|
+
"labelsListItems"?: ClientListValue[] | null;
|
|
2886
|
+
/**
|
|
2887
|
+
* @default navigator.language
|
|
2888
|
+
*/
|
|
2889
|
+
"locale"?: string;
|
|
2890
|
+
/**
|
|
2891
|
+
* Navigate to the author or the container. Host resolves the href and routes.
|
|
2892
|
+
*/
|
|
2893
|
+
"onMrdNavigate"?: (event: MrdMemoViewCustomEvent<{ href?: string; label: string }>) => void;
|
|
2894
|
+
}
|
|
2433
2895
|
/**
|
|
2434
2896
|
* Merges two DataObjects of the same basic type (FINDING-0114 / TASK-0177).
|
|
2435
2897
|
* Never performs network I/O itself: it emits `mrdSearch` (host searches and
|
|
@@ -2712,6 +3174,11 @@ declare namespace LocalJSX {
|
|
|
2712
3174
|
"value"?: string;
|
|
2713
3175
|
}
|
|
2714
3176
|
interface MrdTextareaField {
|
|
3177
|
+
/**
|
|
3178
|
+
* Focus the editor as soon as it's ready — opt-in, since auto-focusing every textarea field on mount would be wrong for a regular multi-field form.
|
|
3179
|
+
* @default false
|
|
3180
|
+
*/
|
|
3181
|
+
"autofocus"?: boolean;
|
|
2715
3182
|
/**
|
|
2716
3183
|
* @default false
|
|
2717
3184
|
*/
|
|
@@ -2850,6 +3317,7 @@ declare namespace LocalJSX {
|
|
|
2850
3317
|
"referenceHref": string;
|
|
2851
3318
|
"referenceClass": string;
|
|
2852
3319
|
"showCancel": boolean;
|
|
3320
|
+
"showDelete": boolean;
|
|
2853
3321
|
}
|
|
2854
3322
|
interface MrdHyperlinkFieldAttributes {
|
|
2855
3323
|
"name": string;
|
|
@@ -2895,6 +3363,22 @@ declare namespace LocalJSX {
|
|
|
2895
3363
|
"disabled": boolean;
|
|
2896
3364
|
"locale": string;
|
|
2897
3365
|
}
|
|
3366
|
+
interface MrdMemoContainerAttributes {
|
|
3367
|
+
"parentId": string;
|
|
3368
|
+
"containerHref": string;
|
|
3369
|
+
"viewKey": string;
|
|
3370
|
+
"locale": string;
|
|
3371
|
+
"readOnly": boolean;
|
|
3372
|
+
}
|
|
3373
|
+
interface MrdMemoListAttributes {
|
|
3374
|
+
"parentId": string;
|
|
3375
|
+
"pageSize": number;
|
|
3376
|
+
"locale": string;
|
|
3377
|
+
"readOnly": boolean;
|
|
3378
|
+
}
|
|
3379
|
+
interface MrdMemoViewAttributes {
|
|
3380
|
+
"locale": string;
|
|
3381
|
+
}
|
|
2898
3382
|
interface MrdMergeViewAttributes {
|
|
2899
3383
|
"locale": string;
|
|
2900
3384
|
"basicType": string;
|
|
@@ -2963,6 +3447,7 @@ declare namespace LocalJSX {
|
|
|
2963
3447
|
"required": boolean;
|
|
2964
3448
|
"disabled": boolean;
|
|
2965
3449
|
"locale": string;
|
|
3450
|
+
"autofocus": boolean;
|
|
2966
3451
|
}
|
|
2967
3452
|
interface MrdTimeFieldAttributes {
|
|
2968
3453
|
"name": string;
|
|
@@ -2992,6 +3477,9 @@ declare namespace LocalJSX {
|
|
|
2992
3477
|
"mrd-layout-section": Omit<MrdLayoutSection, keyof MrdLayoutSectionAttributes> & { [K in keyof MrdLayoutSection & keyof MrdLayoutSectionAttributes]?: MrdLayoutSection[K] } & { [K in keyof MrdLayoutSection & keyof MrdLayoutSectionAttributes as `attr:${K}`]?: MrdLayoutSectionAttributes[K] } & { [K in keyof MrdLayoutSection & keyof MrdLayoutSectionAttributes as `prop:${K}`]?: MrdLayoutSection[K] };
|
|
2993
3478
|
"mrd-list-field": Omit<MrdListField, keyof MrdListFieldAttributes> & { [K in keyof MrdListField & keyof MrdListFieldAttributes]?: MrdListField[K] } & { [K in keyof MrdListField & keyof MrdListFieldAttributes as `attr:${K}`]?: MrdListFieldAttributes[K] } & { [K in keyof MrdListField & keyof MrdListFieldAttributes as `prop:${K}`]?: MrdListField[K] };
|
|
2994
3479
|
"mrd-longtext-field": Omit<MrdLongtextField, keyof MrdLongtextFieldAttributes> & { [K in keyof MrdLongtextField & keyof MrdLongtextFieldAttributes]?: MrdLongtextField[K] } & { [K in keyof MrdLongtextField & keyof MrdLongtextFieldAttributes as `attr:${K}`]?: MrdLongtextFieldAttributes[K] } & { [K in keyof MrdLongtextField & keyof MrdLongtextFieldAttributes as `prop:${K}`]?: MrdLongtextField[K] };
|
|
3480
|
+
"mrd-memo-container": Omit<MrdMemoContainer, keyof MrdMemoContainerAttributes> & { [K in keyof MrdMemoContainer & keyof MrdMemoContainerAttributes]?: MrdMemoContainer[K] } & { [K in keyof MrdMemoContainer & keyof MrdMemoContainerAttributes as `attr:${K}`]?: MrdMemoContainerAttributes[K] } & { [K in keyof MrdMemoContainer & keyof MrdMemoContainerAttributes as `prop:${K}`]?: MrdMemoContainer[K] };
|
|
3481
|
+
"mrd-memo-list": Omit<MrdMemoList, keyof MrdMemoListAttributes> & { [K in keyof MrdMemoList & keyof MrdMemoListAttributes]?: MrdMemoList[K] } & { [K in keyof MrdMemoList & keyof MrdMemoListAttributes as `attr:${K}`]?: MrdMemoListAttributes[K] } & { [K in keyof MrdMemoList & keyof MrdMemoListAttributes as `prop:${K}`]?: MrdMemoList[K] };
|
|
3482
|
+
"mrd-memo-view": Omit<MrdMemoView, keyof MrdMemoViewAttributes> & { [K in keyof MrdMemoView & keyof MrdMemoViewAttributes]?: MrdMemoView[K] } & { [K in keyof MrdMemoView & keyof MrdMemoViewAttributes as `attr:${K}`]?: MrdMemoViewAttributes[K] } & { [K in keyof MrdMemoView & keyof MrdMemoViewAttributes as `prop:${K}`]?: MrdMemoView[K] };
|
|
2995
3483
|
"mrd-merge-view": Omit<MrdMergeView, keyof MrdMergeViewAttributes> & { [K in keyof MrdMergeView & keyof MrdMergeViewAttributes]?: MrdMergeView[K] } & { [K in keyof MrdMergeView & keyof MrdMergeViewAttributes as `attr:${K}`]?: MrdMergeViewAttributes[K] } & { [K in keyof MrdMergeView & keyof MrdMergeViewAttributes as `prop:${K}`]?: MrdMergeView[K] };
|
|
2996
3484
|
"mrd-number-field": Omit<MrdNumberField, keyof MrdNumberFieldAttributes> & { [K in keyof MrdNumberField & keyof MrdNumberFieldAttributes]?: MrdNumberField[K] } & { [K in keyof MrdNumberField & keyof MrdNumberFieldAttributes as `attr:${K}`]?: MrdNumberFieldAttributes[K] } & { [K in keyof MrdNumberField & keyof MrdNumberFieldAttributes as `prop:${K}`]?: MrdNumberField[K] };
|
|
2997
3485
|
"mrd-relation-field": Omit<MrdRelationField, keyof MrdRelationFieldAttributes> & { [K in keyof MrdRelationField & keyof MrdRelationFieldAttributes]?: MrdRelationField[K] } & { [K in keyof MrdRelationField & keyof MrdRelationFieldAttributes as `attr:${K}`]?: MrdRelationFieldAttributes[K] } & { [K in keyof MrdRelationField & keyof MrdRelationFieldAttributes as `prop:${K}`]?: MrdRelationField[K] };
|
|
@@ -3090,6 +3578,45 @@ declare module "@stencil/core" {
|
|
|
3090
3578
|
"mrd-layout-section": LocalJSX.IntrinsicElements["mrd-layout-section"] & JSXBase.HTMLAttributes<HTMLMrdLayoutSectionElement>;
|
|
3091
3579
|
"mrd-list-field": LocalJSX.IntrinsicElements["mrd-list-field"] & JSXBase.HTMLAttributes<HTMLMrdListFieldElement>;
|
|
3092
3580
|
"mrd-longtext-field": LocalJSX.IntrinsicElements["mrd-longtext-field"] & JSXBase.HTMLAttributes<HTMLMrdLongtextFieldElement>;
|
|
3581
|
+
/**
|
|
3582
|
+
* Owns a memo collection view: a single toolbar (view switch + "New memo") plus
|
|
3583
|
+
* the two interchangeable bodies — the card list (`mrd-memo-list`) and the flat
|
|
3584
|
+
* table (`mrd-table`). Mirrors `mrd-document-container`'s structure.
|
|
3585
|
+
* There is no memo detail page: both "New memo" and clicking an existing memo
|
|
3586
|
+
* (card or table row) open the same small dialog — just the fields a person
|
|
3587
|
+
* actually fills in (body, and only the optional slots the archetype actually
|
|
3588
|
+
* maps: title/labels/important). date/author/container are already known
|
|
3589
|
+
* context and never shown. Create emits `mrdCreateObject` (same contract
|
|
3590
|
+
* mrd-document-list already uses for its inline file-drop create); editing an
|
|
3591
|
+
* existing memo emits `mrdUpdateObject` (same generic PATCH contract used
|
|
3592
|
+
* elsewhere, e.g. mrd-document-list's drag-move) and optimistically patches the
|
|
3593
|
+
* displayed row/card itself, since that PATCH is fire-and-forget on the host.
|
|
3594
|
+
* `mrd-layout-section` renders one of these per memo VIEW / RELATED_VIEW and
|
|
3595
|
+
* forwards the re-emitted load/action/create/update events to the host.
|
|
3596
|
+
*/
|
|
3597
|
+
"mrd-memo-container": LocalJSX.IntrinsicElements["mrd-memo-container"] & JSXBase.HTMLAttributes<HTMLMrdMemoContainerElement>;
|
|
3598
|
+
/**
|
|
3599
|
+
* Card-view body for a `commons.memo` collection — the alternative to the flat
|
|
3600
|
+
* `mrd-table` a `mrd-memo-container` can switch to. Deliberately simpler than
|
|
3601
|
+
* `mrd-table`'s virtual-scroll internals: memo cards accumulate via a plain
|
|
3602
|
+
* "load more" affordance rather than windowed rendering, since a bounded card
|
|
3603
|
+
* list of notes doesn't need that complexity.
|
|
3604
|
+
* Mirrors `mrd-table`'s external contract for the parts a host / mrd-layout-
|
|
3605
|
+
* section already knows how to drive — `init()`, `setPage()`, the `mrdLoadPage`
|
|
3606
|
+
* event shape `{ page, sort, path, qs }` — so no new host-side wiring is needed
|
|
3607
|
+
* to feed it data.
|
|
3608
|
+
* There is no separate memo detail page: clicking a card opens mrd-memo-
|
|
3609
|
+
* container's quick-edit dialog directly (mrdEdit), the same dialog "New memo"
|
|
3610
|
+
* uses for creation.
|
|
3611
|
+
*/
|
|
3612
|
+
"mrd-memo-list": LocalJSX.IntrinsicElements["mrd-memo-list"] & JSXBase.HTMLAttributes<HTMLMrdMemoListElement>;
|
|
3613
|
+
/**
|
|
3614
|
+
* Archetype-driven single-memo view. Given a `commons.memo` binding and a data
|
|
3615
|
+
* record, renders the memo the way a note should read: the title and body are
|
|
3616
|
+
* the prominent content, author and timestamp sit below as a subtle metadata
|
|
3617
|
+
* line — not the other way around.
|
|
3618
|
+
*/
|
|
3619
|
+
"mrd-memo-view": LocalJSX.IntrinsicElements["mrd-memo-view"] & JSXBase.HTMLAttributes<HTMLMrdMemoViewElement>;
|
|
3093
3620
|
/**
|
|
3094
3621
|
* Merges two DataObjects of the same basic type (FINDING-0114 / TASK-0177).
|
|
3095
3622
|
* Never performs network I/O itself: it emits `mrdSearch` (host searches and
|