Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
778d3ea
chore: Generalize user preferences as per resource kind
shivani170 Jun 19, 2025
dd3130a
chore: resource kind pass dynamically in payload
shivani170 Jun 19, 2025
a57ec47
chore: getUserPreferences props passed
shivani170 Jun 19, 2025
67af0c3
feat: refactor ActionMenuItem and add TrailingItem component for impr…
AbhishekA1509 Jun 23, 2025
0c20da6
feat: add base structure for TreeView
AbhishekA1509 Jun 23, 2025
3d9334e
chore: version bump to 1.15.3-beta-3
shivani170 Jun 24, 2025
51576c9
chore: context switcher moved here
shivani170 Jun 24, 2025
92672b0
chore: recently visited apps & fetch from useUserPreferences
shivani170 Jun 24, 2025
f6c28c1
chore: handling error & reload in context switcher
shivani170 Jun 25, 2025
73acec4
fix: css alignment for dividers
AbhishekA1509 Jun 25, 2025
739b759
feat: make variant prop optional in TrailingItemProps and improve Tre…
AbhishekA1509 Jun 25, 2025
6d0a506
chore: getParsedResourcesMap code refactoring
shivani170 Jun 25, 2025
ad82427
chore: classNamePrefix support added
shivani170 Jun 25, 2025
8fc790b
chore: removed resource kind spreading from update resource
shivani170 Jun 26, 2025
439a4c6
feat: add mode prop to TreeViewProps for navigation and form modes, a…
AbhishekA1509 Jun 26, 2025
5319e27
chore: payload fixes
shivani170 Jun 26, 2025
d41abb6
chore: getParsedResourcesMap fixes
shivani170 Jun 26, 2025
7d0451f
feat(icons): add new SVG icons for activity, folder, and namespace
RohitRaj011 Jun 27, 2025
3650e05
feat: GroupedFilterSelectPicker - create component
RohitRaj011 Jun 27, 2025
5eba693
feat: update TreeViewProps to support optional depth, flatNodeList, a…
AbhishekA1509 Jun 27, 2025
15b51d5
feat(SelectPicker): add autoFocus prop and remove focusOnMount; updat…
RohitRaj011 Jun 27, 2025
9367515
feat: enhance TreeView component with selected state styling and refa…
AbhishekA1509 Jun 27, 2025
d9e264c
feat: add FEATURE_GROUPED_APP_LIST_FILTERS_ENABLE to customEnv interface
RohitRaj011 Jun 27, 2025
4be78b7
feat: refactor Tooltip component and introduce TreeViewNodeContent fo…
AbhishekA1509 Jun 30, 2025
4af95be
refactor: remove ShortcutKeyBadge component and update usage in Group…
RohitRaj011 Jun 30, 2025
d0fc33f
feat: integrate framer-motion for animated transitions in TreeView co…
AbhishekA1509 Jun 30, 2025
7db4a2d
feat: copilot review
AbhishekA1509 Jun 30, 2025
6aa852b
feat: add click handlers for TreeView node items to manage button and…
AbhishekA1509 Jun 30, 2025
029324c
feat: update TreeView and related components to support selection sta…
AbhishekA1509 Jul 1, 2025
fa6b56e
feat: enhance Sidebar component to support TreeView structure and add…
AbhishekA1509 Jul 1, 2025
6445985
feat: refactor TreeView component to support uncontrolled mode and up…
AbhishekA1509 Jul 1, 2025
374c90c
Merge branch 'develop' into feat/app-switcher
shivani170 Jul 1, 2025
1df23b8
Merge branch 'fix/rb-table' of https://github.com/devtron-labs/devtro…
AbhishekA1509 Jul 1, 2025
8c09454
chore: locally saved user preferences payload
shivani170 Jul 1, 2025
6ebd364
chore: undefined user preferences handling
shivani170 Jul 1, 2025
4e9118d
feat: add variant support to TreeView for customizable background and…
AbhishekA1509 Jul 1, 2025
e9355d7
feat: add scroll to selected item functionality in TreeView component
AbhishekA1509 Jul 2, 2025
6cb2706
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
AbhishekA1509 Jul 2, 2025
5e6c67d
feat: add defaultExpandedMap prop to TreeView and update state initia…
AbhishekA1509 Jul 2, 2025
d31006e
feat: remove isExpanded property from K8SObjectBaseType interface
AbhishekA1509 Jul 2, 2025
443d6e4
feat: add generic support for DataAttributeType in TreeView component…
AbhishekA1509 Jul 3, 2025
494c363
Merge branch 'release-candidate-v0.39.0' of https://github.com/devtro…
AbhishekA1509 Jul 3, 2025
f5469f0
feat: enhance TreeView component with controlled state management and…
AbhishekA1509 Jul 3, 2025
8ee4444
feat: add ic-list-bullets icon and update PageHeader to conditionally…
RohitRaj011 Jul 2, 2025
8e755dd
feat: add PortalContainer component for rendering portals in the DOM
RohitRaj011 Jul 3, 2025
6828992
feat: add generate-illustration script
RohitRaj011 Jul 3, 2025
b0c0f3a
feat: add new illustrations
RohitRaj011 Jul 3, 2025
feb81cb
feat: add illustration support to GenericEmptyState component
RohitRaj011 Jul 3, 2025
675159f
chore: rename illustrations
RohitRaj011 Jul 3, 2025
841056a
fix: handle undefined dataAttributes in TreeView component to prevent…
AbhishekA1509 Jul 3, 2025
4b439de
feat: enhance TreeView component with improved type definitions and r…
AbhishekA1509 Jul 4, 2025
761fc26
fix: simplify useEffect condition for setting expanded map in TreeVie…
AbhishekA1509 Jul 4, 2025
4c80864
chore: update version to 1.17.0-pre-0 in package.json and package-loc…
AbhishekA1509 Jul 7, 2025
45d359c
Merge pull request #811 from devtron-labs/chore/dt-39-sync
AbhishekA1509 Jul 7, 2025
7bdc0ea
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
AbhishekA1509 Jul 8, 2025
0064ac7
fix: review comments
AbhishekA1509 Jul 8, 2025
91c2822
feat: add getVisibleNodes utility function and update TreeView to use it
AbhishekA1509 Jul 8, 2025
2ffe4a9
refactor: rename illustrationName to imgName in GenericEmptyState and…
RohitRaj011 Jul 8, 2025
d8f12cf
feat: Table component - add generic typings & missing props
RohitRaj011 Jul 9, 2025
93b1fec
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Jul 9, 2025
7a94bad
chore(version): bump to 1.17.0-pre-1
RohitRaj011 Jul 9, 2025
c3a0504
Merge branch 'develop' into feat/app-switcher
shivani170 Jul 9, 2025
69219a8
chore: version bump
shivani170 Jul 9, 2025
eaa1276
chore: version bump
shivani170 Jul 9, 2025
a692030
Merge pull request #802 from devtron-labs/feat/grouped-filter-select-…
RohitRaj011 Jul 9, 2025
1527d94
chore: version bump
shivani170 Jul 9, 2025
041a2be
feat: use select picker in RJSF
Elessar1802 Jul 9, 2025
296da56
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
Elessar1802 Jul 9, 2025
a4fb38a
chore: bump version
Elessar1802 Jul 9, 2025
aef5946
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Jul 10, 2025
32617c6
feat: add ESLint rule for IllustrationBase component usage
RohitRaj011 Jul 10, 2025
c2aced3
feat: add support for placeholder field (string|number)
Elessar1802 Jul 10, 2025
3e284ef
chore: bump version
Elessar1802 Jul 10, 2025
811eb9e
feat: add displayYouLabelForCurrentUser prop to UserIdentifier component
RohitRaj011 Jul 10, 2025
f554d9c
Merge branch 'develop' of https://github.com/devtron-labs/devtron-fe-…
AbhishekA1509 Jul 10, 2025
b4445cd
chore(version): bump version to 1.17.0-pre-4 in package.json and pack…
AbhishekA1509 Jul 10, 2025
96e5977
Merge pull request #803 from devtron-labs/feat/tree-view
AbhishekA1509 Jul 10, 2025
6aae7a2
chore(version): bump version to 1.17.0-pre-5 in package.json and pack…
AbhishekA1509 Jul 10, 2025
dbe4733
Merge pull request #816 from devtron-labs/fix/package-version
AbhishekA1509 Jul 10, 2025
eb2dc9e
chore: version bump
shivani170 Jul 10, 2025
9bc78ff
chore: version bump
shivani170 Jul 10, 2025
f849655
Merge branch 'develop' into feat/chart-group-card
shivani170 Jul 10, 2025
aa3431a
Merge pull request #813 from devtron-labs/feat/chart-group-card
shivani170 Jul 10, 2025
9508ffd
feat: improve illustration component import naming and accessibility,…
RohitRaj011 Jul 11, 2025
5d9902d
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Jul 11, 2025
1f4767c
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
Elessar1802 Jul 11, 2025
48a3356
Merge pull request #814 from devtron-labs/feat/rjsf-select-picker
Elessar1802 Jul 11, 2025
f2dbd04
chore: remove unneeded lastActiveTabId
Elessar1802 Jul 11, 2025
0bcab69
Merge branch 'develop' into feat/app-switcher
shivani170 Jul 11, 2025
4ebd1d9
Merge branch 'develop' into fix/use-tabs
Elessar1802 Jul 11, 2025
8a20746
chore: version bump && utm url push
shivani170 Jul 11, 2025
cc49946
feat: add date comparator function for sorting by date
RohitRaj011 Jul 11, 2025
8b3b289
feat: implement useIsSecureConnection hook and integrate it into DocL…
RohitRaj011 Jul 11, 2025
4fc11b3
chore: bump version
Elessar1802 Jul 11, 2025
c7e0559
chore: removed duplicate line
shivani170 Jul 14, 2025
d12dcb1
chore: version bump
shivani170 Jul 14, 2025
63d55c9
Merge pull request #793 from devtron-labs/feat/app-switcher
shivani170 Jul 14, 2025
db7cba2
chore(version): bump to 1.17.0-beta-8
RohitRaj011 Jul 14, 2025
f667501
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Jul 14, 2025
c1d3460
chore(version): bump to 1.17.0-beta-9
RohitRaj011 Jul 14, 2025
99d8a85
chore: added utm to action menu href
shivani170 Jul 15, 2025
2195161
chore: code refactoring
shivani170 Jul 15, 2025
5b471c9
Merge branch 'main' of https://github.com/devtron-labs/devtron-fe-com…
arunjaindev Jul 15, 2025
85df074
Merge pull request #821 from devtron-labs/chore/sync-explain-fix
arunjaindev Jul 15, 2025
858529f
chore: update common-lib version
Elessar1802 Jul 15, 2025
2df774c
Merge pull request #818 from devtron-labs/fix/use-tabs
Elessar1802 Jul 15, 2025
a95c77e
Merge branch 'develop' of github.com:devtron-labs/devtron-fe-common-l…
RohitRaj011 Jul 15, 2025
1639cad
chore(version): bump to 1.17.0-pre-12
RohitRaj011 Jul 15, 2025
3564a41
Merge pull request #815 from devtron-labs/feat/revamp-chart-store-det…
RohitRaj011 Jul 15, 2025
0ee7687
Merge branch 'develop' into chore/action-menu
shivani170 Jul 15, 2025
467f93e
Merge pull request #820 from devtron-labs/chore/action-menu
shivani170 Jul 16, 2025
81998ce
chore(version): bump to 1.18.0
RohitRaj011 Jul 18, 2025
d16dee3
Merge pull request #825 from devtron-labs/rc-merge/v0.40.0
RohitRaj011 Jul 18, 2025
bf45e48
chore: error layout fix
shivani170 Jul 18, 2025
322af73
chore: util revert
shivani170 Jul 18, 2025
93f9b58
chore: navlink import
shivani170 Jul 18, 2025
1fb2683
chore: css fixes
shivani170 Jul 18, 2025
2ec77a7
chore: css fixes
shivani170 Jul 18, 2025
f3ee1f2
chore: Navlink added to header
shivani170 Jul 18, 2025
fb8646e
chore: css fixes
shivani170 Jul 18, 2025
3a8146b
chore: css fixes
shivani170 Jul 18, 2025
67284b6
chore: text replaced with Check Permission
shivani170 Jul 18, 2025
4f49b53
Merge pull request #829 from devtron-labs/fix/image-pull-message
shivani170 Jul 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ src/Common/PopupMenu.tsx
src/Common/Progressing.tsx
src/Common/RJSF/config.ts
src/Common/RJSF/templates/ArrayFieldTemplate.tsx
src/Common/RJSF/templates/BaseInput.tsx
src/Common/RJSF/templates/ButtonTemplates/AddButton.tsx
src/Common/RJSF/templates/ButtonTemplates/RemoveButton.tsx
src/Common/RJSF/templates/ButtonTemplates/SubmitButton.tsx
Expand Down
4 changes: 4 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ module.exports = {
group: ['IconBase'],
message: 'Please use "Icon" component instead.',
},
{
group: ['IllustrationBase'],
message: 'Please use "Illustration" component instead.',
},
],
},
],
Expand Down
21 changes: 19 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
echo "Running pre-commit hook..."

