@vmscloud/moz-ui-components-core 0.1.59 → 0.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/styles/default/calendar.css +1 -1
- package/dist/styles/default/controller.css +1 -1
- package/dist/styles/default/dateinput.css +6 -6
- package/dist/styles/default/emptystate.css +9 -9
- package/dist/styles/default/index.css +193 -191
- package/dist/styles/default/multiselect.css +37 -37
- package/dist/styles/default/popup.css +1 -1
- package/dist/styles/default/select.css +31 -29
- package/dist/styles/default/splitpane.css +4 -4
- package/dist/styles/default/tableselect.css +34 -34
- package/dist/styles/default/taginput.css +6 -6
- package/dist/styles/default/timepicker.css +22 -22
- package/dist/styles/default/toast.css +1 -1
- package/dist/styles/default/treeselect.css +40 -40
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
</nav>
|
|
150
150
|
`};return{render(){const n=e.props;return n.items&&n.items.length>0?s(n.items):Zt({itemSource:n.itemSource,showFavorite:n.showFavorite,favorite:!!n.modelValue,onFavClick:t,ariaLabel:e.locale.BreadCrumb.navigation,favoriteSlot:e.slots.has("favorite")?e.slot("favorite"):void 0,titleSlot:e.slot("title"),class:n.class,style:n.style,rest:ve(n,uo)})}}}}),fl={name:"MozBreadCrumb",core:Io,booleanProps:["modelValue","showFavorite"],props:["itemSource","items","listClass","showFavorite"],emits:["click"],models:{modelValue:{prop:"modelValue",event:"update:modelValue"}},slots:["favorite","title","separator"],expose:!1,syncUpdate:!0},Fo={customEmptyHeader:"No data",customEmptyContent:"There is no data to display.",dataEmptyHeader:"No data to display",dataEmptyContent:"Please enter the required data.",resultEmptyHeader:"No results",resultEmptyContent:"Check the search conditions and try again.",searchEmptyHeader:"No search results",searchEmptyContent:"Please check the filter value and try again."},Bo=new URL("data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='90'%20cy='90'%20r='90'%20fill='%23F6F8FA'/%3e%3crect%20x='106.5'%20y='49.5'%20width='51'%20height='28'%20rx='7.5'%20fill='%23F6F8FA'%20stroke='%238B919C'/%3e%3cellipse%20cx='90'%20cy='136'%20rx='37'%20ry='2'%20fill='%23C2CBD3'/%3e%3cpath%20d='M34.5%2066C34.5%2061.8579%2037.8579%2058.5%2042%2058.5H143C147.142%2058.5%20150.5%2061.8579%20150.5%2066V115C150.5%20119.694%20146.694%20123.5%20142%20123.5H42C37.8579%20123.5%2034.5%20120.142%2034.5%20116V66Z'%20fill='white'%20stroke='%238B919C'/%3e%3cg%20filter='url(%23filter0_d_2328_1616)'%3e%3crect%20x='32'%20y='56'%20width='116'%20height='65'%20rx='8'%20fill='white'/%3e%3crect%20x='32.5'%20y='56.5'%20width='115'%20height='64'%20rx='7.5'%20stroke='%238B919C'/%3e%3c/g%3e%3ccircle%20cx='126'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='132'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='138'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3crect%20x='40'%20y='74'%20width='100'%20height='26'%20rx='2'%20fill='%23E4E6EB'/%3e%3crect%20x='44'%20y='80'%20width='27'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='92'%20y='80'%20width='27'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='44'%20y='86'%20width='44'%20height='8'%20fill='%23CBCFD7'/%3e%3crect%20x='92'%20y='86'%20width='44'%20height='8'%20fill='%23CBCFD7'/%3e%3crect%20x='116'%20y='104'%20width='24'%20height='9'%20rx='2'%20fill='%23868C98'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M147%2070H33V69H147V70Z'%20fill='%23D6DAE2'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_2328_1616'%20x='32'%20y='56'%20width='118'%20height='67'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.886275%200%200%200%200%200.894118%200%200%200%200%200.913725%200%200%200%201%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_2328_1616'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_2328_1616'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",typeof document>"u"?require("url").pathToFileURL(__filename).href:Ye&&Ye.tagName.toUpperCase()==="SCRIPT"&&Ye.src||new URL("index.cjs",document.baseURI).href).href,gl=new URL("data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='90'%20cy='90'%20r='90'%20fill='%23F6F8FA'/%3e%3cellipse%20cx='88'%20cy='141'%20rx='37'%20ry='2'%20fill='%23C2CBD3'/%3e%3cpath%20d='M32.5%2059C32.5%2054.8579%2035.8579%2051.5%2040%2051.5H141C145.142%2051.5%20148.5%2054.8579%20148.5%2059V120C148.5%20124.694%20144.694%20128.5%20140%20128.5H40C35.8579%20128.5%2032.5%20125.142%2032.5%20121V59Z'%20fill='white'%20stroke='%238B919C'/%3e%3cg%20filter='url(%23filter0_d_2357_2211)'%3e%3crect%20x='30'%20y='49'%20width='116'%20height='77'%20rx='8'%20fill='white'/%3e%3crect%20x='30.5'%20y='49.5'%20width='115'%20height='76'%20rx='7.5'%20stroke='%238B919C'/%3e%3c/g%3e%3ccircle%20cx='124'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='130'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='136'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3crect%20x='38.5'%20y='90.5'%20width='99'%20height='27'%20rx='1.5'%20stroke='%238B919C'%20stroke-dasharray='2%202'/%3e%3crect%20x='59'%20y='71'%20width='49'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='59'%20y='77'%20width='79'%20height='6'%20fill='%23CBCFD7'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M145%2063H31V62H145V63Z'%20fill='%23D6DAE2'/%3e%3cg%20clip-path='url(%23clip0_2357_2211)'%3e%3cg%20clip-path='url(%23clip1_2357_2211)'%3e%3cpath%20d='M88%2098.2857V109.714'%20stroke='%238B919C'%20stroke-width='1.8'%20stroke-linecap='round'/%3e%3cpath%20d='M82.2856%20104H93.7142'%20stroke='%238B919C'%20stroke-width='1.8'%20stroke-linecap='round'/%3e%3c/g%3e%3c/g%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M46%2084C49.866%2084%2053%2080.866%2053%2077C53%2073.134%2049.866%2070%2046%2070C42.134%2070%2039%2073.134%2039%2077C39%2080.866%2042.134%2084%2046%2084ZM45.5333%2073.8667C45.5333%2073.5353%2045.802%2073.2667%2046.1333%2073.2667H46.3333C46.6647%2073.2667%2046.9333%2073.5353%2046.9333%2073.8667V77.8C46.9333%2078.1314%2046.6647%2078.4%2046.3333%2078.4H46.1333C45.802%2078.4%2045.5333%2078.1314%2045.5333%2077.8V73.8667ZM45.5333%2079.9333C45.5333%2079.602%2045.802%2079.3333%2046.1333%2079.3333H46.3333C46.6647%2079.3333%2046.9333%2079.602%2046.9333%2079.9333V80.1333C46.9333%2080.4647%2046.6647%2080.7333%2046.3333%2080.7333H46.1333C45.802%2080.7333%2045.5333%2080.4647%2045.5333%2080.1333V79.9333Z'%20fill='%23868C98'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_2357_2211'%20x='30'%20y='49'%20width='118'%20height='79'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.886275%200%200%200%200%200.894118%200%200%200%200%200.913725%200%200%200%201%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_2357_2211'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_2357_2211'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_2357_2211'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='translate(80%2096)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_2357_2211'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='translate(80%2096)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",typeof document>"u"?require("url").pathToFileURL(__filename).href:Ye&&Ye.tagName.toUpperCase()==="SCRIPT"&&Ye.src||new URL("index.cjs",document.baseURI).href).href,vl=new URL("data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='90'%20cy='90'%20r='90'%20fill='%23F6F8FA'/%3e%3crect%20x='106.5'%20y='49.5'%20width='51'%20height='28'%20rx='7.5'%20fill='%23F6F8FA'%20stroke='%238B919C'/%3e%3cellipse%20cx='90'%20cy='136'%20rx='37'%20ry='2'%20fill='%23C2CBD3'/%3e%3cpath%20d='M34.5%2066C34.5%2061.8579%2037.8579%2058.5%2042%2058.5H143C147.142%2058.5%20150.5%2061.8579%20150.5%2066V115C150.5%20119.694%20146.694%20123.5%20142%20123.5H42C37.8579%20123.5%2034.5%20120.142%2034.5%20116V66Z'%20fill='white'%20stroke='%238B919C'/%3e%3cg%20filter='url(%23filter0_d_2328_1616)'%3e%3crect%20x='32'%20y='56'%20width='116'%20height='65'%20rx='8'%20fill='white'/%3e%3crect%20x='32.5'%20y='56.5'%20width='115'%20height='64'%20rx='7.5'%20stroke='%238B919C'/%3e%3c/g%3e%3ccircle%20cx='126'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='132'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='138'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3crect%20x='40'%20y='74'%20width='100'%20height='26'%20rx='2'%20fill='%23E4E6EB'/%3e%3crect%20x='44'%20y='80'%20width='27'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='92'%20y='80'%20width='27'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='44'%20y='86'%20width='44'%20height='8'%20fill='%23CBCFD7'/%3e%3crect%20x='92'%20y='86'%20width='44'%20height='8'%20fill='%23CBCFD7'/%3e%3crect%20x='116'%20y='104'%20width='24'%20height='9'%20rx='2'%20fill='%23868C98'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M147%2070H33V69H147V70Z'%20fill='%23D6DAE2'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_2328_1616'%20x='32'%20y='56'%20width='118'%20height='67'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.886275%200%200%200%200%200.894118%200%200%200%200%200.913725%200%200%200%201%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_2328_1616'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_2328_1616'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",typeof document>"u"?require("url").pathToFileURL(__filename).href:Ye&&Ye.tagName.toUpperCase()==="SCRIPT"&&Ye.src||new URL("index.cjs",document.baseURI).href).href,wl=new URL("data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='90'%20cy='90'%20r='90'%20fill='%23F6F8FA'/%3e%3cellipse%20cx='88'%20cy='141'%20rx='37'%20ry='2'%20fill='%23C2CBD3'/%3e%3cpath%20d='M32.5%2059C32.5%2054.8579%2035.8579%2051.5%2040%2051.5H141C145.142%2051.5%20148.5%2054.8579%20148.5%2059V120C148.5%20124.694%20144.694%20128.5%20140%20128.5H40C35.8579%20128.5%2032.5%20125.142%2032.5%20121V59Z'%20fill='white'%20stroke='%238B919C'/%3e%3cg%20filter='url(%23filter0_d_2357_2190)'%3e%3crect%20x='30'%20y='49'%20width='116'%20height='77'%20rx='8'%20fill='white'/%3e%3crect%20x='30.5'%20y='49.5'%20width='115'%20height='76'%20rx='7.5'%20stroke='%238B919C'/%3e%3c/g%3e%3ccircle%20cx='124'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='130'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='136'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3crect%20x='38.5'%20y='70.5'%20width='99'%20height='47'%20rx='1.5'%20stroke='%238B919C'%20stroke-dasharray='2%202'/%3e%3crect%20x='50'%20y='81'%20width='27.54'%20height='4'%20rx='2'%20fill='%23A6ABB3'/%3e%3crect%20x='50'%20y='97'%20width='27.54'%20height='4'%20rx='2'%20fill='%23A6ABB3'/%3e%3crect%20x='50'%20y='87'%20width='51'%20height='4'%20rx='2'%20fill='%23CBCFD7'/%3e%3crect%20x='50'%20y='103'%20width='51'%20height='4'%20rx='2'%20fill='%23CBCFD7'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M145%2063H31V62H145V63Z'%20fill='%23D6DAE2'/%3e%3cpath%20d='M123.553%20101.582L119.095%2097.1196C117.866%2097.9205%20116.394%2098.3781%20114.808%2098.2923C111.421%2098.135%20108.521%2095.4892%20108.064%2092.1283C107.435%2087.3372%20111.564%2083.2899%20116.394%2084.1051C119.18%2084.577%20121.495%2086.7509%20122.11%2089.5111C122.581%2091.5991%20122.124%2093.5441%20121.11%2095.0887L125.582%2099.5651C126.139%20100.123%20126.139%20101.024%20125.582%20101.582C125.025%20102.139%20124.11%20102.139%20123.553%20101.582ZM119.438%2091.1558C119.438%2088.796%20117.509%2086.8653%20115.151%2086.8653C112.793%2086.8653%20110.864%2088.796%20110.864%2091.1558C110.864%2093.5155%20112.793%2095.4463%20115.151%2095.4463C117.509%2095.4463%20119.438%2093.5155%20119.438%2091.1558Z'%20fill='%23868C98'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_2357_2190'%20x='30'%20y='49'%20width='118'%20height='79'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.886275%200%200%200%200%200.894118%200%200%200%200%200.913725%200%200%200%201%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_2357_2190'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_2357_2190'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",typeof document>"u"?require("url").pathToFileURL(__filename).href:Ye&&Ye.tagName.toUpperCase()==="SCRIPT"&&Ye.src||new URL("index.cjs",document.baseURI).href).href,bl=new Set(["isReadOnly","isCustomState","headerMsg","contentMsg","filterdRowCount","totalRowCount","useImg","selectImg","messages","composed","class","style"]),Cl={custom_empty:Bo,data_empty:gl,result_empty:vl,search_empty:wl},yl={custom_empty:"customEmptyHeader",data_empty:"dataEmptyHeader",result_empty:"resultEmptyHeader",search_empty:"searchEmptyHeader"},$l={custom_empty:"customEmptyContent",data_empty:"dataEmptyContent",result_empty:"resultEmptyContent",search_empty:"searchEmptyContent"},Oo=we({name:"moz-empty-state",defaults:{isReadOnly:!0,isCustomState:!1,filterdRowCount:0,totalRowCount:0,useImg:!0,composed:!1},setup(e){const t=n=>{var a;return((a=e.props.messages)==null?void 0:a[n])||e.locale.EmptyState[n]||Fo[n]||""},s=()=>{const n=e.props,i=n.totalRowCount??0,a=n.filterdRowCount??0;if(n.selectImg&&(i===0||a===0))switch(n.selectImg){case"Custom":return"custom_empty";case"Result":return"result_empty";case"Data":return"data_empty";case"Search":return"search_empty"}return n.isCustomState?"custom_empty":i===0?n.isReadOnly?"result_empty":"data_empty":a===0?"search_empty":""};return{render(){const n=e.props,i=ve(n,bl);if(n.composed)return o.html`
|
|
151
151
|
<div
|
|
152
|
-
class=${L("empty-container","empty-composed",n.class)}
|
|
152
|
+
class=${L("empty-container","empty-composed","moz-empty-state",n.class)}
|
|
153
153
|
style=${ee.styleMap(me(n.style))}
|
|
154
154
|
${ce(i)}
|
|
155
155
|
>
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
${e.slots.has("customState")?o.html`<div class="empty-content">${e.slot("customState")}</div>`:o.nothing}
|
|
161
161
|
</div>
|
|
162
162
|
`;const a=s();if(!a)return o.nothing;const m=Cl[a]||Bo,c=typeof n.headerMsg=="string"?n.headerMsg:t(yl[a]||"customEmptyHeader"),l=typeof n.contentMsg=="string"?n.contentMsg:t($l[a]||"customEmptyContent"),h=e.slots.has("icon")?o.html`<div class="empty-icon">${e.slot("icon")}</div>`:n.useImg?o.html`<img src=${m} alt="Empty state" class="empty-img" />`:o.nothing;return o.html`
|
|
163
|
-
<div class=${L("empty-container",n.class)} style=${ee.styleMap(me(n.style))} ${ce(i)}>
|
|
163
|
+
<div class=${L("empty-container","moz-empty-state",n.class)} style=${ee.styleMap(me(n.style))} ${ce(i)}>
|
|
164
164
|
${h}
|
|
165
165
|
<div class="empty-heading">${c}</div>
|
|
166
166
|
<div class="empty-content"><span>${To.unsafeHTML(l)}</span></div>
|
|
@@ -698,7 +698,7 @@
|
|
|
698
698
|
d="M3 2H12C12.5304 2 13.0391 2.21071 13.4142 2.58579C13.7893 2.96086 14 3.46957 14 4V6H1V4C1 3.46957 1.21071 2.96086 1.58579 2.58579C1.96086 2.21071 2.46957 2 3 2Z"
|
|
699
699
|
fill=${e}
|
|
700
700
|
></path>
|
|
701
|
-
</svg>`}const tn="YYYY-MM-DD",on=new Set(["label","name","width","required","disabled","readonly","format","showSpin","min","max","modelValue","class","style"]),Jo=we({name:"moz-date-input",defaults:{label:"",width:200,required:!1,disabled:!1,readonly:!1,showSpin:!1,min:null,max:null},setup(e){let t=!1,s=270,n=e.props.modelValue,i=null,a=null;const m=new kt,c=C=>{const y=e.props.modelValue;let D;C&&y instanceof Date?D=Pe(C).toDate():C&&Pe.isDayjs(y)||!y&&C?D=Pe(C):D=void 0,e.emit("update:modelValue",D)},l=((C,...y)=>{C==="update:modelValue"?c(y[0]):C==="setMaxHeight"&&(s=y[0],h.calcPosition())}),h=new mt({anchor:()=>i==null?void 0:i.querySelector(".moz-date-input-wrapper"),panel:()=>m.element,maxHeight:()=>s,ignoreScrollTargets:C=>(C&&typeof C.className=="string"?C.className:"").split(" ").includes("moz-calendar-row"),container:()=>i,requestClose:()=>{t&&(t=!1,p(),e.requestUpdate())}}),r=()=>{const C=m.open("calendar-container");a=eo(C,{modelValue:e.props.modelValue,min:e.props.min,max:e.props.max},l),h.open()},p=()=>{h.close(),a==null||a.destroy(),a=null,m.close(),e.emit("close")},u=()=>{var y;const C=e.props;C.disabled||C.readonly||(t=!t,t?((y=i==null?void 0:i.querySelector("input"))==null||y.focus(),r()):p(),e.requestUpdate())},v=()=>{e.props.modelValue&&c(Pe(e.props.modelValue).subtract(1,"d"))},$=()=>{e.props.modelValue&&c(Pe(e.props.modelValue).add(1,"d"))},R=C=>{const y=C.target,D=e.props.modelValue;D?Pe.isDayjs(D)&&Pe(y.value).isValid()?c(Pe(y.value)):D instanceof Date&&!Number.isNaN(Date.parse(y.value))?c(new Date(y.value)):c(void 0):c(Pe(y.value))};return e.onCleanup(()=>{h.destroy(),a==null||a.destroy(),m.close()}),{onMounted:C=>{i=C},render(){const C=e.props;if(C.modelValue!==n){n=C.modelValue;const le=C.modelValue;queueMicrotask(()=>e.emit("change",le)),a&&a.update({modelValue:C.modelValue})}const y=C.format||tn,D=typeof C.width=="number"?`${Te(C.width)}rem`:C.width,E=C.modelValue?Pe(C.modelValue).format(y):"",V=!!C.min&&Pe(E).isSameOrBefore(Pe(C.min),"day"),G=!!C.max&&Pe(E).isSameOrAfter(Pe(C.max),"day"),Y=ve(C,on),Q=(le,ue,U,z)=>o.html`<button
|
|
701
|
+
</svg>`}const tn="YYYY-MM-DD",on=new Set(["label","name","width","required","disabled","readonly","format","showSpin","min","max","modelValue","class","style"]),Jo=we({name:"moz-date-input",defaults:{label:"",width:200,required:!1,disabled:!1,readonly:!1,showSpin:!1,min:null,max:null},setup(e){let t=!1,s=270,n=e.props.modelValue,i=null,a=null;const m=new kt,c=C=>{const y=e.props.modelValue;let D;C&&y instanceof Date?D=Pe(C).toDate():C&&Pe.isDayjs(y)||!y&&C?D=Pe(C):D=void 0,e.emit("update:modelValue",D)},l=((C,...y)=>{C==="update:modelValue"?c(y[0]):C==="setMaxHeight"&&(s=y[0],h.calcPosition())}),h=new mt({anchor:()=>i==null?void 0:i.querySelector(".moz-date-input-wrapper"),panel:()=>m.element,maxHeight:()=>s,ignoreScrollTargets:C=>(C&&typeof C.className=="string"?C.className:"").split(" ").includes("moz-calendar-row"),container:()=>i,requestClose:()=>{t&&(t=!1,p(),e.requestUpdate())}}),r=()=>{const C=m.open("calendar-container moz-date-input-calendar");a=eo(C,{modelValue:e.props.modelValue,min:e.props.min,max:e.props.max},l),h.open()},p=()=>{h.close(),a==null||a.destroy(),a=null,m.close(),e.emit("close")},u=()=>{var y;const C=e.props;C.disabled||C.readonly||(t=!t,t?((y=i==null?void 0:i.querySelector("input"))==null||y.focus(),r()):p(),e.requestUpdate())},v=()=>{e.props.modelValue&&c(Pe(e.props.modelValue).subtract(1,"d"))},$=()=>{e.props.modelValue&&c(Pe(e.props.modelValue).add(1,"d"))},R=C=>{const y=C.target,D=e.props.modelValue;D?Pe.isDayjs(D)&&Pe(y.value).isValid()?c(Pe(y.value)):D instanceof Date&&!Number.isNaN(Date.parse(y.value))?c(new Date(y.value)):c(void 0):c(Pe(y.value))};return e.onCleanup(()=>{h.destroy(),a==null||a.destroy(),m.close()}),{onMounted:C=>{i=C},render(){const C=e.props;if(C.modelValue!==n){n=C.modelValue;const le=C.modelValue;queueMicrotask(()=>e.emit("change",le)),a&&a.update({modelValue:C.modelValue})}const y=C.format||tn,D=typeof C.width=="number"?`${Te(C.width)}rem`:C.width,E=C.modelValue?Pe(C.modelValue).format(y):"",V=!!C.min&&Pe(E).isSameOrBefore(Pe(C.min),"day"),G=!!C.max&&Pe(E).isSameOrAfter(Pe(C.max),"day"),Y=ve(C,on),Q=(le,ue,U,z)=>o.html`<button
|
|
702
702
|
type="button"
|
|
703
703
|
aria-label=${ue==="left"?e.locale.DateInput.prevDate:e.locale.DateInput.nextDate}
|
|
704
704
|
class=${L("moz-button","moz-icon-button","moz-icon-accent-button","moz-icon-text-button","date-move-btn",`date-move-btn--${ue}`,{"date-move-btn--disabled":U})}
|
|
@@ -937,7 +937,7 @@
|
|
|
937
937
|
${le()!==""?o.html`<span class="moz-input-invalid-message">${le()}</span>`:o.nothing}
|
|
938
938
|
</div>
|
|
939
939
|
`},renderPortal(){if(!p)return o.nothing;const d=e.props,T=h(),Z=C(),ie=Y();y.options.count!==ie.length&&y.setOptions({...y.options,count:ie.length}),y._willUpdate();const de=xt(y.getVirtualItems(),ie.length,at,c),Se=y.getTotalSize(),ye=de.map(b=>{if(b.index>=ie.length)return null;const I=ie[b.index];return I?{index:b.index,value:I,size:b.size,start:b.start}:null}).filter(b=>b!==null);return o.html`<div
|
|
940
|
-
class=${L("list-box",{"no-label":!d.label})}
|
|
940
|
+
class=${L("list-box moz-select-list",{"no-label":!d.label})}
|
|
941
941
|
@keydown=${Ne}
|
|
942
942
|
${_.ref(n)}
|
|
943
943
|
>
|
|
@@ -1005,7 +1005,7 @@
|
|
|
1005
1005
|
fill=${i}
|
|
1006
1006
|
></path>
|
|
1007
1007
|
</svg>`}const $n=new Set(["itemsSource","inline","filterMode","filterValue","searchPlaceholder","preserveMissingValues","loading","loadingText","listBoxHeight","label","width","required","readonly","disabled","keyProp","displayProp","disabledProp","rules","useSelectAll","useFilter","headerFormat","listBoxWidth","useSpecificSelect","autoSelectNewItems","selectAllWhenEmpty","modelValue","class","style","dropdown-item-height"]);function Sn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const ss=we({name:"moz-multi-select",defaults:{inline:!1,filterMode:"local",preserveMissingValues:!1,loading:!1,listBoxHeight:224,label:null,width:200,required:!1,readonly:!1,disabled:!1,keyProp:"id",displayProp:"text",disabledProp:"disabled",rules:[],useSelectAll:!0,useFilter:!1,headerFormat:"ITEMS ({count})",listBoxWidth:0,useSpecificSelect:!0,autoSelectNewItems:!1,selectAllWhenEmpty:!1,modelValue:null},setup(e){const t=_.createRef(),s=_.createRef(),n=_.createRef(),i=_.createRef(),a=_.createRef();let m=null;const c=()=>e.props.keyProp||"id",l=()=>e.props.disabledProp||"disabled";let h=e.props.modelValue??null;const r=()=>{const g=e.controlled("modelValue")?e.props.modelValue:h;return Array.isArray(g)?g:[]},p=g=>{e.controlled("modelValue")||(h=g),e.emit("update:modelValue",g),e.requestUpdate()};let u=!1;const v=Xe("moz-multiselect-listbox-");let $=e.props.filterValue??"",R=!1,C=!1,y={},D=[];const E={change:"",blur:"",save:""};let V=e.props.itemsSource;const G=(()=>{const g=e.props["dropdown-item-height"];if(g!=null)return+g;try{return+getComputedStyle(document.documentElement).getPropertyValue("--size-input-dropdown-item-height").trim().replace("px","")||24}catch{return 24}})(),Y=new Fe.Virtualizer({count:0,getScrollElement:()=>m,estimateSize:()=>G,overscan:5,observeElementRect:Fe.observeElementRect,observeElementOffset:Fe.observeElementOffset,scrollToFn:Fe.elementScroll,onChange:()=>e.requestUpdate()});e.onCleanup(()=>{b==null||b.release(),b=null}),e.onCleanup(Y._didMount());const Q=g=>{m=g??null,g&&(Y._willUpdate(),e.requestUpdate())},le=g=>typeof e.props.displayProp=="function"?e.props.displayProp(g):typeof g=="object"?g[e.props.displayProp]??"":g,ue=()=>{const g=new Map;return(e.props.itemsSource??[]).forEach(O=>g.set(O[c()],O)),g},U=()=>{if(e.props.filterMode==="remote"||!$)return e.props.itemsSource??[];const g=$.toLowerCase();return(e.props.itemsSource??[]).filter(O=>le(O).toLowerCase().indexOf(g)>-1)},z=g=>{if(!$)return[{part:g,highlight:!1}];const O=Sn($),F=new RegExp(`(${O})`,"gi");return g.split(F).map(te=>({part:te,highlight:$.toLowerCase()===te.toLowerCase()}))},W=g=>new Set(r()).has(g[c()]),J=g=>D.some(O=>it(O.item,g)),ne=()=>{const g=r(),O=U();if(g.length<O.length||g.length===0||O.length===0)return!1;const F=new Set(g);return O.every(te=>F.has(te[c()]))},X=()=>new Set(U().map(g=>g[c()])),B=()=>new Set(r()),se=()=>{const g=X(),O=B();return!g.size||!O.size||O.size<g.size?!1:Array.from(g).every(F=>O.has(F))},K=()=>E.save||E.blur||E.change,k=()=>{const g=[];return e.props.required&&g.push({message:e.locale.MultiSelect.required.replace("{label}",e.props.label||""),type:"save",validator:O=>!!O.length}),[...g,...e.props.rules??[]]},S=async(g,O)=>{const F=k();if(F.length<=0)return;if(e.props.disabled)return!0;E[O]="",e.requestUpdate();const te=F.filter(oe=>oe.type===O);for(const oe of te)if(!await oe.validator(g))return E[O]=oe.message,e.requestUpdate(),!1;return!0},x=async(g="save")=>K()!==""?!1:await S(r(),g)??!0,P={validate:x,initValidator:()=>{E.change="",E.blur="",E.save="",e.requestUpdate()}};e.validator&&(e.validator.addValidator(P),e.onCleanup(()=>{var g;return(g=e.validator)==null?void 0:g.removeValidator(P)}));const A=g=>{if(e.props.disabled||e.props.readonly||e.props.loading)return;const O=ue(),F=new Set;r().forEach(oe=>{const pe=O.get(oe);(pe==null?void 0:pe[l()])===!0&&F.add(oe)}),g.forEach(oe=>{const pe=O.get(oe);(pe&&pe[l()]!==!0||!pe&&e.props.preserveMissingValues)&&F.add(oe)});const te=Array.from(F);it(r(),te)||(p(te),e.emit("change",te,te.map(oe=>O.get(oe)).filter(Boolean)),S(te,"change"))},f=(g,O)=>g.filter(F=>W(F)!==O).map(F=>F[c()]),q=(g,O,F)=>{if(F.shiftKey&&D.length>0){const te=D[0],oe=Math.min(te.index,O),pe=Math.max(te.index,O);D=U().slice(oe,pe+1).map((ge,$e)=>({item:ge,index:oe+$e}))}else F.ctrlKey?D.push({item:g,index:O}):D=[{item:g,index:O}];return D.length},N=(g=!0)=>{const O=D.map(oe=>oe.item),F=f(O,g);let te=r();g?te=[...te,...F]:te=te.filter(oe=>!F.some(pe=>oe===pe)),A(te)},j=(g,O,F)=>{if(g[l()]===!0)return;const te=D.some(pe=>pe.item[c()]===g[c()]);(D.length<=1||!te)&&q(g,O,{shiftKey:!1,ctrlKey:!1});const oe=r().some(pe=>pe===g[c()]);N(!oe),F.stopPropagation()},be=(g,O,F)=>{g[l()]!==!0&&(!F.ctrlKey&&!F.shiftKey&&D.length<=1&&j(g,O,F),q(g,O,F),e.requestUpdate())},Ve=(g,O,F)=>{if(g[l()]===!0)return;const te=r(),oe=B().size!==0&&te.every(pe=>pe===g[c()]);A(oe?[]:[g[c()]]),q(g,O,F),F.stopPropagation()},Ne=g=>{g.stopPropagation();const O=X().size===B().size&&[...X()].every(F=>B().has(F));if(ne()&&O){const F=new Set((e.props.itemsSource??[]).filter(te=>te[l()]===!0).map(te=>te[c()]));A(Array.from(F))}else{const F=new Set(U().filter(te=>te[l()]!==!0).map(te=>te[c()]));A(Array.from(F))}},Oe=g=>{if(g.stopPropagation(),se()){const O=X();A(r().filter(F=>!O.has(F)))}else{const O=new Set([...r(),...X()]);A(Array.from(O))}},d=g=>{R=g.target.scrollTop>0,e.requestUpdate()},T=()=>{const g=r();if(!(g!=null&&g.length))return"";const O=ue(),F=g.map(oe=>O.get(oe)).filter(Boolean).map(oe=>typeof e.props.displayProp=="function"?e.props.displayProp(oe):oe[e.props.displayProp]||""),te=e.props.itemsSource??[];return F.length===te.length&&F.length>2?`${e.props.headerFormat.replace(/\{count(:.*?)?}/g,"ALL")}`:F.length>1?e.props.headerFormat.replace(/\{count(:.*?)?}/g,`${F.length.toLocaleString()}`):F.join(", ")||""},Z=(g,O,F=10)=>{const te=window.innerHeight||document.documentElement.clientHeight,oe=window.innerWidth||document.documentElement.clientWidth,pe=g.getBoundingClientRect(),ge=O.getBoundingClientRect(),$e=pe.bottom+ge.height+F>te;if(!$e)return!1;const Le=pe.top-ge.height-F<0,We=pe.right+ge.width+F>oe,et=pe.left-ge.width-F<0;return $e&&!Le||We&&!et},ie=()=>{const g=s.value;if(!g)return;const O=g.getBoundingClientRect();let F=`${O.width}px`;e.props.listBoxWidth&&(F=typeof e.props.listBoxWidth=="number"?`${e.props.listBoxWidth}px`:e.props.listBoxWidth),y={width:String(F),left:`${O.left}px`,top:`${O.top+(C?0:O.height)}px`},e.requestUpdate()},de=g=>{var O;(O=n.value)!=null&&O.contains(g.target)||I(!1)},Se=g=>{var O,F;!((O=t.value)!=null&&O.contains(g.target))&&!((F=n.value)!=null&&F.contains(g.target))&&(I(!1),document.removeEventListener("click",Se,{capture:!0}))},ye=g=>{var F;`${g.ctrlKey?"ctrl+":""}${g.altKey?"alt+":""}${g.key.toLowerCase()}`==="escape"&&(I(!1),(F=i.value)==null||F.focus())};e.onCleanup(()=>{document.body.removeEventListener("scroll",de,{capture:!0}),document.removeEventListener("click",Se,{capture:!0}),window.removeEventListener("keydown",ye)});let b=null;const I=g=>{if(u===g)return;const O=u;if(u=g,e.requestUpdate(),g)b=ft(),document.body.addEventListener("scroll",de,{capture:!0}),document.addEventListener("click",Se,{capture:!0}),E.save="",window.addEventListener("keydown",ye),ie(),queueMicrotask(()=>{var F;s.value&&m&&(C=Z(s.value,m)),ie(),Y.measure(),m&&(m.scrollTop=0),a.value?a.value.focus():(F=i.value)==null||F.focus()});else if(b==null||b.release(),b=null,$="",a.value&&(a.value.value=""),document.body.removeEventListener("scroll",de,{capture:!0}),document.removeEventListener("click",Se,{capture:!0}),S(r(),"blur"),window.removeEventListener("keydown",ye),O&&!g){const F=r();if(e.props.selectAllWhenEmpty&&(!F||F.length===0)){const te=(e.props.itemsSource??[]).filter(oe=>oe[l()]!==!0).map(oe=>oe[c()]);te.length>0&&(p(te),e.emit("change",te,(e.props.itemsSource??[]).filter(oe=>te.includes(oe[c()]))))}e.emit("close")}},Ce=g=>{var O;if(u){g.stopPropagation(),g.preventDefault();const F=(O=n.value)==null?void 0:O.querySelector("input:first-child, button:first-child");F==null||F.focus()}},ke=g=>{var oe,pe,ge;const O=((oe=n.value)==null?void 0:oe.querySelectorAll("input, button"))??[],F=O[0],te=O[O.length-1];(g.target===F||g.target===te)&&i.value&&(g.target===F&&g.shiftKey?(g.stopPropagation(),g.preventDefault(),(pe=i.value)==null||pe.focus()):g.target===te&&!g.shiftKey&&(g.stopPropagation(),g.preventDefault(),(ge=i.value)==null||ge.focus()))},Ee=g=>{g.key==="Tab"&&Ce(g)},xe=g=>{!e.props.inline&&g.key==="Tab"&&ke(g)},De=g=>{!u&&!e.props.inline||($=g.target.value,D=[],e.emit("update:filterValue",$),e.requestUpdate(),queueMicrotask(()=>{Y.setOptions({...Y.options,count:U().length}),Y.measure(),m&&(m.scrollTop=0)}))},Ue=()=>{var g;e.props.disabled||(I(!u),(g=i.value)==null||g.focus())},Qe=(g,O)=>{var F,te;if(g.key==="Enter"||g.key===" "){g.preventDefault(),g.stopPropagation(),O();return}if(g.key==="ArrowDown"||g.key==="ArrowUp"){g.preventDefault(),g.stopPropagation();const oe=Array.from(((F=n.value)==null?void 0:F.querySelectorAll('[tabindex="0"]'))??[]),pe=oe.indexOf(g.currentTarget),ge=oe[pe+(g.key==="ArrowDown"?1:-1)];ge==null||ge.focus();return}g.key==="Escape"&&!e.props.inline&&(g.preventDefault(),g.stopPropagation(),I(!1),(te=i.value)==null||te.focus())},ot=(g,O)=>{be(g,O,{ctrlKey:!1,shiftKey:!1,stopPropagation(){}})},Je=(g,O)=>{if(D=[],e.props.preserveMissingValues||JSON.stringify(g)===JSON.stringify(O))return;const F=new Set(g.map(oe=>oe[c()])),te=r();if(e.props.autoSelectNewItems&&O){const oe=new Set(O.map(ge=>ge[c()])),pe=g.filter(ge=>!oe.has(ge[c()])).map(ge=>ge[c()]);if(pe.length>0){const ge=te.filter($e=>F.has($e));p([...new Set([...ge,...pe])])}else p(te.filter(ge=>F.has(ge)))}else{const oe=te.filter(pe=>F.has(pe));if(it(te,oe))return;p(oe)}},Ze=()=>{const g=e.props,O=c(),F=g.loading?[]:U();Y.options.count!==F.length&&Y.setOptions({...Y.options,count:F.length}),Y._willUpdate();const te=new Set(r()),oe=xt(Y.getVirtualItems(),F.length,G,m).map($e=>{if($e.index>=F.length)return null;const Le=F[$e.index];return Le?{index:$e.index,value:Le,size:$e.size,start:$e.start,isSelected:te.has(Le[O]),isDisabled:!!g.disabled||!!g.readonly||Le[l()]===!0,isFocused:J(Le)}:null}).filter($e=>$e!==null),pe=Y.getTotalSize(),ge=$?e.locale.MultiSelect.selectFiltered:e.locale.MultiSelect.selectAll;return o.html`<div
|
|
1008
|
-
class=${L("list-box",{"no-label":!g.label,"show-top":C,"moz-multiselect-inline-list":!!g.inline},g.class)}
|
|
1008
|
+
class=${L("list-box moz-multi-select-list",{"no-label":!g.label,"show-top":C,"moz-multiselect-inline-list":!!g.inline},g.class)}
|
|
1009
1009
|
style=${ee.styleMap(g.inline?{"--moz-multiselect-list-height":`${g.listBoxHeight??224}px`}:y)}
|
|
1010
1010
|
@keydown=${xe}
|
|
1011
1011
|
${_.ref(n)}
|
|
@@ -1289,7 +1289,7 @@
|
|
|
1289
1289
|
</div>
|
|
1290
1290
|
</div>
|
|
1291
1291
|
</div>
|
|
1292
|
-
`},renderPortal(){if(!a)return o.nothing;const f=e.props;return o.html`<div class="absolute z-1501" style=${ee.styleMap(h)}>
|
|
1292
|
+
`},renderPortal(){if(!a)return o.nothing;const f=e.props;return o.html`<div class="absolute z-1501 moz-tag-input-float" style=${ee.styleMap(h)}>
|
|
1293
1293
|
<div
|
|
1294
1294
|
class="tag-input-placeholder-float tag-input-not-close scrollbar-none shown"
|
|
1295
1295
|
@mousedown=${q=>{q.stopPropagation(),J()}}
|
|
@@ -1436,7 +1436,7 @@
|
|
|
1436
1436
|
${ne()!==""?o.html`<span class="moz-input-invalid-message">${ne()}</span>`:o.nothing}
|
|
1437
1437
|
</div>
|
|
1438
1438
|
`},renderPortal(){if(!p)return o.nothing;const d=e.props,T=y(),Z=z(),ie=!!d.columnHeaders&&d.columnHeaders.length>0;D.options.count!==Z.length&&D.setOptions({...D.options,count:Z.length}),D._willUpdate();const de=D.getTotalSize(),Se=xt(D.getVirtualItems(),Z.length,dt,c).map(b=>{if(b.index>=Z.length)return null;const I=Z[b.index];return I?{index:b.index,value:I,start:b.start}:null}).filter(b=>b!==null),ye=d.listWidth?typeof d.listWidth=="number"?`${d.listWidth}px`:d.listWidth:void 0;return o.html`<div
|
|
1439
|
-
class=${L("table-list-box",{"no-label":!d.label},d.class)}
|
|
1439
|
+
class=${L("table-list-box moz-table-select-list",{"no-label":!d.label},d.class)}
|
|
1440
1440
|
style=${ee.styleMap({width:ye})}
|
|
1441
1441
|
@keydown=${Ne}
|
|
1442
1442
|
${_.ref(n)}
|
|
@@ -1582,7 +1582,7 @@
|
|
|
1582
1582
|
${Z()!==""?o.html`<span class="moz-input-invalid-message">${Z()}</span>`:o.nothing}
|
|
1583
1583
|
</div>
|
|
1584
1584
|
`},renderPortal(){if(!C)return o.nothing;const w=e.props,M=A();Re.options.count!==M.length&&Re.setOptions({...Re.options,count:M.length}),Re._willUpdate();const H=Re.getTotalSize(),ae=P(),re=xt(Re.getVirtualItems(),M.length,z,m).map(He=>{if(He.index>=M.length)return null;const qe=M[He.index];if(!qe)return null;let _e=be(qe,ae),je=!1;if(h()&&!Ke(c,qe.depth)){const nt=St(X,qe);if(nt.length>0){const vt=nt.reduce((At,Vt)=>At+(ae.has(Vt.code)?1:0),0);vt===0?_e=!1:vt<nt.length?(_e=!0,je=!0):_e=!0}}return{index:He.index,item:qe,start:He.start,isSelected:_e,isIndeterminate:je,isDisabled:qe[r()]===!0,isFocused:x(qe)}}).filter(He=>He!==null),he=y?e.locale.TreeSelect.selectFiltered:e.locale.TreeSelect.selectAll,fe=v(),ze=Array.isArray(fe)?fe.length:fe?1:0;return o.html`<div
|
|
1585
|
-
class=${L("list-box",{"no-label":!w.label,"show-top":E},w.class)}
|
|
1585
|
+
class=${L("list-box moz-tree-select-list",{"no-label":!w.label,"show-top":E},w.class)}
|
|
1586
1586
|
style=${ee.styleMap(G)}
|
|
1587
1587
|
${_.ref(n)}
|
|
1588
1588
|
>
|