@mmlogic/components 0.3.10 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mosterdcomponents.cjs.js +1 -1
  3. package/dist/cjs/mrd-boolean-field_23.cjs.entry.js +103 -15
  4. package/dist/collection/components/mrd-document-container/mrd-document-container.js +48 -2
  5. package/dist/collection/components/mrd-document-list/mrd-document-list.js +95 -9
  6. package/dist/collection/components/mrd-document-list/mrd-document-list.scss +11 -0
  7. package/dist/collection/components/mrd-layout-section/mrd-layout-section.js +19 -4
  8. package/dist/collection/utils/i18n.js +2 -0
  9. package/dist/components/i18n.js +1 -1
  10. package/dist/components/mrd-document-container2.js +1 -1
  11. package/dist/components/mrd-document-list2.js +1 -1
  12. package/dist/components/mrd-layout-section.js +1 -1
  13. package/dist/esm/loader.js +1 -1
  14. package/dist/esm/mosterdcomponents.js +1 -1
  15. package/dist/esm/mrd-boolean-field_23.entry.js +103 -15
  16. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  17. package/dist/mosterdcomponents/p-a9618055.entry.js +1 -0
  18. package/dist/types/components/mrd-document-container/mrd-document-container.d.ts +5 -0
  19. package/dist/types/components/mrd-document-list/mrd-document-list.d.ts +24 -1
  20. package/dist/types/components/mrd-layout-section/mrd-layout-section.d.ts +3 -0
  21. package/dist/types/components.d.ts +33 -0
  22. package/dist/types/types/client-layout.d.ts +5 -0
  23. package/package.json +1 -1
  24. package/dist/mosterdcomponents/cell-renderer-B-AJDBcj.js.map +0 -1
  25. package/dist/mosterdcomponents/client-layout-ChqRA3AF.js.map +0 -1
  26. package/dist/mosterdcomponents/format-BAfsQfy1.js.map +0 -1
  27. package/dist/mosterdcomponents/i18n-s1XrKcD2.js.map +0 -1
  28. package/dist/mosterdcomponents/index-DkY-NQj0.js.map +0 -1
  29. package/dist/mosterdcomponents/index-DwF_Sp__.js.map +0 -1
  30. package/dist/mosterdcomponents/index.esm.js.map +0 -1
  31. package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +0 -1
  32. package/dist/mosterdcomponents/p-69452249.entry.js +0 -1
  33. package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +0 -1
  34. package/dist/mosterdcomponents/validation-Br9k2Ztw.js.map +0 -1
