@trops/dash-core 0.1.470 → 0.1.471
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 +176 -80
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +208 -121
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9393,7 +9393,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|
|
9393
9393
|
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
9394
9394
|
|
|
9395
9395
|
var keys = objectKeys$2;
|
|
9396
|
-
var hasSymbols$
|
|
9396
|
+
var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
9397
9397
|
|
|
9398
9398
|
var toStr$4 = Object.prototype.toString;
|
|
9399
9399
|
var concat = Array.prototype.concat;
|
|
@@ -9426,7 +9426,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
|
|
|
9426
9426
|
var defineProperties$1 = function (object, map) {
|
|
9427
9427
|
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
9428
9428
|
var props = keys(map);
|
|
9429
|
-
if (hasSymbols$
|
|
9429
|
+
if (hasSymbols$5) {
|
|
9430
9430
|
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
9431
9431
|
}
|
|
9432
9432
|
for (var i = 0; i < props.length; i += 1) {
|
|
@@ -9492,11 +9492,11 @@ var sign$1 = function sign(number) {
|
|
|
9492
9492
|
};
|
|
9493
9493
|
|
|
9494
9494
|
var shams$1;
|
|
9495
|
-
var hasRequiredShams
|
|
9495
|
+
var hasRequiredShams;
|
|
9496
9496
|
|
|
9497
|
-
function requireShams
|
|
9498
|
-
if (hasRequiredShams
|
|
9499
|
-
hasRequiredShams
|
|
9497
|
+
function requireShams () {
|
|
9498
|
+
if (hasRequiredShams) return shams$1;
|
|
9499
|
+
hasRequiredShams = 1;
|
|
9500
9500
|
|
|
9501
9501
|
/** @type {import('./shams')} */
|
|
9502
9502
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
@@ -9545,10 +9545,10 @@ function requireShams$1 () {
|
|
|
9545
9545
|
}
|
|
9546
9546
|
|
|
9547
9547
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
9548
|
-
var hasSymbolSham = requireShams
|
|
9548
|
+
var hasSymbolSham = requireShams();
|
|
9549
9549
|
|
|
9550
9550
|
/** @type {import('.')} */
|
|
9551
|
-
var hasSymbols$
|
|
9551
|
+
var hasSymbols$4 = function hasNativeSymbols() {
|
|
9552
9552
|
if (typeof origSymbol !== 'function') { return false; }
|
|
9553
9553
|
if (typeof Symbol !== 'function') { return false; }
|
|
9554
9554
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
@@ -9852,7 +9852,7 @@ var ThrowTypeError = $gOPD$1
|
|
|
9852
9852
|
}())
|
|
9853
9853
|
: throwTypeError;
|
|
9854
9854
|
|
|
9855
|
-
var hasSymbols$
|
|
9855
|
+
var hasSymbols$3 = hasSymbols$4();
|
|
9856
9856
|
|
|
9857
9857
|
var getProto$2 = getProto$3;
|
|
9858
9858
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
@@ -9870,7 +9870,7 @@ var INTRINSICS = {
|
|
|
9870
9870
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
9871
9871
|
'%Array%': Array,
|
|
9872
9872
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
9873
|
-
'%ArrayIteratorPrototype%': hasSymbols$
|
|
9873
|
+
'%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
|
|
9874
9874
|
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
9875
9875
|
'%AsyncFunction%': needsEval,
|
|
9876
9876
|
'%AsyncGenerator%': needsEval,
|
|
@@ -9901,10 +9901,10 @@ var INTRINSICS = {
|
|
|
9901
9901
|
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
9902
9902
|
'%isFinite%': isFinite,
|
|
9903
9903
|
'%isNaN%': isNaN,
|
|
9904
|
-
'%IteratorPrototype%': hasSymbols$
|
|
9904
|
+
'%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
|
|
9905
9905
|
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
9906
9906
|
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
9907
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$
|
|
9907
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
|
|
9908
9908
|
'%Math%': Math,
|
|
9909
9909
|
'%Number%': Number,
|
|
9910
9910
|
'%Object%': $Object$2,
|
|
@@ -9918,11 +9918,11 @@ var INTRINSICS = {
|
|
|
9918
9918
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
9919
9919
|
'%RegExp%': RegExp,
|
|
9920
9920
|
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
9921
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$
|
|
9921
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
|
|
9922
9922
|
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
9923
9923
|
'%String%': String,
|
|
9924
|
-
'%StringIteratorPrototype%': hasSymbols$
|
|
9925
|
-
'%Symbol%': hasSymbols$
|
|
9924
|
+
'%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
|
|
9925
|
+
'%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
|
|
9926
9926
|
'%SyntaxError%': $SyntaxError$1,
|
|
9927
9927
|
'%ThrowTypeError%': ThrowTypeError,
|
|
9928
9928
|
'%TypedArray%': TypedArray,
|
|
@@ -10275,12 +10275,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
|
|
|
10275
10275
|
|
|
10276
10276
|
// modified from https://github.com/es-shims/es6-shim
|
|
10277
10277
|
var objectKeys$1 = objectKeys$2;
|
|
10278
|
-
var hasSymbols$
|
|
10278
|
+
var hasSymbols$2 = requireShams()();
|
|
10279
10279
|
var callBound$h = callBound$i;
|
|
10280
10280
|
var $Object$1 = esObjectAtoms;
|
|
10281
10281
|
var $push = callBound$h('Array.prototype.push');
|
|
10282
10282
|
var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
|
|
10283
|
-
var originalGetSymbols = hasSymbols$
|
|
10283
|
+
var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
|
|
10284
10284
|
|
|
10285
10285
|
// eslint-disable-next-line no-unused-vars
|
|
10286
10286
|
var implementation$8 = function assign(target, source1) {
|
|
@@ -10294,7 +10294,7 @@ var implementation$8 = function assign(target, source1) {
|
|
|
10294
10294
|
|
|
10295
10295
|
// step 3.a.ii:
|
|
10296
10296
|
var keys = objectKeys$1(from);
|
|
10297
|
-
var getSymbols = hasSymbols$
|
|
10297
|
+
var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
|
|
10298
10298
|
if (getSymbols) {
|
|
10299
10299
|
var syms = getSymbols(from);
|
|
10300
10300
|
for (var j = 0; j < syms.length; ++j) {
|
|
@@ -10591,23 +10591,14 @@ var regexp_prototype_flags = flagsBound;
|
|
|
10591
10591
|
|
|
10592
10592
|
var esGetIterator = {exports: {}};
|
|
10593
10593
|
|
|
10594
|
-
var
|
|
10595
|
-
var hasRequiredShams;
|
|
10594
|
+
var hasSymbols$1 = requireShams();
|
|
10596
10595
|
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
var hasSymbols = requireShams$1();
|
|
10602
|
-
|
|
10603
|
-
/** @type {import('.')} */
|
|
10604
|
-
shams = function hasToStringTagShams() {
|
|
10605
|
-
return hasSymbols() && !!Symbol.toStringTag;
|
|
10606
|
-
};
|
|
10607
|
-
return shams;
|
|
10608
|
-
}
|
|
10596
|
+
/** @type {import('.')} */
|
|
10597
|
+
var shams = function hasToStringTagShams() {
|
|
10598
|
+
return hasSymbols$1() && !!Symbol.toStringTag;
|
|
10599
|
+
};
|
|
10609
10600
|
|
|
10610
|
-
var hasToStringTag$7 =
|
|
10601
|
+
var hasToStringTag$7 = shams();
|
|
10611
10602
|
var callBound$f = callBound$i;
|
|
10612
10603
|
|
|
10613
10604
|
var $toString$7 = callBound$f('Object.prototype.toString');
|
|
@@ -11644,7 +11635,7 @@ var tryStringObject = function tryStringObject(value) {
|
|
|
11644
11635
|
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
|
|
11645
11636
|
var $toString$6 = callBound$c('Object.prototype.toString');
|
|
11646
11637
|
var strClass = '[object String]';
|
|
11647
|
-
var hasToStringTag$6 =
|
|
11638
|
+
var hasToStringTag$6 = shams();
|
|
11648
11639
|
|
|
11649
11640
|
/** @type {import('.')} */
|
|
11650
11641
|
var isString$2 = function isString(value) {
|
|
@@ -11760,7 +11751,7 @@ var isSet$2 = exported$1 || function isSet(x) {
|
|
|
11760
11751
|
var isArguments$1 = isArguments$2;
|
|
11761
11752
|
var getStopIterationIterator = stopIterationIterator;
|
|
11762
11753
|
|
|
11763
|
-
if (hasSymbols$
|
|
11754
|
+
if (hasSymbols$4() || requireShams()()) {
|
|
11764
11755
|
var $iterator = Symbol.iterator;
|
|
11765
11756
|
// Symbol is available natively or shammed
|
|
11766
11757
|
// natively:
|
|
@@ -12049,7 +12040,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
|
|
|
12049
12040
|
/** @type {(value: unknown) => string} */
|
|
12050
12041
|
var toStr$2 = callBound$9('Object.prototype.toString');
|
|
12051
12042
|
var dateClass = '[object Date]';
|
|
12052
|
-
var hasToStringTag$5 =
|
|
12043
|
+
var hasToStringTag$5 = shams();
|
|
12053
12044
|
|
|
12054
12045
|
/** @type {import('.')} */
|
|
12055
12046
|
var isDateObject = function isDateObject(value) {
|
|
@@ -12060,7 +12051,7 @@ var isDateObject = function isDateObject(value) {
|
|
|
12060
12051
|
};
|
|
12061
12052
|
|
|
12062
12053
|
var callBound$8 = callBound$i;
|
|
12063
|
-
var hasToStringTag$4 =
|
|
12054
|
+
var hasToStringTag$4 = shams();
|
|
12064
12055
|
var hasOwn = hasown;
|
|
12065
12056
|
var gOPD$1 = gopd$1;
|
|
12066
12057
|
|
|
@@ -12165,7 +12156,7 @@ var tryNumberObject = function tryNumberObject(value) {
|
|
|
12165
12156
|
};
|
|
12166
12157
|
var $toString$3 = callBound$6('Object.prototype.toString');
|
|
12167
12158
|
var numClass = '[object Number]';
|
|
12168
|
-
var hasToStringTag$3 =
|
|
12159
|
+
var hasToStringTag$3 = shams();
|
|
12169
12160
|
|
|
12170
12161
|
/** @type {import('.')} */
|
|
12171
12162
|
var isNumberObject = function isNumberObject(value) {
|
|
@@ -12192,7 +12183,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
|
|
|
12192
12183
|
}
|
|
12193
12184
|
};
|
|
12194
12185
|
var boolClass = '[object Boolean]';
|
|
12195
|
-
var hasToStringTag$2 =
|
|
12186
|
+
var hasToStringTag$2 = shams();
|
|
12196
12187
|
|
|
12197
12188
|
/** @type {import('.')} */
|
|
12198
12189
|
var isBooleanObject = function isBoolean(value) {
|
|
@@ -12234,7 +12225,7 @@ function requireSafeRegexTest () {
|
|
|
12234
12225
|
|
|
12235
12226
|
var callBound$4 = callBound$i;
|
|
12236
12227
|
var $toString$1 = callBound$4('Object.prototype.toString');
|
|
12237
|
-
var hasSymbols = hasSymbols$
|
|
12228
|
+
var hasSymbols = hasSymbols$4();
|
|
12238
12229
|
var safeRegexTest = requireSafeRegexTest();
|
|
12239
12230
|
|
|
12240
12231
|
if (hasSymbols) {
|
|
@@ -12680,7 +12671,7 @@ var gOPD = gopd$1;
|
|
|
12680
12671
|
var getProto = getProto$3;
|
|
12681
12672
|
|
|
12682
12673
|
var $toString = callBound$2('Object.prototype.toString');
|
|
12683
|
-
var hasToStringTag =
|
|
12674
|
+
var hasToStringTag = shams();
|
|
12684
12675
|
|
|
12685
12676
|
var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
12686
12677
|
var typedArrays = availableTypedArrays();
|
|
@@ -52901,11 +52892,12 @@ var EditField = function EditField(_ref7) {
|
|
|
52901
52892
|
|
|
52902
52893
|
function ownKeys$h(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
52903
52894
|
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
52895
|
+
var GLOBAL_KEY = "__global__";
|
|
52904
52896
|
var NotificationsSection = function NotificationsSection(_ref) {
|
|
52905
52897
|
var _ref$workspaces = _ref.workspaces,
|
|
52906
52898
|
workspaces = _ref$workspaces === void 0 ? [] : _ref$workspaces;
|
|
52907
|
-
|
|
52908
|
-
|
|
52899
|
+
React.useContext(AppContext);
|
|
52900
|
+
|
|
52909
52901
|
var _useState = React.useState(true),
|
|
52910
52902
|
_useState2 = _slicedToArray(_useState, 2),
|
|
52911
52903
|
globalEnabled = _useState2[0],
|
|
@@ -52922,6 +52914,14 @@ var NotificationsSection = function NotificationsSection(_ref) {
|
|
|
52922
52914
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
52923
52915
|
loading = _useState8[0],
|
|
52924
52916
|
setLoading = _useState8[1];
|
|
52917
|
+
var _useState9 = React.useState(""),
|
|
52918
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
52919
|
+
searchQuery = _useState0[0],
|
|
52920
|
+
setSearchQuery = _useState0[1];
|
|
52921
|
+
var _useState1 = React.useState(GLOBAL_KEY),
|
|
52922
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
52923
|
+
selectedKey = _useState10[0],
|
|
52924
|
+
setSelectedKey = _useState10[1];
|
|
52925
52925
|
|
|
52926
52926
|
// Load preferences on mount
|
|
52927
52927
|
React.useEffect(function () {
|
|
@@ -52938,38 +52938,46 @@ var NotificationsSection = function NotificationsSection(_ref) {
|
|
|
52938
52938
|
});
|
|
52939
52939
|
}, []);
|
|
52940
52940
|
|
|
52941
|
-
// Collect
|
|
52942
|
-
// Route through `ComponentManager.resolve` so a
|
|
52943
|
-
// referencing a bare component name still finds
|
|
52944
|
-
// scoped form
|
|
52945
|
-
|
|
52946
|
-
|
|
52947
|
-
|
|
52948
|
-
|
|
52949
|
-
|
|
52950
|
-
|
|
52951
|
-
|
|
52952
|
-
|
|
52953
|
-
|
|
52954
|
-
|
|
52955
|
-
|
|
52956
|
-
|
|
52957
|
-
|
|
52958
|
-
|
|
52959
|
-
|
|
52960
|
-
|
|
52961
|
-
|
|
52962
|
-
|
|
52941
|
+
// Collect every widget instance with notifications, alphabetized
|
|
52942
|
+
// by display title. Route through `ComponentManager.resolve` so a
|
|
52943
|
+
// legacy layout referencing a bare component name still finds the
|
|
52944
|
+
// registered scoped form.
|
|
52945
|
+
var widgetInstances = React.useMemo(function () {
|
|
52946
|
+
var out = [];
|
|
52947
|
+
workspaces.forEach(function (ws) {
|
|
52948
|
+
var items = flattenLayout(ws.layout);
|
|
52949
|
+
items.forEach(function (item) {
|
|
52950
|
+
var _config$notifications;
|
|
52951
|
+
var config = ComponentManager.resolve(item.component, item);
|
|
52952
|
+
if ((config === null || config === void 0 || (_config$notifications = config.notifications) === null || _config$notifications === void 0 ? void 0 : _config$notifications.length) > 0) {
|
|
52953
|
+
var _item$userPrefs;
|
|
52954
|
+
out.push({
|
|
52955
|
+
uuid: item.uuid || item.uuidString,
|
|
52956
|
+
componentName: item.component,
|
|
52957
|
+
title: ((_item$userPrefs = item.userPrefs) === null || _item$userPrefs === void 0 ? void 0 : _item$userPrefs.title) || config.displayName || item.component,
|
|
52958
|
+
workspaceName: ws.name || ws.id,
|
|
52959
|
+
notifications: config.notifications,
|
|
52960
|
+
"package": config["package"] || "Other"
|
|
52961
|
+
});
|
|
52962
|
+
}
|
|
52963
|
+
});
|
|
52963
52964
|
});
|
|
52964
|
-
|
|
52965
|
+
return out.sort(function (a, b) {
|
|
52966
|
+
return String(a.title).localeCompare(String(b.title), undefined, {
|
|
52967
|
+
sensitivity: "base"
|
|
52968
|
+
});
|
|
52969
|
+
});
|
|
52970
|
+
}, [workspaces]);
|
|
52965
52971
|
|
|
52966
|
-
//
|
|
52967
|
-
var
|
|
52968
|
-
|
|
52969
|
-
|
|
52970
|
-
|
|
52971
|
-
|
|
52972
|
-
|
|
52972
|
+
// Filter by search.
|
|
52973
|
+
var filteredInstances = React.useMemo(function () {
|
|
52974
|
+
var q = searchQuery.trim().toLowerCase();
|
|
52975
|
+
if (!q) return widgetInstances;
|
|
52976
|
+
return widgetInstances.filter(function (wi) {
|
|
52977
|
+
var hay = [wi.title, wi["package"], wi.workspaceName, wi.componentName].filter(Boolean).join(" ").toLowerCase();
|
|
52978
|
+
return hay.includes(q);
|
|
52979
|
+
});
|
|
52980
|
+
}, [widgetInstances, searchQuery]);
|
|
52973
52981
|
function handleGlobalToggle(value) {
|
|
52974
52982
|
var _window$mainApi2;
|
|
52975
52983
|
setGlobalEnabled(value);
|
|
@@ -53003,16 +53011,85 @@ var NotificationsSection = function NotificationsSection(_ref) {
|
|
|
53003
53011
|
children: "Loading notification preferences..."
|
|
53004
53012
|
});
|
|
53005
53013
|
}
|
|
53006
|
-
|
|
53007
|
-
|
|
53008
|
-
|
|
53009
|
-
|
|
53010
|
-
|
|
53014
|
+
|
|
53015
|
+
// ── Left list ──────────────────────────────────────────────────────
|
|
53016
|
+
var listContent = /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53017
|
+
className: "flex flex-col h-full",
|
|
53018
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53019
|
+
className: "flex flex-col gap-2 px-3 py-2 flex-shrink-0 border-b border-white/10",
|
|
53020
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SearchInput, {
|
|
53021
|
+
value: searchQuery,
|
|
53022
|
+
onChange: setSearchQuery,
|
|
53023
|
+
placeholder: "Search widgets...",
|
|
53024
|
+
inputClassName: "py-1.5 text-xs"
|
|
53025
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53026
|
+
className: "text-[10px] opacity-50 px-0.5",
|
|
53027
|
+
children: [filteredInstances.length, " of ", widgetInstances.length, " widget", widgetInstances.length === 1 ? "" : "s"]
|
|
53028
|
+
})]
|
|
53029
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(DashReact.Sidebar.Content, {
|
|
53030
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Item, {
|
|
53031
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
53032
|
+
icon: globalEnabled ? "bell" : "bell-slash",
|
|
53033
|
+
className: "h-3.5 w-3.5"
|
|
53034
|
+
}),
|
|
53035
|
+
active: selectedKey === GLOBAL_KEY,
|
|
53036
|
+
onClick: function onClick() {
|
|
53037
|
+
return setSelectedKey(GLOBAL_KEY);
|
|
53038
|
+
},
|
|
53039
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
53040
|
+
className: "flex flex-col",
|
|
53041
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53042
|
+
className: "font-medium",
|
|
53043
|
+
children: "Global"
|
|
53044
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53045
|
+
className: "text-[10px] opacity-40",
|
|
53046
|
+
children: "Master switch + Do Not Disturb"
|
|
53047
|
+
})]
|
|
53048
|
+
})
|
|
53049
|
+
}), filteredInstances.length === 0 && widgetInstances.length === 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
53050
|
+
className: "px-3 py-2 text-xs opacity-50",
|
|
53051
|
+
children: "No widgets with notification support found. Add widgets that declare notifications to see per-type controls here."
|
|
53052
|
+
}), filteredInstances.length === 0 && widgetInstances.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53053
|
+
className: "px-3 py-2 text-xs opacity-50",
|
|
53054
|
+
children: ["No widgets match \"", searchQuery, "\"."]
|
|
53055
|
+
}), filteredInstances.map(function (wi) {
|
|
53056
|
+
var isActive = selectedKey === wi.uuid;
|
|
53057
|
+
return /*#__PURE__*/jsxRuntime.jsx(DashReact.Sidebar.Item, {
|
|
53058
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
53059
|
+
icon: "bell",
|
|
53060
|
+
className: "h-3.5 w-3.5"
|
|
53061
|
+
}),
|
|
53062
|
+
active: isActive,
|
|
53063
|
+
onClick: function onClick() {
|
|
53064
|
+
return setSelectedKey(wi.uuid);
|
|
53065
|
+
},
|
|
53066
|
+
className: isActive ? "bg-white/10 opacity-100" : "",
|
|
53067
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
53068
|
+
className: "flex flex-col",
|
|
53069
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53070
|
+
className: "font-medium truncate",
|
|
53071
|
+
children: wi.title
|
|
53072
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
53073
|
+
className: "text-[10px] opacity-40 truncate",
|
|
53074
|
+
children: [wi["package"], wi.workspaceName ? " \xB7 ".concat(wi.workspaceName) : ""]
|
|
53075
|
+
})]
|
|
53076
|
+
})
|
|
53077
|
+
}, wi.uuid);
|
|
53078
|
+
})]
|
|
53079
|
+
})]
|
|
53080
|
+
});
|
|
53081
|
+
|
|
53082
|
+
// ── Right detail ───────────────────────────────────────────────────
|
|
53083
|
+
var detailContent;
|
|
53084
|
+
if (selectedKey === GLOBAL_KEY) {
|
|
53085
|
+
detailContent = /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53086
|
+
className: "flex flex-col p-6 space-y-6",
|
|
53087
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
|
|
53088
|
+
title: "Global",
|
|
53089
|
+
padding: false
|
|
53090
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53011
53091
|
className: "flex flex-col space-y-3",
|
|
53012
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
53013
|
-
title: "Global",
|
|
53014
|
-
padding: false
|
|
53015
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53092
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53016
53093
|
className: "flex flex-row items-center justify-between py-2",
|
|
53017
53094
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53018
53095
|
className: "flex flex-col",
|
|
@@ -53043,49 +53120,59 @@ var NotificationsSection = function NotificationsSection(_ref) {
|
|
|
53043
53120
|
onChange: handleDndToggle
|
|
53044
53121
|
})]
|
|
53045
53122
|
})]
|
|
53046
|
-
})
|
|
53047
|
-
|
|
53048
|
-
|
|
53049
|
-
|
|
53050
|
-
|
|
53051
|
-
|
|
53123
|
+
})]
|
|
53124
|
+
});
|
|
53125
|
+
} else {
|
|
53126
|
+
var wi = widgetInstances.find(function (w) {
|
|
53127
|
+
return w.uuid === selectedKey;
|
|
53128
|
+
});
|
|
53129
|
+
if (!wi) {
|
|
53130
|
+
detailContent = /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
53131
|
+
className: "flex-1 p-6 text-sm opacity-50",
|
|
53132
|
+
children: "Select a widget on the left to configure its notifications."
|
|
53133
|
+
});
|
|
53134
|
+
} else {
|
|
53135
|
+
detailContent = /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53136
|
+
className: "flex flex-col p-6 space-y-4",
|
|
53137
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53138
|
+
className: "flex flex-col space-y-1",
|
|
53052
53139
|
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
|
|
53053
|
-
title:
|
|
53140
|
+
title: wi.title,
|
|
53054
53141
|
padding: false
|
|
53055
|
-
}),
|
|
53142
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
53143
|
+
className: "text-xs opacity-50",
|
|
53144
|
+
children: [wi["package"], wi.workspaceName ? " \xB7 ".concat(wi.workspaceName) : ""]
|
|
53145
|
+
})]
|
|
53146
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
53147
|
+
className: "flex flex-col space-y-3",
|
|
53148
|
+
children: wi.notifications.map(function (notif) {
|
|
53056
53149
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53057
|
-
className: "flex flex-
|
|
53058
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
53059
|
-
className: "
|
|
53060
|
-
children:
|
|
53061
|
-
|
|
53062
|
-
|
|
53063
|
-
|
|
53064
|
-
|
|
53065
|
-
|
|
53066
|
-
|
|
53067
|
-
|
|
53068
|
-
|
|
53069
|
-
|
|
53070
|
-
|
|
53071
|
-
|
|
53072
|
-
})]
|
|
53073
|
-
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Switch, {
|
|
53074
|
-
checked: getTypeEnabled(wi.uuid, notif.key, notif.defaultEnabled),
|
|
53075
|
-
onChange: function onChange(value) {
|
|
53076
|
-
return handleTypeToggle(wi.uuid, notif.key, value);
|
|
53077
|
-
}
|
|
53078
|
-
})]
|
|
53079
|
-
}, notif.key);
|
|
53150
|
+
className: "flex flex-row items-center justify-between py-1",
|
|
53151
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
53152
|
+
className: "flex flex-col",
|
|
53153
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53154
|
+
className: "text-sm",
|
|
53155
|
+
children: notif.displayName
|
|
53156
|
+
}), notif.description && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
53157
|
+
className: "text-xs opacity-50",
|
|
53158
|
+
children: notif.description
|
|
53159
|
+
})]
|
|
53160
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.Switch, {
|
|
53161
|
+
checked: getTypeEnabled(wi.uuid, notif.key, notif.defaultEnabled),
|
|
53162
|
+
onChange: function onChange(value) {
|
|
53163
|
+
return handleTypeToggle(wi.uuid, notif.key, value);
|
|
53164
|
+
}
|
|
53080
53165
|
})]
|
|
53081
|
-
},
|
|
53082
|
-
})
|
|
53083
|
-
}
|
|
53084
|
-
})
|
|
53085
|
-
|
|
53086
|
-
|
|
53087
|
-
|
|
53088
|
-
|
|
53166
|
+
}, notif.key);
|
|
53167
|
+
})
|
|
53168
|
+
})]
|
|
53169
|
+
});
|
|
53170
|
+
}
|
|
53171
|
+
}
|
|
53172
|
+
return /*#__PURE__*/jsxRuntime.jsx(SectionLayout, {
|
|
53173
|
+
listContent: listContent,
|
|
53174
|
+
detailContent: detailContent,
|
|
53175
|
+
emptyDetailMessage: "Select a widget to configure notifications"
|
|
53089
53176
|
});
|
|
53090
53177
|
};
|
|
53091
53178
|
|