@vizzly/dashboard 0.15.0-dev-3d599f1049eba812c1f45d1985540f920617733b → 0.15.0-dev-470021e5ca5b5e28bc53bda8773fba1320a94658

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.
@@ -14,7 +14,7 @@ import ReactDOM, { createPortal } from 'react-dom';
14
14
  import Fuse from 'fuse.js';
15
15
  import { CheckIcon, QuestionMarkCircleIcon, BadgeCheckIcon, DotsVerticalIcon, CloudIcon, SelectorIcon, ChevronUpIcon, ChevronDownIcon, DotsHorizontalIcon, ChevronLeftIcon, ChevronRightIcon, MinusSmIcon, PlusSmIcon } from '@heroicons/react/solid';
16
16
  import { VariableIcon, HashtagIcon, CalendarIcon, SearchIcon } from '@heroicons/react/outline';
17
- import crypto from 'crypto';
17
+ import { md5 } from 'js-md5';
18
18
  import moment$1 from 'moment';
19
19
  import { usePopper } from 'react-popper';
20
20
  import 'react-dates-17/initialize';
@@ -23685,7 +23685,7 @@ var DashboardContextProvider = function DashboardContextProvider(props) {
23685
23685
  }
23686
23686
  var definition = toSaveableDefinition(state.dashboard);
23687
23687
  var serializedDefinition = JSON.stringify(definition);
23688
- var newHash = crypto.createHash('md5').update(serializedDefinition).digest('hex');
23688
+ var newHash = md5(serializedDefinition);
23689
23689
  var hasUnsavedChanges = dashboardHash !== newHash;
23690
23690
  onDashboardUpdate(state.dashboard, {
23691
23691
  hasUnsavedChanges: hasUnsavedChanges
@@ -67791,10 +67791,11 @@ function useGoalLine(initialGoalLine, onAddingGoalLine) {
67791
67791
  });
67792
67792
  }
67793
67793
  var isDisabled$2 = function isDisabled(state) {
67794
- var _goalLineSchema$valid = goalLineSchema().validate(state),
67794
+ var _goalLineSchema$valid = goalLineSchema().validate(state, {
67795
+ presence: 'required'
67796
+ }),
67795
67797
  error = _goalLineSchema$valid.error;
67796
- if (error) return true;
67797
- return false;
67798
+ return !!error;
67798
67799
  };
67799
67800
 
67800
67801
  var GoalLineModal = function GoalLineModal(props) {
@@ -75798,7 +75799,7 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
75798
75799
  });
75799
75800
  var updateDashboardHash = function updateDashboardHash(dashboard) {
75800
75801
  var definition = toSaveableDefinition(dashboard);
75801
- setDashboardHash(crypto.createHash('md5').update(JSON.stringify(definition)).digest('hex'));
75802
+ setDashboardHash(md5(JSON.stringify(definition)));
75802
75803
  };
75803
75804
  useOnDashboardLoadCallback(session, props.onDashboardLoad, updateDashboardHash);
75804
75805
  var variables = useVariables(props.variables, (_props$id = props.id) != null ? _props$id : '');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vizzly/dashboard",
3
3
  "author": "james@vizzly.co",
4
- "version": "0.15.0-dev-3d599f1049eba812c1f45d1985540f920617733b",
4
+ "version": "0.15.0-dev-470021e5ca5b5e28bc53bda8773fba1320a94658",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "module": "./dist/dashboard.esm.js",
@@ -65,6 +65,7 @@
65
65
  "fuse.js": "^6.6.2",
66
66
  "html2canvas": "^1.4.1",
67
67
  "joi-to-json": "^4.2.1",
68
+ "js-md5": "^0.8.3",
68
69
  "jspdf": "^3.0.1",
69
70
  "lodash": "^4.17.21",
70
71
  "lodash-es": "^4.17.21",