@trops/dash-core 0.1.215 → 0.1.217

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.js CHANGED
@@ -5979,13 +5979,13 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
5979
5979
  className: "text-sm font-semibold text-gray-300 flex items-center gap-2",
5980
5980
  children: ["Dashboards (", filteredDashboards.length, " result", filteredDashboards.length !== 1 ? "s" : "", ")"]
5981
5981
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
5982
- className: "grid grid-cols-2 lg:grid-cols-3 gap-3",
5982
+ className: "grid grid-cols-3 gap-3",
5983
5983
  children: filteredDashboards.map(function (dash) {
5984
5984
  var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
5985
5985
  var widgetCount = (dash.widgets || []).length;
5986
- var providerNames = (dash.providers || []).map(function (p) {
5986
+ var providerTags = (dash.providers || []).map(function (p) {
5987
5987
  return p.name || p.type;
5988
- }).join(", ");
5988
+ }).filter(Boolean);
5989
5989
  return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
5990
5990
  hover: true,
5991
5991
  selected: isSelected,
@@ -5996,27 +5996,40 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
5996
5996
  return handleSelectDashboard(dash);
5997
5997
  },
5998
5998
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
5999
- className: "flex items-center gap-2",
6000
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6001
- icon: resolveIcon(dash.icon || "grid-2"),
6002
- fixedWidth: true,
6003
- className: "text-gray-400"
5999
+ className: "flex flex-col items-center text-center gap-2",
6000
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
6001
+ className: "relative",
6002
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
6003
+ className: "text-2xl",
6004
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6005
+ icon: resolveIcon(dash.icon || "grid-2"),
6006
+ fixedWidth: true,
6007
+ className: "text-gray-400"
6008
+ })
6009
+ }), isSelected && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6010
+ icon: "circle-check",
6011
+ className: "absolute -top-1 -right-3 text-blue-400 text-xs"
6012
+ })]
6004
6013
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
6005
- className: "text-sm font-medium text-gray-200",
6014
+ className: "text-sm font-semibold text-gray-200",
6006
6015
  children: dash.displayName || dash.name
6007
- }), isSelected && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6008
- icon: "circle-check",
6009
- className: "ml-auto text-blue-400"
6010
6016
  })]
6011
6017
  }), dash.description && /*#__PURE__*/jsxRuntime.jsx("p", {
6012
- className: "text-xs text-gray-400 mt-1 line-clamp-2",
6018
+ className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
6013
6019
  children: dash.description
6014
6020
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
6015
- className: "flex items-center gap-3 mt-2 text-xs text-gray-500",
6021
+ className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
6016
6022
  children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
6023
+ className: "text-xs text-gray-500",
6017
6024
  children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
6018
- }), providerNames && /*#__PURE__*/jsxRuntime.jsx("span", {
6019
- children: providerNames
6025
+ }), providerTags.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
6026
+ className: "flex flex-wrap gap-1 justify-end",
6027
+ children: providerTags.slice(0, 3).map(function (tag) {
6028
+ return /*#__PURE__*/jsxRuntime.jsx("span", {
6029
+ className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
6030
+ children: tag
6031
+ }, tag);
6032
+ })
6020
6033
  })]
6021
6034
  })]
6022
6035
  }, dash.name);
@@ -6030,45 +6043,42 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
6030
6043
  text: "".concat(state.selectedWidgets.length, " selected")
6031
6044
  })]
6032
6045
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
6033
- className: "grid grid-cols-2 lg:grid-cols-3 gap-3",
6046
+ className: "grid grid-cols-3 gap-3",
6034
6047
  children: filteredWidgets.map(function (widget) {
6035
6048
  var checked = isWidgetSelected(widget);
6036
- return /*#__PURE__*/jsxRuntime.jsx(DashReact.Card2, {
6049
+ return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
6037
6050
  hover: true,
6038
6051
  selected: checked,
6039
- padding: "p-5",
6052
+ padding: "p-4",
6040
6053
  rounded: "rounded-lg",
6041
- className: "hover:shadow-lg",
6054
+ className: "hover:shadow-lg flex flex-col",
6042
6055
  onClick: function onClick() {
6043
6056
  return handleToggleWidget(widget);
6044
6057
  },
6045
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
6046
- className: "flex items-start gap-2",
6047
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6058
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
6059
+ className: "flex items-start justify-between gap-2",
6060
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
6061
+ className: "flex items-center gap-1.5",
6062
+ children: [widget.icon && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6063
+ icon: resolveIcon(widget.icon),
6064
+ fixedWidth: true,
6065
+ className: "text-gray-400 text-sm"
6066
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
6067
+ className: "text-sm font-medium text-gray-200 truncate",
6068
+ children: widget.name
6069
+ })]
6070
+ }), /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6048
6071
  icon: checked ? "square-check" : "square",
