@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.js
CHANGED
|
@@ -8828,7 +8828,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|
|
8828
8828
|
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
8829
8829
|
|
|
8830
8830
|
var keys = objectKeys$2;
|
|
8831
|
-
var hasSymbols$
|
|
8831
|
+
var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
8832
8832
|
|
|
8833
8833
|
var toStr$4 = Object.prototype.toString;
|
|
8834
8834
|
var concat = Array.prototype.concat;
|
|
@@ -8861,7 +8861,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
|
|
|
8861
8861
|
var defineProperties$1 = function (object, map) {
|
|
8862
8862
|
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
8863
8863
|
var props = keys(map);
|
|
8864
|
-
if (hasSymbols$
|
|
8864
|
+
if (hasSymbols$5) {
|
|
8865
8865
|
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
8866
8866
|
}
|
|
8867
8867
|
for (var i = 0; i < props.length; i += 1) {
|
|
@@ -8927,11 +8927,11 @@ var sign$1 = function sign(number) {
|
|
|
8927
8927
|
};
|
|
8928
8928
|
|
|
8929
8929
|
var shams$1;
|
|
8930
|
-
var hasRequiredShams
|
|
8930
|
+
var hasRequiredShams;
|
|
8931
8931
|
|
|
8932
|
-
function requireShams
|
|
8933
|
-
if (hasRequiredShams
|
|
8934
|
-
hasRequiredShams
|
|
8932
|
+
function requireShams () {
|
|
8933
|
+
if (hasRequiredShams) return shams$1;
|
|
8934
|
+
hasRequiredShams = 1;
|
|
8935
8935
|
|
|
8936
8936
|
/** @type {import('./shams')} */
|
|
8937
8937
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
@@ -8980,10 +8980,10 @@ function requireShams$1 () {
|
|
|
8980
8980
|
}
|
|
8981
8981
|
|
|
8982
8982
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
8983
|
-
var hasSymbolSham = requireShams
|
|
8983
|
+
var hasSymbolSham = requireShams();
|
|
8984
8984
|
|
|
8985
8985
|
/** @type {import('.')} */
|
|
8986
|
-
var hasSymbols$
|
|
8986
|
+
var hasSymbols$4 = function hasNativeSymbols() {
|
|
8987
8987
|
if (typeof origSymbol !== 'function') { return false; }
|
|
8988
8988
|
if (typeof Symbol !== 'function') { return false; }
|
|
8989
8989
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
@@ -9287,7 +9287,7 @@ var ThrowTypeError = $gOPD$1
|
|
|
9287
9287
|
}())
|
|
9288
9288
|
: throwTypeError;
|
|
9289
9289
|
|
|
9290
|
-
var hasSymbols$
|
|
9290
|
+
var hasSymbols$3 = hasSymbols$4();
|
|
9291
9291
|
|
|
9292
9292
|
var getProto$2 = getProto$3;
|
|
9293
9293
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
@@ -9305,7 +9305,7 @@ var INTRINSICS = {
|
|
|
9305
9305
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
9306
9306
|
'%Array%': Array,
|
|
9307
9307
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
9308
|
-
'%ArrayIteratorPrototype%': hasSymbols$
|
|
9308
|
+
'%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
|
|
9309
9309
|
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
9310
9310
|
'%AsyncFunction%': needsEval,
|
|
9311
9311
|
'%AsyncGenerator%': needsEval,
|
|
@@ -9336,10 +9336,10 @@ var INTRINSICS = {
|
|
|
9336
9336
|
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
9337
9337
|
'%isFinite%': isFinite,
|
|
9338
9338
|
'%isNaN%': isNaN,
|
|
9339
|
-
'%IteratorPrototype%': hasSymbols$
|
|
9339
|
+
'%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
|
|
9340
9340
|
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
9341
9341
|
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
9342
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$
|
|
9342
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
|
|
9343
9343
|
'%Math%': Math,
|
|
9344
9344
|
'%Number%': Number,
|
|
9345
9345
|
'%Object%': $Object$2,
|
|
@@ -9353,11 +9353,11 @@ var INTRINSICS = {
|
|
|
9353
9353
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
9354
9354
|
'%RegExp%': RegExp,
|
|
9355
9355
|
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
9356
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$
|
|
9356
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
|
|
9357
9357
|
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
9358
9358
|
'%String%': String,
|
|
9359
|
-
'%StringIteratorPrototype%': hasSymbols$
|
|
9360
|
-
'%Symbol%': hasSymbols$
|
|
9359
|
+
'%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
|
|
9360
|
+
'%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
|
|
9361
9361
|
'%SyntaxError%': $SyntaxError$1,
|
|
9362
9362
|
'%ThrowTypeError%': ThrowTypeError,
|
|
9363
9363
|
'%TypedArray%': TypedArray,
|
|
@@ -9710,12 +9710,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
|
|
|
9710
9710
|
|
|
9711
9711
|
// modified from https://github.com/es-shims/es6-shim
|
|
9712
9712
|
var objectKeys$1 = objectKeys$2;
|
|
9713
|
-
var hasSymbols$
|
|
9713
|
+
var hasSymbols$2 = requireShams()();
|
|
9714
9714
|
var callBound$h = callBound$i;
|
|
9715
9715
|
var $Object$1 = esObjectAtoms;
|
|
9716
9716
|
var $push = callBound$h('Array.prototype.push');
|
|
9717
9717
|
var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
|
|
9718
|
-
var originalGetSymbols = hasSymbols$
|
|
9718
|
+
var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
|
|
9719
9719
|
|
|
9720
9720
|
// eslint-disable-next-line no-unused-vars
|
|
9721
9721
|
var implementation$8 = function assign(target, source1) {
|
|
@@ -9729,7 +9729,7 @@ var implementation$8 = function assign(target, source1) {
|
|
|
9729
9729
|
|
|
9730
9730
|
// step 3.a.ii:
|
|
9731
9731
|
var keys = objectKeys$1(from);
|
|
9732
|
-
var getSymbols = hasSymbols$
|
|
9732
|
+
var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
|
|
9733
9733
|
if (getSymbols) {
|
|
9734
9734
|
var syms = getSymbols(from);
|
|
9735
9735
|
for (var j = 0; j < syms.length; ++j) {
|
|
@@ -10026,23 +10026,14 @@ var regexp_prototype_flags = flagsBound;
|
|
|
10026
10026
|
|
|
10027
10027
|
var esGetIterator = {exports: {}};
|
|
10028
10028
|
|
|
10029
|
-
var
|
|
10030
|
-
var hasRequiredShams;
|
|
10031
|
-
|
|
10032
|
-
function requireShams () {
|
|
10033
|
-
if (hasRequiredShams) return shams;
|
|
10034
|
-
hasRequiredShams = 1;
|
|
10029
|
+
var hasSymbols$1 = requireShams();
|
|
10035
10030
|
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
return hasSymbols() && !!Symbol.toStringTag;
|
|
10041
|
-
};
|
|
10042
|
-
return shams;
|
|
10043
|
-
}
|
|
10031
|
+
/** @type {import('.')} */
|
|
10032
|
+
var shams = function hasToStringTagShams() {
|
|
10033
|
+
return hasSymbols$1() && !!Symbol.toStringTag;
|
|
10034
|
+
};
|
|
10044
10035
|
|
|
10045
|
-
var hasToStringTag$7 =
|
|
10036
|
+
var hasToStringTag$7 = shams();
|
|
10046
10037
|
var callBound$f = callBound$i;
|
|
10047
10038
|
|
|
10048
10039
|
var $toString$7 = callBound$f('Object.prototype.toString');
|
|
@@ -11079,7 +11070,7 @@ var tryStringObject = function tryStringObject(value) {
|
|
|
11079
11070
|
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
|
|
11080
11071
|
var $toString$6 = callBound$c('Object.prototype.toString');
|
|
11081
11072
|
var strClass = '[object String]';
|
|
11082
|
-
var hasToStringTag$6 =
|
|
11073
|
+
var hasToStringTag$6 = shams();
|
|
11083
11074
|
|
|
11084
11075
|
/** @type {import('.')} */
|
|
11085
11076
|
var isString$2 = function isString(value) {
|
|
@@ -11195,7 +11186,7 @@ var isSet$2 = exported$1 || function isSet(x) {
|
|
|
11195
11186
|
var isArguments$1 = isArguments$2;
|
|
11196
11187
|
var getStopIterationIterator = stopIterationIterator;
|
|
11197
11188
|
|
|
11198
|
-
if (hasSymbols$
|
|
11189
|
+
if (hasSymbols$4() || requireShams()()) {
|
|
11199
11190
|
var $iterator = Symbol.iterator;
|
|
11200
11191
|
// Symbol is available natively or shammed
|
|
11201
11192
|
// natively:
|
|
@@ -11484,7 +11475,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
|
|
|
11484
11475
|
/** @type {(value: unknown) => string} */
|
|
11485
11476
|
var toStr$2 = callBound$9('Object.prototype.toString');
|
|
11486
11477
|
var dateClass = '[object Date]';
|
|
11487
|
-
var hasToStringTag$5 =
|
|
11478
|
+
var hasToStringTag$5 = shams();
|
|
11488
11479
|
|
|
11489
11480
|
/** @type {import('.')} */
|
|
11490
11481
|
var isDateObject = function isDateObject(value) {
|
|
@@ -11495,7 +11486,7 @@ var isDateObject = function isDateObject(value) {
|
|
|
11495
11486
|
};
|
|
11496
11487
|
|
|
11497
11488
|
var callBound$8 = callBound$i;
|
|
11498
|
-
var hasToStringTag$4 =
|
|
11489
|
+
var hasToStringTag$4 = shams();
|
|
11499
11490
|
var hasOwn = hasown;
|
|
11500
11491
|
var gOPD$1 = gopd$1;
|
|
11501
11492
|
|
|
@@ -11600,7 +11591,7 @@ var tryNumberObject = function tryNumberObject(value) {
|
|
|
11600
11591
|
};
|
|
11601
11592
|
var $toString$3 = callBound$6('Object.prototype.toString');
|
|
11602
11593
|
var numClass = '[object Number]';
|
|
11603
|
-
var hasToStringTag$3 =
|
|
11594
|
+
var hasToStringTag$3 = shams();
|
|
11604
11595
|
|
|
11605
11596
|
/** @type {import('.')} */
|
|
11606
11597
|
var isNumberObject = function isNumberObject(value) {
|
|
@@ -11627,7 +11618,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
|
|
|
11627
11618
|
}
|
|
11628
11619
|
};
|
|
11629
11620
|
var boolClass = '[object Boolean]';
|
|
11630
|
-
var hasToStringTag$2 =
|
|
11621
|
+
var hasToStringTag$2 = shams();
|
|
11631
11622
|
|
|
11632
11623
|
/** @type {import('.')} */
|
|
11633
11624
|
var isBooleanObject = function isBoolean(value) {
|
|
@@ -11669,7 +11660,7 @@ function requireSafeRegexTest () {
|
|
|
11669
11660
|
|
|
11670
11661
|
var callBound$4 = callBound$i;
|
|
11671
11662
|
var $toString$1 = callBound$4('Object.prototype.toString');
|
|
11672
|
-
var hasSymbols = hasSymbols$
|
|
11663
|
+
var hasSymbols = hasSymbols$4();
|
|
11673
11664
|
var safeRegexTest = requireSafeRegexTest();
|
|
11674
11665
|
|
|
11675
11666
|
if (hasSymbols) {
|
|
@@ -12115,7 +12106,7 @@ var gOPD = gopd$1;
|
|
|
12115
12106
|
var getProto = getProto$3;
|
|
12116
12107
|
|
|
12117
12108
|
var $toString = callBound$2('Object.prototype.toString');
|
|
12118
|
-
var hasToStringTag =
|
|
12109
|
+
var hasToStringTag = shams();
|
|
12119
12110
|
|
|
12120
12111
|
var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
12121
12112
|
var typedArrays = availableTypedArrays();
|
|
@@ -38845,8 +38836,29 @@ var BUMP_OPTIONS$1 = [{
|
|
|
38845
38836
|
label: "Keep current version"
|
|
38846
38837
|
}];
|
|
38847
38838
|
|
|
38839
|
+
// Parse "@scope/name" → { scope, packageName }. Returns empty strings
|
|
38840
|
+
// for unscoped names so callers can use the || fallback chain.
|
|
38841
|
+
function parseScopeAndName(sourcePackage) {
|
|
38842
|
+
if (!sourcePackage) return {
|
|
38843
|
+
scope: "",
|
|
38844
|
+
packageName: ""
|
|
38845
|
+
};
|
|
38846
|
+
var m = sourcePackage.match(/^@([^/]+)\/(.+)$/);
|
|
38847
|
+
if (m) return {
|
|
38848
|
+
scope: m[1],
|
|
38849
|
+
packageName: m[2]
|
|
38850
|
+
};
|
|
38851
|
+
return {
|
|
38852
|
+
scope: "",
|
|
38853
|
+
packageName: sourcePackage
|
|
38854
|
+
};
|
|
38855
|
+
}
|
|
38856
|
+
|
|
38848
38857
|
// Pulled out as a small helper so the Dependencies loader and the
|
|
38849
|
-
// dashboard publish call share the same shape.
|
|
38858
|
+
// dashboard publish call share the same shape. Widgets registered from
|
|
38859
|
+
// a package (via `_sourcePackage`) inherit scope + packageName from that
|
|
38860
|
+
// package ID — otherwise the main-process resolver has no way to map a
|
|
38861
|
+
// bare component name to its owning package.
|
|
38850
38862
|
function collectComponentConfigs() {
|
|
38851
38863
|
var configMap = ComponentManager.componentMap();
|
|
38852
38864
|
var componentConfigs = {};
|
|
@@ -38854,12 +38866,23 @@ function collectComponentConfigs() {
|
|
|
38854
38866
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
38855
38867
|
key = _Object$entries$_i[0],
|
|
38856
38868
|
config = _Object$entries$_i[1];
|
|
38857
|
-
if (config
|
|
38858
|
-
|
|
38859
|
-
|
|
38860
|
-
|
|
38861
|
-
|
|
38862
|
-
|
|
38869
|
+
if (!config || config.type !== "widget") continue;
|
|
38870
|
+
var hasExplicit = config.id || config.scope || config.packageName || config._sourcePackage;
|
|
38871
|
+
if (!hasExplicit) continue;
|
|
38872
|
+
var parsed = parseScopeAndName(config._sourcePackage);
|
|
38873
|
+
var entry = {
|
|
38874
|
+
id: config.id || null,
|
|
38875
|
+
scope: config.scope || parsed.scope || "",
|
|
38876
|
+
packageName: config.packageName || parsed.packageName || ""
|
|
38877
|
+
};
|
|
38878
|
+
// Key by the ComponentManager registration key (what layouts
|
|
38879
|
+
// actually store) AND by config.name (display name). The layout
|
|
38880
|
+
// writes the component name, so keying only by config.name broke
|
|
38881
|
+
// registry lookup for widgets whose display name differs from
|
|
38882
|
+
// their component name (common for AI-built widgets).
|
|
38883
|
+
componentConfigs[key] = entry;
|
|
38884
|
+
if (config.name && config.name !== key) {
|
|
38885
|
+
componentConfigs[config.name] = entry;
|
|
38863
38886
|
}
|
|
38864
38887
|
}
|
|
38865
38888
|
return componentConfigs;
|
|
@@ -39182,7 +39205,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39182
39205
|
}
|
|
39183
39206
|
function _handlePublish() {
|
|
39184
39207
|
_handlePublish = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
39185
|
-
var steps, _iterator2, _step2, w, _key2, _sel, key, sel, updateStep, i, _step3, _res$manifest, bump, options, res, _res, _options, _res2, _t2, _t3;
|
|
39208
|
+
var steps, seenPackages, _iterator2, _step2, w, _key2, _sel, key, sel, updateStep, i, _step3, _res$manifest, bump, options, res, _res, _options, _res2, _t2, _t3;
|
|
39186
39209
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
39187
39210
|
while (1) switch (_context2.prev = _context2.next) {
|
|
39188
39211
|
case 0:
|
|
@@ -39195,19 +39218,21 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39195
39218
|
setIsPublishing(true);
|
|
39196
39219
|
setResult(null);
|
|
39197
39220
|
|
|
39198
|
-
// Build the ordered step list:
|
|
39199
|
-
// Third-party deps aren't
|
|
39221
|
+
// Build the ordered step list: one step per unique widget package,
|
|
39222
|
+
// then theme, then the dashboard itself. Third-party deps aren't
|
|
39223
|
+
// published — they're just referenced by the manifest.
|
|
39200
39224
|
steps = [];
|
|
39201
39225
|
if (!plan) {
|
|
39202
|
-
_context2.next =
|
|
39226
|
+
_context2.next = 12;
|
|
39203
39227
|
break;
|
|
39204
39228
|
}
|
|
39229
|
+
seenPackages = new Set();
|
|
39205
39230
|
_iterator2 = _createForOfIteratorHelper$9(plan.widgets || []);
|
|
39206
39231
|
_context2.prev = 2;
|
|
39207
39232
|
_iterator2.s();
|
|
39208
39233
|
case 3:
|
|
39209
39234
|
if ((_step2 = _iterator2.n()).done) {
|
|
39210
|
-
_context2.next =
|
|
39235
|
+
_context2.next = 8;
|
|
39211
39236
|
break;
|
|
39212
39237
|
}
|
|
39213
39238
|
w = _step2.value;
|
|
@@ -39215,16 +39240,23 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39215
39240
|
_context2.next = 4;
|
|
39216
39241
|
break;
|
|
39217
39242
|
}
|
|
39218
|
-
return _context2.abrupt("continue",
|
|
39243
|
+
return _context2.abrupt("continue", 7);
|
|
39219
39244
|
case 4:
|
|
39220
39245
|
_key2 = "".concat(w.scope, "/").concat(w.packageName);
|
|
39221
|
-
|
|
39222
|
-
if (!(!_sel || !_sel.owned || !_sel.include)) {
|
|
39246
|
+
if (!seenPackages.has(_key2)) {
|
|
39223
39247
|
_context2.next = 5;
|
|
39224
39248
|
break;
|
|
39225
39249
|
}
|
|
39226
|
-
return _context2.abrupt("continue",
|
|
39250
|
+
return _context2.abrupt("continue", 7);
|
|
39227
39251
|
case 5:
|
|
39252
|
+
_sel = depSelections[_key2];
|
|
39253
|
+
if (!(!_sel || !_sel.owned || !_sel.include)) {
|
|
39254
|
+
_context2.next = 6;
|
|
39255
|
+
break;
|
|
39256
|
+
}
|
|
39257
|
+
return _context2.abrupt("continue", 7);
|
|
39258
|
+
case 6:
|
|
39259
|
+
seenPackages.add(_key2);
|
|
39228
39260
|
steps.push({
|
|
39229
39261
|
kind: "widget",
|
|
39230
39262
|
key: _key2,
|
|
@@ -39232,21 +39264,21 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39232
39264
|
packageId: w.packageId || "".concat(w.scope, "/").concat(w.packageName),
|
|
39233
39265
|
selection: _sel
|
|
39234
39266
|
});
|
|
39235
|
-
case 6:
|
|
39236
|
-
_context2.next = 3;
|
|
39237
|
-
break;
|
|
39238
39267
|
case 7:
|
|
39239
|
-
_context2.next =
|
|
39268
|
+
_context2.next = 3;
|
|
39240
39269
|
break;
|
|
39241
39270
|
case 8:
|
|
39242
|
-
_context2.
|
|
39243
|
-
|
|
39244
|
-
_iterator2.e(_t2);
|
|
39271
|
+
_context2.next = 10;
|
|
39272
|
+
break;
|
|
39245
39273
|
case 9:
|
|
39246
39274
|
_context2.prev = 9;
|
|
39247
|
-
|
|
39248
|
-
|
|
39275
|
+
_t2 = _context2["catch"](2);
|
|
39276
|
+
_iterator2.e(_t2);
|
|
39249
39277
|
case 10:
|
|
39278
|
+
_context2.prev = 10;
|
|
39279
|
+
_iterator2.f();
|
|
39280
|
+
return _context2.finish(10);
|
|
39281
|
+
case 11:
|
|
39250
39282
|
if (plan.theme && plan.theme.scope && plan.theme.name) {
|
|
39251
39283
|
key = "".concat(plan.theme.scope, "/").concat(plan.theme.name);
|
|
39252
39284
|
sel = depSelections[key];
|
|
@@ -39260,7 +39292,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39260
39292
|
});
|
|
39261
39293
|
}
|
|
39262
39294
|
}
|
|
39263
|
-
case
|
|
39295
|
+
case 12:
|
|
39264
39296
|
steps.push({
|
|
39265
39297
|
kind: "dashboard",
|
|
39266
39298
|
key: "dashboard",
|
|
@@ -39281,11 +39313,11 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39281
39313
|
return next;
|
|
39282
39314
|
});
|
|
39283
39315
|
};
|
|
39284
|
-
_context2.prev =
|
|
39316
|
+
_context2.prev = 13;
|
|
39285
39317
|
i = 0;
|
|
39286
|
-
case
|
|
39318
|
+
case 14:
|
|
39287
39319
|
if (!(i < steps.length)) {
|
|
39288
|
-
_context2.next =
|
|
39320
|
+
_context2.next = 24;
|
|
39289
39321
|
break;
|
|
39290
39322
|
}
|
|
39291
39323
|
_step3 = steps[i];
|
|
@@ -39293,7 +39325,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39293
39325
|
status: "running"
|
|
39294
39326
|
});
|
|
39295
39327
|
if (!(_step3.kind === "widget")) {
|
|
39296
|
-
_context2.next =
|
|
39328
|
+
_context2.next = 17;
|
|
39297
39329
|
break;
|
|
39298
39330
|
}
|
|
39299
39331
|
bump = _step3.selection.bump;
|
|
@@ -39302,12 +39334,12 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39302
39334
|
} : {}), {}, {
|
|
39303
39335
|
visibility: _step3.selection.visibility
|
|
39304
39336
|
});
|
|
39305
|
-
_context2.next =
|
|
39337
|
+
_context2.next = 15;
|
|
39306
39338
|
return window.mainApi.registry.publishWidget(appId, _step3.packageId, options);
|
|
39307
|
-
case
|
|
39339
|
+
case 15:
|
|
39308
39340
|
res = _context2.sent;
|
|
39309
39341
|
if (res !== null && res !== void 0 && res.success) {
|
|
39310
|
-
_context2.next =
|
|
39342
|
+
_context2.next = 16;
|
|
39311
39343
|
break;
|
|
39312
39344
|
}
|
|
39313
39345
|
updateStep(i, {
|
|
@@ -39320,26 +39352,26 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39320
39352
|
});
|
|
39321
39353
|
setIsPublishing(false);
|
|
39322
39354
|
return _context2.abrupt("return");
|
|
39323
|
-
case
|
|
39355
|
+
case 16:
|
|
39324
39356
|
updateStep(i, {
|
|
39325
39357
|
status: "complete",
|
|
39326
39358
|
message: "v".concat(res.newVersion || ((_res$manifest = res.manifest) === null || _res$manifest === void 0 ? void 0 : _res$manifest.version))
|
|
39327
39359
|
});
|
|
39328
|
-
_context2.next =
|
|
39360
|
+
_context2.next = 23;
|
|
39329
39361
|
break;
|
|
39330
|
-
case
|
|
39362
|
+
case 17:
|
|
39331
39363
|
if (!(_step3.kind === "theme")) {
|
|
39332
|
-
_context2.next =
|
|
39364
|
+
_context2.next = 20;
|
|
39333
39365
|
break;
|
|
39334
39366
|
}
|
|
39335
|
-
_context2.next =
|
|
39367
|
+
_context2.next = 18;
|
|
39336
39368
|
return window.mainApi.themes.publishTheme(appId, _step3.themeKey, {
|
|
39337
39369
|
visibility: _step3.selection.visibility
|
|
39338
39370
|
});
|
|
39339
|
-
case
|
|
39371
|
+
case 18:
|
|
39340
39372
|
_res = _context2.sent;
|
|
39341
39373
|
if (_res !== null && _res !== void 0 && _res.success) {
|
|
39342
|
-
_context2.next =
|
|
39374
|
+
_context2.next = 19;
|
|
39343
39375
|
break;
|
|
39344
39376
|
}
|
|
39345
39377
|
updateStep(i, {
|
|
@@ -39352,16 +39384,16 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39352
39384
|
});
|
|
39353
39385
|
setIsPublishing(false);
|
|
39354
39386
|
return _context2.abrupt("return");
|
|
39355
|
-
case
|
|
39387
|
+
case 19:
|
|
39356
39388
|
updateStep(i, {
|
|
39357
39389
|
status: "complete",
|
|
39358
39390
|
message: "published"
|
|
39359
39391
|
});
|
|
39360
|
-
_context2.next =
|
|
39392
|
+
_context2.next = 23;
|
|
39361
39393
|
break;
|
|
39362
|
-
case
|
|
39394
|
+
case 20:
|
|
39363
39395
|
if (!(_step3.kind === "dashboard")) {
|
|
39364
|
-
_context2.next =
|
|
39396
|
+
_context2.next = 23;
|
|
39365
39397
|
break;
|
|
39366
39398
|
}
|
|
39367
39399
|
_options = {
|
|
@@ -39372,12 +39404,12 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39372
39404
|
visibility: visibility,
|
|
39373
39405
|
componentConfigs: collectComponentConfigs()
|
|
39374
39406
|
};
|
|
39375
|
-
_context2.next =
|
|
39407
|
+
_context2.next = 21;
|
|
39376
39408
|
return window.mainApi.dashboardConfig.prepareDashboardForPublish(appId, workspaceId, _options);
|
|
39377
|
-
case
|
|
39409
|
+
case 21:
|
|
39378
39410
|
_res2 = _context2.sent;
|
|
39379
39411
|
if (_res2 !== null && _res2 !== void 0 && _res2.success) {
|
|
39380
|
-
_context2.next =
|
|
39412
|
+
_context2.next = 22;
|
|
39381
39413
|
break;
|
|
39382
39414
|
}
|
|
39383
39415
|
updateStep(i, {
|
|
@@ -39390,35 +39422,35 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
39390
39422
|
});
|
|
39391
39423
|
setIsPublishing(false);
|
|
39392
39424
|
return _context2.abrupt("return");
|
|
39393
|
-
case
|
|
39425
|
+
case 22:
|
|
39394
39426
|
updateStep(i, {
|
|
39395
39427
|
status: "complete",
|
|
39396
39428
|
message: "published"
|
|
39397
39429
|
});
|
|
39398
39430
|
setResult(_res2);
|
|
39399
|
-
case 22:
|
|
39400
|
-
i++;
|
|
39401
|
-
_context2.next = 13;
|
|
39402
|
-
break;
|
|
39403
39431
|
case 23:
|
|
39404
|
-
|
|
39432
|
+
i++;
|
|
39433
|
+
_context2.next = 14;
|
|
39405
39434
|
break;
|
|
39406
39435
|
case 24:
|
|
39407
|
-
_context2.
|
|
39408
|
-
|
|
39436
|
+
_context2.next = 26;
|
|
39437
|
+
break;
|
|
39438
|
+
case 25:
|
|
39439
|
+
_context2.prev = 25;
|
|
39440
|
+
_t3 = _context2["catch"](13);
|
|
39409
39441
|
setResult({
|
|
39410
39442
|
success: false,
|
|
39411
39443
|
error: _t3.message || "Failed to prepare dashboard for publish."
|
|
39412
39444
|
});
|
|
39413
|
-
case 25:
|
|
39414
|
-
_context2.prev = 25;
|
|
39415
|
-
setIsPublishing(false);
|
|
39416
|
-
return _context2.finish(25);
|
|
39417
39445
|
case 26:
|
|
39446
|
+
_context2.prev = 26;
|
|
39447
|
+
setIsPublishing(false);
|
|
39448
|
+
return _context2.finish(26);
|
|
39449
|
+
case 27:
|
|
39418
39450
|
case "end":
|
|
39419
39451
|
return _context2.stop();
|
|
39420
39452
|
}
|
|
39421
|
-
}, _callee2, null, [[2,
|
|
39453
|
+
}, _callee2, null, [[2, 9, 10, 11], [13, 25, 26, 27]]);
|
|
39422
39454
|
}));
|
|
39423
39455
|
return _handlePublish.apply(this, arguments);
|
|
39424
39456
|
}
|
|
@@ -40056,7 +40088,10 @@ function DependencyTable(_ref4) {
|
|
|
40056
40088
|
var plan = _ref4.plan,
|
|
40057
40089
|
selections = _ref4.selections,
|
|
40058
40090
|
_onChange = _ref4.onChange;
|
|
40059
|
-
|
|
40091
|
+
// Dedupe: multiple widgets from the same package collapse into a single
|
|
40092
|
+
// row. Each row shows the list of component widgets that live inside it
|
|
40093
|
+
// so the user knows what's getting published.
|
|
40094
|
+
var byKey = new Map();
|
|
40060
40095
|
var _iterator3 = _createForOfIteratorHelper$9(plan.widgets || []),
|
|
40061
40096
|
_step4;
|
|
40062
40097
|
try {
|
|
@@ -40064,23 +40099,32 @@ function DependencyTable(_ref4) {
|
|
|
40064
40099
|
var w = _step4.value;
|
|
40065
40100
|
if (!w.scope || !w.packageName) continue;
|
|
40066
40101
|
var _key3 = "".concat(w.scope, "/").concat(w.packageName);
|
|
40067
|
-
|
|
40102
|
+
var entry = byKey.get(_key3) || {
|
|
40068
40103
|
key: _key3,
|
|
40069
40104
|
kind: "widget",
|
|
40070
|
-
data: w
|
|
40071
|
-
|
|
40105
|
+
data: w,
|
|
40106
|
+
widgetNames: new Set()
|
|
40107
|
+
};
|
|
40108
|
+
if (w.component) entry.widgetNames.add(w.component);
|
|
40109
|
+
byKey.set(_key3, entry);
|
|
40072
40110
|
}
|
|
40073
40111
|
} catch (err) {
|
|
40074
40112
|
_iterator3.e(err);
|
|
40075
40113
|
} finally {
|
|
40076
40114
|
_iterator3.f();
|
|
40077
40115
|
}
|
|
40116
|
+
var rows = Array.from(byKey.values()).map(function (e) {
|
|
40117
|
+
return _objectSpread$o(_objectSpread$o({}, e), {}, {
|
|
40118
|
+
widgetNames: Array.from(e.widgetNames).sort()
|
|
40119
|
+
});
|
|
40120
|
+
});
|
|
40078
40121
|
if (plan.theme && plan.theme.scope && plan.theme.name) {
|
|
40079
40122
|
var key = "".concat(plan.theme.scope, "/").concat(plan.theme.name);
|
|
40080
40123
|
rows.push({
|
|
40081
40124
|
key: key,
|
|
40082
40125
|
kind: "theme",
|
|
40083
|
-
data: plan.theme
|
|
40126
|
+
data: plan.theme,
|
|
40127
|
+
widgetNames: []
|
|
40084
40128
|
});
|
|
40085
40129
|
}
|
|
40086
40130
|
if (rows.length === 0) {
|
|
@@ -40094,7 +40138,8 @@ function DependencyTable(_ref4) {
|
|
|
40094
40138
|
children: rows.map(function (_ref5) {
|
|
40095
40139
|
var key = _ref5.key,
|
|
40096
40140
|
kind = _ref5.kind,
|
|
40097
|
-
data = _ref5.data
|
|
40141
|
+
data = _ref5.data,
|
|
40142
|
+
widgetNames = _ref5.widgetNames;
|
|
40098
40143
|
var sel = selections[key];
|
|
40099
40144
|
if (!sel) return null;
|
|
40100
40145
|
var reg = data.registry;
|
|
@@ -40123,8 +40168,11 @@ function DependencyTable(_ref4) {
|
|
|
40123
40168
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
40124
40169
|
className: "flex items-center gap-2 flex-wrap",
|
|
40125
40170
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
40126
|
-
className: "text-sm font-medium truncate",
|
|
40127
|
-
children: [data.scope, "/", data.packageName || data.name]
|
|
40171
|
+
className: "text-sm font-medium truncate font-mono",
|
|
40172
|
+
children: ["@", data.publishScope || data.scope, "/", data.packageName || data.name]
|
|
40173
|
+
}), data.publishScope && data.scope && data.publishScope !== data.scope && /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
40174
|
+
className: "text-[10px] opacity-50 font-mono",
|
|
40175
|
+
children: ["(local @", data.scope, "/", data.packageName, ")"]
|
|
40128
40176
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
40129
40177
|
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"),
|
|
40130
40178
|
children: kind
|
|
@@ -40139,6 +40187,12 @@ function DependencyTable(_ref4) {
|
|
|
40139
40187
|
}) : /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
40140
40188
|
children: " \xB7 Not yet in registry"
|
|
40141
40189
|
})]
|
|
40190
|
+
}), kind === "widget" && widgetNames && widgetNames.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
40191
|
+
className: "text-[11px] opacity-60 mt-1",
|
|
40192
|
+
children: ["Bundles ", widgetNames.length, " widget", widgetNames.length === 1 ? "" : "s", ":", " ", /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
40193
|
+
className: "opacity-80",
|
|
40194
|
+
children: widgetNames.join(", ")
|
|
40195
|
+
})]
|
|
40142
40196
|
}), sel.owned && sel.include && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
40143
40197
|
className: "mt-2 flex items-center gap-3 flex-wrap",
|
|
40144
40198
|
children: [/*#__PURE__*/jsxRuntime.jsxs("label", {
|