pollination-react-io 1.76.1 → 1.76.2

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/build/index.js CHANGED
@@ -53220,36 +53220,47 @@ styleInject(css_248z$7);
53220
53220
 
53221
53221
  var BaseDropdown = function (_a) {
53222
53222
  var options = _a.options, children = _a.children, _b = _a.overlayStyle, overlayStyle = _b === void 0 ? {
53223
- border: 'solid 1px #000',
53223
+ border: 'solid 1px #606470',
53224
53224
  backgroundColor: '#fff',
53225
53225
  padding: '5px',
53226
- borderRadius: '5px'
53226
+ borderRadius: '5px',
53227
53227
  } : _b, _c = _a.childOverlayStyle, childOverlayStyle = _c === void 0 ? {
53228
53228
  padding: '10px',
53229
- cursor: 'pointer'
53230
- } : _c, _d = _a.triggerStyle, triggerStyle = _d === void 0 ? {} : _d, _e = _a.placement, placement = _e === void 0 ? 'bottomCenter' : _e, _f = _a.icon, icon = _f === void 0 ? React__default["default"].createElement(CaretDownFill$1, { size: 12 }) : _f, _g = _a.onSelect, onSelect = _g === void 0 ? function (option) { } : _g, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.action, action = _j === void 0 ? 'click' : _j;
53229
+ cursor: 'pointer',
53230
+ } : _c, _d = _a.triggerStyle, triggerStyle = _d === void 0 ? {} : _d, _e = _a.placement, placement = _e === void 0 ? 'bottomCenter' : _e, _f = _a.icon, icon = _f === void 0 ? React__default["default"].createElement(CaretDownFill$1, { size: 12 }) : _f, _g = _a.onSelect, onSelect = _g === void 0 ? function (option) { } : _g, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.action, action = _j === void 0 ? 'click' : _j, _k = _a.activeId, activeId = _k === void 0 ? undefined : _k, _l = _a.selectedStyle, selectedStyle = _l === void 0 ? {
53231
+ backgroundColor: '#40a9ff',
53232
+ color: '#fff',
53233
+ fontWeight: 'bold'
53234
+ } : _l;
53235
+ var _m = React.useState(activeId), selection = _m[0], setSelection = _m[1];
53231
53236
  var renderItem = React.useCallback(function (o) {
53232
53237
  switch (o.type) {
53233
53238
  case 'link':
53234
- return (React__default["default"].createElement("div", { style: childOverlayStyle, className: 'basedropdown-overlay-child', key: o.id, tabIndex: 0, role: 'button', onClick: function (e) {
53239
+ return (React__default["default"].createElement("div", { style: o.id == selection
53240
+ ? __assign(__assign({}, childOverlayStyle), selectedStyle) : childOverlayStyle, className: 'basedropdown-overlay-child', key: o.id, tabIndex: 0, role: 'button', onClick: function (e) {
53235
53241
  window.location.href = o.to;
53242
+ setSelection(o.id);
53236
53243
  } },
53237
53244
  o.icon && React__default["default"].createElement("span", { style: { marginRight: '5px' } }, o.icon),
53238
53245
  o.label));
53239
53246
  case 'label':
53240
- return (React__default["default"].createElement("div", { style: childOverlayStyle, key: o.id, tabIndex: 0, role: 'button', onClick: function (e) {
53247
+ return (React__default["default"].createElement("div", { style: o.id == selection
53248
+ ? __assign(__assign({}, childOverlayStyle), selectedStyle) : childOverlayStyle, key: o.id, tabIndex: 0, role: 'button', onClick: function (e) {
53241
53249
  onSelect(o);
53250
+ setSelection(o.id);
53242
53251
  } },
53243
53252
  o.icon && React__default["default"].createElement("span", { style: { marginRight: '5px' } }, o.icon),
53244
53253
  o.label));
53245
53254
  default:
53246
- return (React__default["default"].createElement(Button, { style: childOverlayStyle, key: o.id, onClick: function (e) {
53255
+ return (React__default["default"].createElement(Button, { style: o.id == selection
53256
+ ? __assign(__assign({}, childOverlayStyle), selectedStyle) : childOverlayStyle, key: o.id, onClick: function (e) {
53247
53257
  onSelect(o);
53258
+ setSelection(o.id);
53248
53259
  } },
53249
53260
  o.icon,
53250
53261
  o.label));
53251
53262
  }
53252
- }, []);
53263
+ }, [selection]);
53253
53264
  return (React__default["default"].createElement("div", null,
53254
53265
  React__default["default"].createElement("div", { style: { display: 'flex' } },
53255
53266
  children,
@@ -53353,23 +53364,18 @@ var SendGeometry = function (_a) {
53353
53364
  clear: "Clear geometry from the ".concat(host, " viewport"),
53354
53365
  'subscribe-preview': "Render geometry in the ".concat(host, " viewport"),
53355
53366
  };
53356
- return React__default["default"].createElement(BaseDropdown, { icon: React__default["default"].createElement(Logo, { size: 18 }), childOverlayStyle: {
53367
+ return React__default["default"].createElement(BaseDropdown, { childOverlayStyle: {
53357
53368
  width: 'auto',
53358
53369
  backgroundColor: 'white',
53359
- color: 'black',
53370
+ color: '#393e46',
53360
53371
  fontSize: '14px',
53361
53372
  padding: '10px',
53362
53373
  cursor: 'pointer'
53363
- }, triggerStyle: {
53364
- backgroundColor: 'white',
53365
- color: 'black',
53366
- border: 'solid 1px #000'
53367
- }, disabled: disabled, action: 'hover', onSelect: onSelect, options: values },
53374
+ }, placement: 'bottomRight', activeId: defaultAction, disabled: disabled, action: 'hover', onSelect: onSelect, options: values },
53368
53375
  React__default["default"].createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
53369
- backgroundColor: 'white',
53370
- color: 'black',
53376
+ width: '100%',
53371
53377
  fontSize: '14px',
53372
- border: 'solid 1px #000'
53378
+ border: 'solid 1px #fff'
53373
53379
  }, onClick: function (e) {
53374
53380
  e.stopPropagation();
53375
53381
  if (disabled)
@@ -53490,23 +53496,18 @@ var SendModel = function (_a) {
53490
53496
  replace: "Replace the model in the ".concat(host, " viewport"),
53491
53497
  'subscribe-preview': "Render the model in the ".concat(host, " viewport"),
53492
53498
  };
53493
- return React__default["default"].createElement(BaseDropdown, { icon: React__default["default"].createElement(Logo, { size: 18 }), childOverlayStyle: {
53499
+ return React__default["default"].createElement(BaseDropdown, { childOverlayStyle: {
53494
53500
  width: 'auto',
53495
53501
  backgroundColor: 'white',
53496
- color: 'black',
53502
+ color: '#393e46',
53497
53503
  fontSize: '14px',
53498
53504
  padding: '10px',
53499
53505
  cursor: 'pointer'
53500
- }, triggerStyle: {
53501
- backgroundColor: 'white',
53502
- color: 'black',
53503
- border: 'solid 1px #000'
53504
- }, disabled: disabled, onSelect: onSelect, action: 'hover', options: values },
53506
+ }, placement: 'bottomRight', activeId: defaultAction, disabled: disabled, onSelect: onSelect, action: 'hover', options: values },
53505
53507
  React__default["default"].createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
53506
- backgroundColor: 'white',
53507
- color: 'black',
53508
+ width: '100%',
53508
53509
  fontSize: '14px',
53509
- border: 'solid 1px #000'
53510
+ border: 'solid 1px #fff'
53510
53511
  }, onClick: function (e) {
53511
53512
  e.stopPropagation();
53512
53513
  if (disabled)
@@ -53625,23 +53626,18 @@ var SendResults = function (_a) {
53625
53626
  clear: "Clear results from the ".concat(host, " viewport"),
53626
53627
  'subscribe-preview': "Render results in the ".concat(host, " viewport"),
53627
53628
  };
53628
- return React__default["default"].createElement(BaseDropdown, { icon: React__default["default"].createElement(Logo, { size: 18 }), childOverlayStyle: {
53629
+ return React__default["default"].createElement(BaseDropdown, { childOverlayStyle: {
53629
53630
  width: 'auto',
53630
53631
  backgroundColor: 'white',
53631
- color: 'black',
53632
+ color: '#393e46',
53632
53633
  fontSize: '14px',
53633
53634
  padding: '10px',
53634
53635
  cursor: 'pointer'
53635
- }, triggerStyle: {
53636
- backgroundColor: 'white',
53637
- color: 'black',
53638
- border: 'solid 1px #000'
53639
- }, action: 'hover', disabled: disabled, onSelect: onSelect, options: values },
53636
+ }, placement: 'bottomRight', activeId: defaultAction, action: 'hover', disabled: disabled, onSelect: onSelect, options: values },
53640
53637
  React__default["default"].createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
53641
- backgroundColor: 'white',
53642
- color: 'black',
53638
+ width: '100%',
53643
53639
  fontSize: '14px',
53644
- border: 'solid 1px #000'
53640
+ border: 'solid 1px #fff'
53645
53641
  }, onClick: function (e) {
53646
53642
  e.stopPropagation();
53647
53643
  if (disabled)
@@ -56082,7 +56078,7 @@ var FileCard = function (_a) {
56082
56078
  add: true,
56083
56079
  delete: false,
56084
56080
  'subscribe-preview': false,
56085
- clear: true,
56081
+ clear: false,
56086
56082
  preview: true,
56087
56083
  replace: true,
56088
56084
  }, key: CADdata.id, defaultKey: CADdata.id }),
@@ -56092,7 +56088,7 @@ var FileCard = function (_a) {
56092
56088
  add: true,
56093
56089
  delete: (host === 'revit'),
56094
56090
  'subscribe-preview': false,
56095
- clear: (host !== 'revit'),
56091
+ clear: false,
56096
56092
  preview: (host !== 'revit')
56097
56093
  }, key: CADdata.id, defaultKey: CADdata.id })),
56098
56094
  open && React__default["default"].createElement("div", { className: 'card-description' }, description));