@everchron/ec-shards 4.1.2 → 4.3.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.
- package/dist/ec-shards.common.js +2863 -1674
- package/dist/ec-shards.common.js.map +1 -1
- package/dist/ec-shards.css +1 -1
- package/dist/ec-shards.umd.js +2863 -1674
- package/dist/ec-shards.umd.js.map +1 -1
- package/dist/ec-shards.umd.min.js +2 -2
- package/dist/ec-shards.umd.min.js.map +1 -1
- package/dist/img/EU.d180ac2d.svg +1 -0
- package/dist/img/login-email-mfa.33936706.svg +1 -0
- package/dist/img/login-email.4b81db3a.svg +1 -0
- package/dist/img/login-sso-azure.a49f3fe4.svg +1 -0
- package/dist/img/login-sso-okta.55de1bbd.svg +1 -0
- package/package.json +4 -2
- package/src/assets/icons/login-key.svg +7 -0
- package/src/assets/images/fill-icons/login-email-mfa.svg +1 -0
- package/src/assets/images/fill-icons/login-email.svg +1 -0
- package/src/assets/images/fill-icons/login-sso-azure.svg +1 -0
- package/src/assets/images/fill-icons/login-sso-okta.svg +1 -0
- package/src/assets/images/flags/EU.svg +1 -0
- package/src/components/alert/alert.vue +2 -2
- package/src/components/breadcrumb-button/breadcrumb-button.vue +2 -2
- package/src/components/button/button.vue +2 -2
- package/src/components/button-context/button-context.vue +1 -1
- package/src/components/button-more/button-more.vue +1 -1
- package/src/components/button-table/button-table.vue +1 -1
- package/src/components/button-toolbar/button-toolbar.vue +4 -4
- package/src/components/button-toolbar-icon/button-toolbar-icon.vue +1 -1
- package/src/components/collection-control/collection-control.vue +1 -1
- package/src/components/context-menu/context-menu.vue +215 -0
- package/src/components/data-card/data-card.vue +1 -1
- package/src/components/data-grid/data-grid-cell.vue +27 -7
- package/src/components/data-grid/data-grid-head-cell.vue +108 -4
- package/src/components/data-grid/data-grid-row.vue +25 -1
- package/src/components/dialog/dialog.vue +24 -46
- package/src/components/document-state/document-state.vue +1 -1
- package/src/components/empty-state/empty-state.vue +1 -1
- package/src/components/excerpt-snippet/excerpt-snippet.vue +1 -1
- package/src/components/fill-icon/fill-icon.vue +59 -0
- package/src/components/flag/flag.vue +5 -0
- package/src/components/formatted/formatted.vue +4 -15
- package/src/components/index.js +4 -0
- package/src/components/info-tooltip/info-tooltip.vue +1 -1
- package/src/components/input/input.vue +6 -4
- package/src/components/input-addon/input-addon.vue +1 -1
- package/src/components/input-clear/input-clear.vue +1 -1
- package/src/components/input-search/input-search.vue +1 -1
- package/src/components/multiselect-option/multiselect-option.vue +1 -1
- package/src/components/multiselect-search-token/multiselect-search-token.vue +2 -2
- package/src/components/multiselect-token/multiselect-token.vue +1 -1
- package/src/components/overlay/overlay.vue +1 -1
- package/src/components/pagination/pagination.vue +138 -105
- package/src/components/party-entry/party-entry.vue +2 -2
- package/src/components/popover-header/popover-header.vue +1 -1
- package/src/components/segment/segment.vue +1 -1
- package/src/components/select/select.vue +24 -3
- package/src/components/separator/separator.vue +93 -0
- package/src/components/sequence-map-button/sequence-map-button.vue +1 -1
- package/src/components/tab-button/tab-button.vue +16 -5
- package/src/components/transcript-state/transcript-state.vue +1 -1
- package/src/components/tree-list-item/tree-list-item.vue +1 -1
- package/src/stories/Changelog.stories.mdx +36 -0
- package/src/stories/context-menu/context-menu.stories.js +69 -0
- package/src/stories/data-grid/data-grid.stories.js +12 -6
- package/src/stories/fill-icon/fill-icon.stories.js +24 -0
- package/src/stories/flag/flag.stories.js +6 -1
- package/src/stories/input/input.stories.js +5 -4
- package/src/stories/pagination/pagination.stories.js +0 -15
- package/src/stories/select/select.stories.js +16 -0
- package/src/stories/separator/.DS_Store +0 -0
- package/src/stories/separator/separator.stories.js +33 -0
- package/src/components/tiptap/tiptap.vue +0 -246
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="15" viewBox="0 0 20 15" width="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h20v15h-20z"/></clipPath><mask id="b" height="15" maskUnits="userSpaceOnUse" width="20" x="0" y="0"><path d="m20 0h-20v15h20z" fill="#fff"/></mask><mask id="c" height="15" maskUnits="userSpaceOnUse" width="20" x="0" y="0"><path clip-rule="evenodd" d="m0 0v15h20v-15z" fill="#fff" fill-rule="evenodd"/></mask><g clip-path="url(#a)"><g clip-rule="evenodd" fill-rule="evenodd" mask="url(#b)"><path d="m0 0v15h20v-15z" fill="#f7fcff"/><g mask="url(#c)"><path d="m0 0v15h20v-15z" fill="#3d58db"/><path d="m9.26516 3.02849.73474-.38628.7347.38628-.1403-.81814.5944-.63909h-.8214l-.3674-.804048-.36737.804048h-.82146l.59441.63909zm0 10.85551.73474-.3863.7347.3863-.1403-.8181.5944-.6391h-.8214l-.3674-.804-.36737.804h-.82146l.59441.6391zm-5.78226-5.37274.14031-.81814-.5944-.63908h.82145l.36736-.80405.36738.80405h.82145l-.59442.63908.14033.81814-.73474-.38627zm1.35153 1.77004-.14032.8181.73474-.3862.73472.3862-.14031-.8181.59441-.63909h-.82146l-.36736-.80404-.36737.80404h-.82146zm9.74357.4319-.7347.3862.1402-.8181-.5944-.63909h.8215l.3674-.80404.3674.80404h.8214l-.5944.63909.1402.8181zm-9.74357-5.6756-.14032.81814.73474-.38628.73472.38628-.14031-.81814.59441-.63909h-.82146l-.36736-.80405-.36737.80405h-.82146zm9.74357.43186-.7347.38628.1402-.81814-.5944-.63909h.8215l.3674-.80405.3674.80405h.8214l-.5944.63909.1402.81814zm-7.918 6.89424-.14033.8182.73473-.3864.73473.3864-.14032-.8182.59441-.6391h-.82145l-.36737-.804-.36737.804h-.82145zm5.4173.8182.1403-.8182-.5944-.6391h.8215l.3673-.804.3674.804h.8215l-.5945.6391.1404.8182-.7348-.3864zm-5.4173-10.25995-.14033.81814.73473-.38628.73473.38628-.14032-.81814.59441-.63909h-.82145l-.36737-.80405-.36737.80405h-.82145zm5.4173.81814.1403-.81814-.5944-.63909h.8215l.3673-.80405.3674.80405h.8215l-.5945.63909.1404.81814-.7348-.38628zm3.0627 3.87915-.1404.81812.7348-.38626.7347.38626-.1403-.81812.5943-.6391h-.8213l-.3674-.80404-.3674.80404h-.8215z" fill="#ffd018"/></g></g></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="20" viewBox="0 0 23 20" width="23" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m1 3h14v14h-14z"/></clipPath><rect fill="#a1a6b0" height="16" rx="6" width="16" y="2"/><g clip-path="url(#a)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10.1875 9.63542v1.67708c0 .3481.1383.6819.3844.9281.2462.2461.58.3844.9281.3844h.4375c.3481 0 .6819-.1383.9281-.3844.2461-.2462.3844-.58.3844-.9281v-2.1875c0-1.16032-.4609-2.27312-1.2814-3.09359s-1.9333-1.28141-3.0936-1.28141h-1.75c-1.16032 0-2.27312.46094-3.09359 1.28141s-1.28141 1.93327-1.28141 3.09359v1.75c0 1.1603.46094 2.2731 1.28141 3.0936s1.93327 1.2814 3.09359 1.2814h3.2083"/><path d="m8.36458 7.8125h-.72916c-1.00677 0-1.82292.81615-1.82292 1.82292v.72918c0 1.0068.81615 1.8229 1.82292 1.8229h.72916c1.00677 0 1.82292-.8161 1.82292-1.8229v-.72918c0-1.00677-.81615-1.82292-1.82292-1.82292z"/></g><rect fill="#0eba65" height="8" rx="2" width="12" x="11"/><path d="m15 9.5h-2c-1.933 0-3.5-1.567-3.5-3.5v-3l1.5 1v2c0 1.10457.8954 2 2 2h2z" fill="#a1a6b0"/><g stroke="#fff" stroke-linecap="round" stroke-linejoin="round"><path d="m14.7089 5.48572c.8435 0 1.5273-.71634 1.5273-1.6 0-.88365-.6838-1.6-1.5273-1.6s-1.5273.71635-1.5273 1.6c0 .88366.6838 1.6 1.5273 1.6z"/><path d="m20.8181 3.88571h-4.5818"/><path d="m20.8181 5.48571v-1.6"/><path d="m18.5273 5.48571v-1.6"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="20" viewBox="0 0 16 20" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m1 3h14v14h-14z"/></clipPath><rect fill="#a1a6b0" height="16" rx="6" width="16" y="2"/><g clip-path="url(#a)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10.1875 9.63542v1.67708c0 .3481.1383.6819.3844.9281.2462.2461.58.3844.9281.3844h.4375c.3481 0 .6819-.1383.9281-.3844.2461-.2462.3844-.58.3844-.9281v-2.1875c0-1.16032-.4609-2.27312-1.2814-3.09359s-1.9333-1.28141-3.0936-1.28141h-1.75c-1.16032 0-2.27312.46094-3.09359 1.28141s-1.28141 1.93327-1.28141 3.09359v1.75c0 1.1603.46094 2.2731 1.28141 3.0936s1.93327 1.2814 3.09359 1.2814h3.2083"/><path d="m8.36458 7.8125h-.72916c-1.00677 0-1.82292.81615-1.82292 1.82292v.72918c0 1.0068.81615 1.8229 1.82292 1.8229h.72916c1.00677 0 1.82292-.8161 1.82292-1.8229v-.72918c0-1.00677-.81615-1.82292-1.82292-1.82292z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="20" viewBox="0 0 15 20" width="15" xmlns="http://www.w3.org/2000/svg"><path d="m7 2.5h-7v7h7z" fill="#f25022"/><path d="m7 10.5h-7v7h7z" fill="#00a4ef"/><path d="m15 2.5h-7v7h7z" fill="#7fba00"/><path d="m15 10.5h-7v7h7z" fill="#ffb900"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="20" viewBox="0 0 16 20" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="10" r="6" stroke="#357bbb" stroke-width="4"/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everchron/ec-shards",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Everchron Shards UI Library",
|
|
6
6
|
"repository": "https://github.com/everchron/ec-shards.git",
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
"*.js",
|
|
25
25
|
"*.svg"
|
|
26
26
|
],
|
|
27
|
-
"dependencies": {
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"v-click-outside": "^2.1.3"
|
|
29
|
+
},
|
|
28
30
|
"peerDependencies": {
|
|
29
31
|
"vue": "2.x.x"
|
|
30
32
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path vector-effect="non-scaling-stroke" d="M6.27057 9.16667C7.52203 7.29365 9.34268 5.87275 11.4636 5.11383C13.5846 4.35492 15.8934 4.29821 18.049 4.9521C20.2046 5.60599 22.0929 6.93579 23.4348 8.74512C24.7767 10.5544 25.5011 12.7474 25.5011 15C25.5011 17.2526 24.7767 19.4456 23.4348 21.2549C22.0929 23.0642 20.2046 24.394 18.049 25.0479C15.8934 25.7018 13.5846 25.6451 11.4636 24.8862C9.34268 24.1272 7.52203 22.7064 6.27057 20.8333" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path vector-effect="non-scaling-stroke" d="M6.83333 17.3333C8.122 17.3333 9.16667 16.2886 9.16667 15C9.16667 13.7113 8.122 12.6666 6.83333 12.6666C5.54467 12.6666 4.5 13.7113 4.5 15C4.5 16.2886 5.54467 17.3333 6.83333 17.3333Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path vector-effect="non-scaling-stroke" d="M16.1667 15H9.16669" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path vector-effect="non-scaling-stroke" d="M16.1667 17.3333V15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path vector-effect="non-scaling-stroke" d="M12.6667 17.3333V15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="20" viewBox="0 0 23 20" width="23" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m1 3h14v14h-14z"/></clipPath><rect fill="#a1a6b0" height="16" rx="6" width="16" y="2"/><g clip-path="url(#a)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10.1875 9.63542v1.67708c0 .3481.1383.6819.3844.9281.2462.2461.58.3844.9281.3844h.4375c.3481 0 .6819-.1383.9281-.3844.2461-.2462.3844-.58.3844-.9281v-2.1875c0-1.16032-.4609-2.27312-1.2814-3.09359s-1.9333-1.28141-3.0936-1.28141h-1.75c-1.16032 0-2.27312.46094-3.09359 1.28141s-1.28141 1.93327-1.28141 3.09359v1.75c0 1.1603.46094 2.2731 1.28141 3.0936s1.93327 1.2814 3.09359 1.2814h3.2083"/><path d="m8.36458 7.8125h-.72916c-1.00677 0-1.82292.81615-1.82292 1.82292v.72918c0 1.0068.81615 1.8229 1.82292 1.8229h.72916c1.00677 0 1.82292-.8161 1.82292-1.8229v-.72918c0-1.00677-.81615-1.82292-1.82292-1.82292z"/></g><rect fill="#0eba65" height="8" rx="2" width="12" x="11"/><path d="m15 9.5h-2c-1.933 0-3.5-1.567-3.5-3.5v-3l1.5 1v2c0 1.10457.8954 2 2 2h2z" fill="#a1a6b0"/><g stroke="#fff" stroke-linecap="round" stroke-linejoin="round"><path d="m14.7089 5.48572c.8435 0 1.5273-.71634 1.5273-1.6 0-.88365-.6838-1.6-1.5273-1.6s-1.5273.71635-1.5273 1.6c0 .88366.6838 1.6 1.5273 1.6z"/><path d="m20.8181 3.88571h-4.5818"/><path d="m20.8181 5.48571v-1.6"/><path d="m18.5273 5.48571v-1.6"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="20" viewBox="0 0 16 20" width="16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m1 3h14v14h-14z"/></clipPath><rect fill="#a1a6b0" height="16" rx="6" width="16" y="2"/><g clip-path="url(#a)" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10.1875 9.63542v1.67708c0 .3481.1383.6819.3844.9281.2462.2461.58.3844.9281.3844h.4375c.3481 0 .6819-.1383.9281-.3844.2461-.2462.3844-.58.3844-.9281v-2.1875c0-1.16032-.4609-2.27312-1.2814-3.09359s-1.9333-1.28141-3.0936-1.28141h-1.75c-1.16032 0-2.27312.46094-3.09359 1.28141s-1.28141 1.93327-1.28141 3.09359v1.75c0 1.1603.46094 2.2731 1.28141 3.0936s1.93327 1.2814 3.09359 1.2814h3.2083"/><path d="m8.36458 7.8125h-.72916c-1.00677 0-1.82292.81615-1.82292 1.82292v.72918c0 1.0068.81615 1.8229 1.82292 1.8229h.72916c1.00677 0 1.82292-.8161 1.82292-1.8229v-.72918c0-1.00677-.81615-1.82292-1.82292-1.82292z"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="20" viewBox="0 0 15 20" width="15" xmlns="http://www.w3.org/2000/svg"><path d="m7 2.5h-7v7h7z" fill="#f25022"/><path d="m7 10.5h-7v7h7z" fill="#00a4ef"/><path d="m15 2.5h-7v7h7z" fill="#7fba00"/><path d="m15 10.5h-7v7h7z" fill="#ffb900"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="20" viewBox="0 0 16 20" width="16" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="10" r="6" stroke="#357bbb" stroke-width="4"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" height="15" viewBox="0 0 20 15" width="20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="a"><path d="m0 0h20v15h-20z"/></clipPath><mask id="b" height="15" maskUnits="userSpaceOnUse" width="20" x="0" y="0"><path d="m20 0h-20v15h20z" fill="#fff"/></mask><mask id="c" height="15" maskUnits="userSpaceOnUse" width="20" x="0" y="0"><path clip-rule="evenodd" d="m0 0v15h20v-15z" fill="#fff" fill-rule="evenodd"/></mask><g clip-path="url(#a)"><g clip-rule="evenodd" fill-rule="evenodd" mask="url(#b)"><path d="m0 0v15h20v-15z" fill="#f7fcff"/><g mask="url(#c)"><path d="m0 0v15h20v-15z" fill="#3d58db"/><path d="m9.26516 3.02849.73474-.38628.7347.38628-.1403-.81814.5944-.63909h-.8214l-.3674-.804048-.36737.804048h-.82146l.59441.63909zm0 10.85551.73474-.3863.7347.3863-.1403-.8181.5944-.6391h-.8214l-.3674-.804-.36737.804h-.82146l.59441.6391zm-5.78226-5.37274.14031-.81814-.5944-.63908h.82145l.36736-.80405.36738.80405h.82145l-.59442.63908.14033.81814-.73474-.38627zm1.35153 1.77004-.14032.8181.73474-.3862.73472.3862-.14031-.8181.59441-.63909h-.82146l-.36736-.80404-.36737.80404h-.82146zm9.74357.4319-.7347.3862.1402-.8181-.5944-.63909h.8215l.3674-.80404.3674.80404h.8214l-.5944.63909.1402.8181zm-9.74357-5.6756-.14032.81814.73474-.38628.73472.38628-.14031-.81814.59441-.63909h-.82146l-.36736-.80405-.36737.80405h-.82146zm9.74357.43186-.7347.38628.1402-.81814-.5944-.63909h.8215l.3674-.80405.3674.80405h.8214l-.5944.63909.1402.81814zm-7.918 6.89424-.14033.8182.73473-.3864.73473.3864-.14032-.8182.59441-.6391h-.82145l-.36737-.804-.36737.804h-.82145zm5.4173.8182.1403-.8182-.5944-.6391h.8215l.3673-.804.3674.804h.8215l-.5945.6391.1404.8182-.7348-.3864zm-5.4173-10.25995-.14033.81814.73473-.38628.73473.38628-.14032-.81814.59441-.63909h-.82145l-.36737-.80405-.36737.80405h-.82145zm5.4173.81814.1403-.81814-.5944-.63909h.8215l.3673-.80405.3674.80405h.8215l-.5945.63909.1404.81814-.7348-.38628zm3.0627 3.87915-.1404.81812.7348-.38626.7347.38626-.1403-.81812.5943-.6391h-.8213l-.3674-.80404-.3674.80404h-.8215z" fill="#ffd018"/></g></g></g></svg>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="show" class="ecs-alert" :class="[typeClass, dismissable ? 'ecs-alert-dismissable' : '', inset ? 'ecs-alert-inset' : '']">
|
|
3
3
|
<button v-if="dismissable" @click="dismiss" class="close">
|
|
4
|
-
<ecs-icon type="close"
|
|
4
|
+
<ecs-icon type="close" size="20" />
|
|
5
5
|
</button>
|
|
6
6
|
<div class="ecs-alert-inner">
|
|
7
7
|
<h4 v-if="headline" class="ecs-alert-headline">
|
|
8
|
-
<ecs-icon v-if="icon" :type="icon"
|
|
8
|
+
<ecs-icon v-if="icon" :type="icon" size="20" />
|
|
9
9
|
{{ headline }}
|
|
10
10
|
</h4>
|
|
11
11
|
<div v-if="$slots.default" class="ecs-alert-content">
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
typeClass
|
|
8
8
|
]"
|
|
9
9
|
>
|
|
10
|
-
<ecs-icon v-if="icon" :type="icon"
|
|
11
|
-
<ecs-icon v-if="type == 'more'" type="more"
|
|
10
|
+
<ecs-icon v-if="icon" :type="icon" size="20" />
|
|
11
|
+
<ecs-icon v-if="type == 'more'" type="more" size="20" />
|
|
12
12
|
<span v-if="type != 'more'">
|
|
13
13
|
<slot></slot>
|
|
14
14
|
</span>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
@mouseover="$emit('mouseover', $event)"
|
|
14
14
|
@mouseleave="$emit('mouseleave', $event)">
|
|
15
15
|
|
|
16
|
-
<ecs-icon v-if="icon || loading" :type="iconType" :
|
|
16
|
+
<ecs-icon v-if="icon || loading" :type="iconType" :size="iconSize" />
|
|
17
17
|
<slot></slot>
|
|
18
18
|
</a>
|
|
19
19
|
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
@mouseover="$emit('mouseover', $event)"
|
|
32
32
|
@mouseleave="$emit('mouseleave', $event)">
|
|
33
33
|
|
|
34
|
-
<ecs-icon v-if="icon || loading" :type="iconType" :
|
|
34
|
+
<ecs-icon v-if="icon || loading" :type="iconType" :size="iconSize" />
|
|
35
35
|
<slot></slot>
|
|
36
36
|
</button>
|
|
37
37
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
:style="selectedColorText"
|
|
6
6
|
@click="$emit('click', $event)">
|
|
7
7
|
|
|
8
|
-
<ecs-icon v-if="icon || loading" :type="iconType"
|
|
8
|
+
<ecs-icon v-if="icon || loading" :type="iconType" size="20" />
|
|
9
9
|
<div v-if="selectedColor" class="ecs-context-button-color" :style="selectedColorBackground" />
|
|
10
10
|
<slot></slot>
|
|
11
11
|
</button>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@mouseover="$emit('mouseover', $event)"
|
|
16
16
|
@mouseleave="$emit('mouseleave', $event)">
|
|
17
17
|
|
|
18
|
-
<ecs-icon v-if="icon || loading" :type="iconType" :
|
|
18
|
+
<ecs-icon v-if="icon || loading" :type="iconType" :size="iconSize" />
|
|
19
19
|
<div v-if="label != null" class="button-label">{{ label }}</div>
|
|
20
20
|
<div v-if="chevron" class="chevron" :class="active ? 'expand' : ''" />
|
|
21
21
|
</button>
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
dropdownClass]"
|
|
10
10
|
@click="$emit('click', $event)">
|
|
11
11
|
|
|
12
|
-
<ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :
|
|
12
|
+
<ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :size="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
|
|
13
13
|
<slot></slot>
|
|
14
14
|
<span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
|
|
15
|
-
<ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :
|
|
15
|
+
<ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :size="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
|
|
16
16
|
</a>
|
|
17
17
|
|
|
18
18
|
<button v-else class="ecs-toolbar-button"
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
dropdownClass]"
|
|
26
26
|
@click="$emit('click', $event)">
|
|
27
27
|
|
|
28
|
-
<ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :
|
|
28
|
+
<ecs-icon v-if="(icon && iconPosition == 'left') || (loading && iconPosition == 'left')" :size="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
|
|
29
29
|
<slot></slot>
|
|
30
30
|
<span class="badge" v-if="badge" :style="{ background: badgeColor }"></span>
|
|
31
|
-
<ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :
|
|
31
|
+
<ecs-icon v-if="(icon && iconPosition == 'right') || (loading && iconPosition == 'right')" :size="iconSize" :color="iconTint" :type="iconType" :spinning="loading" />
|
|
32
32
|
</button>
|
|
33
33
|
</template>
|
|
34
34
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
isVisible || nonInteractive ? '' : 'collapsed',
|
|
9
9
|
nonInteractive ? '' : 'interactive',
|
|
10
10
|
]">
|
|
11
|
-
<ecs-icon v-if="icon" :type="icon" color="#858E9E" :
|
|
11
|
+
<ecs-icon v-if="icon" :type="icon" color="#858E9E" :size="iconSize" />
|
|
12
12
|
<div class="description" v-if="label">{{ label }}</div>
|
|
13
13
|
<div class="collection"
|
|
14
14
|
@mouseover="toggleTooltip"
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ecs-context-menu" :class="opened ? ' opened': ''" :id="elementId" :style="[postionStyles]" v-click-outside="onClickOutside">
|
|
3
|
+
<ul>
|
|
4
|
+
<li
|
|
5
|
+
v-for="(option, index) in options"
|
|
6
|
+
:key="index"
|
|
7
|
+
@click.stop="optionClicked(option)"
|
|
8
|
+
:class="[
|
|
9
|
+
option.type === 'divider' ? 'ecs-context-menu-divider' : 'ecs-context-menu-item',
|
|
10
|
+
option.type === 'danger' ? 'danger' : '',
|
|
11
|
+
option.disabled ? 'disabled' : ''
|
|
12
|
+
]"
|
|
13
|
+
>
|
|
14
|
+
<ecs-icon v-if="option.icon" :type="option.icon" size="20" />
|
|
15
|
+
<span v-if="option.type != 'divider'">{{ option.name}}</span>
|
|
16
|
+
</li>
|
|
17
|
+
</ul>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import Vue from "vue";
|
|
23
|
+
import vClickOutside from "v-click-outside"
|
|
24
|
+
Vue.use(vClickOutside)
|
|
25
|
+
import EcsIcon from '../icon/icon'
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
components: { EcsIcon },
|
|
29
|
+
|
|
30
|
+
props: {
|
|
31
|
+
/** Unique String that acts as the id for the menu. */
|
|
32
|
+
elementId: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
/** Array of menu options to show. Component will use the `name` parameter as the label. Array needs to contain objects with the following structure:
|
|
37
|
+
```{
|
|
38
|
+
name: 'Duplicate',
|
|
39
|
+
slug: 'duplicate',
|
|
40
|
+
icon: 'evidence',
|
|
41
|
+
disabled: false,
|
|
42
|
+
type: ''
|
|
43
|
+
}``` */
|
|
44
|
+
options: {
|
|
45
|
+
type: Array,
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
/** If passed, an icon will appear. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
|
|
49
|
+
icon: {
|
|
50
|
+
type: String
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
data() {
|
|
55
|
+
return {
|
|
56
|
+
item: null,
|
|
57
|
+
menuWidth: null,
|
|
58
|
+
menuHeight: null,
|
|
59
|
+
opened: false,
|
|
60
|
+
left: 0,
|
|
61
|
+
top: 0
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
computed: {
|
|
66
|
+
postionStyles(){
|
|
67
|
+
return { left: this.left + 'px', top: this.top + 'px'}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
methods: {
|
|
72
|
+
showMenu(event, item) {
|
|
73
|
+
this.item = item
|
|
74
|
+
|
|
75
|
+
let menu = document.getElementById(this.elementId)
|
|
76
|
+
if (!menu) {
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (!this.menuWidth || !this.menuHeight) {
|
|
81
|
+
menu.style.visibility = "hidden"
|
|
82
|
+
menu.style.display = "block"
|
|
83
|
+
this.menuWidth = menu.offsetWidth
|
|
84
|
+
this.menuHeight = menu.offsetHeight
|
|
85
|
+
menu.removeAttribute("style")
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (this.menuWidth + event.pageX >= window.innerWidth) {
|
|
89
|
+
this.left = event.pageX - this.menuWidth + 2
|
|
90
|
+
} else {
|
|
91
|
+
this.left = event.pageX - 2
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (this.menuHeight + event.pageY >= window.innerHeight) {
|
|
95
|
+
this.top = event.pageY - this.menuHeight + 2
|
|
96
|
+
} else {
|
|
97
|
+
this.top = event.pageY - 2
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
this.opened = true
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
hideContextMenu() {
|
|
104
|
+
const element = document.getElementById(this.elementId)
|
|
105
|
+
if (element) {
|
|
106
|
+
this.opened = false
|
|
107
|
+
/** Emitted when closing the context menu. */
|
|
108
|
+
this.$emit("menu-closed")
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
onClickOutside() {
|
|
113
|
+
this.hideContextMenu()
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
optionClicked(option) {
|
|
117
|
+
this.hideContextMenu()
|
|
118
|
+
|
|
119
|
+
/** When a menu item is clicked, the component will emit an event with a value containing the clicked item and the menu option that was clicked. Register for this event to capture the selection result. */
|
|
120
|
+
this.$emit("option-clicked", {
|
|
121
|
+
item: this.item,
|
|
122
|
+
option: option
|
|
123
|
+
})
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
onEscKeyRelease(event) {
|
|
127
|
+
if (event.keyCode === 27) {
|
|
128
|
+
this.hideContextMenu()
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
mounted() {
|
|
134
|
+
document.body.addEventListener("keyup", this.onEscKeyRelease)
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
beforeDestroy() {
|
|
138
|
+
document.removeEventListener("keyup", this.onEscKeyRelease)
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<style lang="scss" scoped>
|
|
144
|
+
@import "../../tokens/build/scss/tokens.scss";
|
|
145
|
+
@import "../mixins/svg-uri";
|
|
146
|
+
|
|
147
|
+
.ecs-context-menu{
|
|
148
|
+
top: 0;
|
|
149
|
+
left: 0;
|
|
150
|
+
margin: 0;
|
|
151
|
+
padding: 0;
|
|
152
|
+
display: none;
|
|
153
|
+
list-style: none;
|
|
154
|
+
position: absolute;
|
|
155
|
+
z-index: 1000000;
|
|
156
|
+
border-radius: $border-radius-medium;
|
|
157
|
+
background: rgba(255, 255, 255, 0.94);
|
|
158
|
+
box-shadow: 0px 0px 0px 1px rgba(71, 75, 96, 0.05), 0px 2px 8px rgba(71, 75, 96, 0.15);
|
|
159
|
+
backdrop-filter: blur(7px);
|
|
160
|
+
padding: $spacing-5 0;
|
|
161
|
+
|
|
162
|
+
&.opened{
|
|
163
|
+
display: block;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&-item{
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
height: $spacing-40;
|
|
170
|
+
column-gap: $spacing-10;
|
|
171
|
+
padding: 0 $spacing-15;
|
|
172
|
+
font-size: $type-scale-3-font-size;
|
|
173
|
+
line-height: $type-scale-3-line-height;
|
|
174
|
+
color: $color-gray-15;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
|
|
177
|
+
.icon{
|
|
178
|
+
color: $color-gray-8;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&:not(.disabled){
|
|
182
|
+
&.danger:hover{
|
|
183
|
+
background: $color-red-1;
|
|
184
|
+
|
|
185
|
+
.icon{
|
|
186
|
+
color: $color-red-10;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:hover{
|
|
191
|
+
background: $color-blue-1;
|
|
192
|
+
|
|
193
|
+
.icon{
|
|
194
|
+
color: $color-blue-10;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&.disabled{
|
|
200
|
+
cursor: not-allowed;
|
|
201
|
+
color: $color-gray-7;
|
|
202
|
+
|
|
203
|
+
.icon{
|
|
204
|
+
color: $color-gray-5;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&-divider{
|
|
210
|
+
margin: $spacing-5 0;
|
|
211
|
+
height: 1px;
|
|
212
|
+
background: $color-gray-3;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
</style>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<slot name="control"></slot>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
-
<ecs-icon v-if="icon" :type="icon" :color="iconColor" :spinning="spinning"
|
|
18
|
+
<ecs-icon v-if="icon" :type="icon" :color="iconColor" :spinning="spinning" size="26" />
|
|
19
19
|
<ecs-skeleton-loader v-if="icon && loading" type="rect" :width="26" :height="26" />
|
|
20
20
|
|
|
21
21
|
<div class="ecs-data-card-inner">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ecs-data-grid-cell" :style="[fixedStyles]" :class="[fixedLeft ? 'fixed-left' : '', fixedLeftLast ? 'fixed-left-last' : '', fixedRight ? 'fixed-right' : '']">
|
|
3
3
|
<div v-if="fixedRight" class="shadow" :class="fixedRight ? 'left' : ''" />
|
|
4
|
-
<div class="ecs-data-grid-cell-inner" :style="[widthStyles, paddingStyles]" :data-test="computedId">
|
|
4
|
+
<div class="ecs-data-grid-cell-inner" :style="[widthStyles, paddingStyles]" :data-column="computedId" :data-test="computedId">
|
|
5
5
|
<!-- @slot Tabe cell content slot. -->
|
|
6
6
|
<slot></slot>
|
|
7
7
|
</div>
|
|
@@ -60,18 +60,23 @@
|
|
|
60
60
|
|
|
61
61
|
data () {
|
|
62
62
|
return {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
minWidth: this.minWidth + 'px',
|
|
66
|
-
}
|
|
63
|
+
cellWidth:0,
|
|
64
|
+
cellFixedLeftOffset: ''
|
|
67
65
|
}
|
|
68
66
|
},
|
|
69
67
|
|
|
70
68
|
computed: {
|
|
69
|
+
widthStyles(){
|
|
70
|
+
return {
|
|
71
|
+
width: this.cellWidth + 'px',
|
|
72
|
+
minWidth: this.minWidth + 'px',
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
|
|
71
76
|
fixedStyles(){
|
|
72
77
|
if(this.fixedLeft)
|
|
73
|
-
if (this.
|
|
74
|
-
return { position: 'sticky', left: this.
|
|
78
|
+
if (this.cellFixedLeftOffset && this.cellFixedLeftOffset !== '')
|
|
79
|
+
return { position: 'sticky', left: this.cellFixedLeftOffset + 'px', zIndex: '1' }
|
|
75
80
|
else
|
|
76
81
|
return { position: 'sticky', left: '0', zIndex: '1' }
|
|
77
82
|
else if(this.fixedRight)
|
|
@@ -90,6 +95,21 @@
|
|
|
90
95
|
return string.replace(/\W+/g, '-').toLowerCase() + '-column-cell'
|
|
91
96
|
}
|
|
92
97
|
},
|
|
98
|
+
|
|
99
|
+
methods: {
|
|
100
|
+
setWidth(val){
|
|
101
|
+
this.cellWidth = val
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
setFixedLeftOffset(val){
|
|
105
|
+
this.cellFixedLeftOffset = val
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
created(){
|
|
110
|
+
this.cellWidth = this.width
|
|
111
|
+
this.cellFixedLeftOffset = this.fixedLeftOffset
|
|
112
|
+
},
|
|
93
113
|
}
|
|
94
114
|
</script>
|
|
95
115
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ecs-data-grid-head-cell" :style="[fixedStyles]" :class="[fixedLeft ? 'fixed-left' : '', fixedLeftLast ? 'fixed-left-last' : '', fixedRight ? 'fixed-right' : '']">
|
|
3
3
|
<div v-if="fixedRight" class="shadow" :class="fixedRight ? 'left' : ''" />
|
|
4
|
-
<div ref="resizer" class="ecs-data-grid-head-cell-inner" :style="[widthStyles, paddingStyles]" :data-test="computedId">
|
|
4
|
+
<div ref="resizer" class="ecs-data-grid-head-cell-inner" :style="[widthStyles, paddingStyles, resizeStyles]" :class="resizable ? 'resizable' : ''" :data-column="computedId" :data-test="computedId">
|
|
5
5
|
<ecs-icon v-if="icon" :type="icon" size="20" color="#202127" :title="name" />
|
|
6
6
|
<ecs-select v-else-if="select" @change="$emit('selection', $event.target.value)" type="invisible">
|
|
7
7
|
<option v-for="(option, index) in select" :key="index" :value="option.value">{{ option.name }}</option>
|
|
@@ -92,6 +92,11 @@
|
|
|
92
92
|
/** Overwrites the default padding. Should only be used when the cell contains e.g. a button which has it's own padding and thus needs to be aligned with the padding of other cells. Only pass padding shorthand values, for example: `4px 0 4px 8px`.*/
|
|
93
93
|
padding: {
|
|
94
94
|
type: String
|
|
95
|
+
},
|
|
96
|
+
/** Determines if the column should be resizable. */
|
|
97
|
+
resizable: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: false
|
|
95
100
|
}
|
|
96
101
|
},
|
|
97
102
|
|
|
@@ -102,15 +107,17 @@
|
|
|
102
107
|
minWidth: this.minWidth + 'px',
|
|
103
108
|
},
|
|
104
109
|
newSort: this.sorting,
|
|
105
|
-
resizeWidth: null
|
|
110
|
+
resizeWidth: null,
|
|
111
|
+
initialized: false,
|
|
112
|
+
cellFixedLeftOffset: ''
|
|
106
113
|
}
|
|
107
114
|
},
|
|
108
115
|
|
|
109
116
|
computed: {
|
|
110
117
|
fixedStyles(){
|
|
111
118
|
if(this.fixedLeft)
|
|
112
|
-
if (this.
|
|
113
|
-
return { position: 'sticky', left: this.
|
|
119
|
+
if (this.cellFixedLeftOffset && this.cellFixedLeftOffset !== '')
|
|
120
|
+
return { position: 'sticky', left: this.cellFixedLeftOffset + 'px', zIndex: '1' }
|
|
114
121
|
else
|
|
115
122
|
return { position: 'sticky', left: '0', zIndex: '1' }
|
|
116
123
|
else if(this.fixedRight)
|
|
@@ -144,6 +151,11 @@
|
|
|
144
151
|
if(this.id && this.id !== '')
|
|
145
152
|
string = this.id
|
|
146
153
|
return string.replace(/\W+/g, '-').toLowerCase() + '-column-head'
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
resizeStyles(){
|
|
157
|
+
if(this.resizable)
|
|
158
|
+
return { resize: 'horizontal', overflow: 'hidden' }
|
|
147
159
|
}
|
|
148
160
|
},
|
|
149
161
|
|
|
@@ -158,7 +170,74 @@
|
|
|
158
170
|
|
|
159
171
|
/** Emitted when the sort button is clicked. Returns the new sort order for the column. */
|
|
160
172
|
this.$emit('sortby', this.newSort)
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
setColumnCellsWidth(){
|
|
176
|
+
if(!this.initialized) {
|
|
177
|
+
this.initialized = true
|
|
178
|
+
return
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const resizedEl = document.querySelector('[data-column="'+ this.computedId +'"]')
|
|
182
|
+
const currentColumnWidth = resizedEl.offsetWidth
|
|
183
|
+
|
|
184
|
+
/** Emitted when the column has been resized. Returns the new width of the column in pixels. */
|
|
185
|
+
this.$emit('resizedWidth', currentColumnWidth)
|
|
186
|
+
|
|
187
|
+
let columnCells = document.querySelectorAll('[data-column="' + this.name.toLowerCase() + '-column-cell"]')
|
|
188
|
+
columnCells.forEach(cell => {
|
|
189
|
+
cell.parentElement.__vue__.setWidth(currentColumnWidth)
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
if(this.fixedLeft)
|
|
193
|
+
this.setCellsFixedLeftOffset()
|
|
194
|
+
},
|
|
195
|
+
|
|
196
|
+
setCellsFixedLeftOffset(){
|
|
197
|
+
let gridColumnCells = document.querySelectorAll('.ecs-data-grid-head-cell-inner')
|
|
198
|
+
let startIndex
|
|
199
|
+
|
|
200
|
+
for(let idx = 0; idx < gridColumnCells.length; idx++){
|
|
201
|
+
if(gridColumnCells[idx].attributes['data-column'].value == this.computedId){
|
|
202
|
+
startIndex = idx
|
|
203
|
+
}
|
|
204
|
+
else if(!isNaN(startIndex) && idx > startIndex && gridColumnCells[idx].parentElement.__vue__.fixedLeft && gridColumnCells[idx].parentElement.__vue__.cellFixedLeftOffset){
|
|
205
|
+
let updatedLeft = gridColumnCells[idx - 1].offsetWidth
|
|
206
|
+
if(gridColumnCells[idx - 1].parentElement.__vue__.cellFixedLeftOffset)
|
|
207
|
+
updatedLeft += gridColumnCells[idx - 1].parentElement.__vue__.cellFixedLeftOffset
|
|
208
|
+
gridColumnCells[idx].parentElement.__vue__.setFixedLeftOffset(updatedLeft)
|
|
209
|
+
let columnCells = document.querySelectorAll('[data-column="' + gridColumnCells[idx].parentElement.__vue__.name.toLowerCase() + '-column-cell"]')
|
|
210
|
+
columnCells.forEach(cell => {
|
|
211
|
+
cell.parentElement.__vue__.setFixedLeftOffset(updatedLeft)
|
|
212
|
+
})
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
|
|
217
|
+
setFixedLeftOffset(val){
|
|
218
|
+
this.cellFixedLeftOffset = val
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
created(){
|
|
223
|
+
this.cellFixedLeftOffset = this.fixedLeftOffset
|
|
224
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
225
|
+
entries.forEach(entry => {
|
|
226
|
+
this.setColumnCellsWidth()
|
|
227
|
+
})
|
|
228
|
+
})
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
mounted(){
|
|
232
|
+
if(this.resizable && this.resizeObserver){
|
|
233
|
+
const resizeEl = document.querySelector('[data-column="'+ this.computedId +'"]')
|
|
234
|
+
this.resizeObserver.observe(resizeEl)
|
|
161
235
|
}
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
destroyed(){
|
|
239
|
+
if(this.resizeObserver)
|
|
240
|
+
this.resizeObserver.disconnect()
|
|
162
241
|
}
|
|
163
242
|
}
|
|
164
243
|
</script>
|
|
@@ -179,6 +258,31 @@
|
|
|
179
258
|
column-gap: $spacing-10;
|
|
180
259
|
height: 40px;
|
|
181
260
|
position: relative;
|
|
261
|
+
|
|
262
|
+
&.resizable:after{
|
|
263
|
+
content: "";
|
|
264
|
+
width: 16px;
|
|
265
|
+
height: 16px;
|
|
266
|
+
right: 0;
|
|
267
|
+
bottom: 0;
|
|
268
|
+
background: svg-uri('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="16" height="16" fill="white"/><path d="M4 12L12 4" stroke="#157EFB" stroke-linecap="round"/><path d="M8 12L12 8" stroke="#157EFB" stroke-linecap="round"/></svg>');
|
|
269
|
+
position: absolute;
|
|
270
|
+
transition: .2s;
|
|
271
|
+
opacity: 0;
|
|
272
|
+
transform: scale(.2);
|
|
273
|
+
transform-origin: bottom right;
|
|
274
|
+
pointer-events: none;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
&.resizable:hover:after,
|
|
278
|
+
&.resizing:after{
|
|
279
|
+
opacity: 1;
|
|
280
|
+
transform: scale(1);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&::-webkit-resizer{
|
|
284
|
+
display: none;
|
|
285
|
+
}
|
|
182
286
|
}
|
|
183
287
|
|
|
184
288
|
&-text{
|