# Check for changes in the Icon folder
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E 'IconV2/|generate-icon.cjs' || true)
ICON_CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E 'IconV2/|generate-icon.cjs' || true)

if [ -n "$CHANGED_FILES" ]; then
if [ -n "$ICON_CHANGED_FILES" ]; then
echo "Changes detected in the Icon folder or icon generation script. Running icon generation script..."

if ! npm run generate-icon; then
Expand All @@ -36,6 +36,23 @@ else
echo "No changes in the IconsV2 folder. Skipping icon generation."
fi

# Check for changes in the Illustration folder
ILLUSTRATION_CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E 'Illustration/|generate-illustration.cjs' || true)

if [ -n "$ILLUSTRATION_CHANGED_FILES" ]; then
echo "Changes detected in the Illustration folder or illustration generation script. Running illustration generation script..."

if ! npm run generate-illustration; then
echo "Error: Illustration generation script failed."
exit 1
fi

echo "Illustration.tsx updated. Adding to commit."
git add src/Shared/Components/Illustration/Illustration.tsx
else
echo "No changes in the Illustration folder. Skipping illustration generation."
fi

# TypeScript check
if ! npx tsc --noEmit; then
echo "Error: TypeScript check failed."
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "1.17.1",
"version": "1.18.0",
"description": "Supporting common component library",
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -33,7 +33,8 @@
"preview": "vite preview",
"lint-staged": "lint-staged",
"postinstall": "patch-package",
"generate-icon": "node ./scripts/generate-icon.cjs"
"generate-icon": "node ./scripts/generate-icon.cjs",
"generate-illustration": "node ./scripts/generate-illustration.cjs"
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
Expand Down
104 changes: 104 additions & 0 deletions scripts/generate-illustration.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
const fs = require('fs')
const path = require('path')
const { execFile } = require('child_process')

