@bigbinary/neeto-editor-frontend 2.0.7 → 2.0.8

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.
@@ -19,7 +19,7 @@ require('zustand');
19
19
  require('classnames');
20
20
  require('@bigbinary/neetoui/Label');
21
21
  require('./chunk-BxKa_XOs.cjs.js');
22
- require('./chunk-9oA3Y9DG.cjs.js');
22
+ require('./chunk-BAEoAF1o.cjs.js');
23
23
  require('./chunk-Bsk_FDUA.cjs.js');
24
24
  require('./chunk-BJu3ubxk.cjs.js');
25
25
  require('@bigbinary/neeto-commons-frontend/initializers');
@@ -15319,6 +15319,18 @@ var fuzzySearch = function fuzzySearch(items, query) {
15319
15319
  return ramda.pluck("item", results.slice(0, limit));
15320
15320
  };
15321
15321
 
15322
+ var getVariableDisplay = function getVariableDisplay(attrs) {
15323
+ var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;
15324
+ var _ref = attrs !== null && attrs !== void 0 ? attrs : {},
15325
+ id = _ref.id,
15326
+ label = _ref.label;
15327
+ var variableName = String(label || id || "");
15328
+ return {
15329
+ variableName: variableName,
15330
+ shouldTruncate: variableName.length > maxLength
15331
+ };
15332
+ };
15333
+
15322
15334
  var getVideoDimension = function getVideoDimension(value, fallback) {
15323
15335
  if (typeof value !== "number" && typeof value !== "string") return fallback;
15324
15336
  var dimension = Number(value);
@@ -15349,6 +15361,7 @@ exports.TextStyle = TextStyle;
15349
15361
  exports.buildArticleFullUrl = buildArticleFullUrl;
15350
15362
  exports.createArticleOptions = createArticleOptions;
15351
15363
  exports.fuzzySearch = fuzzySearch;
15364
+ exports.getVariableDisplay = getVariableDisplay;
15352
15365
  exports.getVideoDimension = getVideoDimension;
15353
15366
  exports.safeListKeymap = safeListKeymap;
15354
15367
  exports.safeSplitBlock = safeSplitBlock;
@@ -15367,4 +15380,4 @@ exports.src_default$9 = src_default$9;
15367
15380
  exports.useDeletedArticles = useDeletedArticles;
15368
15381
  exports.useEditorWarnings = useEditorWarnings;
15369
15382
  exports.useFetchKbArticles = useFetchKbArticles;
15370
- //# sourceMappingURL=chunk-9oA3Y9DG.cjs.js.map
15383
+ //# sourceMappingURL=chunk-BAEoAF1o.cjs.js.map