Skip to content

Commit

Permalink
quick
Browse files Browse the repository at this point in the history
  • Loading branch information
NotChristianGarcia committed Aug 21, 2024
1 parent 691932b commit 3c99a72
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const VisualAnalytics: Component = ({ accessToken }) => {
{accessToken ? (
<iframe
style={{ flexGrow: 1, border: 'none' }}
src={`https://vaapibackenddev.pods.icicle.tapis.io/tapisui-entry?jwt=${accessToken}`}
src={'https://vadash.pods.icicleai.tapis.io/'}
//src={`https://vaapibackenddev.pods.icicle.tapis.io/tapisui-entry?jwt=${accessToken}`}
/>
) : (
<>Invalid JWT. Log out of TapisUI then log back in</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,15 @@ const DescriptionListValue = ({ value }) => {
return <>{JSON.stringify(value)}</>;
};

const DescriptionList = ({ className, data, density, direction }) => {
const DescriptionList = ({
className = '',
data,
density = DEFAULT_DENSITY,
direction = DEFAULT_DIRECTION,
}) => {
const modifierClasses = [];
modifierClasses.push(DENSITY_CLASS_MAP[density || DEFAULT_DENSITY]);
modifierClasses.push(DIRECTION_CLASS_MAP[direction || DEFAULT_DIRECTION]);
modifierClasses.push(DENSITY_CLASS_MAP[density]);
modifierClasses.push(DIRECTION_CLASS_MAP[direction]);
const containerStyleNames = ['container', ...modifierClasses]
.map((name) => styles[name])
.join(' ');
Expand Down Expand Up @@ -103,10 +108,5 @@ DescriptionList.propTypes = {
/** Layout direction */
direction: PropTypes.oneOf(DIRECTIONS),
};
DescriptionList.defaultProps = {
className: '',
density: DEFAULT_DENSITY,
direction: DEFAULT_DIRECTION,
};

export default DescriptionList;
6 changes: 1 addition & 5 deletions packages/tapisui-common/src/ui/Icon/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import './Icon.module.css';

const Icon = ({ children, className, name }) => {
const Icon = ({ children = '', className = '', name }) => {
const iconClassName = `icon icon-${name}`;
// FAQ: The conditional avoids an extra space in class attribute value
const fullClassName = className
Expand All @@ -20,9 +20,5 @@ Icon.propTypes = {
/** Name of icon from icon font (without the (`icon-` prefix) */
name: PropTypes.string.isRequired,
};
Icon.defaultProps = {
children: '',
className: '',
};

export default Icon;
15 changes: 4 additions & 11 deletions packages/tapisui-common/src/ui/SectionHeader/SectionHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ import styles from './SectionHeader.module.css';
* </SectionHeader>
*/
function SectionHeader({
actions,
actions = '',
children,
className,
isForForm,
isForTable,
className = '',
isForForm = false,
isForTable = false,
}) {
let styleName = '';
const styleNameList = [styles['root']];
Expand Down Expand Up @@ -82,12 +82,5 @@ SectionHeader.propTypes = {
/** Whether this header is for a table */
isForTable: PropTypes.bool,
};
SectionHeader.defaultProps = {
actions: '',
className: '',
children: '',
isForForm: false,
isForTable: false,
};

export default SectionHeader;
2 changes: 1 addition & 1 deletion src/app/Files/_Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { SystemsNav } from '../_components';
import { Router } from '../_Router';
import Toolbar from '../_components/Toolbar';
import { useLocation } from 'react-router';
import { useLocation } from 'react-router-dom';
import { breadcrumbsFromPathname } from '@tapis/tapisui-common';
import styles from './Layout.module.scss';
import { FilesProvider } from '../_components/FilesContext';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FileListingTable } from '@tapis/tapisui-common';
import { FileOperationStatus } from '../_components';
import { FileExplorer } from '@tapis/tapisui-common';
import { ToolbarModalProps } from '../Toolbar';
import { useLocation } from 'react-router';
import { useLocation } from 'react-router-dom';
import { focusManager } from 'react-query';
import { Files as Hooks } from '@tapis/tapisui-hooks';
import { Files } from '@tapis/tapis-typescript';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { breadcrumbsFromPathname } from '@tapis/tapisui-common';
import { FileListingTable } from '@tapis/tapisui-common';
import { FileExplorer } from '@tapis/tapisui-common';
import { ToolbarModalProps } from '../Toolbar';
import { useLocation } from 'react-router';
import { useLocation } from 'react-router-dom';
import { Files } from '@tapis/tapis-typescript';
import styles from './TransferModal.module.scss';
import { useFilesSelect } from '../../FilesContext';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useCallback } from 'react';
import { Workflows } from '@tapis/tapis-typescript';
import { Workflows as Hooks } from '@tapis/tapisui-hooks';
import {
Button,
Dialog,
DialogActions,
DialogContent,
Expand All @@ -10,7 +11,6 @@ import {
AlertTitle,
} from '@mui/material';
import { LoadingButton } from '@mui/lab';
import { Button } from '@mui/material';
import * as Yup from 'yup';
import { Form, Formik, FieldArray } from 'formik';
import { FormikInput, SectionHeader } from '@tapis/tapisui-common';
Expand Down
7 changes: 5 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es6",
"lib": ["dom", "dom.iterable", "es6"],
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
// "lib": ["es6", "dom"],
"noImplicitAny": true,
"noImplicitThis": true,
Expand All @@ -21,6 +21,9 @@
"jsx": "react-jsx",
"baseUrl": "src",
"types": ["vite/client"]
// "useDefineForClassFields": true,
// "noUnusedLocals": true,
// "noUnusedParameters": true,
},
"include": ["src"],
"exclude": ["packages"]
Expand Down
27 changes: 23 additions & 4 deletions vite/vite.local.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import commonjs from '@rollup/plugin-commonjs';
import viteCommonjs from 'vite-plugin-commonjs';
import babel from '@rollup/plugin-babel';
import { visualizer } from 'rollup-plugin-visualizer';
// import vitePluginRequire from "vite-plugin-require";

export default defineConfig({
// depending on your application, base can also be "/"
Expand All @@ -15,6 +16,7 @@ export default defineConfig({
define: {
'process.platform': null,
'process.version': null,
// 'process.env.NODE_ENV': 'production',
},
},
css: { preprocessorOptions: { scss: { charset: false } } },
Expand All @@ -29,8 +31,25 @@ export default defineConfig({
plugins: [
react(),
commonjs({
include: /node_modules\/@uiw\/react-codemirror/, // Ensure CommonJS transformation for node_modules
// requireReturnsDefault: 'auto', // Handle default exports correctly
include: [
/node_modules\/@uiw\/react-codemirror/, // Ensure CommonJS transformation for node_modules
/node_modules\/react-table/, // Include react-table for CommonJS transformation
/node_modules\/react/,
/node_modules\/react-dom/,
/node_modules\/react-router/,
/node_modules\/scheduler/,
/node_modules\/react-is/,
/node_modules\/hoist-non-react-statics/,
/node_modules\/tiny-invariant/,
/packages\/tapisui-common\/node_modules\/react-table/,
/packages\/tapisui-common\/node_modules\/hoist-non-react-statics/,
/packages\/tapisui-common\/node_modules\/react-router/,
/packages\/tapisui-common\/node_modules\/react-is/,
/packages\/icicle-tapisui-extension\/node_modules\/react-is/,
],
requireReturnsDefault: false, // "preferred" | "auto" | true | false
strictRequires: 'debug',
//esmExternals: ["react-table"], // Convert CommonJS modules to ESModule
}),
// viteCommonjs(),
viteTsconfigPaths(),
Expand All @@ -42,8 +61,8 @@ export default defineConfig({
}),
],
build: {
minify: false,
sourcemap: false,
minify: true,
sourcemap: true,
outDir: 'dist',
manifest: true,
rollupOptions: {
Expand Down

0 comments on commit 3c99a72

Please sign in to comment.