pollination-react-io 1.76.1 → 1.76.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/atoms/BaseDropdown/BaseDropdown.d.ts +2 -0
- package/build/index.esm.js +39 -37
- package/build/index.esm.js.map +1 -1
- package/build/index.js +39 -37
- package/build/index.js.map +1 -1
- package/package.json +1 -1
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 #
|
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:
|
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:
|
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:
|
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,20 @@ 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, {
|
53367
|
+
return React__default["default"].createElement(BaseDropdown, { childOverlayStyle: {
|
53357
53368
|
width: 'auto',
|
53358
53369
|
backgroundColor: 'white',
|
53359
|
-
color: '
|
53370
|
+
color: '#393e46',
|
53360
53371
|
fontSize: '14px',
|
53361
53372
|
padding: '10px',
|
53362
53373
|
cursor: 'pointer'
|
53363
53374
|
}, triggerStyle: {
|
53364
|
-
|
53365
|
-
|
53366
|
-
border: 'solid 1px #000'
|
53367
|
-
}, disabled: disabled, action: 'hover', onSelect: onSelect, options: values },
|
53375
|
+
border: 'solid 1px #fff'
|
53376
|
+
}, placement: 'bottomRight', activeId: defaultAction, disabled: disabled, action: 'hover', onSelect: onSelect, options: values },
|
53368
53377
|
React__default["default"].createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53369
|
-
|
53370
|
-
color: 'black',
|
53378
|
+
width: '100%',
|
53371
53379
|
fontSize: '14px',
|
53372
|
-
border: 'solid 1px #
|
53380
|
+
border: 'solid 1px #fff'
|
53373
53381
|
}, onClick: function (e) {
|
53374
53382
|
e.stopPropagation();
|
53375
53383
|
if (disabled)
|
@@ -53490,23 +53498,20 @@ var SendModel = function (_a) {
|
|
53490
53498
|
replace: "Replace the model in the ".concat(host, " viewport"),
|
53491
53499
|
'subscribe-preview': "Render the model in the ".concat(host, " viewport"),
|
53492
53500
|
};
|
53493
|
-
return React__default["default"].createElement(BaseDropdown, {
|
53501
|
+
return React__default["default"].createElement(BaseDropdown, { childOverlayStyle: {
|
53494
53502
|
width: 'auto',
|
53495
53503
|
backgroundColor: 'white',
|
53496
|
-
color: '
|
53504
|
+
color: '#393e46',
|
53497
53505
|
fontSize: '14px',
|
53498
53506
|
padding: '10px',
|
53499
53507
|
cursor: 'pointer'
|
53500
53508
|
}, triggerStyle: {
|
53501
|
-
|
53502
|
-
|
53503
|
-
border: 'solid 1px #000'
|
53504
|
-
}, disabled: disabled, onSelect: onSelect, action: 'hover', options: values },
|
53509
|
+
border: 'solid 1px #fff'
|
53510
|
+
}, placement: 'bottomRight', activeId: defaultAction, disabled: disabled, onSelect: onSelect, action: 'hover', options: values },
|
53505
53511
|
React__default["default"].createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53506
|
-
|
53507
|
-
color: 'black',
|
53512
|
+
width: '100%',
|
53508
53513
|
fontSize: '14px',
|
53509
|
-
border: 'solid 1px #
|
53514
|
+
border: 'solid 1px #fff'
|
53510
53515
|
}, onClick: function (e) {
|
53511
53516
|
e.stopPropagation();
|
53512
53517
|
if (disabled)
|
@@ -53625,23 +53630,20 @@ var SendResults = function (_a) {
|
|
53625
53630
|
clear: "Clear results from the ".concat(host, " viewport"),
|
53626
53631
|
'subscribe-preview': "Render results in the ".concat(host, " viewport"),
|
53627
53632
|
};
|
53628
|
-
return React__default["default"].createElement(BaseDropdown, {
|
53633
|
+
return React__default["default"].createElement(BaseDropdown, { childOverlayStyle: {
|
53629
53634
|
width: 'auto',
|
53630
53635
|
backgroundColor: 'white',
|
53631
|
-
color: '
|
53636
|
+
color: '#393e46',
|
53632
53637
|
fontSize: '14px',
|
53633
53638
|
padding: '10px',
|
53634
53639
|
cursor: 'pointer'
|
53635
53640
|
}, triggerStyle: {
|
53636
|
-
|
53637
|
-
|
53638
|
-
border: 'solid 1px #000'
|
53639
|
-
}, action: 'hover', disabled: disabled, onSelect: onSelect, options: values },
|
53641
|
+
border: 'solid 1px #fff'
|
53642
|
+
}, placement: 'bottomRight', activeId: defaultAction, action: 'hover', disabled: disabled, onSelect: onSelect, options: values },
|
53640
53643
|
React__default["default"].createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53641
|
-
|
53642
|
-
color: 'black',
|
53644
|
+
width: '100%',
|
53643
53645
|
fontSize: '14px',
|
53644
|
-
border: 'solid 1px #
|
53646
|
+
border: 'solid 1px #fff'
|
53645
53647
|
}, onClick: function (e) {
|
53646
53648
|
e.stopPropagation();
|
53647
53649
|
if (disabled)
|
@@ -56082,7 +56084,7 @@ var FileCard = function (_a) {
|
|
56082
56084
|
add: true,
|
56083
56085
|
delete: false,
|
56084
56086
|
'subscribe-preview': false,
|
56085
|
-
clear:
|
56087
|
+
clear: false,
|
56086
56088
|
preview: true,
|
56087
56089
|
replace: true,
|
56088
56090
|
}, key: CADdata.id, defaultKey: CADdata.id }),
|
@@ -56092,7 +56094,7 @@ var FileCard = function (_a) {
|
|
56092
56094
|
add: true,
|
56093
56095
|
delete: (host === 'revit'),
|
56094
56096
|
'subscribe-preview': false,
|
56095
|
-
clear:
|
56097
|
+
clear: false,
|
56096
56098
|
preview: (host !== 'revit')
|
56097
56099
|
}, key: CADdata.id, defaultKey: CADdata.id })),
|
56098
56100
|
open && React__default["default"].createElement("div", { className: 'card-description' }, description));
|