Giter Club home page Giter Club logo

opencpq's People

Contributors

hcschuetz avatar timgeisler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opencpq's Issues

Fixing saveAs button on toolbar

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/opencpq/dst/lib/root.js b/node_modules/opencpq/dst/lib/root.js
index bb0ab0b..b569992 100644
--- a/node_modules/opencpq/dst/lib/root.js
+++ b/node_modules/opencpq/dst/lib/root.js
@@ -3,7 +3,7 @@
 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
 
 var React = require("react");
-var saveAs = require("browser-filesaver");
+var FileSaver = require("file-saver");
 
 var _require = require('react-bootstrap');
 
@@ -145,7 +145,7 @@ var RootWidget = React.createClass({
 	},
 	_export: function _export() {
 		var blob = new Blob([JSON.stringify(this.state.now, null, 2)], { type: "application/json;charset=utf-8" });
-		saveAs(blob, "openCPQ.json");
+		FileSaver.saveAs(blob, "openCPQ.json");
 	},
 	render: function render() {
 		var _this3 = this;

This issue body was partially generated by patch-package.

Canonical state representation

Semantically equivalent states should be represented in the same way, no matter which way we reached the state. This is to avoid bugs due to subtle dependencies on the representation.

Examples:

  • If a group member has never been set, it is missing in the group's JSON object.
    After setting and retracting it, there is a member with value undefined.
    Retracting should actually remove the group member.
  • The same holds for a selection $detail.

Retractions need to be propagated upwards. For example, empty groups objects must be replaced with undefined.

Implementation note: Retractions are implemented as updateTo(undefined). To fulfill this ticket, many implementations of updateTo would have to treat an argument of undefined specially. Perhaps it is is a simpler/cleaner approach to have a specialized retract method in the context.

(Alternatively, we might use the representation with explicitly undefined components as the canonical representation. This would however require to "expand" state subtrees eagerly.)

Export not working for me

I don't know if you guys are still mantaining this project, but exporting in general and also, exporting to CSV doesn't work in lastest Chromium, Firefox and Edge. This is both in the demo and my local git clone.

image

Please let me know if you have a workaround for this issue, I'm from Argentina and I'm interested in using openCPQ.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.