// Base path relative to the current script
const basePath = path.resolve(__dirname, '../src')

// Directory containing SVG, Webp illustrations and the output file
const illustrationsDir = path.join(basePath, 'Assets', 'Illustration')
const outputFile = path.join(basePath, 'Shared', 'Components', 'Illustration', 'Illustration.tsx')

const runESLint = (filePath) => {
execFile('npx', ['eslint', filePath, '--fix'], (error, stdout, stderr) => {
if (error) {
console.error(`Error running ESLint: ${error.message}`)
return
}
if (stderr) {
console.error(`ESLint stderr: ${stderr}`)
}
if (stdout) {
console.log(`ESLint output:\n${stdout}`)
}
console.log('ESLint completed successfully.')
})
}

const generateIllustrationComponent = () => {
// Read all files in the illustrations directory
const files = fs.readdirSync(illustrationsDir)

// Filter for SVG files
const svgFiles = files.filter((file) => file.endsWith('.svg'))
// Filter for WEBP files
const webpFiles = files.filter((file) => file.endsWith('.webp'))

// Generate import statements and the illustration map
const imports = []
const illustrationMapEntries = []

svgFiles.forEach((file) => {
// Remove the .svg extension
const illustrationName = path.basename(file, '.svg')
// Convert illustration-name to IllustrationName for importName
const importName = illustrationName
.split('-')
.map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))
.join('')
// Push imports statement
imports.push(`import { ReactComponent as ${importName} } from '@Illustrations/${file}'`)
// Push illustrations to illustrationMap
illustrationMapEntries.push(`["${illustrationName}"]: ${importName},`)
})

