Browse Source

feat(nc-gui): new field icons

pull/7803/head
DarkPhoenix2704 10 months ago
parent
commit
3d8c267b79
  1. 3
      packages/nc-gui/assets/nc-icons/cell-attachment.svg
  2. 3
      packages/nc-gui/assets/nc-icons/cell-barcode.svg
  3. 4
      packages/nc-gui/assets/nc-icons/cell-checkbox.svg
  4. 4
      packages/nc-gui/assets/nc-icons/cell-currency.svg
  5. 6
      packages/nc-gui/assets/nc-icons/cell-date.svg
  6. 8
      packages/nc-gui/assets/nc-icons/cell-datetime.svg
  7. 5
      packages/nc-gui/assets/nc-icons/cell-db.svg
  8. 7
      packages/nc-gui/assets/nc-icons/cell-decimal.svg
  9. 7
      packages/nc-gui/assets/nc-icons/cell-duration.svg
  10. 4
      packages/nc-gui/assets/nc-icons/cell-email.svg
  11. 8
      packages/nc-gui/assets/nc-icons/cell-formula.svg
  12. 7
      packages/nc-gui/assets/nc-icons/cell-geometry.svg
  13. 8
      packages/nc-gui/assets/nc-icons/cell-json.svg
  14. 7
      packages/nc-gui/assets/nc-icons/cell-link.svg
  15. 8
      packages/nc-gui/assets/nc-icons/cell-longtext.svg
  16. 9
      packages/nc-gui/assets/nc-icons/cell-lookup.svg
  17. 8
      packages/nc-gui/assets/nc-icons/cell-multiselect.svg
  18. 6
      packages/nc-gui/assets/nc-icons/cell-number.svg
  19. 5
      packages/nc-gui/assets/nc-icons/cell-percentage.svg
  20. 3
      packages/nc-gui/assets/nc-icons/cell-phone.svg
  21. 10
      packages/nc-gui/assets/nc-icons/cell-qrcode.svg
  22. 3
      packages/nc-gui/assets/nc-icons/cell-rating.svg
  23. 3
      packages/nc-gui/assets/nc-icons/cell-rollup.svg
  24. 4
      packages/nc-gui/assets/nc-icons/cell-select.svg
  25. 5
      packages/nc-gui/assets/nc-icons/cell-text.svg
  26. 4
      packages/nc-gui/assets/nc-icons/cell-time.svg
  27. 4
      packages/nc-gui/assets/nc-icons/cell-url.svg
  28. 4
      packages/nc-gui/assets/nc-icons/cell-user.svg
  29. 7
      packages/nc-gui/assets/nc-icons/system-date.svg
  30. 4
      packages/nc-gui/assets/nc-icons/system-key.svg
  31. 6
      packages/nc-gui/assets/nc-icons/system-text.svg
  32. 5
      packages/nc-gui/assets/nc-icons/system-user.svg
  33. 2
      packages/nc-gui/components/smartsheet/column/EditOrAdd.vue
  34. 52
      packages/nc-gui/components/smartsheet/header/CellIcon.ts
  35. 32
      packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts
  36. 76
      packages/nc-gui/utils/columnUtils.ts
  37. 66
      packages/nc-gui/utils/iconUtils.ts

3
packages/nc-gui/assets/nc-icons/cell-attachment.svg

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22 11.376L12.5445 20.2938C11.3861 21.3862 9.81499 22 8.1768 22C6.53861 22 4.96752 21.3862 3.80914 20.2938C2.65077 19.2013 2 17.7195 2 16.1745C2 14.6295 2.65077 13.1477 3.80914 12.0553L13.2647 3.1375C14.0369 2.40917 15.0843 2 16.1765 2C17.2686 2 18.316 2.40917 19.0882 3.1375C19.8605 3.86583 20.2943 4.85365 20.2943 5.88366C20.2943 6.91367 19.8605 7.9015 19.0882 8.62983L9.6224 17.5476C9.23627 17.9118 8.71257 18.1163 8.16651 18.1163C7.62045 18.1163 7.09675 17.9118 6.71063 17.5476C6.3245 17.1834 6.10758 16.6895 6.10758 16.1745C6.10758 15.6595 6.3245 15.1656 6.71063 14.8014L15.4459 6.57263" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 793 B

3
packages/nc-gui/assets/nc-icons/cell-barcode.svg

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 19V5H3.65377V19H2ZM4.78206 19V5H6.43585V19H4.78206ZM7.56415 19V5H8.69244V19H7.56415ZM10.3462 19V5H12V19H10.3462ZM13.1283 19V5H15.3076V19H13.1283ZM16.4359 19V5H17.5641V19H16.4359ZM19.8207 19V5H22V19H19.8207Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 345 B

4
packages/nc-gui/assets/nc-icons/cell-checkbox.svg

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="4" stroke="currentColor" stroke-width="2"/>
<path d="M18 7L9.75 16L6 11.9091" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 314 B

4
packages/nc-gui/assets/nc-icons/cell-currency.svg

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 1V23" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M17 5H9.5C8.57174 5 7.6815 5.36875 7.02513 6.02513C6.36875 6.6815 6 7.57174 6 8.5C6 9.42826 6.36875 10.3185 7.02513 10.9749C7.6815 11.6313 8.57174 12 9.5 12H14.5C15.4283 12 16.3185 12.3687 16.9749 13.0251C17.6313 13.6815 18 14.5717 18 15.5C18 16.4283 17.6313 17.3185 16.9749 17.9749C16.3185 18.6313 15.4283 19 14.5 19H6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 628 B

