@trops/dash-core 0.1.457 → 0.1.458

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
@@ -9294,7 +9294,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
9294
9294
  var hasPropertyDescriptors_1 = hasPropertyDescriptors;
9295
9295
 
9296
9296
  var keys = objectKeys$2;
9297
- var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
9297
+ var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
9298
9298
 
9299
9299
  var toStr$4 = Object.prototype.toString;
9300
9300
  var concat = Array.prototype.concat;
@@ -9327,7 +9327,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
9327
9327
  var defineProperties$1 = function (object, map) {
9328
9328
  var predicates = arguments.length > 2 ? arguments[2] : {};
9329
9329
  var props = keys(map);
9330
- if (hasSymbols$4) {
9330
+ if (hasSymbols$5) {
9331
9331
  props = concat.call(props, Object.getOwnPropertySymbols(map));
9332
9332
  }
9333
9333
  for (var i = 0; i < props.length; i += 1) {
@@ -9393,11 +9393,11 @@ var sign$1 = function sign(number) {
9393
9393
  };
9394
9394
 
9395
9395
  var shams$1;
9396
- var hasRequiredShams$1;
9396
+ var hasRequiredShams;
9397
9397
 
9398
- function requireShams$1 () {
9399
- if (hasRequiredShams$1) return shams$1;
9400
- hasRequiredShams$1 = 1;
9398
+ function requireShams () {
9399
+ if (hasRequiredShams) return shams$1;
9400
+ hasRequiredShams = 1;
9401
9401
 
9402
9402
  /** @type {import('./shams')} */
9403
9403
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -9446,10 +9446,10 @@ function requireShams$1 () {
9446
9446
  }
9447
9447
 
9448
9448
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
9449
- var hasSymbolSham = requireShams$1();
9449
+ var hasSymbolSham = requireShams();
9450
9450
 
9451
9451
  /** @type {import('.')} */
9452
- var hasSymbols$3 = function hasNativeSymbols() {
9452
+ var hasSymbols$4 = function hasNativeSymbols() {
9453
9453
  if (typeof origSymbol !== 'function') { return false; }
9454
9454
  if (typeof Symbol !== 'function') { return false; }
9455
9455
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -9753,7 +9753,7 @@ var ThrowTypeError = $gOPD$1
9753
9753
  }())
9754
9754
  : throwTypeError;
9755
9755
 
9756
- var hasSymbols$2 = hasSymbols$3();
9756
+ var hasSymbols$3 = hasSymbols$4();
9757
9757
 
9758
9758
  var getProto$2 = getProto$3;
9759
9759
  var $ObjectGPO = requireObject_getPrototypeOf();
@@ -9771,7 +9771,7 @@ var INTRINSICS = {
9771
9771
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
9772
9772
  '%Array%': Array,
9773
9773
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
9774
- '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9774
+ '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
9775
9775
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
9776
9776
  '%AsyncFunction%': needsEval,
9777
9777
  '%AsyncGenerator%': needsEval,
@@ -9802,10 +9802,10 @@ var INTRINSICS = {
9802
9802
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
9803
9803
  '%isFinite%': isFinite,
9804
9804
  '%isNaN%': isNaN,
9805
- '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9805
+ '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
9806
9806
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
9807
9807
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
9808
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9808
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
9809
9809
  '%Math%': Math,
9810
9810
  '%Number%': Number,
9811
9811
  '%Object%': $Object$2,
@@ -9819,11 +9819,11 @@ var INTRINSICS = {
9819
9819
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
9820
9820
  '%RegExp%': RegExp,
9821
9821
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
9822
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9822
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
9823
9823
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
9824
9824
  '%String%': String,
9825
- '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9826
- '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
9825
+ '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
9826
+ '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
9827
9827
  '%SyntaxError%': $SyntaxError$1,
9828
9828
  '%ThrowTypeError%': ThrowTypeError,
9829
9829
  '%TypedArray%': TypedArray,
@@ -10176,12 +10176,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
10176
10176
 
10177
10177
  // modified from https://github.com/es-shims/es6-shim
10178
10178
  var objectKeys$1 = objectKeys$2;
10179
- var hasSymbols$1 = requireShams$1()();
10179
+ var hasSymbols$2 = requireShams()();
10180
10180
  var callBound$h = callBound$i;
10181
10181
  var $Object$1 = esObjectAtoms;
10182
10182
  var $push = callBound$h('Array.prototype.push');
10183
10183
  var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
10184
- var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
10184
+ var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
10185
10185
 
10186
10186
  // eslint-disable-next-line no-unused-vars
10187
10187
  var implementation$8 = function assign(target, source1) {
@@ -10195,7 +10195,7 @@ var implementation$8 = function assign(target, source1) {
10195
10195
 
10196
10196
  // step 3.a.ii:
10197
10197
  var keys = objectKeys$1(from);
10198
- var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
10198
+ var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
10199
10199
  if (getSymbols) {
10200
10200
  var syms = getSymbols(from);
10201
10201
  for (var j = 0; j < syms.length; ++j) {
@@ -10492,23 +10492,14 @@ var regexp_prototype_flags = flagsBound;
10492
10492
 
10493
10493
  var esGetIterator = {exports: {}};
10494
10494
 
10495
- var shams;
10496
- var hasRequiredShams;
10497
-
10498
- function requireShams () {
10499
- if (hasRequiredShams) return shams;
10500
- hasRequiredShams = 1;
10501
-
10502
- var hasSymbols = requireShams$1();
10495
+ var hasSymbols$1 = requireShams();
10503
10496
 
10504
- /** @type {import('.')} */
10505
- shams = function hasToStringTagShams() {
10506
- return hasSymbols() && !!Symbol.toStringTag;
10507
- };
10508
- return shams;
10509
- }
10497
+ /** @type {import('.')} */
10498
+ var shams = function hasToStringTagShams() {
10499
+ return hasSymbols$1() && !!Symbol.toStringTag;
10500
+ };
10510
10501
 
10511
- var hasToStringTag$7 = requireShams()();
10502
+ var hasToStringTag$7 = shams();
10512
10503
  var callBound$f = callBound$i;
10513
10504
 
10514
10505
  var $toString$7 = callBound$f('Object.prototype.toString');
@@ -11545,7 +11536,7 @@ var tryStringObject = function tryStringObject(value) {
11545
11536
  /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
11546
11537
  var $toString$6 = callBound$c('Object.prototype.toString');
11547
11538
  var strClass = '[object String]';
11548
- var hasToStringTag$6 = requireShams()();
11539
+ var hasToStringTag$6 = shams();
11549
11540
 
11550
11541
  /** @type {import('.')} */
11551
11542
  var isString$2 = function isString(value) {
@@ -11661,7 +11652,7 @@ var isSet$2 = exported$1 || function isSet(x) {
11661
11652
  var isArguments$1 = isArguments$2;
11662
11653
  var getStopIterationIterator = stopIterationIterator;
11663
11654
 
11664
- if (hasSymbols$3() || requireShams$1()()) {
11655
+ if (hasSymbols$4() || requireShams()()) {
11665
11656
  var $iterator = Symbol.iterator;
11666
11657
  // Symbol is available natively or shammed
11667
11658
  // natively:
@@ -11950,7 +11941,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
11950
11941
  /** @type {(value: unknown) => string} */
11951
11942
  var toStr$2 = callBound$9('Object.prototype.toString');
11952
11943
  var dateClass = '[object Date]';
11953
- var hasToStringTag$5 = requireShams()();
11944
+ var hasToStringTag$5 = shams();
11954
11945
 
11955
11946
  /** @type {import('.')} */
11956
11947
  var isDateObject = function isDateObject(value) {
@@ -11961,7 +11952,7 @@ var isDateObject = function isDateObject(value) {
11961
11952
  };
11962
11953
 
11963
11954
  var callBound$8 = callBound$i;
11964
- var hasToStringTag$4 = requireShams()();
11955
+ var hasToStringTag$4 = shams();
11965
11956
  var hasOwn = hasown;
11966
11957
  var gOPD$1 = gopd$1;
11967
11958
 
@@ -12066,7 +12057,7 @@ var tryNumberObject = function tryNumberObject(value) {
12066
12057
  };
12067
12058
  var $toString$3 = callBound$6('Object.prototype.toString');
12068
12059
  var numClass = '[object Number]';
12069
- var hasToStringTag$3 = requireShams()();
12060
+ var hasToStringTag$3 = shams();
12070
12061
 
12071
12062
  /** @type {import('.')} */
12072
12063
  var isNumberObject = function isNumberObject(value) {
@@ -12093,7 +12084,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
12093
12084
  }
12094
12085
  };
12095
12086
  var boolClass = '[object Boolean]';
12096
- var hasToStringTag$2 = requireShams()();
12087
+ var hasToStringTag$2 = shams();
12097
12088
 
12098
12089
  /** @type {import('.')} */
12099
12090
  var isBooleanObject = function isBoolean(value) {
@@ -12135,7 +12126,7 @@ function requireSafeRegexTest () {
12135
12126
 
12136
12127
  var callBound$4 = callBound$i;
12137
12128
  var $toString$1 = callBound$4('Object.prototype.toString');
12138
- var hasSymbols = hasSymbols$3();
12129
+ var hasSymbols = hasSymbols$4();
12139
12130
  var safeRegexTest = requireSafeRegexTest();
12140
12131
 
12141
12132
  if (hasSymbols) {
@@ -12581,7 +12572,7 @@ var gOPD = gopd$1;
12581
12572
  var getProto = getProto$3;
12582
12573
 
12583
12574
  var $toString = callBound$2('Object.prototype.toString');
12584
- var hasToStringTag = requireShams()();
12575
+ var hasToStringTag = shams();
12585
12576
 
12586
12577
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
12587
12578
  var typedArrays = availableTypedArrays();
@@ -22117,13 +22108,26 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
22117
22108
  // Listen for AI widget builder placement — modifies layout state directly
22118
22109
  useEffect(function () {
22119
22110
  var handler = function handler(e) {
22111
+ var _wsRef$current;
22120
22112
  var _ref4 = e.detail || {},
22121
22113
  widgetComponentName = _ref4.widgetComponentName,
22122
22114
  cellNumber = _ref4.cellNumber,
22123
- gridItemId = _ref4.gridItemId;
22115
+ gridItemId = _ref4.gridItemId,
22116
+ workspaceId = _ref4.workspaceId;
22124
22117
  if (!widgetComponentName || !cellNumber || !gridItemId) return;
22125
22118
  var ws = wsRef.current;
22126
22119
  if (!(ws !== null && ws !== void 0 && ws.layout)) return;
22120
+
22121
+ // Workspace-id guard: multiple LayoutBuilders are mounted (one per
22122
+ // open dashboard tab) and all listen to this global event. If the
22123
+ // event carries a workspaceId, only the matching workspace acts —
22124
+ // otherwise gridItemId collisions across workspaces (small ints)
22125
+ // would let the wrong dashboard handle the placement and silently
22126
+ // overwrite a cell. Older dash-electron versions that don't yet
22127
+ // pass workspaceId fall through (opt-in guard, backward-compatible).
22128
+ if (workspaceId && ((_wsRef$current = wsRef.current) === null || _wsRef$current === void 0 ? void 0 : _wsRef$current.id) !== workspaceId) {
22129
+ return;
22130
+ }
22127
22131
  var gridItem = ws.layout.find(function (item) {
22128
22132
  return item.id === gridItemId;
22129
22133
  });
@@ -22167,12 +22171,21 @@ var LayoutBuilder = function LayoutBuilder(_ref) {
22167
22171
  // Listen for AI widget remix — swaps existing widget component in-place
22168
22172
  useEffect(function () {
22169
22173
  var handler = function handler(e) {
22174
+ var _wsRef$current3;
22170
22175
  var _ref5 = e.detail || {},
22171
22176
  widgetComponentName = _ref5.widgetComponentName,
22172
- widgetId = _ref5.widgetId;
22177
+ widgetId = _ref5.widgetId,
22178
+ workspaceId = _ref5.workspaceId;
22173
22179
  if (!widgetComponentName || !widgetId) return;
22174
22180
  var ws = wsRef.current;
22175
22181
  if (!(ws !== null && ws !== void 0 && ws.layout)) return;
22182
+
22183
+ // Same workspace-id guard as the place-widget handler — keeps
22184
+ // the swap from acting on a different open dashboard's widget
22185
+ // when widgetIds collide across workspaces.
22186
+ if (workspaceId && ((_wsRef$current3 = wsRef.current) === null || _wsRef$current3 === void 0 ? void 0 : _wsRef$current3.id) !== workspaceId) {
22187
+ return;
22188
+ }
22176
22189
  var config = ComponentManager.config(widgetComponentName);
22177
22190
  if (!config) {
22178
22191
  return;