@mmlogic/components 0.3.11 → 0.4.0

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 (138) hide show
  1. package/dist/cjs/{index-BPj2cBXs.js → index-CAzwGt9u.js} +38 -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_23.cjs.entry.js +1203 -1084
  5. package/dist/collection/collection-manifest.json +23 -23
  6. package/dist/collection/components/{mrd-document-container/mrd-document-container.scss → documents/mrd-document-container/mrd-document-container.css} +3 -3
  7. package/dist/collection/components/{mrd-document-container → documents/mrd-document-container}/mrd-document-container.js +7 -7
  8. package/dist/collection/components/documents/mrd-document-list/folder-tree.js +109 -0
  9. package/dist/collection/components/{mrd-document-list/mrd-document-list.scss → documents/mrd-document-list/mrd-document-list.css} +6 -4
  10. package/dist/collection/components/{mrd-document-list → documents/mrd-document-list}/mrd-document-list.js +83 -240
  11. package/dist/collection/components/documents/mrd-document-list/tree-view.js +75 -0
  12. package/dist/collection/components/{mrd-document-view/mrd-document-view.scss → documents/mrd-document-view/mrd-document-view.css} +1 -1
  13. package/dist/collection/components/{mrd-document-view → documents/mrd-document-view}/mrd-document-view.js +4 -4
  14. package/dist/collection/components/fields/field-helpers.js +17 -0
  15. package/dist/collection/components/fields/file-upload-common.js +38 -0
  16. package/dist/collection/components/{mrd-boolean-field/mrd-boolean-field.scss → fields/mrd-boolean-field/mrd-boolean-field.css} +3 -3
  17. package/dist/collection/components/{mrd-boolean-field → fields/mrd-boolean-field}/mrd-boolean-field.js +1 -1
  18. package/dist/collection/components/{mrd-currency-field/mrd-currency-field.scss → fields/mrd-currency-field/mrd-currency-field.css} +11 -9
  19. package/dist/collection/components/{mrd-currency-field → fields/mrd-currency-field}/mrd-currency-field.js +7 -13
  20. package/dist/collection/components/{mrd-date-field/mrd-date-field.scss → fields/mrd-date-field/mrd-date-field.css} +8 -10
  21. package/dist/collection/components/{mrd-date-field → fields/mrd-date-field}/mrd-date-field.js +3 -10
  22. package/dist/collection/components/{mrd-datetime-field/mrd-datetime-field.scss → fields/mrd-datetime-field/mrd-datetime-field.css} +8 -10
  23. package/dist/collection/components/{mrd-datetime-field → fields/mrd-datetime-field}/mrd-datetime-field.js +3 -10
  24. package/dist/collection/components/{mrd-email-field/mrd-email-field.scss → fields/mrd-email-field/mrd-email-field.css} +2 -11
  25. package/dist/collection/components/{mrd-email-field → fields/mrd-email-field}/mrd-email-field.js +6 -13
  26. package/dist/collection/components/{mrd-file-field/mrd-file-field.scss → fields/mrd-file-field/mrd-file-field.css} +19 -24
  27. package/dist/collection/components/{mrd-file-field → fields/mrd-file-field}/mrd-file-field.js +13 -24
  28. package/dist/collection/components/{mrd-hyperlink-field/mrd-hyperlink-field.scss → fields/mrd-hyperlink-field/mrd-hyperlink-field.css} +7 -16
  29. package/dist/collection/components/{mrd-hyperlink-field → fields/mrd-hyperlink-field}/mrd-hyperlink-field.js +9 -15
  30. package/dist/collection/components/{mrd-image-field/mrd-image-field.scss → fields/mrd-image-field/mrd-image-field.css} +15 -24
  31. package/dist/collection/components/{mrd-image-field → fields/mrd-image-field}/mrd-image-field.js +13 -28
  32. package/dist/collection/components/{mrd-list-field/mrd-list-field.scss → fields/mrd-list-field/mrd-list-field.css} +18 -21
  33. package/dist/collection/components/{mrd-list-field → fields/mrd-list-field}/mrd-list-field.js +10 -25
  34. package/dist/collection/components/{mrd-longtext-field/mrd-longtext-field.scss → fields/mrd-longtext-field/mrd-longtext-field.css} +21 -18
  35. package/dist/collection/components/{mrd-longtext-field → fields/mrd-longtext-field}/mrd-longtext-field.js +3 -10
  36. package/dist/collection/components/{mrd-number-field/mrd-number-field.scss → fields/mrd-number-field/mrd-number-field.css} +9 -10
  37. package/dist/collection/components/{mrd-number-field → fields/mrd-number-field}/mrd-number-field.js +7 -6
  38. package/dist/collection/components/{mrd-relation-field/mrd-relation-field.scss → fields/mrd-relation-field/mrd-relation-field.css} +61 -59
  39. package/dist/collection/components/{mrd-relation-field → fields/mrd-relation-field}/mrd-relation-field.js +16 -26
  40. package/dist/collection/components/{mrd-secret-field/mrd-secret-field.scss → fields/mrd-secret-field/mrd-secret-field.css} +7 -10
  41. package/dist/collection/components/{mrd-secret-field → fields/mrd-secret-field}/mrd-secret-field.js +4 -11
  42. package/dist/collection/components/{mrd-text-field/mrd-text-field.scss → fields/mrd-text-field/mrd-text-field.css} +2 -11
  43. package/dist/collection/components/{mrd-text-field → fields/mrd-text-field}/mrd-text-field.js +3 -10
  44. package/dist/collection/components/{mrd-textarea-field/mrd-textarea-field.scss → fields/mrd-textarea-field/mrd-textarea-field.css} +7 -10
  45. package/dist/collection/components/{mrd-textarea-field → fields/mrd-textarea-field}/mrd-textarea-field.js +3 -9
  46. package/dist/collection/components/{mrd-time-field/mrd-time-field.scss → fields/mrd-time-field/mrd-time-field.css} +8 -10
  47. package/dist/collection/components/{mrd-time-field → fields/mrd-time-field}/mrd-time-field.js +3 -10
  48. package/dist/collection/components/{mrd-field/mrd-field.scss → form/mrd-field/mrd-field.css} +1 -1
  49. package/dist/collection/components/{mrd-field → form/mrd-field}/mrd-field.js +3 -3
  50. package/dist/collection/components/{mrd-form/mrd-form.scss → form/mrd-form/mrd-form.css} +1 -1
  51. package/dist/collection/components/{mrd-form → form/mrd-form}/mrd-form.js +5 -5
  52. package/dist/collection/components/layout/mrd-layout-section/field-value.js +111 -0
  53. package/dist/collection/components/layout/mrd-layout-section/layout-helpers.js +29 -0
  54. package/dist/collection/components/{mrd-layout-section/mrd-layout-section.scss → layout/mrd-layout-section/mrd-layout-section.css} +4 -4
  55. package/dist/collection/components/{mrd-layout-section → layout/mrd-layout-section}/mrd-layout-section.js +52 -142
  56. package/dist/collection/components/{mrd-table/mrd-table.scss → table/mrd-table/mrd-table.css} +11 -13
  57. package/dist/collection/components/{mrd-table → table/mrd-table}/mrd-table.js +111 -439
  58. package/dist/collection/components/table/mrd-table/table-filter-popup.js +85 -0
  59. package/dist/collection/components/table/mrd-table/table-parts.js +110 -0
  60. package/dist/collection/components/table/mrd-table/table-query.js +178 -0
  61. package/dist/collection/components/table/mrd-table/virtual-scroll.js +49 -0
  62. package/dist/collection/dev/app.js +19 -18
  63. package/dist/collection/dev/example-data.js +58 -43
  64. package/dist/collection/utils/i18n.js +8 -0
  65. package/dist/collection/utils/query-params.js +43 -0
  66. package/dist/components/field-helpers.js +1 -0
  67. package/dist/components/file-upload-common.js +1 -0
  68. package/dist/components/i18n.js +1 -1
  69. package/dist/components/mrd-boolean-field2.js +1 -1
  70. package/dist/components/mrd-currency-field2.js +1 -1
  71. package/dist/components/mrd-date-field2.js +1 -1
  72. package/dist/components/mrd-datetime-field2.js +1 -1
  73. package/dist/components/mrd-document-container2.js +1 -1
  74. package/dist/components/mrd-document-list2.js +1 -1
  75. package/dist/components/mrd-document-view2.js +1 -1
  76. package/dist/components/mrd-email-field2.js +1 -1
  77. package/dist/components/mrd-file-field2.js +1 -1
  78. package/dist/components/mrd-form.js +1 -1
  79. package/dist/components/mrd-hyperlink-field2.js +1 -1
  80. package/dist/components/mrd-image-field2.js +1 -1
  81. package/dist/components/mrd-layout-section.js +1 -1
  82. package/dist/components/mrd-list-field2.js +1 -1
  83. package/dist/components/mrd-longtext-field2.js +1 -1
  84. package/dist/components/mrd-number-field2.js +1 -1
  85. package/dist/components/mrd-relation-field2.js +1 -1
  86. package/dist/components/mrd-secret-field2.js +1 -1
  87. package/dist/components/mrd-table2.js +1 -1
  88. package/dist/components/mrd-text-field2.js +1 -1
  89. package/dist/components/mrd-textarea-field2.js +1 -1
  90. package/dist/components/mrd-time-field2.js +1 -1
  91. package/dist/components/query-params.js +1 -0
  92. package/dist/esm/{index-_tsCCkAi.js → index-DiSEJMA8.js} +38 -1
  93. package/dist/esm/loader.js +2 -2
  94. package/dist/esm/mosterdcomponents.js +2 -2
  95. package/dist/esm/mrd-boolean-field_23.entry.js +1203 -1084
  96. package/dist/mosterdcomponents/mosterdcomponents.css +1 -1
  97. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
  98. package/dist/mosterdcomponents/p-9b3c0917.entry.js +1 -0
  99. package/dist/mosterdcomponents/p-DiSEJMA8.js +2 -0
  100. package/dist/types/components/{mrd-document-container → documents/mrd-document-container}/mrd-document-container.d.ts +2 -2
  101. package/dist/types/components/documents/mrd-document-list/folder-tree.d.ts +66 -0
  102. package/dist/types/components/{mrd-document-list → documents/mrd-document-list}/mrd-document-list.d.ts +4 -37
  103. package/dist/types/components/documents/mrd-document-list/tree-view.d.ts +32 -0
  104. package/dist/types/components/{mrd-document-view → documents/mrd-document-view}/mrd-document-view.d.ts +2 -2
  105. package/dist/types/components/fields/field-helpers.d.ts +18 -0
  106. package/dist/types/components/fields/file-upload-common.d.ts +18 -0
  107. package/dist/types/components/{mrd-boolean-field → fields/mrd-boolean-field}/mrd-boolean-field.d.ts +1 -1
  108. package/dist/types/components/{mrd-currency-field → fields/mrd-currency-field}/mrd-currency-field.d.ts +2 -2
  109. package/dist/types/components/{mrd-date-field → fields/mrd-date-field}/mrd-date-field.d.ts +1 -1
  110. package/dist/types/components/{mrd-datetime-field → fields/mrd-datetime-field}/mrd-datetime-field.d.ts +1 -1
  111. package/dist/types/components/{mrd-email-field → fields/mrd-email-field}/mrd-email-field.d.ts +1 -1
  112. package/dist/types/components/{mrd-file-field → fields/mrd-file-field}/mrd-file-field.d.ts +2 -4
  113. package/dist/types/components/{mrd-hyperlink-field → fields/mrd-hyperlink-field}/mrd-hyperlink-field.d.ts +2 -2
  114. package/dist/types/components/{mrd-image-field → fields/mrd-image-field}/mrd-image-field.d.ts +2 -4
  115. package/dist/types/components/{mrd-list-field → fields/mrd-list-field}/mrd-list-field.d.ts +2 -2
  116. package/dist/types/components/{mrd-longtext-field → fields/mrd-longtext-field}/mrd-longtext-field.d.ts +1 -1
  117. package/dist/types/components/{mrd-number-field → fields/mrd-number-field}/mrd-number-field.d.ts +2 -2
  118. package/dist/types/components/{mrd-relation-field → fields/mrd-relation-field}/mrd-relation-field.d.ts +2 -2
  119. package/dist/types/components/{mrd-secret-field → fields/mrd-secret-field}/mrd-secret-field.d.ts +1 -1
  120. package/dist/types/components/{mrd-text-field → fields/mrd-text-field}/mrd-text-field.d.ts +1 -1
  121. package/dist/types/components/{mrd-textarea-field → fields/mrd-textarea-field}/mrd-textarea-field.d.ts +1 -1
  122. package/dist/types/components/{mrd-time-field → fields/mrd-time-field}/mrd-time-field.d.ts +1 -1
  123. package/dist/types/components/{mrd-field → form/mrd-field}/mrd-field.d.ts +2 -2
  124. package/dist/types/components/{mrd-form → form/mrd-form}/mrd-form.d.ts +2 -2
  125. package/dist/types/components/layout/mrd-layout-section/field-value.d.ts +22 -0
  126. package/dist/types/components/layout/mrd-layout-section/layout-helpers.d.ts +8 -0
  127. package/dist/types/components/{mrd-layout-section → layout/mrd-layout-section}/mrd-layout-section.d.ts +4 -11
  128. package/dist/types/components/{mrd-table → table/mrd-table}/mrd-table.d.ts +6 -13
  129. package/dist/types/components/table/mrd-table/table-filter-popup.d.ts +35 -0
  130. package/dist/types/components/table/mrd-table/table-parts.d.ts +61 -0
  131. package/dist/types/components/table/mrd-table/table-query.d.ts +50 -0
  132. package/dist/types/components/table/mrd-table/virtual-scroll.d.ts +26 -0
  133. package/dist/types/components.d.ts +3 -5
  134. package/dist/types/utils/query-params.d.ts +14 -0
  135. package/package.json +7 -2
  136. package/dist/components/validation.js +0 -1
  137. package/dist/mosterdcomponents/p-_tsCCkAi.js +0 -2
  138. package/dist/mosterdcomponents/p-a9618055.entry.js +0 -1