6049
6072
  fixedWidth: true,
6050
- className: checked ? "text-blue-400 mt-0.5" : "text-gray-500 mt-0.5"
6051
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
6052
- className: "flex flex-col gap-0.5 min-w-0",
6053
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
6054
- className: "flex items-center gap-1.5",
6055
- children: [widget.icon && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6056
- icon: resolveIcon(widget.icon),
6057
- fixedWidth: true,
6058
- className: "text-gray-400 text-xs"
6059
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
6060
- className: "text-sm font-medium text-gray-200 truncate",
6061
- children: widget.name
6062
- })]
6063
- }), widget.description && /*#__PURE__*/jsxRuntime.jsx("p", {
6064
- className: "text-xs text-gray-400 line-clamp-2",
6065
- children: widget.description
6066
- }), widget.packageDisplayName && /*#__PURE__*/jsxRuntime.jsx("span", {
6067
- className: "text-xs text-gray-500",
6068
- children: widget.packageDisplayName
6069
- })]
6073
+ className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
6070
6074
  })]
6071
- })
6075
+ }), widget.description && /*#__PURE__*/jsxRuntime.jsx("p", {
6076
+ className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
6077
+ children: widget.description
6078
+ }), widget.packageDisplayName && /*#__PURE__*/jsxRuntime.jsx("span", {
6079
+ className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
6080
+ children: widget.packageDisplayName
6081
+ })]
6072
6082
  }, widget.key);
6073
6083
  })
6074
6084
  })]
@@ -7942,7 +7952,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
7942
7952
  var hasPropertyDescriptors_1 = hasPropertyDescriptors;
7943
7953
 
7944
7954
  var keys = objectKeys$2;
7945
- var hasSymbols$5 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
7955
+ var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
7946
7956
 
7947
7957
  var toStr$4 = Object.prototype.toString;
7948
7958
  var concat = Array.prototype.concat;
