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/atoms/BaseDropdown/BaseDropdown.d.ts +2 -0
- package/build/index.esm.js +36 -40
- package/build/index.esm.js.map +1 -1
- package/build/index.js +36 -40
- 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,18 @@ 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
|
-
},
|
53337
|
-
backgroundColor: 'white',
|
53338
|
-
color: 'black',
|
53339
|
-
border: 'solid 1px #000'
|
53340
|
-
}, disabled: disabled, action: 'hover', onSelect: onSelect, options: values },
|
53347
|
+
}, placement: 'bottomRight', activeId: defaultAction, disabled: disabled, action: 'hover', onSelect: onSelect, options: values },
|
53341
53348
|
React__default.createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53342
|
-
|
53343
|
-
color: 'black',
|
53349
|
+
width: '100%',
|
53344
53350
|
fontSize: '14px',
|
53345
|
-
border: 'solid 1px #
|
53351
|
+
border: 'solid 1px #fff'
|
53346
53352
|
}, onClick: function (e) {
|
53347
53353
|
e.stopPropagation();
|
53348
53354
|
if (disabled)
|
@@ -53463,23 +53469,18 @@ var SendModel = function (_a) {
|
|
53463
53469
|
replace: "Replace the model in the ".concat(host, " viewport"),
|
53464
53470
|
'subscribe-preview': "Render the model in the ".concat(host, " viewport"),
|
53465
53471
|
};
|
53466
|
-
return React__default.createElement(BaseDropdown, {
|
53472
|
+
return React__default.createElement(BaseDropdown, { childOverlayStyle: {
|
53467
53473
|
width: 'auto',
|
53468
53474
|
backgroundColor: 'white',
|
53469
|
-
color: '
|
53475
|
+
color: '#393e46',
|
53470
53476
|
fontSize: '14px',
|
53471
53477
|
padding: '10px',
|
53472
53478
|
cursor: 'pointer'
|
53473
|
-
},
|
53474
|
-
backgroundColor: 'white',
|
53475
|
-
color: 'black',
|
53476
|
-
border: 'solid 1px #000'
|
53477
|
-
}, disabled: disabled, onSelect: onSelect, action: 'hover', options: values },
|
53479
|
+
}, placement: 'bottomRight', activeId: defaultAction, disabled: disabled, onSelect: onSelect, action: 'hover', options: values },
|
53478
53480
|
React__default.createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53479
|
-
|
53480
|
-
color: 'black',
|
53481
|
+
width: '100%',
|
53481
53482
|
fontSize: '14px',
|
53482
|
-
border: 'solid 1px #
|
53483
|
+
border: 'solid 1px #fff'
|
53483
53484
|
}, onClick: function (e) {
|
53484
53485
|
e.stopPropagation();
|
53485
53486
|
if (disabled)
|
@@ -53598,23 +53599,18 @@ var SendResults = function (_a) {
|
|
53598
53599
|
clear: "Clear results from the ".concat(host, " viewport"),
|
53599
53600
|
'subscribe-preview': "Render results in the ".concat(host, " viewport"),
|
53600
53601
|
};
|
53601
|
-
return React__default.createElement(BaseDropdown, {
|
53602
|
+
return React__default.createElement(BaseDropdown, { childOverlayStyle: {
|
53602
53603
|
width: 'auto',
|
53603
53604
|
backgroundColor: 'white',
|
53604
|
-
color: '
|
53605
|
+
color: '#393e46',
|
53605
53606
|
fontSize: '14px',
|
53606
53607
|
padding: '10px',
|
53607
53608
|
cursor: 'pointer'
|
53608
|
-
},
|
53609
|
-
backgroundColor: 'white',
|
53610
|
-
color: 'black',
|
53611
|
-
border: 'solid 1px #000'
|
53612
|
-
}, action: 'hover', disabled: disabled, onSelect: onSelect, options: values },
|
53609
|
+
}, placement: 'bottomRight', activeId: defaultAction, action: 'hover', disabled: disabled, onSelect: onSelect, options: values },
|
53613
53610
|
React__default.createElement(Button, { title: helpTextButton[currOption === null || currOption === void 0 ? void 0 : currOption.id], disabled: disabled, style: {
|
53614
|
-
|
53615
|
-
color: 'black',
|
53611
|
+
width: '100%',
|
53616
53612
|
fontSize: '14px',
|
53617
|
-
border: 'solid 1px #
|
53613
|
+
border: 'solid 1px #fff'
|
53618
53614
|
}, onClick: function (e) {
|
53619
53615
|
e.stopPropagation();
|
53620
53616
|
if (disabled)
|
@@ -56055,7 +56051,7 @@ var FileCard = function (_a) {
|
|
56055
56051
|
add: true,
|
56056
56052
|
delete: false,
|
56057
56053
|
'subscribe-preview': false,
|
56058
|
-
clear:
|
56054
|
+
clear: false,
|
56059
56055
|
preview: true,
|
56060
56056
|
replace: true,
|
56061
56057
|
}, key: CADdata.id, defaultKey: CADdata.id }),
|
@@ -56065,7 +56061,7 @@ var FileCard = function (_a) {
|
|
56065
56061
|
add: true,
|
56066
56062
|
delete: (host === 'revit'),
|
56067
56063
|
'subscribe-preview': false,
|
56068
|
-
clear:
|
56064
|
+
clear: false,
|
56069
56065
|
preview: (host !== 'revit')
|
56070
56066
|
}, key: CADdata.id, defaultKey: CADdata.id })),
|
56071
56067
|
open && React__default.createElement("div", { className: 'card-description' }, description));
|