@mmlogic/components 0.5.11 → 0.5.13

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 (50) hide show
  1. package/dist/cjs/{cell-renderer-pwUGEDql.js → cell-renderer-BBebjBVz.js} +8 -0
  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 +161 -24
  5. package/dist/cjs/mrd-merge-view.cjs.entry.js +1 -1
  6. package/dist/collection/components/documents/mrd-document-container/mrd-document-container.js +30 -4
  7. package/dist/collection/components/documents/mrd-document-list/mrd-document-list.js +55 -6
  8. package/dist/collection/components/layout/mrd-layout-section/mrd-layout-section.js +27 -3
  9. package/dist/collection/components/table/mrd-table/mrd-table.js +120 -6
  10. package/dist/collection/components/table/mrd-table/table-parts.js +9 -5
  11. package/dist/collection/dev/app.js +24 -0
  12. package/dist/collection/utils/i18n.js +8 -0
  13. package/dist/components/i18n.js +1 -1
  14. package/dist/components/mrd-document-container2.js +1 -1
  15. package/dist/components/mrd-document-list2.js +1 -1
  16. package/dist/components/mrd-layout-section.js +1 -1
  17. package/dist/components/mrd-table2.js +1 -1
  18. package/dist/esm/{cell-renderer-B8rJpnq8.js → cell-renderer-CC8-MtvQ.js} +8 -0
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/mosterdcomponents.js +1 -1
  21. package/dist/esm/mrd-boolean-field_25.entry.js +161 -24
  22. package/dist/esm/mrd-merge-view.entry.js +1 -1
  23. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  24. package/dist/mosterdcomponents/p-07b148b2.entry.js +3 -0
  25. package/dist/mosterdcomponents/p-D5ZPfX3-.js +1 -0
  26. package/dist/mosterdcomponents/{p-e540de6a.entry.js → p-a7e8f6a3.entry.js} +1 -1
  27. package/dist/types/components/documents/mrd-document-container/mrd-document-container.d.ts +4 -0
  28. package/dist/types/components/documents/mrd-document-list/mrd-document-list.d.ts +6 -1
  29. package/dist/types/components/layout/mrd-layout-section/mrd-layout-section.d.ts +4 -0
  30. package/dist/types/components/table/mrd-table/mrd-table.d.ts +30 -0
  31. package/dist/types/components/table/mrd-table/table-parts.d.ts +3 -0
  32. package/dist/types/components.d.ts +45 -1
  33. package/package.json +1 -1
  34. package/dist/mosterdcomponents/cell-renderer-B8u5BCK-.js.map +0 -1
  35. package/dist/mosterdcomponents/client-layout-Bc42CfJB.js.map +0 -1
  36. package/dist/mosterdcomponents/document-attachments-BufPmMRv.js.map +0 -1
  37. package/dist/mosterdcomponents/field-helpers-CUJsHr1V.js.map +0 -1
  38. package/dist/mosterdcomponents/file-upload-common-DdTDuxEU.js.map +0 -1
  39. package/dist/mosterdcomponents/format-gcecItcD.js.map +0 -1
  40. package/dist/mosterdcomponents/i18n-Ba7_jO9I.js.map +0 -1
  41. package/dist/mosterdcomponents/index-1ayBojyN.js.map +0 -1
  42. package/dist/mosterdcomponents/index-DhffneUF.js.map +0 -1
  43. package/dist/mosterdcomponents/index.esm.js.map +0 -1
  44. package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +0 -1
  45. package/dist/mosterdcomponents/p-eee4be8b.entry.js +0 -3
  46. package/dist/mosterdcomponents/p-rTM1tU_M.js +0 -1
  47. package/dist/mosterdcomponents/purify.es-_duHfPgC.js.map +0 -1
  48. package/dist/mosterdcomponents/query-params-BZbQoeYF.js.map +0 -1
  49. package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +0 -1
  50. package/dist/mosterdcomponents/validation-CjjTt66G.js.map +0 -1