6
packages/nc-gui/assets/nc-icons/cell-date.svg

@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 4H5C3.89543 4 3 4.89543 3 6V20C3 21.1046 3.89543 22 5 22H19C20.1046 22 21 21.1046 21 20V6C21 4.89543 20.1046 4 19 4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16 2V6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8 2V6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 10H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 640 B

8
packages/nc-gui/assets/nc-icons/cell-datetime.svg

@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 10.1389V6.66667C19 5.74619 18.2041 5 17.2222 5H4.77778C3.79594 5 3 5.74619 3 6.66667V18.3333C3 19.2538 3.79594 20 4.77778 20H11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 9.85706H18.4286" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M14.1428 3V6.42857" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7.28577 3V6.42857" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M17 21C19.2091 21 21 19.2091 21 17C21 14.7909 19.2091 13 17 13C14.7909 13 13 14.7909 13 17C13 19.2091 14.7909 21 17 21Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M17 16V16.8889L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1021 B

5
packages/nc-gui/assets/nc-icons/cell-db.svg

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 8C16.9706 8 21 6.65685 21 5C21 3.34315 16.9706 2 12 2C7.02944 2 3 3.34315 3 5C3 6.65685 7.02944 8 12 8Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 12C21 13.66 17 15 12 15C7 15 3 13.66 3 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 5V19C3 20.66 7 22 12 22C17 22 21 20.66 21 19V5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 601 B

7
packages/nc-gui/assets/nc-icons/cell-decimal.svg

@ -0,0 +1,7 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="8.36365" y="3" width="4.3636" height="8.52631" rx="2.1818" stroke="currentColor" stroke-width="2"/>
<ellipse cx="4.96727" cy="11.2635" rx="0.967266" ry="0.945" fill="currentColor"/>
<rect x="15.6362" y="3" width="4.3636" height="8.52631" rx="2.1818" stroke="currentColor" stroke-width="2"/>
<path d="M16.6061 21L20 17.6842L16.6061 14.3684" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8.36365 17.6843H19.9999" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 663 B

7
packages/nc-gui/assets/nc-icons/cell-duration.svg

@ -0,0 +1,7 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9503 20C15.8163 20 18.9503 16.866 18.9503 13C18.9503 9.13401 15.8163 6 11.9503 6C8.08432 6 4.95032 9.13401 4.95032 13C4.95032 16.866 8.08432 20 11.9503 20Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11.9503 10V13L13.4503 14.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 3L12 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M19.2929 7.12129C19.6834 6.73077 19.6834 6.0976 19.2929 5.70708C18.9024 5.31655 18.2692 5.31655 17.8787 5.70708L19.2929 7.12129ZM17.8787 5.70708L15.8787 7.70708L17.2929 9.12129L19.2929 7.12129L17.8787 5.70708Z" fill="currentColor"/>
<path d="M13.5 3H10.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 949 B

4
packages/nc-gui/assets/nc-icons/cell-email.svg

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 4H20C21.1 4 22 4.9 22 6V18C22 19.1 21.1 20 20 20H4C2.9 20 2 19.1 2 18V6C2 4.9 2.9 4 4 4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M22 6L12 13L2 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 407 B

8
packages/nc-gui/assets/nc-icons/cell-formula.svg

@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.19995 9.04529H12.6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 9.04529H17.4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 19.1035C3 21.7403 5.796 21.5217 6 19.1035L7.8 4.5949C8.004 2.17677 10.8 2.78134 10.8 4.5949" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M21 18.7177H17.4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12.6 18.7177H8.99998" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10.2001 9.04529L19.8001 18.7177M19.8001 9.04529L10.2001 18.7177" stroke="currentColor" stroke-width="2"/>
</svg>

After

Width:  |  Height:  |  Size: 858 B

7
packages/nc-gui/assets/nc-icons/cell-geometry.svg

@ -0,0 +1,7 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.73167 3.53666C5.84223 3.31554 6.15777 3.31554 6.26833 3.53666L8.78292 8.56584C8.88265 8.76531 8.7376 9 8.51459 9H3.48541C3.2624 9 3.11735 8.76531 3.21708 8.56584L5.73167 3.53666Z" stroke="currentColor" stroke-width="2"/>
<path d="M14.5714 3L21 9.42857" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M20.9999 3L14.5713 9.42857" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8.33333 15H3.66667C3.29848 15 3 15.2985 3 15.6667V20.3333C3 20.7015 3.29848 21 3.66667 21H8.33333C8.70152 21 9 20.7015 9 20.3333V15.6667C9 15.2985 8.70152 15 8.33333 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<circle cx="18" cy="18" r="3" stroke="currentColor" stroke-width="2"/>
</svg>

After

Width:  |  Height:  |  Size: 921 B

8
packages/nc-gui/assets/nc-icons/cell-json.svg

@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8 20H7.5C6.39543 20 5.5 19.1046 5.5 18V14C5.5 12.8954 4.60457 12 3.5 12H3" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M3 12H3.5C4.60457 12 5.5 11.1046 5.5 10V6C5.5 4.89543 6.39543 4 7.5 4H8" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M16 20H16.5C17.6046 20 18.5 19.1046 18.5 18V14C18.5 12.8954 19.3954 12 20.5 12H21" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<path d="M21 12H20.5C19.3954 12 18.5 11.1046 18.5 10V6C18.5 4.89543 17.6046 4 16.5 4H16" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<ellipse cx="11.995" cy="9.63743" rx="1" ry="1.025" fill="currentColor"/>
<path d="M11.9999 14.7623L11.5499 16.2998" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 912 B

