pollination-react-io 1.52.1 → 1.52.3

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
@@ -15764,7 +15764,10 @@ var SettingsButton = function (_a) {
15764
15764
  ? style && style['highlight']
15765
15765
  ? "inset 0px 0px 9px 4px ".concat(style['highlight'])
15766
15766
  : 'inset 0px 0px 9px 4px #096dd9'
15767
- : undefined }), onClick: function (e) { return o.onSelect && o.onSelect(o); } }, (_a = o.icon) !== null && _a !== void 0 ? _a : o.label);
15767
+ : undefined }), onClick: function (e) {
15768
+ e.stopPropagation();
15769
+ o.onSelect && o.onSelect(o);
15770
+ } }, (_a = o.icon) !== null && _a !== void 0 ? _a : o.label);
15768
15771
  }))
15769
15772
  :
15770
15773
  React__default["default"].createElement(Dropdown, { trigger: (React__default["default"].createElement("button", { type: 'button' }, triggerIcon)), optionGroups: options, contentProps: {
@@ -44332,6 +44335,7 @@ var SendResults = function (_a) {
44332
44335
  var results = _a.results, defaultAction = _a.defaultAction, defaultKey = _a.defaultKey, optionsConfig = _a.optionsConfig, _b = _a.buttonLabel, buttonLabel = _b === void 0 ? 'Send Results' : _b, geometryOptions = _a.geometryOptions, _c = _a.style, style = _c === void 0 ? {} : _c;
44333
44336
  var _d = React.useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : Action$2.preview), selOpt = _d[0], setSelOpt = _d[1];
44334
44337
  var _e = React.useState(defaultKey !== null && defaultKey !== void 0 ? defaultKey : performance.now().toString()), key = _e[0], setKey = _e[1];
44338
+ var host = getHost();
44335
44339
  var sendMessage = useSendMessage().sendMessage;
44336
44340
  var disabled = React.useMemo(function () {
44337
44341
  return !checkPollinationPanel();
@@ -44435,7 +44439,7 @@ var SendResults = function (_a) {
44435
44439
  return true;
44436
44440
  return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
44437
44441
  }),
44438
- }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " results.") }));
44442
+ }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " results to ").concat(host, " scene") }));
44439
44443
  };
44440
44444
 
44441
44445
  /*!
@@ -46838,6 +46842,7 @@ var SendGeometry = function (_a) {
46838
46842
  var geometry = _a.geometry, defaultAction = _a.defaultAction, defaultKey = _a.defaultKey, optionsConfig = _a.optionsConfig, _b = _a.buttonLabel, buttonLabel = _b === void 0 ? 'Send Geometry' : _b, geometryOptions = _a.geometryOptions, style = _a.style;
46839
46843
  var _c = React.useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : Action$1.preview), selOpt = _c[0], setSelOpt = _c[1];
46840
46844
  var _d = React.useState(defaultKey !== null && defaultKey !== void 0 ? defaultKey : performance.now().toString()), key = _d[0], setKey = _d[1];
46845
+ var host = getHost();
46841
46846
  var sendMessage = useSendMessage().sendMessage;
46842
46847
  var disabled = React.useMemo(function () {
46843
46848
  return !checkPollinationPanel();
@@ -46938,7 +46943,7 @@ var SendGeometry = function (_a) {
46938
46943
  return true;
46939
46944
  return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
46940
46945
  }),
46941
- }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " geometry.") }));
46946
+ }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " geometry to ").concat(host, " scene") }));
46942
46947
  };
46943
46948
 
46944
46949
  var Action;
@@ -46966,6 +46971,7 @@ var SendModel = function (_a) {
46966
46971
  var hbjson = _a.hbjson, defaultAction = _a.defaultAction, defaultKey = _a.defaultKey, optionsConfig = _a.optionsConfig, _b = _a.buttonLabel, buttonLabel = _b === void 0 ? 'Send Model' : _b, _c = _a.style, style = _c === void 0 ? {} : _c;
46967
46972
  var _d = React.useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : Action.preview), selOpt = _d[0], setSelOpt = _d[1];
46968
46973
  var _e = React.useState(defaultKey !== null && defaultKey !== void 0 ? defaultKey : performance.now().toString()), key = _e[0], setKey = _e[1];
46974
+ var host = getHost();
46969
46975
  var sendHbjson = useSendHbjson().sendHbjson;
46970
46976
  var disabled = React.useMemo(function () {
46971
46977
  return !checkPollinationPanel();
@@ -47064,7 +47070,7 @@ var SendModel = function (_a) {
47064
47070
  return true;
47065
47071
  return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
47066
47072
  }),
47067
- }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " model.") }));
47073
+ }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " model to ").concat(host, " scene") }));
47068
47074
  };
47069
47075
 
47070
47076
  var JobTabs;
@@ -49296,7 +49302,7 @@ var FileCard = function (_a) {
49296
49302
  onClicked({ label: label, path: path, file: currFile, description: description });
49297
49303
  } },
49298
49304
  React__default["default"].createElement("div", { className: 'title-param' },
49299
- React__default["default"].createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default["default"].createElement("div", null,
49305
+ React__default["default"].createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default["default"].createElement("div", { title: 'Open the viewer' },
49300
49306
  React__default["default"].createElement("span", { style: { margin: '0 8px 0 0' } }, getFileIcon(18, ((_c = (_b = path.split('/')
49301
49307
  .reverse()[0]) === null || _b === void 0 ? void 0 : _b.split('.')) === null || _c === void 0 ? void 0 : _c.pop()) || '')),
49302
49308
  label)
@@ -49315,7 +49321,7 @@ var FileCard = function (_a) {
49315
49321
  border: '1px solid var(--slate9)',
49316
49322
  // @ts-ignore
49317
49323
  highlight: 'var(--slate7)'
49318
- }, hbjson: CADdata.data, buttonLabel: 'Model', defaultAction: Action.add, optionsConfig: {
49324
+ }, hbjson: CADdata.data, buttonLabel: label, defaultAction: Action.add, optionsConfig: {
49319
49325
  add: true,
49320
49326
  delete: false,
49321
49327
  'subscribe-preview': false,
@@ -49328,7 +49334,7 @@ var FileCard = function (_a) {
49328
49334
  border: '1px solid var(--slate9)',
49329
49335
  // @ts-ignore
49330
49336
  highlight: 'var(--slate7)'
49331
- }, results: CADdata.data, buttonLabel: 'Results', defaultAction: Action.add, optionsConfig: {
49337
+ }, results: CADdata.data, buttonLabel: label, defaultAction: Action.add, optionsConfig: {
49332
49338
  add: true,
49333
49339
  delete: false,
49334
49340
  'subscribe-preview': false,