pollination-react-io 1.70.1 → 1.71.0
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/hooks/usePollinationPanel.d.ts +9 -2
- package/build/index.esm.js +17 -7
- package/build/index.esm.js.map +1 -1
- package/build/index.js +16 -6
- package/build/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,6 +1,13 @@
|
|
1
1
|
import { PanelMessageOut } from './types';
|
2
|
-
import { Job, Run } from '@pollination-solutions/pollination-sdk';
|
2
|
+
import { Job, Run, RunStatusEnum } from '@pollination-solutions/pollination-sdk';
|
3
3
|
import { ProjectJobInfo } from './useCreateStudy';
|
4
|
+
export declare enum TargetPlaform {
|
5
|
+
all = "all",
|
6
|
+
rhino = "rhino",
|
7
|
+
revit = "revit",
|
8
|
+
grasshopper = "grasshopper",
|
9
|
+
sketchup = "sketchup"
|
10
|
+
}
|
4
11
|
export declare const usePollinationPanel: () => {
|
5
12
|
getFileBase64: (key?: any, accept?: any) => PanelMessageOut;
|
6
13
|
saveFileBase64: (key: string, file: File | Blob, subFolder: string, fileName: string) => Promise<PanelMessageOut>;
|
@@ -10,7 +17,7 @@ export declare const usePollinationPanel: () => {
|
|
10
17
|
fetchLocalJob: (path?: any, subfolder?: any) => Job;
|
11
18
|
fetchLocalLog: (path?: any, subfolder?: any) => any;
|
12
19
|
fileExplorer: (root: string) => PanelMessageOut;
|
13
|
-
getPaginatedJob: (projectSlug: string, pageSize: number, curPage: number) => ProjectJobInfo[];
|
20
|
+
getPaginatedJob: (projectSlug: string, pageSize: number, curPage: number, status?: RunStatusEnum, platform?: TargetPlaform) => ProjectJobInfo[];
|
14
21
|
getJob: (projectSlug: string) => ProjectJobInfo[];
|
15
22
|
deleteJob: (projectSlug: string, path: string, subfolder: string) => any;
|
16
23
|
getPlatforms: (projectSlug: string) => {};
|
package/build/index.esm.js
CHANGED
@@ -37994,6 +37994,14 @@ function formatBytes(bytes, decimals) {
|
|
37994
37994
|
return "".concat(parseFloat((bytes / Math.pow(k, i)).toFixed(dm)), " ").concat(sizes[i]);
|
37995
37995
|
}
|
37996
37996
|
|
37997
|
+
var TargetPlaform;
|
37998
|
+
(function (TargetPlaform) {
|
37999
|
+
TargetPlaform["all"] = "all";
|
38000
|
+
TargetPlaform["rhino"] = "rhino";
|
38001
|
+
TargetPlaform["revit"] = "revit";
|
38002
|
+
TargetPlaform["grasshopper"] = "grasshopper";
|
38003
|
+
TargetPlaform["sketchup"] = "sketchup";
|
38004
|
+
})(TargetPlaform || (TargetPlaform = {}));
|
37997
38005
|
var SimulationFileType;
|
37998
38006
|
(function (SimulationFileType) {
|
37999
38007
|
SimulationFileType[SimulationFileType["status"] = 0] = "status";
|
@@ -38145,11 +38153,13 @@ var usePollinationPanel = function () {
|
|
38145
38153
|
* @param curPage Current page
|
38146
38154
|
* @returns Array of ProjectJobInfo
|
38147
38155
|
*/
|
38148
|
-
var getPaginatedJob = function (projectSlug, pageSize, curPage) {
|
38156
|
+
var getPaginatedJob = function (projectSlug, pageSize, curPage, status, platform) {
|
38157
|
+
if (status === void 0) { status = undefined; }
|
38158
|
+
if (platform === void 0) { platform = TargetPlaform.all; }
|
38149
38159
|
if (!panel)
|
38150
38160
|
return;
|
38151
38161
|
try {
|
38152
|
-
var message = panel.GetPaginatedJob(projectSlug, pageSize, curPage);
|
38162
|
+
var message = panel.GetPaginatedJob(projectSlug, pageSize, curPage, status, platform);
|
38153
38163
|
var arr = JSON.parse(message.data);
|
38154
38164
|
return arr;
|
38155
38165
|
}
|
@@ -48983,11 +48993,11 @@ var StudyCard = function (_a) {
|
|
48983
48993
|
React__default.createElement("div", { className: 'item5' },
|
48984
48994
|
React__default.createElement("span", { style: { marginRight: '0.75rem' } },
|
48985
48995
|
React__default.createElement(Avatar, { src: study ? study.author.picture_url : '', size: 24, color: hover.author ? '#40a9ff' : undefined })),
|
48986
|
-
React__default.createElement("a", { className: 'link', href: study ? "/".concat(study.author.name) : '', title: 'Go to author page',
|
48996
|
+
React__default.createElement("a", { className: 'link', href: study ? "/".concat(study.author.name) : '', title: 'Go to author page', rel: 'noreferrer', onMouseOver: function (e) { return toggleHover('author', true); }, onMouseLeave: function (e) { return toggleHover('author', false); }, style: hover.author ? { color: '#40a9ff' } : {} }, study ? ((_h = study.author.display_name) !== null && _h !== void 0 ? _h : study.author.name) : '--')),
|
48987
48997
|
React__default.createElement("div", { className: 'item6' },
|
48988
48998
|
React__default.createElement("span", { style: { marginRight: '0.75rem' } },
|
48989
48999
|
React__default.createElement(Avatar, { src: study ? study.recipe.metadata.icon : '', size: 24, color: hover.recipe ? '#40a9ff' : undefined })),
|
48990
|
-
React__default.createElement("a", { className: 'link', href: study ? recipeLinkFromSource(study.recipe.source) : '', title: 'Go to recipe page',
|
49000
|
+
React__default.createElement("a", { className: 'link', href: study ? recipeLinkFromSource(study.recipe.source) : '', title: 'Go to recipe page', rel: 'noreferrer', onMouseOver: function (e) { return toggleHover('recipe', true); }, onMouseLeave: function (e) { return toggleHover('recipe', false); }, style: hover.recipe ? { color: '#40a9ff' } : {} }, study ? study.recipe.metadata.name : '--'),
|
48991
49001
|
study && React__default.createElement("span", { className: 'light-text' },
|
48992
49002
|
" ",
|
48993
49003
|
study.recipe.metadata.tag)),
|
@@ -49324,7 +49334,7 @@ var RunCard = function (_a) {
|
|
49324
49334
|
else {
|
49325
49335
|
window.location.href = "/".concat((_a = localStudy === null || localStudy === void 0 ? void 0 : localStudy.author) === null || _a === void 0 ? void 0 : _a.name);
|
49326
49336
|
}
|
49327
|
-
}, title: 'Go to author page',
|
49337
|
+
}, title: 'Go to author page', rel: 'noreferrer', onMouseOver: function (e) { return toggleHover('author', true); }, onMouseLeave: function (e) { return toggleHover('author', false); }, style: hover.author ? { color: '#40a9ff' } : {} },
|
49328
49338
|
!localRun && run && ((_m = (_l = run.author) === null || _l === void 0 ? void 0 : _l.display_name) !== null && _m !== void 0 ? _m : (_o = run.author) === null || _o === void 0 ? void 0 : _o.name),
|
49329
49339
|
localRun && localStudy && ((_q = (_p = localStudy.author) === null || _p === void 0 ? void 0 : _p.display_name) !== null && _q !== void 0 ? _q : run.author.display_name))),
|
49330
49340
|
React__default.createElement("div", { className: 'item6' },
|
@@ -49337,7 +49347,7 @@ var RunCard = function (_a) {
|
|
49337
49347
|
return;
|
49338
49348
|
window.location.href = recipeLinkFromSource(run.recipe.source);
|
49339
49349
|
}
|
49340
|
-
}, title: 'Go to recipe page',
|
49350
|
+
}, title: 'Go to recipe page', rel: 'noreferrer', onMouseOver: function (e) { return toggleHover('recipe', true); }, onMouseLeave: function (e) { return toggleHover('recipe', false); }, style: hover.recipe ? { color: '#40a9ff' } : {} }, run ? run.recipe.metadata.name : '--'),
|
49341
49351
|
run && React__default.createElement("span", { className: 'light-text' },
|
49342
49352
|
" ",
|
49343
49353
|
run.recipe.metadata.tag)),
|
@@ -50864,5 +50874,5 @@ var RunTable = function (_a) {
|
|
50864
50874
|
React__default.createElement(ChevronRight$1, null)))))));
|
50865
50875
|
};
|
50866
50876
|
|
50867
|
-
export { APIClient, AuthUser, Avatar, Button, ComboBox, ComboFileSelector, ConditionalWrapper, ConfigureLocalRun, CreateStudy, Dropdown, FileInput, FilePreview, FormInput, GetGeometry, GetModel, InputDescription, Label, Logo, NumberInput, RadioList, RecipeForm, RunCard, RunDetails, RunRow, RunTable, SelectAccount, SelectCloudArtifacts, SelectLocalArtifacts, SelectProject, SelectRecipe, SelectRun, SelectStudy, SendGeometry, SendModel, SendResults, SettingsButton, StudyCard, TextInput, Tooltip, _defaultConfig, checkDotNet, checkPollinationPanel, checkRuby, formatBytes, getHost, recipeLinkFromSource, sendMessageDotNet, sendMessageRuby, useAPIClient, useArtifacts, useCreateStudy, useGetGeometry, useGetHbjson, useHbjsontoVTK, useJobs, useManageSettings, usePollinationPanel, useRunCommand, useRuns, useSendHbjson, useSendMessage, useWindowDimensions };
|
50877
|
+
export { APIClient, AuthUser, Avatar, Button, ComboBox, ComboFileSelector, ConditionalWrapper, ConfigureLocalRun, CreateStudy, Dropdown, FileInput, FilePreview, FormInput, GetGeometry, GetModel, InputDescription, Label, Logo, NumberInput, RadioList, RecipeForm, RunCard, RunDetails, RunRow, RunTable, SelectAccount, SelectCloudArtifacts, SelectLocalArtifacts, SelectProject, SelectRecipe, SelectRun, SelectStudy, SendGeometry, SendModel, SendResults, SettingsButton, StudyCard, TargetPlaform, TextInput, Tooltip, _defaultConfig, checkDotNet, checkPollinationPanel, checkRuby, formatBytes, getHost, recipeLinkFromSource, sendMessageDotNet, sendMessageRuby, useAPIClient, useArtifacts, useCreateStudy, useGetGeometry, useGetHbjson, useHbjsontoVTK, useJobs, useManageSettings, usePollinationPanel, useRunCommand, useRuns, useSendHbjson, useSendMessage, useWindowDimensions };
|
50868
50878
|
//# sourceMappingURL=index.esm.js.map
|