7
packages/nc-gui/assets/nc-icons/cell-link.svg

@ -0,0 +1,7 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6 6L21 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6 18L21 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M13 12L21 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8 14.3333L10.3333 12L8 9.66663" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 12L10 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 672 B

8
packages/nc-gui/assets/nc-icons/cell-longtext.svg

@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 10H11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 6H11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 14H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M17 18H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3 10L5.41056 5.17889C5.44741 5.10518 5.55259 5.10518 5.58944 5.17889L8 10" stroke="#1F293A" stroke-width="2" stroke-linecap="round"/>
<path d="M4 9H7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>

After

Width:  |  Height:  |  Size: 757 B

9
packages/nc-gui/assets/nc-icons/cell-lookup.svg

@ -0,0 +1,9 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.3333 19.6667C18.1743 19.6667 19.6667 18.1743 19.6667 16.3333C19.6667 14.4924 18.1743 13 16.3333 13C14.4924 13 13 14.4924 13 16.3333C13 18.1743 14.4924 19.6667 16.3333 19.6667Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 21L19 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M17.3409 10H3.34094" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10 14H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 10H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 6H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10 18H3" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

8
packages/nc-gui/assets/nc-icons/cell-multiselect.svg

@ -0,0 +1,8 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5.66667 4.5H3.33333C3.14924 4.5 3 4.64924 3 4.83333V7.16667C3 7.35076 3.14924 7.5 3.33333 7.5H5.66667C5.85076 7.5 6 7.35076 6 7.16667V4.83333C6 4.64924 5.85076 4.5 5.66667 4.5Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10.5 6L21 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.66667 10.5H3.33333C3.14924 10.5 3 10.6492 3 10.8333V13.1667C3 13.3508 3.14924 13.5 3.33333 13.5H5.66667C5.85076 13.5 6 13.3508 6 13.1667V10.8333C6 10.6492 5.85076 10.5 5.66667 10.5Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10.5 12L21 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.66667 16.5H3.33333C3.14924 16.5 3 16.6492 3 16.8333V19.1667C3 19.3508 3.14924 19.5 3.33333 19.5H5.66667C5.85076 19.5 6 19.3508 6 19.1667V16.8333C6 16.6492 5.85076 16.5 5.66667 16.5Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10.5 18L21 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

6
packages/nc-gui/assets/nc-icons/cell-number.svg

@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 15H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M10 3L8 21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16 3L14 21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 535 B

5
packages/nc-gui/assets/nc-icons/cell-percentage.svg

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 5L5 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6.5 9C7.88071 9 9 7.88071 9 6.5C9 5.11929 7.88071 4 6.5 4C5.11929 4 4 5.11929 4 6.5C4 7.88071 5.11929 9 6.5 9Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M17.5 20C18.8807 20 20 18.8807 20 17.5C20 16.1193 18.8807 15 17.5 15C16.1193 15 15 16.1193 15 17.5C15 18.8807 16.1193 20 17.5 20Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 650 B

3
packages/nc-gui/assets/nc-icons/cell-phone.svg

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.8881 16.9201V19.9201C21.8892 20.1986 21.8322 20.4743 21.7206 20.7294C21.6091 20.9846 21.4454 21.2137 21.2402 21.402C21.035 21.5902 20.7927 21.7336 20.5289 21.8228C20.265 21.912 19.9855 21.9452 19.7081 21.9201C16.631 21.5857 13.6751 20.5342 11.0781 18.8501C8.66194 17.3148 6.61345 15.2663 5.07812 12.8501C3.38809 10.2413 2.33636 7.27109 2.00812 4.1801C1.98313 3.90356 2.01599 3.62486 2.10462 3.36172C2.19324 3.09859 2.33569 2.85679 2.52288 2.65172C2.71008 2.44665 2.93792 2.28281 3.19191 2.17062C3.44589 2.05843 3.72046 2.00036 3.99812 2.0001H6.99812C7.48342 1.99532 7.95391 2.16718 8.32188 2.48363C8.68985 2.80008 8.93019 3.23954 8.99812 3.7201C9.12474 4.68016 9.35957 5.62282 9.69812 6.5301C9.83266 6.88802 9.86178 7.27701 9.78202 7.65098C9.70227 8.02494 9.51698 8.36821 9.24812 8.6401L7.97812 9.9101C9.40167 12.4136 11.4746 14.4865 13.9781 15.9101L15.2481 14.6401C15.52 14.3712 15.8633 14.1859 16.2372 14.1062C16.6112 14.0264 17.0002 14.0556 17.3581 14.1901C18.2654 14.5286 19.2081 14.7635 20.1681 14.8901C20.6539 14.9586 21.0975 15.2033 21.4146 15.5776C21.7318 15.9519 21.9003 16.4297 21.8881 16.9201Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

10
packages/nc-gui/assets/nc-icons/cell-qrcode.svg

