@teselagen/ui 0.3.67 → 0.3.69

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/index.cjs.js CHANGED
@@ -17105,25 +17105,16 @@ var toString$6 = {}.toString;
17105
17105
  var _cof = /* @__PURE__ */ __name(function(it) {
17106
17106
  return toString$6.call(it).slice(8, -1);
17107
17107
  }, "_cof");
17108
- var _iobject;
17109
- var hasRequired_iobject;
17110
- function require_iobject() {
17111
- if (hasRequired_iobject)
17112
- return _iobject;
17113
- hasRequired_iobject = 1;
17114
- var cof2 = _cof;
17115
- _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
17116
- return cof2(it) == "String" ? it.split("") : Object(it);
17117
- };
17118
- return _iobject;
17119
- }
17120
- __name(require_iobject, "require_iobject");
17108
+ var cof$2 = _cof;
17109
+ var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
17110
+ return cof$2(it) == "String" ? it.split("") : Object(it);
17111
+ };
17121
17112
  var _defined = /* @__PURE__ */ __name(function(it) {
17122
17113
  if (it == void 0)
17123
17114
  throw TypeError("Can't call method on " + it);
17124
17115
  return it;
17125
17116
  }, "_defined");
17126
- var IObject = require_iobject();
17117
+ var IObject = _iobject;
17127
17118
  var defined$2 = _defined;
17128
17119
  var _toIobject = /* @__PURE__ */ __name(function(it) {
17129
17120
  return IObject(defined$2(it));
@@ -17244,7 +17235,7 @@ function require_objectAssign() {
17244
17235
  var gOPS2 = _objectGops;
17245
17236
  var pIE2 = require_objectPie();
17246
17237
  var toObject2 = _toObject;
17247
- var IObject2 = require_iobject();
17238
+ var IObject2 = _iobject;
17248
17239
  var $assign = Object.assign;
17249
17240
  _objectAssign = !$assign || _fails(function() {
17250
17241
  var A2 = {};
@@ -60453,6 +60444,14 @@ function matchSchemas(_0) {
60453
60444
  csvValidationIssue = "It looks like some of the headers in your uploaded file(s) do not match the expected headers. Please look over and correct any issues with the mappings below.";
60454
60445
  }
60455
60446
  });
60447
+ const ignoredUserSchemaFields = [];
60448
+ userSchema.fields.forEach((uh) => {
60449
+ if (!officialSchema.fields.find(
60450
+ (h2) => norm(h2.path) === norm(uh.path) || norm(h2.displayName) === norm(uh.path) || matchedAltPaths.includes(uh.path)
60451
+ )) {
60452
+ ignoredUserSchemaFields.push(uh);
60453
+ }
60454
+ });
60456
60455
  if (officialSchema.coerceUserSchema) {
60457
60456
  officialSchema.coerceUserSchema({ userSchema, officialSchema });
60458
60457
  }
@@ -60510,6 +60509,9 @@ function matchSchemas(_0) {
60510
60509
  };
60511
60510
  }
60512
60511
  }
60512
+ if (!csvValidationIssue && ignoredUserSchemaFields.length) {
60513
+ csvValidationIssue = `It looks like the following headers in your file didn't map to any of the accepted headers: ${ignoredUserSchemaFields.map((f2) => f2.displayName || f2.path).join(", ")}`;
60514
+ }
60513
60515
  return {
60514
60516
  searchResults: officialSchema.fields,
60515
60517
  csvValidationIssue
package/index.es.js CHANGED
@@ -17087,25 +17087,16 @@ var toString$6 = {}.toString;
17087
17087
  var _cof = /* @__PURE__ */ __name(function(it) {
17088
17088
  return toString$6.call(it).slice(8, -1);
17089
17089
  }, "_cof");
17090
- var _iobject;
17091
- var hasRequired_iobject;
17092
- function require_iobject() {
17093
- if (hasRequired_iobject)
17094
- return _iobject;
17095
- hasRequired_iobject = 1;
17096
- var cof2 = _cof;
17097
- _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
17098
- return cof2(it) == "String" ? it.split("") : Object(it);
17099
- };
17100
- return _iobject;
17101
- }
17102
- __name(require_iobject, "require_iobject");
17090
+ var cof$2 = _cof;
17091
+ var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
17092
+ return cof$2(it) == "String" ? it.split("") : Object(it);
17093
+ };
17103
17094
  var _defined = /* @__PURE__ */ __name(function(it) {
17104
17095
  if (it == void 0)
17105
17096
  throw TypeError("Can't call method on " + it);
17106
17097
  return it;
17107
17098
  }, "_defined");
17108
- var IObject = require_iobject();
17099
+ var IObject = _iobject;
17109
17100
  var defined$2 = _defined;