@@ -110,6 +110,7 @@ const translations = {
110
110
  table_filter_clear_all: 'Alle filters wissen',
111
111
  table_new_record: 'Nieuw record',
112
112
  table_export_excel: 'Exporteer naar Excel',
113
+ readonly_access: 'Je hebt alleen-leestoegang',
113
114
  doc_view_switch: 'Weergave wisselen',
114
115
  doc_view_tree: 'Boomweergave',
115
116
  doc_upload: 'Uploaden',
@@ -213,6 +214,7 @@ const translations = {
213
214
  table_filter_clear_all: 'Clear all filters',
214
215
  table_new_record: 'New record',
215
216
  table_export_excel: 'Export to Excel',
217
+ readonly_access: 'You have read-only access',
216
218
  doc_view_switch: 'Switch view',
217
219
  doc_view_tree: 'Tree view',
218
220
  doc_upload: 'Upload',
@@ -316,6 +318,7 @@ const translations = {
316
318
  table_filter_clear_all: 'مسح جميع الفلاتر',
317
319
  table_new_record: 'سجل جديد',
318
320
  table_export_excel: 'تصدير إلى Excel',
321
+ readonly_access: 'لديك حق الوصول للقراءة فقط',
319
322
  doc_view_switch: 'تبديل العرض',
320
323
  doc_view_tree: 'عرض شجري',
321
324
  doc_upload: 'رفع',
@@ -413,6 +416,7 @@ const translations = {
413
416
  table_filter_clear_all: 'Effacer tous les filtres',
414
417
  table_new_record: 'Nouvel enregistrement',
415
418
  table_export_excel: 'Exporter vers Excel',
419
+ readonly_access: "Vous disposez d'un accès en lecture seule",
416
420
  doc_view_switch: 'Changer de vue',
417
421
  doc_view_tree: 'Vue arborescente',
418
422
  doc_upload: 'Téléverser',
@@ -510,6 +514,7 @@ const translations = {
510
514
  table_filter_clear_all: 'Alle Filter löschen',
511
515
  table_new_record: 'Neuer Eintrag',
512
516
  table_export_excel: 'Als Excel exportieren',
517
+ readonly_access: 'Sie haben nur Lesezugriff',
513
518
  doc_view_switch: 'Ansicht wechseln',
514
519
  doc_view_tree: 'Baumansicht',
515
520
  doc_upload: 'Hochladen',
@@ -607,6 +612,7 @@ const translations = {
607
612
  table_filter_clear_all: 'Borrar todos los filtros',
608
613
  table_new_record: 'Nuevo registro',
609
614
  table_export_excel: 'Exportar a Excel',
615
+ readonly_access: 'Tienes acceso de solo lectura',
610
616
  doc_view_switch: 'Cambiar vista',
611
617
  doc_view_tree: 'Vista de árbol',
612
618
  doc_upload: 'Subir',
@@ -704,6 +710,7 @@ const translations = {
704
710
  table_filter_clear_all: 'Cancella tutti i filtri',
705
711
  table_new_record: 'Nuovo record',
706
712
  table_export_excel: 'Esporta in Excel',
713
+ readonly_access: 'Hai accesso in sola lettura',
707
714
  doc_view_switch: 'Cambia vista',
708
715
  doc_view_tree: 'Vista ad albero',
709
716
  doc_upload: 'Carica',
@@ -801,6 +808,7 @@ const translations = {
801
808
  table_filter_clear_all: 'Очистити всі фільтри',
802
809
  table_new_record: 'Новий запис',
803
810
  table_export_excel: 'Експортувати до Excel',
811
+ readonly_access: 'У вас доступ лише для перегляду',
804
812
  doc_view_switch: 'Змінити вигляд',
805
813
  doc_view_tree: 'Деревоподібний вигляд',
806
814
  doc_upload: 'Завантажити',
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy([["mrd-merge-view.cjs",[[2,"mrd-merge-view",{"locale":[1],"basicType":[1,"basic-type"],"mostSignificantClass":[1,"most-significant-class"],"fields":[16],"currentHref":[1,"current-href"],"currentRecord":[16],"currentLabel":[1,"current-label"],"step":[32],"searchQuery":[32],"searchResults":[32],"isLoading":[32],"candidate":[32],"resolutions":[32],"openHistoryKey":[32],"setSearchResults":[64],"setLoading":[64]}]]],["mrd-boolean-field_25.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"me":[16],"formValues":[32],"errors":[32],"submitted":[32],"setFieldValue":[64]},null,{"values":[{"valuesChanged":0}],"me":[{"meChanged":0}]}],[2,"mrd-layout-section",{"items":[16],"data":[16],"views":[16],"links":[16],"locale":[1],"archetypes":[16],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"viewKey":[1,"view-key"],"height":[2],"locale":[1],"mode":[32],"canCreate":[32],"targetLabel":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-email-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[262,"mrd-invoice-view",{"archetype":[16],"data":[16],"locale":[1],"statusListItems":[16]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[2,"mrd-date-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-datetime-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"localValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"locale":[1],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"uploadFile":[64],"setFileReference":[64],"setCreatedHref":[64]}],[2,"mrd-email-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-file-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-hyperlink-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"internalHref":[32],"internalName":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-image-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-list-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"multiple":[4],"locale":[1],"listItems":[16],"error":[32],"selected":[32]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-number-field",{"name":[1],"label":[1],"value":[2],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"dataType":[1,"data-type"],"decimalPrecision":[2,"decimal-precision"],"displayValue":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[2,"mrd-relation-field",{"name":[1],"label":[1],"required":[4],"disabled":[4],"locale":[1],"relatedClass":[1,"related-class"],"mostSignificantClass":[1,"most-significant-class"],"displayType":[1,"display-type"],"editBehavior":[1,"edit-behavior"],"commonRelation":[1,"common-relation"],"multiple":[4],"dropdownValues":[16],"value":[1],"searchQuery":[32],"searchResults":[32],"allRecords":[32],"isLoading":[32],"selectedItems":[32],"showResults":[32],"error":[32],"highlightedIndex":[32],"setAllRecords":[64],"setSearchResults":[64],"setLoading":[64]},null,{"allRecords":[{"allRecordsChanged":0}],"value":[{"valueChanged":0}]}],[2,"mrd-secret-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-table",{"item":[16],"parentId":[1,"parent-id"],"rows":[16],"locale":[1],"totalElements":[2,"total-elements"],"pageSize":[2,"page-size"],"rowHeight":[2,"row-height"],"tableHeight":[2,"table-height"],"requestTimeoutMs":[2,"request-timeout-ms"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"resizingCol":[32],"sortField":[32],"sortDir":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
9
+ return index.bootstrapLazy([["mrd-merge-view.cjs",[[2,"mrd-merge-view",{"locale":[1],"basicType":[1,"basic-type"],"mostSignificantClass":[1,"most-significant-class"],"fields":[16],"currentHref":[1,"current-href"],"currentRecord":[16],"currentLabel":[1,"current-label"],"step":[32],"searchQuery":[32],"searchResults":[32],"isLoading":[32],"candidate":[32],"resolutions":[32],"openHistoryKey":[32],"setSearchResults":[64],"setLoading":[64]}]]],["mrd-boolean-field_25.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"me":[16],"formValues":[32],"errors":[32],"submitted":[32],"setFieldValue":[64]},null,{"values":[{"valuesChanged":0}],"me":[{"meChanged":0}]}],[2,"mrd-layout-section",{"items":[16],"data":[16],"views":[16],"links":[16],"locale":[1],"archetypes":[16],"readOnly":[4,"read-only"],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"viewKey":[1,"view-key"],"height":[2],"locale":[1],"readOnly":[4,"read-only"],"mode":[32],"canCreate":[32],"targetLabel":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-email-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[262,"mrd-invoice-view",{"archetype":[16],"data":[16],"locale":[1],"statusListItems":[16]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[2,"mrd-date-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-datetime-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"localValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"locale":[1],"readOnly":[4,"read-only"],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"uploadFile":[64],"setFileReference":[64],"setCreatedHref":[64]}],[2,"mrd-email-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-file-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-hyperlink-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"internalHref":[32],"internalName":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-image-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-list-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"multiple":[4],"locale":[1],"listItems":[16],"error":[32],"selected":[32]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-number-field",{"name":[1],"label":[1],"value":[2],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"dataType":[1,"data-type"],"decimalPrecision":[2,"decimal-precision"],"displayValue":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[2,"mrd-relation-field",{"name":[1],"label":[1],"required":[4],"disabled":[4],"locale":[1],"relatedClass":[1,"related-class"],"mostSignificantClass":[1,"most-significant-class"],"displayType":[1,"display-type"],"editBehavior":[1,"edit-behavior"],"commonRelation":[1,"common-relation"],"multiple":[4],"dropdownValues":[16],"value":[1],"searchQuery":[32],"searchResults":[32],"allRecords":[32],"isLoading":[32],"selectedItems":[32],"showResults":[32],"error":[32],"highlightedIndex":[32],"setAllRecords":[64],"setSearchResults":[64],"setLoading":[64]},null,{"allRecords":[{"allRecordsChanged":0}],"value":[{"valueChanged":0}]}],[2,"mrd-secret-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-table",{"item":[16],"parentId":[1,"parent-id"],"rows":[16],"locale":[1],"totalElements":[2,"total-elements"],"pageSize":[2,"page-size"],"rowHeight":[2,"row-height"],"tableHeight":[2,"table-height"],"requestTimeoutMs":[2,"request-timeout-ms"],"readOnly":[4,"read-only"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"resizingCol":[32],"sortField":[32],"sortDir":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["mrd-merge-view.cjs",[[2,"mrd-merge-view",{"locale":[1],"basicType":[1,"basic-type"],"mostSignificantClass":[1,"most-significant-class"],"fields":[16],"currentHref":[1,"current-href"],"currentRecord":[16],"currentLabel":[1,"current-label"],"step":[32],"searchQuery":[32],"searchResults":[32],"isLoading":[32],"candidate":[32],"resolutions":[32],"openHistoryKey":[32],"setSearchResults":[64],"setLoading":[64]}]]],["mrd-boolean-field_25.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"me":[16],"formValues":[32],"errors":[32],"submitted":[32],"setFieldValue":[64]},null,{"values":[{"valuesChanged":0}],"me":[{"meChanged":0}]}],[2,"mrd-layout-section",{"items":[16],"data":[16],"views":[16],"links":[16],"locale":[1],"archetypes":[16],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"viewKey":[1,"view-key"],"height":[2],"locale":[1],"mode":[32],"canCreate":[32],"targetLabel":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-email-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[262,"mrd-invoice-view",{"archetype":[16],"data":[16],"locale":[1],"statusListItems":[16]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[2,"mrd-date-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-datetime-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"localValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"locale":[1],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"uploadFile":[64],"setFileReference":[64],"setCreatedHref":[64]}],[2,"mrd-email-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-file-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-hyperlink-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"internalHref":[32],"internalName":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-image-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-list-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"multiple":[4],"locale":[1],"listItems":[16],"error":[32],"selected":[32]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-number-field",{"name":[1],"label":[1],"value":[2],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"dataType":[1,"data-type"],"decimalPrecision":[2,"decimal-precision"],"displayValue":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[2,"mrd-relation-field",{"name":[1],"label":[1],"required":[4],"disabled":[4],"locale":[1],"relatedClass":[1,"related-class"],"mostSignificantClass":[1,"most-significant-class"],"displayType":[1,"display-type"],"editBehavior":[1,"edit-behavior"],"commonRelation":[1,"common-relation"],"multiple":[4],"dropdownValues":[16],"value":[1],"searchQuery":[32],"searchResults":[32],"allRecords":[32],"isLoading":[32],"selectedItems":[32],"showResults":[32],"error":[32],"highlightedIndex":[32],"setAllRecords":[64],"setSearchResults":[64],"setLoading":[64]},null,{"allRecords":[{"allRecordsChanged":0}],"value":[{"valueChanged":0}]}],[2,"mrd-secret-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-table",{"item":[16],"parentId":[1,"parent-id"],"rows":[16],"locale":[1],"totalElements":[2,"total-elements"],"pageSize":[2,"page-size"],"rowHeight":[2,"row-height"],"tableHeight":[2,"table-height"],"requestTimeoutMs":[2,"request-timeout-ms"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"resizingCol":[32],"sortField":[32],"sortDir":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
22
+ return index.bootstrapLazy([["mrd-merge-view.cjs",[[2,"mrd-merge-view",{"locale":[1],"basicType":[1,"basic-type"],"mostSignificantClass":[1,"most-significant-class"],"fields":[16],"currentHref":[1,"current-href"],"currentRecord":[16],"currentLabel":[1,"current-label"],"step":[32],"searchQuery":[32],"searchResults":[32],"isLoading":[32],"candidate":[32],"resolutions":[32],"openHistoryKey":[32],"setSearchResults":[64],"setLoading":[64]}]]],["mrd-boolean-field_25.cjs",[[2,"mrd-form",{"layout":[16],"locale":[1],"values":[16],"referenceHref":[1,"reference-href"],"referenceClass":[1,"reference-class"],"showCancel":[4,"show-cancel"],"me":[16],"formValues":[32],"errors":[32],"submitted":[32],"setFieldValue":[64]},null,{"values":[{"valuesChanged":0}],"me":[{"meChanged":0}]}],[2,"mrd-layout-section",{"items":[16],"data":[16],"views":[16],"links":[16],"locale":[1],"archetypes":[16],"readOnly":[4,"read-only"],"searchQueryMap":[32],"searchResultsMap":[32],"imagePreviewUrl":[32],"imagePreviews":[32],"openHistoryField":[32],"setSearchResults":[64],"setViewPage":[64],"setViewAggregations":[64],"setViewDistinct":[64],"setViewFileReference":[64],"setViewCreatedObject":[64],"setImagePreview":[64],"openImagePreview":[64]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-field",{"item":[16],"locale":[1],"value":[16],"historyEntries":[32],"currentValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-container",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"viewKey":[1,"view-key"],"height":[2],"locale":[1],"readOnly":[4,"read-only"],"mode":[32],"canCreate":[32],"targetLabel":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-email-view",{"archetype":[16],"data":[16],"locale":[1]},null,{"data":[{"dataChanged":0}]}],[262,"mrd-invoice-view",{"archetype":[16],"data":[16],"locale":[1],"statusListItems":[16]},null,{"data":[{"dataChanged":0}]}],[2,"mrd-boolean-field",{"name":[1],"label":[1],"value":[4],"required":[4],"disabled":[4],"locale":[1],"checked":[32]}],[2,"mrd-currency-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"amountDisplay":[32],"currency":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[2,"mrd-date-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-datetime-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"localValue":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-document-list",{"item":[16],"archetype":[16],"parentId":[1,"parent-id"],"containerHref":[1,"container-href"],"locale":[1],"readOnly":[4,"read-only"],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"rootDropActive":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[64],"uploadFile":[64],"setFileReference":[64],"setCreatedHref":[64]}],[2,"mrd-email-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-file-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-hyperlink-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"internalHref":[32],"internalName":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-image-field",{"name":[1],"label":[1],"value":[16],"required":[4],"disabled":[4],"locale":[1],"accept":[1],"maxSize":[2,"max-size"],"multiple":[4],"entries":[32],"isDragging":[32],"error":[32]},null,{"value":[{"valueChanged":0}]}],[2,"mrd-list-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"multiple":[4],"locale":[1],"listItems":[16],"error":[32],"selected":[32]}],[2,"mrd-longtext-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-number-field",{"name":[1],"label":[1],"value":[2],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"dataType":[1,"data-type"],"decimalPrecision":[2,"decimal-precision"],"displayValue":[32],"error":[32]},null,{"value":[{"valueChanged":0}],"locale":[{"localeChanged":0}]}],[2,"mrd-relation-field",{"name":[1],"label":[1],"required":[4],"disabled":[4],"locale":[1],"relatedClass":[1,"related-class"],"mostSignificantClass":[1,"most-significant-class"],"displayType":[1,"display-type"],"editBehavior":[1,"edit-behavior"],"commonRelation":[1,"common-relation"],"multiple":[4],"dropdownValues":[16],"value":[1],"searchQuery":[32],"searchResults":[32],"allRecords":[32],"isLoading":[32],"selectedItems":[32],"showResults":[32],"error":[32],"highlightedIndex":[32],"setAllRecords":[64],"setSearchResults":[64],"setLoading":[64]},null,{"allRecords":[{"allRecordsChanged":0}],"value":[{"valueChanged":0}]}],[2,"mrd-secret-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-table",{"item":[16],"parentId":[1,"parent-id"],"rows":[16],"locale":[1],"totalElements":[2,"total-elements"],"pageSize":[2,"page-size"],"rowHeight":[2,"row-height"],"tableHeight":[2,"table-height"],"requestTimeoutMs":[2,"request-timeout-ms"],"readOnly":[4,"read-only"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"failedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"resizingCol":[32],"sortField":[32],"sortDir":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DVbdkYO3.js');
4
- var cellRenderer = require('./cell-renderer-pwUGEDql.js');
4
+ var cellRenderer = require('./cell-renderer-BBebjBVz.js');
5
5
  var clientLayout = require('./client-layout-CqVuJumR.js');
6
6
 
7
7
  const mrdBooleanFieldCss = () => `.sc-mrd-boolean-field-h{display:block}.mrd-boolean-field.sc-mrd-boolean-field{display:flex;align-items:center;width:100%}.mrd-boolean-field__toggle-label.sc-mrd-boolean-field{display:flex;align-items:center;gap:var(--mrd-space-3);cursor:pointer;user-select:none}.mrd-boolean-field__checkbox.sc-mrd-boolean-field{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:checked+.mrd-boolean-field__toggle.sc-mrd-boolean-field{background-color:var(--mrd-color-primary)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:checked+.mrd-boolean-field__toggle.sc-mrd-boolean-field::after{transform:translateX(20px)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:focus+.mrd-boolean-field__toggle.sc-mrd-boolean-field{box-shadow:var(--mrd-shadow-focus)}.mrd-boolean-field__checkbox.sc-mrd-boolean-field:disabled+.mrd-boolean-field__toggle.sc-mrd-boolean-field{opacity:0.5;cursor:not-allowed}.mrd-boolean-field__toggle.sc-mrd-boolean-field{position:relative;display:inline-block;width:44px;height:24px;background-color:var(--mrd-color-neutral-300);border-radius:var(--mrd-border-radius-full);transition:background-color var(--mrd-transition);flex-shrink:0}.mrd-boolean-field__toggle.sc-mrd-boolean-field::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;background-color:var(--mrd-color-white);border-radius:50%;transition:transform var(--mrd-transition);box-shadow:var(--mrd-shadow-sm)}.mrd-boolean-field__text.sc-mrd-boolean-field{font-family:var(--mrd-font-family);font-size:var(--mrd-font-size-base);color:var(--mrd-color-neutral-800)}.mrd-boolean-field__text--required.sc-mrd-boolean-field::after{content:" *";color:var(--mrd-color-danger)}`;
@@ -363,6 +363,10 @@ const MrdDocumentContainer = class {
363
363
  * on top, Finder-style. The table manages its own height. */
364
364
  this.height = 460;
365
365
  this.locale = navigator.language;
366
+ /** When true, this dashboard is read-only: New folder and Upload are disabled
367
+ * (with a tooltip explaining why) and the embedded table/list get it passed
368
+ * through so their own create/upload/drag-drop paths are disabled too. */
369
+ this.readOnly = false;
366
370
  /** Active body: folder tree or flat table. */
367
371
  this.mode = 'tree';
368
372
  /** Whether the folder tree currently has a valid target for "New folder". */
@@ -377,6 +381,8 @@ const MrdDocumentContainer = class {
377
381
  };
378
382
  this.pickFile = () => {
379
383
  var _a;
384
+ if (this.readOnly)
385
+ return;
380
386
  (_a = this.fileInputEl) === null || _a === void 0 ? void 0 : _a.click();
381
387
  };
382
388
  /** One file per upload, matching the drop handler. Reset the input afterwards
@@ -413,11 +419,11 @@ const MrdDocumentContainer = class {
413
419
  }
414
420
  // ── Toolbar ────────────────────────────────────────────────────────────────
415
421
  renderToolbar() {
416
- return (index.h("div", { class: "mrd-document-container__toolbar" }, this.mode === 'tree' && (index.h("button", { type: "button", class: "mrd-document-container__action", disabled: !this.canCreate, onClick: this.createFolder }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }), index.h("path", { d: "M12 11v4M10 13h4" })), cellRenderer.t('new_folder', this.locale))), this.mode === 'tree' && (index.h("button", { type: "button", class: "mrd-document-container__action", disabled: !this.canCreate, title: this.targetLabel ? `${cellRenderer.t('doc_upload_to', this.locale)} ${this.targetLabel}` : undefined, onClick: this.pickFile }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), index.h("path", { d: "M12 3v13M7 8l5-5 5 5" })), cellRenderer.t('doc_upload', this.locale))), index.h("input", { type: "file", class: "mrd-document-container__file-input", ref: el => (this.fileInputEl = el), onChange: this.onFilePicked }), index.h("div", { class: "mrd-document-container__seg", role: "group", "aria-label": cellRenderer.t('doc_view_switch', this.locale) }, index.h("button", { class: "mrd-document-container__seg-btn", "aria-pressed": String(this.mode === 'tree'), title: cellRenderer.t('doc_view_tree', this.locale), "aria-label": cellRenderer.t('doc_view_tree', this.locale), onClick: () => this.setMode('tree') }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M3 5h6M3 12h9M3 19h6" }), index.h("circle", { cx: "18", cy: "5", r: "1.6" }), index.h("circle", { cx: "18", cy: "19", r: "1.6" }), index.h("path", { d: "M16 12h4" }))), index.h("button", { class: "mrd-document-container__seg-btn", "aria-pressed": String(this.mode === 'list'), title: cellRenderer.t('doc_view_list', this.locale), "aria-label": cellRenderer.t('doc_view_list', this.locale), onClick: () => this.setMode('list') }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" }))))));
422
+ return (index.h("div", { class: "mrd-document-container__toolbar" }, this.mode === 'tree' && (index.h("button", { type: "button", class: "mrd-document-container__action", disabled: this.readOnly || !this.canCreate, title: this.readOnly ? cellRenderer.t('readonly_access', this.locale) : undefined, onClick: this.createFolder }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }), index.h("path", { d: "M12 11v4M10 13h4" })), cellRenderer.t('new_folder', this.locale))), this.mode === 'tree' && (index.h("button", { type: "button", class: "mrd-document-container__action", disabled: this.readOnly || !this.canCreate, title: this.readOnly ? cellRenderer.t('readonly_access', this.locale) : (this.targetLabel ? `${cellRenderer.t('doc_upload_to', this.locale)} ${this.targetLabel}` : undefined), onClick: this.pickFile }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), index.h("path", { d: "M12 3v13M7 8l5-5 5 5" })), cellRenderer.t('doc_upload', this.locale))), index.h("input", { type: "file", class: "mrd-document-container__file-input", ref: el => (this.fileInputEl = el), onChange: this.onFilePicked }), index.h("div", { class: "mrd-document-container__seg", role: "group", "aria-label": cellRenderer.t('doc_view_switch', this.locale) }, index.h("button", { class: "mrd-document-container__seg-btn", "aria-pressed": String(this.mode === 'tree'), title: cellRenderer.t('doc_view_tree', this.locale), "aria-label": cellRenderer.t('doc_view_tree', this.locale), onClick: () => this.setMode('tree') }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M3 5h6M3 12h9M3 19h6" }), index.h("circle", { cx: "18", cy: "5", r: "1.6" }), index.h("circle", { cx: "18", cy: "19", r: "1.6" }), index.h("path", { d: "M16 12h4" }))), index.h("button", { class: "mrd-document-container__seg-btn", "aria-pressed": String(this.mode === 'list'), title: cellRenderer.t('doc_view_list', this.locale), "aria-label": cellRenderer.t('doc_view_list', this.locale), onClick: () => this.setMode('list') }, index.h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, index.h("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" }))))));
417
423
  }
418
424
  // ── Bodies ───────────────────────────────────────────────────────────────
419
425
  renderTree() {
420
- return (index.h("mrd-document-list", { "data-doclist": this.viewKey, ref: el => (this.listEl = el), item: this.item, archetype: this.archetype, parentId: this.parentId, containerHref: this.containerHref, locale: this.locale, onMrdLoadDistinct: (e) => {
426
+ return (index.h("mrd-document-list", { "data-doclist": this.viewKey, ref: el => (this.listEl = el), item: this.item, archetype: this.archetype, parentId: this.parentId, containerHref: this.containerHref, locale: this.locale, readOnly: this.readOnly, onMrdLoadDistinct: (e) => {
421
427
  e.stopPropagation();
422
428
  this.mrdLoadDistinct.emit(e.detail);
423
429
  }, onMrdLoadPage: (e) => {
@@ -444,7 +450,7 @@ const MrdDocumentContainer = class {
444
450
  } }));
445
451
  }
446
452
  renderList() {
447
- return (index.h("mrd-table", { "data-view": this.viewKey, ref: el => (this.tableEl = el), item: this.item, parentId: this.parentId, locale: this.locale, onMrdLoadPage: (e) => {
453
+ return (index.h("mrd-table", { "data-view": this.viewKey, ref: el => (this.tableEl = el), item: this.item, parentId: this.parentId, locale: this.locale, readOnly: this.readOnly, onMrdLoadPage: (e) => {
448
454
  e.stopPropagation();
449
455
  this.mrdLoadPage.emit(e.detail);
450
456
  }, onMrdLoadAggregations: (e) => {
@@ -468,7 +474,7 @@ const MrdDocumentContainer = class {
468
474
  }
469
475
  render() {
470
476
  const treeMode = this.mode === 'tree';
471
- return (index.h(index.Host, { key: 'ae948e2458d9087179e850b527802c489067d93f' }, this.renderToolbar(), index.h("div", { key: 'a04e1a78413aa794d0bda551aeb9c6245f1aafa2', class: {
477
+ return (index.h(index.Host, { key: '6792d49f08dd19f6c51e4b656df06bbd8bc14f3e' }, this.renderToolbar(), index.h("div", { key: '702f4c288f8c40bd2c5999beb392b9dfd022b0bc', class: {
472
478
  'mrd-document-container__body': true,
473
479
  'mrd-document-container__body--tree': treeMode,
474
480
  }, style: treeMode ? { height: `${this.height}px`, overflowY: 'auto' } : {} }, treeMode ? this.renderTree() : this.renderList())));
@@ -735,6 +741,11 @@ const MrdDocumentList = class {
735
741
  * accepts file drops and folder creation. */
736
742
  this.containerHref = '';
737
743
  this.locale = navigator.language;
744
+ /** When true, folder creation, file upload (button and drag-drop) and moving a
745
+ * document between folders are all disabled — a viewer-role user can browse
746
+ * but not mutate anything. Drives mrdCanCreate(false) so the host toolbar's
747
+ * New folder / Upload buttons stay disabled too. */
748
+ this.readOnly = false;
738
749
  this.containers = [];
739
750
  this.rootLoading = true;
740
751
  /** True when the single-container level is collapsed away (dossier context). */
@@ -777,6 +788,8 @@ const MrdDocumentList = class {
777
788
  /** The optimistic document row awaiting its self href from the create POST. */
778
789
  this.lastOptimisticDoc = null;
779
790
  this.startCreateFolder = () => {
791
+ if (this.readOnly)
792
+ return;
780
793
  const resolved = this.resolveTarget();
781
794
  if (!resolved || this.pendingNode)
782
795
  return;
@@ -816,6 +829,10 @@ const MrdDocumentList = class {
816
829
  // ── Drag & drop: move a document into another folder / container ────────────
817
830
  this.onDocDragStart = (e, doc, node) => {
818
831
  var _a, _b, _c;
832
+ if (this.readOnly) {
833
+ e.preventDefault();
834
+ return;
835
+ }
819
836
  this.dragDoc = doc;
820
837
  this.dragFromId = node.id;
821
838
  if (e.dataTransfer) {
@@ -835,6 +852,11 @@ const MrdDocumentList = class {
835
852
  * root drop-zone; a different node is highlighted (its own folder = no-op). */
836
853
  this.onNodeDragOver = (e, node) => {
837
854
  const file = this.isFileDrag(e);
855
+ if (this.readOnly) {
856
+ if (file)
857
+ e.preventDefault(); // swallow so the browser doesn't navigate to the dropped file
858
+ return;
859
+ }
838
860
  if (!this.dragDoc && !file)
839
861
  return;
840
862
  e.preventDefault();
@@ -850,6 +872,10 @@ const MrdDocumentList = class {
850
872
  this.dropTargetId = null;
851
873
  };
852
874
  this.onNodeDrop = (e, node, container) => {
875
+ if (this.readOnly) {
876
+ e.preventDefault();
877
+ return;
878
+ }
853
879
  if (this.isFileDrag(e)) {
854
880
  e.preventDefault();
855
881
  e.stopPropagation();
@@ -868,6 +894,11 @@ const MrdDocumentList = class {
868
894
  if (!this.singleContainer)
869
895
  return;
870
896
  const file = this.isFileDrag(e);
897
+ if (this.readOnly) {
898
+ if (file)
899
+ e.preventDefault(); // swallow so the browser doesn't navigate to the dropped file
900
+ return;
901
+ }
871
902
  if (!this.dragDoc && !file)
872
903
  return;
873
904
  e.preventDefault();
@@ -885,6 +916,10 @@ const MrdDocumentList = class {
885
916
  };
886
917
  this.onRootDrop = (e) => {
887
918
  this.rootDropActive = false;
919
+ if (this.readOnly) {
920
+ e.preventDefault();
921
+ return;
922
+ }
888
923
  if (!this.singleContainer)
889
924
  return;
890
925
  const only = this.containers[0];
@@ -1155,10 +1190,10 @@ const MrdDocumentList = class {
1155
1190
  return null;
1156
1191
  }
1157
1192
  get canCreateFolder() {
1158
- return !this.pendingNode && this.resolveTarget() !== null;
1193
+ return !this.readOnly && !this.pendingNode && this.resolveTarget() !== null;
1159
1194
  }
1160
1195
  /** Start creating a folder under the current target. Called by the host toolbar
1161
- * (mrd-document-container). No-op when there is no valid target. */
1196
+ * (mrd-document-container). No-op when there is no valid target, or read-only. */
1162
1197
  async createFolder() {
1163
1198
  this.startCreateFolder();
1164
1199
  }
@@ -1244,7 +1279,7 @@ const MrdDocumentList = class {
1244
1279
  * (mrd-document-container). No-op without a target, or while another upload
1245
1280
  * is still awaiting its setFileReference. */
1246
1281
  async uploadFile(file) {
1247
- if (!file || this.pendingUpload)
1282
+ if (this.readOnly || !file || this.pendingUpload)
1248
1283
  return;
1249
1284
  const resolved = this.resolveTarget();
1250
1285
  if (!resolved)
@@ -1385,7 +1420,7 @@ const MrdDocumentList = class {
1385
1420
  body = renderLoadingRow(ctx, 0);
1386
1421
  }
1387
1422
  else if (this.containers.length === 0) {
1388
- body = index.h("div", { key: '63604a99fc62d9108f61b8efc126c0cd3e8fc5ed', class: "mrd-document-list__empty" }, cellRenderer.t('no_results', this.locale));
1423
+ body = index.h("div", { key: '5d473ec3a894361325a71deb14e7b52d0abc5f06', class: "mrd-document-list__empty" }, cellRenderer.t('no_results', this.locale));
1389
1424
  }
1390
1425
  else if (this.singleContainer) {
1391
1426
  // Dossier context: render the single container's folder tree at the root.
@@ -1403,7 +1438,7 @@ const MrdDocumentList = class {
1403
1438
  else {
1404
1439
  body = this.containers.map(c => renderContainerNode(ctx, c, 0));
1405
1440
  }
1406
- return (index.h(index.Host, { key: '2a092e3a7483deb1fb30753b0c0428aaf75c303a' }, index.h("div", { key: '2b716c912a272b925a95133de5b1ff2abedd9dbc', class: 'mrd-document-list' + (this.rootDropActive ? ' mrd-document-list--drop-active' : ''), onDragOver: this.onRootDragOver, onDragLeave: this.onRootDragLeave, onDrop: this.onRootDrop }, body)));
1441
+ return (index.h(index.Host, { key: '757babf3ccabbb113ab2a24d632b2b9a02d3c08b' }, index.h("div", { key: '606c212687482efdc5666333678e2ea406709e75', class: 'mrd-document-list' + (this.rootDropActive ? ' mrd-document-list--drop-active' : ''), onDragOver: this.onRootDragOver, onDragLeave: this.onRootDragLeave, onDrop: this.onRootDrop }, body)));
1407
1442
  }
1408
1443
  get el() { return index.getElement(this); }
1409
1444
  };
@@ -5318,6 +5353,10 @@ const MrdLayoutSection = class {
5318
5353
  /** Top-level archetypes on the object dashboard. When it contains commons.document,
5319
5354
  * the record is rendered as a single-document view instead of generic fields. */
5320
5355
  this.archetypes = [];
5356
+ /** When true, this dashboard is read-only (viewer role): the embedded mrd-table's
5357
+ * create ("+") action and the documents view's New folder / Upload are disabled
5358
+ * with a tooltip explaining why, so it's clear at a glance the user can't mutate data. */
5359
+ this.readOnly = false;
5321
5360
  this.searchQueryMap = {};
5322
5361
  this.searchResultsMap = {};
5323
5362
  this.imagePreviewUrl = null;
@@ -5523,7 +5562,7 @@ const MrdLayoutSection = class {
5523
5562
  * swaps between the folder tree and the flat table. Events are re-emitted to
5524
5563
  * the host with the view key, exactly as the raw list/table events were. */
5525
5564
  renderDocumentContainer(item, key, parentId, archetype, containerHref) {
5526
- return (index.h("mrd-document-container", { item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, viewKey: key, locale: this.locale, onMrdLoadDistinct: (e) => {
5565
+ return (index.h("mrd-document-container", { item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, viewKey: key, locale: this.locale, readOnly: this.readOnly, onMrdLoadDistinct: (e) => {
5527
5566
  e.stopPropagation();
5528
5567
  this.mrdLoadViewDistinct.emit(Object.assign({ name: key }, e.detail));
5529
5568
  }, onMrdLoadPage: (e) => {
@@ -5556,7 +5595,7 @@ const MrdLayoutSection = class {
5556
5595
  } }));
5557
5596
  }
5558
5597
  renderTable(item, key, parentId) {
5559
- return (index.h("mrd-table", { "data-view": key, item: item, parentId: parentId, locale: this.locale, onMrdLoadPage: (e) => this.handleViewLoadPage(e, key), onMrdLoadAggregations: (e) => {
5598
+ return (index.h("mrd-table", { "data-view": key, item: item, parentId: parentId, locale: this.locale, readOnly: this.readOnly, onMrdLoadPage: (e) => this.handleViewLoadPage(e, key), onMrdLoadAggregations: (e) => {
5560
5599
  var _a;
5561
5600
  e.stopPropagation();
5562
5601
  this.mrdLoadViewAggregations.emit(Object.assign({ name: key, dataClass: (_a = item.dataClass) !== null && _a !== void 0 ? _a : key }, e.detail));
@@ -5660,7 +5699,7 @@ const MrdLayoutSection = class {
5660
5699
  const docArchetype = clientLayout.resolveArchetype(this.archetypes, clientLayout.ARCHETYPE_DOCUMENT);
5661
5700
  const invoiceArchetype = !docArchetype ? clientLayout.resolveArchetype(this.archetypes, clientLayout.ARCHETYPE_INVOICE) : undefined;
5662
5701
  const emailArchetype = !docArchetype && !invoiceArchetype ? clientLayout.resolveArchetype(this.archetypes, clientLayout.ARCHETYPE_EMAIL) : undefined;
5663
- return (index.h(index.Host, { key: 'ccae8e82b4dd549ab24239fe685a6830a508061d' }, index.h("div", { key: '4072cc4ecdd2b087c54a5515e653f7f713b2150f', class: "mrd-layout-section" }, docArchetype && this.renderDocumentObject(docArchetype), invoiceArchetype && this.renderInvoiceObject(invoiceArchetype), emailArchetype && this.renderEmailObject(emailArchetype), !docArchetype && !invoiceArchetype && !emailArchetype && this.items.map(item => this.renderItem(item))), this.renderImageModal()));
5702
+ return (index.h(index.Host, { key: '07b1d61b170a5ae971ba54eaf775e1787dea1642' }, index.h("div", { key: 'd146e0542b1de11bd130eb3d36d54e4faf055309', class: "mrd-layout-section" }, docArchetype && this.renderDocumentObject(docArchetype), invoiceArchetype && this.renderInvoiceObject(invoiceArchetype), emailArchetype && this.renderEmailObject(emailArchetype), !docArchetype && !invoiceArchetype && !emailArchetype && this.items.map(item => this.renderItem(item))), this.renderImageModal()));
5664
5703
  }
5665
5704
  get el() { return index.getElement(this); }
5666
5705
  static get watchers() { return {
@@ -6436,7 +6475,7 @@ const JsonModal = ({ html, locale, onClose }) => {
6436
6475
  return null;
6437
6476
  return (index.h("div", { class: "mrd-table__modal-backdrop", onClick: onClose, role: "dialog", "aria-modal": "true" }, index.h("div", { class: "mrd-table__modal", onClick: (e) => e.stopPropagation() }, index.h("button", { class: "mrd-table__modal-close", onClick: onClose, "aria-label": cellRenderer.t('close', locale) }, "\u2715"), index.h("pre", { class: "mrd-table__modal-json", innerHTML: html }))));
6438
6477
  };
6439
- const Toolbar = ({ locale, filterCount, actions, views, activeViewIdx, viewPopoverOpen, createPickerOpen, createTypes, cb }) => {
6478
+ const Toolbar = ({ locale, filterCount, actions, views, activeViewIdx, viewPopoverOpen, createPickerOpen, createTypes, readOnly, cb }) => {
6440
6479
  var _a;
6441
6480
  const hasActions = actions.length > 0;
6442
6481
  const hasViewSwitcher = views.length > 1;
@@ -6447,14 +6486,18 @@ const Toolbar = ({ locale, filterCount, actions, views, activeViewIdx, viewPopov
6447
6486
  } }, v.label)))))), index.h("button", { class: "mrd-table__view-arrow", "aria-label": "Next view", onClick: () => cb.onViewSwitch((activeViewIdx + 1) % views.length) }, "\u25B6")))), hasActions && (index.h("div", { class: "mrd-table__toolbar-right" }, actions.map(a => {
6448
6487
  var _a, _b;
6449
6488
  const pickerTypes = a.action === 'create' ? createTypes : null;
6489
+ // readOnly only ever disables 'create' (see mrd-table.tsx tableActions) — export,
6490
+ // sorting and filtering don't mutate data and stay available.
6491
+ const disabled = a.disabled || (readOnly && a.action === 'create');
6492
+ const tooltip = disabled && readOnly ? cellRenderer.t('readonly_access', locale) : a.label;
6450
6493
  if (pickerTypes === null || pickerTypes === void 0 ? void 0 : pickerTypes.length) {
6451
- return (index.h("div", { class: "mrd-table__create-picker-wrap", key: `action-${a.action}` }, index.h("button", { class: `mrd-table__action mrd-table__action--${(_a = a.variant) !== null && _a !== void 0 ? _a : 'secondary'}`, onClick: cb.onToggleCreatePicker }, a.icon
6494
+ return (index.h("div", { class: "mrd-table__create-picker-wrap", key: `action-${a.action}` }, index.h("button", { class: `mrd-table__action mrd-table__action--${(_a = a.variant) !== null && _a !== void 0 ? _a : 'secondary'}`, disabled: disabled, onClick: cb.onToggleCreatePicker }, a.icon
6452
6495
  ? index.h("svg", { class: "mrd-table__action-icon", "aria-hidden": "true" }, index.h("use", { href: a.icon }))
6453
- : a.label, index.h("span", { class: "mrd-table__action-tooltip" }, a.label)), createPickerOpen && (index.h("div", { class: "mrd-table__create-picker" }, pickerTypes.map(ct => (index.h("button", { key: ct.type, class: "mrd-table__create-picker-item", onClick: () => cb.onCreate(ct.type) }, ct.label)))))));
6496
+ : a.label, index.h("span", { class: "mrd-table__action-tooltip" }, tooltip)), createPickerOpen && (index.h("div", { class: "mrd-table__create-picker" }, pickerTypes.map(ct => (index.h("button", { key: ct.type, class: "mrd-table__create-picker-item", onClick: () => cb.onCreate(ct.type) }, ct.label)))))));
6454
6497
  }
6455
- return (index.h("button", { key: `action-${a.action}`, class: `mrd-table__action mrd-table__action--${(_b = a.variant) !== null && _b !== void 0 ? _b : 'secondary'}`, disabled: a.disabled, onClick: () => cb.onAction(a.action) }, a.icon
6498
+ return (index.h("button", { key: `action-${a.action}`, class: `mrd-table__action mrd-table__action--${(_b = a.variant) !== null && _b !== void 0 ? _b : 'secondary'}`, disabled: disabled, onClick: () => cb.onAction(a.action) }, a.icon
6456
6499
  ? index.h("svg", { class: "mrd-table__action-icon", "aria-hidden": "true" }, index.h("use", { href: a.icon }))
6457
- : a.label, index.h("span", { class: "mrd-table__action-tooltip" }, a.label)));
6500
+ : a.label, index.h("span", { class: "mrd-table__action-tooltip" }, tooltip)));
6458
6501
  })))));
6459
6502
  };
6460
6503
 
@@ -6645,6 +6688,10 @@ const MrdTable = class {
6645
6688
  this.resizeObserver = null;
6646
6689
  /** Guards against scheduling more than one column-width measurement per freeze. */
6647
6690
  this.colWidthMeasureScheduled = false;
6691
+ /** True once the header/totals widths have been checked against the current totals row. */
6692
+ this.fixedContentMeasured = false;
6693
+ /** Guards against scheduling more than one grow pass. */
6694
+ this.growScheduled = false;
6648
6695
  /** Drag origin of the running column resize (null = no drag in progress). */
6649
6696
  this.resizeOrigin = null;
6650
6697
  /** True once the user has dragged (or auto-fitted) a column — see colWidthsUserSet usages. */
@@ -6671,6 +6718,10 @@ const MrdTable = class {
6671
6718
  /** Time (ms) to wait for setPage() before retrying a page request; after
6672
6719
  * MAX_RETRY_ATTEMPTS retries the page is marked failed (see failedPages). */
6673
6720
  this.requestTimeoutMs = REQUEST_TIMEOUT_MS;
6721
+ /** When true, the toolbar's create ("+") action is disabled (with a tooltip
6722
+ * explaining why) so a viewer-role user can see at a glance that this dashboard
6723
+ * is read-only. Sorting, filtering and export stay available — those don't mutate data. */
6724
+ this.readOnly = false;
6674
6725
  // ── Internal state ─────────────────────────────────────────────────────────
6675
6726
  /** Index into allViews[] for the currently displayed view. 0 = primary, 1+ = alternatives. */
6676
6727
  this.activeViewIdx = 0;
@@ -6739,6 +6790,7 @@ const MrdTable = class {
6739
6790
  this.colWidths = [];
6740
6791
  this.colWidthMeasureScheduled = false;
6741
6792
  this.colWidthsUserSet = false;
6793
+ this.fixedContentMeasured = false;
6742
6794
  }
6743
6795
  // ── Lifecycle ──────────────────────────────────────────────────────────────
6744
6796
  componentWillLoad() {
@@ -6782,6 +6834,7 @@ const MrdTable = class {
6782
6834
  this.colWidths = [];
6783
6835
  this.colWidthMeasureScheduled = false;
6784
6836
  this.colWidthsUserSet = false;
6837
+ this.fixedContentMeasured = false;
6785
6838
  this.scrollTop = 0;
6786
6839
  this.renderStart = 0;
6787
6840
  // Always fill the visible viewport on init — totalElements may be stale from a
@@ -6855,6 +6908,8 @@ const MrdTable = class {
6855
6908
  if (data.total != null)
6856
6909
  this.aggregationsTotal = data.total;
6857
6910
  this.aggregations = data;
6911
+ // Fresh totals can be wider than the ones the columns were checked against.
6912
+ this.fixedContentMeasured = false;
6858
6913
  }
6859
6914
  // ── Lifecycle ──────────────────────────────────────────────────────────────
6860
6915
  disconnectedCallback() {
@@ -6885,6 +6940,7 @@ const MrdTable = class {
6885
6940
  }
6886
6941
  componentDidRender() {
6887
6942
  this.freezeColWidths();
6943
+ this.growToFixedContent();
6888
6944
  }
6889
6945
  /** Freeze the column widths once the first data page has rendered.
6890
6946
  *
@@ -6938,6 +6994,38 @@ const MrdTable = class {
6938
6994
  const content = scrollWidth > clientWidth ? scrollWidth + paddingRight : clientWidth;
6939
6995
  return Math.ceil(content + borders);
6940
6996
  }
6997
+ /** Width a header cell needs, measured from its children instead of the cell's own
6998
+ * scrollWidth. A header is not just text: it holds the label plus a sort icon (and a filter
6999
+ * icon once the column is filtered), with the drag handle absolutely positioned on top of
7000
+ * the right padding. Summing the in-flow children makes the icons part of the width by
7001
+ * construction — and a child's own rect is never clipped by the header's `overflow: hidden`,
7002
+ * so it stays correct even when the header is already truncated on screen.
7003
+ * Returns 0 when nothing can be measured, so callers fall back to neededWidth(). */
7004
+ neededHeaderWidth(th) {
7005
+ const px = (v) => (typeof v === 'number' && Number.isFinite(v) ? v : 0);
7006
+ const size = (v) => px(parseFloat(v || '0'));
7007
+ const style = getComputedStyle(th);
7008
+ const paddingLeft = size(style.paddingLeft);
7009
+ const paddingRight = size(style.paddingRight);
7010
+ const borders = Math.max(0, px(th.offsetWidth) - px(th.clientWidth));
7011
+ let inflow = 0;
7012
+ let handle = 0;
7013
+ Array.from(th.children).forEach(child => {
7014
+ const el = child;
7015
+ const cs = getComputedStyle(el);
7016
+ const width = px(el.getBoundingClientRect().width) + size(cs.marginLeft) + size(cs.marginRight);
7017
+ // The drag handle is absolutely positioned: it takes no room in the flow, it overlays it.
7018
+ if (cs.position === 'absolute')
7019
+ handle = Math.max(handle, width);
7020
+ else
7021
+ inflow += width;
7022
+ });
7023
+ if (inflow <= 0)
7024
+ return 0;
7025
+ // The handle sits over the right padding; only reserve what would stick out past it,
7026
+ // so the label never ends up underneath the grab area.
7027
+ return Math.ceil(inflow + paddingLeft + paddingRight + Math.max(0, handle - paddingRight) + borders);
7028
+ }
6941
7029
  /** Width each column needs for its header and its rendered page-0 cells — what the columns
6942
7030
  * are locked to, so they never end up narrower than their content.
6943
7031
  *
@@ -6951,11 +7039,11 @@ const MrdTable = class {
6951
7039
  if (ths.length === 0 || ths.length !== this.columns.length)
6952
7040
  return null;
6953
7041
  const needed = Array.from(ths).map((th, idx) => {
6954
- let widest = this.neededWidth(th);
7042
+ let widest = Math.max(this.neededWidth(th), this.neededHeaderWidth(th));
6955
7043
  // .mrd-table__cell only matches real data cells — the shimmer/retry rows render a single
6956
7044
  // colSpan cell (without that class) which would measure as the full table width.
6957
7045
  this.el
6958
- .querySelectorAll(`.mrd-table__cell:nth-child(${idx + 1})`)
7046
+ .querySelectorAll(this.columnCellSelector(idx))
6959
7047
  .forEach(cell => { widest = Math.max(widest, this.neededWidth(cell)); });
6960
7048
  return widest;
6961
7049
  });
@@ -6965,6 +7053,50 @@ const MrdTable = class {
6965
7053
  return null;
6966
7054
  return needed.map(w => Math.min(Math.max(w, MIN_COL_WIDTH), MAX_AUTOFIT_WIDTH));
6967
7055
  }
7056
+ /** Data and totals cells of one column. The totals row is included everywhere the data
7057
+ * cells are: it is fixed, always-visible content, so it must never be clipped. */
7058
+ columnCellSelector(idx) {
7059
+ return `.mrd-table__cell:nth-child(${idx + 1}), .mrd-table__totals-cell:nth-child(${idx + 1})`;
7060
+ }
7061
+ /** Width the header and totals cells of each column need. Null when nothing has a box. */
7062
+ measureFixedContentWidths() {
7063
+ const ths = this.el.querySelectorAll('.mrd-table__header');
7064
+ if (ths.length === 0 || ths.length !== this.columns.length)
7065
+ return null;
7066
+ const needed = Array.from(ths).map((th, idx) => {
7067
+ let widest = Math.max(this.neededWidth(th), this.neededHeaderWidth(th));
7068
+ this.el
7069
+ .querySelectorAll(`.mrd-table__totals-cell:nth-child(${idx + 1})`)
7070
+ .forEach(cell => { widest = Math.max(widest, this.neededWidth(cell)); });
7071
+ return widest;
7072
+ });
7073
+ return needed.every(w => w <= 0) ? null : needed;
7074
+ }
7075
+ /** Widen columns whose header or totals cell does not fit. Data cells may be ellipsised —
7076
+ * that is what the lock is for — but the header and the totals row are fixed content that
7077
+ * is always on screen, so clipping them just hides information with no way to reveal it.
7078
+ *
7079
+ * It runs as a second pass because the totals only arrive with setAggregations(), long
7080
+ * after the widths were frozen on page 0. Grow-only and once per totals change, so it can
7081
+ * never turn into the per-page re-proportioning the lock exists to prevent. Hand-set
7082
+ * widths are left alone. */
7083
+ growToFixedContent() {
7084
+ if (this.colWidths.length === 0 || this.colWidthsUserSet || this.fixedContentMeasured || this.growScheduled)
7085
+ return;
7086
+ this.growScheduled = true;
7087
+ index.writeTask(() => {
7088
+ this.growScheduled = false;
7089
+ if (this.colWidths.length === 0 || this.colWidthsUserSet)
7090
+ return;
7091
+ const needed = this.measureFixedContentWidths();
7092
+ if (!needed)
7093
+ return;
7094
+ this.fixedContentMeasured = true;
7095
+ const grown = this.colWidths.map((w, i) => Math.min(Math.max(w, needed[i]), MAX_AUTOFIT_WIDTH));
7096
+ if (grown.some((w, i) => w !== this.colWidths[i]))
7097
+ this.colWidths = grown;
7098
+ });
7099
+ }
6968
7100
  /** Re-reads the rendered header widths into colWidths so a drag starts from what is
6969
7101
  * actually on screen — and locks the columns if they weren't locked yet.
6970
7102
  *
@@ -7023,9 +7155,14 @@ const MrdTable = class {
7023
7155
  return;
7024
7156
  // .mrd-table__cell only matches real data cells — the shimmer/retry rows render a single
7025
7157
  // colSpan cell (without that class) which would otherwise measure as the full table width.
7026
- const cells = this.el.querySelectorAll(`.mrd-table__header:nth-child(${idx + 1}), .mrd-table__cell:nth-child(${idx + 1})`);
7158
+ const cells = this.el.querySelectorAll(`.mrd-table__header:nth-child(${idx + 1}), ${this.columnCellSelector(idx)}`);
7027
7159
  let widest = 0;
7028
- cells.forEach(cell => { widest = Math.max(widest, this.neededWidth(cell)); });
7160
+ cells.forEach(cell => {
7161
+ const needed = cell.classList.contains('mrd-table__header')
7162
+ ? Math.max(this.neededWidth(cell), this.neededHeaderWidth(cell))
7163
+ : this.neededWidth(cell);
7164
+ widest = Math.max(widest, needed);
7165
+ });
7029
7166
  if (widest > 0)
7030
7167
  this.setColWidth(idx, Math.min(widest, MAX_AUTOFIT_WIDTH));
7031
7168
  }
@@ -7154,7 +7291,7 @@ const MrdTable = class {
7154
7291
  const raw = (_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.actions) !== null && _b !== void 0 ? _b : [];
7155
7292
  return (raw !== null && raw !== void 0 ? raw : []).reduce((acc, a) => {
7156
7293
  if (a === 'NEW')
7157
- acc.push({ action: 'create', label: cellRenderer.t('table_new_record', this.locale), icon: 'assets/sprites.svg#icon-plus', variant: 'primary' });
7294
+ acc.push({ action: 'create', label: cellRenderer.t('table_new_record', this.locale), icon: 'assets/sprites.svg#icon-plus', variant: 'primary', disabled: this.readOnly });
7158
7295
  if (a === 'EXPORT')
7159
7296
  acc.push({ action: 'export', label: cellRenderer.t('table_export_excel', this.locale), icon: 'assets/sprites.svg#icon-file-excel' });
7160
7297
  return acc;
@@ -7517,7 +7654,7 @@ const MrdTable = class {
7517
7654
  // ── Render: toolbar ────────────────────────────────────────────────────────
7518
7655
  renderToolbar() {
7519
7656
  var _a;
7520
- return (index.h(Toolbar, { locale: this.locale, filterCount: this.activeFilters.size, actions: this.tableActions, views: this.allViews, activeViewIdx: this.activeViewIdx, viewPopoverOpen: this.viewPopoverOpen, createPickerOpen: this.createPickerOpen, createTypes: (_a = this.item) === null || _a === void 0 ? void 0 : _a.createTypes, cb: {
7657
+ return (index.h(Toolbar, { locale: this.locale, filterCount: this.activeFilters.size, actions: this.tableActions, views: this.allViews, activeViewIdx: this.activeViewIdx, viewPopoverOpen: this.viewPopoverOpen, createPickerOpen: this.createPickerOpen, createTypes: (_a = this.item) === null || _a === void 0 ? void 0 : _a.createTypes, readOnly: this.readOnly, cb: {
7521
7658
  onClearAllFilters: () => this.clearAllFilters(),
7522
7659
  onViewSwitch: idx => this.handleViewSwitch(idx),
7523
7660
  onToggleViewPopover: e => this.toggleViewPopover(e),