@ -0,0 +1,10 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.33333 4H4.66667C4.29848 4 4 4.29848 4 4.66667V9.33333C4 9.70152 4.29848 10 4.66667 10H9.33333C9.70152 10 10 9.70152 10 9.33333V4.66667C10 4.29848 9.70152 4 9.33333 4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M19.3333 4H14.6667C14.2985 4 14 4.29848 14 4.66667V9.33333C14 9.70152 14.2985 10 14.6667 10H19.3333C19.7015 10 20 9.70152 20 9.33333V4.66667C20 4.29848 19.7015 4 19.3333 4Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9.33333 14H4.66667C4.29848 14 4 14.2985 4 14.6667V19.3333C4 19.7015 4.29848 20 4.66667 20H9.33333C9.70152 20 10 19.7015 10 19.3333V14.6667C10 14.2985 9.70152 14 9.33333 14Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M14.8889 14H14.1111C14.0497 14 14 14.0497 14 14.1111V14.8889C14 14.9503 14.0497 15 14.1111 15H14.8889C14.9503 15 15 14.9503 15 14.8889V14.1111C15 14.0497 14.9503 14 14.8889 14Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M17.3889 16.5H16.6111C16.5497 16.5 16.5 16.5497 16.5 16.6111V17.3889C16.5 17.4503 16.5497 17.5 16.6111 17.5H17.3889C17.4503 17.5 17.5 17.4503 17.5 17.3889V16.6111C17.5 16.5497 17.4503 16.5 17.3889 16.5Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M19.8889 19H19.1111C19.0497 19 19 19.0497 19 19.1111V19.8889C19 19.9503 19.0497 20 19.1111 20H19.8889C19.9503 20 20 19.9503 20 19.8889V19.1111C20 19.0497 19.9503 19 19.8889 19Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M14.8889 19H14.1111C14.0497 19 14 19.0497 14 19.1111V19.8889C14 19.9503 14.0497 20 14.1111 20H14.8889C14.9503 20 15 19.9503 15 19.8889V19.1111C15 19.0497 14.9503 19 14.8889 19Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M19.8889 14H19.1111C19.0497 14 19 14.0497 19 14.1111V14.8889C19 14.9503 19.0497 15 19.1111 15H19.8889C19.9503 15 20 14.9503 20 14.8889V14.1111C20 14.0497 19.9503 14 19.8889 14Z" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

3
packages/nc-gui/assets/nc-icons/cell-rating.svg

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 298 B

3
packages/nc-gui/assets/nc-icons/cell-rollup.svg

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.7544 21.9998C9.62162 21.9998 7.48916 21.3746 5.67844 20.186C3.32397 18.6409 1.72994 16.3191 1.18949 13.6492C0.672309 11.0938 1.22537 8.37108 2.70682 6.17848C4.13963 4.05777 6.27968 2.63038 8.73333 2.15888C11.0751 1.70886 13.562 2.22527 15.5555 3.57522C17.4745 4.87405 18.7562 6.80196 19.1654 9.00329C19.5547 11.0974 19.0666 13.3111 17.8272 15.0761C16.642 16.7643 14.8983 17.8812 12.916 18.2209C11.0375 18.5424 9.06376 18.0899 7.50163 16.9786C6.01976 15.9243 5.05219 14.3891 4.7772 12.6557C4.51783 11.0199 4.94356 9.31537 5.94562 7.97896C6.88567 6.72533 8.23574 5.92267 9.74727 5.71849C11.1653 5.52742 12.627 5.92201 13.7568 6.80243C14.7998 7.61605 15.4482 8.76228 15.5816 10.0299C15.706 11.2146 15.3313 12.4116 14.5537 13.3152C13.8512 14.1313 12.8894 14.6106 11.8452 14.6656C10.8814 14.7154 9.90466 14.3479 9.22818 13.6808C8.63158 13.0918 8.32337 12.3229 8.36118 11.5162C8.39641 10.7637 8.81018 10.0062 9.41538 9.58673C9.92598 9.23274 10.5279 9.13798 11.1093 9.31967C11.5926 9.471 11.861 9.98245 11.7087 10.462C11.5565 10.9419 11.0406 11.2083 10.5581 11.0572C10.5327 11.0491 10.5175 11.0441 10.466 11.0799C10.3269 11.1762 10.2027 11.4144 10.1939 11.6001C10.1802 11.8953 10.2902 12.1604 10.5212 12.3878C10.8316 12.6941 11.3028 12.8671 11.7483 12.8463C12.4365 12.8101 12.8947 12.4377 13.158 12.132C13.604 11.6138 13.8279 10.8988 13.7558 10.2187C13.6751 9.4457 13.2725 8.74105 12.6232 8.23467C11.882 7.65684 10.9244 7.39681 9.99469 7.52299C8.97594 7.66033 8.06095 8.20845 7.41821 9.066C6.70853 10.0122 6.4069 11.2171 6.58994 12.3723C6.78773 13.6198 7.49103 14.7301 8.57024 15.498C9.73623 16.3271 11.2059 16.6656 12.6036 16.4257C14.0989 16.1693 15.4193 15.3203 16.3217 14.0345C17.2826 12.666 17.6612 10.9525 17.3605 9.33326C17.0413 7.6134 16.0328 6.10269 14.5218 5.07964C12.9293 4.0016 10.9468 3.5891 9.08216 3.94671C7.11213 4.32538 5.3894 5.47793 4.23114 7.19257C3.02032 8.98493 2.5673 11.2074 2.98903 13.2903C3.43209 15.4809 4.74697 17.3902 6.69095 18.6665C8.70975 19.9918 11.2052 20.4774 13.5371 19.9985C17.7225 19.1391 20.9312 15.3679 21.1663 11.0311C21.1936 10.5288 21.6239 10.1445 22.132 10.1707C22.6381 10.1978 23.0261 10.6268 22.9986 11.1293C22.7194 16.2781 18.8967 20.7588 13.9087 21.7828C13.1985 21.9279 12.4764 21.9998 11.7544 21.9998Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

