@bimdata/design-system 2.1.0-rc.9 → 2.1.1-rc.1
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/package.json +2 -2
- package/src/BIMDataComponents/BIMDataDropdownList/_BIMDataDropdownList.scss +0 -1
- package/src/BIMDataComponents/BIMDataDropdownMenu/_BIMDataDropdownMenu.scss +0 -1
- package/src/BIMDataComponents/BIMDataFileIcon/BIMDataFileIcon.vue +4 -17
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/e57.svg +16 -0
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/index.js +47 -562
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/las.svg +16 -0
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/laz.svg +16 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAddGavel.vue +19 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconAddList.vue +19 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconCaret.vue +19 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconCreateSpace.vue +20 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconCreateZone.vue +20 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconFolderLocation.vue +20 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/{BIMDataIconDeploy.vue → BIMDataIconGavel.vue} +3 -3
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconNamingConvention.vue +20 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconPlan.vue +20 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconSpace2.vue +19 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconStructure.vue +19 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconUnknownFile.vue +19 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/BIMDataIconZone2.vue +19 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataIconStandalone/index.js +13 -1
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/AddGavel.vue +21 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/AddList.vue +27 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Caret.vue +3 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/CreateSpace.vue +17 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/CreateZone.vue +32 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/FolderLocation.vue +14 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Gavel.vue +5 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/List.vue +6 -12
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/NamingConvention.vue +12 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Plan.vue +7 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Space2.vue +9 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Structure.vue +7 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/UnknownFile.vue +10 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Warning.vue +1 -1
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Zone2.vue +24 -0
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/index.js +26 -2
- package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/CreateList.vue +214 -0
- package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/EmptyNamingConvention.vue +47 -0
- package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/ManageList.vue +206 -0
- package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/RenameFile.vue +175 -0
- package/src/BIMDataComponents/BIMDataIllustration/BIMDataLibraryIllustrations/index.js +10 -2
- package/src/BIMDataComponents/BIMDataInput/BIMDataInput.vue +3 -2
- package/src/BIMDataComponents/BIMDataInput/_BIMDataInput.scss +8 -8
- package/src/BIMDataComponents/BIMDataInputOutlined/BIMDataInputOutlined.vue +182 -0
- package/src/BIMDataComponents/BIMDataInputOutlined/_BIMDataInputOutlined.scss +96 -0
- package/src/BIMDataComponents/BIMDataList/BIMDataList.vue +106 -0
- package/src/BIMDataComponents/BIMDataRadio/BIMDataRadio.vue +8 -4
- package/src/BIMDataComponents/BIMDataRadio/_BIMDataRadio.scss +41 -32
- package/src/BIMDataComponents/BIMDataSearch/BIMDataSearch.vue +6 -1
- package/src/BIMDataComponents/BIMDataSearch/_BIMDataSearch.scss +6 -0
- package/src/BIMDataComponents/BIMDataSlider/_BIMDataSlider.scss +2 -0
- package/src/BIMDataComponents/BIMDataTable/BIMDataTable.vue +234 -34
- package/src/BIMDataComponents/BIMDataTable/_BIMDataTable.scss +4 -0
- package/src/BIMDataComponents/BIMDataTable/column-filters/ColumnFilters.vue +95 -0
- package/src/BIMDataComponents/BIMDataTable/column-filters/_ColumnFilters.scss +16 -0
- package/src/BIMDataComponents/BIMDataTable/column-sorting/ColumnSorting.vue +66 -0
- package/src/BIMDataComponents/BIMDataTable/table-row-selection.js +1 -1
- package/src/BIMDataComponents/BIMDataTree/BIMDataTree.vue +135 -0
- package/src/BIMDataComponents/BIMDataTree/Node.vue +265 -0
- package/src/BIMDataComponents/BIMDataTree/state.js +239 -0
- package/src/BIMDataComponents/index.js +3 -0
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/3g2.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/3ga.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/3gp.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/7z.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/aa.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/aac.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/accdb.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/accdt.svg +0 -39
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/adn.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ai.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/aif.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/aifc.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/aiff.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ait.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/amr.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ani.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/apk.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/app.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/asax.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ascx.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/asf.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ash.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ashx.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/asmx.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/asp.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/aspx.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/asx.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/au.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/aup.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/avi.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/axd.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/aze.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/bash.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/bat.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/bin.svg +0 -91
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/blank.svg +0 -14
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/bpg.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/browser.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/bz2.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/c.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cab.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/caf.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cal.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cd.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cer.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/class.svg +0 -42
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cmd.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/com.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/compile.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/config.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cpp.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cr2.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/crt.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/crypt.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cs.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/csh.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/csproj.svg +0 -38
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/css.svg +0 -42
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/cue.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dat.svg +0 -90
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/db.svg +0 -34
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dbf.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/deb.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dgn.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dll.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dmg.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dng.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/docb.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/docm.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/docx.svg +0 -40
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dot.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dotm.svg +0 -40
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dotx.svg +0 -39
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dpj.svg +0 -42
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/dtd.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/eot.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/eps.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/epub.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/exe.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/f4v.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/fax.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/fb2.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/fla.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/flac.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/flv.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/folder.svg +0 -13
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/folder2.svg +0 -10
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/gadget.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/gem.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/gif.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/gitignore.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/gpg.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/gz.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/h.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/htm.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/html.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ibooks.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ico.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ics.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/idx.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/iff.svg +0 -23
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/image.svg +0 -19
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/img.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/indd.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/inf.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ini.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/iso.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/jar.svg +0 -42
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/java.svg +0 -44
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/jpe.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/jpg.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/js.svg +0 -39
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/json.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/jsp.svg +0 -43
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/key.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/kf8.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ksh.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/less.svg +0 -40
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/licx.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/lit.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/log.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/lua.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/m2v.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/m3u.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/m3u8.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/m4a.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/m4r.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/m4v.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/master.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/md.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mdb.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mdf.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mid.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/midi.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mkv.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mobi.svg +0 -34
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mov.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mp2.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mpa.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mpd.svg +0 -51
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mpe.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mpeg.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mpg.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mpga.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mpp.svg +0 -51
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/mpt.svg +0 -50
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/msi.svg +0 -34
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/msu.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/nef.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/nes.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/odb.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/odt.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ogg.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ogv.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ost.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/otf.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ott.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ovf.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/p12.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/p7b.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pages.svg +0 -53
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/part.svg +0 -34
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pcd.svg +0 -23
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pdb.svg +0 -36
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pem.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pfx.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pgp.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/php.svg +0 -36
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/po.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pot.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/potx.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pps.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ppsx.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pptm.svg +0 -36
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pptx.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/prop.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ps.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/psd.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/psp.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pst.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/pub.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/py.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/qt.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ra.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ram.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/rar.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/raw.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/rb.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/rdf.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/resx.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/rm.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/rpm.svg +0 -34
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/rtf.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/rub.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/sass.svg +0 -43
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/scss.svg +0 -43
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/sdf.svg +0 -35
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/sh.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/sitemap.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/skin.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/sldm.svg +0 -37
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/sldx.svg +0 -36
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/sln.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/step.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/stl.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/swd.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/swf.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/swift.svg +0 -47
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/sys.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/tar.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/tcsh.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/tex.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/tga.svg +0 -26
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/tgz.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/tif.svg +0 -23
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/tiff.svg +0 -24
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/torrent.svg +0 -39
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ts.svg +0 -21
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/tsv.svg +0 -55
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/ttf.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/udf.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vb.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vbproj.svg +0 -36
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vcd.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vcs.svg +0 -45
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vdi.svg +0 -36
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vdx.svg +0 -42
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vmdk.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vob.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vsd.svg +0 -43
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vss.svg +0 -44
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vst.svg +0 -42
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vsx.svg +0 -43
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/vtx.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/war.svg +0 -43
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/wav.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/wbk.svg +0 -39
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/webinfo.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/webm.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/webp.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/wma.svg +0 -28
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/wmf.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/wmv.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/woff.svg +0 -40
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/woff2.svg +0 -42
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/wsf.svg +0 -30
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xaml.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xcf.svg +0 -41
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xlm.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xlsm.svg +0 -34
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xlsx.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xlt.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xltm.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xltx.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xml.svg +0 -31
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xpi.svg +0 -75
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xps.svg +0 -32
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xrb.svg +0 -34
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xspf.svg +0 -33
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/xz.svg +0 -27
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/yml.svg +0 -29
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/z.svg +0 -25
- package/src/BIMDataComponents/BIMDataFileIcon/file-icons/zsh.svg +0 -30
- package/src/BIMDataComponents/BIMDataIcon/BIMDataLibraryIcons/Deploy.vue +0 -3
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="bimdata-tree"
|
|
4
|
+
@mousedown="onTreeMouseDown"
|
|
5
|
+
@mouseenter="onMouseEnter"
|
|
6
|
+
@mouseleave="onMouseLeave"
|
|
7
|
+
@mouseup.self="onMouseUp"
|
|
8
|
+
>
|
|
9
|
+
<div class="bimdata-tree__nodes" @mouseleave="onNodesMouseLeave">
|
|
10
|
+
<Node
|
|
11
|
+
v-for="node of data"
|
|
12
|
+
:key="node.id"
|
|
13
|
+
:node="node"
|
|
14
|
+
:drag-and-drop="dragAndDrop"
|
|
15
|
+
>
|
|
16
|
+
<slot
|
|
17
|
+
name="node"
|
|
18
|
+
:node="node"
|
|
19
|
+
:depth="0"
|
|
20
|
+
:selected="node.id === state.selectedId"
|
|
21
|
+
:hovered="node.id === state.hoveredNode?.id"
|
|
22
|
+
:ancestor-selected="state.hasAncestorSelected(node)"
|
|
23
|
+
/>
|
|
24
|
+
</Node>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-if="dropHelperDisplayed" class="bimdata-tree__drop-helper"></div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
import { provide, computed, ref } from "vue";
|
|
32
|
+
|
|
33
|
+
import Node from "./Node.vue";
|
|
34
|
+
|
|
35
|
+
import useState from "./state.js";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @typedef { Object } Node
|
|
39
|
+
* @property { number } id
|
|
40
|
+
* @property { Array } [children=null]
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
components: {
|
|
45
|
+
Node,
|
|
46
|
+
},
|
|
47
|
+
provide() {
|
|
48
|
+
return {
|
|
49
|
+
root: this,
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
props: {
|
|
53
|
+
/**
|
|
54
|
+
* @type { NodeData }
|
|
55
|
+
*/
|
|
56
|
+
data: {
|
|
57
|
+
type: Array,
|
|
58
|
+
required: true,
|
|
59
|
+
validator: value => {
|
|
60
|
+
if (!Array.isArray(value)) return false;
|
|
61
|
+
|
|
62
|
+
const ids = new Set();
|
|
63
|
+
|
|
64
|
+
for (const node of value) {
|
|
65
|
+
if (!Number.isFinite(node?.id)) return false;
|
|
66
|
+
if (node.children && !Array.isArray(node.children)) return false;
|
|
67
|
+
ids.add(node.id);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return ids.size === value.length;
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
selectedId: {
|
|
74
|
+
type: Number,
|
|
75
|
+
default: null,
|
|
76
|
+
},
|
|
77
|
+
highlightedId: {
|
|
78
|
+
type: Number,
|
|
79
|
+
default: null,
|
|
80
|
+
},
|
|
81
|
+
dragAndDrop: {
|
|
82
|
+
type: Boolean,
|
|
83
|
+
default: false,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
emits: ["drop", "click", "hover"],
|
|
87
|
+
setup(props, { emit }) {
|
|
88
|
+
const state = useState(props, emit);
|
|
89
|
+
|
|
90
|
+
provide("state", state);
|
|
91
|
+
|
|
92
|
+
const onNodesMouseLeave = () => state.onNodesMouseLeave();
|
|
93
|
+
const onTreeMouseDown = () => state.onTreeMouseDown();
|
|
94
|
+
|
|
95
|
+
const hover = ref(false);
|
|
96
|
+
const onMouseEnter = () => {
|
|
97
|
+
hover.value = true;
|
|
98
|
+
};
|
|
99
|
+
const onMouseLeave = () => {
|
|
100
|
+
hover.value = false;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const onMouseUp = () => state.onTreeMouseUp();
|
|
104
|
+
|
|
105
|
+
const dropHelperDisplayed = computed(
|
|
106
|
+
() =>
|
|
107
|
+
props.dragAndDrop &&
|
|
108
|
+
hover.value &&
|
|
109
|
+
state.dragPosition !== null &&
|
|
110
|
+
state.hoveredNode === null
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
state,
|
|
115
|
+
dropHelperDisplayed,
|
|
116
|
+
onMouseEnter,
|
|
117
|
+
onMouseLeave,
|
|
118
|
+
onNodesMouseLeave,
|
|
119
|
+
onTreeMouseDown,
|
|
120
|
+
onMouseUp,
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
</script>
|
|
125
|
+
|
|
126
|
+
<style scoped lang="scss">
|
|
127
|
+
.bimdata-tree {
|
|
128
|
+
height: 100%;
|
|
129
|
+
|
|
130
|
+
&__drop-helper {
|
|
131
|
+
height: 2px;
|
|
132
|
+
background-color: var(--color-primary);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="nodeRef"
|
|
4
|
+
v-show="visible"
|
|
5
|
+
class="bimdata-tree__node"
|
|
6
|
+
:class="{
|
|
7
|
+
'bimdata-tree__node--selected': node.id === state.selectedId,
|
|
8
|
+
'bimdata-tree__node--ancestor-selected': hasAncestorSelected(node),
|
|
9
|
+
'bimdata-tree__node--highlighted': node.id === state.highlightedId,
|
|
10
|
+
}"
|
|
11
|
+
@mouseenter="onMouseEnter"
|
|
12
|
+
@mousedown="onMouseDown"
|
|
13
|
+
@mousemove="onMouseMove"
|
|
14
|
+
@mouseup="onMouseUp"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
v-if="dropHelperPosition === 'top' || dropHelperPosition === 'bottom'"
|
|
18
|
+
class="bimdata-tree__node__drop-helper"
|
|
19
|
+
:style="`--drop-helper-top: ${
|
|
20
|
+
dropHelperPosition === 'top' ? '0px' : '30px'
|
|
21
|
+
};`"
|
|
22
|
+
></div>
|
|
23
|
+
<div
|
|
24
|
+
class="bimdata-tree__node__content"
|
|
25
|
+
:style="`padding-left: calc(var(--spacing-unit) * 2 * ${depth});`"
|
|
26
|
+
>
|
|
27
|
+
<div class="bimdata-tree__node__content__arrow" @mousedown.stop>
|
|
28
|
+
<div
|
|
29
|
+
v-if="node.children?.length > 0"
|
|
30
|
+
class="bimdata-tree__node__content__arrow__content"
|
|
31
|
+
@click="expanded = !expanded"
|
|
32
|
+
>
|
|
33
|
+
<BIMDataIcon name="chevron" size="xxxs" :rotate="expanded ? 90 : 0" />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="bimdata-tree__node__content__element">
|
|
38
|
+
<slot>
|
|
39
|
+
{{ node.label }}
|
|
40
|
+
</slot>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<NodeChildren
|
|
45
|
+
v-if="node.children?.length > 0 && expanded"
|
|
46
|
+
:node="node"
|
|
47
|
+
:depth="depth + 1"
|
|
48
|
+
:drag-and-drop="dragAndDrop"
|
|
49
|
+
/>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
import { inject, ref, computed, watch, isRef, h } from "vue";
|
|
54
|
+
|
|
55
|
+
let Node, NodeChildren;
|
|
56
|
+
|
|
57
|
+
NodeChildren = {
|
|
58
|
+
inject: ["root"],
|
|
59
|
+
props: {
|
|
60
|
+
node: {
|
|
61
|
+
type: Object,
|
|
62
|
+
required: true,
|
|
63
|
+
validator: node => Number.isFinite(node?.id),
|
|
64
|
+
},
|
|
65
|
+
depth: {
|
|
66
|
+
type: Number,
|
|
67
|
+
default: 0,
|
|
68
|
+
},
|
|
69
|
+
dragAndDrop: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
render() {
|
|
75
|
+
const { node, depth, dragAndDrop, root } = this;
|
|
76
|
+
|
|
77
|
+
const state = root.state;
|
|
78
|
+
|
|
79
|
+
return node.children.map(child =>
|
|
80
|
+
h(Node, { node: child, depth, dragAndDrop, key: child.id }, () =>
|
|
81
|
+
root.$slots.node?.({
|
|
82
|
+
node: child,
|
|
83
|
+
depth,
|
|
84
|
+
selected: child.id === state.selectedId,
|
|
85
|
+
hovered: child.id === state.hoveredNode?.id,
|
|
86
|
+
ancestorSelected: state.hasAncestorSelected(child),
|
|
87
|
+
dragAndDrop,
|
|
88
|
+
})
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
Node = {
|
|
95
|
+
name: "Node",
|
|
96
|
+
components: {
|
|
97
|
+
NodeChildren,
|
|
98
|
+
},
|
|
99
|
+
inject: ["root"],
|
|
100
|
+
props: {
|
|
101
|
+
node: {
|
|
102
|
+
type: Object,
|
|
103
|
+
required: true,
|
|
104
|
+
},
|
|
105
|
+
depth: {
|
|
106
|
+
type: Number,
|
|
107
|
+
default: 0,
|
|
108
|
+
},
|
|
109
|
+
dragAndDrop: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: false,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
setup(props) {
|
|
115
|
+
const state = inject("state");
|
|
116
|
+
|
|
117
|
+
let visible = null;
|
|
118
|
+
if (isRef(props.node.visibleRef)) {
|
|
119
|
+
visible = props.node.visibleRef;
|
|
120
|
+
} else {
|
|
121
|
+
visible = ref(true);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
let expanded = null;
|
|
125
|
+
if (isRef(props.node.expandedRef)) {
|
|
126
|
+
expanded = props.node.expandedRef;
|
|
127
|
+
} else {
|
|
128
|
+
expanded = ref(false);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const nodeRef = ref(null);
|
|
132
|
+
|
|
133
|
+
let expandTimer = null;
|
|
134
|
+
|
|
135
|
+
const handleExpandTimer = () => {
|
|
136
|
+
if (
|
|
137
|
+
!props.node.children?.length ||
|
|
138
|
+
!state.dragPosition ||
|
|
139
|
+
state.hoveredNode?.id !== props.node.id ||
|
|
140
|
+
expanded.value
|
|
141
|
+
) {
|
|
142
|
+
clearTimeout(expandTimer);
|
|
143
|
+
expandTimer = null;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const position = state.getNodeDropPosition(props.node, nodeRef.value);
|
|
148
|
+
|
|
149
|
+
if (position !== "center" && position !== "bottom") {
|
|
150
|
+
clearTimeout(expandTimer);
|
|
151
|
+
expandTimer = null;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (expandTimer !== null) return;
|
|
156
|
+
|
|
157
|
+
expandTimer = setTimeout(() => {
|
|
158
|
+
expanded.value = true;
|
|
159
|
+
expandTimer = null;
|
|
160
|
+
}, 500);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
watch(() => state.dragPosition && state.hoveredNode, handleExpandTimer);
|
|
164
|
+
|
|
165
|
+
const onMouseEnter = () => state.onNodeMouseEnter(props.node);
|
|
166
|
+
|
|
167
|
+
const onMouseDown = mouseEvent =>
|
|
168
|
+
state.onNodeMouseDown(props.node, mouseEvent);
|
|
169
|
+
|
|
170
|
+
const onMouseMove = mouseEvent => {
|
|
171
|
+
state.onNodeMouseMove(mouseEvent);
|
|
172
|
+
handleExpandTimer();
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const dropHelperPosition = computed(() => {
|
|
176
|
+
if (
|
|
177
|
+
!props.dragAndDrop ||
|
|
178
|
+
!state.dragPosition ||
|
|
179
|
+
state.hoveredNode?.id !== props.node.id
|
|
180
|
+
)
|
|
181
|
+
return null;
|
|
182
|
+
|
|
183
|
+
return state.getNodeDropPosition(props.node, nodeRef.value);
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
const onMouseUp = () =>
|
|
187
|
+
state.onNodeMouseUp(props.node, nodeRef.value, expanded.value);
|
|
188
|
+
|
|
189
|
+
return {
|
|
190
|
+
state,
|
|
191
|
+
nodeRef,
|
|
192
|
+
expanded,
|
|
193
|
+
visible,
|
|
194
|
+
dropHelperPosition,
|
|
195
|
+
hasAncestorSelected: state.hasAncestorSelected,
|
|
196
|
+
onMouseEnter,
|
|
197
|
+
onMouseDown,
|
|
198
|
+
onMouseMove,
|
|
199
|
+
onMouseUp,
|
|
200
|
+
};
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export default Node;
|
|
205
|
+
</script>
|
|
206
|
+
|
|
207
|
+
<style scoped lang="scss">
|
|
208
|
+
.bimdata-tree__node {
|
|
209
|
+
height: 32px;
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
position: relative;
|
|
213
|
+
|
|
214
|
+
user-select: none;
|
|
215
|
+
|
|
216
|
+
&__drop-helper {
|
|
217
|
+
position: absolute;
|
|
218
|
+
left: 0px;
|
|
219
|
+
right: 0px;
|
|
220
|
+
height: 2px;
|
|
221
|
+
top: var(--drop-helper-top);
|
|
222
|
+
background-color: var(--color-primary);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&--selected {
|
|
226
|
+
background-color: var(--color-secondary-light);
|
|
227
|
+
}
|
|
228
|
+
&--ancestor-selected {
|
|
229
|
+
background-color: var(--color-secondary-lighter);
|
|
230
|
+
}
|
|
231
|
+
&--highlighted {
|
|
232
|
+
outline-offset: -1px;
|
|
233
|
+
outline: solid var(--color-primary) 1px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&__content {
|
|
237
|
+
width: 100%;
|
|
238
|
+
height: 100%;
|
|
239
|
+
display: flex;
|
|
240
|
+
border-radius: 6px;
|
|
241
|
+
padding: 0 calc(var(--spacing-unit) / 2);
|
|
242
|
+
|
|
243
|
+
&__arrow {
|
|
244
|
+
width: 18px;
|
|
245
|
+
flex-shrink: 0;
|
|
246
|
+
|
|
247
|
+
&__content {
|
|
248
|
+
cursor: pointer;
|
|
249
|
+
height: 100%;
|
|
250
|
+
display: flex;
|
|
251
|
+
justify-content: center;
|
|
252
|
+
align-items: center;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
&__element {
|
|
257
|
+
padding-left: calc(var(--spacing-unit) / 2);
|
|
258
|
+
width: calc(100% - 18px);
|
|
259
|
+
height: 100%;
|
|
260
|
+
display: flex;
|
|
261
|
+
align-items: center;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
</style>
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { shallowReactive, watch, shallowRef } from "vue";
|
|
2
|
+
|
|
3
|
+
export default function useState(props, emit) {
|
|
4
|
+
const state = shallowReactive({
|
|
5
|
+
selectedId: null,
|
|
6
|
+
highlightedId: null,
|
|
7
|
+
hoveredNode: null,
|
|
8
|
+
trees: props.data,
|
|
9
|
+
dragPosition: null,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
watch(
|
|
13
|
+
() => props.selectedId,
|
|
14
|
+
() => {
|
|
15
|
+
state.selectedId = props.selectedId ?? null;
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
watch(
|
|
20
|
+
() => props.highlightedId,
|
|
21
|
+
() => {
|
|
22
|
+
state.highlightedId = props.highlightedId ?? null;
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
watch(
|
|
27
|
+
() => state.hoveredNode,
|
|
28
|
+
() => emit("hover", state.hoveredNode)
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const pressedNode = shallowRef(null);
|
|
32
|
+
|
|
33
|
+
watch(
|
|
34
|
+
() => props.data,
|
|
35
|
+
trees => {
|
|
36
|
+
state.trees = trees;
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const onMouseUp = () => {
|
|
41
|
+
pressedNode.value = null;
|
|
42
|
+
state.dragPosition = null;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const onNodeMouseEnter = node => {
|
|
46
|
+
state.hoveredNode = node;
|
|
47
|
+
};
|
|
48
|
+
const onNodeMouseDown = (node, event) => {
|
|
49
|
+
event.stopPropagation();
|
|
50
|
+
|
|
51
|
+
emit("click", node);
|
|
52
|
+
|
|
53
|
+
pressedNode.value = node;
|
|
54
|
+
|
|
55
|
+
window.addEventListener("mouseup", onMouseUp, { once: true });
|
|
56
|
+
};
|
|
57
|
+
const onNodeMouseMove = event => {
|
|
58
|
+
if (!pressedNode.value) return;
|
|
59
|
+
|
|
60
|
+
const { clientX, clientY } = event;
|
|
61
|
+
|
|
62
|
+
state.dragPosition = { x: clientX, y: clientY };
|
|
63
|
+
};
|
|
64
|
+
const onNodeMouseUp = (node, domElement, expanded) => {
|
|
65
|
+
if (!props.dragAndDrop || !state.dragPosition) return;
|
|
66
|
+
|
|
67
|
+
if (state.hoveredNode?.id === pressedNode.value?.id) return;
|
|
68
|
+
|
|
69
|
+
if (state.isDescendant(node, pressedNode.value)) return;
|
|
70
|
+
|
|
71
|
+
const position = getNodeDropPosition(node, domElement);
|
|
72
|
+
|
|
73
|
+
let parent = null;
|
|
74
|
+
let index = null;
|
|
75
|
+
const previousParent = getParent(pressedNode.value);
|
|
76
|
+
|
|
77
|
+
switch (position) {
|
|
78
|
+
case "top":
|
|
79
|
+
parent = getParent(node);
|
|
80
|
+
index = (parent?.children ?? state.trees).findIndex(
|
|
81
|
+
child => child.id === node.id
|
|
82
|
+
);
|
|
83
|
+
break;
|
|
84
|
+
case "bottom":
|
|
85
|
+
if (node.children && expanded) {
|
|
86
|
+
parent = node;
|
|
87
|
+
index = 0;
|
|
88
|
+
} else {
|
|
89
|
+
parent = getParent(node);
|
|
90
|
+
index =
|
|
91
|
+
(parent?.children ?? state.trees).findIndex(
|
|
92
|
+
child => child.id === node.id
|
|
93
|
+
) + 1;
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case "center":
|
|
97
|
+
parent = node;
|
|
98
|
+
index = 0;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const reorder = parent?.id === previousParent?.id;
|
|
103
|
+
const previousIndex = (previousParent?.children ?? state.trees).findIndex(
|
|
104
|
+
child => child.id === pressedNode.value.id
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
if (
|
|
108
|
+
reorder &&
|
|
109
|
+
(position === "top" || position === "bottom") &&
|
|
110
|
+
previousIndex < index
|
|
111
|
+
) {
|
|
112
|
+
index--;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (reorder && index === previousIndex) return;
|
|
116
|
+
|
|
117
|
+
emit("drop", {
|
|
118
|
+
node: pressedNode.value,
|
|
119
|
+
previousParent,
|
|
120
|
+
parent,
|
|
121
|
+
index,
|
|
122
|
+
position,
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const onNodesMouseLeave = () => {
|
|
127
|
+
state.hoveredNode = null;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const onTreeMouseDown = () => {
|
|
131
|
+
emit("click", null);
|
|
132
|
+
};
|
|
133
|
+
const onTreeMouseUp = () => {
|
|
134
|
+
if (!props.dragAndDrop || !state.dragPosition) return;
|
|
135
|
+
|
|
136
|
+
if (state.trees.indexOf(pressedNode.value) === state.trees.length - 1) {
|
|
137
|
+
// to drop the last root node at the end of the list does not fire the drop event
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const nodeIsInRootPosition = state.trees.includes(pressedNode.value);
|
|
142
|
+
|
|
143
|
+
emit("drop", {
|
|
144
|
+
node: pressedNode.value,
|
|
145
|
+
parent: null,
|
|
146
|
+
index: nodeIsInRootPosition ? state.trees.length - 1 : state.trees.length,
|
|
147
|
+
previousParent: getParent(pressedNode.value),
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
state.onNodeMouseEnter = onNodeMouseEnter;
|
|
152
|
+
state.onNodeMouseDown = onNodeMouseDown;
|
|
153
|
+
state.onNodeMouseMove = onNodeMouseMove;
|
|
154
|
+
state.onNodeMouseUp = onNodeMouseUp;
|
|
155
|
+
|
|
156
|
+
state.onNodesMouseLeave = onNodesMouseLeave;
|
|
157
|
+
|
|
158
|
+
state.onTreeMouseDown = onTreeMouseDown;
|
|
159
|
+
state.onTreeMouseUp = onTreeMouseUp;
|
|
160
|
+
|
|
161
|
+
// UTILS
|
|
162
|
+
|
|
163
|
+
const getNodeDropPosition = (node, domElement) => {
|
|
164
|
+
const { y } = state.dragPosition;
|
|
165
|
+
|
|
166
|
+
const { top, height } = domElement.getBoundingClientRect();
|
|
167
|
+
|
|
168
|
+
if (node.children) {
|
|
169
|
+
if (y < top + height / 3) return "top";
|
|
170
|
+
if (y > top + (height * 2) / 3) return "bottom";
|
|
171
|
+
|
|
172
|
+
return "center";
|
|
173
|
+
} else {
|
|
174
|
+
if (y < top + height / 2) return "top";
|
|
175
|
+
|
|
176
|
+
return "bottom";
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const getParent = (node, nodes = state.trees) => {
|
|
181
|
+
for (const childNode of nodes) {
|
|
182
|
+
if (childNode.children?.length) {
|
|
183
|
+
if (childNode.children.some(child => child.id === node.id)) {
|
|
184
|
+
return childNode;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const expectedParent = getParent(node, childNode.children);
|
|
188
|
+
|
|
189
|
+
if (expectedParent) return expectedParent;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const isAncestor = (node, nodes = state.trees) => {
|
|
195
|
+
for (const childNode of nodes) {
|
|
196
|
+
if (childNode.id === node.id) {
|
|
197
|
+
return true;
|
|
198
|
+
}
|
|
199
|
+
if (childNode.children?.length && isAncestor(node, childNode.children)) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return false;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
const getAncestors = (node, nodes = state.trees) => {
|
|
207
|
+
const ancestors = [];
|
|
208
|
+
for (const childNode of nodes) {
|
|
209
|
+
if (childNode.id === node.id) {
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
if (childNode.children?.length && isAncestor(node, childNode.children)) {
|
|
213
|
+
ancestors.push(childNode, ...getAncestors(node, childNode.children));
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return ancestors;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
const hasAncestorSelected = node => {
|
|
220
|
+
if (state.selectedId === null) return false;
|
|
221
|
+
|
|
222
|
+
return getAncestors(node).some(
|
|
223
|
+
ancestor => ancestor.id === state.selectedId
|
|
224
|
+
);
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const isDescendant = (node, ancestor) =>
|
|
228
|
+
ancestor?.children?.some(
|
|
229
|
+
child => child.id === node.id || isDescendant(node, child)
|
|
230
|
+
) ?? false;
|
|
231
|
+
|
|
232
|
+
state.getNodeDropPosition = getNodeDropPosition;
|
|
233
|
+
state.getParent = getParent;
|
|
234
|
+
state.getAncestors = getAncestors;
|
|
235
|
+
state.hasAncestorSelected = hasAncestorSelected;
|
|
236
|
+
state.isDescendant = isDescendant;
|
|
237
|
+
|
|
238
|
+
return state;
|
|
239
|
+
}
|
|
@@ -21,6 +21,8 @@ export { default as BIMDataIcon } from "./BIMDataIcon/BIMDataIcon.vue";
|
|
|
21
21
|
export * from "./BIMDataIcon/BIMDataIconStandalone/index.js";
|
|
22
22
|
export { default as BIMDataIllustration } from "./BIMDataIllustration/BIMDataIllustration.vue";
|
|
23
23
|
export { default as BIMDataInput } from "./BIMDataInput/BIMDataInput.vue";
|
|
24
|
+
export { default as BIMDataInputOutlined } from "./BIMDataInputOutlined/BIMDataInputOutlined.vue";
|
|
25
|
+
export { default as BIMDataList } from "./BIMDataList/BIMDataList.vue";
|
|
24
26
|
export { default as BIMDataLoading } from "./BIMDataLoading/BIMDataLoading.vue";
|
|
25
27
|
export { default as BIMDataMenu } from "./BIMDataMenu/BIMDataMenu.vue";
|
|
26
28
|
export { default as BIMDataMenuInline } from "./BIMDataMenuInline/BIMDataMenuInline.vue";
|
|
@@ -43,3 +45,4 @@ export { default as BIMDataTextarea } from "./BIMDataTextarea/BIMDataTextarea.vu
|
|
|
43
45
|
export { default as BIMDataTextbox } from "./BIMDataTextbox/BIMDataTextbox.vue";
|
|
44
46
|
export { default as BIMDataToggle } from "./BIMDataToggle/BIMDataToggle.vue";
|
|
45
47
|
export { default as BIMDataTooltip } from "./BIMDataTooltip/BIMDataTooltip.vue";
|
|
48
|
+
export { default as BIMDataTree } from "./BIMDataTree/BIMDataTree.vue";
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
-
viewBox="0 0 72 96" style="enable-background:new 0 0 72 96;" xml:space="preserve">
|
|
5
|
-
<style type="text/css">
|
|
6
|
-
.st0{fill:#FF6600;}
|
|
7
|
-
.st1{fill:#FFFFFF;}
|
|
8
|
-
</style>
|
|
9
|
-
<g>
|
|
10
|
-
<path class="st0" d="M0,2l0,92c0,1.1,0.9,2,2,2h68c1.1,0,2-0.9,2-2V28H50c-1.1,0-2-0.9-2-2V0L2,0C0.9,0,0,0.9,0,2z"/>
|
|
11
|
-
<path class="st0" d="M71.9,24c-0.1-0.4-0.2-0.7-0.4-1L52,1.2V24H71.9z"/>
|
|
12
|
-
</g>
|
|
13
|
-
<rect x="6" y="41" class="st1" width="60" height="49"/>
|
|
14
|
-
<g>
|
|
15
|
-
<path class="st1" d="M7.5,17c0.4,0.4,1.1,0.7,1.7,0.7c0.9,0,1.6-0.4,1.6-1.6c0-1-0.7-1.5-2.3-1.5H7.6L7,12.8l2-2.5
|
|
16
|
-
c0.5-0.6,0.9-1,0.9-1v0c0,0-0.4,0.1-1.1,0.1H6.5V6.4h7.2V9l-2.6,3.1c2,0.5,3.1,2.1,3.1,4.1c0,2.4-1.4,4.8-4.7,4.8
|
|
17
|
-
c-1.3,0-2.5-0.4-3.5-1.3L7.5,17z"/>
|
|
18
|
-
<path class="st1" d="M23.1,6.1c1.4,0,2.9,0.4,3.9,1.3l-1.4,2.8c-0.6-0.6-1.4-0.9-2.3-0.9c-2.2,0-3.2,1.9-3.2,4.2
|
|
19
|
-
c0,2.6,1.2,4.3,2.9,4.3c0.6,0,1.3-0.2,1.7-0.6v-1.7h-1.5v-2.9h4.3v8.1h-2.6v-0.4c0-0.2,0-0.5,0-0.5h0c-0.5,0.7-1.6,1.2-2.7,1.2
|
|
20
|
-
c-2.8,0-5.6-2.7-5.6-7.3C16.8,9.2,19.3,6.1,23.1,6.1z"/>
|
|
21
|
-
<path class="st1" d="M30.7,19.1c0-5,4.5-5.5,4.5-8.4c0-1-0.5-1.4-1.2-1.4c-0.6,0-1.1,0.3-1.4,0.8l-2.2-1.8c0.8-1.1,2.3-2.1,4.1-2.1
|
|
22
|
-
c2.1,0,4.2,1.3,4.2,4.2c0,4.1-4.2,5.4-4.4,7.5h4.6v2.9h-7.9C30.8,20.1,30.7,19.7,30.7,19.1z"/>
|
|
23
|
-
</g>
|
|
24
|
-
<path class="st0" d="M13,83.1h46V47.9H13V83.1z M21.9,80.4h-5.5v-3.9h5.5V80.4L21.9,80.4z M38.8,80.4h-5.5v-3.9h5.5L38.8,80.4
|
|
25
|
-
L38.8,80.4z M50.1,50.3h5.5v4h-5.5V50.3z M50.1,76.4h5.5v3.9h-5.5L50.1,76.4L50.1,76.4z M41.6,50.3H47v3.9h-5.5V50.3z M41.6,76.4H47
|
|
26
|
-
v3.9h-5.5L41.6,76.4L41.6,76.4z M33.2,50.3h5.5v3.9h-5.5V50.3z M32.4,60l7.2,4.1c1.3,0.8,1.3,2,0,2.8L32.4,71
|
|
27
|
-
c-1.3,0.8-2.4,0.1-2.4-1.4v-8.3C30,59.9,31.1,59.2,32.4,60z M24.7,50.3h5.4v3.9h-5.4V50.3z M24.7,76.4h5.4v3.9h-5.4V76.4L24.7,76.4z
|
|
28
|
-
M16.4,50.3h5.5v4h-5.5V50.3z"/>
|
|
29
|
-
</svg>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
-
viewBox="0 0 72 96" style="enable-background:new 0 0 72 96;" xml:space="preserve">
|
|
5
|
-
<style type="text/css">
|
|
6
|
-
.st0{fill:#003399;}
|
|
7
|
-
.st1{fill:#FFFFFF;}
|
|
8
|
-
</style>
|
|
9
|
-
<g>
|
|
10
|
-
<path class="st0" d="M0,2l0,92c0,1.1,0.9,2,2,2h68c1.1,0,2-0.9,2-2V28H50c-1.1,0-2-0.9-2-2V0L2,0C0.9,0,0,0.9,0,2z"/>
|
|
11
|
-
<path class="st0" d="M71.9,24c-0.1-0.4-0.2-0.7-0.4-1L52,1.2V24H71.9z"/>
|
|
12
|
-
</g>
|
|
13
|
-
<rect x="6" y="41" class="st1" width="60" height="49"/>
|
|
14
|
-
<g>
|
|
15
|
-
<path class="st1" d="M7.5,17c0.4,0.4,1.1,0.7,1.7,0.7c0.9,0,1.6-0.4,1.6-1.6c0-1-0.7-1.5-2.3-1.5H7.6L7,12.8l2-2.5
|
|
16
|
-
c0.5-0.6,0.9-1,0.9-1v0c0,0-0.4,0.1-1.1,0.1H6.5V6.4h7.2V9l-2.6,3.1c2,0.5,3.1,2.1,3.1,4.1c0,2.4-1.4,4.8-4.7,4.8
|
|
17
|
-
c-1.3,0-2.5-0.4-3.5-1.3L7.5,17z"/>
|
|
18
|
-
<path class="st1" d="M23.1,6.1c1.4,0,2.9,0.4,3.9,1.3l-1.4,2.8c-0.6-0.6-1.4-0.9-2.3-0.9c-2.2,0-3.2,1.9-3.2,4.2
|
|
19
|
-
c0,2.6,1.2,4.3,2.9,4.3c0.6,0,1.3-0.2,1.7-0.6v-1.7h-1.5v-2.9h4.3v8.1h-2.6v-0.4c0-0.2,0-0.5,0-0.5h0c-0.5,0.7-1.6,1.2-2.7,1.2
|
|
20
|
-
c-2.8,0-5.6-2.7-5.6-7.3C16.8,9.2,19.3,6.1,23.1,6.1z"/>
|
|
21
|
-
<path class="st1" d="M33.4,6.4h3.6l3.6,14.3h-3.3l-0.6-3h-3l-0.6,3h-3.3L33.4,6.4z M36.2,15l-0.6-2.8c-0.2-0.9-0.4-2.5-0.4-2.5
|
|
22
|
-
h-0.1c0,0-0.2,1.5-0.4,2.5L34.2,15H36.2z"/>
|
|
23
|
-
</g>
|
|
24
|
-
<path class="st0" d="M47,66c-3.1-1.2-6.7,0.3-8,3.4c-1.2,3.1,0.3,6.7,3.4,8c0.6,0.3,1.3,0.4,2,0.4c3.5,0.1,6.4-2.6,6.4-6
|
|
25
|
-
c0-7.8,0-15.5,0-23.3c0-0.2,0-0.3,0-0.6c-0.2,0-0.3,0.1-0.5,0.1c-6.8,1.9-13.5,3.9-20.3,5.8c-0.6,0.2-0.6,0.5-0.6,1v16.8
|
|
26
|
-
c-0.5-0.2-0.7-0.3-1.1-0.4c-2.5-0.9-4.7-0.4-6.5,1.4c-1.8,1.7-2.3,4.3-1.3,6.6c1.3,3.1,4.9,4.6,8,3.4c2.3-1,3.8-3.2,3.8-5.7
|
|
27
|
-
c0-5.2,0-10.4,0-15.6c0-0.7,0.2-0.9,0.9-1.1c3.3-0.9,6.6-1.9,10-2.8l4.8-1.4v10.4C47.5,66.2,47.3,66.1,47,66z"/>
|
|
28
|
-
</svg>
|