Skip to content

Commit

Permalink
update studio, export builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bjrmatos committed Sep 18, 2023
1 parent c52c33b commit 6fb87e1
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 108 deletions.
21 changes: 9 additions & 12 deletions packages/jsreport-import-export/studio/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = Studio.libraries['react'];

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ ExportModal)
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
Expand Down Expand Up @@ -56,8 +56,8 @@ class ExportModal extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
});
this.state = {};
this.state.processing = false;
this.state.selected = selections;
this.handleSelectionChange = this.handleSelectionChange.bind(this);
this.initialSelected = selections;
this.entityTreeRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createRef();
}
getExportableReferences(references) {
const exportableEntitySets = (jsreport_studio__WEBPACK_IMPORTED_MODULE_1___default().extensions)['import-export'].options.exportableEntitySets;
Expand All @@ -76,9 +76,10 @@ class ExportModal extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
processing: true
});
try {
const selected = this.entityTreeRef.current.selected;
const response = await jsreport_studio__WEBPACK_IMPORTED_MODULE_1___default().api.post('api/export', {
data: {
selection: Object.keys(this.state.selected).filter(k => this.state.selected[k] === true)
selection: Object.keys(selected).filter(k => selected[k] === true)
},
responseType: 'blob'
}, true);
Expand All @@ -93,15 +94,10 @@ class ExportModal extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
alert('Unable to prepare export ' + e.message + ' ' + e.stack);
}
}
handleSelectionChange(selected) {
this.setState({
selected
});
}
render() {
const references = this.getExportableReferences(jsreport_studio__WEBPACK_IMPORTED_MODULE_1___default().getReferences());
const initialSelected = this.initialSelected;
const {
selected,
processing
} = this.state;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
Expand All @@ -114,10 +110,10 @@ class ExportModal extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
overflow: 'auto'
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(jsreport_studio__WEBPACK_IMPORTED_MODULE_1__.EntityTree, {
ref: this.entityTreeRef,
entities: references,
selectable: true,
selected: selected,
onSelectionChanged: this.handleSelectionChange
initialSelected: initialSelected
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
className: "button-bar"
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
Expand All @@ -135,6 +131,7 @@ class ExportModal extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
}, "Download"))));
}
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ExportModal);

/***/ }),
/* 4 */
Expand Down
2 changes: 1 addition & 1 deletion packages/jsreport-import-export/studio/main.js.map

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v0.19.1
* scheduler.production.min.js
*
Expand Down

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/jsreport-studio/static/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="description" content="jsreport - javascript business reports">
<meta name="jsreport-server-startup-hash" content="$serverStartupHash" data-jsreport-server-startup-hash>

<link href="main.2685dca95706f78feb2a.css" data-default-jsreport-studio-theme="true" data-jsreport-studio-theme="$defaultTheme" rel="stylesheet">
<link href="main.dc860b5effa783943444.css" data-default-jsreport-studio-theme="true" data-jsreport-studio-theme="$defaultTheme" rel="stylesheet">

$customCssFiles
</head>
Expand Down Expand Up @@ -250,7 +250,7 @@
</div>
<div id="content" class="root-container container"></div>

<script src="client.b598aa2192dccf785b05.js"></script>
<script src="client.f358ea871b4cfadfcee0.js"></script>

</body>
</html>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10820,15 +10820,18 @@ a:not(.button)[href]:link, a:not(.button)[href]:visited, a:not(.button)[href]:ho
color: $entityTree-collapseIcon-hover-color;
}

.EntityTree-nodeContainer:not(.EntityTree-collapsed) {
/* .nodeContainer:not(.collapsed) {
max-height: 15999px;
transition: 0.15s;
}
} */

.EntityTree-nodeContainer.EntityTree-collapsed {
max-height: 0;
overflow: hidden;
transition: 0.15s;
/* we have removed the transition because it produces glitches when */
/* the entity tree has lot of entities (2k-3k) */
display: none;
/* max-height: 0; */
/* overflow: hidden; */
/* transition: 0.15s; */
}

.EntityTree-link {
Expand Down

Large diffs are not rendered by default.

0 comments on commit 6fb87e1

Please sign in to comment.