4
packages/nc-gui/assets/nc-icons/cell-select.svg

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="3" y="3" width="18" height="18" rx="9" stroke="currentColor" stroke-width="2"/>
<rect x="7" y="7" width="10" height="10" rx="5" fill="currentColor" stroke="currentColor" stroke-width="2"/>
</svg>

After

Width:  |  Height:  |  Size: 301 B

5
packages/nc-gui/assets/nc-icons/cell-text.svg

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4 7V4H20V7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M9 20H15" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 4V20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>

After

Width:  |  Height:  |  Size: 440 B

4
packages/nc-gui/assets/nc-icons/cell-time.svg

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 6V12L16 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 428 B

4
packages/nc-gui/assets/nc-icons/cell-url.svg

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 7H18C18.6566 7 19.3068 7.12933 19.9134 7.3806C20.52 7.63188 21.0712 8.00017 21.5355 8.46447C21.9998 8.92876 22.3681 9.47996 22.6194 10.0866C22.8707 10.6932 23 11.3434 23 12C23 12.6566 22.8707 13.3068 22.6194 13.9134C22.3681 14.52 21.9998 15.0712 21.5355 15.5355C21.0712 15.9998 20.52 16.3681 19.9134 16.6194C19.3068 16.8707 18.6566 17 18 17H15M9 17H6C5.34339 17 4.69321 16.8707 4.08658 16.6194C3.47995 16.3681 2.92876 15.9998 2.46447 15.5355C1.52678 14.5979 1 13.3261 1 12C1 10.6739 1.52678 9.40215 2.46447 8.46447C3.40215 7.52678 4.67392 7 6 7H9" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8 12H16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 859 B

4
packages/nc-gui/assets/nc-icons/cell-user.svg

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 576 B

7
packages/nc-gui/assets/nc-icons/system-date.svg

@ -0,0 +1,7 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20 12V6.66667C20 5.74619 19.2041 5 18.2222 5H5.77778C4.79594 5 4 5.74619 4 6.66667V18.3333C4 19.2538 4.79594 20 5.77778 20H13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 9.85706H19.4286" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15.1428 3V6.42857" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8.28564 3V6.42857" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15 17.631L16.6666 19.3186V21.9903H15V17.631ZM22 14.0432V21.7151C22 21.8727 21.8731 22 21.7174 22C21.6428 22 21.5714 21.9709 21.5181 21.9169L15 15.9682V14.2849C15 14.1273 15.1258 14 15.2815 14H15.2964C15.3711 14 15.4436 14.0302 15.4958 14.0831L20.3324 18.3302V14.0432H22Z" stroke="#3366FF" fill="#3366FF"/>
</svg>

After

Width:  |  Height:  |  Size: 995 B

4
packages/nc-gui/assets/nc-icons/system-key.svg

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21 2L19 4M19 4L22 7L18.5 10.5L15.5 7.5M19 4L15.5 7.5M11.39 11.61C11.9064 12.1195 12.3168 12.726 12.5978 13.3948C12.8787 14.0635 13.0246 14.7813 13.0271 15.5066C13.0295 16.232 12.8884 16.9507 12.6119 17.6213C12.3355 18.2919 11.9291 18.9012 11.4162 19.4141C10.9033 19.9271 10.294 20.3334 9.62333 20.6099C8.95271 20.8864 8.23403 21.0275 7.50866 21.025C6.7833 21.0226 6.06557 20.8767 5.39682 20.5958C4.72807 20.3148 4.1215 19.9043 3.61203 19.388C2.61016 18.3507 2.05579 16.9614 2.06832 15.5193C2.08085 14.0772 2.65928 12.6977 3.67903 11.678C4.69877 10.6583 6.07824 10.0798 7.52032 10.0673C8.96241 10.0548 10.3517 10.6091 11.389 11.611L11.39 11.61ZM11.39 11.61L15.5 7.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15 17.631L16.6666 19.3186V21.9903H15V17.631ZM22 14.0432V21.7151C22 21.8727 21.8731 22 21.7174 22C21.6428 22 21.5714 21.9709 21.5181 21.9169L15 15.9682V14.2849C15 14.1273 15.1258 14 15.2815 14H15.2964C15.3711 14 15.4436 14.0302 15.4958 14.0831L20.3324 18.3302V14.0432H22Z" fill="#3366FF" stroke="#3366FF"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

6
packages/nc-gui/assets/nc-icons/system-text.svg

@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 6V3H18V6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8 18H13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M11 3V18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M15 17.631L16.6666 19.3186V21.9903H15V17.631ZM22 14.0432V21.7151C22 21.8727 21.8731 22 21.7174 22C21.6428 22 21.5714 21.9709 21.5181 21.9169L15 15.9682V14.2849C15 14.1273 15.1258 14 15.2815 14H15.2964C15.3711 14 15.4436 14.0302 15.4958 14.0831L20.3324 18.3302V14.0432H22Z" stroke="#3366FF" fill="#3366FF"/>
</svg>

After

Width:  |  Height:  |  Size: 743 B

5
packages/nc-gui/assets/nc-icons/system-user.svg

