fui-material 1.16.2 → 1.16.4
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 +50 -13
- package/eslint.config.js +28 -0
- package/index.html +13 -0
- package/package.json +38 -75
- package/src/dop-function/generateUniqueId.ts +6 -0
- package/src/function-elements/Notification/fNotification/fNotification.css +166 -0
- package/src/function-elements/Notification/fNotification/fNotification.ts +138 -0
- package/src/function-elements/Notification/fNotification/index.ts +1 -0
- package/src/function-elements/Notification/fNotificationDelete/fNotificationDelete.ts +19 -0
- package/src/function-elements/Notification/fNotificationDelete/index.ts +1 -0
- package/src/function-elements/fAlert/fAlert.css +101 -0
- package/src/function-elements/fAlert/fAlert.ts +71 -0
- package/src/function-elements/fAlert/index.ts +1 -0
- package/src/function-elements/fConfirm/fConfirm.css +80 -0
- package/src/function-elements/fConfirm/fConfirm.ts +66 -0
- package/src/function-elements/fConfirm/index.ts +1 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/fExportHtmlOrJsxToWord.ts +90 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/convertHtmlTbToXml.ts +43 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/convertJsxElementToXml.ts +76 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/createRow.ts +108 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/functions/createXmlTags.ts +72 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/functions/generateDocx.ts +69 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/functions/getCellData.ts +7 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/functions/jsxToHtml.ts +44 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/index.ts +1 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/_rels/rels.ts +4 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/contentTypes.ts +3 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/docProps/app.ts +3 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/_rels/documentXmlRels.ts +3 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/document.ts +55 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/fontTable.ts +48 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/settings.ts +3 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/styles.ts +568 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/theme/theme1.ts +3 -0
- package/src/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/webSettings.ts +18 -0
- package/src/function-elements/fExportTableToExcel/dop-function/export-excel/core.ts +1167 -0
- package/src/function-elements/fExportTableToExcel/dop-function/export-excel/tszip.min.ts +772 -0
- package/src/function-elements/fExportTableToExcel/dop-function/jsxToHtml.ts +44 -0
- package/src/function-elements/fExportTableToExcel/fExportTableToExcel.ts +68 -0
- package/src/function-elements/fExportTableToExcel/index.ts +1 -0
- package/src/function-elements/fPrompt/fPrompt.css +83 -0
- package/src/function-elements/fPrompt/fPrompt.ts +78 -0
- package/src/function-elements/fPrompt/index.ts +1 -0
- package/src/function-elements/index.ts +7 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useFApi/index.ts +1 -0
- package/src/hooks/useFApi/useFApi.css +81 -0
- package/src/hooks/useFApi/useFApi.ts +54 -0
- package/src/icons/FArrowIcon/FArrowIcon.tsx +48 -0
- package/src/icons/FArrowIcon/index.ts +1 -0
- package/src/icons/FCheckIcon/FCheckIcon.tsx +35 -0
- package/src/icons/FCheckIcon/index.ts +1 -0
- package/src/icons/FCloseIcon/FCloseIcon.tsx +28 -0
- package/src/icons/FCloseIcon/index.ts +1 -0
- package/src/icons/FCopyAddIcon/FCopyAdd.tsx +29 -0
- package/src/icons/FDocumentIcon/FDocumentIcon.tsx +75 -0
- package/src/icons/FDocumentIcon/index.ts +1 -0
- package/src/icons/FDownloadIcon/FDownloadIcon.tsx +29 -0
- package/src/icons/FDownloadIcon/index.ts +1 -0
- package/src/icons/FFilterIcon/FFilterIcon.tsx +28 -0
- package/src/icons/FFilterIcon/index.ts +1 -0
- package/src/icons/FListIcon/FListIcon.tsx +37 -0
- package/src/icons/FListIcon/index.ts +1 -0
- package/src/icons/FLoadIcon/FLoadIcon.tsx +64 -0
- package/src/icons/FLoadIcon/FLoadIconCss.css +48 -0
- package/src/icons/FLoadIcon/index.ts +1 -0
- package/src/icons/FPenIcon/FPenIcon.tsx +28 -0
- package/src/icons/FPenIcon/index.ts +1 -0
- package/src/icons/FPlusIcon/FPlusIcon.tsx +38 -0
- package/src/icons/FPlusIcon/index.ts +1 -0
- package/src/icons/FTrashIcon/FTrashIcon.tsx +39 -0
- package/src/icons/FTrashIcon/index.ts +1 -0
- package/src/icons/FUnlinkIcon/FUnlinkIcon.tsx +38 -0
- package/src/icons/index.ts +13 -0
- package/{dist/cjs/types/index.d.ts → src/index.ts} +3 -1
- package/src/material/CarouselComponent/FCarousel/FCarousel.tsx +150 -0
- package/src/material/CarouselComponent/FCarousel/index.ts +1 -0
- package/src/material/CarouselComponent/FCarouselItem/FCarouselItem.tsx +50 -0
- package/src/material/CarouselComponent/FCarouselItem/index.ts +1 -0
- package/src/material/CarouselComponent/static/arrow-left.svg +1 -0
- package/src/material/CarouselComponent/static/arrow-right.svg +1 -0
- package/src/material/CarouselComponent/static/carousel.css +76 -0
- package/src/material/Dialog/FDialog/FDialog.tsx +63 -0
- package/src/material/Dialog/FDialog/index.ts +1 -0
- package/src/material/Dialog/FDialogBody/FDialogBody.tsx +40 -0
- package/src/material/Dialog/FDialogBody/index.ts +1 -0
- package/src/material/Dialog/FDialogFooter/FDialogFooter.tsx +30 -0
- package/src/material/Dialog/FDialogFooter/index.ts +1 -0
- package/src/material/Dialog/FDialogHeader/FDialogHeader.tsx +33 -0
- package/src/material/Dialog/FDialogHeader/index.ts +1 -0
- package/src/material/Dialog/style/style.css +74 -0
- package/src/material/Dropdown/FDropdown/FDropdown.tsx +61 -0
- package/src/material/Dropdown/FDropdownItem/FDropdownItem.tsx +33 -0
- package/src/material/Dropdown/static/FDropdown.css +67 -0
- package/src/material/Dropdown/static/down-arrow.png +0 -0
- package/src/material/FAccordion/FAccordion.css +80 -0
- package/src/material/FAccordion/FAccordion.tsx +47 -0
- package/src/material/FAccordion/index.ts +1 -0
- package/src/material/FAlert/FAlert.css +153 -0
- package/src/material/FAlert/FAlert.tsx +257 -0
- package/src/material/FAlert/index.ts +1 -0
- package/src/material/FButton/FButton.css +50 -0
- package/src/material/FButton/FButton.tsx +66 -0
- package/src/material/FButton/index.ts +1 -0
- package/src/material/FButtonFile/FButtonFile.css +180 -0
- package/src/material/FButtonFile/FButtonFile.tsx +145 -0
- package/src/material/FButtonFile/index.ts +1 -0
- package/src/material/FCheckbox/Checkbox.css +57 -0
- package/src/material/FCheckbox/FCheckbox.tsx +34 -0
- package/src/material/FCheckbox/index.ts +1 -0
- package/src/material/FContainer/FContainer.css +165 -0
- package/src/material/FContainer/FContainer.tsx +32 -0
- package/src/material/FContainer/index.ts +1 -0
- package/src/material/FFile/FFile.css +0 -0
- package/src/material/FFile/FFile.tsx +46 -0
- package/src/material/FFile/index.ts +1 -0
- package/src/material/FFullDateField/FFullDateField.tsx +127 -0
- package/src/material/FFullDateField/index.ts +1 -0
- package/src/material/FGrid/FGrid.css +179 -0
- package/src/material/FGrid/FGrid.tsx +77 -0
- package/src/material/FGrid/css/bootstrap-theme.css +589 -0
- package/src/material/FGrid/css/bootstrap-theme.min.css +7 -0
- package/src/material/FGrid/css/bootstrap.css +1020 -0
- package/src/material/FGrid/css/bootstrap.min.css +7 -0
- package/src/material/FGrid/index.ts +1 -0
- package/src/material/FInputFileForm/FInputFileForm.css +95 -0
- package/src/material/FInputFileForm/FInputFileForm.tsx +143 -0
- package/src/material/FInputFileForm/index.ts +1 -0
- package/src/material/FNative/FNative.css +41 -0
- package/src/material/FNative/FNative.tsx +96 -0
- package/src/material/FNative/index.ts +1 -0
- package/src/material/FOpenImgFull/FOpenImgFull.css +10 -0
- package/src/material/FOpenImgFull/FOpenImgFull.tsx +115 -0
- package/src/material/FOpenImgFull/index.ts +1 -0
- package/src/material/FPagination/FPagination.css +59 -0
- package/src/material/FPagination/FPagination.tsx +87 -0
- package/src/material/FPagination/hooks/usePagination.tsx +68 -0
- package/src/material/FPagination/index.ts +1 -0
- package/src/material/FPaper/FPaper.css +61 -0
- package/src/material/FPaper/FPaper.tsx +60 -0
- package/src/material/FPaper/index.ts +1 -0
- package/src/material/FPreloader/FPreloader.css +29 -0
- package/src/material/FPreloader/FPreloader.tsx +48 -0
- package/src/material/FPreloader/index.ts +1 -0
- package/src/material/FProgress/FProgress.css +52 -0
- package/src/material/FProgress/FProgress.tsx +35 -0
- package/src/material/FProgress/index.ts +1 -0
- package/src/material/FRadioButton/FRadioButton.tsx +40 -0
- package/src/material/FRadioButton/RadioButton.css +58 -0
- package/src/material/FRadioButton/index.ts +1 -0
- package/src/material/FSearchBox/FSearchBox.css +11 -0
- package/src/material/FSearchBox/FSearchBox.tsx +150 -0
- package/src/material/FSelectSearchDb/FSelectSearchDb.css +84 -0
- package/src/material/FSelectSearchDb/FSelectSearchDb.tsx +242 -0
- package/src/material/FSelectSearchDb/index.ts +1 -0
- package/src/material/FSkeleton/FSkeleton.css +29 -0
- package/src/material/FSkeleton/FSkeleton.tsx +71 -0
- package/src/material/FSkeleton/index.ts +1 -0
- package/src/material/FStack/FStack.css +3 -0
- package/src/material/FStack/FStack.tsx +50 -0
- package/src/material/FStack/index.ts +1 -0
- package/src/material/FTextArea/FTextArea.tsx +107 -0
- package/src/material/FTextArea/index.ts +1 -0
- package/src/material/FTextField/FTextField.css +95 -0
- package/src/material/FTextField/FTextField.tsx +139 -0
- package/src/material/FTextField/index.ts +1 -0
- package/src/material/FTimelineComponents/FTimeline/FTimeline.css +82 -0
- package/src/material/FTimelineComponents/FTimeline/FTimeline.tsx +26 -0
- package/src/material/FTimelineComponents/FTimeline/index.ts +1 -0
- package/src/material/FTimelineComponents/FTimelineCard/FTimelineCard.tsx +30 -0
- package/src/material/FTimelineComponents/FTimelineCard/index.ts +1 -0
- package/src/material/SelectComponents/FSelect/FSelect.css +0 -0
- package/src/material/SelectComponents/FSelect/FSelect.tsx +120 -0
- package/src/material/SelectComponents/FSelect/index.ts +1 -0
- package/src/material/SelectComponents/FSelectItem/FSelectItem.tsx +41 -0
- package/src/material/SelectComponents/FSelectItem/index.ts +1 -0
- package/src/material/TableComponents/FTable/FTable.css +62 -0
- package/src/material/TableComponents/FTable/FTable.tsx +38 -0
- package/src/material/TableComponents/FTable/index.ts +1 -0
- package/src/material/TableComponents/FTableBody/FTableBody.tsx +30 -0
- package/src/material/TableComponents/FTableBody/index.ts +1 -0
- package/src/material/TableComponents/FTableDataCell/FTableDataCell.tsx +49 -0
- package/src/material/TableComponents/FTableDataCell/index.ts +1 -0
- package/src/material/TableComponents/FTableFooter/FTableFooter.tsx +26 -0
- package/src/material/TableComponents/FTableFooter/index.ts +1 -0
- package/src/material/TableComponents/FTableHead/FTableHead.tsx +30 -0
- package/src/material/TableComponents/FTableHead/index.ts +1 -0
- package/src/material/TableComponents/FTableHeaderCell/FTableHeaderCell.tsx +43 -0
- package/src/material/TableComponents/FTableHeaderCell/index.ts +1 -0
- package/src/material/TableComponents/FTableRow/FTableRow.tsx +25 -0
- package/src/material/TableComponents/FTableRow/index.ts +1 -0
- package/src/material/Tabs/FTab/FTab.tsx +39 -0
- package/src/material/Tabs/FTabs/FTabs.tsx +28 -0
- package/src/material/Tabs/styles/FTabs.css +60 -0
- package/{dist/cjs/types/material/index.d.ts → src/material/index.ts} +39 -19
- package/src/static/fonts.css +71 -0
- package/src/static/images/Card.jpg +0 -0
- package/src/static/images/left-arrow.png +0 -0
- package/src/static/images/right-arrow.png +0 -0
- package/src/static/styles/Colors.css +87 -0
- package/src/static/styles/index.css +12 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.app.json +62 -0
- package/tsconfig.build.json +21 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +29 -0
- package/vite.config.ts +46 -0
- package/dist/cjs/index.js +0 -43
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/types/dop-function/generateUniqueId.d.ts +0 -1
- package/dist/cjs/types/function-elements/Notification/fNotification/fNotification.d.ts +0 -11
- package/dist/cjs/types/function-elements/Notification/fNotification/index.d.ts +0 -1
- package/dist/cjs/types/function-elements/Notification/fNotificationDelete/fNotificationDelete.d.ts +0 -3
- package/dist/cjs/types/function-elements/Notification/fNotificationDelete/index.d.ts +0 -1
- package/dist/cjs/types/function-elements/fAlert/fAlert.d.ts +0 -8
- package/dist/cjs/types/function-elements/fAlert/index.d.ts +0 -1
- package/dist/cjs/types/function-elements/fConfirm/fConfirm.d.ts +0 -7
- package/dist/cjs/types/function-elements/fConfirm/index.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/fExportHtmlOrJsxToWord.d.ts +0 -10
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/convertHtmlTbToXml.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/convertJsxElementToXml.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/createRow.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/functions/createXmlTags.d.ts +0 -11
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/functions/generateDocx.d.ts +0 -8
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/functions/getCellData.d.ts +0 -5
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/functions/jsxToHtml.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/index.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/_rels/rels.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/contentTypes.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/docProps/app.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/_rels/documentXmlRels.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/document.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/fontTable.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/settings.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/styles.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/theme/theme1.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/webSettings.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportTableToExcel/dop-function/export-excel/core.d.ts +0 -126
- package/dist/cjs/types/function-elements/fExportTableToExcel/dop-function/export-excel/tszip.min.d.ts +0 -66
- package/dist/cjs/types/function-elements/fExportTableToExcel/dop-function/jsxToHtml.d.ts +0 -1
- package/dist/cjs/types/function-elements/fExportTableToExcel/fExportTableToExcel.d.ts +0 -8
- package/dist/cjs/types/function-elements/fExportTableToExcel/index.d.ts +0 -1
- package/dist/cjs/types/function-elements/fPrompt/fPrompt.d.ts +0 -8
- package/dist/cjs/types/function-elements/fPrompt/index.d.ts +0 -1
- package/dist/cjs/types/function-elements/index.d.ts +0 -7
- package/dist/cjs/types/hooks/index.d.ts +0 -1
- package/dist/cjs/types/hooks/useFApi/index.d.ts +0 -1
- package/dist/cjs/types/hooks/useFApi/useFApi.d.ts +0 -10
- package/dist/cjs/types/icons/FArrowIcon/FArrowIcon.d.ts +0 -13
- package/dist/cjs/types/icons/FArrowIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FCheckIcon/FCheckIcon.d.ts +0 -12
- package/dist/cjs/types/icons/FCheckIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FCloseIcon/FCloseIcon.d.ts +0 -12
- package/dist/cjs/types/icons/FCloseIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FCopyAddIcon/FCopyAdd.d.ts +0 -12
- package/dist/cjs/types/icons/FDocumentIcon/FDocumentIcon.d.ts +0 -13
- package/dist/cjs/types/icons/FDocumentIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FDownloadIcon/FDownloadIcon.d.ts +0 -11
- package/dist/cjs/types/icons/FDownloadIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FFilterIcon/FFilterIcon.d.ts +0 -11
- package/dist/cjs/types/icons/FFilterIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FListIcon/FListIcon.d.ts +0 -12
- package/dist/cjs/types/icons/FListIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FLoadIcon/FLoadIcon.d.ts +0 -12
- package/dist/cjs/types/icons/FLoadIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FPenIcon/FPenIcon.d.ts +0 -12
- package/dist/cjs/types/icons/FPenIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FPlusIcon/FPlusIcon.d.ts +0 -12
- package/dist/cjs/types/icons/FPlusIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FTrashIcon/FTrashIcon.d.ts +0 -12
- package/dist/cjs/types/icons/FTrashIcon/index.d.ts +0 -1
- package/dist/cjs/types/icons/FUnlinkIcon/FUnlinkIcon.d.ts +0 -12
- package/dist/cjs/types/icons/index.d.ts +0 -13
- package/dist/cjs/types/material/CarouselComponent/FCarousel/FCarousel.d.ts +0 -17
- package/dist/cjs/types/material/CarouselComponent/FCarousel/index.d.ts +0 -1
- package/dist/cjs/types/material/CarouselComponent/FCarouselItem/FCarouselItem.d.ts +0 -14
- package/dist/cjs/types/material/CarouselComponent/FCarouselItem/index.d.ts +0 -1
- package/dist/cjs/types/material/Dialog/FDialog/FDialog.d.ts +0 -14
- package/dist/cjs/types/material/Dialog/FDialog/index.d.ts +0 -1
- package/dist/cjs/types/material/Dialog/FDialogBody/FDialogBody.d.ts +0 -8
- package/dist/cjs/types/material/Dialog/FDialogBody/index.d.ts +0 -1
- package/dist/cjs/types/material/Dialog/FDialogFooter/FDialogFooter.d.ts +0 -9
- package/dist/cjs/types/material/Dialog/FDialogFooter/index.d.ts +0 -1
- package/dist/cjs/types/material/Dialog/FDialogHeader/FDialogHeader.d.ts +0 -7
- package/dist/cjs/types/material/Dialog/FDialogHeader/index.d.ts +0 -1
- package/dist/cjs/types/material/Dropdown/FDropdown/FDropdown.d.ts +0 -15
- package/dist/cjs/types/material/Dropdown/FDropdownItem/FDropdownItem.d.ts +0 -11
- package/dist/cjs/types/material/FAccordion/FAccordion.d.ts +0 -15
- package/dist/cjs/types/material/FAccordion/index.d.ts +0 -1
- package/dist/cjs/types/material/FAlert/FAlert.d.ts +0 -19
- package/dist/cjs/types/material/FAlert/index.d.ts +0 -1
- package/dist/cjs/types/material/FButton/FButton.d.ts +0 -18
- package/dist/cjs/types/material/FButton/index.d.ts +0 -1
- package/dist/cjs/types/material/FButtonFile/FButtonFile.d.ts +0 -22
- package/dist/cjs/types/material/FButtonFile/index.d.ts +0 -1
- package/dist/cjs/types/material/FCheckbox/FCheckbox.d.ts +0 -10
- package/dist/cjs/types/material/FCheckbox/index.d.ts +0 -1
- package/dist/cjs/types/material/FContainer/FContainer.d.ts +0 -11
- package/dist/cjs/types/material/FContainer/index.d.ts +0 -1
- package/dist/cjs/types/material/FFile/FFile.d.ts +0 -10
- package/dist/cjs/types/material/FFile/index.d.ts +0 -1
- package/dist/cjs/types/material/FFullDateField/FFullDateField.d.ts +0 -18
- package/dist/cjs/types/material/FFullDateField/index.d.ts +0 -1
- package/dist/cjs/types/material/FGrid/FGrid.d.ts +0 -18
- package/dist/cjs/types/material/FGrid/index.d.ts +0 -1
- package/dist/cjs/types/material/FInputFileForm/FInputFileForm.d.ts +0 -21
- package/dist/cjs/types/material/FInputFileForm/index.d.ts +0 -1
- package/dist/cjs/types/material/FNative/FNative.d.ts +0 -19
- package/dist/cjs/types/material/FNative/index.d.ts +0 -1
- package/dist/cjs/types/material/FOpenImgFull/FOpenImgFull.d.ts +0 -14
- package/dist/cjs/types/material/FOpenImgFull/index.d.ts +0 -1
- package/dist/cjs/types/material/FPagination/FPagination.d.ts +0 -14
- package/dist/cjs/types/material/FPagination/hooks/usePagination.d.ts +0 -9
- package/dist/cjs/types/material/FPagination/index.d.ts +0 -1
- package/dist/cjs/types/material/FPaper/FPaper.d.ts +0 -18
- package/dist/cjs/types/material/FPaper/index.d.ts +0 -1
- package/dist/cjs/types/material/FPreloader/FPreloader.d.ts +0 -10
- package/dist/cjs/types/material/FPreloader/index.d.ts +0 -1
- package/dist/cjs/types/material/FProgress/FProgress.d.ts +0 -8
- package/dist/cjs/types/material/FProgress/index.d.ts +0 -1
- package/dist/cjs/types/material/FRadioButton/FRadioButton.d.ts +0 -13
- package/dist/cjs/types/material/FRadioButton/index.d.ts +0 -1
- package/dist/cjs/types/material/FSearchBox/FSearchBox.d.ts +0 -21
- package/dist/cjs/types/material/FSelectSearchDb/FSelectSearchDb.d.ts +0 -23
- package/dist/cjs/types/material/FSelectSearchDb/index.d.ts +0 -1
- package/dist/cjs/types/material/FSkeleton/FSkeleton.d.ts +0 -10
- package/dist/cjs/types/material/FSkeleton/index.d.ts +0 -1
- package/dist/cjs/types/material/FStack/FStack.d.ts +0 -14
- package/dist/cjs/types/material/FStack/index.d.ts +0 -1
- package/dist/cjs/types/material/FTextArea/FTextArea.d.ts +0 -17
- package/dist/cjs/types/material/FTextArea/index.d.ts +0 -1
- package/dist/cjs/types/material/FTextField/FTextField.d.ts +0 -15
- package/dist/cjs/types/material/FTextField/index.d.ts +0 -1
- package/dist/cjs/types/material/FTimelineComponents/FTimeline/FTimeline.d.ts +0 -10
- package/dist/cjs/types/material/FTimelineComponents/FTimeline/index.d.ts +0 -1
- package/dist/cjs/types/material/FTimelineComponents/FTimelineCard/FTimelineCard.d.ts +0 -10
- package/dist/cjs/types/material/FTimelineComponents/FTimelineCard/index.d.ts +0 -1
- package/dist/cjs/types/material/SelectComponents/FSelect/FSelect.d.ts +0 -19
- package/dist/cjs/types/material/SelectComponents/FSelect/index.d.ts +0 -1
- package/dist/cjs/types/material/SelectComponents/FSelectItem/FSelectItem.d.ts +0 -13
- package/dist/cjs/types/material/SelectComponents/FSelectItem/index.d.ts +0 -1
- package/dist/cjs/types/material/TableComponents/FTable/FTable.d.ts +0 -12
- package/dist/cjs/types/material/TableComponents/FTable/index.d.ts +0 -1
- package/dist/cjs/types/material/TableComponents/FTableBody/FTableBody.d.ts +0 -11
- package/dist/cjs/types/material/TableComponents/FTableBody/index.d.ts +0 -1
- package/dist/cjs/types/material/TableComponents/FTableDataCell/FTableDataCell.d.ts +0 -16
- package/dist/cjs/types/material/TableComponents/FTableDataCell/index.d.ts +0 -1
- package/dist/cjs/types/material/TableComponents/FTableFooter/FTableFooter.d.ts +0 -10
- package/dist/cjs/types/material/TableComponents/FTableFooter/index.d.ts +0 -1
- package/dist/cjs/types/material/TableComponents/FTableHead/FTableHead.d.ts +0 -11
- package/dist/cjs/types/material/TableComponents/FTableHead/index.d.ts +0 -1
- package/dist/cjs/types/material/TableComponents/FTableHeaderCell/FTableHeaderCell.d.ts +0 -14
- package/dist/cjs/types/material/TableComponents/FTableHeaderCell/index.d.ts +0 -1
- package/dist/cjs/types/material/TableComponents/FTableRow/FTableRow.d.ts +0 -10
- package/dist/cjs/types/material/TableComponents/FTableRow/index.d.ts +0 -1
- package/dist/cjs/types/material/Tabs/FTab/FTab.d.ts +0 -13
- package/dist/cjs/types/material/Tabs/FTabs/FTabs.d.ts +0 -11
- package/dist/esm/index.js +0 -43
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/dop-function/generateUniqueId.d.ts +0 -1
- package/dist/esm/types/function-elements/Notification/fNotification/fNotification.d.ts +0 -11
- package/dist/esm/types/function-elements/Notification/fNotification/index.d.ts +0 -1
- package/dist/esm/types/function-elements/Notification/fNotificationDelete/fNotificationDelete.d.ts +0 -3
- package/dist/esm/types/function-elements/Notification/fNotificationDelete/index.d.ts +0 -1
- package/dist/esm/types/function-elements/fAlert/fAlert.d.ts +0 -8
- package/dist/esm/types/function-elements/fAlert/index.d.ts +0 -1
- package/dist/esm/types/function-elements/fConfirm/fConfirm.d.ts +0 -7
- package/dist/esm/types/function-elements/fConfirm/index.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/fExportHtmlOrJsxToWord.d.ts +0 -10
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/convertHtmlTbToXml.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/convertJsxElementToXml.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/functions/convertHtmlToXml/createRow.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/functions/createXmlTags.d.ts +0 -11
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/functions/generateDocx.d.ts +0 -8
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/functions/getCellData.d.ts +0 -5
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/functions/jsxToHtml.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/index.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/_rels/rels.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/contentTypes.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/docProps/app.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/_rels/documentXmlRels.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/document.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/fontTable.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/settings.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/styles.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/theme/theme1.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportHtmlOrJsxToWord/xml-confs/word/webSettings.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportTableToExcel/dop-function/export-excel/core.d.ts +0 -126
- package/dist/esm/types/function-elements/fExportTableToExcel/dop-function/export-excel/tszip.min.d.ts +0 -66
- package/dist/esm/types/function-elements/fExportTableToExcel/dop-function/jsxToHtml.d.ts +0 -1
- package/dist/esm/types/function-elements/fExportTableToExcel/fExportTableToExcel.d.ts +0 -8
- package/dist/esm/types/function-elements/fExportTableToExcel/index.d.ts +0 -1
- package/dist/esm/types/function-elements/fPrompt/fPrompt.d.ts +0 -8
- package/dist/esm/types/function-elements/fPrompt/index.d.ts +0 -1
- package/dist/esm/types/function-elements/index.d.ts +0 -7
- package/dist/esm/types/hooks/index.d.ts +0 -1
- package/dist/esm/types/hooks/useFApi/index.d.ts +0 -1
- package/dist/esm/types/hooks/useFApi/useFApi.d.ts +0 -10
- package/dist/esm/types/icons/FArrowIcon/FArrowIcon.d.ts +0 -13
- package/dist/esm/types/icons/FArrowIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FCheckIcon/FCheckIcon.d.ts +0 -12
- package/dist/esm/types/icons/FCheckIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FCloseIcon/FCloseIcon.d.ts +0 -12
- package/dist/esm/types/icons/FCloseIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FCopyAddIcon/FCopyAdd.d.ts +0 -12
- package/dist/esm/types/icons/FCopyAddIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FDocumentIcon/FDocumentIcon.d.ts +0 -13
- package/dist/esm/types/icons/FDocumentIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FDownloadIcon/FDownloadIcon.d.ts +0 -11
- package/dist/esm/types/icons/FDownloadIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FFilterIcon/FFilterIcon.d.ts +0 -11
- package/dist/esm/types/icons/FFilterIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FListIcon/FListIcon.d.ts +0 -12
- package/dist/esm/types/icons/FListIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FLoadIcon/FLoadIcon.d.ts +0 -12
- package/dist/esm/types/icons/FLoadIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FPenIcon/FPenIcon.d.ts +0 -12
- package/dist/esm/types/icons/FPenIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FPlusIcon/FPlusIcon.d.ts +0 -12
- package/dist/esm/types/icons/FPlusIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FTrashIcon/FTrashIcon.d.ts +0 -12
- package/dist/esm/types/icons/FTrashIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/FUnlinkIcon/FUnlinkIcon.d.ts +0 -12
- package/dist/esm/types/icons/FUnlinkIcon/index.d.ts +0 -1
- package/dist/esm/types/icons/index.d.ts +0 -13
- package/dist/esm/types/index.d.ts +0 -5
- package/dist/esm/types/material/CarouselComponent/FCarousel/FCarousel.d.ts +0 -17
- package/dist/esm/types/material/CarouselComponent/FCarousel/index.d.ts +0 -1
- package/dist/esm/types/material/CarouselComponent/FCarouselItem/FCarouselItem.d.ts +0 -14
- package/dist/esm/types/material/CarouselComponent/FCarouselItem/index.d.ts +0 -1
- package/dist/esm/types/material/Dialog/FDialog/FDialog.d.ts +0 -14
- package/dist/esm/types/material/Dialog/FDialog/index.d.ts +0 -1
- package/dist/esm/types/material/Dialog/FDialogBody/FDialogBody.d.ts +0 -8
- package/dist/esm/types/material/Dialog/FDialogBody/index.d.ts +0 -1
- package/dist/esm/types/material/Dialog/FDialogFooter/FDialogFooter.d.ts +0 -9
- package/dist/esm/types/material/Dialog/FDialogFooter/index.d.ts +0 -1
- package/dist/esm/types/material/Dialog/FDialogHeader/FDialogHeader.d.ts +0 -7
- package/dist/esm/types/material/Dialog/FDialogHeader/index.d.ts +0 -1
- package/dist/esm/types/material/Dropdown/FDropdown/FDropdown.d.ts +0 -15
- package/dist/esm/types/material/Dropdown/FDropdown/index.d.ts +0 -1
- package/dist/esm/types/material/Dropdown/FDropdownItem/FDropdownItem.d.ts +0 -11
- package/dist/esm/types/material/Dropdown/FDropdownItem/index.d.ts +0 -1
- package/dist/esm/types/material/FAccordion/FAccordion.d.ts +0 -15
- package/dist/esm/types/material/FAccordion/index.d.ts +0 -1
- package/dist/esm/types/material/FAlert/FAlert.d.ts +0 -19
- package/dist/esm/types/material/FAlert/index.d.ts +0 -1
- package/dist/esm/types/material/FButton/FButton.d.ts +0 -18
- package/dist/esm/types/material/FButton/index.d.ts +0 -1
- package/dist/esm/types/material/FButtonFile/FButtonFile.d.ts +0 -22
- package/dist/esm/types/material/FButtonFile/index.d.ts +0 -1
- package/dist/esm/types/material/FCheckbox/FCheckbox.d.ts +0 -10
- package/dist/esm/types/material/FCheckbox/index.d.ts +0 -1
- package/dist/esm/types/material/FContainer/FContainer.d.ts +0 -11
- package/dist/esm/types/material/FContainer/index.d.ts +0 -1
- package/dist/esm/types/material/FFile/FFile.d.ts +0 -10
- package/dist/esm/types/material/FFile/index.d.ts +0 -1
- package/dist/esm/types/material/FFullDateField/FFullDateField.d.ts +0 -18
- package/dist/esm/types/material/FFullDateField/index.d.ts +0 -1
- package/dist/esm/types/material/FGrid/FGrid.d.ts +0 -18
- package/dist/esm/types/material/FGrid/index.d.ts +0 -1
- package/dist/esm/types/material/FInputFileForm/FInputFileForm.d.ts +0 -21
- package/dist/esm/types/material/FInputFileForm/index.d.ts +0 -1
- package/dist/esm/types/material/FNative/FNative.d.ts +0 -19
- package/dist/esm/types/material/FNative/index.d.ts +0 -1
- package/dist/esm/types/material/FOpenImgFull/FOpenImgFull.d.ts +0 -14
- package/dist/esm/types/material/FOpenImgFull/index.d.ts +0 -1
- package/dist/esm/types/material/FPagination/FPagination.d.ts +0 -14
- package/dist/esm/types/material/FPagination/hooks/usePagination.d.ts +0 -9
- package/dist/esm/types/material/FPagination/index.d.ts +0 -1
- package/dist/esm/types/material/FPaper/FPaper.d.ts +0 -18
- package/dist/esm/types/material/FPaper/index.d.ts +0 -1
- package/dist/esm/types/material/FPreloader/FPreloader.d.ts +0 -10
- package/dist/esm/types/material/FPreloader/index.d.ts +0 -1
- package/dist/esm/types/material/FProgress/FProgress.d.ts +0 -8
- package/dist/esm/types/material/FProgress/index.d.ts +0 -1
- package/dist/esm/types/material/FRadioButton/FRadioButton.d.ts +0 -13
- package/dist/esm/types/material/FRadioButton/index.d.ts +0 -1
- package/dist/esm/types/material/FSearchBox/FSearchBox.d.ts +0 -21
- package/dist/esm/types/material/FSearchBox/index.d.ts +0 -1
- package/dist/esm/types/material/FSelectSearchDb/FSelectSearchDb.d.ts +0 -23
- package/dist/esm/types/material/FSelectSearchDb/index.d.ts +0 -1
- package/dist/esm/types/material/FSkeleton/FSkeleton.d.ts +0 -10
- package/dist/esm/types/material/FSkeleton/index.d.ts +0 -1
- package/dist/esm/types/material/FStack/FStack.d.ts +0 -14
- package/dist/esm/types/material/FStack/index.d.ts +0 -1
- package/dist/esm/types/material/FTextArea/FTextArea.d.ts +0 -17
- package/dist/esm/types/material/FTextArea/index.d.ts +0 -1
- package/dist/esm/types/material/FTextField/FTextField.d.ts +0 -15
- package/dist/esm/types/material/FTextField/index.d.ts +0 -1
- package/dist/esm/types/material/FTimelineComponents/FTimeline/FTimeline.d.ts +0 -10
- package/dist/esm/types/material/FTimelineComponents/FTimeline/index.d.ts +0 -1
- package/dist/esm/types/material/FTimelineComponents/FTimelineCard/FTimelineCard.d.ts +0 -10
- package/dist/esm/types/material/FTimelineComponents/FTimelineCard/index.d.ts +0 -1
- package/dist/esm/types/material/SelectComponents/FSelect/FSelect.d.ts +0 -19
- package/dist/esm/types/material/SelectComponents/FSelect/index.d.ts +0 -1
- package/dist/esm/types/material/SelectComponents/FSelectItem/FSelectItem.d.ts +0 -13
- package/dist/esm/types/material/SelectComponents/FSelectItem/index.d.ts +0 -1
- package/dist/esm/types/material/TableComponents/FTable/FTable.d.ts +0 -12
- package/dist/esm/types/material/TableComponents/FTable/index.d.ts +0 -1
- package/dist/esm/types/material/TableComponents/FTableBody/FTableBody.d.ts +0 -11
- package/dist/esm/types/material/TableComponents/FTableBody/index.d.ts +0 -1
- package/dist/esm/types/material/TableComponents/FTableDataCell/FTableDataCell.d.ts +0 -16
- package/dist/esm/types/material/TableComponents/FTableDataCell/index.d.ts +0 -1
- package/dist/esm/types/material/TableComponents/FTableFooter/FTableFooter.d.ts +0 -10
- package/dist/esm/types/material/TableComponents/FTableFooter/index.d.ts +0 -1
- package/dist/esm/types/material/TableComponents/FTableHead/FTableHead.d.ts +0 -11
- package/dist/esm/types/material/TableComponents/FTableHead/index.d.ts +0 -1
- package/dist/esm/types/material/TableComponents/FTableHeaderCell/FTableHeaderCell.d.ts +0 -14
- package/dist/esm/types/material/TableComponents/FTableHeaderCell/index.d.ts +0 -1
- package/dist/esm/types/material/TableComponents/FTableRow/FTableRow.d.ts +0 -10
- package/dist/esm/types/material/TableComponents/FTableRow/index.d.ts +0 -1
- package/dist/esm/types/material/Tabs/FTab/FTab.d.ts +0 -13
- package/dist/esm/types/material/Tabs/FTab/index.d.ts +0 -1
- package/dist/esm/types/material/Tabs/FTabs/FTabs.d.ts +0 -11
- package/dist/esm/types/material/Tabs/FTabs/index.d.ts +0 -1
- package/dist/esm/types/material/index.d.ts +0 -44
- package/dist/index.d.ts +0 -730
- /package/{dist/cjs/types/icons/FCopyAddIcon/index.d.ts → src/icons/FCopyAddIcon/index.ts} +0 -0
- /package/{dist/cjs/types/icons/FUnlinkIcon/index.d.ts → src/icons/FUnlinkIcon/index.ts} +0 -0
- /package/{dist/cjs/types/material/Dropdown/FDropdown/index.d.ts → src/material/Dropdown/FDropdown/index.ts} +0 -0
- /package/{dist/cjs/types/material/Dropdown/FDropdownItem/index.d.ts → src/material/Dropdown/FDropdownItem/index.ts} +0 -0
- /package/{dist/cjs/types/material/FSearchBox/index.d.ts → src/material/FSearchBox/index.ts} +0 -0
- /package/{dist/cjs/types/material/Tabs/FTab/index.d.ts → src/material/Tabs/FTab/index.ts} +0 -0
- /package/{dist/cjs/types/material/Tabs/FTabs/index.d.ts → src/material/Tabs/FTabs/index.ts} +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-black.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-black.woff2 +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-bold.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-bold.woff2 +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-heavy.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-heavy.woff2 +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-light.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-light.woff2 +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-medium.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-medium.woff2 +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-regular.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-regular.woff2 +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-semibold.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-semibold.woff2 +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-thin.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-thin.woff2 +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-ultralight.woff +0 -0
- /package/{dist → src/static}/fonts/sf-ui-display-ultralight.woff2 +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import './fAlert.css'
|
|
2
|
+
|
|
3
|
+
export interface IfAlert {
|
|
4
|
+
title?: string,
|
|
5
|
+
body: string,
|
|
6
|
+
variant: 'info' | 'error' | 'success' | 'warning'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const fAlert = (
|
|
10
|
+
{
|
|
11
|
+
title,
|
|
12
|
+
body,
|
|
13
|
+
variant = 'info'
|
|
14
|
+
}: IfAlert
|
|
15
|
+
) => {
|
|
16
|
+
|
|
17
|
+
let ico = ''
|
|
18
|
+
|
|
19
|
+
switch (variant) {
|
|
20
|
+
case 'info':
|
|
21
|
+
ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>'
|
|
22
|
+
break
|
|
23
|
+
case "success":
|
|
24
|
+
ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M10.97 4.97a.75.75 0 0 1 1.071 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.235.235 0 0 1 .02-.022z"/>'
|
|
25
|
+
break
|
|
26
|
+
case 'error':
|
|
27
|
+
ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/>'
|
|
28
|
+
break
|
|
29
|
+
case 'warning':
|
|
30
|
+
ico = '<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/><path d="M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z"/>'
|
|
31
|
+
break
|
|
32
|
+
}
|
|
33
|
+
const arrBody: string[] = []
|
|
34
|
+
body.split('\n').map(opt => {
|
|
35
|
+
arrBody.push(
|
|
36
|
+
`<span>${opt}</span>`
|
|
37
|
+
)
|
|
38
|
+
})
|
|
39
|
+
window.document.body.insertAdjacentHTML(
|
|
40
|
+
'afterbegin',
|
|
41
|
+
`
|
|
42
|
+
<div class='f-function-block-alert' id='f-function-block-alert'>
|
|
43
|
+
<div class='f-function-alert'>
|
|
44
|
+
<div class='f-function-alert-ico ${variant}-alert'>
|
|
45
|
+
<svg width="28" height="28" viewBox="0 0 16 16">
|
|
46
|
+
${ico}
|
|
47
|
+
</svg>
|
|
48
|
+
</div>
|
|
49
|
+
<div class='f-function-alert-inside'>
|
|
50
|
+
<div class='f-function-alert-header'>
|
|
51
|
+
<h4>${title !== undefined ? title : ''}</h4>
|
|
52
|
+
</div>
|
|
53
|
+
<div class='f-function-alert-body'>
|
|
54
|
+
${arrBody.join('')}
|
|
55
|
+
</div>
|
|
56
|
+
<div class='f-function-alert-footer'>
|
|
57
|
+
<button
|
|
58
|
+
class='btn btn-primary btn-sm'
|
|
59
|
+
onclick='document.querySelector("#f-function-block-alert").remove()'
|
|
60
|
+
>
|
|
61
|
+
Закрыть
|
|
62
|
+
</button>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
`
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default fAlert
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./fAlert";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.f-function-block-confirm {
|
|
2
|
+
z-index: 9999999999;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100vw;
|
|
5
|
+
background-color: rgba(47, 128, 237, 0.35);
|
|
6
|
+
position: fixed;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
pointer-events: all;
|
|
13
|
+
transition: 1s;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.f-function-confirm {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
width: 625px;
|
|
20
|
+
min-height: 75px;
|
|
21
|
+
background-color: white;
|
|
22
|
+
border-radius: 10px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.f-function-confirm-ico {
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
width: 40px;
|
|
30
|
+
border-bottom-left-radius: 10px;
|
|
31
|
+
border-top-left-radius: 10px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.f-function-confirm-ico.warning {
|
|
35
|
+
color: #ffc107 !important;
|
|
36
|
+
background-color: rgba(255, 193, 7, 0.4) !important;
|
|
37
|
+
fill: #ffc107 !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.f-function-confirm-inside {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
margin: 16px;
|
|
44
|
+
gap: 16px;
|
|
45
|
+
width: 553px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.f-function-confirm-header {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.f-function-confirm-header h4 {
|
|
54
|
+
font-family: "SF UI Display", sans-serif;
|
|
55
|
+
color: #000;
|
|
56
|
+
font-size: 15px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.f-function-confirm-body {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.f-function-confirm-body span {
|
|
65
|
+
font-size: 12px;
|
|
66
|
+
font-weight: bold;
|
|
67
|
+
color: #656565;
|
|
68
|
+
white-space: normal;
|
|
69
|
+
-webkit-hyphens: auto;
|
|
70
|
+
-ms-hyphens: auto;
|
|
71
|
+
hyphens: auto;
|
|
72
|
+
word-wrap: anywhere;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.f-function-confirm-footer {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
flex-direction: row-reverse;
|
|
79
|
+
gap: 8px;
|
|
80
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import './fConfirm.css'
|
|
2
|
+
|
|
3
|
+
export interface IfConfirm {
|
|
4
|
+
title?: string,
|
|
5
|
+
body: string,
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const fConfirm = ({ title, body }: IfConfirm): Promise<boolean> => {
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
window.document.body.insertAdjacentHTML(
|
|
11
|
+
'afterbegin',
|
|
12
|
+
`
|
|
13
|
+
<div class='f-function-block-confirm' id='f-function-block-confirm'>
|
|
14
|
+
<div class='f-function-confirm'>
|
|
15
|
+
<div class='f-function-confirm-ico warning'>
|
|
16
|
+
<svg width="28" height="28" viewBox="0 0 16 16">
|
|
17
|
+
<path
|
|
18
|
+
d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/>
|
|
19
|
+
<path
|
|
20
|
+
d="M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/>
|
|
21
|
+
</svg>
|
|
22
|
+
</div>
|
|
23
|
+
<div class='f-function-confirm-inside'>
|
|
24
|
+
<div class='f-function-confirm-header'>
|
|
25
|
+
<h4>${title !== undefined ? title : ''}</h4>
|
|
26
|
+
</div>
|
|
27
|
+
<div class='f-function-confirm-body'>
|
|
28
|
+
<span>${body}</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div class='f-function-confirm-footer'>
|
|
31
|
+
<button
|
|
32
|
+
id="f-function-confirm-ok"
|
|
33
|
+
class='btn btn-success btn-sm'
|
|
34
|
+
onclick='document.querySelector("#f-function-block-confirm").remove()'
|
|
35
|
+
>
|
|
36
|
+
Ок
|
|
37
|
+
</button>
|
|
38
|
+
<button
|
|
39
|
+
id="f-function-confirm-cancellation"
|
|
40
|
+
class='btn btn-danger btn-sm'
|
|
41
|
+
onclick='document.querySelector("#f-function-block-confirm").remove()'
|
|
42
|
+
>
|
|
43
|
+
Отменить
|
|
44
|
+
</button>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
`
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const ok = document.querySelector('#f-function-confirm-ok')
|
|
53
|
+
const cancellation = document.querySelector('#f-function-confirm-cancellation')
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
ok!.addEventListener('click', function () {
|
|
57
|
+
resolve(true);
|
|
58
|
+
})
|
|
59
|
+
cancellation!.addEventListener('click', function () {
|
|
60
|
+
resolve(false);
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export default fConfirm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./fConfirm";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { convertHtmlTbToXml } from "./functions/convertHtmlToXml/convertHtmlTbToXml";
|
|
2
|
+
import { generateDocx } from "./functions/generateDocx";
|
|
3
|
+
import { convertJsxElementToXml } from "./functions/convertHtmlToXml/convertJsxElementToXml";
|
|
4
|
+
import { jsxToHtml } from "./functions/jsxToHtml";
|
|
5
|
+
|
|
6
|
+
export interface IfExportHtmlOrJsxToWord {
|
|
7
|
+
tableId?: string,
|
|
8
|
+
divId?: string,
|
|
9
|
+
fileName: string,
|
|
10
|
+
jsxElement?: string,
|
|
11
|
+
format?: 'A4' | 'A3' | 'A2' | 'A1',
|
|
12
|
+
orientation?: 'landscape' | 'vertical'
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const fExportHtmlOrJsxToWord = async ({
|
|
16
|
+
tableId,
|
|
17
|
+
fileName,
|
|
18
|
+
jsxElement,
|
|
19
|
+
format = "A4",
|
|
20
|
+
orientation = 'landscape',
|
|
21
|
+
divId
|
|
22
|
+
}: IfExportHtmlOrJsxToWord) => {
|
|
23
|
+
|
|
24
|
+
let width = 0
|
|
25
|
+
|
|
26
|
+
switch (format) {
|
|
27
|
+
|
|
28
|
+
case "A4":
|
|
29
|
+
width = (orientation === 'landscape' ? 16838 : 11906) - (orientation === 'landscape' ? 851 : 567) - (orientation === 'landscape' ? 1701 : 1701)
|
|
30
|
+
break;
|
|
31
|
+
case "A3":
|
|
32
|
+
width = (orientation === 'landscape' ? 23803 : 16817) - (orientation === 'landscape' ? 851 : 851) - (orientation === 'landscape' ? 1418 : 1418)
|
|
33
|
+
break;
|
|
34
|
+
case "A2":
|
|
35
|
+
width = (orientation === 'landscape' ? 31678 : 23803) - (orientation === 'landscape' ? 1134 : 1134) - (orientation === 'landscape' ? 1701 : 1701)
|
|
36
|
+
break;
|
|
37
|
+
case "A1":
|
|
38
|
+
width = (orientation === 'landscape' ? 31678 : 31678) - (orientation === 'landscape' ? 1701 : 1701) - (orientation === 'landscape' ? 2268 : 2268)
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (tableId !== undefined && jsxElement === undefined && divId === undefined) {
|
|
43
|
+
const htmlTable = document.getElementById(tableId);
|
|
44
|
+
if (htmlTable) {
|
|
45
|
+
const stringTb = convertHtmlTbToXml(htmlTable, width)
|
|
46
|
+
await generateDocx({ data: stringTb, format: format, orientation: orientation, fileName: fileName })
|
|
47
|
+
return true
|
|
48
|
+
} else {
|
|
49
|
+
return false
|
|
50
|
+
}
|
|
51
|
+
} else if (jsxElement !== undefined && divId === undefined && tableId === undefined) {
|
|
52
|
+
|
|
53
|
+
let status: boolean = false
|
|
54
|
+
|
|
55
|
+
await jsxToHtml(jsxElement).then(async (element) => {
|
|
56
|
+
if (element !== null) {
|
|
57
|
+
await generateDocx({
|
|
58
|
+
data: convertJsxElementToXml(element, width),
|
|
59
|
+
format: format,
|
|
60
|
+
orientation: orientation,
|
|
61
|
+
fileName: fileName
|
|
62
|
+
})
|
|
63
|
+
status = true
|
|
64
|
+
} else {
|
|
65
|
+
status = false
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return status
|
|
70
|
+
} else if (divId !== undefined && jsxElement === undefined && tableId === undefined) {
|
|
71
|
+
|
|
72
|
+
const divBlock: HTMLElement | null = document.getElementById(divId);
|
|
73
|
+
|
|
74
|
+
if (divBlock !== null) {
|
|
75
|
+
await generateDocx({
|
|
76
|
+
data: convertJsxElementToXml(divBlock, width),
|
|
77
|
+
format: format,
|
|
78
|
+
orientation: orientation,
|
|
79
|
+
fileName: fileName
|
|
80
|
+
})
|
|
81
|
+
return true
|
|
82
|
+
} else {
|
|
83
|
+
return false
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
return false
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export default fExportHtmlOrJsxToWord
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createRow } from "./createRow";
|
|
2
|
+
import { createTagTb } from "../createXmlTags";
|
|
3
|
+
import { getCellData } from "../getCellData";
|
|
4
|
+
|
|
5
|
+
export const convertHtmlTbToXml = (opt: Element, width: number) => {
|
|
6
|
+
|
|
7
|
+
const thead = opt.querySelector('thead');
|
|
8
|
+
const tbody = opt.querySelector('tbody');
|
|
9
|
+
|
|
10
|
+
let theadXml = ''
|
|
11
|
+
let tbodyXml = ''
|
|
12
|
+
|
|
13
|
+
if (thead !== null) {
|
|
14
|
+
theadXml = createRow(thead)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (tbody !== null) {
|
|
18
|
+
tbodyXml = createRow(tbody)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let countCell = 0
|
|
22
|
+
|
|
23
|
+
if (thead !== null) {
|
|
24
|
+
const rows = thead.querySelectorAll('tr')
|
|
25
|
+
const firstCell: HTMLTableCellElement[] = Array.from(rows[0].querySelectorAll('th, td'));
|
|
26
|
+
|
|
27
|
+
firstCell.forEach((cell) => {
|
|
28
|
+
const { colspan } = getCellData(cell);
|
|
29
|
+
countCell += colspan
|
|
30
|
+
})
|
|
31
|
+
} else if (tbody !== null) {
|
|
32
|
+
const rows = tbody.querySelectorAll('tr')
|
|
33
|
+
const firstCell: HTMLTableCellElement[] = Array.from(rows[0].querySelectorAll('th, td'));
|
|
34
|
+
|
|
35
|
+
firstCell.forEach((cell) => {
|
|
36
|
+
const { colspan } = getCellData(cell);
|
|
37
|
+
countCell += colspan
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return createTagTb(theadXml + tbodyXml, countCell, width)
|
|
42
|
+
|
|
43
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createEndSpan,
|
|
3
|
+
createStartSpan,
|
|
4
|
+
createTagBr,
|
|
5
|
+
createTagH1,
|
|
6
|
+
createTagH1ToH6,
|
|
7
|
+
createTagP,
|
|
8
|
+
createTagSpan
|
|
9
|
+
} from "../createXmlTags";
|
|
10
|
+
import {convertHtmlTbToXml} from "./convertHtmlTbToXml";
|
|
11
|
+
|
|
12
|
+
export const convertJsxElementToXml = (el: HTMLDivElement | HTMLElement, width: number) => {
|
|
13
|
+
|
|
14
|
+
let listXmlStr: string[] = []
|
|
15
|
+
|
|
16
|
+
const arr = el.querySelectorAll('h1, h2, h3, h4, h5, h6, p, span, br, table')
|
|
17
|
+
|
|
18
|
+
let span = ''
|
|
19
|
+
arr.forEach((opt, index) => {
|
|
20
|
+
if (opt.textContent !== null) {
|
|
21
|
+
if (opt.tagName === 'H1') {
|
|
22
|
+
if (span !== '') {
|
|
23
|
+
listXmlStr.push(span += createEndSpan())
|
|
24
|
+
span = ''
|
|
25
|
+
listXmlStr.push(createTagH1(opt.textContent))
|
|
26
|
+
} else {
|
|
27
|
+
listXmlStr.push(createTagH1(opt.textContent))
|
|
28
|
+
}
|
|
29
|
+
} else if (opt.tagName === 'H2' || opt.tagName === 'H3' || opt.tagName === 'H4' || opt.tagName === 'H5' || opt.tagName === 'H6') {
|
|
30
|
+
if (span !== '') {
|
|
31
|
+
listXmlStr.push(span += createEndSpan())
|
|
32
|
+
span = ''
|
|
33
|
+
listXmlStr.push(createTagH1ToH6(opt.textContent))
|
|
34
|
+
} else {
|
|
35
|
+
listXmlStr.push(createTagH1ToH6(opt.textContent))
|
|
36
|
+
}
|
|
37
|
+
} else if (opt.tagName === 'P') {
|
|
38
|
+
if (span !== '') {
|
|
39
|
+
listXmlStr.push(span += createEndSpan())
|
|
40
|
+
span = ''
|
|
41
|
+
listXmlStr.push(createTagP(opt.textContent))
|
|
42
|
+
} else {
|
|
43
|
+
listXmlStr.push(createTagP(opt.textContent))
|
|
44
|
+
}
|
|
45
|
+
} else if (opt.tagName === 'SPAN') {
|
|
46
|
+
if (span === '') {
|
|
47
|
+
span = createStartSpan()
|
|
48
|
+
span += createTagSpan(opt.textContent)
|
|
49
|
+
} else {
|
|
50
|
+
span += createTagSpan(opt.textContent)
|
|
51
|
+
}
|
|
52
|
+
if (arr.length === index + 1) {
|
|
53
|
+
listXmlStr.push(span += createEndSpan())
|
|
54
|
+
}
|
|
55
|
+
} else if (opt.tagName === 'BR') {
|
|
56
|
+
if (span !== '') {
|
|
57
|
+
listXmlStr.push(span += createEndSpan())
|
|
58
|
+
span = ''
|
|
59
|
+
listXmlStr.push(createTagBr())
|
|
60
|
+
} else {
|
|
61
|
+
listXmlStr.push(createTagBr())
|
|
62
|
+
}
|
|
63
|
+
} else if (opt.tagName === "TABLE") {
|
|
64
|
+
if (span !== '') {
|
|
65
|
+
listXmlStr.push(span += createEndSpan())
|
|
66
|
+
span = ''
|
|
67
|
+
listXmlStr.push(convertHtmlTbToXml(opt, width))
|
|
68
|
+
} else {
|
|
69
|
+
listXmlStr.push(convertHtmlTbToXml(opt, width))
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
return listXmlStr.join('')
|
|
76
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { getCellData } from "../getCellData";
|
|
2
|
+
import { createTagTbBodyCell, createTagTbHeaderCell, createTagTbRow } from "../createXmlTags";
|
|
3
|
+
|
|
4
|
+
export const createRow = (elTb: HTMLTableSectionElement) => {
|
|
5
|
+
|
|
6
|
+
const rows = Array.from(elTb.querySelectorAll('tr'));
|
|
7
|
+
|
|
8
|
+
const listRow: { [key: number]: { [key: string]: string | null | undefined } } = {}
|
|
9
|
+
|
|
10
|
+
let countCell = 0
|
|
11
|
+
const defaultRow: { [key: number]: null } = {}
|
|
12
|
+
|
|
13
|
+
const firstCell: HTMLTableCellElement[] = Array.from(rows[0].querySelectorAll('th, td'));
|
|
14
|
+
|
|
15
|
+
firstCell.forEach((cell) => {
|
|
16
|
+
const { colspan } = getCellData(cell);
|
|
17
|
+
countCell += colspan
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
for (let i = 0; i < countCell; i++) {
|
|
21
|
+
defaultRow[i] = null
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
for (let i = 0; i < rows.length; i++) {
|
|
25
|
+
listRow[i] = Object.assign({}, defaultRow)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const deleteCellFromRow: { [key: number]: number[] } = {}
|
|
29
|
+
|
|
30
|
+
rows.forEach((row, iRow) => {
|
|
31
|
+
|
|
32
|
+
const nullCell: number[] = []
|
|
33
|
+
|
|
34
|
+
Object.values(listRow[iRow]).forEach((opt, index) => {
|
|
35
|
+
if (opt === null) {
|
|
36
|
+
nullCell.push(index)
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const cells: HTMLTableCellElement[] = Array.from(row.querySelectorAll('th, td'));
|
|
41
|
+
|
|
42
|
+
let countEditCel = 0
|
|
43
|
+
|
|
44
|
+
cells.forEach((cell) => {
|
|
45
|
+
|
|
46
|
+
const { content, rowspan, colspan } = getCellData(cell);
|
|
47
|
+
|
|
48
|
+
const listCellNull = nullCell.slice(countEditCel, countEditCel + colspan).reverse()
|
|
49
|
+
let indexCellOnObj: number = 0
|
|
50
|
+
|
|
51
|
+
listCellNull.map((nullCel, indexNullCel) => {
|
|
52
|
+
if (indexNullCel === listCellNull.length - 1) {
|
|
53
|
+
indexCellOnObj = nullCel
|
|
54
|
+
} else {
|
|
55
|
+
delete listRow[iRow][nullCel]
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
if (rowspan > 1 && colspan < 2) {
|
|
60
|
+
for (let i = 1; i < rowspan; i++) {
|
|
61
|
+
if (cell.tagName === 'TH') {
|
|
62
|
+
listRow[iRow + i][indexCellOnObj] = createTagTbHeaderCell(undefined, 'continue')
|
|
63
|
+
} else if (cell.tagName === 'TD') {
|
|
64
|
+
listRow[iRow + i][indexCellOnObj] = createTagTbBodyCell(undefined, 'continue')
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
} else if (rowspan > 1 && colspan > 1) {
|
|
69
|
+
for (let i = 1; i < rowspan; i++) {
|
|
70
|
+
deleteCellFromRow[iRow + i] = []
|
|
71
|
+
listCellNull.map((nullCel, indexNullCel) => {
|
|
72
|
+
if (indexNullCel === listCellNull.length - 1) {
|
|
73
|
+
if (cell.tagName === 'TH') {
|
|
74
|
+
listRow[iRow + i][nullCel] = createTagTbHeaderCell(undefined, 'continue', colspan)
|
|
75
|
+
} else if (cell.tagName === 'TD') {
|
|
76
|
+
listRow[iRow + i][nullCel] = createTagTbBodyCell(undefined, 'continue', colspan)
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
deleteCellFromRow[i].push(nullCel)
|
|
80
|
+
listRow[iRow + i][nullCel] = undefined
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (cell.tagName === 'TH') {
|
|
87
|
+
listRow[iRow][indexCellOnObj] = createTagTbHeaderCell(content, rowspan > 1 ? 'restart' : undefined, colspan > 1 ? colspan : undefined)
|
|
88
|
+
} else if (cell.tagName === 'TD') {
|
|
89
|
+
listRow[iRow][indexCellOnObj] = createTagTbBodyCell(content, rowspan > 1 ? 'restart' : undefined, colspan > 1 ? colspan : undefined)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
countEditCel += colspan
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
Object.entries(deleteCellFromRow).map(([key, value]) => {
|
|
97
|
+
value.map(opt => {
|
|
98
|
+
delete listRow[+key][opt]
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
const render: string[] = []
|
|
103
|
+
Object.values(listRow).forEach((opt) => {
|
|
104
|
+
render.push(createTagTbRow(Object.values(opt).join('')))
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
return render.join('')
|
|
108
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export const createTagH1 = (text: string): string => {
|
|
2
|
+
return `<w:p><w:pPr><w:pStyle w:val="a4"/></w:pPr><w:r><w:t>${text}</w:t></w:r></w:p>`
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export const createTagH1ToH6 = (text: string): string => {
|
|
6
|
+
return `<w:p><w:pPr><w:pStyle w:val="a6"/></w:pPr><w:r><w:t>${text}</w:t></w:r></w:p>`
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const createTagP = (text: string): string => {
|
|
10
|
+
return `<w:p><w:pPr><w:ind w:firstLine="708"/></w:pPr><w:r><w:t>${text}</w:t></w:r></w:p>`
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const createStartSpan = (): string => {
|
|
14
|
+
return `<w:p><w:pPr><w:ind w:firstLine="708"/></w:pPr><w:r>`
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const createEndSpan = () => {
|
|
18
|
+
return `</w:r></w:p>`
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const createTagSpan = (text: string) => {
|
|
22
|
+
return `<w:t>${text}</w:t><w:t xml:space="preserve"> </w:t>`
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const createTagBr = () => {
|
|
26
|
+
return `<w:p></w:p>`
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const createTagTb = (table: string, rows: number, width: number): string => {
|
|
30
|
+
|
|
31
|
+
const arr: string[] = ['<w:tblGrid>']
|
|
32
|
+
|
|
33
|
+
for (let i = 0; i < rows; i++) {
|
|
34
|
+
arr.push(`<w:gridCol w:w="${Math.floor(width/rows)}"/>`)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
arr.push('</w:tblGrid>')
|
|
38
|
+
|
|
39
|
+
return `<w:tbl><w:tblPr><w:tblStyle w:val="a7"/><w:tblW w:w="1" w:type="auto"/><w:tblLook w:val="04A0" w:firstRow="1" w:lastRow="0" w:firstColumn="1" w:lastColumn="0" w:noHBand="0" w:noVBand="1"/></w:tblPr>${arr.join('')}${table}</w:tbl>`
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const createTagTbRow = (listCel: string) => {
|
|
43
|
+
return `<w:tr>${listCel}</w:tr>`
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const addTextTbHead = (text: string | undefined,) => {
|
|
47
|
+
let newText = ''
|
|
48
|
+
|
|
49
|
+
if (text !== undefined) {
|
|
50
|
+
newText = `<w:r><w:rPr><w:rFonts w:cs="Times New Roman"/><w:b/><w:bCs/><w:color w:val="000000"/><w:szCs w:val="28"/></w:rPr><w:t>${text}</w:t></w:r>`
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return newText
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const addTextTbBody = (text: string | undefined,) => {
|
|
57
|
+
let newText = ''
|
|
58
|
+
|
|
59
|
+
if (text !== undefined) {
|
|
60
|
+
newText = `<w:r><w:rPr><w:rFonts w:cs="Times New Roman"/><w:color w:val="000000"/><w:szCs w:val="28"/></w:rPr><w:t>${text}</w:t></w:r>`
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return newText
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const createTagTbHeaderCell = (text?: string, rowSpan?: 'restart' | 'continue', colSpan?: number) => {
|
|
67
|
+
return `<w:tc><w:tcPr><w:tcW w:w="1" w:type="dxa"/>${colSpan !== undefined ? `<w:gridSpan w:val="${colSpan}"/>` : ''}${rowSpan !== undefined ? `<w:vMerge ${rowSpan === 'restart' ? 'w:val="restart"' : 'w:val="continue"'}/>` : ''}<w:vAlign w:val="center"/></w:tcPr><w:p><w:pPr><w:ind w:firstLine="0"/><w:jc w:val="center"/><w:rPr><w:rFonts w:cs="Times New Roman"/><w:b/><w:bCs/><w:color w:val="000000"/><w:szCs w:val="28"/></w:rPr></w:pPr>${addTextTbHead(text)}</w:p></w:tc>`
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const createTagTbBodyCell = (text?: string, rowSpan?: 'restart' | 'continue', colSpan?: number) => {
|
|
71
|
+
return `<w:tc><w:tcPr><w:tcW w:w="1" w:type="dxa"/>${colSpan !== undefined ? `<w:gridSpan w:val="${colSpan}"/>` : ''}${rowSpan !== undefined ? `<w:vMerge ${rowSpan === 'restart' ? 'w:val="restart"' : 'w:val="continue"'}/>` : ''}<w:vAlign w:val="center"/></w:tcPr><w:p><w:pPr><w:ind w:firstLine="0"/><w:rPr><w:rFonts w:cs="Times New Roman"/><w:color w:val="000000"/><w:szCs w:val="28"/></w:rPr></w:pPr>${addTextTbBody(text)}</w:p></w:tc>`
|
|
72
|
+
}
|