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.esm.js
CHANGED
@@ -53193,36 +53193,47 @@ styleInject(css_248z$7);
|
|
53193
53193
|
|
53194
53194
|
var BaseDropdown = function (_a) {
|
53195
53195
|
var options = _a.options, children = _a.children, _b = _a.overlayStyle, overlayStyle = _b === void 0 ? {
|
53196
|
-
border: 'solid 1px #
|
53196
|
+
border: 'solid 1px #606470',
|
53197
53197
|
backgroundColor: '#fff',
|
53198
53198
|
padding: '5px',
|
53199
|
-
borderRadius: '5px'
|
53199
|
+
borderRadius: '5px',
|
53200
53200
|
} : _b, _c = _a.childOverlayStyle, childOverlayStyle = _c === void 0 ? {
|
53201
53201
|
padding: '10px',
|
53202
|
-
cursor: 'pointer'
|
53203
|
-
} : _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.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
|
53202
|
+
cursor: 'pointer',
|
53203
|
+
} : _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.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 ? {
|
53204
|
+
backgroundColor: '#40a9ff',
|
53205
|
+
color: '#fff',
|
53206
|
+
fontWeight: 'bold'
|
53207
|
+
} : _l;
|
53208
|
+
var _m = useState(activeId), selection = _m[0], setSelection = _m[1];
|
53204
53209
|
var renderItem = useCallback(function (o) {
|
53205
53210
|
switch (o.type) {
|
53206
53211
|
case 'link':
|
53207
|
-
return (React__default.createElement("div", { style:
|
53212
|
+
return (React__default.createElement("div", { style: o.id == selection
|
53213
|
+
? __assign(__assign({}, childOverlayStyle), selectedStyle) : childOverlayStyle, className: 'basedropdown-overlay-child', key: o.id, tabIndex: 0, role: 'button', onClick: function (e) {
|
53208
53214
|
window.location.href = o.to;
|
53215
|
+
setSelection(o.id);
|
53209
53216
|
} },
|
53210
53217
|
o.icon && React__default.createElement("span", { style: { marginRight: '5px' } }, o.icon),
|
53211
53218
|
o.label));
|
53212
53219
|
case 'label':
|
53213
|
-
return (React__default.createElement("div", { style:
|
53220
|
+
return (React__default.createElement("div", { style: o.id == selection
|
53221
|
+
? __assign(__assign({}, childOverlayStyle), selectedStyle) : childOverlayStyle, key: o.id, tabIndex: 0, role: 'button', onClick: function (e) {
|
53214
53222
|
onSelect(o);
|
53223
|
+
setSelection(o.id);
|
53215
53224
|
} },
|
53216
53225
|
o.icon && React__default.createElement("span", { style: { marginRight: '5px' } }, o.icon),
|
53217
53226
|
o.label));
|
53218
53227
|
default:
|
53219
|
-
return (React__default.createElement(Button, { style:
|
53228
|
+
return (React__default.createElement(Button, { style: o.id == selection
|
53229
|
+
? __assign(__assign({}, childOverlayStyle), selectedStyle) : childOverlayStyle, key: o.id, onClick: function (e) {
|
53220
53230
|
onSelect(o);
|
53231
|
+
setSelection(o.id);
|
53221
53232
|
} },
|
53222
53233
|
o.icon,
|
53223
53234
|
o.label));
|
53224
53235
|
}
|
53225
|
-
}, []);
|
53236
|
+
}, [selection]);
|
53226
53237
|
return (React__default.createElement("div", null,
|
53227
53238
|
React__default.createElement("div", { style: { display: 'flex' } },
|
53228
53239
|
children,
|
@@ -53326,23 +53337,20 @@ var SendGeometry = function (_a) {
|
|
53326
53337
|
clear: "Clear geometry from the ".concat(host, " viewport"),
|
53327
53338
|
'subscribe-preview': "Render geometry in the ".concat(host, " viewport"),
|
53328
53339
|
};
|
53329
|
-
return React__default.createElement(BaseDropdown, {
|
53340
|
+
return React__default.createElement(BaseDropdown, { childOverlayStyle: {
|
53330
53341
|
width: 'auto',
|
53331
53342
|
backgroundColor: 'white',
|
53332
|
-
color: '
|
53343
|
+
color: '#393e46',
|
53333
53344
|
fontSize: '14px',
|
53334
53345
|
padding: '10px',
|
53335
53346
|
cursor: 'pointer'
|
53336
53347
|
}, triggerStyle: {
|
53337
|
-
|
53338
|
-
|
53339
|
-
border: 'solid 1px #000'
|
53340
|
-
}, disabled: disabled, action: 'hover', onSelect: onSelect, options: values },
|
53348
|
+
border: 'solid 1px #fff'
|
53349
|
+
}, placement: 'bottomRight', activeId: defaultAction, disabled: disabled, action: 'hover', onSelect: onSelect, options: values },
|
53341
53350
|
React__default.createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53342
|
-
|
53343
|
-
color: 'black',
|
53351
|
+
width: '100%',
|
53344
53352
|
fontSize: '14px',
|
53345
|
-
border: 'solid 1px #
|
53353
|
+
border: 'solid 1px #fff'
|
53346
53354
|
}, onClick: function (e) {
|
53347
53355
|
e.stopPropagation();
|
53348
53356
|
if (disabled)
|
@@ -53463,23 +53471,20 @@ var SendModel = function (_a) {
|
|
53463
53471
|
replace: "Replace the model in the ".concat(host, " viewport"),
|
53464
53472
|
'subscribe-preview': "Render the model in the ".concat(host, " viewport"),
|
53465
53473
|
};
|
53466
|
-
return React__default.createElement(BaseDropdown, {
|
53474
|
+
return React__default.createElement(BaseDropdown, { childOverlayStyle: {
|
53467
53475
|
width: 'auto',
|
53468
53476
|
backgroundColor: 'white',
|
53469
|
-
color: '
|
53477
|
+
color: '#393e46',
|
53470
53478
|
fontSize: '14px',
|
53471
53479
|
padding: '10px',
|
53472
53480
|
cursor: 'pointer'
|
53473
53481
|
}, triggerStyle: {
|
53474
|
-
|
53475
|
-
|
53476
|
-
border: 'solid 1px #000'
|
53477
|
-
}, disabled: disabled, onSelect: onSelect, action: 'hover', options: values },
|
53482
|
+
border: 'solid 1px #fff'
|
53483
|
+
}, placement: 'bottomRight', activeId: defaultAction, disabled: disabled, onSelect: onSelect, action: 'hover', options: values },
|
53478
53484
|
React__default.createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53479
|
-
|
53480
|
-
color: 'black',
|
53485
|
+
width: '100%',
|
53481
53486
|
fontSize: '14px',
|
53482
|
-
border: 'solid 1px #
|
53487
|
+
border: 'solid 1px #fff'
|
53483
53488
|
}, onClick: function (e) {
|
53484
53489
|
e.stopPropagation();
|
53485
53490
|
if (disabled)
|
@@ -53598,23 +53603,20 @@ var SendResults = function (_a) {
|
|
53598
53603
|
clear: "Clear results from the ".concat(host, " viewport"),
|
53599
53604
|
'subscribe-preview': "Render results in the ".concat(host, " viewport"),
|
53600
53605
|
};
|
53601
|
-
return React__default.createElement(BaseDropdown, {
|
53606
|
+
return React__default.createElement(BaseDropdown, { childOverlayStyle: {
|
53602
53607
|
width: 'auto',
|
53603
53608
|
backgroundColor: 'white',
|
53604
|
-
color: '
|
53609
|
+
color: '#393e46',
|
53605
53610
|
fontSize: '14px',
|
53606
53611
|
padding: '10px',
|
53607
53612
|
cursor: 'pointer'
|
53608
53613
|
}, triggerStyle: {
|
53609
|
-
|
53610
|
-
|
53611
|
-
border: 'solid 1px #000'
|
53612
|
-
}, action: 'hover', disabled: disabled, onSelect: onSelect, options: values },
|
53614
|
+
border: 'solid 1px #fff'
|
53615
|
+
}, placement: 'bottomRight', activeId: defaultAction, action: 'hover', disabled: disabled, onSelect: onSelect, options: values },
|
53613
53616
|
React__default.createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53614
|
-
|
53615
|
-
color: 'black',
|
53617
|
+
width: '100%',
|
53616
53618
|
fontSize: '14px',
|
53617
|
-
border: 'solid 1px #
|
53619
|
+
border: 'solid 1px #fff'
|
53618
53620
|
}, onClick: function (e) {
|
53619
53621
|
e.stopPropagation();
|
53620
53622
|
if (disabled)
|
@@ -56055,7 +56057,7 @@ var FileCard = function (_a) {
|
|
56055
56057
|
add: true,
|
56056
56058
|
delete: false,
|
56057
56059
|
'subscribe-preview': false,
|
56058
|
-
clear:
|
56060
|
+
clear: false,
|
56059
56061
|
preview: true,
|
56060
56062
|
replace: true,
|
56061
56063
|
}, key: CADdata.id, defaultKey: CADdata.id }),
|
@@ -56065,7 +56067,7 @@ var FileCard = function (_a) {
|
|
56065
56067
|
add: true,
|
56066
56068
|
delete: (host === 'revit'),
|
56067
56069
|
'subscribe-preview': false,
|
56068
|
-
clear:
|
56070
|
+
clear: false,
|
56069
56071
|
preview: (host !== 'revit')
|
56070
56072
|
}, key: CADdata.id, defaultKey: CADdata.id })),
|
56071
56073
|
open && React__default.createElement("div", { className: 'card-description' }, description));
|