@@ -7975,7 +7985,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
7975
7985
  var defineProperties$1 = function (object, map) {
7976
7986
  var predicates = arguments.length > 2 ? arguments[2] : {};
7977
7987
  var props = keys(map);
7978
- if (hasSymbols$5) {
7988
+ if (hasSymbols$4) {
7979
7989
  props = concat.call(props, Object.getOwnPropertySymbols(map));
7980
7990
  }
7981
7991
  for (var i = 0; i < props.length; i += 1) {
@@ -8041,11 +8051,11 @@ var sign$1 = function sign(number) {
8041
8051
  };
8042
8052
 
8043
8053
  var shams$1;
8044
- var hasRequiredShams;
8054
+ var hasRequiredShams$1;
8045
8055
 
8046
- function requireShams () {
8047
- if (hasRequiredShams) return shams$1;
8048
- hasRequiredShams = 1;
8056
+ function requireShams$1 () {
8057
+ if (hasRequiredShams$1) return shams$1;
8058
+ hasRequiredShams$1 = 1;
8049
8059
 
8050
8060
  /** @type {import('./shams')} */
8051
8061
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
@@ -8094,10 +8104,10 @@ function requireShams () {
8094
8104
  }
8095
8105
 
8096
8106
  var origSymbol = typeof Symbol !== 'undefined' && Symbol;
8097
- var hasSymbolSham = requireShams();
8107
+ var hasSymbolSham = requireShams$1();
8098
8108
 
8099
8109
  /** @type {import('.')} */
8100
- var hasSymbols$4 = function hasNativeSymbols() {
8110
+ var hasSymbols$3 = function hasNativeSymbols() {
8101
8111
  if (typeof origSymbol !== 'function') { return false; }
8102
8112
  if (typeof Symbol !== 'function') { return false; }
8103
8113
  if (typeof origSymbol('foo') !== 'symbol') { return false; }
@@ -8401,7 +8411,7 @@ var ThrowTypeError = $gOPD$1
8401
8411
  }())
8402
8412
  : throwTypeError;
8403
8413
 
8404
- var hasSymbols$3 = hasSymbols$4();
8414
+ var hasSymbols$2 = hasSymbols$3();
8405
8415
 
8406
8416
  var getProto$2 = getProto$3;
8407
8417
  var $ObjectGPO = requireObject_getPrototypeOf();
@@ -8419,7 +8429,7 @@ var INTRINSICS = {
8419
8429
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
8420
8430
  '%Array%': Array,
8421
8431
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
8422
- '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
8432
+ '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
8423
8433
  '%AsyncFromSyncIteratorPrototype%': undefined$1,
8424
8434
  '%AsyncFunction%': needsEval,
8425
8435
  '%AsyncGenerator%': needsEval,
@@ -8450,10 +8460,10 @@ var INTRINSICS = {
8450
8460
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
8451
8461
  '%isFinite%': isFinite,
8452
8462
  '%isNaN%': isNaN,
8453
- '%IteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
8463
+ '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
8454
8464
  '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
8455
8465
  '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
8456
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
8466
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
8457
8467
  '%Math%': Math,
8458
8468
  '%Number%': Number,
8459
8469
  '%Object%': $Object$2,
@@ -8467,11 +8477,11 @@ var INTRINSICS = {
8467
8477
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
8468
8478
  '%RegExp%': RegExp,
8469
8479
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
8470
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
8480
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
8471
8481
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
8472
8482
  '%String%': String,
8473
- '%StringIteratorPrototype%': hasSymbols$3 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
8474
- '%Symbol%': hasSymbols$3 ? Symbol : undefined$1,
8483
+ '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
8484
+ '%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
8475
8485
  '%SyntaxError%': $SyntaxError$1,
8476
8486
  '%ThrowTypeError%': ThrowTypeError,
8477
8487
  '%TypedArray%': TypedArray,
@@ -8824,12 +8834,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
8824
8834
 
8825
8835
  // modified from https://github.com/es-shims/es6-shim
8826
8836
  var objectKeys$1 = objectKeys$2;
8827
- var hasSymbols$2 = requireShams()();
8837
+ var hasSymbols$1 = requireShams$1()();
8828
8838
  var callBound$h = callBound$i;
8829
8839
  var $Object$1 = esObjectAtoms;
8830
8840
  var $push = callBound$h('Array.prototype.push');
8831
8841
  var $propIsEnumerable = callBound$h('Object.prototype.propertyIsEnumerable');
8832
- var originalGetSymbols = hasSymbols$2 ? $Object$1.getOwnPropertySymbols : null;
8842
+ var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
8833
8843
 
8834
8844
  // eslint-disable-next-line no-unused-vars
8835
8845
  var implementation$8 = function assign(target, source1) {
@@ -8843,7 +8853,7 @@ var implementation$8 = function assign(target, source1) {
8843
8853
 
8844
8854
  // step 3.a.ii:
8845
8855
  var keys = objectKeys$1(from);
8846
- var getSymbols = hasSymbols$2 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
8856
+ var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
8847
8857
  if (getSymbols) {
8848
8858
  var syms = getSymbols(from);
8849
8859
  for (var j = 0; j < syms.length; ++j) {
@@ -9140,14 +9150,23 @@ var regexp_prototype_flags = flagsBound;
9140
9150
 
9141
9151
  var esGetIterator = {exports: {}};
9142
9152
 
9143
- var hasSymbols$1 = requireShams();
9153
+ var shams;
9154
+ var hasRequiredShams;
9144
9155
 
9145
- /** @type {import('.')} */
9146
- var shams = function hasToStringTagShams() {
9147
- return hasSymbols$1() && !!Symbol.toStringTag;
9148
- };
9156
+ function requireShams () {
9157
+ if (hasRequiredShams) return shams;
9158
+ hasRequiredShams = 1;
9159
+
9160
+ var hasSymbols = requireShams$1();
9161
+
9162
+ /** @type {import('.')} */
9163
+ shams = function hasToStringTagShams() {
9164
+ return hasSymbols() && !!Symbol.toStringTag;
9165
+ };
9166
+ return shams;
9167
+ }
9149
9168
 
9150
- var hasToStringTag$7 = shams();
9169
+ var hasToStringTag$7 = requireShams()();
9151
9170
  var callBound$f = callBound$i;
9152
9171
 
9153
9172
  var $toString$7 = callBound$f('Object.prototype.toString');
@@ -10184,7 +10203,7 @@ var tryStringObject = function tryStringObject(value) {
10184
10203
  /** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
10185
10204
  var $toString$6 = callBound$c('Object.prototype.toString');
10186
10205
  var strClass = '[object String]';
10187
- var hasToStringTag$6 = shams();
10206
+ var hasToStringTag$6 = requireShams()();
10188
10207
 
10189
10208
  /** @type {import('.')} */
10190
10209
  var isString$2 = function isString(value) {
@@ -10300,7 +10319,7 @@ var isSet$2 = exported$1 || function isSet(x) {
10300
10319
  var isArguments$1 = isArguments$2;
10301
10320
  var getStopIterationIterator = stopIterationIterator;
10302
10321
 
10303
- if (hasSymbols$4() || requireShams()()) {
10322
+ if (hasSymbols$3() || requireShams$1()()) {
10304
10323
  var $iterator = Symbol.iterator;
10305
10324
  // Symbol is available natively or shammed
10306
10325
  // natively:
@@ -10589,7 +10608,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
10589
10608
  /** @type {(value: unknown) => string} */
10590
10609
  var toStr$2 = callBound$9('Object.prototype.toString');
10591
10610
  var dateClass = '[object Date]';
10592
- var hasToStringTag$5 = shams();
10611
+ var hasToStringTag$5 = requireShams()();
10593
10612
 
10594
10613
  /** @type {import('.')} */
10595
10614
  var isDateObject = function isDateObject(value) {
@@ -10600,7 +10619,7 @@ var isDateObject = function isDateObject(value) {
10600
10619
  };
10601
10620
 
10602
10621
  var callBound$8 = callBound$i;
10603
- var hasToStringTag$4 = shams();
10622
+ var hasToStringTag$4 = requireShams()();
10604
10623
  var hasOwn = hasown;
10605
10624
  var gOPD$1 = gopd$1;
10606
10625
 
@@ -10705,7 +10724,7 @@ var tryNumberObject = function tryNumberObject(value) {
10705
10724
  };
10706
10725
  var $toString$3 = callBound$6('Object.prototype.toString');
10707
10726
  var numClass = '[object Number]';
10708
- var hasToStringTag$3 = shams();
10727
+ var hasToStringTag$3 = requireShams()();
10709
10728
 
10710
10729
  /** @type {import('.')} */
10711
10730
  var isNumberObject = function isNumberObject(value) {
@@ -10732,7 +10751,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
10732
10751
  }
10733
10752
  };
10734
10753
  var boolClass = '[object Boolean]';
10735
- var hasToStringTag$2 = shams();
10754
+ var hasToStringTag$2 = requireShams()();
10736
10755
 
10737
10756
  /** @type {import('.')} */
10738
10757
  var isBooleanObject = function isBoolean(value) {
@@ -10774,7 +10793,7 @@ function requireSafeRegexTest () {
10774
10793
 
10775
10794
  var callBound$4 = callBound$i;
10776
10795
  var $toString$1 = callBound$4('Object.prototype.toString');
10777
- var hasSymbols = hasSymbols$4();
10796
+ var hasSymbols = hasSymbols$3();
10778
10797
  var safeRegexTest = requireSafeRegexTest();
10779
10798
 
10780
10799
  if (hasSymbols) {
@@ -11220,7 +11239,7 @@ var gOPD = gopd$1;
11220
11239
  var getProto = getProto$3;
11221
11240
 
11222
11241
  var $toString = callBound$2('Object.prototype.toString');
11223
- var hasToStringTag = shams();
11242
+ var hasToStringTag = requireShams()();
11224
11243
 
11225
11244
  var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
11226
11245
  var typedArrays = availableTypedArrays();