17110
17101
  var _toIobject = /* @__PURE__ */ __name(function(it) {
17111
17102
  return IObject(defined$2(it));
@@ -17226,7 +17217,7 @@ function require_objectAssign() {
17226
17217
  var gOPS2 = _objectGops;
17227
17218
  var pIE2 = require_objectPie();
17228
17219
  var toObject2 = _toObject;
17229
- var IObject2 = require_iobject();
17220
+ var IObject2 = _iobject;
17230
17221
  var $assign = Object.assign;
17231
17222
  _objectAssign = !$assign || _fails(function() {
17232
17223
  var A2 = {};
@@ -60435,6 +60426,14 @@ function matchSchemas(_0) {
60435
60426
  csvValidationIssue = "It looks like some of the headers in your uploaded file(s) do not match the expected headers. Please look over and correct any issues with the mappings below.";
60436
60427
  }
60437
60428
  });
60429
+ const ignoredUserSchemaFields = [];
60430
+ userSchema.fields.forEach((uh) => {
60431
+ if (!officialSchema.fields.find(
60432
+ (h2) => norm(h2.path) === norm(uh.path) || norm(h2.displayName) === norm(uh.path) || matchedAltPaths.includes(uh.path)
60433
+ )) {
60434
+ ignoredUserSchemaFields.push(uh);
60435
+ }
60436
+ });
60438
60437
  if (officialSchema.coerceUserSchema) {
60439
60438
  officialSchema.coerceUserSchema({ userSchema, officialSchema });
60440
60439
  }
@@ -60492,6 +60491,9 @@ function matchSchemas(_0) {
60492
60491
  };
60493
60492
  }
60494
60493
  }
60494
+ if (!csvValidationIssue && ignoredUserSchemaFields.length) {
60495
+ csvValidationIssue = `It looks like the following headers in your file didn't map to any of the accepted headers: ${ignoredUserSchemaFields.map((f2) => f2.displayName || f2.path).join(", ")}`;
60496
+ }
60495
60497
  return {
60496
60498
  searchResults: officialSchema.fields,
60497
60499
  csvValidationIssue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ui",
3
- "version": "0.3.67",
3
+ "version": "0.3.69",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -140,6 +140,20 @@ async function matchSchemas({ userSchema, officialSchema }) {
140
140
  "It looks like some of the headers in your uploaded file(s) do not match the expected headers. Please look over and correct any issues with the mappings below.";
141
141
  }
142
142
  });
143
+ const ignoredUserSchemaFields = [];
144
+ userSchema.fields.forEach(uh => {
145
+ if (
146
+ !officialSchema.fields.find(
147
+ h =>
148
+ norm(h.path) === norm(uh.path) ||
149
+ norm(h.displayName) === norm(uh.path) ||
150
+ matchedAltPaths.includes(uh.path)
151
+ )
152
+ ) {
153
+ ignoredUserSchemaFields.push(uh);
154
+ }
155
+ });
156
+
143
157
  if (officialSchema.coerceUserSchema) {
144
158
  officialSchema.coerceUserSchema({ userSchema, officialSchema });
145
159
  }
@@ -214,7 +228,11 @@ async function matchSchemas({ userSchema, officialSchema }) {
214
228
  // //all the headers match up as does the actual data
215
229
  // return { csvValidationIssue };
216
230
  // }
217
-
231
+ if (!csvValidationIssue && ignoredUserSchemaFields.length) {
232
+ csvValidationIssue = `It looks like the following headers in your file didn't map to any of the accepted headers: ${ignoredUserSchemaFields
233
+ .map(f => f.displayName || f.path)
234
+ .join(", ")}`;
235
+ }
218
236
  return {
219
237
  searchResults: officialSchema.fields,
220
238
  csvValidationIssue
package/src/style.css CHANGED
@@ -242,3 +242,7 @@ button:not(:disabled):active {
242
242
  text-align: unset !important;
243
243
  cursor: pointer !important;
244
244
  } */
245
+
246
+ .bp3-dialog-header .bp3-heading {
247
+ width: 10px; /* tnw: this is a hack to prevent the dialog title from causing the dialog width to expand larger than the dialog content*/
248
+ }
package/style.css CHANGED
@@ -9060,7 +9060,10 @@ button:not(:disabled):active {
9060
9060
  text-align: unset !important;
9061
9061
  cursor: pointer !important;
9062
9062
  } */
9063
- .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.rg-celleditor-input,
9063
+
9064
+ .bp3-dialog-header .bp3-heading {
9065
+ width: 10px; /* tnw: this is a hack to prevent the dialog title from causing the dialog width to expand larger than the dialog content*/
9066
+ }.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.rg-celleditor-input,
9064
9067
  .rg-celleditor input {
9065
9068
  border: none;
9066
9069
  }