webpFiles.forEach((file) => {
// Remove the .webp extension
const illustrationName = path.basename(file, '.webp')
// Convert illustration-name to IllustrationName for importName
const importName = illustrationName.replace(/(^\w|-\w)/g, (match) => match.replace('-', '').toUpperCase())
// Push imports statement
imports.push(`import ${importName} from '@Illustrations/${file}'`)
// Push illustrations to illustrationMap
illustrationMapEntries.push(`["${illustrationName}"]: ${importName},`)
})

// Generate the Illustration.tsx content
const content = `
// NOTE: This file is auto-generated. Do not edit directly. Run the script \`npm run generate-illustration\` to update.

${imports.join('\n')}

// eslint-disable-next-line no-restricted-imports
import { IllustrationBase } from './IllustrationBase';
import { IllustrationBaseProps } from './types';

export const illustrationMap = {
${illustrationMapEntries.join('\n')}
};

export type IllustrationName = keyof typeof illustrationMap;

export interface IllustrationProps extends Omit<IllustrationBaseProps, 'name' | 'illustrationMap'> {
/**
* The name of the illustration to render.
* @note The component will return either an img component or an SVG component based on the type of illustration (.svg, .webp)
*/
name: keyof typeof illustrationMap;
}

export const Illustration = (props: IllustrationProps) => {
return <IllustrationBase {...props} illustrationMap={illustrationMap} />;
};
`

