@trops/dash-core 0.1.353 → 0.1.355

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/dist/index.esm.js CHANGED
@@ -8736,7 +8736,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
8736
8736
  var hasPropertyDescriptors_1 = hasPropertyDescriptors;
8737
8737
 
8738
8738
  var keys = objectKeys$2;
8739
- var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8739
+ var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
8740
8740
 
8741
8741
  var toStr$4 = Object.prototype.toString;
8742
8742
  var concat = Array.prototype.concat;
@@ -8769,7 +8769,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
8769
8769
  var defineProperties$1 = function (object, map) {
8770
8770
  var predicates = arguments.length > 2 ? arguments[2] : {};
8771
8771
  var props = keys(map);
8772
- if (hasSymbols$4) {
8772
+ if (hasSymbols$5) {
8773
8773
  props = concat.call(props, Object.getOwnPropertySymbols(map));
8774
8774
  }
8775
8775
  for (var i = 0; i < props.length; i += 1) {
@@ -8835,11 +8835,11 @@ var sign$1 = function sign(number) {
8835
8835
  };
8836
8836
 
8837
8837
  var shams$1;
8838
- var hasRequiredShams$1;
8838
+ var hasRequiredShams;
8839
8839
 
8840
- function requireShams$1 () {
8841
- if (hasRequiredShams$1) return shams$1;
8842
- hasRequiredShams$1 = 1;
8840
+ function requireShams () {
8841
+ if (hasRequiredShams) return shams$1;
8842
+ hasRequiredShams = 1;
8843
8843
 
8844
8844
  /** @type {import('./shams')} */
8845
8845
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -8888,10 +8888,10 @@ function requireShams$1 () {
8888
8888
  }
8889
8889
 
8890
8890
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
8891
- var hasSymbolSham = requireShams$1();
8891
+ var hasSymbolSham = requireShams();
8892
8892
 
8893
8893
  /** @type {import('.')} */
8894
- var hasSymbols$3 = function hasNativeSymbols() {
8894
+ var hasSymbols$4 = function hasNativeSymbols() {
8895
8895
  if (typeof origSymbol !== 'function') { return false; }
8896
8896
  if (typeof Symbol !== 'function') { return false; }
8897
8897
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -9195,7 +9195,7 @@ var ThrowTypeError = $gOPD$1
9195
9195
  }())
9196
9196
  : throwTypeError;
9197
9197
 
9198
- var hasSymbols$2 = hasSymbols$3();
9198
+ var hasSymbols$3 = hasSymbols$4();
9199
9199
 
9200
9200
  var getProto$2 = getProto$3;
9201
9201
  var $ObjectGPO = requireObject_getPrototypeOf();
@@ -9213,7 +9213,7 @@ var INTRINSICS = {
9213
9213
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
9214
9214
  '%Array%': Array,
9215
9215
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
9216
- '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9216
+ '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9217
9217
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
9218
9218
  '%AsyncFunction%': needsEval,
9219
9219
  '%AsyncGenerator%': needsEval,
@@ -9244,10 +9244,10 @@ var INTRINSICS = {
9244
9244
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
9245
9245
  '%isFinite%': isFinite,
9246
9246
  '%isNaN%': isNaN,
9247
- '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9247
+ '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9248
9248
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
9249
9249
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
9250
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9250
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9251
9251
  '%Math%': Math,
9252
9252
  '%Number%': Number,
9253
9253
  '%Object%': $Object$2,
@@ -9261,11 +9261,11 @@ var INTRINSICS = {
9261
9261
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
9262
9262
  '%RegExp%': RegExp,
9263
9263
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
9264
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9264
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9265
9265
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
9266
9266
  '%String%': String,
9267
- '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9268
- '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
9267
+ '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9268
+ '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
9269
9269
  '%SyntaxError%': $SyntaxError$1,
9270
9270
  '%ThrowTypeError%': ThrowTypeError,
9271
9271
  '%TypedArray%': TypedArray,
@@ -9618,12 +9618,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
9618
9618
 
9619
9619
  // modified from https://github.com/es-shims/es6-shim
9620
9620
  var objectKeys$1 = objectKeys$2;
9621
- var hasSymbols$1 = requireShams$1()();
9621
+ var hasSymbols$2 = requireShams()();
9622
9622
  var callBound$h = callBound$i;
9623
9623
  var $Object$1 = esObjectAtoms;
9624
9624
  var $push = callBound$h('Array.prototype.push');
9625
9625
  var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
9626
- var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
9626
+ var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
9627
9627
 
9628
9628
  // eslint-disable-next-line no-unused-vars
9629
9629
  var implementation$8 = function assign(target, source1) {
@@ -9637,7 +9637,7 @@ var implementation$8 = function assign(target, source1) {
9637
9637
 
9638
9638
  // step 3.a.ii:
9639
9639
  var keys = objectKeys$1(from);
9640
- var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9640
+ var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
9641
9641
  if (getSymbols) {
9642
9642
  var syms = getSymbols(from);
9643
9643
  for (var j = 0; j < syms.length; ++j) {
@@ -9934,23 +9934,14 @@ var regexp_prototype_flags = flagsBound;
9934
9934
 
9935
9935
  var esGetIterator = {exports: {}};
9936
9936
 
9937
- var shams;
9938
- var hasRequiredShams;
9939
-
9940
- function requireShams () {
9941
- if (hasRequiredShams) return shams;
9942
- hasRequiredShams = 1;
9937
+ var hasSymbols$1 = requireShams();
9943
9938
 
9944
- var hasSymbols = requireShams$1();
9945
-
9946
- /** @type {import('.')} */
9947
- shams = function hasToStringTagShams() {
9948
- return hasSymbols() && !!Symbol.toStringTag;
9949
- };
9950
- return shams;
9951
- }
9939
+ /** @type {import('.')} */
9940
+ var shams = function hasToStringTagShams() {
9941
+ return hasSymbols$1() && !!Symbol.toStringTag;
9942
+ };
9952
9943
 
9953
- var hasToStringTag$7 = requireShams()();
9944
+ var hasToStringTag$7 = shams();
9954
9945
  var callBound$f = callBound$i;
9955
9946
 
9956
9947
  var $toString$7 = callBound$f('Object.prototype.toString');
@@ -10987,7 +10978,7 @@ var tryStringObject = function tryStringObject(value) {
10987
10978
  /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
10988
10979
  var $toString$6 = callBound$c('Object.prototype.toString');
10989
10980
  var strClass = '[object String]';
10990
- var hasToStringTag$6 = requireShams()();
10981
+ var hasToStringTag$6 = shams();
10991
10982
 
10992
10983
  /** @type {import('.')} */
10993
10984
  var isString$2 = function isString(value) {
@@ -11103,7 +11094,7 @@ var isSet$2 = exported$1 || function isSet(x) {
11103
11094
  var isArguments$1 = isArguments$2;
11104
11095
  var getStopIterationIterator = stopIterationIterator;
11105
11096
 
11106
- if (hasSymbols$3() || requireShams$1()()) {
11097
+ if (hasSymbols$4() || requireShams()()) {
11107
11098
  var $iterator = Symbol.iterator;
11108
11099
  // Symbol is available natively or shammed
11109
11100
  // natively:
@@ -11392,7 +11383,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
11392
11383
  /** @type {(value: unknown) => string} */
11393
11384
  var toStr$2 = callBound$9('Object.prototype.toString');
11394
11385
  var dateClass = '[object Date]';
11395
- var hasToStringTag$5 = requireShams()();
11386
+ var hasToStringTag$5 = shams();
11396
11387
 
11397
11388
  /** @type {import('.')} */
11398
11389
  var isDateObject = function isDateObject(value) {
@@ -11403,7 +11394,7 @@ var isDateObject = function isDateObject(value) {
11403
11394
  };
11404
11395
 
11405
11396
  var callBound$8 = callBound$i;
11406
- var hasToStringTag$4 = requireShams()();
11397
+ var hasToStringTag$4 = shams();
11407
11398
  var hasOwn = hasown;
11408
11399
  var gOPD$1 = gopd$1;
11409
11400
 
@@ -11508,7 +11499,7 @@ var tryNumberObject = function tryNumberObject(value) {
11508
11499
  };
11509
11500
  var $toString$3 = callBound$6('Object.prototype.toString');
11510
11501
  var numClass = '[object Number]';
11511
- var hasToStringTag$3 = requireShams()();
11502
+ var hasToStringTag$3 = shams();
11512
11503
 
11513
11504
  /** @type {import('.')} */
11514
11505
  var isNumberObject = function isNumberObject(value) {
@@ -11535,7 +11526,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
11535
11526
  }
11536
11527
  };
11537
11528
  var boolClass = '[object Boolean]';
11538
- var hasToStringTag$2 = requireShams()();
11529
+ var hasToStringTag$2 = shams();
11539
11530
 
11540
11531
  /** @type {import('.')} */
11541
11532
  var isBooleanObject = function isBoolean(value) {
@@ -11577,7 +11568,7 @@ function requireSafeRegexTest () {
11577
11568
 
11578
11569
  var callBound$4 = callBound$i;
11579
11570
  var $toString$1 = callBound$4('Object.prototype.toString');
11580
- var hasSymbols = hasSymbols$3();
11571
+ var hasSymbols = hasSymbols$4();
11581
11572
  var safeRegexTest = requireSafeRegexTest();
11582
11573
 
11583
11574
  if (hasSymbols) {
@@ -12023,7 +12014,7 @@ var gOPD = gopd$1;
12023
12014
  var getProto = getProto$3;
12024
12015
 
12025
12016
  var $toString = callBound$2('Object.prototype.toString');
12026
- var hasToStringTag = requireShams()();
12017
+ var hasToStringTag = shams();
12027
12018
 
12028
12019
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
12029
12020
  var typedArrays = availableTypedArrays();
@@ -53720,13 +53711,27 @@ var WidgetPopoutInner = function WidgetPopoutInner(_ref2) {
53720
53711
  }
53721
53712
  setWorkspace(target);
53722
53713
 
53723
- // `widgetId` carries the layout item's uuid (globally unique
53724
- // across pages/containers) but older callers may still pass a
53725
- // bare numeric id. Match uuid first, then fall back to id.
53726
- // Without the uuid match, widgets on a non-first page get
53727
- // masked by same-numeric-id widgets in the main layout.
53714
+ // `widgetId` carries the layout item's uuid. That uuid is
53715
+ // `${dashboardId}-${component}-${id}`
53716
+ // but the dashboardId prefix can differ between the main
53717
+ // window's LayoutModel instance and the one rebuilt here,
53718
+ // so we match on several shapes to be robust:
53719
+ //
53720
+ // 1. full uuid match (preferred)
53721
+ // 2. trailing `component-id` suffix (strip dashboardId)
53722
+ // 3. bare numeric id (legacy callers that pre-date uuid)
53723
+ //
53724
+ // Extract the suffix once: everything after the first "-"
53725
+ // when the string starts with a dashboard-looking prefix.
53726
+ var tail = String(widgetId).split("-").slice(-2).join("-");
53728
53727
  var matches = function matches(item) {
53729
- return item.uuid === widgetId || item.id === widgetId;
53728
+ if (item.uuid === widgetId) return true;
53729
+ if (item.uuid && item.uuid.endsWith("-" + tail)) return true;
53730
+ var itemTail = "".concat(item.component, "-").concat(item.id);
53731
+ if (itemTail === widgetId) return true;
53732
+ if (itemTail === tail) return true;
53733
+ if (item.id === widgetId) return true;
53734
+ return false;
53730
53735
  };
53731
53736
  var widget = target.layout.find(matches);
53732
53737
  if (!widget && target.pages && Array.isArray(target.pages)) {
@@ -53750,7 +53755,39 @@ var WidgetPopoutInner = function WidgetPopoutInner(_ref2) {
53750
53755
  widget = target.sidebarLayout.find(matches);
53751
53756
  }
53752
53757
  if (!widget) {
53753
- setError("Widget not found in workspace");
53758
+ // Diagnostic dump helps pinpoint id/uuid mismatches when
53759
+ // the user reports a "Widget not available" popout.
53760
+ var dump = {
53761
+ searchedFor: widgetId,
53762
+ suffix: tail,
53763
+ mainLayout: (target.layout || []).map(function (i) {
53764
+ return {
53765
+ id: i.id,
53766
+ uuid: i.uuid,
53767
+ component: i.component
53768
+ };
53769
+ }),
53770
+ pages: (target.pages || []).map(function (p) {
53771
+ return {
53772
+ pageId: p.id,
53773
+ items: (p.layout || []).map(function (i) {
53774
+ return {
53775
+ id: i.id,
53776
+ uuid: i.uuid,
53777
+ component: i.component
53778
+ };
53779
+ })
53780
+ };
53781
+ }),
53782
+ sidebar: (target.sidebarLayout || []).map(function (i) {
53783
+ return {
53784
+ id: i.id,
53785
+ uuid: i.uuid,
53786
+ component: i.component
53787
+ };
53788
+ })
53789
+ };
53790
+ setError("Widget not found \u2014 searched for \"".concat(widgetId, "\". Check console for details."));
53754
53791
  return;
53755
53792
  }
53756
53793