Skip to content

Commit

Permalink
Removed Ifc.js to @bldrs-ai/ifclib. (bldrs-ai#252)
Browse files Browse the repository at this point in the history
* Removed Ifc.js to @bldrs-ai/ifclib.

* Upgrade @bldrs-ai/ifclib to use default namespace imports.
  • Loading branch information
pablo-mayrgundter authored Jul 23, 2022
1 parent 9e2aa9a commit 2d23baf
Show file tree
Hide file tree
Showing 10 changed files with 1,415 additions and 1,560 deletions.
555 changes: 304 additions & 251 deletions docs/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bldrs",
"version": "1.0.0-r383",
"version": "1.0.0-r364",
"main": "src/index.jsx",
"homepage": "https://github.com/bldrs-ai/Share",
"bugs": {
Expand All @@ -21,6 +21,7 @@
},
"dependencies": {
"@babel/core": "^7.17.9",
"@bldrs-ai/ifclib": "^5.3.3",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@mui/icons-material": "^5.1.1",
Expand Down Expand Up @@ -89,7 +90,7 @@
"^.+\\.svg$": "<rootDir>/svgTransform.js"
},
"transformIgnorePatterns": [
"/node_modules/(?!(web-ifc|web-ifc-three|web-ifc-viewer|three)/)"
"/node_modules/(?!(web-ifc|web-ifc-three|web-ifc-viewer|three|@bldrs-ai)/)"
],
"moduleNameMapper": {
"^.+\\.css$": "identity-obj-proxy"
Expand Down
2 changes: 1 addition & 1 deletion src/Components/ItemProperties.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Switch from '@mui/material/Switch'
import Tooltip from '@mui/material/Tooltip'
import Typography from '@mui/material/Typography'
import {makeStyles, useTheme} from '@mui/styles'
import {decodeIFCString, deref} from '../utils/Ifc'
import {decodeIFCString, deref} from '@bldrs-ai/ifclib'
import debug from '../utils/debug'
import {stoi} from '../utils/strings'
import ExpansionPanel from './ExpansionPanel'
Expand Down
16 changes: 9 additions & 7 deletions src/Components/NavTree.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react'
import {Link as RouterLink} from 'react-router-dom'
import TreeItem, {useTreeItem} from '@mui/lab/TreeItem'
import PropTypes from 'prop-types'
import clsx from 'clsx'
import {Link as RouterLink} from 'react-router-dom'
import TreeItem, {useTreeItem} from '@mui/lab/TreeItem'
import Typography from '@mui/material/Typography'
import {reifyName} from '../utils/Ifc'
import {reifyName} from '@bldrs-ai/ifclib'
import {computeElementPath} from '../utils/TreeUtils'


Expand Down Expand Up @@ -102,13 +102,14 @@ export default function NavTree({
[classes.disabled]: disabled,
})}
onMouseDown={handleMouseDown}
ref={ref}>
ref={ref}
>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,
jsx-a11y/no-static-element-interactions */}
<div onClick={handleExpansionClick} style={{marginLeft: 10}}>
{icon}
</div>
<Typography onClick={handleSelectionClick} >
<Typography onClick={handleSelectionClick}>
<RouterLink
to={
pathPrefix +
Expand Down Expand Up @@ -140,8 +141,9 @@ export default function NavTree({
return (
<CustomTreeItem
nodeId={element.expressID.toString()}
label={reifyName(model, element)}
onClick={() => onElementSelect(element)}>
label={reifyName({properties: model}, element)}
onClick={() => onElementSelect(element)}
>
{element.children && element.children.length > 0 ?
element.children.map((child) => {
const childKey = `${pathPrefix}-${i++}`
Expand Down
2 changes: 1 addition & 1 deletion src/Containers/CadView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export default function CadView({
searchIndex.clearIndex()
debug().log('CadView#initSearch: ', m, rootElt)
debug().time('build searchIndex')
searchIndex.indexElement(m, rootElt)
searchIndex.indexElement({properties: m}, rootElt)
debug().timeEnd('build searchIndex')
onSearchParams()
setShowSearchBar(true)
Expand Down
2 changes: 1 addition & 1 deletion src/Containers/SearchIndex.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Ifc from '../utils/Ifc'
import * as Ifc from '@bldrs-ai/ifclib'
import debug from '../utils/debug'
import {deleteProperties} from '../utils/objects'

Expand Down
176 changes: 0 additions & 176 deletions src/utils/Ifc.js

This file was deleted.

89 changes: 0 additions & 89 deletions src/utils/Ifc.test.js

This file was deleted.

Loading

0 comments on commit 2d23baf

Please sign in to comment.