@pie-lib/graphing-module 1.11.24 → 1.11.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/module/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import {_dll_prop_types, _dll_pie_lib__render_ui, _dll_material_ui__core_styles, _dll_react, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_material_ui__core, _dll_material_ui__core_styles_color_manipulator, _dll_material_ui__icons} from "../../shared-module@^1.6.22/module/index.js";
2
- import {_dll_pie_lib__editable_html} from "../../editable-html-module@^3.6.25/module/index.js";
3
- import {_dll_pie_lib__drag} from "../../drag-module@^2.1.25/module/index.js";
4
- import {_dll_pie_lib__config_ui} from "../../config-module@^2.8.9/module/index.js";
1
+ import {_dll_prop_types, _dll_pie_lib__render_ui, _dll_material_ui__core_styles, _dll_react, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug, _dll_material_ui__core, _dll_material_ui__core_styles_color_manipulator, _dll_material_ui__icons} from "../../shared-module@^1.6.24/module/index.js";
2
+ import {_dll_pie_lib__editable_html} from "../../editable-html-module@^3.7.1/module/index.js";
3
+ import {_dll_pie_lib__drag} from "../../drag-module@^2.1.27/module/index.js";
4
+ import {_dll_pie_lib__config_ui} from "../../config-module@^2.8.11/module/index.js";
5
5
  const PropTypes$E = _dll_prop_types;
6
6
  const BaseDomainRangeType = {
7
7
  min: PropTypes$E.number.isRequired,
@@ -8203,7 +8203,7 @@ Text.propTypes = {
8203
8203
  const React$z = _dll_react;
8204
8204
  const PropTypes$x = _dll_prop_types;
8205
8205
  const cx$1 = _dll_classnames;
8206
- function _defineProperty(obj, key, value) {
8206
+ function _defineProperty$1(obj, key, value) {
8207
8207
  if ((key in obj)) {
8208
8208
  Object.defineProperty(obj, key, {
8209
8209
  value: value,
@@ -8240,7 +8240,7 @@ function _objectSpread(target) {
8240
8240
  }));
8241
8241
  }
8242
8242
  ownKeys.forEach(function (key) {
8243
- _defineProperty(target, key, source[key]);
8243
+ _defineProperty$1(target, key, source[key]);
8244
8244
  });
8245
8245
  }
8246
8246
  return target;
@@ -10490,6 +10490,40 @@ function shallowEqual(objA, objB) {
10490
10490
  }
10491
10491
  return true;
10492
10492
  }
10493
+ function _defineProperty(obj, key, value) {
10494
+ if ((key in obj)) {
10495
+ Object.defineProperty(obj, key, {
10496
+ value: value,
10497
+ enumerable: true,
10498
+ configurable: true,
10499
+ writable: true
10500
+ });
10501
+ } else {
10502
+ obj[key] = value;
10503
+ }
10504
+ return obj;
10505
+ }
10506
+ function ownKeys(object, enumerableOnly) {
10507
+ var keys = Object.keys(object);
10508
+ if (Object.getOwnPropertySymbols) {
10509
+ var symbols = Object.getOwnPropertySymbols(object);
10510
+ (enumerableOnly && (symbols = symbols.filter(function (sym) {
10511
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10512
+ })), keys.push.apply(keys, symbols));
10513
+ }
10514
+ return keys;
10515
+ }
10516
+ function _objectSpread2(target) {
10517
+ for (var i = 1; i < arguments.length; i++) {
10518
+ var source = null != arguments[i] ? arguments[i] : {};
10519
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
10520
+ _defineProperty(target, key, source[key]);
10521
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
10522
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
10523
+ });
10524
+ }
10525
+ return target;
10526
+ }
10493
10527
  var $$observable = (function () {
10494
10528
  return typeof Symbol === 'function' && Symbol.observable || '@@observable';
10495
10529
  })();
@@ -10801,6 +10835,50 @@ function bindActionCreators(actionCreators, dispatch) {
10801
10835
  }
10802
10836
  return boundActionCreators;
10803
10837
  }
