Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/shridhar-tl/jira-assistant
Browse files Browse the repository at this point in the history
… into package
  • Loading branch information
shridhar-tl committed Dec 19, 2024
2 parents 174dded + b6cc637 commit d148bc3
Show file tree
Hide file tree
Showing 46 changed files with 369 additions and 712 deletions.
3 changes: 0 additions & 3 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"compilerOptions": {
"baseUrl": "./",
"paths": {
"js-report-builder/*": [
"./node_modules/js-report-builder/src/lib/*"
],
"react-controls/*": [
"./node_modules/react-controls/src/*"
],
Expand Down
36 changes: 17 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
}
},
"dependencies": {
"@forge/api": "^4.1.0",
"@forge/bridge": "^4.1.0",
"@forge/resolver": "^1.5.32",
"@fortawesome/fontawesome-free": "6.5.2",
"@forge/api": "^4.1.2",
"@forge/bridge": "^4.2.0",
"@forge/resolver": "^1.6.3",
"@fortawesome/fontawesome-free": "6.7.2",
"@fullcalendar/core": "6.1.15",
"@fullcalendar/daygrid": "6.1.15",
"@fullcalendar/interaction": "6.1.15",
Expand All @@ -64,45 +64,43 @@
"@fullcalendar/timegrid": "6.1.15",
"bootstrap": "5.3.3",
"bootstrap-daterangepicker": "3.1.0",
"chart.js": "4.4.3",
"chart.js": "4.4.7",
"classnames": "2.5.1",
"dexie": "4.0.4",
"espree": "9.6.1",
"dexie": "4.0.10",
"espree": "10.3.0",
"exceljs": "4.4.0",
"firebase": "10.12.0",
"firebase": "11.1.0",
"jquery": "3.7.1",
"js-sql-parser": "1.6.0",
"jsd-report": "0.1.11",
"jspdf": "github:shridhar-tl/jsPDF",
"jspdf-autotable": "3.8.2",
"moment": "2.30.1",
"moment-timezone": "0.5.45",
"papaparse": "5.4.1",
"patternomaly": "1.3.2",
"primeflex": "3.3.1",
"primeicons": "6.0.1",
"primereact": "9.6.4",
"primeicons": "7.0.0",
"primereact": "10.8.5",
"queue": "7.0.0",
"rc-time-picker": "3.7.3",
"react": "18.3.1",
"react-bootstrap-daterangepicker": "8.0.0",
"react-controls": "github:shridhar-tl/react-controls",
"react-dnd": "14.0.4",
"react-dnd-html5-backend": "14.0.2",
"react-dnd": "16.0.1",
"react-dnd-html5-backend": "16.0.1",
"react-dom": "18.3.1",
"react-router-dom": "6.23.1",
"react-router-dom": "7.0.2",
"react-scripts": "github:shridhar-tl/react-scripts",
"static-eval": "2.1.1",
"zustand": "5.0.1"
"zustand": "5.0.2"
},
"devDependencies": {
"@craco/craco": "^7.1.0",
"cross-env": "^7.0.3",
"eslint": "^9.14.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.1.0",
"gh-pages": "^6.1.1",
"react-app-alias": "^2.2.2",
"sass": "^1.80.6",
"sass": "^1.83.0",
"webpack-bundle-analyzer": "^4.10.2"
},
"scripts": {
Expand Down
14 changes: 2 additions & 12 deletions src/_nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ const { dashboards,
calendar, importWorklog, importIssues, planningPoker,

// Reports
worklogReport, worklogReportOld, sprintReport, customReport, estimateVsActual, reportBuilder, pivotReport, sayDoRatioReport,
worklogReport, worklogReportOld, sprintReport, customReport, estimateVsActual, pivotReport, sayDoRatioReport,

// Settings
userGroups, generalSettings, advancedSettings,

// Menu groups
activitiesGroup = calendar || importWorklog || importIssues || planningPoker,
reportsGroup = worklogReport || worklogReportOld || sprintReport || customReport || estimateVsActual || reportBuilder,
reportsGroup = worklogReport || worklogReportOld || sprintReport || customReport || estimateVsActual,
settingsGroup = userGroups || generalSettings || advancedSettings
} = config.modules;

Expand Down Expand Up @@ -138,16 +138,6 @@ const navigation = [
id: 'R-EA',
url: '/reports/estimateactual',
icon: 'fa fa-bar-chart'
},
reportBuilder && {
name: 'Report Builder',
id: 'R-CG',
url: '/reports/advanced',
icon: 'fa fa-table',
badge: {
variant: 'danger',
text: 'DEPR'
}
}
].filter(Boolean)
},
Expand Down
62 changes: 0 additions & 62 deletions src/common/jsExec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,6 @@ const parserOptions = {
}
};