@@ -0,0 +1,2 @@
1
+ function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},n=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&e(t,n))},l=(t,e)=>e in t,i=(t,e)=>(0,console.error)(t,e),s=new Map,r=new Map,c="http://www.w3.org/1999/xlink",u="undefined"!=typeof window?window:{},a={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},f=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],v=[],y=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&a.u?$(w):a.raf(w))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},w=()=>{b(m),b(v),(h=m.length>0)&&a.raf(w)},$=t=>f().then(t),g=y(v,!0);function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var O,S,k=new WeakMap,E=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!M(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?x(null,o):o),s=i)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,N);const u=x(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},x=(t,e)=>({u:0,O:t,m:null!=e?e:null,S:null,$:null,v:null,j:null}),L={},N={forEach:(t,e)=>t.map(P).forEach(e),map:(t,e)=>t.map(P).map(e).map(R)},P=t=>({vattrs:t.v,vchildren:t.$,vkey:t.j,vname:t.k,vtag:t.O,vtext:t.m}),R=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),C(t.vtag,e,...t.vchildren||[])}const e=x(t.vtag,t.vtext);return e.v=t.vattrs,e.$=t.vchildren,e.j=t.vkey,e.k=t.vname,e},D=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,H=t=>{var e;return null==(e=n(t))?void 0:e.$hostElement$},T=(t,e)=>{const n=H(t);return{emit:t=>A(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},A=(t,e,n)=>{const o=a.ce(e,n);return t.dispatchEvent(o),o},U=(t,e,o,i,s,r)=>{if(o===i)return;let f=l(t,e),d=e.toLowerCase();if("class"===e){const e=t.classList,n=z(o);let l=z(i);e.remove(...n.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!n.includes(t))))}else if("style"===e){for(const e in o)i&&null!=i[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in i)o&&i[e]===o[e]||(e.includes("-")?t.style.setProperty(e,i[e]):t.style[e]=i[e])}else if("key"===e);else if("ref"===e)i&&tt(i,t);else if(f||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const o=e.slice(5);let l;{const e=n(t);if(e&&e.o&&e.o.t){const t=e.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==i||!1===i?!1===i&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===i?"":i))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=i}catch(t){}return}{const n=M(i);if((f||n&&null!==i)&&!s)try{if(t.tagName.includes("-"))t[e]!==i&&(t[e]=i);else{const n=null==i?"":i;"list"===e?f=!1:null!=o&&t[e]===n||("function"==typeof t.__lookupSetter__(e)?t[e]=n:t.setAttribute(e,n))}}catch(t){}let l=!1;d!==(d=d.replace(/^xlink\:?/,""))&&(e=d,l=!0),null==i||!1===i?!1===i&&""!==t.getAttribute(e)||(l?t.removeAttributeNS(c,e):t.removeAttribute(e)):(!f||4&r||s)&&!n&&1===t.nodeType&&(i=!0===i?"":i,l?t.setAttributeNS(c,e,i):t.setAttribute(e,i))}}else if(e="-"===e[2]?e.slice(3):l(u,d)?d.slice(2):d[2]+e.slice(3),o||i){const n=e.endsWith(F);e=e.replace(V,""),o&&a.rel(t,e,o,n),i&&a.ael(t,e,i,n)}},W=/\s/,z=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(W):[]),F="Capture",V=RegExp(F+"$"),q=(t,e,n)=>{const o=11===e.S.nodeType&&e.S.host?e.S.host:e.S,l=t&&t.v||{},i=e.v||{};for(const t of G(Object.keys(l)))t in i||U(o,t,l[t],void 0,n,e.u);for(const t of G(Object.keys(i)))U(o,t,l[t],i[t],n,e.u)};function G(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Y=!1,Z=[],_=[],B=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.S=u.document.createTextNode(o.m);else{if(Y||(Y="svg"===o.O),!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.S=u.document.createElementNS(Y?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),Y&&"foreignObject"===o.O&&(Y=!1),q(null,o,Y),null!=O&&void 0!==O&&l["s-si"]!==O&&l.classList.add(l["s-si"]=O),o.$){const e="template"===o.O?l.content:l;for(s=0;s<o.$.length;++s)i=B(t,o,s),i&&e.appendChild(i)}"svg"===o.O?Y=!1:"foreignObject"===l.tagName&&(Y=!0)}return l["s-hn"]=S,l},I=(t,e,n,o,l,i)=>{let s,r=t;for("template"===n.O&&(r=r.content);l<=i;++l)o[l]&&(s=B(null,n,l),s&&(o[l].S=s,et(r,s,e)))},J=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;X(e),t&&t.remove()}}},K=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),Q=(t,e,n=!1)=>{const o=e.S=t.S,l=t.$,i=e.$,s=e.O,r=e.m;null==r?(q(t,e,Y="svg"===s||"foreignObject"!==s&&Y),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],p=e[f],h=o.length-1,m=o[0],v=o[h];const y="template"===n.O?t.content:t;for(;r<=f&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(K(d,m,l))Q(d,m,l),d=e[++r],m=o[++c];else if(K(p,v,l))Q(p,v,l),p=e[--f],v=o[--h];else if(K(d,v,l))Q(d,v,l),et(y,d.S,p.S.nextSibling),d=e[++r],v=o[--h];else if(K(p,m,l))Q(p,m,l),et(y,p.S,d.S),p=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===m.j){u=a;break}u>=0?(s=e[u],s.O!==m.O?i=B(e&&e[c],n,u):(Q(s,m,l),e[u]=void 0,i=s.S),m=o[++c]):(i=B(e&&e[c],n,c),m=o[++c]),i&&et(d.S.parentNode,i,d.S)}r>f?I(t,null==o[h+1]?null:o[h+1].S,n,o,c,h):c>h&&J(e,r,f)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),I(o,null,e,i,0,i.length-1)):!n&&null!==l&&J(l,0,l.length-1),Y&&"svg"===s&&(Y=!1)):t.m!==r&&(o.data=r)},X=t=>{t.v&&t.v.ref&&Z.push((()=>t.v.ref(null))),t.$&&t.$.map(X)},tt=(t,e)=>{_.push((()=>t(e)))},et=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),nt=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},ot=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);nt(t,t.C);const n=()=>lt(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},lt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.L.length&&t.L.forEach((t=>t(n))),l=ft(o,"componentWillLoad",void 0,n)):l=ft(o,"componentWillUpdate",void 0,n),l=it(l,(()=>ft(o,"componentWillRender",void 0,n))),it(l,(()=>rt(t,o,e)))},it=(t,e)=>st(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),st=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,rt=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=E(e),s=r.get(i);if(!u.document)return i;if(t=11===t.nodeType?t:u.document,s)if("string"==typeof s){let l,r=k.get(t=t.head||t);if(r||k.set(t,r=new Set),!r.has(i)){l=u.document.createElement("style"),l.textContent=s;const c=null!=(n=a.N)?n:j(u.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),p?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ct(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ut(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},ct=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.P||x(null,null),i=(t=>t&&t.O===L)(e)?e:C(null,null,e);if(S=o.tagName,n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.O=null,i.u|=4,t.P=i,i.S=l.S=o,O=o["s-sc"],Q(l,i,n),Z.forEach((t=>t())),Z.length=0,_.forEach((t=>t())),_.length=0})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},ut=t=>{const e=t.$hostElement$,n=t.i,o=t.C;ft(n,"componentDidRender",void 0,e),64&t.u?ft(n,"componentDidUpdate",void 0,e):(t.u|=64,dt(e),ft(n,"componentDidLoad",void 0,e),t.R(e),o||at()),t.D(e),t.M&&(t.M(),t.M=void 0),512&t.u&&$((()=>ot(t,!1))),t.u&=-517},at=()=>{$((()=>A(u,"appload",{detail:{namespace:"mosterdcomponents"}})))},ft=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},dt=t=>t.classList.add("hydrated"),pt=(t,e,o,l)=>{const s=n(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,a=s.i;if(o=D(o,l.t[e][0]),!(8&u&&void 0!==c||o===c||Number.isNaN(c)&&Number.isNaN(o))){if(s.l.set(e,o),l.H){const t=l.H[e];t&&t.map((t=>{try{const[[n,l]]=Object.entries(t);(128&u||1&l)&&(a?a[n](o,c,e):s.L.push((()=>{s.i[n](o,c,e)})))}catch(t){i(t,r)}}))}if(2&u){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,c,e)&&!(16&u))return;16&u||ot(s,!1)}}},ht=(e,o,l)=>{var i,s;const r=e.prototype;{e.watchers&&!o.H&&(o.H=e.watchers),e.deserializers&&!o.T&&(o.T=e.deserializers),e.serializers&&!o.A&&(o.A=e.serializers);const c=Object.entries(null!=(i=o.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(o.t[e][0]|=2048),c&&(o.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&o.t[e][0]))return((t,e)=>n(this).l.get(e))(0,e);const t=n(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=n(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,D(t,i)),void pt(this,e,t=32&i?this[e]:s.$hostElement$[e],o);{if(!(1&l&&4096&o.t[e][0]))return pt(this,e,t,o),void(1&l&&!s.i&&s.L.push((()=>{4096&o.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const n=()=>{const n=s.i[e];!s.l.get(e)&&n&&s.l.set(e,n),s.i[e]=D(t,i),pt(this,e,s.i[e],o)};s.i?n():s.L.push((()=>{n()}))}}}})}else 1&l&&64&i&&Object.defineProperty(r,e,{value(...t){var o;const l=n(this);return null==(o=null==l?void 0:l.U)?void 0:o.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){a.jmp((()=>{var s;const u=t.get(e),a=n(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==a?void 0:a.u;if(a&&t&&!(8&t)&&i!==l){const n=a.i,r=null==(s=o.H)?void 0:s[e];null==r||r.forEach((o=>{const[[s,r]]=Object.entries(o);null!=n[s]&&(128&t||1&r)&&n[s].call(n,i,l,e)}))}return}const f=c.find((([t])=>t===u));f&&4&f[1][0]&&(i=null!==i&&"false"!==i);const d=Object.getOwnPropertyDescriptor(r,u);i==this[u]||d.get&&!d.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=o.H)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},mt=(t,e)=>{ft(t,"connectedCallback",void 0,e)},vt=(t,e)=>{ft(t,"disconnectedCallback",void 0,e||t)},yt=(t,e={})=>{var o;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],c=e.exclude||[],f=u.customElements,p=u.document.head,h=p.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(a,e),a.p=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var o,u,p;const h={u:e[0],h:e[1],t:e[2],W:e[3]};h.t=e[2],h.H=null!=(o=e[4])?o:{},h.A=null!=(u=e[5])?u:{},h.T=null!=(p=e[6])?p:{};const m=h.h,w=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,F:new Map};n.U=new Promise((t=>n.D=t)),n.V=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.L=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,h)}connectedCallback(){n(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const e=n(t);if(!e)return;const o=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?mt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>mt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){nt(e,e.C=n);break}}o.t&&Object.entries(o.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.q){const l=((t,e)=>{const n=t.h.replace(/-/g,"_"),o=t.q;if(!o)return;const l=s.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(s.set(o,t),t[n])),(t=>{i(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.h}#${e.G}" was not found`);o.isProxied||(n.H=o.watchers,n.A=o.serializers,n.T=o.deserializers,ht(o,n,2),o.isProxied=!0);const r=()=>{};e.u|=8;try{new o(e)}catch(e){i(e,t)}e.u&=-9,e.u|=128,r(),mt(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=E(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,c=()=>ot(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()}catch(n){i(n,t),e.M&&(e.M(),e.M=void 0),e.R&&e.R(t)}})(t,e,o)}l()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const e=n(t);(null==e?void 0:e.i)?vt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>vt(e.i,t)))}k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this))),a.raf((()=>{var t;const e=n(this);if(!e)return;const o=v.findIndex((t=>t===this));o>-1&&v.splice(o,1),(null==(t=null==e?void 0:e.P)?void 0:t.S)instanceof Node&&!e.P.S.isConnected&&delete e.P.S}))}componentOnReady(){var t;return null==(t=n(this))?void 0:t.V}};h.q=t[0],c.includes(m)||f.get(m)||(l.push(m),f.define(m,ht(w,h,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=a.N)?o:j(u.document);null!=t&&m.setAttribute("nonce",t),p.insertBefore(m,h?h.nextSibling:p.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):a.jmp((()=>y=setTimeout(at,30)))},bt=t=>a.N=t;export{L as H,yt as b,T as c,H as g,C as h,f as p,o as r,bt as s,g as w}
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientArchetype, ClientLayoutItem } from '../../types/client-layout';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientArchetype, ClientLayoutItem } from '../../../types/client-layout';
3
3
  /**
4
4
  * Owns a document collection view: a single toolbar (view switch + collection
5
5
  * actions like "New folder", and — later — upload / drag-drop) plus the two
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Tree model and pure tree logic for mrd-document-list.
3
+ * Nodes are mutated in place; the component triggers re-renders via bump().
4
+ */
5
+ /** A distinct value as returned by the /distinct endpoint. */
6
+ export interface DistinctValue {
7
+ /** Relation slot → `{ href, name }`; value slot (folder) → the raw path string. */
8
+ value: {
9
+ href: string;
10
+ name: string;
11
+ } | string | number | null;
12
+ count: number;
13
+ }
14
+ /** A loaded document row (raw data object from the /data endpoint). */
15
+ export type DocRow = Record<string, any>;
16
+ /** Internal tree node. Containers and folders share one shape; the container is
17
+ * the root of its own folder subtree (root docs = the container's direct docs). */
18
+ export interface TreeNode {
19
+ id: string;
20
+ kind: 'container' | 'folder';
21
+ label: string;
22
+ /** Container href — used to filter documents/folders (`{containerField}_href`). */
23
+ href?: string;
24
+ /** Exact distinct folder string this node maps to (present when it holds documents). */
25
+ fullPath?: string;
26
+ /** True when a distinct value maps exactly to this node (it can load documents). */
27
+ hasDocs: boolean;
28
+ /** Direct document count (0 for grouping-only folder nodes). */
29
+ docCount: number;
30
+ /** Aggregate count including descendants — shown in the badge. */
31
+ totalCount: number;
32
+ children: TreeNode[];
33
+ open: boolean;
34
+ loading: boolean;
35
+ /** Container only: folder distinct fetched. */
36
+ foldersLoaded: boolean;
37
+ /** Direct documents fetched. */
38
+ docsLoaded: boolean;
39
+ docs: DocRow[];
40
+ /** Owning container id (folder nodes only) — used to resolve the container for a folder. */
41
+ containerId?: string;
42
+ /** Client-side folder that is not yet materialised on the server (no documents yet). */
43
+ pending?: boolean;
44
+ /** The inline name input is currently shown for this (freshly created) node. */
45
+ editing?: boolean;
46
+ /** Inline validation message shown under the name input. */
47
+ error?: string;
48
+ }
49
+ /** Normalise a folder path: null/""/"/" → root ([]); else split on "/" dropping empties. */
50
+ export declare function splitFolder(path: string | null | undefined): string[];
51
+ export declare function makeContainerNode(href: string, label: string, count: number): TreeNode;
52
+ export declare function makeFolderNode(id: string, label: string, containerId: string): TreeNode;
53
+ /** Recompute totalCount over the subtree; returns the node's aggregate. */
54
+ export declare function computeTotals(node: TreeNode): number;
55
+ /** Folder path segments of a node relative to its container (derived from its id). */
56
+ export declare function segmentsOf(node: TreeNode, container: TreeNode): string[];
57
+ /** Folder string a node represents: the raw distinct value when it holds
58
+ * documents, else derived from its path segments; null for a container root. */
59
+ export declare function folderStringOf(node: TreeNode, container: TreeNode): string | null;
60
+ /** Strip a single trailing extension for the document title. */
61
+ export declare function stripExtension(name: string): string;
62
+ /** Rebuild a container's folder subtree from the /distinct folder strings.
63
+ * New nodes are registered in `nodeIndex`; the container is mutated in place. */
64
+ export declare function applyFolderDistinct(container: TreeNode, values: DistinctValue[], nodeIndex: Map<string, TreeNode>): void;
65
+ /** Optimistic in-place tree update for a document moved between folders. */
66
+ export declare function applyDocMove(doc: DocRow, fromNode: TreeNode, toNode: TreeNode, targetFolder: string | null): void;
@@ -1,16 +1,6 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientArchetype, ClientLayoutItem } from '../../types/client-layout';
3
- /** A distinct value as returned by the /distinct endpoint. */
4
- export interface DistinctValue {
5
- /** Relation slot → `{ href, name }`; value slot (folder) → the raw path string. */
6
- value: {
7
- href: string;
8
- name: string;
9
- } | string | number | null;
10
- count: number;
11
- }
12
- /** A loaded document row (raw data object from the /data endpoint). */
13
- export type DocRow = Record<string, any>;
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientArchetype, ClientLayoutItem } from '../../../types/client-layout';
3
+ import { DistinctValue, DocRow } from './folder-tree';
14
4
  /**
15
5
  * Archetype-driven document collection view. Renders documents as a lazy,
16
6
  * file-explorer-style folder tree, grouped by the `commons.document` archetype's
@@ -161,11 +151,6 @@ export declare class MrdDocumentList {
161
151
  setDocuments(nodeId: string, docs: DocRow[]): Promise<void>;
162
152
  private applyContainers;
163
153
  private applyFolders;
164
- /** Normalise a folder path: null/""/"/" → root ([]); else split on "/" dropping empties. */
165
- private splitFolder;
166
- private makeContainerNode;
167
- private makeFolderNode;
168
- private computeTotals;
169
154
  /** Force a re-render after mutating nodes in place. */
170
155
  private bump;
171
156
  private toggleContainer;
@@ -177,8 +162,6 @@ export declare class MrdDocumentList {
177
162
  /** Start creating a folder under the current target. Called by the host toolbar
178
163
  * (mrd-document-container). No-op when there is no valid target. */
179
164
  createFolder(): Promise<void>;
180
- /** Folder path segments of a node relative to its container (derived from its id). */
181
- private segmentsOf;
182
165
  private startCreateFolder;
183
166
  private onPendingInput;
184
167
  private onPendingKeyDown;
@@ -201,33 +184,17 @@ export declare class MrdDocumentList {
201
184
  private onRootDrop;
202
185
  /** Begin an upload: emit mrdUpload; the host uploads and calls setFileReference. */
203
186
  private startFileUpload;
204
- /** Strip a single trailing extension for the document title. */
205
- private stripExtension;
206
187
  /** Host callback with the uploaded file reference. Builds the create payload
207
188
  * from the archetype slots and requests the new document. */
208
189
  setFileReference(uri: string): Promise<void>;
209
190
  /** Host callback with the created document's self href, so the optimistic row
210
191
  * becomes navigable without waiting for a reload. */
211
192
  setCreatedHref(href: string): Promise<void>;
212
- /** Folder string a node represents: the raw distinct value when it holds
213
- * documents, else derived from its path segments; null for a container root. */
214
- private folderStringOf;
215
193
  private moveDocument;
216
194
  /** Recompute a container's subtree totals from docCounts when its folders are
217
195
  * loaded; otherwise just nudge the aggregate badge by the delta. */
218
196
  private recomputeContainerTotals;
219
197
  private openDoc;
220
- private renderChevron;
221
- private renderDossierIcon;
222
- private renderFolderIcon;
223
- private renderDocIcon;
224
- private indent;
225
- private renderDocRow;
226
- private renderLoadingRow;
227
- private renderChildren;
228
- private renderUploadingRow;
229
- private renderFolderEditRow;
230
- private renderFolderNode;
231
- private renderContainerNode;
198
+ private treeCtx;
232
199
  render(): any;
233
200
  }
@@ -0,0 +1,32 @@
1
+ import { DocRow, TreeNode } from './folder-tree';
2
+ /**
3
+ * Render functions for the mrd-document-list tree. Plain functions (not
4
+ * FunctionalComponents) because the tree renders recursively and the whole
5
+ * context travels as one object; all state and handlers stay in the component.
6
+ */
7
+ export interface TreeViewContext {
8
+ locale: string;
9
+ titleField: string;
10
+ dateField?: string;
11
+ selectedId: string | null;
12
+ dropTargetId: string | null;
13
+ uploadingNodeId: string | null;
14
+ on: {
15
+ toggleContainer: (node: TreeNode) => void;
16
+ toggleFolder: (container: TreeNode, node: TreeNode) => void;
17
+ openDoc: (doc: DocRow) => void;
18
+ docDragStart: (e: DragEvent, doc: DocRow, node: TreeNode) => void;
19
+ docDragEnd: () => void;
20
+ nodeDragOver: (e: DragEvent, node: TreeNode) => void;
21
+ nodeDragLeave: (node: TreeNode) => void;
22
+ nodeDrop: (e: DragEvent, node: TreeNode, container: TreeNode) => void;
23
+ pendingInput: (e: Event) => void;
24
+ pendingKeyDown: (e: KeyboardEvent) => void;
25
+ cancelFolder: () => void;
26
+ setPendingInputEl: (el: HTMLInputElement) => void;
27
+ };
28
+ }
29
+ export declare function renderLoadingRow(ctx: TreeViewContext, depth: number): any;
30
+ export declare function renderNodeChildren(ctx: TreeViewContext, container: TreeNode, node: TreeNode, depth: number): any[];
31
+ export declare function renderFolderNode(ctx: TreeViewContext, container: TreeNode, node: TreeNode, depth: number): any;
32
+ export declare function renderContainerNode(ctx: TreeViewContext, node: TreeNode, depth: number): any;
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientArchetype } from '../../types/client-layout';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientArchetype } from '../../../types/client-layout';
3
3
  /**
4
4
  * Archetype-driven single-document view. Given a `commons.document` binding and a
5
5
  * data record, renders the document recognisably — title, file preview/download,
@@ -0,0 +1,18 @@
1
+ import { FunctionalComponent } from '../../stencil-public-runtime';
2
+ /**
3
+ * Shared building blocks for the leaf field components.
4
+ * `base` is the BEM block name, e.g. 'mrd-text-field'.
5
+ */
6
+ export declare const FieldLabel: FunctionalComponent<{
7
+ base: string;
8
+ label: string;
9
+ required: boolean;
10
+ }>;
11
+ export declare const FieldError: FunctionalComponent<{
12
+ base: string;
13
+ error: string;
14
+ }>;
15
+ /** Class string for the form control, with the --error modifier when applicable. */
16
+ export declare function controlClass(base: string, hasError: boolean, element?: string): string;
17
+ /** Returns the localised required-error, or '' when the value passes. */
18
+ export declare function requiredError(value: unknown, required: boolean, locale: string): string;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Shared upload behaviour for mrd-file-field and mrd-image-field:
3
+ * file validation, drop-zone class building and drag-drop wiring.
4
+ */
5
+ /** Validates a selected/dropped file; returns a localised error message or '' when accepted. */
6
+ export declare function validateUploadFile(file: File, maxSize: number, locale: string, requireImage?: boolean): string;
7
+ /** BEM class string for the drop zone, e.g. base 'mrd-file-field' → 'mrd-file-field__zone …'. */
8
+ export declare function uploadZoneClass(base: string, opts: {
9
+ dragging: boolean;
10
+ error: boolean;
11
+ disabled: boolean;
12
+ }): string;
13
+ /** Drag-drop handlers for the drop zone; the component owns the dragging state and file handling. */
14
+ export declare function makeDragHandlers(setDragging: (dragging: boolean) => void, onFile: (file: File | null) => void): {
15
+ onDragOver: (e: DragEvent) => void;
16
+ onDragLeave: () => void;
17
+ onDrop: (e: DragEvent) => void;
18
+ };
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdBooleanField {
3
3
  name: string;
4
4
  label: string;
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { CurrencyValue } from '../../types';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { CurrencyValue } from '../../../types';
3
3
  export declare class MrdCurrencyField {
4
4
  name: string;
5
5
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdDateField {
3
3
  name: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdDatetimeField {
3
3
  name: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdEmailField {
3
3
  name: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdFileField {
3
3
  name: string;
4
4
  label: string;
@@ -31,9 +31,7 @@ export declare class MrdFileField {
31
31
  valueChanged(newVal: unknown): void;
32
32
  private handleFile;
33
33
  private handleInputChange;
34
- private handleDragOver;
35
- private handleDragLeave;
36
- private handleDrop;
34
+ private drag;
37
35
  private handleZoneClick;
38
36
  private handleClear;
39
37
  render(): any;
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { HyperlinkValue } from '../../types/client-layout';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { HyperlinkValue } from '../../../types/client-layout';
3
3
  export declare class MrdHyperlinkField {
4
4
  name: string;
5
5
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdImageField {
3
3
  name: string;
4
4
  label: string;
@@ -32,9 +32,7 @@ export declare class MrdImageField {
32
32
  valueChanged(newVal: unknown): void;
33
33
  private handleFile;
34
34
  private handleInputChange;
35
- private handleDragOver;
36
- private handleDragLeave;
37
- private handleDrop;
35
+ private drag;
38
36
  private handleZoneClick;
39
37
  private handleClear;
40
38
  render(): any;
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientListValue } from '../../types';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientListValue } from '../../../types';
3
3
  export declare class MrdListField {
4
4
  name: string;
5
5
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdLongtextField {
3
3
  name: string;
4
4
  label: string;
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientLayoutItemFieldDataType } from '../../types';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientLayoutItemFieldDataType } from '../../../types';
3
3
  export declare class MrdNumberField {
4
4
  name: string;
5
5
  label: string;
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientLayoutItemRelationDisplayType, ClientLayoutItemRelationEditBehavior, ClientListValue, RelationSearchResult } from '../../types';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientLayoutItemRelationDisplayType, ClientLayoutItemRelationEditBehavior, ClientListValue, RelationSearchResult } from '../../../types';
3
3
  export declare class MrdRelationField {
4
4
  el: HTMLElement;
5
5
  name: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdSecretField {
3
3
  name: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdTextField {
3
3
  name: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter, ComponentDidLoad } from '../../stencil-public-runtime';
1
+ import { EventEmitter, ComponentDidLoad } from '../../../stencil-public-runtime';
2
2
  export declare class MrdTextareaField implements ComponentDidLoad {
3
3
  el: HTMLElement;
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  export declare class MrdTimeField {
3
3
  name: string;
4
4
  label: string;
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientLayoutItem } from '../../types';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientLayoutItem } from '../../../types';
3
3
  export declare class MrdField {
4
4
  el: HTMLElement;
5
5
  item: ClientLayoutItem;
@@ -1,5 +1,5 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientLayout, RelationSearchResult } from '../../types';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientLayout, RelationSearchResult } from '../../../types';
3
3
  export declare class MrdForm {
4
4
  layout: ClientLayout;
5
5
  locale: string;
@@ -0,0 +1,22 @@
1
+ import { ClientLayoutItem } from '../../../types/client-layout';
2
+ /**
3
+ * Read-only field rendering for mrd-layout-section. Plain render functions;
4
+ * state (image previews, open history popover) stays in the component and
5
+ * travels in via the context object.
6
+ */
7
+ export interface FieldViewContext {
8
+ locale: string;
9
+ data: Record<string, unknown>;
10
+ imagePreviews: Record<string, string>;
11
+ openHistoryField: string | null;
12
+ on: {
13
+ download: (detail: {
14
+ href: string;
15
+ fileName: string;
16
+ }) => void;
17
+ openImage: (url: string) => void;
18
+ toggleHistory: (fieldName: string | null) => void;
19
+ };
20
+ }
21
+ export declare function renderFieldValue(ctx: FieldViewContext, item: ClientLayoutItem, rawValue: unknown): any;
22
+ export declare function renderField(ctx: FieldViewContext, item: ClientLayoutItem): any;
@@ -0,0 +1,8 @@
1
+ import { ClientLayoutItem } from '../../../types/client-layout';
2
+ /** Key an embedded view is addressed by (setViewPage etc.). */
3
+ export declare function viewKeyFor(item: ClientLayoutItem): string;
4
+ /** Depth-first flatten of the SECTION/GROUP tree. */
5
+ export declare function flattenItems(items: ClientLayoutItem[]): ClientLayoutItem[];
6
+ /** Build the canonical parent href `/{base}/{tenant}/{fromClass}/{parentId}` from
7
+ * the object's self href. Empty unless it is a RELATED_VIEW with a fromClass. */
8
+ export declare function buildContainerHref(item: ClientLayoutItem, selfHref: string, parentId: string): string;
@@ -1,6 +1,6 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ClientLayoutItem, ClientLayoutItemNavigate, ClientViewMetadata, ClientArchetype, RelationSearchResult } from '../../types/client-layout';
3
- import { DistinctValue } from '../mrd-document-list/mrd-document-list';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ClientLayoutItem, ClientLayoutItemNavigate, ClientViewMetadata, ClientArchetype, RelationSearchResult } from '../../../types/client-layout';
3
+ import { DistinctValue } from '../../documents/mrd-document-list/folder-tree';
4
4
  export declare class MrdLayoutSection {
5
5
  el: HTMLElement;
6
6
  /** Items from one layout entry in ClientDashboardMetadata.layouts[]. */
@@ -101,9 +101,7 @@ export declare class MrdLayoutSection {
101
101
  disconnectedCallback(): void;
102
102
  dataChanged(newVal: Record<string, unknown>): void;
103
103
  private initEmbeddedTables;
104
- private viewKeyFor;
105
104
  private emitLoadImages;
106
- private flattenItems;
107
105
  /** Inject search results. Pass dataClass to target a specific SEARCH item; omit when there is only one. */
108
106
  setSearchResults(results: RelationSearchResult[], dataClass?: string): Promise<void>;
109
107
  /**
@@ -130,16 +128,11 @@ export declare class MrdLayoutSection {
130
128
  private resolveSearchKey;
131
129
  private handleViewLoadPage;
132
130
  private handleSearchInput;
133
- private renderSingleFieldValue;
134
- private renderFieldValue;
135
- private renderHistoryBadge;
131
+ private fieldCtx;
136
132
  private renderField;
137
133
  private renderRelation;
138
134
  private renderSearch;
139
135
  private renderRelatedView;
140
- /** Build the canonical parent href `/{base}/{tenant}/{fromClass}/{parentId}` from
141
- * the object's self href. Empty unless it is a RELATED_VIEW with a fromClass. */
142
- private buildContainerHref;
143
136
  /** Document collection view: owns the view-switch + collection actions and
144
137
  * swaps between the folder tree and the flat table. Events are re-emitted to
145
138
  * the host with the view key, exactly as the raw list/table events were. */
@@ -1,6 +1,6 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ColumnFilter } from '../../utils/cell-renderer';
3
- import { AggregationResult, ClientLayoutItem } from '../../types/client-layout';
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { ColumnFilter } from '../../../utils/cell-renderer';
3
+ import { AggregationResult, ClientLayoutItem } from '../../../types/client-layout';
4
4
  export declare class MrdTable {
5
5
  el: HTMLElement;
6
6
  private pendingPages;
@@ -9,6 +9,8 @@ export declare class MrdTable {
9
9
  private keydownHandler;
10
10
  private createPickerClickHandler;
11
11
  private viewPopoverClickHandler;
12
+ /** Guards against scheduling more than one column-width measurement per freeze. */
13
+ private colWidthMeasureScheduled;
12
14
  /** The VIEW or RELATED_VIEW layout item. Contains view config, dataClass, fromClass, actions etc. */
13
15
  item: ClientLayoutItem | null;
14
16
  /** Parent record id — required for RELATED_VIEW to build /{fromClass}/{parentId}/{dataClass}. */
@@ -152,10 +154,7 @@ export declare class MrdTable {
152
154
  private isTotalKnown;
153
155
  /** Effective total: aggregations-response > totalElements prop > minKnownTotal from setPage(). */
154
156
  private get baseTotal();
155
- private buildAggregationParams;
156
- private buildAggregationQs;
157
157
  private emitLoadAggregations;
158
- private renderAggregationValue;
159
158
  /** Reset pagination state and scroll to top (used after sort or filter change). */
160
159
  private resetPages;
161
160
  private handleSortClick;
@@ -174,24 +173,18 @@ export declare class MrdTable {
174
173
  private closeJsonModal;
175
174
  private setPending;
176
175
  private togglePendingValue;
177
- private filterHasValue;
178
- private dateLocalToUTCStart;
179
- private dateLocalToUTCEndExclusive;
180
- private utcISOToLocalDate;
181
- private utcISOToLocalDateExclusiveEnd;
182
176
  private applyFilter;
183
177
  private clearFilter;
184
178
  private clearAllFilters;
185
179
  private handleViewSwitch;
186
180
  private toggleViewPopover;
181
+ private closeViewPopover;
187
182
  private renderToolbar;
188
- private renderFilterEditor;
189
183
  private renderFilterPopup;
190
184
  private renderFooter;
191
185
  private renderCell;
192
186
  private renderTotalsRow;
193
187
  render(): any;
194
- private renderFilterIcon;
195
188
  private renderTextblockModal;
196
189
  private renderJsonModal;
197
190
  }
@@ -0,0 +1,35 @@
1
+ import { FunctionalComponent } from '../../../stencil-public-runtime';
2
+ import { ColumnFilter, TableColumn } from '../../../utils/cell-renderer';
3
+ /**
4
+ * Per-column filter popup of mrd-table (sort buttons + type-specific editor).
5
+ * The pending-filter state stays in the component; every mutation goes
6
+ * through the callbacks. Several branches replace the pending filter
7
+ * wholesale, hence onReplacePending next to onSetPending.
8
+ */
9
+ export interface FilterPopupCallbacks {
10
+ onSetPending: (key: keyof ColumnFilter, val: unknown) => void;
11
+ onReplacePending: (pf: Partial<ColumnFilter>) => void;
12
+ onToggleValue: (key: string, checked: boolean) => void;
13
+ onApplySort: (dir: 'asc' | 'desc') => void;
14
+ onApply: () => void;
15
+ onClear: () => void;
16
+ onClose: () => void;
17
+ }
18
+ interface EditorProps {
19
+ col: TableColumn;
20
+ dataType: string;
21
+ openFilterCol: string;
22
+ pendingFilter: Partial<ColumnFilter>;
23
+ locale: string;
24
+ cb: FilterPopupCallbacks;
25
+ }
26
+ export declare const FilterEditor: FunctionalComponent<EditorProps>;
27
+ export declare const FilterPopup: FunctionalComponent<EditorProps & {
28
+ popupPos: {
29
+ top: number;
30
+ left: number;
31
+ };
32
+ sortField: string;
33
+ sortDir: 'asc' | 'desc';
34
+ }>;
35
+ export {};