10838
+ function compose() {
10839
+ for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
10840
+ funcs[_key] = arguments[_key];
10841
+ }
10842
+ if (funcs.length === 0) {
10843
+ return function (arg) {
10844
+ return arg;
10845
+ };
10846
+ }
10847
+ if (funcs.length === 1) {
10848
+ return funcs[0];
10849
+ }
10850
+ return funcs.reduce(function (a, b) {
10851
+ return function () {
10852
+ return a(b.apply(void 0, arguments));
10853
+ };
10854
+ });
10855
+ }
10856
+ function applyMiddleware() {
10857
+ for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
10858
+ middlewares[_key] = arguments[_key];
10859
+ }
10860
+ return function (createStore) {
10861
+ return function () {
10862
+ var store = createStore.apply(void 0, arguments);
10863
+ var _dispatch = function dispatch() {
10864
+ throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
10865
+ };
10866
+ var middlewareAPI = {
10867
+ getState: store.getState,
10868
+ dispatch: function dispatch() {
10869
+ return _dispatch.apply(void 0, arguments);
10870
+ }
10871
+ };
10872
+ var chain = middlewares.map(function (middleware) {
10873
+ return middleware(middlewareAPI);
10874
+ });
10875
+ _dispatch = compose.apply(void 0, chain)(store.dispatch);
10876
+ return _objectSpread2(_objectSpread2({}, store), {}, {
10877
+ dispatch: _dispatch
10878
+ });
10879
+ };
10880
+ };
10881
+ }
10804
10882
  function isCrushed() {}