// Write the content to the Illustration.tsx file
fs.writeFileSync(outputFile, content.trim(), 'utf-8')
console.log(`Illustration component file generated at: ${outputFile}`)

// Run ESLint on the generated file
runESLint(outputFile)
}

// Run the script
generateIllustrationComponent()
3 changes: 3 additions & 0 deletions src/Assets/IconV2/ic-activity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/Assets/IconV2/ic-folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/Assets/IconV2/ic-helm-app.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/Assets/IconV2/ic-list-bullets.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/Assets/IconV2/ic-namespace.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/Illustration/img-code.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/Assets/Illustration/img-no-result.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 18 additions & 2 deletions src/Common/EmptyState/GenericEmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

import { Illustration } from '@Shared/Components'

import AppNotDeployed from '../../Assets/Img/app-not-deployed.svg'
import { GenericEmptyStateType, ImageType } from '../Types'

Expand All @@ -35,6 +37,7 @@ const GenericEmptyState = ({
layout = 'column',
contentClassName = '',
imageStyles = {},
imgName,
}: GenericEmptyStateType): JSX.Element => {
const isRowLayout = layout === 'row'

Expand All @@ -54,7 +57,20 @@ const GenericEmptyState = ({
data-testid="generic-empty-state"
>
{!SvgImage ? (
!noImage && (
!noImage &&
(imgName ? (
<Illustration
name={imgName}
imageProps={{
alt: 'empty-state',
style: {
width: `${getImageSize().width}`,
height: `${getImageSize().height}`,
...imageStyles,
},
}}
/>
) : (
<img
className={imageClassName || ''}
src={image || AppNotDeployed}
Expand All @@ -65,7 +81,7 @@ const GenericEmptyState = ({
}}
alt="empty-state"
/>
)
))
) : (
<SvgImage
style={{
Expand Down
3 changes: 1 addition & 2 deletions src/Common/EmptyState/GenericFilterEmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

import noResult from '@Images/empty-noresult@2x.png'
import { Button, ButtonVariantType } from '@Shared/Components'
import { ComponentSizeType } from '@Shared/constants'

Expand Down Expand Up @@ -44,7 +43,7 @@ const GenericFilterEmptyState = ({

return (
<GenericEmptyState
image={noResult}
imgName="img-no-result"
title="No results"
subTitle="We couldn’t find any matching results"
{...props}
Expand Down
26 changes: 26 additions & 0 deletions src/Common/Hooks/UseIsTextTruncated/UseIsTextTruncated.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useState } from 'react'

import { SUB_PIXEL_ERROR } from './constants'

const useIsTextTruncated = () => {
const [isTextTruncated, setIsTextTruncated] = useState(false)

const handleMouseEnterEvent: React.MouseEventHandler = (event) => {
const { currentTarget: node } = event
const isTextOverflowing =
node.scrollWidth > node.clientWidth + SUB_PIXEL_ERROR ||
node.scrollHeight > node.clientHeight + SUB_PIXEL_ERROR
if (isTextOverflowing && !isTextTruncated) {
setIsTextTruncated(true)
} else if (!isTextOverflowing && isTextTruncated) {
setIsTextTruncated(false)
}
}

return {
isTextTruncated,
handleMouseEnterEvent,
}
}

export default useIsTextTruncated
1 change: 1 addition & 0 deletions src/Common/Hooks/UseIsTextTruncated/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const SUB_PIXEL_ERROR = 1
1 change: 1 addition & 0 deletions src/Common/Hooks/UseIsTextTruncated/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as useIsTextTruncated } from './UseIsTextTruncated'
1 change: 1 addition & 0 deletions src/Common/Hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

export { useClickOutside } from './UseClickOutside/UseClickOutside'
export { useGetUserRoles } from './UseGetUserRoles'
export { useIsTextTruncated } from './UseIsTextTruncated'
export * from './UseRegisterShortcut'
export * from './useStateFilters'
export * from './useUrlFilters'
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Modals/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const Modal = ({

function disableWheel(e) {
if (!preventWheelDisable) {
if (innerRef?.current.contains(e.target)) {
if (innerRef.current?.contains(e.target)) {
if (innerRef.current.clientHeight === innerRef.current.scrollHeight) {
e.preventDefault()
}
Expand Down
51 changes: 28 additions & 23 deletions src/Common/RJSF/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import RJSF from '@rjsf/core'
import { SCHEMA_07_VALIDATOR } from '@Shared/validations'

import { templates, widgets } from './config'
import { RJSF_FORM_SELECT_PORTAL_TARGET_ID } from './constants'
import { FormProps } from './types'
import {
getFormStateFromFormData,
Expand Down Expand Up @@ -82,28 +83,32 @@ export const RJSFForm = forwardRef((props: FormProps, ref: FormProps['ref']) =>
}

return (
<Form
noHtml5Validate
showErrorList={false}
autoComplete="off"
{...props}
formData={formState}
{...(isUpdatePathKeywordPresent
? {
onChange: handleOnChange,
onSubmit: handleOnSubmit,
}
: {})}
className={`rjsf-form-template__container ${props.className || ''}`}
validator={validator}
templates={{
...templates,
...props.templates,
}}
formContext={formState}
widgets={{ ...widgets, ...props.widgets }}
translateString={translateString}
ref={ref}
/>
<>
<Form
noHtml5Validate
showErrorList={false}
autoComplete="off"
{...props}
formData={formState}
{...(isUpdatePathKeywordPresent
? {
onChange: handleOnChange,
onSubmit: handleOnSubmit,
}
: {})}
className={`rjsf-form-template__container ${props.className || ''}`}
validator={validator}
templates={{
...templates,
...props.templates,
}}
formContext={formState}
widgets={{ ...widgets, ...props.widgets }}
translateString={translateString}
ref={ref}
/>
{/* NOTE: due to stacking context issues, we send this id to SelectPicker menuPortalTarget prop */}
<div id={RJSF_FORM_SELECT_PORTAL_TARGET_ID} />
</>
)
})
Loading
Loading