minor: update webpack config to resolve reactdatagrid css (#18143)

* minor: update webpack config to resolve reactdatagrid css

* fix the removeOuterEscapes method missing

---------

Co-authored-by: Ashish Gupta <ashish@getcollate.io>
This commit is contained in:
Sachin Chaurasiya 2024-10-07 16:54:21 +05:30 committed by GitHub
parent dd6c0b700f
commit ce298c5803
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 1 deletions

View File

@ -53,7 +53,10 @@ import {
LOCALSTORAGE_RECENTLY_VIEWED,
} from '../constants/constants';
import { FEED_COUNT_INITIAL_DATA } from '../constants/entity.constants';
import { UrlEntityCharRegEx } from '../constants/regex.constants';
import {
UrlEntityCharRegEx,
VALIDATE_ESCAPE_START_END_REGEX,
} from '../constants/regex.constants';
import { SIZE } from '../enums/common.enum';
import { EntityType, FqnPart } from '../enums/entity.enum';
import { PipelineType } from '../generated/entity/services/ingestionPipelines/ingestionPipeline';
@ -918,3 +921,11 @@ export const filterSelectOptions = (
toLower(option?.value).includes(toLower(input))
);
};
export const removeOuterEscapes = (input: string) => {
// Use regex to check if the string starts and ends with escape characters
const match = input.match(VALIDATE_ESCAPE_START_END_REGEX);
// Return the middle part without the outer escape characters or the original input if no match
return match && match.length > 3 ? match[2] : input;
};

View File

@ -98,6 +98,10 @@ module.exports = {
path.resolve(__dirname, 'node_modules/katex'),
path.resolve(__dirname, 'node_modules/react-resizable'),
path.resolve(__dirname, 'node_modules/react-antd-column-resize'),
path.resolve(
__dirname,
'node_modules/@inovua/reactdatagrid-community'
),
],
// May need to handle files outside the source code
// (from node_modules)

View File

@ -99,6 +99,10 @@ module.exports = {
path.resolve(__dirname, 'node_modules/katex'),
path.resolve(__dirname, 'node_modules/react-resizable'),
path.resolve(__dirname, 'node_modules/react-antd-column-resize'),
path.resolve(
__dirname,
'node_modules/@inovua/reactdatagrid-community'
),
],
// May need to handle files outside the source code
// (from node_modules)