export default function compileExpression(expression, props, { array, getObjVal, sandbox: exclude }) {
if (props?.$this) {
expression = `(function () { return ${expression};}).call(_$this_)`;
}

const env = {};

if (props?.$this) {
env._$this_ = props?.$this;
}

const ast = parse(expression, parserOptions)?.body[0];

const valueFunc = function () {
return exec(ast, env);
};

const isNoWrap = props?.noWrap === true;
let wrapFunction = null;
if (!isNoWrap) {

wrapFunction = function (Fields, RowGroup, ColGroup, Variables) {
env.Fields = Fields;
env.RowGroup = RowGroup;
env.ColGroup = ColGroup;
env.Variables = Variables;

env.Field = function (key) {
return getObjVal(Fields, key);
};

return valueFunc();
};
}

let funcToReturn = function (CommonFunctions, MyFunctions, Parameters, Datasets, array, getObjVal, ReportState, setReportState) {
env.CommonFunctions = CommonFunctions;
env.MyFunctions = MyFunctions;
env.Parameters = Parameters;
env.Datasets = Datasets;
env.array = array;
env.getObjVal = getObjVal;
env.ReportState = ReportState;
env.setReportState = setReportState;

if (isNoWrap) {
return valueFunc();
}
else {
return wrapFunction;
}
};

if (props) {
const { commonFunctions, myFunctions, parameters, datasets, setReportState, getReportState } = props;

funcToReturn = funcToReturn(commonFunctions, myFunctions, parameters, datasets, array, getObjVal, getReportState, setReportState);
}

return funcToReturn;
}

export function parseCustExpr(expression) {
if (expression.indexOf('\n') > -1) {
expression = `(function () { ${expression} }).call(this)`;
Expand Down
57 changes: 57 additions & 0 deletions src/components/ContextMenu.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React, { PureComponent } from 'react';
import { Menu } from 'primereact/menu';
import { ContextMenu as CMenu } from 'primereact/contextmenu';

let contextHandler = () => { /* Nothing to do */ };
export function showContextMenu(event, model) {
if (event.preventDefault) {
event.preventDefault();
}
contextHandler(event, model);
}

export function hideContextMenu() {
contextHandler();
}

export class ContextMenu extends PureComponent {
state = { contextItems: [] };

componentDidMount() {
contextHandler = (event, contextItems) => {
if (!event) {
this.menu.hide({});
this.contextMenu.hide({});
return;
}
const isContextMenu = event.type === "contextmenu";

if (!isContextMenu) {
contextItems = contextItems.filter(c => !c.disabled || !c.items || c.items.length === 0);
}

if (!this.state.contextItems?.length || this.state.contextItems !== contextItems) {
this.setState({ contextItems });
}

if (isContextMenu) {
this.menu.hide({});
this.contextMenu.show(event);
}
else {
this.contextMenu.hide({});
this.menu.toggle(event);
}
};
}

setMenuRef = el => this.menu = el;
setContextMenuRef = el => this.contextMenu = el;

render() {
return <>
<Menu appendTo={document.body} model={this.state.contextItems} popup={true} ref={this.setMenuRef} />
<CMenu appendTo={document.body} model={this.state.contextItems} popup={true} ref={this.setContextMenuRef} />
</>;
}
}
2 changes: 1 addition & 1 deletion src/components/GroupableGrid/GroupedColumnList.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { PureComponent } from 'react';
import { Sortable } from '../../controls';
import PropTypes from 'prop-types';
import { showContextMenu } from '../../externals/jsd-report';
import { showContextMenu } from '../ContextMenu';

const emptyGroupPlaceholder = <span className="empty-group-msg">Drag and drop column here to group data</span>;
const addGroupItemPlaceholder = <span>Drag and drop more columns here</span>;
Expand Down
5 changes: 0 additions & 5 deletions src/controls/Common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ Commented on 25-Jan-2023
}
}*/

/* Time picker */
.rc-time-picker {
width: 110px;
}

/* Chips */

.p-chips {
Expand Down
Loading

0 comments on commit d148bc3

Please sign in to comment.