10805
10883
  if (typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
10806
10884
  warning$1('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
@@ -11579,6 +11657,10 @@ const incorrect = (key = 'fill') => ({
11579
11657
  [key]: color$d.incorrect(),
11580
11658
  pointerEvents: 'none'
11581
11659
  });
11660
+ const missing = (key = 'fill') => ({
11661
+ [key]: color$d.missing(),
11662
+ pointerEvents: 'none'
11663
+ });
11582
11664
  const React$o = _dll_react;
11583
11665
  const PropTypes$o = _dll_prop_types;
11584
11666
  const {color: color$c} = _dll_pie_lib__render_ui;
@@ -12617,7 +12699,8 @@ const styles$5 = () => ({
12617
12699
  },
12618
12700
  disabled: applyStyle(disabled),
12619
12701
  correct: applyStyle(correct),
12620
- incorrect: applyStyle(incorrect)
12702
+ incorrect: applyStyle(incorrect),
12703
+ missing: applyStyle(missing)
12621
12704
  });
12622
12705
  const BgCircle = withStyles$d(styles$5)(RawCircle);
12623
12706
  var BgCircle$1 = gridDraggable({
@@ -15134,7 +15217,7 @@ class UndoRedo extends React$3.Component {
15134
15217
  classes: {
15135
15218
  root: classes.button
15136
15219
  },
15137
- onClick: onUndo,
15220
+ onClick: () => onUndo(true),
15138
15221
  __self: this,
15139
15222
  __source: {
15140
15223
  fileName: _jsxFileName$3,
@@ -15144,7 +15227,7 @@ class UndoRedo extends React$3.Component {
15144
15227
  classes: {
15145
15228
  root: classes.button
15146
15229
  },
15147
- onClick: onRedo,
15230
+ onClick: () => onRedo(true),
15148
15231
  __self: this,
15149
15232
  __source: {
15150
15233
  fileName: _jsxFileName$3,
@@ -15154,7 +15237,7 @@ class UndoRedo extends React$3.Component {
15154
15237
  classes: {
15155
15238
  root: classes.button
15156
15239
  },
15157
- onClick: onReset,
15240
+ onClick: () => onReset(),
15158
15241
  __self: this,
15159
15242
  __source: {
15160
15243
  fileName: _jsxFileName$3,
@@ -15439,6 +15522,12 @@ const styles$1 = theme => ({
15439
15522
  }
15440
15523
  });
15441
15524
  var GraphWithControls$1 = withStyles$1(styles$1)(GraphWithControls);
15525
+ let lastAction = null;
15526
+ const getLastAction = () => lastAction;
15527
+ const lastActionMiddleware = () => next => action => {
15528
+ lastAction = action;
15529
+ return next(action);
15530
+ };
15442
15531
  const React$1 = _dll_react;
15443
15532
  const PropTypes$1 = _dll_prop_types;
15444
15533
  const {isEqual: isEqual} = _dll_lodash;
@@ -15466,7 +15555,7 @@ class Root extends React$1.Component {
15466
15555
  const r = reducer();
15467
15556
  this.store = createStore(r, {
15468
15557
  marks: props.marks
15469
- });
15558
+ }, applyMiddleware(lastActionMiddleware));
15470
15559
  this.store.subscribe(this.onStoreChange);
15471
15560
  }
15472
15561
  componentDidUpdate(prevProps) {
@@ -15483,8 +15572,10 @@ class Root extends React$1.Component {
15483
15572
  this.onStoreChange = () => {
15484
15573
  const {marks, onChangeMarks} = this.props;
15485
15574
  const storeState = this.store.getState();
15575
+ const lastAction = getLastAction();
15576
+ const isUndoOperation = lastAction.type.includes('UNDO') || lastAction.type.includes('REDO');
15486
15577
  if (!isEqual(storeState.marks.present, marks)) {
15487
- onChangeMarks(storeState.marks.present);
15578
+ onChangeMarks(storeState.marks.present, isUndoOperation);
15488
15579
  }
15489
15580
  };
15490
15581
  }
@@ -15499,7 +15590,7 @@ class Root extends React$1.Component {
15499
15590
  __self: this,
15500
15591
  __source: {
15501
15592
  fileName: _jsxFileName$1,
15502
- lineNumber: 72
15593
+ lineNumber: 75
15503
15594
  }
15504
15595
  });
15505
15596
  }
@@ -15508,14 +15599,14 @@ class Root extends React$1.Component {
15508
15599
  __self: this,
15509
15600
  __source: {
15510
15601
  fileName: _jsxFileName$1,
15511
- lineNumber: 76
15602
+ lineNumber: 79
15512
15603
  }
15513
15604
  }, React$1.createElement(GraphContainer, {
15514
15605
  ...rest,
15515
15606
  __self: this,
15516
15607
  __source: {
15517
15608
  fileName: _jsxFileName$1,
15518
- lineNumber: 77
15609
+ lineNumber: 80
15519
15610
  }
15520
15611
  }));
15521
15612
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-module",
3
- "version": "1.11.24",
3
+ "version": "1.11.26",
4
4
  "mappings": {
5
5
  "@pie-lib/plot": "_dll_pie_lib__plot",
6
6
  "@pie-lib/graphing": "_dll_pie_lib__graphing",
@@ -13,7 +13,7 @@
13
13
  "version": "2.6.13"
14
14
  },
15
15
  "@pie-lib/graphing": {
16
- "version": "2.12.27"
16
+ "version": "2.12.28"
17
17
  },
18
18
  "d3-scale": {
19
19
  "version": "2.2.2"
@@ -22,24 +22,24 @@
22
22
  "version": "1.4.2"
23
23
  }
24
24
  },
25
- "hash": "2a47da8b251893cc6f5deed0eac703910f534c39"
25
+ "hash": "cac0cc423e3ba202dda68856e4e11e35ac1b0aba"
26
26
  },
27
27
  "modules": [
28
28
  {
29
29
  "name": "@pie-lib/shared-module",
30
- "version": "^1.6.22"
30
+ "version": "^1.6.24"
31
31
  },
32
32
  {
33
33
  "name": "@pie-lib/editable-html-module",
34
- "version": "^3.6.25"
34
+ "version": "^3.7.1"
35
35
  },
36
36
  {
37
37
  "name": "@pie-lib/drag-module",
38
- "version": "^2.1.25"
38
+ "version": "^2.1.27"
39
39
  },
40
40
  {
41
41
  "name": "@pie-lib/config-module",
42
- "version": "^2.8.9"
42
+ "version": "^2.8.11"
43
43
  }
44
44
  ],
45
45
  "isLocal": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-lib/graphing-module",
3
- "version": "1.11.24",
3
+ "version": "1.11.26",
4
4
  "module": "module/index.js",
5
5
  "repository": "pie-framework/pie-lib",
6
6
  "publishConfig": {