@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 17.631L16.6666 19.3186V21.9903H15V17.631ZM22 14.0432V21.7151C22 21.8727 21.8731 22 21.7174 22C21.6428 22 21.5714 21.9709 21.5181 21.9169L15 15.9682V14.2849C15 14.1273 15.1258 14 15.2815 14H15.2964C15.3711 14 15.4436 14.0302 15.4958 14.0831L20.3324 18.3302V14.0432H22Z" stroke="#3366FF" fill="#3366FF"/>
<path d="M13 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 813 B

2
packages/nc-gui/components/smartsheet/column/EditOrAdd.vue

@ -309,7 +309,7 @@ if (props.fromTableExplorer) {
</template>
<a-select-option v-for="opt of uiTypesOptions" :key="opt.name" :value="opt.name" v-bind="validateInfos.uidt">
<div class="flex gap-2 items-center">
<component :is="opt.icon" class="text-gray-700" />
<component :is="opt.icon" class="text-gray-700 w-4 h-4" />
<div class="flex-1">{{ opt.name }}</div>
<span v-if="opt.deprecated" class="!text-xs !text-gray-300">({{ $t('general.deprecated') }})</span>
<component

52
packages/nc-gui/components/smartsheet/header/CellIcon.ts

@ -40,60 +40,60 @@ import {
const renderIcon = (column: ColumnType, abstractType: any) => {
if (isPrimaryKey(column)) {
return iconMap.key
return iconMap.cellSystemKey
} else if (isSpecificDBType(column)) {
return iconMap.specificDbType
return iconMap.cellDb
} else if (isJSON(column)) {
return iconMap.json
return iconMap.cellJson
} else if (isDate(column, abstractType)) {
return iconMap.calendar
return iconMap.cellDate
} else if (isDateTime(column, abstractType)) {
return iconMap.datetime
return iconMap.cellDatetime
} else if (isGeoData(column)) {
return iconMap.geoData
} else if (isSet(column)) {
return iconMap.multiSelect
return iconMap.cellMultiSelect
} else if (isSingleSelect(column)) {
return iconMap.singleSelect
return iconMap.cellSingleSelect
} else if (isBoolean(column, abstractType)) {
return iconMap.boolean
return iconMap.cellCheckbox
} else if (isTextArea(column)) {
return iconMap.longText
return iconMap.cellLongText
} else if (isEmail(column)) {
return iconMap.email
return iconMap.cellEmail
} else if (isYear(column, abstractType)) {
return iconMap.calendar
return iconMap.cellDate
} else if (isTime(column, abstractType)) {
return iconMap.clock
return iconMap.cellTime
} else if (isRating(column)) {
return iconMap.rating
return iconMap.cellRating
} else if (isAttachment(column)) {
return iconMap.image
return iconMap.cellAttachment
} else if (isDecimal(column)) {
return iconMap.decimal
return iconMap.cellDecimal
} else if (isPhoneNumber(column)) {
return iconMap.phone
return iconMap.cellPhone
} else if (isURL(column)) {
return iconMap.web
return iconMap.cellUrl
} else if (isCurrency(column)) {
return iconMap.currency
return iconMap.cellCurrency
} else if (isDuration(column)) {
return iconMap.duration
return iconMap.cellDuration
} else if (isPercent(column)) {
return iconMap.percent
return iconMap.cellPercent
} else if (isGeometry(column)) {
return iconMap.calculator
return iconMap.cellGeometry
} else if (isUser(column)) {
if ((column.meta as { is_multi?: boolean; notify?: boolean })?.is_multi) {
return iconMap.phUsers
return iconMap.cellUser
}
return iconMap.phUser
return iconMap.cellUser
} else if (isInt(column, abstractType) || isFloat(column, abstractType)) {
return iconMap.number
return iconMap.cellNumber
} else if (isString(column, abstractType)) {
return iconMap.text
return iconMap.cellText
} else {
return iconMap.generic
return iconMap.cellSystemText
}
}

32
packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts

@ -1,7 +1,7 @@
import type { PropType } from '@vue/runtime-core'
import type { ColumnType, LinkToAnotherRecordType, LookupType, RollupType } from 'nocodb-sdk'
import type { Ref } from 'vue'
import { RelationTypes, UITypes } from 'nocodb-sdk'
import type { Ref } from 'vue'
import {
ColumnInj,
MetaInj,
@ -33,44 +33,44 @@ const renderIcon = (column: ColumnType, relationColumn?: ColumnType) => {
}
break
case UITypes.SpecificDBType:
return { icon: iconMap.specificDbType, color: 'text-grey' }
return { icon: iconMap.cellDb, color: 'text-grey' }
case UITypes.Formula:
return { icon: iconMap.formula, color: 'text-grey' }
return { icon: iconMap.cellFormula, color: 'text-grey' }
case UITypes.QrCode:
return { icon: iconMap.qrCode, color: 'text-grey' }
return { icon: iconMap.cellQrCode, color: 'text-grey' }
case UITypes.Barcode:
return { icon: iconMap.barCode, color: 'text-grey' }
return { icon: iconMap.cellBarcode, color: 'text-grey' }
case UITypes.Lookup:
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) {
case RelationTypes.MANY_TO_MANY:
return { icon: iconMap.lookup, color: 'text-pink-500' }
return { icon: iconMap.cellLookup, color: 'text-pink-500' }
case RelationTypes.HAS_MANY:
return { icon: iconMap.lookup, color: 'text-orange-500' }
return { icon: iconMap.cellLookup, color: 'text-orange-500' }
case RelationTypes.BELONGS_TO:
return { icon: iconMap.lookup, color: 'text-blue-500' }
return { icon: iconMap.cellLookup, color: 'text-blue-500' }
}
return { icon: iconMap.lookup, color: 'text-grey' }
return { icon: iconMap.cellLookup, color: 'text-grey' }
case UITypes.Rollup:
switch ((relationColumn?.colOptions as LinkToAnotherRecordType)?.type) {
case RelationTypes.MANY_TO_MANY:
return { icon: iconMap.rollup, color: 'text-pink-500' }
return { icon: iconMap.cellRollup, color: 'text-pink-500' }
case RelationTypes.HAS_MANY:
return { icon: iconMap.rollup, color: 'text-orange-500' }
return { icon: iconMap.cellRollup, color: 'text-orange-500' }
case RelationTypes.BELONGS_TO:
return { icon: iconMap.rollup, color: 'text-blue-500' }
return { icon: iconMap.cellRollup, color: 'text-blue-500' }
}
return { icon: iconMap.rollup, color: 'text-grey' }
return { icon: iconMap.cellRollup, color: 'text-grey' }
case UITypes.Count:
return { icon: CountIcon, color: 'text-grey' }
case UITypes.CreatedTime:
case UITypes.LastModifiedTime:
return { icon: iconMap.datetime, color: 'text-grey' }
return { icon: iconMap.cellSystemDate, color: 'text-grey' }
case UITypes.CreatedBy:
case UITypes.LastModifiedBy:
return { icon: iconMap.phUser, color: 'text-grey' }
return { icon: iconMap.cellSystemUser, color: 'text-grey' }
}
return { icon: iconMap.generic, color: 'text-grey' }
return { icon: iconMap.cellSystemText, color: 'text-grey' }
}
export default defineComponent({

76
packages/nc-gui/utils/columnUtils.ts

@ -1,125 +1,123 @@
import type { ColumnType, LinkToAnotherRecordType } from 'nocodb-sdk'
import { RelationTypes, UITypes } from 'nocodb-sdk'
import { iconMap } from '#imports'
import LinkVariant from '~icons/mdi/link-variant'
import ID from '~icons/mdi/identifier'
const uiTypes = [
{
name: UITypes.Links,
icon: iconMap.link,
icon: iconMap.cellLinks,
virtual: 1,
},
{
name: UITypes.LinkToAnotherRecord,
icon: iconMap.link,
icon: iconMap.cellLinks,
virtual: 1,
deprecated: 1,
},
{
name: UITypes.Lookup,
icon: iconMap.lookup,
icon: iconMap.cellLookup,
virtual: 1,
},
{
name: UITypes.SingleLineText,
icon: iconMap.text,
icon: iconMap.cellText,
},
{
name: UITypes.LongText,
icon: iconMap.longText,
icon: iconMap.cellLongText,
},
{
name: UITypes.Number,
icon: iconMap.number,
icon: iconMap.cellNumber,
},
{
name: UITypes.Decimal,
icon: iconMap.decimal,
icon: iconMap.cellDecimal,
},
{
name: UITypes.Attachment,
icon: iconMap.image,
icon: iconMap.cellAttachment,
},
{
name: UITypes.Checkbox,
icon: iconMap.boolean,
icon: iconMap.cellCheckbox,
},
{
name: UITypes.MultiSelect,
icon: iconMap.multiSelect,
icon: iconMap.cellMultiSelect,
},
{
name: UITypes.SingleSelect,
icon: iconMap.singleSelect,
icon: iconMap.cellSingleSelect,
},
{
name: UITypes.Date,
icon: iconMap.calendar,
icon: iconMap.cellDate,
},
{
name: UITypes.Year,
icon: iconMap.calendar,
icon: iconMap.cellDate,
},
{
name: UITypes.Time,
icon: iconMap.clock,
icon: iconMap.cellTime,
},
{
name: UITypes.PhoneNumber,
icon: iconMap.phone,
icon: iconMap.cellPhone,
},
{
name: UITypes.Email,
icon: iconMap.email,
icon: iconMap.cellEmail,
},
{
name: UITypes.URL,
icon: iconMap.web,
icon: iconMap.cellUrl,
},
{
name: UITypes.Currency,
icon: iconMap.currency,
icon: iconMap.cellCurrency,
},
{
name: UITypes.Percent,
icon: iconMap.percent,
icon: iconMap.cellPercent,
},
{
name: UITypes.Duration,
icon: iconMap.duration,
icon: iconMap.cellDuration,
},
{
name: UITypes.Rating,
icon: iconMap.rating,
icon: iconMap.cellRating,
},
{
name: UITypes.Formula,
icon: iconMap.formula,
icon: iconMap.cellFormula,
virtual: 1,
},
{
name: UITypes.Rollup,
icon: iconMap.rollup,
icon: iconMap.cellRollup,
virtual: 1,
},
{
name: UITypes.DateTime,
icon: iconMap.datetime,
icon: iconMap.cellDatetime,
},
{
name: UITypes.QrCode,
icon: iconMap.qrCode,
icon: iconMap.cellQrCode,
virtual: 1,
},
{
name: UITypes.Barcode,
icon: iconMap.barCode,
icon: iconMap.cellBarcode,
virtual: 1,
},
{
name: UITypes.Geometry,
icon: iconMap.calculator,
icon: iconMap.cellGeometry,
},
{
@ -128,31 +126,31 @@ const uiTypes = [
},
{
name: UITypes.JSON,
icon: iconMap.json,
icon: iconMap.cellJson,
},
{
name: UITypes.SpecificDBType,
icon: iconMap.specificDbType,
icon: iconMap.cellDb,
},
{
name: UITypes.User,
icon: iconMap.phUser,
icon: iconMap.cellUser,
},
{
name: UITypes.CreatedTime,
icon: iconMap.datetime,
icon: iconMap.cellSystemDate,
},
{
name: UITypes.LastModifiedTime,
icon: iconMap.datetime,
icon: iconMap.cellSystemDate,
},
{
name: UITypes.CreatedBy,
icon: iconMap.phUser,
icon: iconMap.cellSystemUser,
},
{
name: UITypes.LastModifiedBy,
icon: iconMap.phUser,
icon: iconMap.cellSystemUser,
},
]
@ -162,15 +160,15 @@ const getUIDTIcon = (uidt: UITypes | string) => {
...uiTypes,
{
name: UITypes.CreatedTime,
icon: iconMap.calendar,
icon: iconMap.cellSystemDate,
},
{
name: UITypes.ID,
icon: ID,
icon: iconMap.cellSystemKey,
},
{
name: UITypes.ForeignKey,
icon: LinkVariant,
icon: iconMap.cellLinks,
},
].find((t) => t.name === uidt) || {}
).icon

66
packages/nc-gui/utils/iconUtils.ts

@ -130,6 +130,39 @@ import NcUnderline from '~icons/nc-icons/underline'
import NcCrop from '~icons/nc-icons/crop'
import NcLink from '~icons/nc-icons/link'
import NcCellBarcode from '~icons/nc-icons/cell-barcode'
import NcCellCheckbox from '~icons/nc-icons/cell-checkbox'
import NcCellDate from '~icons/nc-icons/cell-date'
import NcCellEmail from '~icons/nc-icons/cell-email'
import NcCellFormula from '~icons/nc-icons/cell-formula'
import NcCellCurrency from '~icons/nc-icons/cell-currency'
import NcCellDatetime from '~icons/nc-icons/cell-datetime'
import NcCellDb from '~icons/nc-icons/cell-db'
import NcCellDecimal from '~icons/nc-icons/cell-decimal'
import NcCellDuration from '~icons/nc-icons/cell-duration'
import NcCellGeometry from '~icons/nc-icons/cell-geometry'
import NcCellJson from '~icons/nc-icons/cell-json'
import NcCellLinks from '~icons/nc-icons/cell-link'
import NcCellLongText from '~icons/nc-icons/cell-longtext'
import NcCellLookup from '~icons/nc-icons/cell-lookup'
import NcCellMultiSelect from '~icons/nc-icons/cell-multiselect'
import NcCellNumber from '~icons/nc-icons/cell-number'
import NcCellPercent from '~icons/nc-icons/cell-percentage'
import NcCellPhone from '~icons/nc-icons/cell-phone'
import NcCellQrCode from '~icons/nc-icons/cell-qrcode'
import NcCellRating from '~icons/nc-icons/cell-rating'
import NcCellRollup from '~icons/nc-icons/cell-rollup'
import NcCellSingleSelect from '~icons/nc-icons/cell-select'
import NcCellText from '~icons/nc-icons/cell-text'
import NcCellTime from '~icons/nc-icons/cell-time'
import NcCellUrl from '~icons/nc-icons/cell-url'
import NcCellUser from '~icons/nc-icons/cell-user'
import NcCellSystemDate from '~icons/nc-icons/system-date'
import NcCellSystemKey from '~icons/nc-icons/system-key'
import NcCellSystemUser from '~icons/nc-icons/system-user'
import NcCellSystemText from '~icons/nc-icons/system-text'
import NcCellAttachment from '~icons/nc-icons/cell-attachment'
// keep it for reference
// todo: remove it after all icons are migrated
/* export const iconMapOld = {
@ -278,6 +311,39 @@ import NcLink from '~icons/nc-icons/link'
} as const */
export const iconMap = {
cellBarcode: NcCellBarcode,
cellCheckbox: NcCellCheckbox,
cellDate: NcCellDate,
cellEmail: NcCellEmail,
cellFormula: NcCellFormula,
cellCurrency: NcCellCurrency,
cellDatetime: NcCellDatetime,
cellDb: NcCellDb,
cellDecimal: NcCellDecimal,
cellDuration: NcCellDuration,
cellGeometry: NcCellGeometry,
cellJson: NcCellJson,
cellLinks: NcCellLinks,
cellLongText: NcCellLongText,
cellLookup: NcCellLookup,
cellMultiSelect: NcCellMultiSelect,
cellNumber: NcCellNumber,
cellPercent: NcCellPercent,
cellPhone: NcCellPhone,
cellQrCode: NcCellQrCode,
cellRating: NcCellRating,
cellRollup: NcCellRollup,
cellSingleSelect: NcCellSingleSelect,
cellText: NcCellText,
cellTime: NcCellTime,
cellUrl: NcCellUrl,
cellUser: NcCellUser,
cellSystemDate: NcCellSystemDate,
cellSystemKey: NcCellSystemKey,
cellSystemUser: NcCellSystemUser,
cellSystemText: NcCellSystemText,
cellAttachment: NcCellAttachment,
sort: Sort,
group: Group,
filter: Filter,

Loading…
Cancel
Save