impact-ui 3.7.25 → 4.0.0-alpha.10
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/MIGRATION_GUIDE.md +328 -0
- package/README.md +154 -15
- package/bin/migrate-image-paths.cjs +127 -0
- package/bin/migrate.js +293 -0
- package/codemods/component-map.js +153 -0
- package/codemods/image-paths-transform.js +69 -0
- package/codemods/transform.js +136 -0
- package/dist/components/Accordion/index.js +2 -1
- package/dist/components/AccordionModern/index.js +2 -1
- package/dist/components/Alert/index.js +2 -1
- package/dist/components/Avatar/index.js +2 -1
- package/dist/components/Badge/filled/filledIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/filled/filledOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/filled/filledOnlyLabelBadges/index.js +2 -1
- package/dist/components/Badge/index.js +3 -2
- package/dist/components/Badge/stroke/strokeIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/stroke/strokeOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/stroke/strokeOnlyLabelBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleIOnlyIconBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleIconLabelBadges/index.js +2 -1
- package/dist/components/Badge/subtle/subtleOnlyLabelBadges/index.js +2 -1
- package/dist/components/BottomSheet/index.js +2 -1
- package/dist/components/Breadcrumbs/index.js +2 -1
- package/dist/components/Button/index.js +2 -1
- package/dist/components/ButtonGroup/index.js +2 -1
- package/dist/components/Card/index.js +2 -1
- package/dist/components/Chart/index.js +2 -1
- package/dist/components/Chatbot/index.js +2 -1
- package/dist/components/Checkbox/index.js +2 -1
- package/dist/components/Chips/index.js +2 -1
- package/dist/components/CreateItemFlow/index.js +2 -1
- package/dist/components/DatePicker/datePickerDropdown.js +2 -1
- package/dist/components/DatePicker/index.js +3 -2
- package/dist/components/DateRangePicker/dateRangePickerDropdown.js +2 -1
- package/dist/components/DateRangePicker/index.js +3 -2
- package/dist/components/DynamicLayout/index.js +2 -1
- package/dist/components/EmptyState/EmptyStateImage.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyStateImage.js +3 -2
- package/dist/components/EmptyState/index.js +2 -1
- package/dist/components/FileUpload/index.js +2 -1
- package/dist/components/FilterPanel/index.js +2 -1
- package/dist/components/FiltersStrip/index.js +2 -1
- package/dist/components/Header/index.js +2 -1
- package/dist/components/HomePage/index.js +2 -1
- package/dist/components/Input/index.js +2 -1
- package/dist/components/Loader/index.js +2 -1
- package/dist/components/Menu/IconMenuItem.js +2 -1
- package/dist/components/Menu/MenuHeaderInfo.js +2 -1
- package/dist/components/Menu/NestedMenuItem.js +2 -1
- package/dist/components/Menu/index.js +2 -1
- package/dist/components/Menu/nestedMenuItemsFromObject.js +2 -1
- package/dist/components/Modal/index.js +2 -1
- package/dist/components/Notification/NotificationBody/NotificationList/NotificationList.js +2 -1
- package/dist/components/Notification/index.js +2 -1
- package/dist/components/Panel/index.js +2 -1
- package/dist/components/Popover/index.js +2 -1
- package/dist/components/ProgressBar/index.js +2 -1
- package/dist/components/Prompt/index.js +2 -1
- package/dist/components/RadioButtonGroup/index.js +2 -1
- package/dist/components/Select/index.js +2 -1
- package/dist/components/Sidebar/index.js +2 -1
- package/dist/components/Slider/index.js +2 -1
- package/dist/components/Stepper/index.js +2 -1
- package/dist/components/Switch/index.js +2 -1
- package/dist/components/Table/TableImpl.js +4 -3
- package/dist/components/TableChat/EmptyContainer.js +2 -1
- package/dist/components/TableChat/TableChatSidePanel.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatFooterSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatHeaderSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatMessageListSkeleton.js +2 -1
- package/dist/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.js +2 -1
- package/dist/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.js +2 -1
- package/dist/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.js +2 -1
- package/dist/components/TableChat/components/TableChatRightSection/TableChatRightSection.js +2 -1
- package/dist/components/TableChat/components/TextEditor/EditorToolbar.js +2 -1
- package/dist/components/TableChat/components/TextEditor/Mention.js +2 -1
- package/dist/components/TableChat/components/TextEditor/MentionList.js +2 -1
- package/dist/components/Tabs/index.js +2 -1
- package/dist/components/Tag/index.js +2 -1
- package/dist/components/TagGroup/index.js +2 -1
- package/dist/components/TextArea/index.js +2 -1
- package/dist/components/Toast/index.js +2 -1
- package/dist/components/Tooltip/index.js +2 -1
- package/dist/components/common/HelperText/index.js +2 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +0 -1
- package/dist/mcp-component-registry.json +1 -1
- package/dist/styles/entry.d.ts +2 -0
- package/dist/styles/entry.d.ts.map +1 -0
- package/dist/styles/entry.js +1 -0
- package/dist/styles/style.css +1 -1
- package/eslint-plugin/index.js +91 -0
- package/eslint-plugin/rules/no-barrel-import.js +224 -0
- package/package.json +153 -89
- package/dist/0db32db10ae1525f.svg +0 -9
- package/dist/2bc76319b1fa572e.svg +0 -9
- package/dist/39d49e4daed1a992.svg +0 -9
- package/dist/44beedf64dc29d19.svg +0 -9
- package/dist/49a4f914058314f1.svg +0 -9
- package/dist/6fc8a59d621a04a1.svg +0 -13
- package/dist/78f845dcfc981491.svg +0 -9
- package/dist/b31c0c2a19c1c19a.svg +0 -9
- package/dist/index.js +0 -308
- package/dist/index.js.map +0 -1
- package/src/components/Accordion/Accordion.styles.scss +0 -118
- package/src/components/Accordion/index.js +0 -104
- package/src/components/AccordionModern/AccordionModern.styles.scss +0 -121
- package/src/components/AccordionModern/SortableAccordionComp.js +0 -156
- package/src/components/AccordionModern/index.js +0 -103
- package/src/components/Alert/Alert.styles.scss +0 -131
- package/src/components/Alert/index.js +0 -71
- package/src/components/Avatar/Avatar.styles.scss +0 -25
- package/src/components/Avatar/index.js +0 -58
- package/src/components/Badge/Badges.style.scss +0 -55
- package/src/components/Badge/filled/filledIconLabelBadges/filledIconLabelBadges.styles.scss +0 -32
- package/src/components/Badge/filled/filledIconLabelBadges/index.js +0 -38
- package/src/components/Badge/filled/filledOnlyIconBadges/filledOnlyIconBadges.styles.scss +0 -26
- package/src/components/Badge/filled/filledOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/filled/filledOnlyLabelBadges/filledOnlyLabelBadges.styles.scss +0 -66
- package/src/components/Badge/filled/filledOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/filled/index.js +0 -30
- package/src/components/Badge/index.js +0 -53
- package/src/components/Badge/stroke/index.js +0 -43
- package/src/components/Badge/stroke/strokeIconLabelBadges/index.js +0 -38
- package/src/components/Badge/stroke/strokeIconLabelBadges/strokeIconLabelBadges.styles.scss +0 -33
- package/src/components/Badge/stroke/strokeOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/stroke/strokeOnlyIconBadges/strokeOnlyIconBadges.styles.scss +0 -27
- package/src/components/Badge/stroke/strokeOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/stroke/strokeOnlyLabelBadges/strokeOnlyLabelBadges.styles.scss +0 -89
- package/src/components/Badge/styles.css +0 -52
- package/src/components/Badge/subtle/index.js +0 -41
- package/src/components/Badge/subtle/subtleIOnlyIconBadges/index.js +0 -31
- package/src/components/Badge/subtle/subtleIOnlyIconBadges/subtleIOnlyIconBadges.scss +0 -26
- package/src/components/Badge/subtle/subtleIconLabelBadges/index.js +0 -38
- package/src/components/Badge/subtle/subtleIconLabelBadges/subtleIconLabelBadges.scss +0 -56
- package/src/components/Badge/subtle/subtleOnlyLabelBadges/index.js +0 -31
- package/src/components/Badge/subtle/subtleOnlyLabelBadges/subtleOnlyLabelBadges.scss +0 -70
- package/src/components/BottomSheet/BottomSheet.styles.scss +0 -46
- package/src/components/BottomSheet/index.js +0 -60
- package/src/components/Breadcrumbs/Breadcrumbs.styles.scss +0 -65
- package/src/components/Breadcrumbs/index.js +0 -121
- package/src/components/Button/Button.styles.scss +0 -345
- package/src/components/Button/index.js +0 -171
- package/src/components/ButtonGroup/ButtonGroup.styles.scss +0 -125
- package/src/components/ButtonGroup/index.js +0 -84
- package/src/components/Card/Card.styles.scss +0 -33
- package/src/components/Card/index.js +0 -21
- package/src/components/Chart/Chart.style.scss +0 -142
- package/src/components/Chart/index.js +0 -752
- package/src/components/ChatBot/bookMarkPanel.js +0 -74
- package/src/components/ChatBot/chatBot.style.scss +0 -1295
- package/src/components/ChatBot/chatBotFooter.js +0 -14
- package/src/components/ChatBot/chatBotLandingScreen.js +0 -26
- package/src/components/ChatBot/chatInput.js +0 -206
- package/src/components/ChatBot/chatbotModuleMenu.js +0 -278
- package/src/components/ChatBot/constant.js +0 -32
- package/src/components/ChatBot/conversationScreen.js +0 -281
- package/src/components/ChatBot/customScreen.js +0 -69
- package/src/components/ChatBot/historyPanel.js +0 -579
- package/src/components/ChatBot/index.js +0 -473
- package/src/components/ChatBot/newChatComponent.js +0 -105
- package/src/components/ChatBot/utils.js +0 -27
- package/src/components/Checkbox/Checkbox.styles.scss +0 -232
- package/src/components/Checkbox/dashed/index.js +0 -34
- package/src/components/Checkbox/default/index.js +0 -70
- package/src/components/Checkbox/index.js +0 -50
- package/src/components/Checkbox/withDropDown/index.js +0 -96
- package/src/components/Checkbox/withoutFormLabel/index.js +0 -46
- package/src/components/Chips/Chip.style.scss +0 -134
- package/src/components/Chips/index.js +0 -34
- package/src/components/CreateItemFlow/CreateItemFlow.styles.scss +0 -37
- package/src/components/CreateItemFlow/index.js +0 -145
- package/src/components/DatePicker/DatePicker.styles.scss +0 -519
- package/src/components/DatePicker/datePickerDropdown.js +0 -282
- package/src/components/DatePicker/datePickerFooter.js +0 -76
- package/src/components/DatePicker/datePickerInput.js +0 -333
- package/src/components/DatePicker/index.js +0 -288
- package/src/components/DatePicker/showMonthYearSelect.js +0 -119
- package/src/components/DateRangePicker/DateRangePicker.styles.scss +0 -635
- package/src/components/DateRangePicker/dateRangePickerCustom.js +0 -22
- package/src/components/DateRangePicker/dateRangePickerDropdown.js +0 -320
- package/src/components/DateRangePicker/dateRangePickerFooter.js +0 -50
- package/src/components/DateRangePicker/dateRangePickerInput.js +0 -544
- package/src/components/DateRangePicker/index.js +0 -393
- package/src/components/DateRangePicker/showMonthYearSelect.js +0 -103
- package/src/components/DateRangePicker/utils.js +0 -71
- package/src/components/DynamicLayout/DynamicLayout.styles.scss +0 -153
- package/src/components/DynamicLayout/index.js +0 -73
- package/src/components/EmptyState/EmptyState.styles.scss +0 -88
- package/src/components/EmptyState/EmptyStateImageComponent.jsx +0 -36
- package/src/components/EmptyState/index.js +0 -54
- package/src/components/FileUpload/FileUpload.styles.scss +0 -449
- package/src/components/FileUpload/index.js +0 -641
- package/src/components/FilterPanel/FilterPanel.styles.scss +0 -241
- package/src/components/FilterPanel/FilterPanelHeader.js +0 -15
- package/src/components/FilterPanel/PanelFooter.js +0 -65
- package/src/components/FilterPanel/PanelSidebar.js +0 -85
- package/src/components/FilterPanel/index.js +0 -147
- package/src/components/FiltersStrip/FiltersStrip.styles.scss +0 -343
- package/src/components/FiltersStrip/Slider/FilterSlider.styles.scss +0 -85
- package/src/components/FiltersStrip/Slider/Portal.js +0 -59
- package/src/components/FiltersStrip/Slider/index.js +0 -233
- package/src/components/FiltersStrip/appliedFilter.js +0 -180
- package/src/components/FiltersStrip/filterDropDown.js +0 -96
- package/src/components/FiltersStrip/index.js +0 -127
- package/src/components/FiltersStrip/mockData.js +0 -227
- package/src/components/Header/Header.styles.scss +0 -223
- package/src/components/Header/index.js +0 -156
- package/src/components/HomePage/HomePage.styles.scss +0 -1638
- package/src/components/HomePage/constant.js +0 -331
- package/src/components/HomePage/index.js +0 -675
- package/src/components/Input/Input.styles.scss +0 -318
- package/src/components/Input/helperText.js +0 -19
- package/src/components/Input/index.js +0 -60
- package/src/components/Input/inputWithIcon.js +0 -134
- package/src/components/Input/vanilaInput.js +0 -68
- package/src/components/Loader/Loader.styles.scss +0 -90
- package/src/components/Loader/index.js +0 -69
- package/src/components/Menu/IconMenuItem.js +0 -100
- package/src/components/Menu/Menu.styles.scss +0 -190
- package/src/components/Menu/MenuHeader.jsx +0 -84
- package/src/components/Menu/MenuHeaderInfo.jsx +0 -319
- package/src/components/Menu/MenuHeaderInfo.styles.scss +0 -123
- package/src/components/Menu/NestedMenuItem.js +0 -189
- package/src/components/Menu/index.js +0 -254
- package/src/components/Menu/nestedMenuItemsFromObject.js +0 -100
- package/src/components/Modal/Modal.styles.scss +0 -129
- package/src/components/Modal/index.js +0 -141
- package/src/components/MonthPicker/MonthPicker.styles.scss +0 -255
- package/src/components/MonthPicker/constant.js +0 -1
- package/src/components/MonthPicker/index.js +0 -373
- package/src/components/MonthRangePicker/MonthRangePicker.styles.scss +0 -383
- package/src/components/MonthRangePicker/constant.js +0 -1
- package/src/components/MonthRangePicker/index.js +0 -574
- package/src/components/Notification/Notification.styles.scss +0 -594
- package/src/components/Notification/NotificationBody/NotificationInfoList/chipsLists.js +0 -144
- package/src/components/Notification/NotificationBody/NotificationInfoList/index.js +0 -128
- package/src/components/Notification/NotificationBody/NotificationInfoList/notificationList.js +0 -165
- package/src/components/Notification/NotificationBody/NotificationPanels/chipsLists.js +0 -85
- package/src/components/Notification/NotificationBody/NotificationPanels/index.js +0 -259
- package/src/components/Notification/NotificationBody/NotificationPanels/notificationList.js +0 -637
- package/src/components/Notification/NotificationBody/index.js +0 -117
- package/src/components/Notification/index.js +0 -128
- package/src/components/Notification/mockData.js +0 -389
- package/src/components/Notification/notificationFooter.js +0 -31
- package/src/components/Notification/notificationHeader.js +0 -28
- package/src/components/Panel/Panel.styles.scss +0 -71
- package/src/components/Panel/index.js +0 -144
- package/src/components/Popover/Popover.styles.scss +0 -52
- package/src/components/Popover/index.js +0 -71
- package/src/components/Portal/index.js +0 -31
- package/src/components/ProgressBar/ProgressBar.styles.scss +0 -62
- package/src/components/ProgressBar/index.js +0 -40
- package/src/components/Prompt/Prompt.styles.scss +0 -107
- package/src/components/Prompt/index.js +0 -107
- package/src/components/RadioButtonGroup/RadioButtonGroup.styles.scss +0 -136
- package/src/components/RadioButtonGroup/index.js +0 -107
- package/src/components/Select/SearchFilter.js +0 -72
- package/src/components/Select/Select.styles.scss +0 -748
- package/src/components/Select/customGroupHeading.js +0 -24
- package/src/components/Select/dropdown.js +0 -65
- package/src/components/Select/hooks/index.js +0 -2
- package/src/components/Select/hooks/useClickOutside.js +0 -61
- package/src/components/Select/hooks/useMenuPosition.js +0 -288
- package/src/components/Select/index.js +0 -1307
- package/src/components/Select/menuList.js +0 -119
- package/src/components/Select/optionList.js +0 -215
- package/src/components/Select/selected-option-tags.js +0 -99
- package/src/components/Select/utils.js +0 -232
- package/src/components/Sidebar/Menus/childMenu.js +0 -88
- package/src/components/Sidebar/Menus/index.js +0 -130
- package/src/components/Sidebar/Menus/parentMenu.js +0 -173
- package/src/components/Sidebar/Sidebar.styles.scss +0 -411
- package/src/components/Sidebar/actions.js +0 -31
- package/src/components/Sidebar/index.js +0 -84
- package/src/components/Sidebar/mock.js +0 -202
- package/src/components/Slider/Sliders.styles.scss +0 -260
- package/src/components/Slider/index.js +0 -314
- package/src/components/Stepper/Stepper.styles.scss +0 -355
- package/src/components/Stepper/index.js +0 -101
- package/src/components/Switch/Switch.styles.scss +0 -96
- package/src/components/Switch/index.js +0 -59
- package/src/components/Table/AdvanceSearchModalItem.js +0 -392
- package/src/components/Table/AdvanceSortModal.js +0 -332
- package/src/components/Table/AgGridHeader.js +0 -1009
- package/src/components/Table/CommentsPortal.js +0 -428
- package/src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModal.js +0 -323
- package/src/components/Table/NewAdvanceSearchModal/NewAdvanceSearchModalItem.js +0 -476
- package/src/components/Table/NoComments.js +0 -295
- package/src/components/Table/Table.styles.scss +0 -3859
- package/src/components/Table/actionBar.js +0 -43
- package/src/components/Table/advanceSearchModal.js +0 -797
- package/src/components/Table/commentPanel.js +0 -421
- package/src/components/Table/filterUtils.js +0 -850
- package/src/components/Table/index.js +0 -2175
- package/src/components/Table/mockData.js +0 -1344
- package/src/components/Table/tableFunctions.js +0 -1676
- package/src/components/Table/tableHeader.js +0 -476
- package/src/components/Table/tableIcons.js +0 -61
- package/src/components/Table/tableMoreOptions.js +0 -293
- package/src/components/Table/tablePagination.js +0 -63
- package/src/components/Table/tableSettings.js +0 -287
- package/src/components/Table/withCommentIcon.js +0 -107
- package/src/components/TableChat/EmptyContainer.jsx +0 -13
- package/src/components/TableChat/README.md +0 -588
- package/src/components/TableChat/TableChatSidePanel.jsx +0 -832
- package/src/components/TableChat/TableChatSidePanel.styles.scss +0 -57
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatFooterSkeleton.jsx +0 -43
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatHeaderSkeleton.jsx +0 -55
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatMessageListSkeleton.jsx +0 -94
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.jsx +0 -22
- package/src/components/TableChat/components/ChatMessageSkeleton/ChatSkeleton.scss +0 -179
- package/src/components/TableChat/components/SkeletonList.jsx +0 -12
- package/src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.jsx +0 -171
- package/src/components/TableChat/components/TableChatLeftSection/AddChatContainer/AddChatContainer.styles.scss +0 -37
- package/src/components/TableChat/components/TableChatLeftSection/ChannelCheckbox/ChannelCheckbox.jsx +0 -28
- package/src/components/TableChat/components/TableChatLeftSection/ChatChannelItem.jsx +0 -116
- package/src/components/TableChat/components/TableChatLeftSection/ChatChannelList.jsx +0 -89
- package/src/components/TableChat/components/TableChatLeftSection/ChatHeaderButton/ChatHeaderButton.jsx +0 -27
- package/src/components/TableChat/components/TableChatLeftSection/ChatHeaderNavigation.jsx +0 -191
- package/src/components/TableChat/components/TableChatLeftSection/ChatIconButton/ChatIconButton.jsx +0 -23
- package/src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.jsx +0 -117
- package/src/components/TableChat/components/TableChatLeftSection/TableChatChannelHeader.styles.scss +0 -469
- package/src/components/TableChat/components/TableChatLeftSection/UnreadBadge/UnreadBadge.jsx +0 -16
- package/src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.jsx +0 -119
- package/src/components/TableChat/components/TableChatRightSection/AvatarGroup/AvatarGroup.styles.scss +0 -87
- package/src/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.jsx +0 -216
- package/src/components/TableChat/components/TableChatRightSection/ChatDefaultMessageType/ChatDefaultMessageType.styles.scss +0 -291
- package/src/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/ChatDeletedMessageType.jsx +0 -19
- package/src/components/TableChat/components/TableChatRightSection/ChatDeleteMessageType/DeletedMessage.styles.scss +0 -55
- package/src/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.jsx +0 -61
- package/src/components/TableChat/components/TableChatRightSection/ChatEditedMessageType/ChatEditedMessageType.styles.scss +0 -13
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeader.jsx +0 -432
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderAction.jsx +0 -365
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/ChatHeaderInfo.jsx +0 -42
- package/src/components/TableChat/components/TableChatRightSection/ChatHeader/chatHeader.styles.scss +0 -323
- package/src/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.jsx +0 -793
- package/src/components/TableChat/components/TableChatRightSection/ChatInput/ChatInput.styles.scss +0 -394
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.jsx +0 -61
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageActions/ChatMessageActions.styles.scss +0 -28
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.jsx +0 -11
- package/src/components/TableChat/components/TableChatRightSection/ChatMessageAvatar/ChatMessageAvatar.styles.scss +0 -3
- package/src/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.jsx +0 -220
- package/src/components/TableChat/components/TableChatRightSection/ChatMessages/ChatMessage.styles.scss +0 -128
- package/src/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.jsx +0 -246
- package/src/components/TableChat/components/TableChatRightSection/ChatNotificationSettings/ChatNotificationSettings.styles.scss +0 -210
- package/src/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.jsx +0 -52
- package/src/components/TableChat/components/TableChatRightSection/DateSeparator/DateSeparator.styles.scss +0 -34
- package/src/components/TableChat/components/TableChatRightSection/EmojiPicker/EmojiPicker.jsx +0 -31
- package/src/components/TableChat/components/TableChatRightSection/FileUploader/FileUploader.jsx +0 -170
- package/src/components/TableChat/components/TableChatRightSection/ImageUploader/ImageUploader.jsx +0 -165
- package/src/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChat.styles.scss +0 -587
- package/src/components/TableChat/components/TableChatRightSection/PinedChatPanel/PinedChatPanel.jsx +0 -244
- package/src/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.jsx +0 -29
- package/src/components/TableChat/components/TableChatRightSection/ReplyBadge/ReplyBadge.styles.scss +0 -47
- package/src/components/TableChat/components/TableChatRightSection/TableChatRightSection.jsx +0 -1340
- package/src/components/TableChat/components/TableChatRightSection/TableChatRightSection.styles.scss +0 -147
- package/src/components/TableChat/components/TextEditor/EditorToolbar.jsx +0 -209
- package/src/components/TableChat/components/TextEditor/EditorToolbar.styles.scss +0 -61
- package/src/components/TableChat/components/TextEditor/Mention.jsx +0 -234
- package/src/components/TableChat/components/TextEditor/MentionList.jsx +0 -118
- package/src/components/TableChat/components/TextEditor/MentionList.scss +0 -146
- package/src/components/TableChat/components/TextEditor/styles.scss +0 -278
- package/src/components/TableChat/components/TextEditor/suggestion.js +0 -124
- package/src/components/TableChat/components/chatConfig.js +0 -64
- package/src/components/TableChat/hooks/useInfiniteScroll.js +0 -256
- package/src/components/TableOld/AgGridHeader.js +0 -545
- package/src/components/TableOld/Table.styles.scss +0 -2192
- package/src/components/TableOld/actionBar.js +0 -43
- package/src/components/TableOld/index.js +0 -598
- package/src/components/TableOld/mockData.js +0 -1344
- package/src/components/TableOld/tableFunctions.js +0 -1734
- package/src/components/TableOld/tableHeader.js +0 -251
- package/src/components/TableOld/tableIcons.js +0 -61
- package/src/components/TableOld/tablePagination.js +0 -64
- package/src/components/TableOld/tableSettings.js +0 -166
- package/src/components/Tabs/Tabs.styles.scss +0 -120
- package/src/components/Tabs/index.js +0 -91
- package/src/components/Tabs/tabPanel.js +0 -38
- package/src/components/Tag/Tags.styles.scss +0 -71
- package/src/components/Tag/filled.js +0 -48
- package/src/components/Tag/index.js +0 -54
- package/src/components/Tag/solid.js +0 -47
- package/src/components/Tag/stroke.js +0 -47
- package/src/components/Tag/utils.js +0 -12
- package/src/components/TagGroup/TagGroup.styles.scss +0 -7
- package/src/components/TagGroup/index.js +0 -6
- package/src/components/TextArea/TextArea.styles.scss +0 -158
- package/src/components/TextArea/index.js +0 -121
- package/src/components/Toast/Toast.styles.scss +0 -66
- package/src/components/Toast/index.js +0 -35
- package/src/components/Tooltip/Tooltips.styles.scss +0 -111
- package/src/components/Tooltip/index.js +0 -68
- package/src/components/common/HelperText/HelperText.styles.scss +0 -18
- package/src/components/common/HelperText/index.js +0 -44
- package/src/components/common/MentionEditor/MentionEditor.styles.scss +0 -301
- package/src/components/common/MentionEditor/MentionList/MentionList.styles.scss +0 -146
- package/src/components/common/MentionEditor/MentionList/index.js +0 -130
- package/src/components/common/MentionEditor/index.js +0 -246
- package/src/components/common/MentionEditor/suggestion.js +0 -124
- package/src/components/index.js +0 -53
- package/src/stories/Accordion.stories.js +0 -151
- package/src/stories/AccordionModern.stories.js +0 -263
- package/src/stories/Alert.stories.js +0 -103
- package/src/stories/Avatar.stories.js +0 -79
- package/src/stories/Badge.stories.js +0 -112
- package/src/stories/BottomSheet.stories.js +0 -224
- package/src/stories/Breadcrumbs.stories.js +0 -143
- package/src/stories/Button.stories.js +0 -190
- package/src/stories/ButtonGroup.stories.js +0 -123
- package/src/stories/Card.stories.js +0 -73
- package/src/stories/Changelog.mdx +0 -1006
- package/src/stories/Chart.stories.js +0 -2017
- package/src/stories/ChatBot.stories.js +0 -668
- package/src/stories/Checkbox.stories.js +0 -209
- package/src/stories/Chips.stories.js +0 -106
- package/src/stories/CreateItemFlow.stories.js +0 -255
- package/src/stories/DatePicker.stories.js +0 -311
- package/src/stories/DateRangePicker.stories.js +0 -364
- package/src/stories/EmptyState.stories.js +0 -110
- package/src/stories/FileUpload.stories.js +0 -169
- package/src/stories/FilterPanel.stories.js +0 -309
- package/src/stories/FiltersStrip.stories.js +0 -244
- package/src/stories/GettingStarted.mdx +0 -153
- package/src/stories/Header.stories.js +0 -185
- package/src/stories/HomePage.stories.js +0 -201
- package/src/stories/Input.stories.js +0 -165
- package/src/stories/Loader.stories.js +0 -33
- package/src/stories/Menu.stories.js +0 -309
- package/src/stories/Modal.stories.js +0 -185
- package/src/stories/MonthPicker.stories.js +0 -313
- package/src/stories/MonthRangePicker.stories.js +0 -255
- package/src/stories/Notification.stories.js +0 -500
- package/src/stories/Panel.stories.js +0 -179
- package/src/stories/Popover.stories.js +0 -125
- package/src/stories/ProgressBar.stories.js +0 -93
- package/src/stories/Prompt.stories.js +0 -120
- package/src/stories/RadioButtonGroup.stories.js +0 -83
- package/src/stories/Select.stories.js +0 -753
- package/src/stories/Sidebar.stories.js +0 -177
- package/src/stories/Slider.stories.js +0 -226
- package/src/stories/Stepper.stories.js +0 -158
- package/src/stories/Switch.stories.js +0 -72
- package/src/stories/Table.stories.js +0 -4323
- package/src/stories/TableChat.mdx +0 -992
- package/src/stories/TableChat.stories.js +0 -1712
- package/src/stories/TableOld.stories.js +0 -954
- package/src/stories/Tabs.stories.js +0 -253
- package/src/stories/Tag.stories.js +0 -92
- package/src/stories/TagGroup.stories.js +0 -39
- package/src/stories/TextArea.stories.js +0 -148
- package/src/stories/Toast.stories.js +0 -113
- package/src/stories/Tooltip.stories.js +0 -86
- package/src/stories/storybookLinks.mdx +0 -20
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Typography from "@mui/material/Typography";
|
|
3
|
-
import MUIStepper from "@mui/material/Stepper";
|
|
4
|
-
import Step from "@mui/material/Step";
|
|
5
|
-
import StepLabel from "@mui/material/StepLabel";
|
|
6
|
-
import PropTypes from "prop-types";
|
|
7
|
-
import { Badge } from "../Badge";
|
|
8
|
-
|
|
9
|
-
import "./Stepper.styles.scss";
|
|
10
|
-
|
|
11
|
-
const renderDefaultStepper = ({
|
|
12
|
-
steps,
|
|
13
|
-
activeStep,
|
|
14
|
-
orientation,
|
|
15
|
-
handleStep,
|
|
16
|
-
width = "100%",
|
|
17
|
-
...args
|
|
18
|
-
}) => {
|
|
19
|
-
// const {icon, label, color="warning"} = statusConfig;
|
|
20
|
-
return (
|
|
21
|
-
<MUIStepper
|
|
22
|
-
className="ia-styles ia-stepper ia-stepper-horizontal"
|
|
23
|
-
activeStep={activeStep}
|
|
24
|
-
sx={{ width: width }}
|
|
25
|
-
orientation={orientation}
|
|
26
|
-
{...args}
|
|
27
|
-
>
|
|
28
|
-
{steps.length > 0 &&
|
|
29
|
-
steps.map((step, index) => (
|
|
30
|
-
<Step key={step.label} onClick={() => handleStep(index)}>
|
|
31
|
-
<StepLabel
|
|
32
|
-
optional={
|
|
33
|
-
step.description ? (
|
|
34
|
-
<Typography variant="caption">{step.description}</Typography>
|
|
35
|
-
) : null
|
|
36
|
-
}
|
|
37
|
-
className={step?.statusConfig ? "status-config" : ""}
|
|
38
|
-
>
|
|
39
|
-
{step.label}
|
|
40
|
-
{step?.statusConfig && <Badge label={step.statusConfig.label} color={step.statusConfig.color} icon={step.statusConfig.icon} isIcon={step.statusConfig.icon} variant="subtle"/>}
|
|
41
|
-
</StepLabel>
|
|
42
|
-
</Step>
|
|
43
|
-
))}
|
|
44
|
-
</MUIStepper>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const renderProgressStepper = ({ steps, activeStep, handleStep }) => (
|
|
49
|
-
<div className="ia-styles ia-stepper progress">
|
|
50
|
-
<div className="progress-steps">
|
|
51
|
-
{steps.map((step, index) => (
|
|
52
|
-
<div
|
|
53
|
-
key={step.label}
|
|
54
|
-
className={`step ${index === activeStep ? "active" : ""} ${index < activeStep ? "completed" : ""
|
|
55
|
-
}`}
|
|
56
|
-
onClick={() => handleStep(index)}
|
|
57
|
-
/>
|
|
58
|
-
))}
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
export const Stepper = ({
|
|
64
|
-
steps,
|
|
65
|
-
activeStep,
|
|
66
|
-
orientation = "horizontal",
|
|
67
|
-
handleStep,
|
|
68
|
-
variant = "default",
|
|
69
|
-
...args
|
|
70
|
-
}) => {
|
|
71
|
-
const stepperContent = {
|
|
72
|
-
default: () =>
|
|
73
|
-
renderDefaultStepper({
|
|
74
|
-
steps,
|
|
75
|
-
activeStep,
|
|
76
|
-
orientation,
|
|
77
|
-
handleStep,
|
|
78
|
-
...args,
|
|
79
|
-
}),
|
|
80
|
-
progress: () => renderProgressStepper({ steps, activeStep, handleStep }),
|
|
81
|
-
// Backward compatibility
|
|
82
|
-
mui: () =>
|
|
83
|
-
renderDefaultStepper({
|
|
84
|
-
steps,
|
|
85
|
-
activeStep,
|
|
86
|
-
orientation,
|
|
87
|
-
handleStep,
|
|
88
|
-
...args,
|
|
89
|
-
}),
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
return stepperContent[variant]();
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
Stepper.propTypes = {
|
|
96
|
-
steps: PropTypes.array,
|
|
97
|
-
activeStep: PropTypes.number,
|
|
98
|
-
orientation: PropTypes.oneOf(["horizontal", "vertical"]),
|
|
99
|
-
handleStep: PropTypes.func,
|
|
100
|
-
variant: PropTypes.oneOf(["default", "progress", "mui"]),
|
|
101
|
-
};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
@import "../../styles/index.scss";
|
|
2
|
-
|
|
3
|
-
.ia-styles.ia-switch-container {
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
gap: 6px;
|
|
7
|
-
|
|
8
|
-
.ia-switch-label {
|
|
9
|
-
font-family: $fontFamily;
|
|
10
|
-
font-size: $normalFontSize;
|
|
11
|
-
font-weight: $normalFontWeight;
|
|
12
|
-
line-height: 17.5px;
|
|
13
|
-
text-align: left;
|
|
14
|
-
color: $textButtonFontColor;
|
|
15
|
-
&.ia-switch-disabled {
|
|
16
|
-
color: $lightGrayColor;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.ia-styles.ia-switch {
|
|
22
|
-
position: relative;
|
|
23
|
-
width: 24px;
|
|
24
|
-
padding: 0;
|
|
25
|
-
height: 16px;
|
|
26
|
-
|
|
27
|
-
.MuiButtonBase-root.MuiSwitch-switchBase {
|
|
28
|
-
background-color: transparent !important;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.MuiSwitch-thumb {
|
|
32
|
-
top: 3px;
|
|
33
|
-
position: absolute;
|
|
34
|
-
left: 15px;
|
|
35
|
-
width: 10px;
|
|
36
|
-
height: 10px;
|
|
37
|
-
box-shadow: none;
|
|
38
|
-
color: $deactivateColor;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.Mui-checked {
|
|
42
|
-
transform: translateX(10px);
|
|
43
|
-
color: $primaryColor !important;
|
|
44
|
-
|
|
45
|
-
.MuiSwitch-thumb {
|
|
46
|
-
color: $primaryColor;
|
|
47
|
-
left: 13px;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
.Mui-checked:not(.Mui-disabled) + .MuiSwitch-track {
|
|
51
|
-
background-color: $lightBlueColor !important;
|
|
52
|
-
border: 1px solid $accordionBgBackground;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.MuiButtonBase-root {
|
|
56
|
-
color: $lightGrayColor;
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 0;
|
|
59
|
-
bottom: 0;
|
|
60
|
-
left: -12px;
|
|
61
|
-
width: 24px;
|
|
62
|
-
margin: auto;
|
|
63
|
-
padding: 0;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.MuiSwitch-track {
|
|
67
|
-
background-color: $whiteColor;
|
|
68
|
-
opacity: 1;
|
|
69
|
-
height: 16px;
|
|
70
|
-
width: 24px;
|
|
71
|
-
border-radius: 8px;
|
|
72
|
-
border: 1px solid $deactivateColor;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&.ia-switch-disabled {
|
|
76
|
-
// OFF + disabled
|
|
77
|
-
.MuiSwitch-switchBase:not(.Mui-checked) .MuiSwitch-thumb {
|
|
78
|
-
color: $disabledSecondaryBorder; // grey circle
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.MuiSwitch-switchBase:not(.Mui-checked) + .MuiSwitch-track {
|
|
82
|
-
background-color: $disabledSecondaryBg !important;
|
|
83
|
-
border-color: 1px solid $disabledSecondaryBorder;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// ON + disabled
|
|
87
|
-
.MuiSwitch-switchBase.Mui-checked.Mui-disabled .MuiSwitch-thumb {
|
|
88
|
-
color: $accordionBgBackground;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.MuiSwitch-switchBase.Mui-checked.Mui-disabled + .MuiSwitch-track {
|
|
92
|
-
background-color: $lightBlueColor !important;
|
|
93
|
-
// border-color: $accordionBgBackground;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import MUISwitch from "@mui/material/Switch";
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
|
|
5
|
-
import "./Switch.styles.scss";
|
|
6
|
-
|
|
7
|
-
export const Switch = ({
|
|
8
|
-
value,
|
|
9
|
-
leftLabel = "",
|
|
10
|
-
rightLabel = "",
|
|
11
|
-
disabled = false,
|
|
12
|
-
onChange,
|
|
13
|
-
...args
|
|
14
|
-
}) => {
|
|
15
|
-
return (
|
|
16
|
-
<div className="ia-styles ia-switch-container">
|
|
17
|
-
{leftLabel ? (
|
|
18
|
-
<span
|
|
19
|
-
className={`ia-styles ia-switch-label ${
|
|
20
|
-
disabled ? "ia-switch-disabled" : ""
|
|
21
|
-
}`}
|
|
22
|
-
style={{ color: value && !disabled && "#1f2b4d" }}
|
|
23
|
-
>
|
|
24
|
-
{leftLabel}
|
|
25
|
-
</span>
|
|
26
|
-
) : null}
|
|
27
|
-
<div style={{ display: "flex", alignItems: "center" }}>
|
|
28
|
-
<MUISwitch
|
|
29
|
-
disabled={disabled}
|
|
30
|
-
disableRipple
|
|
31
|
-
checked={value}
|
|
32
|
-
onChange={onChange}
|
|
33
|
-
className={`ia-styles ia-switch ${
|
|
34
|
-
disabled ? "ia-switch-disabled" : ""
|
|
35
|
-
} ${!value ? "ia-switch-off" : ""}`}
|
|
36
|
-
{...args}
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
{rightLabel ? (
|
|
40
|
-
<span
|
|
41
|
-
className={`ia-styles ia-switch-label ${
|
|
42
|
-
disabled ? "ia-switch-disabled" : ""
|
|
43
|
-
}`}
|
|
44
|
-
style={{ color: value && !disabled && "#1F2B4D" }}
|
|
45
|
-
>
|
|
46
|
-
{rightLabel}
|
|
47
|
-
</span>
|
|
48
|
-
) : null}
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
Switch.propTypes = {
|
|
54
|
-
value: PropTypes.bool,
|
|
55
|
-
leftLabel: PropTypes.string,
|
|
56
|
-
rightLabel: PropTypes.string,
|
|
57
|
-
disabled: PropTypes.bool,
|
|
58
|
-
onChange: PropTypes.func,
|
|
59
|
-
};
|
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState, useMemo } from "react";
|
|
2
|
-
import { Select } from "../Select";
|
|
3
|
-
import { Input } from "../Input";
|
|
4
|
-
import { Button } from "../Button";
|
|
5
|
-
import { DatePicker } from "../DatePicker";
|
|
6
|
-
import { DateRangePicker } from "../DateRangePicker";
|
|
7
|
-
import { useController, useForm } from "react-hook-form";
|
|
8
|
-
import DeleteOutlineOutlinedIcon from "@mui/icons-material/DeleteOutlineOutlined";
|
|
9
|
-
import {
|
|
10
|
-
NON_TEXT_FILTER_OPTIONS,
|
|
11
|
-
TEXT_FILTER_OPTIONS,
|
|
12
|
-
isColumnSelectionDuplicate,
|
|
13
|
-
} from "../../utils/helper";
|
|
14
|
-
import moment from "moment";
|
|
15
|
-
import { use } from "react";
|
|
16
|
-
const AdvanceSearchModalItem = ({
|
|
17
|
-
colDefs,
|
|
18
|
-
control,
|
|
19
|
-
index,
|
|
20
|
-
actualIndex, // Add actualIndex prop for the real form index
|
|
21
|
-
onDelete,
|
|
22
|
-
filteredColumnsInitialOptions,
|
|
23
|
-
totalColumns,
|
|
24
|
-
currentColumnId,
|
|
25
|
-
activeOption,
|
|
26
|
-
getValues,
|
|
27
|
-
addNewColumn,
|
|
28
|
-
setToShowDuplicateColumnInAdvanceSearch,
|
|
29
|
-
selectedThirdOptionDropdownValue,
|
|
30
|
-
setSelectedThirdOptionDropdownValue,
|
|
31
|
-
isClearAll,
|
|
32
|
-
fields,
|
|
33
|
-
isLastVisible,
|
|
34
|
-
flag,
|
|
35
|
-
setFlag,
|
|
36
|
-
pendingDeletions,
|
|
37
|
-
setPendingDeletions,
|
|
38
|
-
remove,
|
|
39
|
-
...args
|
|
40
|
-
}) => {
|
|
41
|
-
const [isColumnOptionsOpen, setIsColumnOptionsOpen] = useState(false);
|
|
42
|
-
const [isOperationOptionsOpen, setIsOperationOptionsOpen] = useState(false);
|
|
43
|
-
const [isThirdOptionDropdownOpen, setIsThirdOptionDropdownOpen] =
|
|
44
|
-
useState(false);
|
|
45
|
-
const [currentOperationOptions, setCurrentOperationOptions] = useState([]);
|
|
46
|
-
|
|
47
|
-
const [
|
|
48
|
-
currentThirdOptionDropdownOptions,
|
|
49
|
-
setCurrentThirdOptionDropdownOptions,
|
|
50
|
-
] = useState([]);
|
|
51
|
-
const [currentColumnDef, setCurrentColumnDef] = useState(null);
|
|
52
|
-
const [
|
|
53
|
-
currentFilteredColumnsInitialOptions,
|
|
54
|
-
setCurrentFilteredColumnsInitialOptions,
|
|
55
|
-
] = useState(filteredColumnsInitialOptions);
|
|
56
|
-
// Column field controller - use actualIndex for form binding
|
|
57
|
-
const formIndex = actualIndex !== undefined ? actualIndex : index;
|
|
58
|
-
const { field: columnField } = useController({
|
|
59
|
-
name: `filters.${formIndex}.column`,
|
|
60
|
-
control,
|
|
61
|
-
rules: {
|
|
62
|
-
required: true,
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const { unregister } = useForm();
|
|
67
|
-
// useEffect(() => {
|
|
68
|
-
// if (activeOption !== "advanceSearch") {
|
|
69
|
-
// unregister(`filters.${index}.operation`); // Completely removes field from form state
|
|
70
|
-
// }
|
|
71
|
-
// }, [activeOption, index, unregister]);
|
|
72
|
-
|
|
73
|
-
const { field: operationField, fieldState: operationFieldState } =
|
|
74
|
-
useController({
|
|
75
|
-
name: `filters.${formIndex}.operation`,
|
|
76
|
-
control,
|
|
77
|
-
rules: { required: activeOption !== "advanceSearch" && true },
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// Value field controller
|
|
81
|
-
const { field: valueField } = useController({
|
|
82
|
-
name: `filters.${formIndex}.value`,
|
|
83
|
-
control,
|
|
84
|
-
rules: {
|
|
85
|
-
required: true,
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
useEffect(() => {
|
|
90
|
-
if (columnField?.value) {
|
|
91
|
-
// Recursively find the column definition
|
|
92
|
-
const findColumnDef = (cols, field) => {
|
|
93
|
-
for (const col of cols) {
|
|
94
|
-
if (col.children) {
|
|
95
|
-
const found = findColumnDef(col.children, field);
|
|
96
|
-
if (found) return found;
|
|
97
|
-
}
|
|
98
|
-
if (
|
|
99
|
-
col.toShowDuplicateColumnInAdvanceSearch &&
|
|
100
|
-
col.columnFieldsInAdvanceSearch
|
|
101
|
-
) {
|
|
102
|
-
const index = col.columnFieldsInAdvanceSearch?.indexOf(field);
|
|
103
|
-
if (index !== -1) {
|
|
104
|
-
return {
|
|
105
|
-
...col,
|
|
106
|
-
currentColumnField: `${field}${index + 1}`, // add index + 1
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
} else if (col.colId === field || col.field === field) {
|
|
110
|
-
return col;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return null;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const columnDef = findColumnDef(colDefs, columnField.value.value);
|
|
117
|
-
setCurrentColumnDef(columnDef);
|
|
118
|
-
const operatorList = columnDef?.operationFilterOptions
|
|
119
|
-
? columnDef.operationFilterOptions
|
|
120
|
-
: columnDef?.filter === "agNumberColumnFilter"
|
|
121
|
-
? NON_TEXT_FILTER_OPTIONS
|
|
122
|
-
: TEXT_FILTER_OPTIONS;
|
|
123
|
-
setCurrentOperationOptions(operatorList);
|
|
124
|
-
}
|
|
125
|
-
}, [columnField?.value, colDefs]);
|
|
126
|
-
|
|
127
|
-
useEffect(() => {
|
|
128
|
-
if (currentColumnDef?.thirdOptionAsDropdown && operationField?.value) {
|
|
129
|
-
if (currentColumnDef?.toShowDuplicateColumnInAdvanceSearch) {
|
|
130
|
-
const currentOptions = currentColumnDef.currentColumnField?.endsWith(
|
|
131
|
-
"1"
|
|
132
|
-
)
|
|
133
|
-
? currentColumnDef?.thirdOptionDropdownOptions1
|
|
134
|
-
: currentColumnDef?.thirdOptionDropdownOptions2;
|
|
135
|
-
setCurrentThirdOptionDropdownOptions(currentOptions);
|
|
136
|
-
} else {
|
|
137
|
-
setCurrentThirdOptionDropdownOptions(
|
|
138
|
-
currentColumnDef?.thirdOptionDropdownOptions
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
setToShowDuplicateColumnInAdvanceSearch(
|
|
143
|
-
currentColumnDef?.toShowDuplicateColumnInAdvanceSearch
|
|
144
|
-
);
|
|
145
|
-
}, [currentColumnDef, operationField]);
|
|
146
|
-
|
|
147
|
-
useEffect(() => {
|
|
148
|
-
// Case: When we click on icon to open advance filter
|
|
149
|
-
|
|
150
|
-
setCurrentFilteredColumnsInitialOptions(filteredColumnsInitialOptions);
|
|
151
|
-
if (
|
|
152
|
-
currentColumnId &&
|
|
153
|
-
!columnField.value &&
|
|
154
|
-
columnField.value !== currentColumnId &&
|
|
155
|
-
filteredColumnsInitialOptions?.length > 0 &&
|
|
156
|
-
!isClearAll
|
|
157
|
-
) {
|
|
158
|
-
const columnOption = filteredColumnsInitialOptions?.find(
|
|
159
|
-
(opt) => opt.value === currentColumnId
|
|
160
|
-
);
|
|
161
|
-
const isColumnExists = getValues()
|
|
162
|
-
?.filters?.map((filter) => filter?.column?.value)
|
|
163
|
-
?.includes(currentColumnId);
|
|
164
|
-
|
|
165
|
-
// set the column value such as make ,modal etc
|
|
166
|
-
if (!isColumnExists) {
|
|
167
|
-
columnField?.onChange?.(columnOption);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
// // Case where only one column is available
|
|
171
|
-
// if (filteredColumnsInitialOptions.length === 1 && !columnField.value) {
|
|
172
|
-
// columnField.onChange(filteredColumnsInitialOptions[0]);
|
|
173
|
-
// }
|
|
174
|
-
}, [filteredColumnsInitialOptions, currentColumnId]);
|
|
175
|
-
|
|
176
|
-
const handleClickOutside = (event) => {
|
|
177
|
-
if (
|
|
178
|
-
isColumnOptionsOpen ||
|
|
179
|
-
isThirdOptionDropdownOpen ||
|
|
180
|
-
(isOperationOptionsOpen &&
|
|
181
|
-
!event.target.closest(".ia-table-search-content-body"))
|
|
182
|
-
) {
|
|
183
|
-
setIsColumnOptionsOpen(false);
|
|
184
|
-
setIsThirdOptionDropdownOpen(false);
|
|
185
|
-
setIsOperationOptionsOpen(false);
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
useEffect(() => {
|
|
190
|
-
document.addEventListener("click", handleClickOutside);
|
|
191
|
-
return () => {
|
|
192
|
-
document.removeEventListener("click", handleClickOutside);
|
|
193
|
-
};
|
|
194
|
-
}, [isColumnOptionsOpen, isThirdOptionDropdownOpen, isOperationOptionsOpen]);
|
|
195
|
-
|
|
196
|
-
useEffect(() => {
|
|
197
|
-
if (
|
|
198
|
-
activeOption === "search" &&
|
|
199
|
-
!operationField.value &&
|
|
200
|
-
columnField?.value &&
|
|
201
|
-
currentOperationOptions.length > 0
|
|
202
|
-
) {
|
|
203
|
-
operationField.onChange({ label: "Contains", value: "contains" });
|
|
204
|
-
}
|
|
205
|
-
}, [columnField?.value, currentOperationOptions, activeOption]);
|
|
206
|
-
return (
|
|
207
|
-
<div className="ia-table-search-content-body">
|
|
208
|
-
<div style={{ display: "flex", flexDirection: "column", flex: 1 }}>
|
|
209
|
-
<Select
|
|
210
|
-
name={`filters.${formIndex}.column`}
|
|
211
|
-
placeholder="Select"
|
|
212
|
-
isOpen={isColumnOptionsOpen}
|
|
213
|
-
setIsOpen={(val) => {
|
|
214
|
-
setFlag(!flag);
|
|
215
|
-
setIsColumnOptionsOpen(val);
|
|
216
|
-
}}
|
|
217
|
-
currentOptions={currentFilteredColumnsInitialOptions}
|
|
218
|
-
setCurrentOptions={setCurrentFilteredColumnsInitialOptions}
|
|
219
|
-
selectedOptions={columnField?.value || null}
|
|
220
|
-
setSelectedOptions={(option) => {
|
|
221
|
-
const formValues = getValues();
|
|
222
|
-
|
|
223
|
-
// Find if the selected column is in a filter that is pending deletion.
|
|
224
|
-
const deletedFilter = fields.find((field, i) => {
|
|
225
|
-
const filterData = formValues.filters[i];
|
|
226
|
-
return (
|
|
227
|
-
pendingDeletions.includes(field.fieldId) &&
|
|
228
|
-
filterData?.column?.value === option.value
|
|
229
|
-
);
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
// If it is, remove it from the pending deletions list and remove the current row.
|
|
233
|
-
if (deletedFilter) {
|
|
234
|
-
setPendingDeletions((prev) =>
|
|
235
|
-
prev.filter((id) => id !== deletedFilter.fieldId)
|
|
236
|
-
);
|
|
237
|
-
remove(actualIndex);
|
|
238
|
-
return; // Stop processing to prevent the new row from being updated
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
const isDuplicate = isColumnSelectionDuplicate(
|
|
242
|
-
formValues,
|
|
243
|
-
option.value,
|
|
244
|
-
pendingDeletions,
|
|
245
|
-
setPendingDeletions,
|
|
246
|
-
fields
|
|
247
|
-
);
|
|
248
|
-
|
|
249
|
-
if (isDuplicate) {
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
setFlag(!flag);
|
|
254
|
-
columnField.onChange(option);
|
|
255
|
-
|
|
256
|
-
// ✅ Default to "Contains" for normal search mode
|
|
257
|
-
if (activeOption === "search") {
|
|
258
|
-
operationField.onChange({ label: "Contains", value: "contains" });
|
|
259
|
-
} else {
|
|
260
|
-
operationField.onChange(null);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
valueField.onChange("");
|
|
264
|
-
}}
|
|
265
|
-
onClick={(e) => {
|
|
266
|
-
e.preventDefault();
|
|
267
|
-
e.stopPropagation();
|
|
268
|
-
}}
|
|
269
|
-
initialOptions={filteredColumnsInitialOptions}
|
|
270
|
-
minWidth={activeOption !== "advanceSearch" ? 400 : undefined}
|
|
271
|
-
withPortal={true}
|
|
272
|
-
/>
|
|
273
|
-
</div>
|
|
274
|
-
{activeOption == "advanceSearch" && (
|
|
275
|
-
<div style={{ display: "flex", flexDirection: "column", flex: 1 }}>
|
|
276
|
-
<Select
|
|
277
|
-
name={`filters.${formIndex}.operation`}
|
|
278
|
-
placeholder="Select"
|
|
279
|
-
isOpen={isOperationOptionsOpen}
|
|
280
|
-
setIsOpen={(val) => {
|
|
281
|
-
setIsOperationOptionsOpen(val);
|
|
282
|
-
}}
|
|
283
|
-
currentOptions={currentOperationOptions}
|
|
284
|
-
setCurrentOptions={setCurrentOperationOptions}
|
|
285
|
-
selectedOptions={operationField?.value || null}
|
|
286
|
-
setSelectedOptions={(option) => {
|
|
287
|
-
operationField.onChange(option);
|
|
288
|
-
}}
|
|
289
|
-
initialOptions={currentOperationOptions}
|
|
290
|
-
disabled={!columnField.value}
|
|
291
|
-
onClick={(e) => {
|
|
292
|
-
e.preventDefault();
|
|
293
|
-
e.stopPropagation();
|
|
294
|
-
}}
|
|
295
|
-
withPortal={true}
|
|
296
|
-
isDisabled={!columnField.value}
|
|
297
|
-
/>
|
|
298
|
-
</div>
|
|
299
|
-
)}
|
|
300
|
-
<div style={{ display: "flex", flexDirection: "column", flex: 1 }}>
|
|
301
|
-
{currentColumnDef?.thirdOptionAsDropdown &&
|
|
302
|
-
currentThirdOptionDropdownOptions?.length > 0 ? (
|
|
303
|
-
<Select
|
|
304
|
-
name={`filters.${formIndex}.value`}
|
|
305
|
-
placeholder="Select value"
|
|
306
|
-
isOpen={isThirdOptionDropdownOpen}
|
|
307
|
-
setIsOpen={setIsThirdOptionDropdownOpen}
|
|
308
|
-
initialOptions={currentThirdOptionDropdownOptions}
|
|
309
|
-
currentOptions={currentThirdOptionDropdownOptions}
|
|
310
|
-
setCurrentOptions={setCurrentThirdOptionDropdownOptions}
|
|
311
|
-
selectedOptions={valueField?.value || null}
|
|
312
|
-
setSelectedOptions={(option) => {
|
|
313
|
-
// setSelectedThirdOptionDropdownValue(option);
|
|
314
|
-
valueField.onChange(option);
|
|
315
|
-
}}
|
|
316
|
-
minWidth={activeOption !== "advanceSearch" ? 344 : undefined}
|
|
317
|
-
withPortal={true}
|
|
318
|
-
onClick={(e) => {
|
|
319
|
-
e.preventDefault();
|
|
320
|
-
e.stopPropagation();
|
|
321
|
-
}}
|
|
322
|
-
isDisabled={!operationField.value}
|
|
323
|
-
/>
|
|
324
|
-
) : currentColumnDef?.thirdOptionAsDatePicker ? (
|
|
325
|
-
<DatePicker
|
|
326
|
-
selectedDate={
|
|
327
|
-
valueField?.value ? moment(valueField?.value) : undefined
|
|
328
|
-
}
|
|
329
|
-
setSelectedDate={(date) => {
|
|
330
|
-
valueField?.onChange(date);
|
|
331
|
-
}}
|
|
332
|
-
placeholder="Select date"
|
|
333
|
-
name={`filters.${formIndex}.value`}
|
|
334
|
-
isDisabled={!operationField?.value}
|
|
335
|
-
withPortal={true}
|
|
336
|
-
fullWidth
|
|
337
|
-
{...currentColumnDef?.thirdOptionAsDatePickerProps}
|
|
338
|
-
/>
|
|
339
|
-
) : currentColumnDef?.thirdOptionAsDateRangePicker ? (
|
|
340
|
-
<DateRangePicker
|
|
341
|
-
isDisabled={!operationField.value}
|
|
342
|
-
startDate={
|
|
343
|
-
valueField.value?.startDate ? valueField.value?.startDate : null
|
|
344
|
-
}
|
|
345
|
-
endDate={
|
|
346
|
-
valueField.value?.endDate ? valueField.value?.endDate : null
|
|
347
|
-
}
|
|
348
|
-
setStartDate={() => {}}
|
|
349
|
-
setEndDate={() => {}}
|
|
350
|
-
handleDatesChange={(startDate, endDate) => {
|
|
351
|
-
valueField.onChange({
|
|
352
|
-
startDate: startDate,
|
|
353
|
-
endDate: endDate,
|
|
354
|
-
});
|
|
355
|
-
}}
|
|
356
|
-
withPortal={true}
|
|
357
|
-
name={`filters.${formIndex}.value`}
|
|
358
|
-
fullWidth
|
|
359
|
-
{...currentColumnDef?.thirdOptionAsDateRangePickerProps}
|
|
360
|
-
/>
|
|
361
|
-
) : (
|
|
362
|
-
<Input
|
|
363
|
-
placeholder="Enter text"
|
|
364
|
-
name={`filters.${formIndex}.value`}
|
|
365
|
-
value={valueField?.value || ""}
|
|
366
|
-
onChange={(e) => {
|
|
367
|
-
valueField.onChange(e.target.value);
|
|
368
|
-
}}
|
|
369
|
-
isDisabled={
|
|
370
|
-
activeOption == "advanceSearch" && !operationField.value
|
|
371
|
-
}
|
|
372
|
-
/>
|
|
373
|
-
)}
|
|
374
|
-
</div>
|
|
375
|
-
<Button
|
|
376
|
-
variant="tertiary"
|
|
377
|
-
size="large"
|
|
378
|
-
onClick={(e) => {
|
|
379
|
-
e.preventDefault();
|
|
380
|
-
e.stopPropagation();
|
|
381
|
-
onDelete();
|
|
382
|
-
}}
|
|
383
|
-
type="button"
|
|
384
|
-
disabled={isLastVisible}
|
|
385
|
-
>
|
|
386
|
-
<DeleteOutlineOutlinedIcon />
|
|
387
|
-
</Button>
|
|
388
|
-
</div>
|
|
389
|
-
);
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
export default AdvanceSearchModalItem;
|