@trops/dash-core 0.1.366 → 0.1.368
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/electron/index.js +36 -7
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +172 -100
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +163 -109
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -8810,7 +8810,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|
|
8810
8810
|
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
8811
8811
|
|
|
8812
8812
|
var keys = objectKeys$2;
|
|
8813
|
-
var hasSymbols$
|
|
8813
|
+
var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
8814
8814
|
|
|
8815
8815
|
var toStr$4 = Object.prototype.toString;
|
|
8816
8816
|
var concat = Array.prototype.concat;
|
|
@@ -8843,7 +8843,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
|
|
|
8843
8843
|
var defineProperties$1 = function (object, map) {
|
|
8844
8844
|
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
8845
8845
|
var props = keys(map);
|
|
8846
|
-
if (hasSymbols$
|
|
8846
|
+
if (hasSymbols$4) {
|
|
8847
8847
|
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
8848
8848
|
}
|
|
8849
8849
|
for (var i = 0; i < props.length; i += 1) {
|
|
@@ -8909,11 +8909,11 @@ var sign$1 = function sign(number) {
|
|
|
8909
8909
|
};
|
|
8910
8910
|
|
|
8911
8911
|
var shams$1;
|
|
8912
|
-
var hasRequiredShams;
|
|
8912
|
+
var hasRequiredShams$1;
|
|
8913
8913
|
|
|
8914
|
-
function requireShams () {
|
|
8915
|
-
if (hasRequiredShams) return shams$1;
|
|
8916
|
-
hasRequiredShams = 1;
|
|
8914
|
+
function requireShams$1 () {
|
|
8915
|
+
if (hasRequiredShams$1) return shams$1;
|
|
8916
|
+
hasRequiredShams$1 = 1;
|
|
8917
8917
|
|
|
8918
8918
|
/** @type {import('./shams')} */
|
|
8919
8919
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
@@ -8962,10 +8962,10 @@ function requireShams () {
|
|
|
8962
8962
|
}
|
|
8963
8963
|
|
|
8964
8964
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
8965
|
-
var hasSymbolSham = requireShams();
|
|
8965
|
+
var hasSymbolSham = requireShams$1();
|
|
8966
8966
|
|
|
8967
8967
|
/** @type {import('.')} */
|
|
8968
|
-
var hasSymbols$
|
|
8968
|
+
var hasSymbols$3 = function hasNativeSymbols() {
|
|
8969
8969
|
if (typeof origSymbol !== 'function') { return false; }
|
|
8970
8970
|
if (typeof Symbol !== 'function') { return false; }
|
|
8971
8971
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
@@ -9269,7 +9269,7 @@ var ThrowTypeError = $gOPD$1
|
|
|
9269
9269
|
}())
|
|
9270
9270
|
: throwTypeError;
|
|
9271
9271
|
|
|
9272
|
-
var hasSymbols$
|
|
9272
|
+
var hasSymbols$2 = hasSymbols$3();
|
|
9273
9273
|
|
|
9274
9274
|
var getProto$2 = getProto$3;
|
|
9275
9275
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
@@ -9287,7 +9287,7 @@ var INTRINSICS = {
|
|
|
9287
9287
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
9288
9288
|
'%Array%': Array,
|
|
9289
9289
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
9290
|
-
'%ArrayIteratorPrototype%': hasSymbols$
|
|
9290
|
+
'%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
|
|
9291
9291
|
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
9292
9292
|
'%AsyncFunction%': needsEval,
|
|
9293
9293
|
'%AsyncGenerator%': needsEval,
|
|
@@ -9318,10 +9318,10 @@ var INTRINSICS = {
|
|
|
9318
9318
|
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
9319
9319
|
'%isFinite%': isFinite,
|
|
9320
9320
|
'%isNaN%': isNaN,
|
|
9321
|
-
'%IteratorPrototype%': hasSymbols$
|
|
9321
|
+
'%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
|
|
9322
9322
|
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
9323
9323
|
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
9324
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$
|
|
9324
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
|
|
9325
9325
|
'%Math%': Math,
|
|
9326
9326
|
'%Number%': Number,
|
|
9327
9327
|
'%Object%': $Object$2,
|
|
@@ -9335,11 +9335,11 @@ var INTRINSICS = {
|
|
|
9335
9335
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
9336
9336
|
'%RegExp%': RegExp,
|
|
9337
9337
|
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
9338
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$
|
|
9338
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
|
|
9339
9339
|
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
9340
9340
|
'%String%': String,
|
|
9341
|
-
'%StringIteratorPrototype%': hasSymbols$
|
|
9342
|
-
'%Symbol%': hasSymbols$
|
|
9341
|
+
'%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
|
|
9342
|
+
'%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
|
|
9343
9343
|
'%SyntaxError%': $SyntaxError$1,
|
|
9344
9344
|
'%ThrowTypeError%': ThrowTypeError,
|
|
9345
9345
|
'%TypedArray%': TypedArray,
|
|
@@ -9692,12 +9692,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
|
|
|
9692
9692
|
|
|
9693
9693
|
// modified from https://github.com/es-shims/es6-shim
|
|
9694
9694
|
var objectKeys$1 = objectKeys$2;
|
|
9695
|
-
var hasSymbols$
|
|
9695
|
+
var hasSymbols$1 = requireShams$1()();
|
|
9696
9696
|
var callBound$h = callBound$i;
|
|
9697
9697
|
var $Object$1 = esObjectAtoms;
|
|
9698
9698
|
var $push = callBound$h('Array.prototype.push');
|
|
9699
9699
|
var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
|
|
9700
|
-
var originalGetSymbols = hasSymbols$
|
|
9700
|
+
var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
|
|
9701
9701
|
|
|
9702
9702
|
// eslint-disable-next-line no-unused-vars
|
|
9703
9703
|
var implementation$8 = function assign(target, source1) {
|
|
@@ -9711,7 +9711,7 @@ var implementation$8 = function assign(target, source1) {
|
|
|
9711
9711
|
|
|
9712
9712
|
// step 3.a.ii:
|
|
9713
9713
|
var keys = objectKeys$1(from);
|
|
9714
|
-
var getSymbols = hasSymbols$
|
|
9714
|
+
var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
|
|
9715
9715
|
if (getSymbols) {
|
|
9716
9716
|
var syms = getSymbols(from);
|
|
9717
9717
|
for (var j = 0; j < syms.length; ++j) {
|
|
@@ -10008,14 +10008,23 @@ var regexp_prototype_flags = flagsBound;
|
|
|
10008
10008
|
|
|
10009
10009
|
var esGetIterator = {exports: {}};
|
|
10010
10010
|
|
|
10011
|
-
var
|
|
10011
|
+
var shams;
|
|
10012
|
+
var hasRequiredShams;
|
|
10012
10013
|
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10014
|
+
function requireShams () {
|
|
10015
|
+
if (hasRequiredShams) return shams;
|
|
10016
|
+
hasRequiredShams = 1;
|
|
10017
|
+
|
|
10018
|
+
var hasSymbols = requireShams$1();
|
|
10019
|
+
|
|
10020
|
+
/** @type {import('.')} */
|
|
10021
|
+
shams = function hasToStringTagShams() {
|
|
10022
|
+
return hasSymbols() && !!Symbol.toStringTag;
|
|
10023
|
+
};
|
|
10024
|
+
return shams;
|
|
10025
|
+
}
|
|
10017
10026
|
|
|
10018
|
-
var hasToStringTag$7 =
|
|
10027
|
+
var hasToStringTag$7 = requireShams()();
|
|
10019
10028
|
var callBound$f = callBound$i;
|
|
10020
10029
|
|
|
10021
10030
|
var $toString$7 = callBound$f('Object.prototype.toString');
|
|
@@ -11052,7 +11061,7 @@ var tryStringObject = function tryStringObject(value) {
|
|
|
11052
11061
|
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
|
|
11053
11062
|
var $toString$6 = callBound$c('Object.prototype.toString');
|
|
11054
11063
|
var strClass = '[object String]';
|
|
11055
|
-
var hasToStringTag$6 =
|
|
11064
|
+
var hasToStringTag$6 = requireShams()();
|
|
11056
11065
|
|
|
11057
11066
|
/** @type {import('.')} */
|
|
11058
11067
|
var isString$2 = function isString(value) {
|
|
@@ -11168,7 +11177,7 @@ var isSet$2 = exported$1 || function isSet(x) {
|
|
|
11168
11177
|
var isArguments$1 = isArguments$2;
|
|
11169
11178
|
var getStopIterationIterator = stopIterationIterator;
|
|
11170
11179
|
|
|
11171
|
-
if (hasSymbols$
|
|
11180
|
+
if (hasSymbols$3() || requireShams$1()()) {
|
|
11172
11181
|
var $iterator = Symbol.iterator;
|
|
11173
11182
|
// Symbol is available natively or shammed
|
|
11174
11183
|
// natively:
|
|
@@ -11457,7 +11466,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
|
|
|
11457
11466
|
/** @type {(value: unknown) => string} */
|
|
11458
11467
|
var toStr$2 = callBound$9('Object.prototype.toString');
|
|
11459
11468
|
var dateClass = '[object Date]';
|
|
11460
|
-
var hasToStringTag$5 =
|
|
11469
|
+
var hasToStringTag$5 = requireShams()();
|
|
11461
11470
|
|
|
11462
11471
|
/** @type {import('.')} */
|
|
11463
11472
|
var isDateObject = function isDateObject(value) {
|
|
@@ -11468,7 +11477,7 @@ var isDateObject = function isDateObject(value) {
|
|
|
11468
11477
|
};
|
|
11469
11478
|
|
|
11470
11479
|
var callBound$8 = callBound$i;
|
|
11471
|
-
var hasToStringTag$4 =
|
|
11480
|
+
var hasToStringTag$4 = requireShams()();
|
|
11472
11481
|
var hasOwn = hasown;
|
|
11473
11482
|
var gOPD$1 = gopd$1;
|
|
11474
11483
|
|
|
@@ -11573,7 +11582,7 @@ var tryNumberObject = function tryNumberObject(value) {
|
|
|
11573
11582
|
};
|
|
11574
11583
|
var $toString$3 = callBound$6('Object.prototype.toString');
|
|
11575
11584
|
var numClass = '[object Number]';
|
|
11576
|
-
var hasToStringTag$3 =
|
|
11585
|
+
var hasToStringTag$3 = requireShams()();
|
|
11577
11586
|
|
|
11578
11587
|
/** @type {import('.')} */
|
|
11579
11588
|
var isNumberObject = function isNumberObject(value) {
|
|
@@ -11600,7 +11609,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
|
|
|
11600
11609
|
}
|
|
11601
11610
|
};
|
|
11602
11611
|
var boolClass = '[object Boolean]';
|
|
11603
|
-
var hasToStringTag$2 =
|
|
11612
|
+
var hasToStringTag$2 = requireShams()();
|
|
11604
11613
|
|
|
11605
11614
|
/** @type {import('.')} */
|
|
11606
11615
|
var isBooleanObject = function isBoolean(value) {
|
|
@@ -11642,7 +11651,7 @@ function requireSafeRegexTest () {
|
|
|
11642
11651
|
|
|
11643
11652
|
var callBound$4 = callBound$i;
|
|
11644
11653
|
var $toString$1 = callBound$4('Object.prototype.toString');
|
|
11645
|
-
var hasSymbols = hasSymbols$
|
|
11654
|
+
var hasSymbols = hasSymbols$3();
|
|
11646
11655
|
var safeRegexTest = requireSafeRegexTest();
|
|
11647
11656
|
|
|
11648
11657
|
if (hasSymbols) {
|
|
@@ -12088,7 +12097,7 @@ var gOPD = gopd$1;
|
|
|
12088
12097
|
var getProto = getProto$3;
|
|
12089
12098
|
|
|
12090
12099
|
var $toString = callBound$2('Object.prototype.toString');
|
|
12091
|
-
var hasToStringTag =
|
|
12100
|
+
var hasToStringTag = requireShams()();
|
|
12092
12101
|
|
|
12093
12102
|
var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
12094
12103
|
var typedArrays = availableTypedArrays();
|
|
@@ -38818,8 +38827,29 @@ var BUMP_OPTIONS$1 = [{
|
|
|
38818
38827
|
label: "Keep current version"
|
|
38819
38828
|
}];
|
|
38820
38829
|
|
|
38830
|
+
// Parse "@scope/name" → { scope, packageName }. Returns empty strings
|
|
38831
|
+
// for unscoped names so callers can use the || fallback chain.
|
|
38832
|
+
function parseScopeAndName(sourcePackage) {
|
|
38833
|
+
if (!sourcePackage) return {
|
|
38834
|
+
scope: "",
|
|
38835
|
+
packageName: ""
|
|
38836
|
+
};
|
|
38837
|
+
var m = sourcePackage.match(/^@([^/]+)\/(.+)$/);
|
|
38838
|
+
if (m) return {
|
|
38839
|
+
scope: m[1],
|
|
38840
|
+
packageName: m[2]
|
|
38841
|
+
};
|
|
38842
|
+
return {
|
|
38843
|
+
scope: "",
|
|
38844
|
+
packageName: sourcePackage
|
|
38845
|
+
};
|
|
38846
|
+
}
|
|
38847
|
+
|
|
38821
38848
|
// Pulled out as a small helper so the Dependencies loader and the
|
|
38822
|
-
// dashboard publish call share the same shape.
|
|
38849
|
+
// dashboard publish call share the same shape. Widgets registered from
|
|
38850
|
+
// a package (via `_sourcePackage`) inherit scope + packageName from that
|
|
38851
|
+
// package ID — otherwise the main-process resolver has no way to map a
|
|
38852
|
+
// bare component name to its owning package.
|
|
38823
38853
|
function collectComponentConfigs() {
|
|
38824
38854
|
var configMap = ComponentManager.componentMap();
|
|
38825
38855
|
var componentConfigs = {};
|
|
@@ -38827,12 +38857,23 @@ function collectComponentConfigs() {
|
|
|
38827
38857
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
38828
38858
|
key = _Object$entries$_i[0],
|
|
38829
38859
|
config = _Object$entries$_i[1];
|
|
38830
|
-
if (config
|
|
38831
|
-
|
|
38832
|
-
|
|
38833
|
-
|
|
38834
|
-
|
|
38835
|
-
|
|
38860
|
+
if (!config || config.type !== "widget") continue;
|
|
38861
|
+
var hasExplicit = config.id || config.scope || config.packageName || config._sourcePackage;
|
|
38862
|
+
if (!hasExplicit) continue;
|
|
38863
|
+
var parsed = parseScopeAndName(config._sourcePackage);
|
|
38864
|
+
var entry = {
|
|
38865
|
+
id: config.id || null,
|
|
38866
|
+
scope: config.scope || parsed.scope || "",
|
|
38867
|
+
packageName: config.packageName || parsed.packageName || ""
|
|
38868
|
+
};
|
|
38869
|
+
// Key by the ComponentManager registration key (what layouts
|
|
38870
|
+
// actually store) AND by config.name (display name). The layout
|
|
38871
|
+
// writes the component name, so keying only by config.name broke
|
|
38872
|
+
// registry lookup for widgets whose display name differs from
|
|
38873
|
+
// their component name (common for AI-built widgets).
|
|
38874
|
+
componentConfigs[key] = entry;
|
|
38875
|
+
if (config.name && config.name !== key) {
|
|
38876
|
+
componentConfigs[config.name] = entry;
|
|
38836
38877
|
}
|
|
38837
38878
|
}
|
|
38838
38879
|
return componentConfigs;
|
|
@@ -39155,7 +39196,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39155
39196
|
}
|
|
39156
39197
|
function _handlePublish() {
|
|
39157
39198
|
_handlePublish = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
39158
|
-
var steps, _iterator2, _step2, w, _key2, _sel, key, sel, updateStep, i, _step3, _res$manifest, bump, options, res, _res, _options, _res2, _t2, _t3;
|
|
39199
|
+
var steps, seenPackages, _iterator2, _step2, w, _key2, _sel, key, sel, updateStep, i, _step3, _res$manifest, bump, options, res, _res, _options, _res2, _t2, _t3;
|
|
39159
39200
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
39160
39201
|
while (1) switch (_context2.prev = _context2.next) {
|
|
39161
39202
|
case 0:
|
|
@@ -39168,19 +39209,21 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39168
39209
|
setIsPublishing(true);
|
|
39169
39210
|
setResult(null);
|
|
39170
39211
|
|
|
39171
|
-
// Build the ordered step list:
|
|
39172
|
-
// Third-party deps aren't
|
|
39212
|
+
// Build the ordered step list: one step per unique widget package,
|
|
39213
|
+
// then theme, then the dashboard itself. Third-party deps aren't
|
|
39214
|
+
// published — they're just referenced by the manifest.
|
|
39173
39215
|
steps = [];
|
|
39174
39216
|
if (!plan) {
|
|
39175
|
-
_context2.next =
|
|
39217
|
+
_context2.next = 12;
|
|
39176
39218
|
break;
|
|
39177
39219
|
}
|
|
39220
|
+
seenPackages = new Set();
|
|
39178
39221
|
_iterator2 = _createForOfIteratorHelper$9(plan.widgets || []);
|
|
39179
39222
|
_context2.prev = 2;
|
|
39180
39223
|
_iterator2.s();
|
|
39181
39224
|
case 3:
|
|
39182
39225
|
if ((_step2 = _iterator2.n()).done) {
|
|
39183
|
-
_context2.next =
|
|
39226
|
+
_context2.next = 8;
|
|
39184
39227
|
break;
|
|
39185
39228
|
}
|
|
39186
39229
|
w = _step2.value;
|
|
@@ -39188,16 +39231,23 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39188
39231
|
_context2.next = 4;
|
|
39189
39232
|
break;
|
|
39190
39233
|
}
|
|
39191
|
-
return _context2.abrupt("continue",
|
|
39234
|
+
return _context2.abrupt("continue", 7);
|
|
39192
39235
|
case 4:
|
|
39193
39236
|
_key2 = "".concat(w.scope, "/").concat(w.packageName);
|
|
39194
|
-
|
|
39195
|
-
if (!(!_sel || !_sel.owned || !_sel.include)) {
|
|
39237
|
+
if (!seenPackages.has(_key2)) {
|
|
39196
39238
|
_context2.next = 5;
|
|
39197
39239
|
break;
|
|
39198
39240
|
}
|
|
39199
|
-
return _context2.abrupt("continue",
|
|
39241
|
+
return _context2.abrupt("continue", 7);
|
|
39200
39242
|
case 5:
|
|
39243
|
+
_sel = depSelections[_key2];
|
|
39244
|
+
if (!(!_sel || !_sel.owned || !_sel.include)) {
|
|
39245
|
+
_context2.next = 6;
|
|
39246
|
+
break;
|
|
39247
|
+
}
|
|
39248
|
+
return _context2.abrupt("continue", 7);
|
|
39249
|
+
case 6:
|
|
39250
|
+
seenPackages.add(_key2);
|
|
39201
39251
|
steps.push({
|
|
39202
39252
|
kind: "widget",
|
|
39203
39253
|
key: _key2,
|
|
@@ -39205,21 +39255,21 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39205
39255
|
packageId: w.packageId || "".concat(w.scope, "/").concat(w.packageName),
|
|
39206
39256
|
selection: _sel
|
|
39207
39257
|
});
|
|
39208
|
-
case 6:
|
|
39209
|
-
_context2.next = 3;
|
|
39210
|
-
break;
|
|
39211
39258
|
case 7:
|
|
39212
|
-
_context2.next =
|
|
39259
|
+
_context2.next = 3;
|
|
39213
39260
|
break;
|
|
39214
39261
|
case 8:
|
|
39215
|
-
_context2.
|
|
39216
|
-
|
|
39217
|
-
_iterator2.e(_t2);
|
|
39262
|
+
_context2.next = 10;
|
|
39263
|
+
break;
|
|
39218
39264
|
case 9:
|
|
39219
39265
|
_context2.prev = 9;
|
|
39220
|
-
|
|
39221
|
-
|
|
39266
|
+
_t2 = _context2["catch"](2);
|
|
39267
|
+
_iterator2.e(_t2);
|
|
39222
39268
|
case 10:
|
|
39269
|
+
_context2.prev = 10;
|
|
39270
|
+
_iterator2.f();
|
|
39271
|
+
return _context2.finish(10);
|
|
39272
|
+
case 11:
|
|
39223
39273
|
if (plan.theme && plan.theme.scope && plan.theme.name) {
|
|
39224
39274
|
key = "".concat(plan.theme.scope, "/").concat(plan.theme.name);
|
|
39225
39275
|
sel = depSelections[key];
|
|
@@ -39233,7 +39283,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39233
39283
|
});
|
|
39234
39284
|
}
|
|
39235
39285
|
}
|
|
39236
|
-
case
|
|
39286
|
+
case 12:
|
|
39237
39287
|
steps.push({
|
|
39238
39288
|
kind: "dashboard",
|
|
39239
39289
|
key: "dashboard",
|
|
@@ -39254,11 +39304,11 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39254
39304
|
return next;
|
|
39255
39305
|
});
|
|
39256
39306
|
};
|
|
39257
|
-
_context2.prev =
|
|
39307
|
+
_context2.prev = 13;
|
|
39258
39308
|
i = 0;
|
|
39259
|
-
case
|
|
39309
|
+
case 14:
|
|
39260
39310
|
if (!(i < steps.length)) {
|
|
39261
|
-
_context2.next =
|
|
39311
|
+
_context2.next = 24;
|
|
39262
39312
|
break;
|
|
39263
39313
|
}
|
|
39264
39314
|
_step3 = steps[i];
|
|
@@ -39266,7 +39316,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39266
39316
|
status: "running"
|
|
39267
39317
|
});
|
|
39268
39318
|
if (!(_step3.kind === "widget")) {
|
|
39269
|
-
_context2.next =
|
|
39319
|
+
_context2.next = 17;
|
|
39270
39320
|
break;
|
|
39271
39321
|
}
|
|
39272
39322
|
bump = _step3.selection.bump;
|
|
@@ -39275,12 +39325,12 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39275
39325
|
} : {}), {}, {
|
|
39276
39326
|
visibility: _step3.selection.visibility
|
|
39277
39327
|
});
|
|
39278
|
-
_context2.next =
|
|
39328
|
+
_context2.next = 15;
|
|
39279
39329
|
return window.mainApi.registry.publishWidget(appId, _step3.packageId, options);
|
|
39280
|
-
case
|
|
39330
|
+
case 15:
|
|
39281
39331
|
res = _context2.sent;
|
|
39282
39332
|
if (res !== null && res !== void 0 && res.success) {
|
|
39283
|
-
_context2.next =
|
|
39333
|
+
_context2.next = 16;
|
|
39284
39334
|
break;
|
|
39285
39335
|
}
|
|
39286
39336
|
updateStep(i, {
|
|
@@ -39293,26 +39343,26 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39293
39343
|
});
|
|
39294
39344
|
setIsPublishing(false);
|
|
39295
39345
|
return _context2.abrupt("return");
|
|
39296
|
-
case
|
|
39346
|
+
case 16:
|
|
39297
39347
|
updateStep(i, {
|
|
39298
39348
|
status: "complete",
|
|
39299
39349
|
message: "v".concat(res.newVersion || ((_res$manifest = res.manifest) === null || _res$manifest === void 0 ? void 0 : _res$manifest.version))
|
|
39300
39350
|
});
|
|
39301
|
-
_context2.next =
|
|
39351
|
+
_context2.next = 23;
|
|
39302
39352
|
break;
|
|
39303
|
-
case
|
|
39353
|
+
case 17:
|
|
39304
39354
|
if (!(_step3.kind === "theme")) {
|
|
39305
|
-
_context2.next =
|
|
39355
|
+
_context2.next = 20;
|
|
39306
39356
|
break;
|
|
39307
39357
|
}
|
|
39308
|
-
_context2.next =
|
|
39358
|
+
_context2.next = 18;
|
|
39309
39359
|
return window.mainApi.themes.publishTheme(appId, _step3.themeKey, {
|
|
39310
39360
|
visibility: _step3.selection.visibility
|
|
39311
39361
|
});
|
|
39312
|
-
case
|
|
39362
|
+
case 18:
|
|
39313
39363
|
_res = _context2.sent;
|
|
39314
39364
|
if (_res !== null && _res !== void 0 && _res.success) {
|
|
39315
|
-
_context2.next =
|
|
39365
|
+
_context2.next = 19;
|
|
39316
39366
|
break;
|
|
39317
39367
|
}
|
|
39318
39368
|
updateStep(i, {
|
|
@@ -39325,16 +39375,16 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39325
39375
|
});
|
|
39326
39376
|
setIsPublishing(false);
|
|
39327
39377
|
return _context2.abrupt("return");
|
|
39328
|
-
case
|
|
39378
|
+
case 19:
|
|
39329
39379
|
updateStep(i, {
|
|
39330
39380
|
status: "complete",
|
|
39331
39381
|
message: "published"
|
|
39332
39382
|
});
|
|
39333
|
-
_context2.next =
|
|
39383
|
+
_context2.next = 23;
|
|
39334
39384
|
break;
|
|
39335
|
-
case
|
|
39385
|
+
case 20:
|
|
39336
39386
|
if (!(_step3.kind === "dashboard")) {
|
|
39337
|
-
_context2.next =
|
|
39387
|
+
_context2.next = 23;
|
|
39338
39388
|
break;
|
|
39339
39389
|
}
|
|
39340
39390
|
_options = {
|
|
@@ -39345,12 +39395,12 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39345
39395
|
visibility: visibility,
|
|
39346
39396
|
componentConfigs: collectComponentConfigs()
|
|
39347
39397
|
};
|
|
39348
|
-
_context2.next =
|
|
39398
|
+
_context2.next = 21;
|
|
39349
39399
|
return window.mainApi.dashboardConfig.prepareDashboardForPublish(appId, workspaceId, _options);
|
|
39350
|
-
case
|
|
39400
|
+
case 21:
|
|
39351
39401
|
_res2 = _context2.sent;
|
|
39352
39402
|
if (_res2 !== null && _res2 !== void 0 && _res2.success) {
|
|
39353
|
-
_context2.next =
|
|
39403
|
+
_context2.next = 22;
|
|
39354
39404
|
break;
|
|
39355
39405
|
}
|
|
39356
39406
|
updateStep(i, {
|
|
@@ -39363,35 +39413,35 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39363
39413
|
});
|
|
39364
39414
|
setIsPublishing(false);
|
|
39365
39415
|
return _context2.abrupt("return");
|
|
39366
|
-
case
|
|
39416
|
+
case 22:
|
|
39367
39417
|
updateStep(i, {
|
|
39368
39418
|
status: "complete",
|
|
39369
39419
|
message: "published"
|
|
39370
39420
|
});
|
|
39371
39421
|
setResult(_res2);
|
|
39372
|
-
case 22:
|
|
39373
|
-
i++;
|
|
39374
|
-
_context2.next = 13;
|
|
39375
|
-
break;
|
|
39376
39422
|
case 23:
|
|
39377
|
-
|
|
39423
|
+
i++;
|
|
39424
|
+
_context2.next = 14;
|
|
39378
39425
|
break;
|
|
39379
39426
|
case 24:
|
|
39380
|
-
_context2.
|
|
39381
|
-
|
|
39427
|
+
_context2.next = 26;
|
|
39428
|
+
break;
|
|
39429
|
+
case 25:
|
|
39430
|
+
_context2.prev = 25;
|
|
39431
|
+
_t3 = _context2["catch"](13);
|
|
39382
39432
|
setResult({
|
|
39383
39433
|
success: false,
|
|
39384
39434
|
error: _t3.message || "Failed to prepare dashboard for publish."
|
|
39385
39435
|
});
|
|
39386
|
-
case 25:
|
|
39387
|
-
_context2.prev = 25;
|
|
39388
|
-
setIsPublishing(false);
|
|
39389
|
-
return _context2.finish(25);
|
|
39390
39436
|
case 26:
|
|
39437
|
+
_context2.prev = 26;
|
|
39438
|
+
setIsPublishing(false);
|
|
39439
|
+
return _context2.finish(26);
|
|
39440
|
+
case 27:
|
|
39391
39441
|
case "end":
|
|
39392
39442
|
return _context2.stop();
|
|
39393
39443
|
}
|
|
39394
|
-
}, _callee2, null, [[2,
|
|
39444
|
+
}, _callee2, null, [[2, 9, 10, 11], [13, 25, 26, 27]]);
|
|
39395
39445
|
}));
|
|
39396
39446
|
return _handlePublish.apply(this, arguments);
|
|
39397
39447
|
}
|
|
@@ -40029,7 +40079,10 @@ function DependencyTable(_ref4) {
|
|
|
40029
40079
|
var plan = _ref4.plan,
|
|
40030
40080
|
selections = _ref4.selections,
|
|
40031
40081
|
_onChange = _ref4.onChange;
|
|
40032
|
-
|
|
40082
|
+
// Dedupe: multiple widgets from the same package collapse into a single
|
|
40083
|
+
// row. Each row shows the list of component widgets that live inside it
|
|
40084
|
+
// so the user knows what's getting published.
|
|
40085
|
+
var byKey = new Map();
|
|
40033
40086
|
var _iterator3 = _createForOfIteratorHelper$9(plan.widgets || []),
|
|
40034
40087
|
_step4;
|
|
40035
40088
|
try {
|
|
@@ -40037,23 +40090,32 @@ function DependencyTable(_ref4) {
|
|
|
40037
40090
|
var w = _step4.value;
|
|
40038
40091
|
if (!w.scope || !w.packageName) continue;
|
|
40039
40092
|
var _key3 = "".concat(w.scope, "/").concat(w.packageName);
|
|
40040
|
-
|
|
40093
|
+
var entry = byKey.get(_key3) || {
|
|
40041
40094
|
key: _key3,
|
|
40042
40095
|
kind: "widget",
|
|
40043
|
-
data: w
|
|
40044
|
-
|
|
40096
|
+
data: w,
|
|
40097
|
+
widgetNames: new Set()
|
|
40098
|
+
};
|
|
40099
|
+
if (w.component) entry.widgetNames.add(w.component);
|
|
40100
|
+
byKey.set(_key3, entry);
|
|
40045
40101
|
}
|
|
40046
40102
|
} catch (err) {
|
|
40047
40103
|
_iterator3.e(err);
|
|
40048
40104
|
} finally {
|
|
40049
40105
|
_iterator3.f();
|
|
40050
40106
|
}
|
|
40107
|
+
var rows = Array.from(byKey.values()).map(function (e) {
|
|
40108
|
+
return _objectSpread$o(_objectSpread$o({}, e), {}, {
|
|
40109
|
+
widgetNames: Array.from(e.widgetNames).sort()
|
|
40110
|
+
});
|
|
40111
|
+
});
|
|
40051
40112
|
if (plan.theme && plan.theme.scope && plan.theme.name) {
|
|
40052
40113
|
var key = "".concat(plan.theme.scope, "/").concat(plan.theme.name);
|
|
40053
40114
|
rows.push({
|
|
40054
40115
|
key: key,
|
|
40055
40116
|
kind: "theme",
|
|
40056
|
-
data: plan.theme
|
|
40117
|
+
data: plan.theme,
|
|
40118
|
+
widgetNames: []
|
|
40057
40119
|
});
|
|
40058
40120
|
}
|
|
40059
40121
|
if (rows.length === 0) {
|
|
@@ -40067,7 +40129,8 @@ function DependencyTable(_ref4) {
|
|
|
40067
40129
|
children: rows.map(function (_ref5) {
|
|
40068
40130
|
var key = _ref5.key,
|
|
40069
40131
|
kind = _ref5.kind,
|
|
40070
|
-
data = _ref5.data
|
|
40132
|
+
data = _ref5.data,
|
|
40133
|
+
widgetNames = _ref5.widgetNames;
|
|
40071
40134
|
var sel = selections[key];
|
|
40072
40135
|
if (!sel) return null;
|
|
40073
40136
|
var reg = data.registry;
|
|
@@ -40096,8 +40159,11 @@ function DependencyTable(_ref4) {
|
|
|
40096
40159
|
children: [/*#__PURE__*/jsxs("div", {
|
|
40097
40160
|
className: "flex items-center gap-2 flex-wrap",
|
|
40098
40161
|
children: [/*#__PURE__*/jsxs("div", {
|
|
40099
|
-
className: "text-sm font-medium truncate",
|
|
40100
|
-
children: [data.scope, "/", data.packageName || data.name]
|
|
40162
|
+
className: "text-sm font-medium truncate font-mono",
|
|
40163
|
+
children: ["@", data.publishScope || data.scope, "/", data.packageName || data.name]
|
|
40164
|
+
}), data.publishScope && data.scope && data.publishScope !== data.scope && /*#__PURE__*/jsxs("span", {
|
|
40165
|
+
className: "text-[10px] opacity-50 font-mono",
|
|
40166
|
+
children: ["(local @", data.scope, "/", data.packageName, ")"]
|
|
40101
40167
|
}), /*#__PURE__*/jsx("span", {
|
|
40102
40168
|
className: "text-[10px] px-1.5 py-0.5 rounded ".concat(kind === "theme" ? "bg-purple-900/30 text-purple-200" : "bg-blue-900/30 text-blue-200"),
|
|
40103
40169
|
children: kind
|
|
@@ -40112,6 +40178,12 @@ function DependencyTable(_ref4) {
|
|
|
40112
40178
|
}) : /*#__PURE__*/jsx(Fragment, {
|
|
40113
40179
|
children: " \xB7 Not yet in registry"
|
|
40114
40180
|
})]
|
|
40181
|
+
}), kind === "widget" && widgetNames && widgetNames.length > 0 && /*#__PURE__*/jsxs("div", {
|
|
40182
|
+
className: "text-[11px] opacity-60 mt-1",
|
|
40183
|
+
children: ["Bundles ", widgetNames.length, " widget", widgetNames.length === 1 ? "" : "s", ":", " ", /*#__PURE__*/jsx("span", {
|
|
40184
|
+
className: "opacity-80",
|
|
40185
|
+
children: widgetNames.join(", ")
|
|
40186
|
+
})]
|
|
40115
40187
|
}), sel.owned && sel.include && /*#__PURE__*/jsxs("div", {
|
|
40116
40188
|
className: "mt-2 flex items-center gap-3 flex-wrap",
|
|
40117
40189
|
children: [/*#__PURE__*/jsxs("label", {
|