@@ -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-boolean-field_23.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"],"viewKey":[1,"view-key"],"locale":[1],"mode":[32],"canCreate":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]}],[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]}],[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"],"locale":[1],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[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"],"fileName":[32],"isDragging":[32],"uploading":[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"],"previewUrl":[32],"fileName":[32],"isDragging":[32],"uploading":[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]}],[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"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"sortField":[32],"sortDir":[32],"filterMode":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
9
+ return index.bootstrapLazy([["mrd-boolean-field_23.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]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]}],[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]}],[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],"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"],"fileName":[32],"isDragging":[32],"uploading":[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"],"previewUrl":[32],"fileName":[32],"isDragging":[32],"uploading":[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]}],[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"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"sortField":[32],"sortDir":[32],"filterMode":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], 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-boolean-field_23.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"],"viewKey":[1,"view-key"],"locale":[1],"mode":[32],"canCreate":[32]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]}],[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]}],[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"],"locale":[1],"containers":[32],"rootLoading":[32],"singleContainer":[32],"selectedId":[32],"dropTargetId":[32],"uploadingNodeId":[32],"setDistinct":[64],"setDocuments":[64],"createFolder":[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"],"fileName":[32],"isDragging":[32],"uploading":[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"],"previewUrl":[32],"fileName":[32],"isDragging":[32],"uploading":[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]}],[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"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"sortField":[32],"sortDir":[32],"filterMode":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
22
+ return index.bootstrapLazy([["mrd-boolean-field_23.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]}],[2,"mrd-document-view",{"archetype":[16],"data":[16],"locale":[1]}],[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]}],[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],"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"],"fileName":[32],"isDragging":[32],"uploading":[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"],"previewUrl":[32],"fileName":[32],"isDragging":[32],"uploading":[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]}],[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"],"activeViewIdx":[32],"loadedPages":[32],"requestedPages":[32],"renderStart":[32],"renderEnd":[32],"colWidths":[32],"sortField":[32],"sortDir":[32],"filterMode":[32],"activeFilters":[32],"openFilterCol":[32],"pendingFilter":[32],"popupPos":[32],"createPickerOpen":[32],"viewPopoverOpen":[32],"scrollTop":[32],"textblockModal":[32],"jsonModal":[32],"aggregations":[32],"aggregationsTotal":[32],"minKnownTotal":[32],"init":[64],"setPage":[64],"setAggregations":[64]},null,{"totalElements":[{"totalElementsChanged":0}],"item":[{"itemChanged":0}]}],[2,"mrd-text-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}],[2,"mrd-textarea-field",{"name":[1],"label":[1],"value":[1],"placeholder":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32],"editorReady":[32]}],[2,"mrd-time-field",{"name":[1],"label":[1],"value":[1],"required":[4],"disabled":[4],"locale":[1],"error":[32]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -105,6 +105,7 @@ const translations = {
105
105
  folder_name_placeholder: 'Foldernaam',
106
106
  folder_no_slash: "Een foldernaam mag geen '/' bevatten",
107
107
  folder_duplicate: 'Er bestaat al een folder met deze naam',
108
+ doc_empty_drop: 'Nog geen documenten — sleep bestanden hierheen',
108
109
  },
109
110
  en: {
110
111
  required: 'This field is required',
@@ -176,6 +177,7 @@ const translations = {
176
177
  folder_name_placeholder: 'Folder name',
177
178
  folder_no_slash: "A folder name cannot contain '/'",
178
179
  folder_duplicate: 'A folder with this name already exists',
180
+ doc_empty_drop: 'No documents yet — drop files here',
179
181
  },
180
182
  ar: {
181
183
  required: 'هذا الحقل مطلوب',
@@ -881,8 +883,13 @@ const MrdDocumentContainer = class {
881
883
  this.item = null;
882
884
  /** Parent record id — required for RELATED_VIEW path building. */
883
885
  this.parentId = '';
886
+ /** Canonical parent href, forwarded to the folder tree for single-container seeding. */
887
+ this.containerHref = '';
884
888
  /** Lookup key used for the embedded `data-doclist` / `data-view` attributes. */
885
889
  this.viewKey = '';
890
+ /** Fixed height (px) of the scrolling folder-tree body — the toolbar stays put
891
+ * on top, Finder-style. The table manages its own height. */
892
+ this.height = 460;
886
893
  this.locale = navigator.language;
887
894
  /** Active body: folder tree or flat table. */
888
895
  this.mode = 'tree';
@@ -922,7 +929,7 @@ const MrdDocumentContainer = class {
922
929
  }
923
930
  // ── Bodies ───────────────────────────────────────────────────────────────
924
931
  renderTree() {
925
- return (index.h("mrd-document-list", { "data-doclist": this.viewKey, ref: el => (this.listEl = el), item: this.item, archetype: this.archetype, parentId: this.parentId, locale: this.locale, onMrdLoadDistinct: (e) => {
932
+ 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) => {
926
933
  e.stopPropagation();
927
934
  this.mrdLoadDistinct.emit(e.detail);
928
935
  }, onMrdLoadPage: (e) => {
@@ -963,13 +970,14 @@ const MrdDocumentContainer = class {
963
970
  } }));
964
971
  }
965
972
  render() {
966
- return (index.h(index.Host, { key: 'a5393d484bdc202b57c6d32d9ce917e760aff95a' }, this.renderToolbar(), index.h("div", { key: '52f82de8f7734e13f34d323e3e831e6de5676f46', class: "mrd-document-container__body" }, this.mode === 'tree' ? this.renderTree() : this.renderList())));
973
+ const treeMode = this.mode === 'tree';
974
+ return (index.h(index.Host, { key: '5d8a9a9bb4f1126a304b796aff9d1cb0100b8fc6' }, this.renderToolbar(), index.h("div", { key: '80ac7e5dd39ffcc4161059447221045a6e035099', class: "mrd-document-container__body", style: treeMode ? { height: `${this.height}px`, overflowY: 'auto' } : {} }, treeMode ? this.renderTree() : this.renderList())));
967
975
  }
968
976
  get el() { return index.getElement(this); }
969
977
  };
970
978
  MrdDocumentContainer.style = mrdDocumentContainerScss();
971
979
 
972
- const mrdDocumentListScss = () => `.sc-mrd-document-list-h{display:block}.mrd-document-list.sc-mrd-document-list{padding:var(--mrd-space-2) 0}.mrd-document-list__row.sc-mrd-document-list{display:flex;align-items:center;gap:var(--mrd-space-2);height:2.125rem;padding:0 var(--mrd-space-4);cursor:pointer;user-select:none;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-document-list__row.sc-mrd-document-list:hover{background:var(--mrd-color-neutral-50)}.mrd-document-list__row--selected.sc-mrd-document-list{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--selected.sc-mrd-document-list:hover{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--pending.sc-mrd-document-list .mrd-document-list__label.sc-mrd-document-list{font-style:italic;color:var(--mrd-color-neutral-500)}.mrd-document-list__row--doc.sc-mrd-document-list{cursor:grab}.mrd-document-list__row--doc.sc-mrd-document-list:active{cursor:grabbing}.mrd-document-list__row--drop.sc-mrd-document-list{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1));box-shadow:inset 0 0 0 1px var(--mrd-color-primary)}.mrd-document-list__row--drop.sc-mrd-document-list:hover{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--edit.sc-mrd-document-list{cursor:default}.mrd-document-list__name-input.sc-mrd-document-list{flex:1;min-width:0;height:1.625rem;padding:0 var(--mrd-space-2);font-size:var(--mrd-font-size-sm);font-family:inherit;color:var(--mrd-color-neutral-800);border:1px solid var(--mrd-color-primary);border-radius:var(--mrd-border-radius);outline:none;box-shadow:var(--mrd-shadow-focus)}.mrd-document-list__error.sc-mrd-document-list{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-danger, #dc2626);padding-top:0.125rem;padding-bottom:0.25rem}.mrd-document-list__row--dossier.sc-mrd-document-list .mrd-document-list__label.sc-mrd-document-list{font-weight:var(--mrd-font-weight-semibold)}.mrd-document-list__indent.sc-mrd-document-list{flex:none}.mrd-document-list__chev.sc-mrd-document-list{width:1rem;height:1rem;flex:none;display:grid;place-items:center;color:var(--mrd-color-neutral-400);transition:transform var(--mrd-transition-fast)}.mrd-document-list__chev.sc-mrd-document-list svg.sc-mrd-document-list{width:0.6875rem;height:0.6875rem}.mrd-document-list__chev--open.sc-mrd-document-list{transform:rotate(90deg)}.mrd-document-list__chev--leaf.sc-mrd-document-list{visibility:hidden}.mrd-document-list__icon.sc-mrd-document-list{width:1.0625rem;height:1.0625rem;flex:none}.mrd-document-list__icon--dossier.sc-mrd-document-list{color:var(--mrd-color-primary)}.mrd-document-list__icon--folder.sc-mrd-document-list{color:#d9a441}.mrd-document-list__icon--doc.sc-mrd-document-list{color:var(--mrd-color-neutral-400)}.mrd-document-list__label.sc-mrd-document-list{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mrd-document-list__count.sc-mrd-document-list{flex:none;font-family:var(--mrd-font-family-mono);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);background:var(--mrd-color-neutral-100);border-radius:var(--mrd-border-radius-full);padding:0.0625rem 0.5rem}.mrd-document-list__date.sc-mrd-document-list{flex:none;font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-400);font-variant-numeric:tabular-nums}.mrd-document-list__loading.sc-mrd-document-list{display:flex;align-items:center;gap:var(--mrd-space-2);height:1.875rem;padding:0 var(--mrd-space-4);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-400)}.mrd-document-list__spinner.sc-mrd-document-list{width:0.75rem;height:0.75rem;border:2px solid var(--mrd-color-neutral-300);border-top-color:var(--mrd-color-primary);border-radius:50%;animation:mrd-document-list-spin 0.7s linear infinite}@keyframes mrd-document-list-spin{to{transform:rotate(360deg)}}.mrd-document-list__empty.sc-mrd-document-list{padding:var(--mrd-space-8) var(--mrd-space-4);text-align:center;color:var(--mrd-color-neutral-400);font-size:var(--mrd-font-size-sm)}`;
980
+ const mrdDocumentListScss = () => `.sc-mrd-document-list-h{display:block;height:100%}.mrd-document-list.sc-mrd-document-list{padding:var(--mrd-space-2) 0;min-height:100%;box-sizing:border-box}.mrd-document-list--drop-active.sc-mrd-document-list{outline:2px dashed var(--mrd-color-primary);outline-offset:-4px;background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.06))}.mrd-document-list__row.sc-mrd-document-list{display:flex;align-items:center;gap:var(--mrd-space-2);height:2.125rem;padding:0 var(--mrd-space-4);cursor:pointer;user-select:none;font-size:var(--mrd-font-size-sm);color:var(--mrd-color-neutral-800)}.mrd-document-list__row.sc-mrd-document-list:hover{background:var(--mrd-color-neutral-50)}.mrd-document-list__row--selected.sc-mrd-document-list{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--selected.sc-mrd-document-list:hover{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--pending.sc-mrd-document-list .mrd-document-list__label.sc-mrd-document-list{font-style:italic;color:var(--mrd-color-neutral-500)}.mrd-document-list__row--doc.sc-mrd-document-list{cursor:grab}.mrd-document-list__row--doc.sc-mrd-document-list:active{cursor:grabbing}.mrd-document-list__row--drop.sc-mrd-document-list{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1));box-shadow:inset 0 0 0 1px var(--mrd-color-primary)}.mrd-document-list__row--drop.sc-mrd-document-list:hover{background:var(--mrd-color-primary-50, rgba(22, 163, 74, 0.1))}.mrd-document-list__row--edit.sc-mrd-document-list{cursor:default}.mrd-document-list__name-input.sc-mrd-document-list{flex:1;min-width:0;height:1.625rem;padding:0 var(--mrd-space-2);font-size:var(--mrd-font-size-sm);font-family:inherit;color:var(--mrd-color-neutral-800);border:1px solid var(--mrd-color-primary);border-radius:var(--mrd-border-radius);outline:none;box-shadow:var(--mrd-shadow-focus)}.mrd-document-list__error.sc-mrd-document-list{font-size:var(--mrd-font-size-xs);color:var(--mrd-color-danger, #dc2626);padding-top:0.125rem;padding-bottom:0.25rem}.mrd-document-list__row--dossier.sc-mrd-document-list .mrd-document-list__label.sc-mrd-document-list{font-weight:var(--mrd-font-weight-semibold)}.mrd-document-list__indent.sc-mrd-document-list{flex:none}.mrd-document-list__chev.sc-mrd-document-list{width:1rem;height:1rem;flex:none;display:grid;place-items:center;color:var(--mrd-color-neutral-400);transition:transform var(--mrd-transition-fast)}.mrd-document-list__chev.sc-mrd-document-list svg.sc-mrd-document-list{width:0.6875rem;height:0.6875rem}.mrd-document-list__chev--open.sc-mrd-document-list{transform:rotate(90deg)}.mrd-document-list__chev--leaf.sc-mrd-document-list{visibility:hidden}.mrd-document-list__icon.sc-mrd-document-list{width:1.0625rem;height:1.0625rem;flex:none}.mrd-document-list__icon--dossier.sc-mrd-document-list{color:var(--mrd-color-primary)}.mrd-document-list__icon--folder.sc-mrd-document-list{color:#d9a441}.mrd-document-list__icon--doc.sc-mrd-document-list{color:var(--mrd-color-neutral-400)}.mrd-document-list__label.sc-mrd-document-list{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mrd-document-list__count.sc-mrd-document-list{flex:none;font-family:var(--mrd-font-family-mono);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-500);background:var(--mrd-color-neutral-100);border-radius:var(--mrd-border-radius-full);padding:0.0625rem 0.5rem}.mrd-document-list__date.sc-mrd-document-list{flex:none;font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-400);font-variant-numeric:tabular-nums}.mrd-document-list__loading.sc-mrd-document-list{display:flex;align-items:center;gap:var(--mrd-space-2);height:1.875rem;padding:0 var(--mrd-space-4);font-size:var(--mrd-font-size-xs);color:var(--mrd-color-neutral-400)}.mrd-document-list__spinner.sc-mrd-document-list{width:0.75rem;height:0.75rem;border:2px solid var(--mrd-color-neutral-300);border-top-color:var(--mrd-color-primary);border-radius:50%;animation:mrd-document-list-spin 0.7s linear infinite}@keyframes mrd-document-list-spin{to{transform:rotate(360deg)}}.mrd-document-list__empty.sc-mrd-document-list{padding:var(--mrd-space-8) var(--mrd-space-4);text-align:center;color:var(--mrd-color-neutral-400);font-size:var(--mrd-font-size-sm)}`;
973
981
 
974
982
  const MrdDocumentList = class {
975
983
  constructor(hostRef) {
@@ -985,6 +993,11 @@ const MrdDocumentList = class {
985
993
  this.item = null;
986
994
  /** Parent record id — required for RELATED_VIEW path building. */
987
995
  this.parentId = '';
996
+ /** Canonical parent href (`/{base}/{tenant}/{fromClass}/{parentId}`) supplied by
997
+ * the host. When the RELATED_VIEW's `inverseRelation` equals the archetype
998
+ * `container` slot, this seeds a single container so an empty dossier still
999
+ * accepts file drops and folder creation. */
1000
+ this.containerHref = '';
988
1001
  this.locale = navigator.language;
989
1002
  this.containers = [];
990
1003
  this.rootLoading = true;
@@ -996,6 +1009,8 @@ const MrdDocumentList = class {
996
1009
  this.dropTargetId = null;
997
1010
  /** Node id showing an "uploading…" indicator while a dropped file is processed. */
998
1011
  this.uploadingNodeId = null;
1012
+ /** Whether a drag is hovering the root drop-zone (single-container area highlight). */
1013
+ this.rootDropActive = false;
999
1014
  this.nodeIndex = new Map();
1000
1015
  // ── New-folder editing state ───────────────────────────────────────────────
1001
1016
  /** The pending node whose inline name input is open (null = not creating). */
@@ -1120,8 +1135,18 @@ const MrdDocumentList = class {
1120
1135
  e.preventDefault();
1121
1136
  if (e.dataTransfer)
1122
1137
  e.dataTransfer.dropEffect = file ? 'copy' : 'move';
1138
+ if (!this.rootDropActive)
1139
+ this.rootDropActive = true;
1140
+ };
1141
+ this.onRootDragLeave = (e) => {
1142
+ const related = e.relatedTarget;
1143
+ if (related && this.el.contains(related))
1144
+ return; // moved onto a child, still inside
1145
+ if (this.rootDropActive)
1146
+ this.rootDropActive = false;
1123
1147
  };
1124
1148
  this.onRootDrop = (e) => {
1149
+ this.rootDropActive = false;
1125
1150
  if (!this.singleContainer)
1126
1151
  return;
1127
1152
  const only = this.containers[0];
@@ -1138,7 +1163,33 @@ const MrdDocumentList = class {
1138
1163
  };
1139
1164
  }
1140
1165
  componentDidLoad() {
1141
- this.emitContainerDistinct();
1166
+ if (this.isSeededSingleContainer()) {
1167
+ this.seedSingleContainer();
1168
+ }
1169
+ else {
1170
+ this.emitContainerDistinct();
1171
+ }
1172
+ }
1173
+ /** True when the view is a single-container context: a RELATED_VIEW whose
1174
+ * `inverseRelation` matches the archetype `container` slot, with a known
1175
+ * parent href. The container is then implied by context (not by distinct),
1176
+ * so it works even with zero documents. */
1177
+ isSeededSingleContainer() {
1178
+ var _a, _b;
1179
+ return (((_a = this.item) === null || _a === void 0 ? void 0 : _a.type) === index$1.ClientLayoutItemType.RELATED_VIEW &&
1180
+ !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.inverseRelation) &&
1181
+ this.item.inverseRelation === this.containerField &&
1182
+ !!this.containerHref);
1183
+ }
1184
+ /** Seed the single implied container from context and load its folders. */
1185
+ seedSingleContainer() {
1186
+ const node = this.makeContainerNode(this.containerHref, this.containerField, 0);
1187
+ this.nodeIndex.set(node.id, node);
1188
+ this.containers = [node];
1189
+ this.rootLoading = false;
1190
+ this.singleContainer = true;
1191
+ node.open = true;
1192
+ this.emitFolderDistinct(node);
1142
1193
  }
1143
1194
  componentDidRender() {
1144
1195
  if (this.pendingNeedsFocus && this.pendingInputEl) {
@@ -1174,7 +1225,10 @@ const MrdDocumentList = class {
1174
1225
  return (_b = (_a = this.archetype) === null || _a === void 0 ? void 0 : _a.slots) === null || _b === void 0 ? void 0 : _b.date;
1175
1226
  }
1176
1227
  // ── Path / query building (mirrors mrd-table conventions) ────────────────
1177
- /** VIEW: `/{dataClass}`; RELATED_VIEW: `/{fromClass}/{parentId}/{dataClass}`. */
1228
+ /** VIEW: `/{dataClass}`; RELATED_VIEW: `/{fromClass}/{parentId}/{dataClass}`.
1229
+ * Used for reads (list/distinct): `dataClass`/`relatedClass` may be an abstract
1230
+ * type (e.g. "contents"), filtered down to the concrete `filterClass` via the
1231
+ * `type` query param — see baseParams(). */
1178
1232
  buildDataPath() {
1179
1233
  var _a, _b, _c;
1180
1234
  const it = this.item;
@@ -1184,6 +1238,19 @@ const MrdDocumentList = class {
1184
1238
  }
1185
1239
  return `/${dataClass}`;
1186
1240
  }
1241
+ /** Path for creating a new document (file-drop). Unlike buildDataPath(), this
1242
+ * must target the concrete type: `dataClass`/`relatedClass` can be an abstract
1243
+ * base type (e.g. "contents") that cannot be POSTed to directly, so prefer
1244
+ * `filterClass` (e.g. "documents") when present. */
1245
+ buildCreatePath() {
1246
+ var _a, _b, _c, _d;
1247
+ const it = this.item;
1248
+ const dataClass = (_c = (_b = (_a = it === null || it === void 0 ? void 0 : it.filterClass) !== null && _a !== void 0 ? _a : it === null || it === void 0 ? void 0 : it.dataClass) !== null && _b !== void 0 ? _b : it === null || it === void 0 ? void 0 : it.relatedClass) !== null && _c !== void 0 ? _c : '';
1249
+ if ((it === null || it === void 0 ? void 0 : it.type) === index$1.ClientLayoutItemType.RELATED_VIEW) {
1250
+ return `/${(_d = it.fromClass) !== null && _d !== void 0 ? _d : ''}/${this.parentId}/${dataClass}`;
1251
+ }
1252
+ return `/${dataClass}`;
1253
+ }
1187
1254
  /** View-level static filters + filterClass, shared by every request. */
1188
1255
  baseParams() {
1189
1256
  var _a, _b, _c, _d, _e, _f, _g;
@@ -1519,7 +1586,7 @@ const MrdDocumentList = class {
1519
1586
  [this.folderField]: folder,
1520
1587
  [this.containerField]: container.href,
1521
1588
  };
1522
- this.mrdCreateObject.emit({ path: this.buildDataPath(), values });
1589
+ this.mrdCreateObject.emit({ path: this.buildCreatePath(), values });
1523
1590
  // Optimistically show the new document (no href until a reload).
1524
1591
  const optimistic = { [this.titleField]: this.stripExtension(file.name), _optimistic: true };
1525
1592
  const wasUnloadedEmpty = !node.docsLoaded && node.docCount === 0;
@@ -1699,19 +1766,25 @@ const MrdDocumentList = class {
1699
1766
  body = this.renderLoadingRow(0);
1700
1767
  }
1701
1768
  else if (this.containers.length === 0) {
1702
- body = index.h("div", { key: 'b8c3297cd7cff5bf79ce694d2ee1a64c570df5ce', class: "mrd-document-list__empty" }, t('no_results', this.locale));
1769
+ body = index.h("div", { key: '9c38a2e26320a8173ba82cac412c1b32a8a1882e', class: "mrd-document-list__empty" }, t('no_results', this.locale));
1703
1770
  }
1704
1771
  else if (this.singleContainer) {
1705
1772
  // Dossier context: render the single container's folder tree at the root.
1706
1773
  const only = this.containers[0];
1707
- body = only.loading && !only.foldersLoaded
1708
- ? this.renderLoadingRow(0)
1709
- : this.renderChildren(only, only, 0);
1774
+ if (only.loading && !only.foldersLoaded) {
1775
+ body = this.renderLoadingRow(0);
1776
+ }
1777
+ else {
1778
+ const kids = this.renderChildren(only, only, 0);
1779
+ body = kids.length
1780
+ ? kids
1781
+ : index.h("div", { class: "mrd-document-list__empty" }, t('doc_empty_drop', this.locale));
1782
+ }
1710
1783
  }
1711
1784
  else {
1712
1785
  body = this.containers.map(c => this.renderContainerNode(c, 0));
1713
1786
  }
1714
- return (index.h(index.Host, { key: 'ff3b024a79ba2270aa28861923bc6406f98061aa' }, index.h("div", { key: '9db121e5336a4e3c82443257f6424db5ab4f0baf', class: "mrd-document-list", onDragOver: this.onRootDragOver, onDrop: this.onRootDrop }, body)));
1787
+ return (index.h(index.Host, { key: 'dd83a6a609e01d21a2b5da5b3ab929f6f9315402' }, index.h("div", { key: 'd539d938e1efd759730cccc90c4d6c2e535db936', class: 'mrd-document-list' + (this.rootDropActive ? ' mrd-document-list--drop-active' : ''), onDragOver: this.onRootDragOver, onDragLeave: this.onRootDragLeave, onDrop: this.onRootDrop }, body)));
1715
1788
  }
1716
1789
  get el() { return index.getElement(this); }
1717
1790
  };
@@ -3091,15 +3164,30 @@ const MrdLayoutSection = class {
3091
3164
  // The API publishes `archetypes` on the VIEW/RELATED_VIEW item itself
3092
3165
  // (sibling of `view`), not inside `view`.
3093
3166
  const docArchetype = index$1.resolveArchetype((_g = item.archetypes) !== null && _g !== void 0 ? _g : (_h = item.view) === null || _h === void 0 ? void 0 : _h.archetypes, index$1.ARCHETYPE_DOCUMENT);
3167
+ // Canonical parent href for single-container seeding: use the RELATED_VIEW's
3168
+ // fromClass (base class) rather than the route class, so polymorphic subtypes
3169
+ // resolve to the same container the documents actually reference.
3170
+ const containerHref = this.buildContainerHref(item, selfHref, parentId);
3094
3171
  return (index.h("div", { class: "mrd-layout-section__related-view", key: `view-${key}` }, showTitle && item.label && index.h("h3", { class: "mrd-layout-section__related-view-title" }, item.label), docArchetype
3095
- ? this.renderDocumentContainer(item, key, parentId, docArchetype)
3172
+ ? this.renderDocumentContainer(item, key, parentId, docArchetype, containerHref)
3096
3173
  : this.renderTable(item, key, parentId)));
3097
3174
  }
3175
+ /** Build the canonical parent href `/{base}/{tenant}/{fromClass}/{parentId}` from
3176
+ * the object's self href. Empty unless it is a RELATED_VIEW with a fromClass. */
3177
+ buildContainerHref(item, selfHref, parentId) {
3178
+ if (item.type !== index$1.ClientLayoutItemType.RELATED_VIEW || !item.fromClass || !parentId)
3179
+ return '';
3180
+ const segs = selfHref.split('/').filter(Boolean);
3181
+ if (segs.length < 2)
3182
+ return '';
3183
+ const [base, tenant] = segs;
3184
+ return `/${base}/${tenant}/${item.fromClass}/${parentId}`;
3185
+ }
3098
3186
  /** Document collection view: owns the view-switch + collection actions and
3099
3187
  * swaps between the folder tree and the flat table. Events are re-emitted to
3100
3188
  * the host with the view key, exactly as the raw list/table events were. */
3101
- renderDocumentContainer(item, key, parentId, archetype) {
3102
- return (index.h("mrd-document-container", { item: item, archetype: archetype, parentId: parentId, viewKey: key, locale: this.locale, onMrdLoadDistinct: (e) => {
3189
+ renderDocumentContainer(item, key, parentId, archetype, containerHref) {
3190
+ return (index.h("mrd-document-container", { item: item, archetype: archetype, parentId: parentId, containerHref: containerHref, viewKey: key, locale: this.locale, onMrdLoadDistinct: (e) => {
3103
3191
  e.stopPropagation();
3104
3192
  this.mrdLoadViewDistinct.emit(Object.assign({ name: key }, e.detail));
3105
3193
  }, onMrdLoadPage: (e) => {
@@ -3195,7 +3283,7 @@ const MrdLayoutSection = class {
3195
3283
  }
3196
3284
  render() {
3197
3285
  const docArchetype = index$1.resolveArchetype(this.archetypes, index$1.ARCHETYPE_DOCUMENT);
3198
- return (index.h(index.Host, { key: '6e737354daec0137b6ebe304efcce9990f02739f' }, index.h("div", { key: '31a73a8a78999793f5dacee5f2da41df5f23156e', class: "mrd-layout-section" }, docArchetype
3286
+ return (index.h(index.Host, { key: '231f5c3e282375b5850291611645fe3c904831bb' }, index.h("div", { key: '314e39ec3aa1eabeb1a98f6e6d63fcf07e13ccec', class: "mrd-layout-section" }, docArchetype
3199
3287
  ? this.renderDocumentObject(docArchetype)
3200
3288
  : this.items.map(item => this.renderItem(item))), this.renderImageModal()));
3201
3289
  }
@@ -18,8 +18,13 @@ export class MrdDocumentContainer {
18
18
  this.item = null;
19
19
  /** Parent record id — required for RELATED_VIEW path building. */
20
20
  this.parentId = '';
21
+ /** Canonical parent href, forwarded to the folder tree for single-container seeding. */
22
+ this.containerHref = '';
21
23
  /** Lookup key used for the embedded `data-doclist` / `data-view` attributes. */
22
24
  this.viewKey = '';
25
+ /** Fixed height (px) of the scrolling folder-tree body — the toolbar stays put
26
+ * on top, Finder-style. The table manages its own height. */
27
+ this.height = 460;
23
28
  this.locale = navigator.language;
24
29
  /** Active body: folder tree or flat table. */
25
30
  this.mode = 'tree';
@@ -59,7 +64,7 @@ export class MrdDocumentContainer {
59
64
  }
60
65
  // ── Bodies ───────────────────────────────────────────────────────────────
61
66
  renderTree() {
62
- return (h("mrd-document-list", { "data-doclist": this.viewKey, ref: el => (this.listEl = el), item: this.item, archetype: this.archetype, parentId: this.parentId, locale: this.locale, onMrdLoadDistinct: (e) => {
67
+ return (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) => {
63
68
  e.stopPropagation();
64
69
  this.mrdLoadDistinct.emit(e.detail);
65
70
  }, onMrdLoadPage: (e) => {
@@ -100,7 +105,8 @@ export class MrdDocumentContainer {
100
105
  } }));
101
106
  }
102
107
  render() {
103
- return (h(Host, { key: 'a5393d484bdc202b57c6d32d9ce917e760aff95a' }, this.renderToolbar(), h("div", { key: '52f82de8f7734e13f34d323e3e831e6de5676f46', class: "mrd-document-container__body" }, this.mode === 'tree' ? this.renderTree() : this.renderList())));
108
+ const treeMode = this.mode === 'tree';
109
+ return (h(Host, { key: '5d8a9a9bb4f1126a304b796aff9d1cb0100b8fc6' }, this.renderToolbar(), h("div", { key: '80ac7e5dd39ffcc4161059447221045a6e035099', class: "mrd-document-container__body", style: treeMode ? { height: `${this.height}px`, overflowY: 'auto' } : {} }, treeMode ? this.renderTree() : this.renderList())));
104
110
  }
105
111
  static get is() { return "mrd-document-container"; }
106
112
  static get encapsulation() { return "scoped"; }
@@ -185,6 +191,26 @@ export class MrdDocumentContainer {
185
191
  "attribute": "parent-id",
186
192
  "defaultValue": "''"
187
193
  },
194
+ "containerHref": {
195
+ "type": "string",
196
+ "mutable": false,
197
+ "complexType": {
198
+ "original": "string",
199
+ "resolved": "string",
200
+ "references": {}
201
+ },
202
+ "required": false,
203
+ "optional": false,
204
+ "docs": {
205
+ "tags": [],
206
+ "text": "Canonical parent href, forwarded to the folder tree for single-container seeding."
207
+ },
208
+ "getter": false,
209
+ "setter": false,
210
+ "reflect": false,
211
+ "attribute": "container-href",
212
+ "defaultValue": "''"
213
+ },
188
214
  "viewKey": {
189
215
  "type": "string",
190
216
  "mutable": false,
@@ -205,6 +231,26 @@ export class MrdDocumentContainer {
205
231
  "attribute": "view-key",
206
232
  "defaultValue": "''"
207
233
  },
234
+ "height": {
235
+ "type": "number",
236
+ "mutable": false,
237
+ "complexType": {
238
+ "original": "number",
239
+ "resolved": "number",
240
+ "references": {}
241
+ },
242
+ "required": false,
243
+ "optional": false,
244
+ "docs": {
245
+ "tags": [],
246
+ "text": "Fixed height (px) of the scrolling folder-tree body \u2014 the toolbar stays put\non top, Finder-style. The table manages its own height."
247
+ },
248
+ "getter": false,
249
+ "setter": false,
250
+ "reflect": false,
251
+ "attribute": "height",
252
+ "defaultValue": "460"
253
+ },
208
254
  "locale": {
209
255
  "type": "string",
210
256
  "mutable": false,
@@ -25,6 +25,11 @@ export class MrdDocumentList {
25
25
  this.item = null;
26
26
  /** Parent record id — required for RELATED_VIEW path building. */
27
27
  this.parentId = '';
28
+ /** Canonical parent href (`/{base}/{tenant}/{fromClass}/{parentId}`) supplied by
29
+ * the host. When the RELATED_VIEW's `inverseRelation` equals the archetype
30
+ * `container` slot, this seeds a single container so an empty dossier still
31
+ * accepts file drops and folder creation. */
32
+ this.containerHref = '';
28
33
  this.locale = navigator.language;
29
34
  this.containers = [];
30
35
  this.rootLoading = true;
@@ -36,6 +41,8 @@ export class MrdDocumentList {
36
41
  this.dropTargetId = null;
37
42
  /** Node id showing an "uploading…" indicator while a dropped file is processed. */
38
43
  this.uploadingNodeId = null;
44
+ /** Whether a drag is hovering the root drop-zone (single-container area highlight). */
45
+ this.rootDropActive = false;
39
46
  this.nodeIndex = new Map();
40
47
  // ── New-folder editing state ───────────────────────────────────────────────
41
48
  /** The pending node whose inline name input is open (null = not creating). */
@@ -160,8 +167,18 @@ export class MrdDocumentList {
160
167
  e.preventDefault();
161
168
  if (e.dataTransfer)
162
169
  e.dataTransfer.dropEffect = file ? 'copy' : 'move';
170
+ if (!this.rootDropActive)
171
+ this.rootDropActive = true;
172
+ };
173
+ this.onRootDragLeave = (e) => {
174
+ const related = e.relatedTarget;
175
+ if (related && this.el.contains(related))
176
+ return; // moved onto a child, still inside
177
+ if (this.rootDropActive)
178
+ this.rootDropActive = false;
163
179
  };
164
180
  this.onRootDrop = (e) => {
181
+ this.rootDropActive = false;
165
182
  if (!this.singleContainer)
166
183
  return;
167
184
  const only = this.containers[0];
@@ -178,7 +195,33 @@ export class MrdDocumentList {
178
195
  };
179
196
  }
180
197
  componentDidLoad() {
181
- this.emitContainerDistinct();
198
+ if (this.isSeededSingleContainer()) {
199
+ this.seedSingleContainer();
200
+ }
201
+ else {
202
+ this.emitContainerDistinct();
203
+ }
204
+ }
205
+ /** True when the view is a single-container context: a RELATED_VIEW whose
206
+ * `inverseRelation` matches the archetype `container` slot, with a known
207
+ * parent href. The container is then implied by context (not by distinct),
208
+ * so it works even with zero documents. */
209
+ isSeededSingleContainer() {
210
+ var _a, _b;
211
+ return (((_a = this.item) === null || _a === void 0 ? void 0 : _a.type) === ClientLayoutItemType.RELATED_VIEW &&
212
+ !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.inverseRelation) &&
213
+ this.item.inverseRelation === this.containerField &&
214
+ !!this.containerHref);
215
+ }
216
+ /** Seed the single implied container from context and load its folders. */
217
+ seedSingleContainer() {
218
+ const node = this.makeContainerNode(this.containerHref, this.containerField, 0);
219
+ this.nodeIndex.set(node.id, node);
220
+ this.containers = [node];
221
+ this.rootLoading = false;
222
+ this.singleContainer = true;
223
+ node.open = true;
224
+ this.emitFolderDistinct(node);
182
225
  }
183
226
  componentDidRender() {
184
227
  if (this.pendingNeedsFocus && this.pendingInputEl) {
@@ -214,7 +257,10 @@ export class MrdDocumentList {
214
257
  return (_b = (_a = this.archetype) === null || _a === void 0 ? void 0 : _a.slots) === null || _b === void 0 ? void 0 : _b.date;
215
258
  }
216
259
  // ── Path / query building (mirrors mrd-table conventions) ────────────────
217
- /** VIEW: `/{dataClass}`; RELATED_VIEW: `/{fromClass}/{parentId}/{dataClass}`. */
260
+ /** VIEW: `/{dataClass}`; RELATED_VIEW: `/{fromClass}/{parentId}/{dataClass}`.
261
+ * Used for reads (list/distinct): `dataClass`/`relatedClass` may be an abstract
262
+ * type (e.g. "contents"), filtered down to the concrete `filterClass` via the
263
+ * `type` query param — see baseParams(). */
218
264
  buildDataPath() {
219
265
  var _a, _b, _c;
220
266
  const it = this.item;
@@ -224,6 +270,19 @@ export class MrdDocumentList {
224
270
  }
225
271
  return `/${dataClass}`;
226
272
  }
273
+ /** Path for creating a new document (file-drop). Unlike buildDataPath(), this
274
+ * must target the concrete type: `dataClass`/`relatedClass` can be an abstract
275
+ * base type (e.g. "contents") that cannot be POSTed to directly, so prefer
276
+ * `filterClass` (e.g. "documents") when present. */
277
+ buildCreatePath() {
278
+ var _a, _b, _c, _d;
279
+ const it = this.item;
280
+ const dataClass = (_c = (_b = (_a = it === null || it === void 0 ? void 0 : it.filterClass) !== null && _a !== void 0 ? _a : it === null || it === void 0 ? void 0 : it.dataClass) !== null && _b !== void 0 ? _b : it === null || it === void 0 ? void 0 : it.relatedClass) !== null && _c !== void 0 ? _c : '';
281
+ if ((it === null || it === void 0 ? void 0 : it.type) === ClientLayoutItemType.RELATED_VIEW) {
282
+ return `/${(_d = it.fromClass) !== null && _d !== void 0 ? _d : ''}/${this.parentId}/${dataClass}`;
283
+ }
284
+ return `/${dataClass}`;
285
+ }
227
286
  /** View-level static filters + filterClass, shared by every request. */
228
287
  baseParams() {
229
288
  var _a, _b, _c, _d, _e, _f, _g;
@@ -559,7 +618,7 @@ export class MrdDocumentList {
559
618
  [this.folderField]: folder,
560
619
  [this.containerField]: container.href,
561
620
  };
562
- this.mrdCreateObject.emit({ path: this.buildDataPath(), values });
621
+ this.mrdCreateObject.emit({ path: this.buildCreatePath(), values });
563
622
  // Optimistically show the new document (no href until a reload).
564
623
  const optimistic = { [this.titleField]: this.stripExtension(file.name), _optimistic: true };
565
624
  const wasUnloadedEmpty = !node.docsLoaded && node.docCount === 0;
@@ -739,19 +798,25 @@ export class MrdDocumentList {
739
798
  body = this.renderLoadingRow(0);
740
799
  }
741
800
  else if (this.containers.length === 0) {
742
- body = h("div", { key: 'b8c3297cd7cff5bf79ce694d2ee1a64c570df5ce', class: "mrd-document-list__empty" }, t('no_results', this.locale));
801
+ body = h("div", { key: '9c38a2e26320a8173ba82cac412c1b32a8a1882e', class: "mrd-document-list__empty" }, t('no_results', this.locale));
743
802
  }
744
803
  else if (this.singleContainer) {
745
804
  // Dossier context: render the single container's folder tree at the root.
746
805
  const only = this.containers[0];
747
- body = only.loading && !only.foldersLoaded
748
- ? this.renderLoadingRow(0)
749
- : this.renderChildren(only, only, 0);
806
+ if (only.loading && !only.foldersLoaded) {
807
+ body = this.renderLoadingRow(0);
808
+ }
809
+ else {
810
+ const kids = this.renderChildren(only, only, 0);
811
+ body = kids.length
812
+ ? kids
813
+ : h("div", { class: "mrd-document-list__empty" }, t('doc_empty_drop', this.locale));
814
+ }
750
815
  }
751
816
  else {
752
817
  body = this.containers.map(c => this.renderContainerNode(c, 0));
753
818
  }
754
- return (h(Host, { key: 'ff3b024a79ba2270aa28861923bc6406f98061aa' }, h("div", { key: '9db121e5336a4e3c82443257f6424db5ab4f0baf', class: "mrd-document-list", onDragOver: this.onRootDragOver, onDrop: this.onRootDrop }, body)));
819
+ return (h(Host, { key: 'dd83a6a609e01d21a2b5da5b3ab929f6f9315402' }, h("div", { key: 'd539d938e1efd759730cccc90c4d6c2e535db936', class: 'mrd-document-list' + (this.rootDropActive ? ' mrd-document-list--drop-active' : ''), onDragOver: this.onRootDragOver, onDragLeave: this.onRootDragLeave, onDrop: this.onRootDrop }, body)));
755
820
  }
756
821
  static get is() { return "mrd-document-list"; }
757
822
  static get encapsulation() { return "scoped"; }
@@ -836,6 +901,26 @@ export class MrdDocumentList {
836
901
  "attribute": "parent-id",
837
902
  "defaultValue": "''"
838
903
  },
904
+ "containerHref": {
905
+ "type": "string",
906
+ "mutable": false,
907
+ "complexType": {
908
+ "original": "string",
909
+ "resolved": "string",
910
+ "references": {}
911
+ },
912
+ "required": false,
913
+ "optional": false,
914
+ "docs": {
915
+ "tags": [],
916
+ "text": "Canonical parent href (`/{base}/{tenant}/{fromClass}/{parentId}`) supplied by\nthe host. When the RELATED_VIEW's `inverseRelation` equals the archetype\n`container` slot, this seeds a single container so an empty dossier still\naccepts file drops and folder creation."
917
+ },
918
+ "getter": false,
919
+ "setter": false,
920
+ "reflect": false,
921
+ "attribute": "container-href",
922
+ "defaultValue": "''"
923
+ },
839
924
  "locale": {
840
925
  "type": "string",
841
926
  "mutable": false,
@@ -865,7 +950,8 @@ export class MrdDocumentList {
865
950
  "singleContainer": {},
866
951
  "selectedId": {},
867
952
  "dropTargetId": {},
868
- "uploadingNodeId": {}
953
+ "uploadingNodeId": {},
954
+ "rootDropActive": {}
869
955
  };
870
956
  }
871
957
  static get events() {