test-stpr-ui-kit 0.7.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -9
- package/dist/components/Accordion/Accordion.css +1 -0
- package/dist/components/Accordion/Accordion.d.ts +3 -0
- package/dist/components/Accordion/Accordion.js +78 -0
- package/dist/components/Accordion/Accordion.module.scss.js +37 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/types/index.d.ts +22 -0
- package/dist/components/ApplyButtons/ApplyButtons.css +1 -0
- package/dist/components/ApplyButtons/ApplyButtons.d.ts +3 -0
- package/dist/components/ApplyButtons/ApplyButtons.js +67 -0
- package/dist/components/ApplyButtons/ApplyButtons.module.scss.js +16 -0
- package/dist/components/ApplyButtons/index.d.ts +2 -0
- package/dist/components/ApplyButtons/types/index.d.ts +24 -0
- package/dist/components/AuthProtected/AuthProtected.d.ts +3 -0
- package/dist/components/AuthProtected/AuthProtected.js +37 -0
- package/dist/components/AuthProtected/index.d.ts +2 -0
- package/dist/components/AuthProtected/types/index.d.ts +11 -0
- package/dist/components/BaseTooltip/BaseTooltip.css +1 -0
- package/dist/components/BaseTooltip/BaseTooltip.d.ts +3 -0
- package/dist/components/BaseTooltip/BaseTooltip.js +25 -0
- package/dist/components/BaseTooltip/BaseTooltip.module.scss.js +11 -0
- package/dist/components/BaseTooltip/index.d.ts +2 -0
- package/dist/components/BaseTooltip/types/index.d.ts +8 -0
- package/dist/components/Breadcrumb/Breadcrumb.css +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +42 -0
- package/dist/components/Breadcrumb/Breadcrumb.module.scss.js +17 -0
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Breadcrumb/types/index.d.ts +11 -0
- package/dist/components/Button/Button.css +1 -0
- package/dist/components/Button/Button.d.ts +3 -0
- package/dist/components/Button/Button.js +74 -0
- package/dist/components/Button/Button.module.scss.js +33 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/types/index.d.ts +24 -0
- package/dist/components/Checkbox/Checkbox.css +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +72 -0
- package/dist/components/Checkbox/Checkbox.module.scss.js +33 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/types/index.d.ts +24 -0
- package/dist/components/Confirm/Confirm.d.ts +3 -0
- package/dist/components/Confirm/Confirm.js +85 -0
- package/dist/components/Confirm/index.d.ts +2 -0
- package/dist/components/Confirm/types/index.d.ts +7 -0
- package/dist/components/ContextMenu/ContextMenu.css +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -0
- package/dist/components/ContextMenu/ContextMenu.js +39 -0
- package/dist/components/ContextMenu/ContextMenu.module.scss.js +13 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/ContextMenu/types/index.d.ts +12 -0
- package/dist/components/DatePicker/DatePicker.css +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.js +198 -0
- package/dist/components/DatePicker/DatePicker.module.scss.js +31 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/types/index.d.ts +33 -0
- package/dist/components/DatePickerInput/DatePickerInput.css +1 -0
- package/dist/components/DatePickerInput/DatePickerInput.d.ts +3 -0
- package/dist/components/DatePickerInput/DatePickerInput.js +101 -0
- package/dist/components/DatePickerInput/DatePickerInput.module.scss.js +25 -0
- package/dist/components/DatePickerInput/index.d.ts +2 -0
- package/dist/components/DatePickerInput/types/index.d.ts +32 -0
- package/dist/components/DefaultDropzone/DefaultDropzone.d.ts +3 -0
- package/dist/components/DefaultDropzone/DefaultDropzone.js +11 -0
- package/dist/components/DefaultDropzone/hooks/useDefaultDropzone.d.ts +2 -0
- package/dist/components/DefaultDropzone/hooks/useDefaultDropzone.js +5 -0
- package/dist/components/DefaultDropzone/index.d.ts +2 -0
- package/dist/components/DefaultDropzone/types/index.d.ts +10 -0
- package/dist/components/Dropdown/Dropdown.css +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.js +68 -0
- package/dist/components/Dropdown/Dropdown.module.scss.js +21 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Dropdown/types/index.d.ts +14 -0
- package/dist/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.css +1 -0
- package/dist/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.d.ts +3 -0
- package/dist/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.js +75 -0
- package/dist/components/EllipsisTextWithTooltip/EllipsisTextWithTooltip.module.scss.js +11 -0
- package/dist/components/EllipsisTextWithTooltip/index.d.ts +2 -0
- package/dist/components/EllipsisTextWithTooltip/types/index.d.ts +13 -0
- package/dist/components/EllipsisTextWithTooltip/utils/index.d.ts +2 -0
- package/dist/components/EllipsisTextWithTooltip/utils/index.js +5 -0
- package/dist/components/Form/Form.css +1 -0
- package/dist/components/Form/Form.d.ts +3 -0
- package/dist/components/Form/Form.js +28 -0
- package/dist/components/Form/Form.module.scss.js +15 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/types/index.d.ts +13 -0
- package/dist/components/Icons/Icon.css +1 -0
- package/dist/components/Icons/Icon.d.ts +43 -0
- package/dist/components/Icons/Icon.js +136 -0
- package/dist/components/Icons/Icon.module.scss.js +7 -0
- package/dist/components/Icons/index.d.ts +3 -0
- package/dist/components/Icons/types/index.d.ts +47 -0
- package/dist/components/Icons/types/index.js +4 -0
- package/dist/components/IfcPreview/IfcPreview.css +1 -0
- package/dist/components/IfcPreview/IfcPreview.d.ts +3 -0
- package/dist/components/IfcPreview/IfcPreview.js +104 -0
- package/dist/components/IfcPreview/IfcPreview.module.scss.js +37 -0
- package/dist/components/IfcPreview/components/IfcPreviewCard/IfcPreviewCard.d.ts +14 -0
- package/dist/components/IfcPreview/components/IfcPreviewCard/IfcPreviewCard.js +79 -0
- package/dist/components/IfcPreview/components/IfcPreviewCard/index.d.ts +1 -0
- package/dist/components/IfcPreview/components/IfcPreviewViewerLayer/IfcPreviewViewerLayer.d.ts +18 -0
- package/dist/components/IfcPreview/components/IfcPreviewViewerLayer/IfcPreviewViewerLayer.js +59 -0
- package/dist/components/IfcPreview/components/IfcPreviewViewerLayer/index.d.ts +1 -0
- package/dist/components/IfcPreview/constants/index.d.ts +3 -0
- package/dist/components/IfcPreview/constants/index.js +6 -0
- package/dist/components/IfcPreview/hooks/useIfcPreviewModel.d.ts +20 -0
- package/dist/components/IfcPreview/hooks/useIfcPreviewModel.js +34 -0
- package/dist/components/IfcPreview/hooks/useIfcPreviewViewer.d.ts +30 -0
- package/dist/components/IfcPreview/hooks/useIfcPreviewViewer.js +73 -0
- package/dist/components/IfcPreview/index.d.ts +2 -0
- package/dist/components/IfcPreview/types/index.d.ts +52 -0
- package/dist/components/IfcPreview/utils/file-hellper.d.ts +2 -0
- package/dist/components/IfcPreview/utils/file-hellper.js +7 -0
- package/dist/components/IfcPreview/utils/fileSizeLimit.d.ts +7 -0
- package/dist/components/IfcPreview/utils/fileSizeLimit.js +8 -0
- package/dist/components/IfcPreview/utils/modelSource.d.ts +7 -0
- package/dist/components/IfcPreview/utils/modelSource.js +35 -0
- package/dist/components/IfcViewer/IfcViewer.css +1 -0
- package/dist/components/IfcViewer/IfcViewer.d.ts +3 -0
- package/dist/components/IfcViewer/IfcViewer.js +71 -0
- package/dist/components/IfcViewer/IfcViewer.module.scss.js +13 -0
- package/dist/components/IfcViewer/index.d.ts +2 -0
- package/dist/components/IfcViewer/types/index.d.ts +12 -0
- package/dist/components/IfcViewer/utils/fetchIfc.d.ts +1 -0
- package/dist/components/IfcViewer/utils/fetchIfc.js +9 -0
- package/dist/components/IfcViewer/utils/formatMeshProgress.d.ts +1 -0
- package/dist/components/IfcViewer/utils/formatMeshProgress.js +4 -0
- package/dist/components/IfcViewer/utils/ifcWebViewer.d.ts +14 -0
- package/dist/components/IfcViewer/utils/ifcWebViewer.js +120 -0
- package/dist/components/Input/Input.css +1 -0
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +121 -0
- package/dist/components/Input/Input.module.scss.js +33 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/types/index.d.ts +40 -0
- package/dist/components/Label/Label.css +1 -0
- package/dist/components/Label/Label.d.ts +3 -0
- package/dist/components/Label/Label.js +36 -0
- package/dist/components/Label/Label.module.scss.js +9 -0
- package/dist/components/Label/index.d.ts +2 -0
- package/dist/components/Label/types/index.d.ts +9 -0
- package/dist/components/Layer/Layer.css +1 -0
- package/dist/components/Layer/Layer.d.ts +3 -0
- package/dist/components/Layer/Layer.js +26 -0
- package/dist/components/Layer/Layer.module.scss.js +9 -0
- package/dist/components/Layer/index.d.ts +2 -0
- package/dist/components/Layer/types/index.d.ts +7 -0
- package/dist/components/MediaContextProvider/MediaContextProvider.d.ts +3 -0
- package/dist/components/MediaContextProvider/MediaContextProvider.js +25 -0
- package/dist/components/MediaContextProvider/constants/index.d.ts +3 -0
- package/dist/components/MediaContextProvider/constants/index.js +11 -0
- package/dist/components/MediaContextProvider/hooks/index.d.ts +8 -0
- package/dist/components/MediaContextProvider/hooks/index.js +14 -0
- package/dist/components/MediaContextProvider/index.d.ts +4 -0
- package/dist/components/MediaContextProvider/types/index.d.ts +23 -0
- package/dist/components/Modal/Modal.css +1 -0
- package/dist/components/Modal/Modal.d.ts +3 -0
- package/dist/components/Modal/Modal.js +89 -0
- package/dist/components/Modal/Modal.module.scss.js +56 -0
- package/dist/components/Modal/hooks/index.d.ts +17 -0
- package/dist/components/Modal/hooks/index.js +25 -0
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/types/index.d.ts +24 -0
- package/dist/components/Portal/Potral.d.ts +3 -0
- package/dist/components/Portal/Potral.js +18 -0
- package/dist/components/Portal/index.d.ts +2 -0
- package/dist/components/Portal/types/index.d.ts +5 -0
- package/dist/components/ProgressWrapper/ProgressWrapper.css +1 -0
- package/dist/components/ProgressWrapper/ProgressWrapper.d.ts +3 -0
- package/dist/components/ProgressWrapper/ProgressWrapper.js +50 -0
- package/dist/components/ProgressWrapper/ProgressWrapper.module.scss.js +17 -0
- package/dist/components/ProgressWrapper/constants/index.d.ts +1 -0
- package/dist/components/ProgressWrapper/constants/index.js +4 -0
- package/dist/components/ProgressWrapper/hooks/index.d.ts +5 -0
- package/dist/components/ProgressWrapper/hooks/index.js +41 -0
- package/dist/components/ProgressWrapper/index.d.ts +3 -0
- package/dist/components/ProgressWrapper/types/index.d.ts +17 -0
- package/dist/components/Select/Select.css +1 -0
- package/dist/components/Select/Select.d.ts +3 -0
- package/dist/components/Select/Select.js +195 -0
- package/dist/components/Select/Select.module.scss.js +69 -0
- package/dist/components/Select/constants/index.d.ts +3 -0
- package/dist/components/Select/constants/index.js +5 -0
- package/dist/components/Select/hooks/useSelect.d.ts +28 -0
- package/dist/components/Select/hooks/useSelect.js +73 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/types/index.d.ts +50 -0
- package/dist/components/Skeleton/Skeleton.css +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.js +38 -0
- package/dist/components/Skeleton/Skeleton.module.scss.js +13 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/typs/index.d.ts +10 -0
- package/dist/components/Spinner/Spinner.css +1 -0
- package/dist/components/Spinner/Spinner.d.ts +3 -0
- package/dist/components/Spinner/Spinner.js +46 -0
- package/dist/components/Spinner/Spinner.module.scss.js +28 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/types/index.d.ts +9 -0
- package/dist/components/Table/Table.css +1 -0
- package/dist/components/Table/Table.d.ts +2 -0
- package/dist/components/Table/Table.js +219 -0
- package/dist/components/Table/Table.module.scss.js +41 -0
- package/dist/components/Table/hooks/index.d.ts +12 -0
- package/dist/components/Table/hooks/index.js +28 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/types/index.d.ts +39 -0
- package/dist/components/Table/utils/index.d.ts +2 -0
- package/dist/components/Table/utils/index.js +5 -0
- package/dist/components/Tabs/Tabs.css +1 -0
- package/dist/components/Tabs/Tabs.d.ts +3 -0
- package/dist/components/Tabs/Tabs.js +73 -0
- package/dist/components/Tabs/Tabs.module.scss.js +26 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/types/index.d.ts +25 -0
- package/dist/components/Text/Text.css +1 -0
- package/dist/components/Text/Text.d.ts +3 -0
- package/dist/components/Text/Text.js +39 -0
- package/dist/components/Text/Text.module.scss.js +17 -0
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/types/index.d.ts +15 -0
- package/dist/components/TextWithLabel/TextWithLabel.css +1 -0
- package/dist/components/TextWithLabel/TextWithLabel.d.ts +3 -0
- package/dist/components/TextWithLabel/TextWithLabel.js +39 -0
- package/dist/components/TextWithLabel/TextWithLabel.module.scss.js +9 -0
- package/dist/components/TextWithLabel/index.d.ts +2 -0
- package/dist/components/TextWithLabel/types/index.d.ts +6 -0
- package/dist/components/Textarea/Textarea.css +1 -0
- package/dist/components/Textarea/Textarea.d.ts +3 -0
- package/dist/components/Textarea/Textarea.js +132 -0
- package/dist/components/Textarea/Textarea.module.scss.js +35 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/types/index.d.ts +45 -0
- package/dist/components/Tooltip/Tooltip.css +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/components/Tooltip/Tooltip.js +191 -0
- package/dist/components/Tooltip/Tooltip.module.scss.js +13 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/types/index.d.ts +36 -0
- package/dist/components/Tooltip/types/index.js +4 -0
- package/dist/components/UploadFiles/UploadFiles.css +1 -0
- package/dist/components/UploadFiles/UploadFiles.d.ts +3 -0
- package/dist/components/UploadFiles/UploadFiles.js +238 -0
- package/dist/components/UploadFiles/UploadFiles.module.scss.js +73 -0
- package/dist/components/UploadFiles/index.d.ts +2 -0
- package/dist/components/UploadFiles/types/index.d.ts +33 -0
- package/dist/components/UploadFiles/utils/index.d.ts +12 -0
- package/dist/components/UploadFiles/utils/index.js +67 -0
- package/dist/components/ViewImageModal/ViewImageModal.css +1 -0
- package/dist/components/ViewImageModal/ViewImageModal.d.ts +3 -0
- package/dist/components/ViewImageModal/ViewImageModal.js +71 -0
- package/dist/components/ViewImageModal/ViewImageModal.module.scss.js +19 -0
- package/dist/components/ViewImageModal/index.d.ts +2 -0
- package/dist/components/ViewImageModal/types/index.d.ts +13 -0
- package/dist/components-assets/IfcPreview/web-ifc/web-ifc.wasm +0 -0
- package/dist/hooks/useClickOutside.d.ts +14 -0
- package/dist/hooks/useClickOutside.js +15 -0
- package/dist/images/add_file.svg.js +5 -0
- package/dist/images/add_user.svg.js +5 -0
- package/dist/images/arrow-bottom.svg.js +5 -0
- package/dist/images/calendar.svg.js +5 -0
- package/dist/images/check.svg.js +5 -0
- package/dist/images/chevron_down.svg.js +5 -0
- package/dist/images/close.svg.js +5 -0
- package/dist/images/copy.svg.js +5 -0
- package/dist/images/dots.svg.js +5 -0
- package/dist/images/download.svg.js +5 -0
- package/dist/images/edit.svg.js +5 -0
- package/dist/images/eye.svg.js +5 -0
- package/dist/images/file.svg.js +5 -0
- package/dist/images/file_not_filled.svg.js +5 -0
- package/dist/images/filter.svg.js +5 -0
- package/dist/images/folder.svg.js +5 -0
- package/dist/images/history_clock.svg.js +5 -0
- package/dist/images/info.svg.js +5 -0
- package/dist/images/info_error.svg.js +5 -0
- package/dist/images/layers-three.svg.js +5 -0
- package/dist/images/link-angled.svg.js +5 -0
- package/dist/images/logout.svg.js +5 -0
- package/dist/images/minus.svg.js +5 -0
- package/dist/images/pause-circle.svg.js +5 -0
- package/dist/images/play-circle.svg.js +5 -0
- package/dist/images/plus.svg.js +5 -0
- package/dist/images/plus_circle.svg.js +5 -0
- package/dist/images/plus_square.svg.js +5 -0
- package/dist/images/refresh.svg.js +5 -0
- package/dist/images/save.svg.js +5 -0
- package/dist/images/search.svg.js +5 -0
- package/dist/images/select_chevron_down.svg.js +5 -0
- package/dist/images/terminal_square.svg.js +5 -0
- package/dist/images/trash.svg.js +5 -0
- package/dist/images/update.svg.js +5 -0
- package/dist/images/upload-top.svg.js +5 -0
- package/dist/images/upload.svg.js +5 -0
- package/dist/images/user-right.svg.js +5 -0
- package/dist/images/warning_color.svg.js +5 -0
- package/dist/styles/tokens.css +250 -0
- package/dist/test-stpr-ui-kit.d.ts +36 -0
- package/dist/test-stpr-ui-kit.js +43 -15043
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/stringHelper.d.ts +13 -0
- package/dist/utils/stringHelper.js +4 -0
- package/package.json +34 -30
- package/dist/images/icon.svg +0 -8
- package/dist/images/viewImageExample.jpg +0 -0
- package/dist/test-stpr-ui-kit.css +0 -1
- package/dist/test-stpr-ui-kit.es.d.ts +0 -829
- package/dist/test-stpr-ui-kit.umd.cjs +0 -9
- /package/dist/{images → components-assets/ViewImageModal}/fallBackSrc.jpeg +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import a from "clsx";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import p from "../../images/add_file.svg.js";
|
|
4
|
+
import S from "../../images/add_user.svg.js";
|
|
5
|
+
import f from "../../images/arrow-bottom.svg.js";
|
|
6
|
+
import g from "../../images/calendar.svg.js";
|
|
7
|
+
import v from "../../images/check.svg.js";
|
|
8
|
+
import I from "../../images/chevron_down.svg.js";
|
|
9
|
+
import d from "../../images/close.svg.js";
|
|
10
|
+
import C from "../../images/copy.svg.js";
|
|
11
|
+
import u from "../../images/dots.svg.js";
|
|
12
|
+
import h from "../../images/download.svg.js";
|
|
13
|
+
import F from "../../images/edit.svg.js";
|
|
14
|
+
import y from "../../images/eye.svg.js";
|
|
15
|
+
import P from "../../images/file.svg.js";
|
|
16
|
+
import U from "../../images/file_not_filled.svg.js";
|
|
17
|
+
import w from "../../images/filter.svg.js";
|
|
18
|
+
import A from "../../images/folder.svg.js";
|
|
19
|
+
import D from "../../images/history_clock.svg.js";
|
|
20
|
+
import T from "../../images/info.svg.js";
|
|
21
|
+
import E from "../../images/info_error.svg.js";
|
|
22
|
+
import k from "../../images/layers-three.svg.js";
|
|
23
|
+
import L from "../../images/link-angled.svg.js";
|
|
24
|
+
import N from "../../images/logout.svg.js";
|
|
25
|
+
import R from "../../images/minus.svg.js";
|
|
26
|
+
import q from "../../images/pause-circle.svg.js";
|
|
27
|
+
import B from "../../images/play-circle.svg.js";
|
|
28
|
+
import H from "../../images/plus.svg.js";
|
|
29
|
+
import M from "../../images/plus_circle.svg.js";
|
|
30
|
+
import W from "../../images/plus_square.svg.js";
|
|
31
|
+
import x from "../../images/refresh.svg.js";
|
|
32
|
+
import _ from "../../images/save.svg.js";
|
|
33
|
+
import O from "../../images/search.svg.js";
|
|
34
|
+
import $ from "../../images/select_chevron_down.svg.js";
|
|
35
|
+
import b from "../../images/terminal_square.svg.js";
|
|
36
|
+
import j from "../../images/trash.svg.js";
|
|
37
|
+
import z from "../../images/update.svg.js";
|
|
38
|
+
import G from "../../images/upload.svg.js";
|
|
39
|
+
import J from "../../images/upload-top.svg.js";
|
|
40
|
+
import K from "../../images/user-right.svg.js";
|
|
41
|
+
import Q from "../../images/warning_color.svg.js";
|
|
42
|
+
import V from "./Icon.module.scss.js";
|
|
43
|
+
import { EIconName as o } from "./types/index.js";
|
|
44
|
+
const Oo = (m) => {
|
|
45
|
+
const { name: s, rotate: r, className: t, ...e } = m, n = {
|
|
46
|
+
...e,
|
|
47
|
+
transform: r ? `rotate(${r}deg)` : ""
|
|
48
|
+
}, i = {
|
|
49
|
+
[o.PlayCircle]: B,
|
|
50
|
+
[o.PauseCircle]: q,
|
|
51
|
+
[o.UploadTop]: J,
|
|
52
|
+
[o.ChevronDown]: I,
|
|
53
|
+
[o.Info]: T,
|
|
54
|
+
[o.Plus]: H,
|
|
55
|
+
[o.Minus]: R,
|
|
56
|
+
[o.SelectChevronDown]: $,
|
|
57
|
+
[o.Upload]: G,
|
|
58
|
+
[o.Trash]: j,
|
|
59
|
+
[o.Check]: v,
|
|
60
|
+
[o.Copy]: C,
|
|
61
|
+
[o.Close]: d,
|
|
62
|
+
[o.PlusSquare]: W,
|
|
63
|
+
[o.WarningColor]: Q,
|
|
64
|
+
[o.Dots]: u,
|
|
65
|
+
[o.HistoryClock]: D,
|
|
66
|
+
[o.PlusCircle]: M,
|
|
67
|
+
[o.TerminalSquare]: b,
|
|
68
|
+
[o.File]: P,
|
|
69
|
+
[o.InfoError]: E,
|
|
70
|
+
[o.AddFile]: p,
|
|
71
|
+
[o.AddUser]: S,
|
|
72
|
+
[o.Download]: h,
|
|
73
|
+
[o.Edit]: F,
|
|
74
|
+
[o.Eye]: y,
|
|
75
|
+
[o.Refresh]: x,
|
|
76
|
+
[o.Logout]: N,
|
|
77
|
+
[o.Save]: _,
|
|
78
|
+
[o.Search]: O,
|
|
79
|
+
[o.Calendar]: g,
|
|
80
|
+
[o.ArrowBottom]: f,
|
|
81
|
+
[o.UserRight]: K,
|
|
82
|
+
[o.FileNotFilled]: U,
|
|
83
|
+
[o.Update]: z,
|
|
84
|
+
[o.Filter]: w,
|
|
85
|
+
[o.Folder]: A,
|
|
86
|
+
[o.LayersThree]: k,
|
|
87
|
+
[o.LinkAngled]: L
|
|
88
|
+
}, l = a("stpr-icon", t);
|
|
89
|
+
return c.createElement(i[s], {
|
|
90
|
+
...e,
|
|
91
|
+
style: n,
|
|
92
|
+
className: a(l, V.spIcon)
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
p as AddFileIcon,
|
|
97
|
+
S as AddUserIcon,
|
|
98
|
+
f as ArrowBottomIcon,
|
|
99
|
+
g as CalendarIcon,
|
|
100
|
+
v as CheckIcon,
|
|
101
|
+
I as ChevronDownIcon,
|
|
102
|
+
d as CloseIcon,
|
|
103
|
+
C as CopyIcon,
|
|
104
|
+
u as DotsIcon,
|
|
105
|
+
h as DownloadIcon,
|
|
106
|
+
F as EditIcon,
|
|
107
|
+
y as EyeIcon,
|
|
108
|
+
P as FileIcon,
|
|
109
|
+
U as FileNotFilledIcon,
|
|
110
|
+
w as FilterIcon,
|
|
111
|
+
A as FolderIcon,
|
|
112
|
+
D as HistoryClockIcon,
|
|
113
|
+
Oo as Icon,
|
|
114
|
+
E as InfoErrorIcon,
|
|
115
|
+
T as InfoIcon,
|
|
116
|
+
k as LayersThreeIcon,
|
|
117
|
+
L as LinkAngledIcon,
|
|
118
|
+
N as LogoutIcon,
|
|
119
|
+
R as MinusIcon,
|
|
120
|
+
q as PauseCircleIcon,
|
|
121
|
+
B as PlayCircleIcon,
|
|
122
|
+
M as PlusCircleIcon,
|
|
123
|
+
H as PlusIcon,
|
|
124
|
+
W as PlusSquareIcon,
|
|
125
|
+
x as RefreshIcon,
|
|
126
|
+
_ as SaveIcon,
|
|
127
|
+
O as SearchIcon,
|
|
128
|
+
$ as SelectChevronDownIcon,
|
|
129
|
+
b as TerminalSquareIcon,
|
|
130
|
+
j as TrashIcon,
|
|
131
|
+
z as UpdateIcon,
|
|
132
|
+
G as UploadIcon,
|
|
133
|
+
J as UploadTopIcon,
|
|
134
|
+
K as UserRightIcon,
|
|
135
|
+
Q as WarningColorIcon
|
|
136
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { AddFileIcon, AddUserIcon, ArrowBottomIcon, CalendarIcon, CheckIcon, ChevronDownIcon, CloseIcon, CopyIcon, DotsIcon, DownloadIcon, EditIcon, EyeIcon, FileIcon, FileNotFilledIcon, FilterIcon, FolderIcon, HistoryClockIcon, Icon, InfoErrorIcon, InfoIcon, LayersThreeIcon, LinkAngledIcon, LogoutIcon, MinusIcon, PauseCircleIcon, PlayCircleIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, RefreshIcon, SaveIcon, SearchIcon, SelectChevronDownIcon, TerminalSquareIcon, TrashIcon, UpdateIcon, UploadIcon, UploadTopIcon, UserRightIcon, WarningColorIcon, } from "./Icon.tsx";
|
|
2
|
+
export type { IconProps, SVGComponent } from "./types";
|
|
3
|
+
export { EIconName } from "./types";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare enum EIconName {
|
|
3
|
+
ChevronDown = "chevronDown",
|
|
4
|
+
Info = "info",
|
|
5
|
+
Plus = "plus",
|
|
6
|
+
SelectChevronDown = "selectChevronDown",
|
|
7
|
+
Upload = "upload",
|
|
8
|
+
Trash = "trash",
|
|
9
|
+
Check = "check",
|
|
10
|
+
Copy = "copy",
|
|
11
|
+
Close = "close",
|
|
12
|
+
PlusSquare = "plusSquare",
|
|
13
|
+
PlusCircle = "plusCircle",
|
|
14
|
+
WarningColor = "warningColor",
|
|
15
|
+
Dots = "dots",
|
|
16
|
+
HistoryClock = "historyClock",
|
|
17
|
+
Minus = "minus",
|
|
18
|
+
TerminalSquare = "terminalSquare",
|
|
19
|
+
File = "file",
|
|
20
|
+
FileNotFilled = "fileNotFilled",
|
|
21
|
+
InfoError = "infoError",
|
|
22
|
+
Save = "save",
|
|
23
|
+
Refresh = "refresh",
|
|
24
|
+
Logout = "logout",
|
|
25
|
+
Edit = "edit",
|
|
26
|
+
Eye = "eye",
|
|
27
|
+
Download = "download",
|
|
28
|
+
AddUser = "addUser",
|
|
29
|
+
AddFile = "addFile",
|
|
30
|
+
Calendar = "calendar",
|
|
31
|
+
ArrowBottom = "arrowBottom",
|
|
32
|
+
UserRight = "userRight",
|
|
33
|
+
Search = "search",
|
|
34
|
+
Update = "update",
|
|
35
|
+
Filter = "filter",
|
|
36
|
+
Folder = "folder",
|
|
37
|
+
LayersThree = "layersThree",
|
|
38
|
+
LinkAngled = "linkAngled",
|
|
39
|
+
PlayCircle = "playCircle",
|
|
40
|
+
UploadTop = "uploadTop",
|
|
41
|
+
PauseCircle = "pauseCircle"
|
|
42
|
+
}
|
|
43
|
+
export type SVGComponent = React.FC<React.SVGProps<SVGSVGElement>>;
|
|
44
|
+
export interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
45
|
+
name: EIconName;
|
|
46
|
+
rotate?: number;
|
|
47
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var l = /* @__PURE__ */ ((r) => (r.ChevronDown = "chevronDown", r.Info = "info", r.Plus = "plus", r.SelectChevronDown = "selectChevronDown", r.Upload = "upload", r.Trash = "trash", r.Check = "check", r.Copy = "copy", r.Close = "close", r.PlusSquare = "plusSquare", r.PlusCircle = "plusCircle", r.WarningColor = "warningColor", r.Dots = "dots", r.HistoryClock = "historyClock", r.Minus = "minus", r.TerminalSquare = "terminalSquare", r.File = "file", r.FileNotFilled = "fileNotFilled", r.InfoError = "infoError", r.Save = "save", r.Refresh = "refresh", r.Logout = "logout", r.Edit = "edit", r.Eye = "eye", r.Download = "download", r.AddUser = "addUser", r.AddFile = "addFile", r.Calendar = "calendar", r.ArrowBottom = "arrowBottom", r.UserRight = "userRight", r.Search = "search", r.Update = "update", r.Filter = "filter", r.Folder = "folder", r.LayersThree = "layersThree", r.LinkAngled = "linkAngled", r.PlayCircle = "playCircle", r.UploadTop = "uploadTop", r.PauseCircle = "pauseCircle", r))(l || {});
|
|
2
|
+
export {
|
|
3
|
+
l as EIconName
|
|
4
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._ifcPreview_142wm_1{position:relative;display:flex;width:100%;min-height:100px}._previewInner_142wm_8{position:relative;display:flex;align-items:center;justify-content:center;width:100%;border-radius:var(--spui-border-radius-md);background-color:var(--spui-color-surface-secondary);flex-direction:column;gap:var(--spui-spacing-2x);padding:var(--spui-spacing-4x)}._previewIcon_142wm_21{width:var(--spui-icon-size-xl);height:var(--spui-icon-size-xl);color:var(--spui-color-icon-action)}._fileHint_142wm_27{max-width:100%;text-align:center;word-break:break-word}._overlay_142wm_33{position:absolute;inset:0;z-index:2;display:none;padding:var(--spui-spacing-1x);border-radius:var(--spui-border-radius-md);background:#ffffffa6;box-shadow:none}._overlay_142wm_33{opacity:1;visibility:visible}._overlay_142wm_33{transition:all .3s ease-in-out}@starting-style{._overlay_142wm_33{opacity:0;visibility:hidden}}@media(hover:hover){._ifcPreview_142wm_1:hover ._overlay_142wm_33{display:flex;justify-content:flex-end}}._overlayActions_142wm_63{display:flex;flex-direction:column;gap:var(--spui-spacing-2x);justify-content:flex-start;align-items:flex-end}._hiddenInput_142wm_71{display:none}._viewerLayer_142wm_75{display:flex;align-items:center;justify-content:center;padding:var(--spui-spacing-4x)}._viewerPanel_142wm_82{position:relative;display:flex;flex-direction:column;gap:var(--spui-spacing-4x);width:min(96vw,1200px);height:min(88vh,900px);max-height:calc(100vh - 32px);padding:var(--spui-spacing-6x);border-radius:var(--spui-border-radius-lg);background-color:var(--spui-color-surface-default)}._viewerHeader_142wm_95{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--spui-spacing-4x);padding-right:var(--spui-spacing-12x)}._viewerClose_142wm_103{position:absolute;right:var(--spui-spacing-4x);top:var(--spui-spacing-4x)}._viewerBody_142wm_109{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}._viewerStage_142wm_117{position:relative;flex:1;min-height:280px;width:100%}._viewerSpinner_142wm_124{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;padding:var(--spui-spacing-6x);pointer-events:none}._viewerErrorBanner_142wm_135{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--spui-spacing-6x);text-align:center;color:var(--spui-color-error-text)}._viewerChildren_142wm_146{flex-shrink:0;padding-top:var(--spui-spacing-2x);max-height:40%;overflow:auto}._viewerChildren_142wm_146::-webkit-scrollbar{width:var(--spui-scrollbar-width);height:var(--spui-scrollbar-width)}._viewerChildren_142wm_146::-webkit-scrollbar-track{background:var(--spui-color-surface-transparent)}._viewerChildren_142wm_146::-webkit-scrollbar-thumb{background:var(--color-aqua-blue)}._viewerChildren_142wm_146::-webkit-scrollbar-thumb:hover{background:var(--color-accent-blue)}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsxs as A, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import B from "clsx";
|
|
3
|
+
import { useIfcPreviewModel as D } from "./hooks/useIfcPreviewModel.js";
|
|
4
|
+
import { useIfcPreviewViewer as T } from "./hooks/useIfcPreviewViewer.js";
|
|
5
|
+
import W from "./IfcPreview.module.scss.js";
|
|
6
|
+
import { DEFAULT_IFC_PREVIEW_MAX_FILE_SIZE_MB as X } from "./utils/fileSizeLimit.js";
|
|
7
|
+
import { IfcPreviewCard as Z } from "./components/IfcPreviewCard/IfcPreviewCard.js";
|
|
8
|
+
import { IfcPreviewViewerLayer as q } from "./components/IfcPreviewViewerLayer/IfcPreviewViewerLayer.js";
|
|
9
|
+
const re = (s) => {
|
|
10
|
+
const {
|
|
11
|
+
readonly: e = !1,
|
|
12
|
+
wasmPublicPath: r = "/components-assets/IfcPreview/web-ifc/",
|
|
13
|
+
file: d,
|
|
14
|
+
disableFileSizeLimit: t = !1,
|
|
15
|
+
url: c,
|
|
16
|
+
onFileChange: p,
|
|
17
|
+
onClear: f,
|
|
18
|
+
onModelLoaded: w,
|
|
19
|
+
onError: m,
|
|
20
|
+
onOpenViewer: h,
|
|
21
|
+
onCloseViewer: P,
|
|
22
|
+
maxFileSizeMb: v = X,
|
|
23
|
+
classNameRoot: C,
|
|
24
|
+
children: o
|
|
25
|
+
} = s, {
|
|
26
|
+
cardCaption: i,
|
|
27
|
+
effectiveUrl: I,
|
|
28
|
+
effectiveFile: V,
|
|
29
|
+
fileInputRef: M,
|
|
30
|
+
inputId: E,
|
|
31
|
+
handlePickFile: F,
|
|
32
|
+
handleUploadClick: u,
|
|
33
|
+
handleRemove: L,
|
|
34
|
+
hasModelData: R
|
|
35
|
+
} = D({
|
|
36
|
+
readonly: e,
|
|
37
|
+
url: c,
|
|
38
|
+
fileProp: d,
|
|
39
|
+
onFileChange: p,
|
|
40
|
+
onClear: f
|
|
41
|
+
}), {
|
|
42
|
+
handleViewerModelLoaded: x,
|
|
43
|
+
viewerUrl: l,
|
|
44
|
+
handleClose: _,
|
|
45
|
+
handleOpen: g,
|
|
46
|
+
handleViewerError: U,
|
|
47
|
+
isModelReady: b,
|
|
48
|
+
errorMessage: n,
|
|
49
|
+
showViewer: k,
|
|
50
|
+
showError: y,
|
|
51
|
+
isOpen: O,
|
|
52
|
+
showPreparingSpinner: S,
|
|
53
|
+
preparingText: N,
|
|
54
|
+
isPreparing: j
|
|
55
|
+
} = T({
|
|
56
|
+
readonly: e,
|
|
57
|
+
effectiveFile: V,
|
|
58
|
+
effectiveUrl: I,
|
|
59
|
+
wasmPublicPath: r,
|
|
60
|
+
maxFileSizeMb: v,
|
|
61
|
+
disableFileSizeLimit: t,
|
|
62
|
+
onModelLoaded: w,
|
|
63
|
+
onError: m,
|
|
64
|
+
onOpenViewer: h,
|
|
65
|
+
onCloseViewer: P
|
|
66
|
+
}), z = b && !j && !n && l && o;
|
|
67
|
+
return /* @__PURE__ */ A("div", { className: B(W.ifcPreview, C), children: [
|
|
68
|
+
/* @__PURE__ */ a(
|
|
69
|
+
Z,
|
|
70
|
+
{
|
|
71
|
+
cardCaption: i,
|
|
72
|
+
fileInputRef: M,
|
|
73
|
+
hasModelData: R,
|
|
74
|
+
inputId: E,
|
|
75
|
+
onOpenViewer: g,
|
|
76
|
+
onUploadClick: u,
|
|
77
|
+
onPickFile: F,
|
|
78
|
+
onRemove: L,
|
|
79
|
+
readonly: e
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
O && /* @__PURE__ */ a(
|
|
83
|
+
q,
|
|
84
|
+
{
|
|
85
|
+
cardCaption: i,
|
|
86
|
+
errorMessage: n,
|
|
87
|
+
onClose: _,
|
|
88
|
+
onViewerError: U,
|
|
89
|
+
onViewerModelLoaded: x,
|
|
90
|
+
preparingText: N,
|
|
91
|
+
showChildren: !!z,
|
|
92
|
+
showError: y,
|
|
93
|
+
showPreparingSpinner: S,
|
|
94
|
+
showViewer: k,
|
|
95
|
+
viewerUrl: l,
|
|
96
|
+
wasmPublicPath: r,
|
|
97
|
+
children: o
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] });
|
|
101
|
+
};
|
|
102
|
+
export {
|
|
103
|
+
re as IfcPreview
|
|
104
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import './IfcPreview.css';const e = "_ifcPreview_142wm_1", r = "_previewInner_142wm_8", i = "_previewIcon_142wm_21", n = "_fileHint_142wm_27", w = "_overlay_142wm_33", _ = "_overlayActions_142wm_63", v = "_hiddenInput_142wm_71", o = "_viewerLayer_142wm_75", t = "_viewerPanel_142wm_82", c = "_viewerHeader_142wm_95", s = "_viewerClose_142wm_103", a = "_viewerBody_142wm_109", l = "_viewerStage_142wm_117", d = "_viewerSpinner_142wm_124", m = "_viewerErrorBanner_142wm_135", p = "_viewerChildren_142wm_146", y = {
|
|
2
|
+
ifcPreview: e,
|
|
3
|
+
previewInner: r,
|
|
4
|
+
previewIcon: i,
|
|
5
|
+
fileHint: n,
|
|
6
|
+
overlay: w,
|
|
7
|
+
overlayActions: _,
|
|
8
|
+
hiddenInput: v,
|
|
9
|
+
viewerLayer: o,
|
|
10
|
+
viewerPanel: t,
|
|
11
|
+
viewerHeader: c,
|
|
12
|
+
viewerClose: s,
|
|
13
|
+
viewerBody: a,
|
|
14
|
+
viewerStage: l,
|
|
15
|
+
viewerSpinner: d,
|
|
16
|
+
viewerErrorBanner: m,
|
|
17
|
+
viewerChildren: p
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
y as default,
|
|
21
|
+
n as fileHint,
|
|
22
|
+
v as hiddenInput,
|
|
23
|
+
e as ifcPreview,
|
|
24
|
+
w as overlay,
|
|
25
|
+
_ as overlayActions,
|
|
26
|
+
i as previewIcon,
|
|
27
|
+
r as previewInner,
|
|
28
|
+
a as viewerBody,
|
|
29
|
+
p as viewerChildren,
|
|
30
|
+
s as viewerClose,
|
|
31
|
+
m as viewerErrorBanner,
|
|
32
|
+
c as viewerHeader,
|
|
33
|
+
o as viewerLayer,
|
|
34
|
+
t as viewerPanel,
|
|
35
|
+
d as viewerSpinner,
|
|
36
|
+
l as viewerStage
|
|
37
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type IfcPreviewCardProps = {
|
|
3
|
+
cardCaption: string;
|
|
4
|
+
readonly: boolean;
|
|
5
|
+
hasModelData: boolean;
|
|
6
|
+
inputId: string;
|
|
7
|
+
fileInputRef: React.RefObject<HTMLInputElement | null>;
|
|
8
|
+
onOpenViewer: () => void;
|
|
9
|
+
onUploadClick: () => void;
|
|
10
|
+
onPickFile: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
onRemove: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const IfcPreviewCard: React.FC<IfcPreviewCardProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsxs as n, Fragment as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../IfcPreview.module.scss.js";
|
|
3
|
+
import { Icon as y } from "../../../Icons/Icon.js";
|
|
4
|
+
import { EIconName as o } from "../../../Icons/types/index.js";
|
|
5
|
+
import { Text as v } from "../../../Text/Text.js";
|
|
6
|
+
import { Button as i } from "../../../Button/Button.js";
|
|
7
|
+
const P = (l) => {
|
|
8
|
+
const {
|
|
9
|
+
cardCaption: s,
|
|
10
|
+
readonly: a,
|
|
11
|
+
hasModelData: r,
|
|
12
|
+
inputId: m,
|
|
13
|
+
fileInputRef: d,
|
|
14
|
+
onOpenViewer: p,
|
|
15
|
+
onUploadClick: u,
|
|
16
|
+
onPickFile: I,
|
|
17
|
+
onRemove: f
|
|
18
|
+
} = l;
|
|
19
|
+
return /* @__PURE__ */ n(c, { children: [
|
|
20
|
+
/* @__PURE__ */ n("div", { className: t.previewInner, children: [
|
|
21
|
+
/* @__PURE__ */ e(y, { className: t.previewIcon, name: o.File }),
|
|
22
|
+
/* @__PURE__ */ e(v, { classNameRoot: t.fileHint, type: "p2", children: s })
|
|
23
|
+
] }),
|
|
24
|
+
/* @__PURE__ */ e("div", { className: t.overlay, children: /* @__PURE__ */ n("div", { className: t.overlayActions, children: [
|
|
25
|
+
r && /* @__PURE__ */ e(
|
|
26
|
+
i,
|
|
27
|
+
{
|
|
28
|
+
onClick: p,
|
|
29
|
+
startIconName: o.Eye,
|
|
30
|
+
type: "button",
|
|
31
|
+
variant: "text",
|
|
32
|
+
isOnlyIcon: !0,
|
|
33
|
+
noPadding: !0,
|
|
34
|
+
size: "md"
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
!a && /* @__PURE__ */ n(c, { children: [
|
|
38
|
+
/* @__PURE__ */ e(
|
|
39
|
+
"input",
|
|
40
|
+
{
|
|
41
|
+
accept: ".ifc,.IFC,application/octet-stream",
|
|
42
|
+
className: t.hiddenInput,
|
|
43
|
+
id: m,
|
|
44
|
+
onChange: I,
|
|
45
|
+
ref: d,
|
|
46
|
+
type: "file"
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
i,
|
|
51
|
+
{
|
|
52
|
+
onClick: u,
|
|
53
|
+
startIconName: o.Upload,
|
|
54
|
+
type: "button",
|
|
55
|
+
variant: "text",
|
|
56
|
+
isOnlyIcon: !0,
|
|
57
|
+
noPadding: !0,
|
|
58
|
+
size: "md"
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] }),
|
|
62
|
+
!a && r && /* @__PURE__ */ e(
|
|
63
|
+
i,
|
|
64
|
+
{
|
|
65
|
+
onClick: f,
|
|
66
|
+
startIconName: o.Trash,
|
|
67
|
+
type: "button",
|
|
68
|
+
variant: "text",
|
|
69
|
+
isOnlyIcon: !0,
|
|
70
|
+
noPadding: !0,
|
|
71
|
+
size: "md"
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] }) })
|
|
75
|
+
] });
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
P as IfcPreviewCard
|
|
79
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IfcPreviewCard } from "./IfcPreviewCard";
|
package/dist/components/IfcPreview/components/IfcPreviewViewerLayer/IfcPreviewViewerLayer.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type IfcPreviewViewerLayerProps = {
|
|
3
|
+
cardCaption: string;
|
|
4
|
+
wasmPublicPath: string;
|
|
5
|
+
viewerUrl: string | null;
|
|
6
|
+
preparingText: string;
|
|
7
|
+
errorMessage: string | null;
|
|
8
|
+
showViewer: boolean;
|
|
9
|
+
showPreparingSpinner: boolean;
|
|
10
|
+
showError: boolean;
|
|
11
|
+
showChildren: boolean;
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
onViewerError: (error: Error) => void;
|
|
15
|
+
onViewerModelLoaded: () => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const IfcPreviewViewerLayer: React.FC<IfcPreviewViewerLayerProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import r from "../../IfcPreview.module.scss.js";
|
|
3
|
+
import { Layer as y } from "../../../Layer/Layer.js";
|
|
4
|
+
import { Button as x } from "../../../Button/Button.js";
|
|
5
|
+
import { EIconName as u } from "../../../Icons/types/index.js";
|
|
6
|
+
import { Text as a } from "../../../Text/Text.js";
|
|
7
|
+
import { IfcViewer as C } from "../../../IfcViewer/IfcViewer.js";
|
|
8
|
+
import { Spinner as g } from "../../../Spinner/Spinner.js";
|
|
9
|
+
const T = (s) => {
|
|
10
|
+
const {
|
|
11
|
+
cardCaption: l,
|
|
12
|
+
wasmPublicPath: t,
|
|
13
|
+
viewerUrl: o,
|
|
14
|
+
preparingText: d,
|
|
15
|
+
errorMessage: n,
|
|
16
|
+
showViewer: c,
|
|
17
|
+
showPreparingSpinner: m,
|
|
18
|
+
showError: p,
|
|
19
|
+
showChildren: w,
|
|
20
|
+
children: v,
|
|
21
|
+
onClose: h,
|
|
22
|
+
onViewerError: N,
|
|
23
|
+
onViewerModelLoaded: f
|
|
24
|
+
} = s;
|
|
25
|
+
return /* @__PURE__ */ e(y, { classNameRoot: r.viewerLayer, zIndex: 1600, children: /* @__PURE__ */ i("div", { className: r.viewerPanel, children: [
|
|
26
|
+
/* @__PURE__ */ e(
|
|
27
|
+
x,
|
|
28
|
+
{
|
|
29
|
+
classNameRoot: r.viewerClose,
|
|
30
|
+
isOnlyIcon: !0,
|
|
31
|
+
noPadding: !0,
|
|
32
|
+
onClick: h,
|
|
33
|
+
startIconName: u.Close,
|
|
34
|
+
type: "button",
|
|
35
|
+
variant: "link"
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ e("div", { className: r.viewerHeader, children: /* @__PURE__ */ e(a, { type: "p1", children: l }) }),
|
|
39
|
+
/* @__PURE__ */ i("div", { className: r.viewerBody, children: [
|
|
40
|
+
/* @__PURE__ */ i("div", { className: r.viewerStage, children: [
|
|
41
|
+
c && o && /* @__PURE__ */ e(
|
|
42
|
+
C,
|
|
43
|
+
{
|
|
44
|
+
onError: N,
|
|
45
|
+
onModelLoaded: f,
|
|
46
|
+
url: o,
|
|
47
|
+
wasmPublicPath: t
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
m && /* @__PURE__ */ e("div", { className: r.viewerSpinner, children: /* @__PURE__ */ e(g, { loadingText: d, size: "xl" }) }),
|
|
51
|
+
p && n && /* @__PURE__ */ e("div", { className: r.viewerErrorBanner, children: /* @__PURE__ */ e(a, { type: "p2", children: n }) })
|
|
52
|
+
] }),
|
|
53
|
+
w && /* @__PURE__ */ e("div", { className: r.viewerChildren, children: v })
|
|
54
|
+
] })
|
|
55
|
+
] }) });
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
T as IfcPreviewViewerLayer
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IfcPreviewViewerLayer } from "./IfcPreviewViewerLayer";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ChangeEvent } from "react";
|
|
2
|
+
type UseIfcPreviewModelOptions = {
|
|
3
|
+
readonly: boolean;
|
|
4
|
+
url?: string;
|
|
5
|
+
fileProp?: File | null;
|
|
6
|
+
onFileChange?: (file: File | null) => void;
|
|
7
|
+
onClear?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const useIfcPreviewModel: (options: UseIfcPreviewModelOptions) => {
|
|
10
|
+
inputId: string;
|
|
11
|
+
fileInputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
12
|
+
effectiveFile: File | null;
|
|
13
|
+
effectiveUrl: string | undefined;
|
|
14
|
+
hasModelData: boolean;
|
|
15
|
+
cardCaption: string;
|
|
16
|
+
handlePickFile: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
handleRemove: () => void;
|
|
18
|
+
handleUploadClick: () => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useId as E, useRef as P, useState as d, useEffect as R } from "react";
|
|
2
|
+
import { LABELS as D } from "../constants/index.js";
|
|
3
|
+
import { hasModelUrl as u } from "../utils/file-hellper.js";
|
|
4
|
+
import { getCardCaption as M } from "../utils/modelSource.js";
|
|
5
|
+
const T = (p) => {
|
|
6
|
+
const { readonly: m, url: t, fileProp: i, onFileChange: h, onClear: v } = p, C = E(), l = P(null), s = i !== void 0, [F, k] = d(null), [U, r] = d(!1);
|
|
7
|
+
R(() => {
|
|
8
|
+
r(!1);
|
|
9
|
+
}, [t]);
|
|
10
|
+
const n = s ? i ?? null : F, o = U ? void 0 : t, c = u(o), I = m ? c : !!n || c, g = M(n, o, D.emptyTitle), a = (e) => {
|
|
11
|
+
s || k(e), h?.(e);
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
inputId: C,
|
|
15
|
+
fileInputRef: l,
|
|
16
|
+
effectiveFile: n,
|
|
17
|
+
effectiveUrl: o,
|
|
18
|
+
hasModelData: I,
|
|
19
|
+
cardCaption: g,
|
|
20
|
+
handlePickFile: (e) => {
|
|
21
|
+
const f = e.target.files?.[0] ?? null;
|
|
22
|
+
f && a(f), e.target.value = "";
|
|
23
|
+
},
|
|
24
|
+
handleRemove: () => {
|
|
25
|
+
a(null), l.current && (l.current.value = ""), u(t) && r(!0), v?.();
|
|
26
|
+
},
|
|
27
|
+
handleUploadClick: () => {
|
|
28
|
+
l.current?.click();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
T as useIfcPreviewModel
|
|
34
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TIfcPreviewMaxFileSizeMb } from "../utils/fileSizeLimit";
|
|
2
|
+
type UseIfcPreviewViewerOptions = {
|
|
3
|
+
readonly: boolean;
|
|
4
|
+
effectiveFile: File | null;
|
|
5
|
+
effectiveUrl: string | undefined;
|
|
6
|
+
wasmPublicPath: string;
|
|
7
|
+
maxFileSizeMb: TIfcPreviewMaxFileSizeMb;
|
|
8
|
+
disableFileSizeLimit: boolean;
|
|
9
|
+
onModelLoaded?: () => void;
|
|
10
|
+
onError?: (error: Error) => void;
|
|
11
|
+
onOpenViewer?: () => void;
|
|
12
|
+
onCloseViewer?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const useIfcPreviewViewer: (options: UseIfcPreviewViewerOptions) => {
|
|
15
|
+
wasmPublicPath: string;
|
|
16
|
+
isOpen: boolean;
|
|
17
|
+
isPreparing: boolean;
|
|
18
|
+
viewerUrl: string | null;
|
|
19
|
+
isModelReady: boolean;
|
|
20
|
+
errorMessage: string | null;
|
|
21
|
+
preparingText: string;
|
|
22
|
+
showViewer: boolean;
|
|
23
|
+
showPreparingSpinner: boolean;
|
|
24
|
+
showError: boolean;
|
|
25
|
+
handleOpen: () => Promise<void>;
|
|
26
|
+
handleClose: () => void;
|
|
27
|
+
handleViewerError: (error: Error) => void;
|
|
28
|
+
handleViewerModelLoaded: () => void;
|
|
29
|
+
};
|
|
30
|
+
export {};
|