@harjs/react-ui 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/LICENSE +21 -0
- package/README.md +27 -0
- package/dist/assets/css/components/charts/gantt/styles.css +62 -0
- package/dist/assets/css/components/charts/pie/pie.css +90 -0
- package/dist/assets/css/components/data-display/calendar/styles.css +15 -0
- package/dist/assets/css/components/data-display/calendar/styles.week-view.css +144 -0
- package/dist/assets/css/components/data-display/card/statuses.css +377 -0
- package/dist/assets/css/components/data-display/card/styles.css +26 -0
- package/dist/assets/css/components/data-display/chip/chip.css +13 -0
- package/dist/assets/css/components/data-display/diagram/styles.css +125 -0
- package/dist/assets/css/components/data-display/divider/divider.css +8 -0
- package/dist/assets/css/components/data-display/dnd/animations.css +11 -0
- package/dist/assets/css/components/data-display/dnd/shadow.css +26 -0
- package/dist/assets/css/components/data-display/dnd/styles.css +72 -0
- package/dist/assets/css/components/data-display/grid-system/column/position.css +21 -0
- package/dist/assets/css/components/data-display/grid-system/column/styles.css +379 -0
- package/dist/assets/css/components/data-display/grid-system/row/styles.css +35 -0
- package/dist/assets/css/components/data-display/grid-system/styles.css +6 -0
- package/dist/assets/css/components/data-display/kanban-board/styles.css +371 -0
- package/dist/assets/css/components/data-display/paper/styles.css +49 -0
- package/dist/assets/css/components/data-display/syntax-highlighter/core/jsx.template.css +65 -0
- package/dist/assets/css/components/data-display/syntax-highlighter/syntax-highlighter.css +58 -0
- package/dist/assets/css/components/data-display/table/filter-popup.css +11 -0
- package/dist/assets/css/components/data-display/table/properties-popup.css +42 -0
- package/dist/assets/css/components/data-display/table/scroll.css +208 -0
- package/dist/assets/css/components/data-display/table/styles.css +867 -0
- package/dist/assets/css/components/data-display/tabs/tabs.css +245 -0
- package/dist/assets/css/components/data-display/typography/paragraph/align.css +13 -0
- package/dist/assets/css/components/data-display/typography/paragraph/color.css +51 -0
- package/dist/assets/css/components/data-display/typography/paragraph/core.css +6 -0
- package/dist/assets/css/components/data-display/typography/paragraph/size.css +13 -0
- package/dist/assets/css/components/data-display/typography/title/align.css +13 -0
- package/dist/assets/css/components/data-display/typography/title/color.css +0 -0
- package/dist/assets/css/components/data-display/typography/title/core.css +5 -0
- package/dist/assets/css/components/data-display/typography/title/size.css +41 -0
- package/dist/assets/css/components/data-display/typography/typography.css +11 -0
- package/dist/assets/css/components/feedback/alert/statuses.css +224 -0
- package/dist/assets/css/components/feedback/alert/styles.css +61 -0
- package/dist/assets/css/components/feedback/drawer/content.css +7 -0
- package/dist/assets/css/components/feedback/drawer/header.css +56 -0
- package/dist/assets/css/components/feedback/drawer/styles.css +85 -0
- package/dist/assets/css/components/feedback/loading/loading.css +54 -0
- package/dist/assets/css/components/feedback/modal/content.css +6 -0
- package/dist/assets/css/components/feedback/modal/footer.css +9 -0
- package/dist/assets/css/components/feedback/modal/header.css +56 -0
- package/dist/assets/css/components/feedback/modal/media-queries/medium.css +11 -0
- package/dist/assets/css/components/feedback/modal/media-queries/small.css +11 -0
- package/dist/assets/css/components/feedback/modal/media-queries/x-large.css +5 -0
- package/dist/assets/css/components/feedback/modal/styles.css +53 -0
- package/dist/assets/css/components/feedback/notification/notification.css +157 -0
- package/dist/assets/css/components/feedback/popover/styles.css +53 -0
- package/dist/assets/css/components/feedback/popup-confirm/styles.css +165 -0
- package/dist/assets/css/components/feedback/progress/animations.css +10 -0
- package/dist/assets/css/components/feedback/progress/progress.css +50 -0
- package/dist/assets/css/components/feedback/progress/statuses.css +188 -0
- package/dist/assets/css/components/feedback/tooltip/styles.css +60 -0
- package/dist/assets/css/components/form/button/core/icon.css +37 -0
- package/dist/assets/css/components/form/button/core/position.css +19 -0
- package/dist/assets/css/components/form/button/core/shape.css +13 -0
- package/dist/assets/css/components/form/button/core/size.css +14 -0
- package/dist/assets/css/components/form/button/styles.css +32 -0
- package/dist/assets/css/components/form/button-action/styles.css +24 -0
- package/dist/assets/css/components/form/button-group/styles.css +26 -0
- package/dist/assets/css/components/form/checkbox/checkbox.css +53 -0
- package/dist/assets/css/components/form/checkbox/core/border.css +252 -0
- package/dist/assets/css/components/form/date-picker/calendar/calendar.css +14 -0
- package/dist/assets/css/components/form/date-picker/calendar/content.css +62 -0
- package/dist/assets/css/components/form/date-picker/calendar/footer.css +10 -0
- package/dist/assets/css/components/form/date-picker/calendar/header.css +86 -0
- package/dist/assets/css/components/form/date-picker/clock/clock.css +14 -0
- package/dist/assets/css/components/form/date-picker/clock/content.css +48 -0
- package/dist/assets/css/components/form/date-picker/clock/footer.css +6 -0
- package/dist/assets/css/components/form/date-picker/clock/header.css +8 -0
- package/dist/assets/css/components/form/date-picker/date-picker.css +36 -0
- package/dist/assets/css/components/form/input/core/addon.css +11 -0
- package/dist/assets/css/components/form/input/core/border.css +114 -0
- package/dist/assets/css/components/form/input/core/button.css +34 -0
- package/dist/assets/css/components/form/input/core/icon.css +22 -0
- package/dist/assets/css/components/form/input/otp/styles.css +20 -0
- package/dist/assets/css/components/form/input/phone/styles.css +50 -0
- package/dist/assets/css/components/form/input/styles.css +120 -0
- package/dist/assets/css/components/form/radio/core/border.css +252 -0
- package/dist/assets/css/components/form/radio/radio.css +69 -0
- package/dist/assets/css/components/form/select/options.css +117 -0
- package/dist/assets/css/components/form/select/styles.css +184 -0
- package/dist/assets/css/components/form/switch/core/border.css +208 -0
- package/dist/assets/css/components/form/switch/styles.css +61 -0
- package/dist/assets/css/components/form/text-editor/styles.css +130 -0
- package/dist/assets/css/components/form/upload/dropzone.css +166 -0
- package/dist/assets/css/components/form/upload/list-and-gird.css +183 -0
- package/dist/assets/css/components/form/upload/styles.css +215 -0
- package/dist/assets/css/components/layout/layout.css +130 -0
- package/dist/assets/css/components/layout/media-queries/large.css +19 -0
- package/dist/assets/css/components/layout/media-queries/medium.css +19 -0
- package/dist/assets/css/components/layout/media-queries/small.css +19 -0
- package/dist/assets/css/components/layout/media-queries/x-large.css +19 -0
- package/dist/assets/css/components/layout/media-queries/x-small.css +3 -0
- package/dist/assets/css/components/layout/media-queries/xx-large.css +19 -0
- package/dist/assets/css/components/layout/media-queries/xxx-large.css +20 -0
- package/dist/assets/css/components/navigation/breadcrumb/styles.css +0 -0
- package/dist/assets/css/components/navigation/menu/core/open-or-close.css +12 -0
- package/dist/assets/css/components/navigation/menu/styles.css +163 -0
- package/dist/assets/css/components/navigation/menu/variant/horizontal.css +3 -0
- package/dist/assets/css/components/navigation/menu/variant/vertical.css +3 -0
- package/dist/assets/css/components/navigation/pagination/styles.css +169 -0
- package/dist/assets/css/components/navigation/steps/animation.css +8 -0
- package/dist/assets/css/components/navigation/steps/styles.css +146 -0
- package/dist/assets/css/core/animation.css +164 -0
- package/dist/assets/css/core/ar-core.css +192 -0
- package/dist/assets/css/core/color-palette.css +111 -0
- package/dist/assets/css/core/utils.css +16 -0
- package/dist/assets/css/core/variants/animation.css +164 -0
- package/dist/assets/css/core/variants/border.css +18 -0
- package/dist/assets/css/core/variants/borderless.css +362 -0
- package/dist/assets/css/core/variants/dashed.css +362 -0
- package/dist/assets/css/core/variants/filled.css +428 -0
- package/dist/assets/css/core/variants/outlined.css +439 -0
- package/dist/assets/css/core/variants/surface.css +252 -0
- package/dist/assets/fonts/JetBrainsMono-Bold.ttf +0 -0
- package/dist/assets/fonts/JetBrainsMono-Regular.ttf +0 -0
- package/dist/components/charts/gantt/IProps.d.ts +24 -0
- package/dist/components/charts/gantt/IProps.js +1 -0
- package/dist/components/charts/gantt/index.d.ts +5 -0
- package/dist/components/charts/gantt/index.js +308 -0
- package/dist/components/charts/index.d.ts +2 -0
- package/dist/components/charts/index.js +2 -0
- package/dist/components/charts/pie/IProps.d.ts +7 -0
- package/dist/components/charts/pie/IProps.js +1 -0
- package/dist/components/charts/pie/index.d.ts +5 -0
- package/dist/components/charts/pie/index.js +56 -0
- package/dist/components/data-display/calendar/Body.d.ts +23 -0
- package/dist/components/data-display/calendar/Body.js +14 -0
- package/dist/components/data-display/calendar/Header.d.ts +20 -0
- package/dist/components/data-display/calendar/Header.js +26 -0
- package/dist/components/data-display/calendar/IProps.d.ts +14 -0
- package/dist/components/data-display/calendar/IProps.js +1 -0
- package/dist/components/data-display/calendar/index.d.ts +8 -0
- package/dist/components/data-display/calendar/index.js +27 -0
- package/dist/components/data-display/calendar/views/Day.d.ts +3 -0
- package/dist/components/data-display/calendar/views/Day.js +5 -0
- package/dist/components/data-display/calendar/views/Month.d.ts +3 -0
- package/dist/components/data-display/calendar/views/Month.js +5 -0
- package/dist/components/data-display/calendar/views/Week.d.ts +19 -0
- package/dist/components/data-display/calendar/views/Week.js +173 -0
- package/dist/components/data-display/card/IProps.d.ts +10 -0
- package/dist/components/data-display/card/IProps.js +1 -0
- package/dist/components/data-display/card/index.d.ts +5 -0
- package/dist/components/data-display/card/index.js +14 -0
- package/dist/components/data-display/chip/IProps.d.ts +6 -0
- package/dist/components/data-display/chip/IProps.js +1 -0
- package/dist/components/data-display/chip/index.d.ts +5 -0
- package/dist/components/data-display/chip/index.js +17 -0
- package/dist/components/data-display/diagram/IProps.d.ts +6 -0
- package/dist/components/data-display/diagram/IProps.js +1 -0
- package/dist/components/data-display/diagram/index.d.ts +5 -0
- package/dist/components/data-display/diagram/index.js +298 -0
- package/dist/components/data-display/divider/IProps.d.ts +6 -0
- package/dist/components/data-display/divider/IProps.js +1 -0
- package/dist/components/data-display/divider/index.d.ts +5 -0
- package/dist/components/data-display/divider/index.js +5 -0
- package/dist/components/data-display/dnd/IProps.d.ts +12 -0
- package/dist/components/data-display/dnd/IProps.js +1 -0
- package/dist/components/data-display/dnd/index.d.ts +5 -0
- package/dist/components/data-display/dnd/index.js +125 -0
- package/dist/components/data-display/grid-system/box/Box.d.ts +6 -0
- package/dist/components/data-display/grid-system/box/Box.js +13 -0
- package/dist/components/data-display/grid-system/column/Column.d.ts +4 -0
- package/dist/components/data-display/grid-system/column/Column.js +21 -0
- package/dist/components/data-display/grid-system/column/IProps.d.ts +13 -0
- package/dist/components/data-display/grid-system/column/IProps.js +1 -0
- package/dist/components/data-display/grid-system/index.d.ts +10 -0
- package/dist/components/data-display/grid-system/index.js +11 -0
- package/dist/components/data-display/grid-system/row/IProps.d.ts +4 -0
- package/dist/components/data-display/grid-system/row/IProps.js +1 -0
- package/dist/components/data-display/grid-system/row/Row.d.ts +4 -0
- package/dist/components/data-display/grid-system/row/Row.js +6 -0
- package/dist/components/data-display/kanban-board/IProps.d.ts +31 -0
- package/dist/components/data-display/kanban-board/IProps.js +1 -0
- package/dist/components/data-display/kanban-board/filter/DateFilters.d.ts +25 -0
- package/dist/components/data-display/kanban-board/filter/DateFilters.js +55 -0
- package/dist/components/data-display/kanban-board/filter/SelectFilters.d.ts +27 -0
- package/dist/components/data-display/kanban-board/filter/SelectFilters.js +43 -0
- package/dist/components/data-display/kanban-board/filter/index.d.ts +36 -0
- package/dist/components/data-display/kanban-board/filter/index.js +47 -0
- package/dist/components/data-display/kanban-board/index.d.ts +5 -0
- package/dist/components/data-display/kanban-board/index.js +309 -0
- package/dist/components/data-display/paper/IProps.d.ts +6 -0
- package/dist/components/data-display/paper/IProps.js +1 -0
- package/dist/components/data-display/paper/index.d.ts +5 -0
- package/dist/components/data-display/paper/index.js +12 -0
- package/dist/components/data-display/syntax-highlighter/Import.d.ts +4 -0
- package/dist/components/data-display/syntax-highlighter/Import.js +5 -0
- package/dist/components/data-display/syntax-highlighter/classes/Compiler.d.ts +7 -0
- package/dist/components/data-display/syntax-highlighter/classes/Compiler.js +92 -0
- package/dist/components/data-display/syntax-highlighter/classes/Parser.d.ts +9 -0
- package/dist/components/data-display/syntax-highlighter/classes/Parser.js +99 -0
- package/dist/components/data-display/syntax-highlighter/index.d.ts +11 -0
- package/dist/components/data-display/syntax-highlighter/index.js +41 -0
- package/dist/components/data-display/table/FilterPopup.d.ts +20 -0
- package/dist/components/data-display/table/FilterPopup.js +54 -0
- package/dist/components/data-display/table/Helpers.d.ts +2 -0
- package/dist/components/data-display/table/Helpers.js +10 -0
- package/dist/components/data-display/table/IProps.d.ts +99 -0
- package/dist/components/data-display/table/IProps.js +1 -0
- package/dist/components/data-display/table/PropertiesPopup.d.ts +31 -0
- package/dist/components/data-display/table/PropertiesPopup.js +90 -0
- package/dist/components/data-display/table/THeadCell.d.ts +34 -0
- package/dist/components/data-display/table/THeadCell.js +67 -0
- package/dist/components/data-display/table/body/Editable.d.ts +12 -0
- package/dist/components/data-display/table/body/Editable.js +59 -0
- package/dist/components/data-display/table/body/TBody.d.ts +36 -0
- package/dist/components/data-display/table/body/TBody.js +184 -0
- package/dist/components/data-display/table/header/ActionButtons.d.ts +14 -0
- package/dist/components/data-display/table/header/ActionButtons.js +65 -0
- package/dist/components/data-display/table/header/Header.d.ts +15 -0
- package/dist/components/data-display/table/header/Header.js +10 -0
- package/dist/components/data-display/table/index.d.ts +7 -0
- package/dist/components/data-display/table/index.js +639 -0
- package/dist/components/data-display/tabs/IProps.d.ts +9 -0
- package/dist/components/data-display/tabs/IProps.js +1 -0
- package/dist/components/data-display/tabs/index.d.ts +5 -0
- package/dist/components/data-display/tabs/index.js +110 -0
- package/dist/components/data-display/tabs/skeleton.d.ts +4 -0
- package/dist/components/data-display/tabs/skeleton.js +14 -0
- package/dist/components/data-display/typography/index.d.ts +6 -0
- package/dist/components/data-display/typography/index.js +9 -0
- package/dist/components/data-display/typography/paragraph/IProps.d.ts +7 -0
- package/dist/components/data-display/typography/paragraph/IProps.js +1 -0
- package/dist/components/data-display/typography/paragraph/Paragraph.d.ts +4 -0
- package/dist/components/data-display/typography/paragraph/Paragraph.js +14 -0
- package/dist/components/data-display/typography/title/IProps.d.ts +7 -0
- package/dist/components/data-display/typography/title/IProps.js +1 -0
- package/dist/components/data-display/typography/title/Title.d.ts +4 -0
- package/dist/components/data-display/typography/title/Title.js +13 -0
- package/dist/components/feedback/alert/IProps.d.ts +11 -0
- package/dist/components/feedback/alert/IProps.js +1 -0
- package/dist/components/feedback/alert/index.d.ts +5 -0
- package/dist/components/feedback/alert/index.js +50 -0
- package/dist/components/feedback/drawer/IProps.d.ts +18 -0
- package/dist/components/feedback/drawer/IProps.js +1 -0
- package/dist/components/feedback/drawer/index.d.ts +5 -0
- package/dist/components/feedback/drawer/index.js +94 -0
- package/dist/components/feedback/loading/index.d.ts +4 -0
- package/dist/components/feedback/loading/index.js +7 -0
- package/dist/components/feedback/modal/IProps.d.ts +14 -0
- package/dist/components/feedback/modal/IProps.js +1 -0
- package/dist/components/feedback/modal/index.d.ts +5 -0
- package/dist/components/feedback/modal/index.js +91 -0
- package/dist/components/feedback/notification/IProps.d.ts +9 -0
- package/dist/components/feedback/notification/IProps.js +1 -0
- package/dist/components/feedback/notification/index.d.ts +5 -0
- package/dist/components/feedback/notification/index.js +96 -0
- package/dist/components/feedback/popover/IProps.d.ts +16 -0
- package/dist/components/feedback/popover/IProps.js +1 -0
- package/dist/components/feedback/popover/index.d.ts +5 -0
- package/dist/components/feedback/popover/index.js +91 -0
- package/dist/components/feedback/popup-confirm/IProps.d.ts +10 -0
- package/dist/components/feedback/popup-confirm/IProps.js +1 -0
- package/dist/components/feedback/popup-confirm/index.d.ts +5 -0
- package/dist/components/feedback/popup-confirm/index.js +98 -0
- package/dist/components/feedback/progress/IProps.d.ts +6 -0
- package/dist/components/feedback/progress/IProps.js +1 -0
- package/dist/components/feedback/progress/index.d.ts +5 -0
- package/dist/components/feedback/progress/index.js +26 -0
- package/dist/components/feedback/tooltip/IProps.d.ts +6 -0
- package/dist/components/feedback/tooltip/IProps.js +1 -0
- package/dist/components/feedback/tooltip/index.d.ts +5 -0
- package/dist/components/feedback/tooltip/index.js +129 -0
- package/dist/components/form/button/IProps.d.ts +10 -0
- package/dist/components/form/button/IProps.js +1 -0
- package/dist/components/form/button/index.d.ts +5 -0
- package/dist/components/form/button/index.js +41 -0
- package/dist/components/form/button-action/IProps.d.ts +8 -0
- package/dist/components/form/button-action/IProps.js +1 -0
- package/dist/components/form/button-action/index.d.ts +5 -0
- package/dist/components/form/button-action/index.js +68 -0
- package/dist/components/form/button-group/index.d.ts +7 -0
- package/dist/components/form/button-group/index.js +31 -0
- package/dist/components/form/checkbox/IProps.d.ts +5 -0
- package/dist/components/form/checkbox/IProps.js +1 -0
- package/dist/components/form/checkbox/index.d.ts +5 -0
- package/dist/components/form/checkbox/index.js +24 -0
- package/dist/components/form/date-picker/DATE.d.ts +12 -0
- package/dist/components/form/date-picker/DATE.js +27 -0
- package/dist/components/form/date-picker/Props.d.ts +10 -0
- package/dist/components/form/date-picker/Props.js +1 -0
- package/dist/components/form/date-picker/index.d.ts +5 -0
- package/dist/components/form/date-picker/index.js +365 -0
- package/dist/components/form/input/IProps.d.ts +12 -0
- package/dist/components/form/input/IProps.js +1 -0
- package/dist/components/form/input/decimal/Decimal.d.ts +4 -0
- package/dist/components/form/input/decimal/Decimal.js +54 -0
- package/dist/components/form/input/decimal/IProps.d.ts +8 -0
- package/dist/components/form/input/decimal/IProps.js +1 -0
- package/dist/components/form/input/formatted-decimal/FormattedDecimal.d.ts +4 -0
- package/dist/components/form/input/formatted-decimal/FormattedDecimal.js +73 -0
- package/dist/components/form/input/formatted-decimal/IProps.d.ts +12 -0
- package/dist/components/form/input/formatted-decimal/IProps.js +1 -0
- package/dist/components/form/input/index.d.ts +15 -0
- package/dist/components/form/input/index.js +152 -0
- package/dist/components/form/input/otp/IProps.d.ts +6 -0
- package/dist/components/form/input/otp/IProps.js +1 -0
- package/dist/components/form/input/otp/Otp.d.ts +7 -0
- package/dist/components/form/input/otp/Otp.js +122 -0
- package/dist/components/form/input/phone/IProps.d.ts +11 -0
- package/dist/components/form/input/phone/IProps.js +1 -0
- package/dist/components/form/input/phone/Phone.d.ts +4 -0
- package/dist/components/form/input/phone/Phone.js +41 -0
- package/dist/components/form/radio/IProps.d.ts +12 -0
- package/dist/components/form/radio/IProps.js +1 -0
- package/dist/components/form/radio/index.d.ts +5 -0
- package/dist/components/form/radio/index.js +38 -0
- package/dist/components/form/select/Props.d.ts +35 -0
- package/dist/components/form/select/Props.js +1 -0
- package/dist/components/form/select/index.d.ts +5 -0
- package/dist/components/form/select/index.js +312 -0
- package/dist/components/form/switch/IProps.d.ts +5 -0
- package/dist/components/form/switch/IProps.js +1 -0
- package/dist/components/form/switch/index.d.ts +5 -0
- package/dist/components/form/switch/index.js +36 -0
- package/dist/components/form/text-editor/IProps.d.ts +18 -0
- package/dist/components/form/text-editor/IProps.js +1 -0
- package/dist/components/form/text-editor/index.d.ts +5 -0
- package/dist/components/form/text-editor/index.js +300 -0
- package/dist/components/form/upload/Buttons.d.ts +8 -0
- package/dist/components/form/upload/Buttons.js +27 -0
- package/dist/components/form/upload/Dropzone.d.ts +10 -0
- package/dist/components/form/upload/Dropzone.js +55 -0
- package/dist/components/form/upload/List.d.ts +12 -0
- package/dist/components/form/upload/List.js +21 -0
- package/dist/components/form/upload/Props.d.ts +16 -0
- package/dist/components/form/upload/Props.js +1 -0
- package/dist/components/form/upload/index.d.ts +9 -0
- package/dist/components/form/upload/index.js +184 -0
- package/dist/components/icons/Compiler.d.ts +9 -0
- package/dist/components/icons/Compiler.js +156 -0
- package/dist/components/icons/index.d.ts +10 -0
- package/dist/components/icons/index.js +6 -0
- package/dist/components/layout/Footer.d.ts +3 -0
- package/dist/components/layout/Footer.js +8 -0
- package/dist/components/layout/Header.d.ts +4 -0
- package/dist/components/layout/Header.js +8 -0
- package/dist/components/layout/IProps.d.ts +20 -0
- package/dist/components/layout/IProps.js +1 -0
- package/dist/components/layout/LSider.d.ts +4 -0
- package/dist/components/layout/LSider.js +53 -0
- package/dist/components/layout/Main.d.ts +4 -0
- package/dist/components/layout/Main.js +4 -0
- package/dist/components/layout/RSider.d.ts +3 -0
- package/dist/components/layout/RSider.js +13 -0
- package/dist/components/layout/Section.d.ts +4 -0
- package/dist/components/layout/Section.js +10 -0
- package/dist/components/layout/index.d.ts +12 -0
- package/dist/components/layout/index.js +32 -0
- package/dist/components/navigation/breadcrumb/IProps.d.ts +3 -0
- package/dist/components/navigation/breadcrumb/IProps.js +1 -0
- package/dist/components/navigation/breadcrumb/index.d.ts +5 -0
- package/dist/components/navigation/breadcrumb/index.js +8 -0
- package/dist/components/navigation/menu/IProps.d.ts +14 -0
- package/dist/components/navigation/menu/IProps.js +1 -0
- package/dist/components/navigation/menu/index.d.ts +5 -0
- package/dist/components/navigation/menu/index.js +89 -0
- package/dist/components/navigation/pagination/IProps.d.ts +8 -0
- package/dist/components/navigation/pagination/IProps.js +1 -0
- package/dist/components/navigation/pagination/index.d.ts +5 -0
- package/dist/components/navigation/pagination/index.js +74 -0
- package/dist/components/navigation/steps/IProps.d.ts +16 -0
- package/dist/components/navigation/steps/IProps.js +1 -0
- package/dist/components/navigation/steps/index.d.ts +5 -0
- package/dist/components/navigation/steps/index.js +102 -0
- package/dist/libs/core/application/contexts/Config.d.ts +26 -0
- package/dist/libs/core/application/contexts/Config.js +20 -0
- package/dist/libs/core/application/contexts/Language.d.ts +7 -0
- package/dist/libs/core/application/contexts/Language.js +7 -0
- package/dist/libs/core/application/contexts/Loading.d.ts +11 -0
- package/dist/libs/core/application/contexts/Loading.js +13 -0
- package/dist/libs/core/application/contexts/Notification.d.ts +25 -0
- package/dist/libs/core/application/contexts/Notification.js +29 -0
- package/dist/libs/core/application/contexts/index.d.ts +5 -0
- package/dist/libs/core/application/contexts/index.js +5 -0
- package/dist/libs/core/application/hooks/index.d.ts +41 -0
- package/dist/libs/core/application/hooks/index.js +17 -0
- package/dist/libs/core/application/hooks/useNotification.d.ts +16 -0
- package/dist/libs/core/application/hooks/useNotification.js +23 -0
- package/dist/libs/core/application/hooks/useTranslation.d.ts +9 -0
- package/dist/libs/core/application/hooks/useTranslation.js +25 -0
- package/dist/libs/core/application/hooks/useValidation.d.ts +7 -0
- package/dist/libs/core/application/hooks/useValidation.js +151 -0
- package/dist/libs/core/application/locales/index.d.ts +4 -0
- package/dist/libs/core/application/locales/index.js +3 -0
- package/dist/libs/core/application/locales/kanban-board/IKanbanBoardLocale.d.ts +5 -0
- package/dist/libs/core/application/locales/kanban-board/IKanbanBoardLocale.js +1 -0
- package/dist/libs/core/application/locales/kanban-board/en.d.ts +3 -0
- package/dist/libs/core/application/locales/kanban-board/en.js +5 -0
- package/dist/libs/core/application/locales/kanban-board/tr.d.ts +3 -0
- package/dist/libs/core/application/locales/kanban-board/tr.js +5 -0
- package/dist/libs/core/application/locales/notification/INotificationLocale.d.ts +59 -0
- package/dist/libs/core/application/locales/notification/INotificationLocale.js +1 -0
- package/dist/libs/core/application/locales/notification/en.d.ts +3 -0
- package/dist/libs/core/application/locales/notification/en.js +85 -0
- package/dist/libs/core/application/locales/notification/tr.d.ts +3 -0
- package/dist/libs/core/application/locales/notification/tr.js +85 -0
- package/dist/libs/core/application/locales/table/ITableLocale.d.ts +18 -0
- package/dist/libs/core/application/locales/table/ITableLocale.js +1 -0
- package/dist/libs/core/application/locales/table/en.d.ts +3 -0
- package/dist/libs/core/application/locales/table/en.js +22 -0
- package/dist/libs/core/application/locales/table/tr.d.ts +3 -0
- package/dist/libs/core/application/locales/table/tr.js +22 -0
- package/dist/libs/infrastructure/shared/DATE.d.ts +74 -0
- package/dist/libs/infrastructure/shared/DATE.js +148 -0
- package/dist/libs/infrastructure/shared/Enums.d.ts +18 -0
- package/dist/libs/infrastructure/shared/Enums.js +21 -0
- package/dist/libs/infrastructure/shared/NUMBER.d.ts +8 -0
- package/dist/libs/infrastructure/shared/NUMBER.js +10 -0
- package/dist/libs/infrastructure/shared/PHONE.d.ts +8 -0
- package/dist/libs/infrastructure/shared/PHONE.js +126 -0
- package/dist/libs/infrastructure/shared/Utils.d.ts +20 -0
- package/dist/libs/infrastructure/shared/Utils.js +349 -0
- package/dist/libs/infrastructure/shared/_old_DATE.d.ts +28 -0
- package/dist/libs/infrastructure/shared/_old_DATE.js +68 -0
- package/dist/libs/infrastructure/types/IGlobalProps.d.ts +183 -0
- package/dist/libs/infrastructure/types/IGlobalProps.js +1 -0
- package/dist/libs/infrastructure/types/index.d.ts +155 -0
- package/dist/libs/infrastructure/types/index.js +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import "../../../assets/css/components/charts/gantt/styles.css";
|
|
4
|
+
import Pagination from "../../navigation/pagination";
|
|
5
|
+
import { useTranslation } from "../../../libs/core/application/hooks";
|
|
6
|
+
const colors = ["#A881FA", "#75CFA4", "#EE6D63", "#FAD87A"];
|
|
7
|
+
const Gantt = ({ title, description, data, pagination, config = { isSearchable: false } }) => {
|
|
8
|
+
// refs
|
|
9
|
+
const _svg = useRef(null);
|
|
10
|
+
const _mapIsMoveField = useRef(null);
|
|
11
|
+
const _scrollX = useRef(0);
|
|
12
|
+
const _isPressedCtrl = useRef(false);
|
|
13
|
+
// states
|
|
14
|
+
const [startX, setStartX] = useState(0);
|
|
15
|
+
const [scrollX, setScrollX] = useState(0);
|
|
16
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
17
|
+
const [zoom, setZoom] = useState(1); // 1 = %100, 1.5 = %150 zoom
|
|
18
|
+
// states -> Pagination
|
|
19
|
+
const [currentPage, setCurrentPage] = useState(1);
|
|
20
|
+
const [selectedPerPage, setSelectedPerPage] = useState(pagination?.perPage ?? 10);
|
|
21
|
+
// states -> Mobil
|
|
22
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
23
|
+
// variables
|
|
24
|
+
const getData = useMemo(() => {
|
|
25
|
+
let _data = [...data];
|
|
26
|
+
if (pagination && !config.isServerSide) {
|
|
27
|
+
const indexOfLastRow = currentPage * selectedPerPage;
|
|
28
|
+
const indexOfFirstRow = indexOfLastRow - selectedPerPage;
|
|
29
|
+
_data = _data.slice(indexOfFirstRow, indexOfLastRow);
|
|
30
|
+
}
|
|
31
|
+
return _data;
|
|
32
|
+
}, [data, currentPage, selectedPerPage, config.isServerSide]);
|
|
33
|
+
const DAY_WIDTH = 60 * zoom;
|
|
34
|
+
const TIMELINE = useMemo(() => generateGanttTimeline(data), [data]);
|
|
35
|
+
const HEADER_HEIGHT = 75;
|
|
36
|
+
const STROKE_WIDTH = 0.5;
|
|
37
|
+
const ROW_HEIGHT = 45;
|
|
38
|
+
const LABEL_WIDTH = useMemo(() => {
|
|
39
|
+
const longestName = getData.reduce((maxTask, currentTask) => (currentTask.name.length > maxTask.name.length ? currentTask : maxTask), // Corrected logic
|
|
40
|
+
{
|
|
41
|
+
name: "",
|
|
42
|
+
}).name;
|
|
43
|
+
const estimatedWidth = longestName.length * 7 + 25;
|
|
44
|
+
return Math.min(Math.max(estimatedWidth, 120), 250);
|
|
45
|
+
}, [getData]);
|
|
46
|
+
const SVG_WIDTH = "100%";
|
|
47
|
+
const SVG_HEIGHT = HEADER_HEIGHT + getData.length * ROW_HEIGHT + ROW_HEIGHT * 2;
|
|
48
|
+
let PREVMATCHMONT = 0;
|
|
49
|
+
let PREVMATCHDAY = 0;
|
|
50
|
+
// hooks
|
|
51
|
+
const { t } = useTranslation(String(config.locale ?? "tr"));
|
|
52
|
+
// methods
|
|
53
|
+
const handleResize = useCallback(() => {
|
|
54
|
+
return (_) => {
|
|
55
|
+
setIsMobile(window.innerWidth <= 768);
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
const handleMouseDown = useCallback((e) => {
|
|
59
|
+
if (e.button !== 0)
|
|
60
|
+
return;
|
|
61
|
+
setIsDragging(true);
|
|
62
|
+
setStartX(e.clientX + _scrollX.current);
|
|
63
|
+
}, []);
|
|
64
|
+
const handleKeyboardDown = useCallback((event) => {
|
|
65
|
+
if (["Control", "Meta"].includes(event.key)) {
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
_isPressedCtrl.current = true;
|
|
68
|
+
}
|
|
69
|
+
}, []);
|
|
70
|
+
const handleKeyboardUp = useCallback((event) => {
|
|
71
|
+
if (["Control", "Meta"].includes(event.key)) {
|
|
72
|
+
event.preventDefault();
|
|
73
|
+
_isPressedCtrl.current = false;
|
|
74
|
+
}
|
|
75
|
+
}, []);
|
|
76
|
+
const handleMouseMove = useCallback((e) => {
|
|
77
|
+
if (!isDragging)
|
|
78
|
+
return;
|
|
79
|
+
let newScrollX = startX - e.clientX;
|
|
80
|
+
if (newScrollX < 0)
|
|
81
|
+
newScrollX = 0;
|
|
82
|
+
// Ekrana sığan alanı çıkarırken doğru clientWidth kontrolü
|
|
83
|
+
const availableWidth = (_svg.current?.clientWidth ?? 0) - LABEL_WIDTH;
|
|
84
|
+
const maxScrollWidth = TIMELINE.days.length * DAY_WIDTH - availableWidth;
|
|
85
|
+
if (newScrollX > maxScrollWidth)
|
|
86
|
+
newScrollX = maxScrollWidth;
|
|
87
|
+
// Eğer içerik zaten ekrana sığıyorsa scrollX 0 olmalı
|
|
88
|
+
if (maxScrollWidth <= 0)
|
|
89
|
+
newScrollX = 0;
|
|
90
|
+
setScrollX(newScrollX);
|
|
91
|
+
_scrollX.current = newScrollX;
|
|
92
|
+
}, [startX, isDragging, TIMELINE.days.length, DAY_WIDTH, LABEL_WIDTH]);
|
|
93
|
+
const handleMouseUpOrLeave = useCallback(() => {
|
|
94
|
+
const svgRect = _svg.current?.getBoundingClientRect();
|
|
95
|
+
const mapIsMoveFieldRect = _mapIsMoveField.current?.getBoundingClientRect();
|
|
96
|
+
if (svgRect && mapIsMoveFieldRect) {
|
|
97
|
+
const svgElement = _svg.current;
|
|
98
|
+
if (!svgElement)
|
|
99
|
+
return;
|
|
100
|
+
const chartContentWidth = TIMELINE.days.length * DAY_WIDTH;
|
|
101
|
+
const viewportWidth = svgElement.clientWidth;
|
|
102
|
+
const availableChartWidth = viewportWidth - LABEL_WIDTH;
|
|
103
|
+
if (chartContentWidth > availableChartWidth) {
|
|
104
|
+
const maxScrollX = chartContentWidth - availableChartWidth;
|
|
105
|
+
if (scrollX > maxScrollX) {
|
|
106
|
+
setScrollX(maxScrollX);
|
|
107
|
+
_scrollX.current = maxScrollX;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
setScrollX(0);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
setIsDragging(false);
|
|
115
|
+
}, [TIMELINE.days.length, LABEL_WIDTH]);
|
|
116
|
+
// useEffects
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
setIsMobile(window.innerWidth <= 768);
|
|
119
|
+
window.addEventListener("resize", handleResize);
|
|
120
|
+
// Keyboard Events
|
|
121
|
+
window.addEventListener("keydown", handleKeyboardDown);
|
|
122
|
+
window.addEventListener("keyup", handleKeyboardUp);
|
|
123
|
+
return () => {
|
|
124
|
+
window.removeEventListener("resize", handleResize);
|
|
125
|
+
// Keyboard Events
|
|
126
|
+
window.removeEventListener("keydown", handleKeyboardDown);
|
|
127
|
+
window.removeEventListener("keyup", handleKeyboardUp);
|
|
128
|
+
};
|
|
129
|
+
}, [handleResize]);
|
|
130
|
+
return (React.createElement("div", { className: "ar-gantt-chart" },
|
|
131
|
+
React.createElement("svg", { ref: _svg, xmlns: "http://www.w3.org/2000/svg",
|
|
132
|
+
// viewBox={`0 0 ${SVG_WIDTH} ${SVG_HEIGHT}`}
|
|
133
|
+
width: SVG_WIDTH, height: SVG_HEIGHT, className: "ar-gantt-chart-svg" },
|
|
134
|
+
React.createElement("defs", null,
|
|
135
|
+
React.createElement("pattern", { id: "weekend-stripes", width: "8", height: "8", patternUnits: "userSpaceOnUse" },
|
|
136
|
+
React.createElement("rect", { width: "8", height: "8", fill: "rgba(0, 0, 0, 0.03)" }),
|
|
137
|
+
React.createElement("line", { x1: "0", y1: "8", x2: "8", y2: "0", opacity: 0.25, stroke: "var(--red-500)", strokeWidth: 0.5 }))),
|
|
138
|
+
React.createElement("g", { className: "header", width: "100%" },
|
|
139
|
+
React.createElement("rect", { x: 0, y: 0, width: "100%", height: HEADER_HEIGHT }),
|
|
140
|
+
React.createElement("g", { transform: `translate(25, ${HEADER_HEIGHT / 2})`, className: "title-group" },
|
|
141
|
+
React.createElement("text", { className: "title" }, title),
|
|
142
|
+
React.createElement("text", { y: 20, className: "title-description" }, description)),
|
|
143
|
+
React.createElement("line", { x1: "0", y1: HEADER_HEIGHT, x2: "100%", y2: HEADER_HEIGHT, opacity: 0.25, stroke: "var(--black)", strokeWidth: 1 })),
|
|
144
|
+
React.createElement("g", { className: "body", transform: `translate(0, ${HEADER_HEIGHT + ROW_HEIGHT * 2})` },
|
|
145
|
+
React.createElement("g", { className: `${isDragging ? "dragging" : "no-dragging"} time-and-bars`, transform: `translate(${LABEL_WIDTH - scrollX}, 0)`, onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUpOrLeave, onMouseLeave: handleMouseUpOrLeave, onWheel: (event) => {
|
|
146
|
+
if (!_isPressedCtrl.current)
|
|
147
|
+
return;
|
|
148
|
+
// 1. Mevcut toplam genişliği hesapla. (eski zoom ile)
|
|
149
|
+
const currentTotalWidth = TIMELINE.days.length * DAY_WIDTH;
|
|
150
|
+
const availableWidth = (_svg.current?.clientWidth ?? 0) - LABEL_WIDTH;
|
|
151
|
+
// 2. Şu anki kaydırma oranını bul. (0 ile 1 arasında bir değer)
|
|
152
|
+
// Eğer içerik ekrana sığıyorsa oran 0'dır.
|
|
153
|
+
const currentScrollRatio = currentTotalWidth > availableWidth ? scrollX / (currentTotalWidth - availableWidth) : 0;
|
|
154
|
+
// 3. Yeni zoom değerini hesapla.
|
|
155
|
+
const nextZoom = event.deltaY < 0 ? Math.min(zoom + 0.5, 5) : Math.max(zoom - 0.5, 1);
|
|
156
|
+
// Eğer zoom değişmeyecekse (sınırlara takıldıysa) işlem yapma.
|
|
157
|
+
if (nextZoom === zoom)
|
|
158
|
+
return;
|
|
159
|
+
// 4. Yeni zoom'a göre yeni DAY_WIDTH ve yeni toplam genişliği hesapla.
|
|
160
|
+
const nextDayWidth = 60 * nextZoom;
|
|
161
|
+
const nextTotalWidth = TIMELINE.days.length * nextDayWidth;
|
|
162
|
+
// 5. Yeni maksimum kaydırma genişliğini bul ve eski orana göre scrollX'i güncelle.
|
|
163
|
+
const nextMaxScrollWidth = nextTotalWidth - availableWidth;
|
|
164
|
+
const nextScrollX = Math.max(0, nextMaxScrollWidth * currentScrollRatio);
|
|
165
|
+
// State'leri güncelle.
|
|
166
|
+
setZoom(nextZoom);
|
|
167
|
+
setScrollX(nextScrollX);
|
|
168
|
+
_scrollX.current = nextScrollX;
|
|
169
|
+
}, style: { cursor: isDragging ? "grabbing" : "grab", userSelect: "none" } },
|
|
170
|
+
React.createElement("g", { id: "month-and-days" },
|
|
171
|
+
TIMELINE.days.map((day, index) => {
|
|
172
|
+
const xPos = (index + 1) * DAY_WIDTH;
|
|
173
|
+
const nextDay = new Date(day.date);
|
|
174
|
+
nextDay.setDate(nextDay.getDate() + 1);
|
|
175
|
+
const isLastDayOfMonth = day.date.getMonth() !== nextDay.getMonth();
|
|
176
|
+
const isSunday = day.date.getDay() === 0;
|
|
177
|
+
if (!isSunday && !isLastDayOfMonth)
|
|
178
|
+
return null;
|
|
179
|
+
const currentMonthNum = day.date.getMonth();
|
|
180
|
+
const currentDayNum = day.date.getDate();
|
|
181
|
+
if (index === 0) {
|
|
182
|
+
PREVMATCHMONT = 0;
|
|
183
|
+
PREVMATCHDAY = 0;
|
|
184
|
+
}
|
|
185
|
+
const dayDiff = currentDayNum - (currentMonthNum !== PREVMATCHMONT ? 0 : PREVMATCHDAY);
|
|
186
|
+
// Bir sonraki turda kullanabilmek için hafızayı güncelliyoruz.
|
|
187
|
+
PREVMATCHMONT = currentMonthNum;
|
|
188
|
+
PREVMATCHDAY = currentDayNum;
|
|
189
|
+
return (React.createElement("g", { key: index },
|
|
190
|
+
React.createElement("line", { x1: xPos, y1: -ROW_HEIGHT * 2, x2: xPos, y2: 0, opacity: 0.15, stroke: "var(--black)", strokeWidth: STROKE_WIDTH }),
|
|
191
|
+
React.createElement("text", { x: xPos - (dayDiff * DAY_WIDTH) / 2, y: -ROW_HEIGHT * 2 + ROW_HEIGHT / 2, fill: "var(--black)", fontSize: "12", textAnchor: "middle", dominantBaseline: "central" }, day.date.toLocaleDateString("tr-TR", { month: "long" }))));
|
|
192
|
+
}),
|
|
193
|
+
TIMELINE.days.map((day, index) => {
|
|
194
|
+
const xPos = (index + 1) * DAY_WIDTH; // 01:00 -> 60px, 02:00 -> 120px...
|
|
195
|
+
return (React.createElement("g", { key: index },
|
|
196
|
+
React.createElement("text", { x: (index + 1) * DAY_WIDTH - 30, y: -ROW_HEIGHT + ROW_HEIGHT / 2, fill: day.isWeekend ? "var(--red-500)" : "var(--black)", fontSize: "12", textAnchor: "middle", dominantBaseline: "central" },
|
|
197
|
+
String(day.number).padStart(2, "0"),
|
|
198
|
+
" ",
|
|
199
|
+
day.name),
|
|
200
|
+
day.isWeekend && (React.createElement("rect", { x: xPos - DAY_WIDTH, y: 0, width: DAY_WIDTH, height: SVG_HEIGHT, fill: "url(#weekend-stripes)" })),
|
|
201
|
+
React.createElement("line", { x1: xPos, y1: 0, x2: xPos, y2: SVG_HEIGHT, opacity: 0.25, stroke: "var(--black)", strokeWidth: STROKE_WIDTH, strokeDasharray: "5,5" })));
|
|
202
|
+
}),
|
|
203
|
+
React.createElement("line", { x1: 0, y1: -ROW_HEIGHT, x2: TIMELINE.days.length * DAY_WIDTH, y2: -ROW_HEIGHT, opacity: 0.15, stroke: "var(--black)", strokeWidth: STROKE_WIDTH }),
|
|
204
|
+
React.createElement("line", { x1: 0, y1: 0, x2: TIMELINE.days.length * DAY_WIDTH, y2: 0, opacity: 0.15, stroke: "var(--black)", strokeWidth: STROKE_WIDTH })),
|
|
205
|
+
React.createElement("g", { transform: `translate(0, 0)` }, getData.map((task, index) => {
|
|
206
|
+
const taskStart = new Date(task.start);
|
|
207
|
+
const taskEnd = new Date(task.end);
|
|
208
|
+
// 1. Proje başlangıcından bu görevin başlangıcına kadar geçen toplam milisaniye
|
|
209
|
+
const diffMsFromStart = taskStart.getTime() - Number(TIMELINE.timelineStart?.getTime());
|
|
210
|
+
// Milisaniyeyi DOĞRU şekilde saate çeviriyoruz (Sabit: 1000 * 60 * 60)
|
|
211
|
+
const hoursFromStart = diffMsFromStart / (1000 * 60 * 60);
|
|
212
|
+
// X Konumu: Geçen toplam saati, dinamik saat başına düşen pikselle çarpıyoruz
|
|
213
|
+
const x = hoursFromStart * (DAY_WIDTH / 24);
|
|
214
|
+
// 2. Görevin toplam süresini DOĞRU şekilde saat cinsinden buluyoruz
|
|
215
|
+
const durationHours = (taskEnd.getTime() - taskStart.getTime()) / (1000 * 60 * 60);
|
|
216
|
+
// Genişlik (Width): Süreyi dinamik saat başına düşen pikselle çarpıyoruz
|
|
217
|
+
const width = durationHours * (DAY_WIDTH / 24);
|
|
218
|
+
// 3. Dikey Konumlandırma
|
|
219
|
+
const height = ROW_HEIGHT / 1.5;
|
|
220
|
+
const y = index * ROW_HEIGHT + height / 4;
|
|
221
|
+
return (React.createElement("g", { key: task.id },
|
|
222
|
+
React.createElement("rect", { x: x, y: y, width: width, height: height, fill: colors[index % colors.length], rx: 3 }),
|
|
223
|
+
width > 60 && (React.createElement("text", { x: x + width / 2, y: y + height / 2 + 4, fontSize: 12, fontWeight: "600", fill: "var(--black)", textAnchor: "middle" }, task.name))));
|
|
224
|
+
})),
|
|
225
|
+
React.createElement("rect", { ref: _mapIsMoveField, x: 0, y: -ROW_HEIGHT, width: TIMELINE.days.length * DAY_WIDTH, height: SVG_HEIGHT, fill: "transparent", pointerEvents: "all" })),
|
|
226
|
+
React.createElement("g", { className: "left-axis" },
|
|
227
|
+
React.createElement("rect", { x: 0, y: -ROW_HEIGHT * 2 + 0.5, width: LABEL_WIDTH, height: SVG_HEIGHT, fill: "var(--white)" }),
|
|
228
|
+
React.createElement("line", { x1: LABEL_WIDTH, y1: -ROW_HEIGHT * 2, x2: LABEL_WIDTH, y2: SVG_HEIGHT, opacity: 0.25, stroke: "var(--black)", strokeWidth: 1 }),
|
|
229
|
+
React.createElement("g", { className: "label-list" }, getData.map((item, index) => {
|
|
230
|
+
const y = index * ROW_HEIGHT;
|
|
231
|
+
const textContent = item.name;
|
|
232
|
+
const maxTextWidth = LABEL_WIDTH - 20;
|
|
233
|
+
return (React.createElement("g", { key: item.id, className: "label-row" },
|
|
234
|
+
React.createElement("text", { x: "10", y: y + ROW_HEIGHT / 2, className: "label-text" }, textContent.length * 7 > maxTextWidth
|
|
235
|
+
? `${textContent.substring(0, Math.floor(maxTextWidth / 7) - 3)}...`
|
|
236
|
+
: textContent),
|
|
237
|
+
React.createElement("line", { x1: 0, y1: y + ROW_HEIGHT, x2: LABEL_WIDTH, y2: y + ROW_HEIGHT, opacity: 0.15, stroke: "var(--black)", strokeWidth: "0.5" }),
|
|
238
|
+
React.createElement("line", { x1: LABEL_WIDTH, y1: y + ROW_HEIGHT, x2: LABEL_WIDTH + TIMELINE.days.length * DAY_WIDTH, y2: y + ROW_HEIGHT, opacity: 0.25, stroke: "var(--black)", strokeWidth: STROKE_WIDTH, strokeDasharray: "5,5" })));
|
|
239
|
+
}))))),
|
|
240
|
+
React.createElement("div", { className: "footer" },
|
|
241
|
+
React.createElement("span", null, isMobile ? (React.createElement(React.Fragment, null,
|
|
242
|
+
React.createElement("strong", null,
|
|
243
|
+
(currentPage - 1) * selectedPerPage + 1,
|
|
244
|
+
" -",
|
|
245
|
+
" ",
|
|
246
|
+
Math.min(currentPage * selectedPerPage, pagination?.totalRecords || data.length),
|
|
247
|
+
" of",
|
|
248
|
+
" ",
|
|
249
|
+
pagination?.totalRecords || data.length))) : (t("Table.Pagination.Information.Text", (currentPage - 1) * selectedPerPage + 1, Math.min(currentPage * selectedPerPage, pagination?.totalRecords || data.length), pagination?.totalRecords || data.length))),
|
|
250
|
+
pagination && (React.createElement(Pagination, { totalRecords: config.isServerSide ? pagination.totalRecords : (data.length ?? 0), currentPage: currentPage, perPage: selectedPerPage, onChange: (currentPage, perPage) => {
|
|
251
|
+
setCurrentPage(currentPage);
|
|
252
|
+
setSelectedPerPage(perPage);
|
|
253
|
+
pagination.onChange?.(currentPage, perPage);
|
|
254
|
+
} })))));
|
|
255
|
+
};
|
|
256
|
+
const generateGanttTimeline = (data) => {
|
|
257
|
+
if (!data || data.length === 0) {
|
|
258
|
+
return { minDate: null, maxDate: null, months: [], days: [] };
|
|
259
|
+
}
|
|
260
|
+
// 1. En erken başlangıç ve en geç bitiş tarihlerini buluyoruz.
|
|
261
|
+
let minDate = new Date(data[0].start);
|
|
262
|
+
let maxDate = new Date(data[0].end);
|
|
263
|
+
data.forEach((task) => {
|
|
264
|
+
const start = new Date(task.start);
|
|
265
|
+
const end = new Date(task.end);
|
|
266
|
+
if (start < minDate)
|
|
267
|
+
minDate = start;
|
|
268
|
+
if (end > maxDate)
|
|
269
|
+
maxDate = end;
|
|
270
|
+
});
|
|
271
|
+
// Şemanın düzgün görünmesi için başlangıcı o ayın 1'ine,
|
|
272
|
+
// bitişi ise o ayın son gününe yuvarlamak yerleşim açısından daha iyi sonuç verir.
|
|
273
|
+
const startTimeline = new Date(minDate.getFullYear(), minDate.getMonth(), 1);
|
|
274
|
+
const endTimeline = new Date(maxDate.getFullYear(), maxDate.getMonth() + 1, 0); // Ayın son günü
|
|
275
|
+
const months = [];
|
|
276
|
+
const days = [];
|
|
277
|
+
// 2. Günleri ve Ayları döngüyle oluşturuyoruz.
|
|
278
|
+
const current = new Date(startTimeline);
|
|
279
|
+
while (current <= endTimeline) {
|
|
280
|
+
// Gün listesini doldur.
|
|
281
|
+
const dayOfWeek = current.getDay();
|
|
282
|
+
days.push({
|
|
283
|
+
date: new Date(current),
|
|
284
|
+
number: current.getDate(),
|
|
285
|
+
name: current.toLocaleDateString("tr-TR", { weekday: "short" }), // Pzt, Sal...
|
|
286
|
+
isWeekend: dayOfWeek === 0 || dayOfWeek === 6, // Hafta sonu kontrolü (Gantt'ta boyamak için).
|
|
287
|
+
});
|
|
288
|
+
// Ay listesini doldur. (Eğer listede bu ay henüz yoksa ekle)
|
|
289
|
+
const year = current.getFullYear();
|
|
290
|
+
const number = current.getMonth();
|
|
291
|
+
const name = current.toLocaleDateString("tr-TR", { month: "long" }); // Ocak, Şubat...
|
|
292
|
+
const monthExists = months.some((m) => m.year === year && m.number === number);
|
|
293
|
+
if (!monthExists) {
|
|
294
|
+
// O ayın toplam gün sayısını bulalım.
|
|
295
|
+
const totalDays = new Date(year, number + 1, 0).getDate();
|
|
296
|
+
months.push({ year, number, name, totalDays });
|
|
297
|
+
}
|
|
298
|
+
// Bir sonraki güne geç.
|
|
299
|
+
current.setDate(current.getDate() + 1);
|
|
300
|
+
}
|
|
301
|
+
return {
|
|
302
|
+
timelineStart: startTimeline,
|
|
303
|
+
timelineEnd: endTimeline,
|
|
304
|
+
months, // Üst zaman bandı için (Örn: Ocak, Şubat)
|
|
305
|
+
days, // Alt zaman bandı için (Örn: 1, 2, 3... veya haftalık kırılım için)
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
export default Gantt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
3
|
+
import "../../../assets/css/components/charts/pie/pie.css";
|
|
4
|
+
const Pie = ({ title, data, size }) => {
|
|
5
|
+
// refs
|
|
6
|
+
const _arPieChart = useRef(null);
|
|
7
|
+
// const _randomIndex = useRef<number[]>([]);
|
|
8
|
+
// state
|
|
9
|
+
const [conic, setConic] = useState([]);
|
|
10
|
+
// variables
|
|
11
|
+
const conicColors = [
|
|
12
|
+
["#fff35e", "#000"], // Sarı
|
|
13
|
+
["#ffc752", "#000"], // Açık Sarı
|
|
14
|
+
["#ff9151", "#fff"], // Turuncu
|
|
15
|
+
["#ee544e", "#fff"], // Kırmızı
|
|
16
|
+
["#e52b66", "#fff"], // Pembemsi Kırmızı
|
|
17
|
+
["#3c1d43", "#fff"], // Koyu Mor
|
|
18
|
+
["#582d62", "#fff"], // Mor
|
|
19
|
+
["#0470a7", "#fff"], // Açık Mavi
|
|
20
|
+
["#068aa8", "#fff"], // Mavi-Turkuaz
|
|
21
|
+
["#72a9bb", "#fff"], // Açık Mavi-Gri
|
|
22
|
+
];
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (!_arPieChart.current || data.length === 0)
|
|
25
|
+
return;
|
|
26
|
+
const conicGradients = [];
|
|
27
|
+
let total = data.reduce((sum, value) => sum + value.value, 0);
|
|
28
|
+
let normalizedData = data.map((value) => (value.value / total) * 100);
|
|
29
|
+
let start = 0;
|
|
30
|
+
// Gelen data uzunluğunda rastgele bir sayı dizisi oluşturuyor.
|
|
31
|
+
// do {
|
|
32
|
+
// const r = Math.floor(Math.random() * conicColors.length);
|
|
33
|
+
// if (!_randomIndex.current.includes(r)) _randomIndex.current.push(r);
|
|
34
|
+
// } while (_randomIndex.current.length < data.length);
|
|
35
|
+
normalizedData.forEach((percent, index) => {
|
|
36
|
+
let end = start + percent;
|
|
37
|
+
if (index === 0)
|
|
38
|
+
conicGradients.push(`#fff ${start + 0.5}% ${start}%`);
|
|
39
|
+
conicGradients.push(`${conicColors[index][0]} ${start}% ${end}%`);
|
|
40
|
+
conicGradients.push(`#fff ${end}% ${end + 0.5}%`);
|
|
41
|
+
start = end;
|
|
42
|
+
});
|
|
43
|
+
setConic(conicGradients);
|
|
44
|
+
}, [data]);
|
|
45
|
+
return (React.createElement("div", { className: "ar-pie-chart-wrapper" },
|
|
46
|
+
React.createElement("div", { className: "title" },
|
|
47
|
+
React.createElement("span", null, title)),
|
|
48
|
+
React.createElement("div", null,
|
|
49
|
+
React.createElement("div", { ref: _arPieChart, className: "ar-pie-chart", style: { background: `conic-gradient(${conic.join(", ")})`, width: size, height: size } },
|
|
50
|
+
React.createElement("article", null)),
|
|
51
|
+
React.createElement("div", { className: "information-field" }, data.map((item, index) => (React.createElement("article", { key: index },
|
|
52
|
+
React.createElement("span", { style: { backgroundColor: conicColors[index][0] } },
|
|
53
|
+
React.createElement("span", { style: { color: conicColors[index][1] } }, item.value)),
|
|
54
|
+
React.createElement("span", null, item.text))))))));
|
|
55
|
+
};
|
|
56
|
+
export default Pie;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CalendarEvent } from "./IProps";
|
|
3
|
+
import { View } from "../../../libs/infrastructure/types";
|
|
4
|
+
interface IProps<T> {
|
|
5
|
+
trackedBy: keyof (T & CalendarEvent);
|
|
6
|
+
data: (T & CalendarEvent)[];
|
|
7
|
+
renderItem: (item: T, index: number) => React.JSX.Element;
|
|
8
|
+
states: {
|
|
9
|
+
currentDate: {
|
|
10
|
+
get: Date;
|
|
11
|
+
set: React.Dispatch<React.SetStateAction<Date>>;
|
|
12
|
+
};
|
|
13
|
+
view: {
|
|
14
|
+
get: View;
|
|
15
|
+
set: React.Dispatch<React.SetStateAction<View>>;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
config?: {
|
|
19
|
+
locale?: Intl.LocalesArgument;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
declare const Body: <T>({ trackedBy, data, renderItem, states, config }: IProps<T>) => React.JSX.Element;
|
|
23
|
+
export default Body;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Day from "./views/Day";
|
|
3
|
+
import Week from "./views/Week";
|
|
4
|
+
import Month from "./views/Month";
|
|
5
|
+
const Body = function ({ trackedBy, data, renderItem, states, config }) {
|
|
6
|
+
if (states.view.get === "Day")
|
|
7
|
+
return React.createElement(Day, null);
|
|
8
|
+
else if (states.view.get === "Week")
|
|
9
|
+
return (React.createElement(Week, { trackedBy: trackedBy, data: data, renderItem: renderItem, states: { currentDate: states.currentDate }, config: config }));
|
|
10
|
+
else if (states.view.get === "Month")
|
|
11
|
+
return React.createElement(Month, null);
|
|
12
|
+
return React.createElement(React.Fragment, null, "...");
|
|
13
|
+
};
|
|
14
|
+
export default Body;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "../../../libs/infrastructure/types";
|
|
3
|
+
interface IProps {
|
|
4
|
+
states: {
|
|
5
|
+
currentDate: {
|
|
6
|
+
get: Date;
|
|
7
|
+
set: React.Dispatch<React.SetStateAction<Date>>;
|
|
8
|
+
};
|
|
9
|
+
view: {
|
|
10
|
+
get: View;
|
|
11
|
+
set: React.Dispatch<React.SetStateAction<View>>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
config?: {
|
|
15
|
+
locale?: Intl.LocalesArgument;
|
|
16
|
+
weekStartsOn?: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
declare const Header: ({ states, config }: IProps) => React.JSX.Element;
|
|
20
|
+
export default Header;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Button from "../../form/button";
|
|
3
|
+
import { ARIcon } from "../../icons";
|
|
4
|
+
import Box from "../grid-system/box/Box";
|
|
5
|
+
const Header = ({ states, config }) => {
|
|
6
|
+
// methods
|
|
7
|
+
const changeWeek = (direction) => {
|
|
8
|
+
states.currentDate.set((prev) => {
|
|
9
|
+
if (direction === "today")
|
|
10
|
+
return new Date();
|
|
11
|
+
const newDate = new Date(prev);
|
|
12
|
+
newDate.setDate(prev.getDate() + (direction === "next" ? 7 : -7));
|
|
13
|
+
return newDate;
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
return (React.createElement("div", { className: "header" },
|
|
17
|
+
React.createElement(Box, null,
|
|
18
|
+
React.createElement(Button, { variant: "outlined", color: "green", border: { radius: "xxl" }, onClick: () => changeWeek("today") }, "Bug\u00FCn"),
|
|
19
|
+
React.createElement(Button, { variant: "borderless", color: "light", border: { radius: "pill" }, icon: { element: React.createElement(ARIcon, { icon: "ArrowLeft", stroke: "currentColor" }) }, onClick: () => changeWeek("prev") }),
|
|
20
|
+
React.createElement(Button, { variant: "borderless", color: "light", border: { radius: "pill" }, icon: { element: React.createElement(ARIcon, { icon: "ArrowRight", stroke: "currentColor" }) }, onClick: () => changeWeek("next") }),
|
|
21
|
+
React.createElement("span", { className: "week-time" },
|
|
22
|
+
states.currentDate.get.toLocaleString(config?.locale ?? "tr-TR", { month: "long" }),
|
|
23
|
+
" ",
|
|
24
|
+
states.currentDate.get.getFullYear()))));
|
|
25
|
+
};
|
|
26
|
+
export default Header;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CalendarEvent = {
|
|
2
|
+
start: Date;
|
|
3
|
+
end: Date;
|
|
4
|
+
};
|
|
5
|
+
interface IProps<T> {
|
|
6
|
+
trackedBy: keyof (T & CalendarEvent);
|
|
7
|
+
data: (T & CalendarEvent)[];
|
|
8
|
+
renderItem: (item: T, index: number) => React.JSX.Element;
|
|
9
|
+
config?: {
|
|
10
|
+
locale?: Intl.LocalesArgument;
|
|
11
|
+
weekStartsOn?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export default IProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import IProps from "./IProps";
|
|
3
|
+
import "../../../assets/css/components/data-display/calendar/styles.css";
|
|
4
|
+
declare const Calendar: {
|
|
5
|
+
<T>({ trackedBy, data, renderItem, config }: IProps<T>): React.JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export default Calendar;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import Body from "./Body";
|
|
4
|
+
import Header from "./Header";
|
|
5
|
+
import "../../../assets/css/components/data-display/calendar/styles.css";
|
|
6
|
+
const Calendar = function ({ trackedBy, data, renderItem, config }) {
|
|
7
|
+
// states
|
|
8
|
+
const [currentDate, setCurrentDate] = useState(new Date());
|
|
9
|
+
const [view, setView] = useState("Week");
|
|
10
|
+
return (React.createElement("div", { className: "ar-calendar" },
|
|
11
|
+
React.createElement(Header, { states: {
|
|
12
|
+
currentDate: { get: currentDate, set: setCurrentDate },
|
|
13
|
+
view: {
|
|
14
|
+
get: view,
|
|
15
|
+
set: setView,
|
|
16
|
+
},
|
|
17
|
+
}, config: config }),
|
|
18
|
+
React.createElement(Body, { trackedBy: trackedBy, data: data, renderItem: renderItem, states: {
|
|
19
|
+
currentDate: { get: currentDate, set: setCurrentDate },
|
|
20
|
+
view: {
|
|
21
|
+
get: view,
|
|
22
|
+
set: setView,
|
|
23
|
+
},
|
|
24
|
+
}, config: config })));
|
|
25
|
+
};
|
|
26
|
+
Calendar.displayName = "DatePicker";
|
|
27
|
+
export default Calendar;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CalendarEvent } from "../IProps";
|
|
3
|
+
interface IProps<T> {
|
|
4
|
+
trackedBy: keyof (T & CalendarEvent);
|
|
5
|
+
data: (T & CalendarEvent)[];
|
|
6
|
+
renderItem: (item: T, index: number) => React.JSX.Element;
|
|
7
|
+
states: {
|
|
8
|
+
currentDate: {
|
|
9
|
+
get: Date;
|
|
10
|
+
set: React.Dispatch<React.SetStateAction<Date>>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
config?: {
|
|
14
|
+
locale?: Intl.LocalesArgument;
|
|
15
|
+
weekStartsOn?: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
declare const Week: <T>({ trackedBy, data, renderItem, states, config }: IProps<T>) => React.JSX.Element;
|
|
19
|
+
export default Week;
|