@runcontext/ui 0.5.4 → 0.5.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/static/setup.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runcontext/ui",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "description": "5-step browser wizard for creating data products and visual studio for curating metadata to Gold tier. Part of RunContext.",
5
5
  "license": "MIT",
6
6
  "author": "Eric Kittelson",
package/static/setup.js CHANGED
@@ -838,7 +838,8 @@
838
838
  targetTier: 'bronze',
839
839
  };
840
840
  if (state.sources && state.sources[0]) {
841
- body.dataSource = state.sources[0];
841
+ var src = state.sources[0];
842
+ body.dataSource = (typeof src === 'string' ? src : src.name || src.database || '').replace(/[^a-zA-Z0-9_-]/g, '_');
842
843
  }
843
844
 
844
845
  try {
@@ -1104,7 +1105,8 @@
1104
1105
  targetTier: 'gold',
1105
1106
  };
1106
1107
  if (state.sources && state.sources[0]) {
1107
- body.dataSource = state.sources[0];
1108
+ var src = state.sources[0];
1109
+ body.dataSource = (typeof src === 'string' ? src : src.name || src.database || '').replace(/[^a-zA-Z0-9_-]/g, '_');
1108
1110
  }
1109
1111
 
1110
1112
  try {