pollination-react-io 0.0.43-beta.4 → 0.0.44

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.
@@ -7,4 +7,5 @@ export interface SelectAccountProps {
7
7
  client?: APIClient;
8
8
  style?: CSSProperties;
9
9
  setSelAccount?: (account: Account) => void;
10
+ environment: Window;
10
11
  }
@@ -5,4 +5,5 @@ export interface SelectRecipeProps {
5
5
  authUser?: UserPrivate;
6
6
  client?: APIClient;
7
7
  setSelRecipe?: (recipe: RecipeInterface) => void;
8
+ environment: Window;
8
9
  }
@@ -33719,7 +33719,7 @@ var css_248z = ":root {\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(21
33719
33719
  styleInject(css_248z);
33720
33720
 
33721
33721
  var SelectAccount = function (_a) {
33722
- var authUser = _a.authUser, client = _a.client, setSelAccount = _a.setSelAccount;
33722
+ var authUser = _a.authUser, client = _a.client, setSelAccount = _a.setSelAccount, environment = _a.environment;
33723
33723
  var _b = useState(), accounts = _b[0], setAccounts = _b[1];
33724
33724
  var comboBoxRef = useRef();
33725
33725
  var _c = useState(false), loading = _c[0], setLoading = _c[1];
@@ -33751,7 +33751,7 @@ var SelectAccount = function (_a) {
33751
33751
  return;
33752
33752
  comboBoxRef.current.selectItem(authUser);
33753
33753
  }, [authUser]);
33754
- return (React__default.createElement(ComboBox, { ref: comboBoxRef,
33754
+ return (React__default.createElement(ComboBox, { ref: comboBoxRef, environment: environment,
33755
33755
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
33756
33756
  // @ts-ignore
33757
33757
  items: (accounts === null || accounts === void 0 ? void 0 : accounts.resources) ? __spreadArray$2([authUser], accounts.resources, true) : [], renderItem: function (item) {
@@ -33811,19 +33811,19 @@ var SelectProject = function (_a) {
33811
33811
  return;
33812
33812
  fetchProjects([authUser.username]);
33813
33813
  }, [authUser, fetchProjects]);
33814
- return (React__default.createElement(ComboBox, { ref: comboBoxRef, items: (_b = projects === null || projects === void 0 ? void 0 : projects.resources) !== null && _b !== void 0 ? _b : [], setSelected: setSelProject, inputProps: {
33814
+ return (React__default.createElement(ComboBox, { ref: comboBoxRef, environment: environment, items: (_b = projects === null || projects === void 0 ? void 0 : projects.resources) !== null && _b !== void 0 ? _b : [], setSelected: setSelProject, inputProps: {
33815
33815
  placeholder: 'Select a project...',
33816
33816
  }, loading: !client || loading, disabled: !client || !(queryConfig === null || queryConfig === void 0 ? void 0 : queryConfig.owner), footer: (React__default.createElement("div", { key: "footer", style: {
33817
33817
  width: '100%',
33818
33818
  display: 'flex',
33819
33819
  justifyContent: 'center',
33820
33820
  color: 'var(--grey4)',
33821
- } }, "".concat(projects === null || projects === void 0 ? void 0 : projects.total_count, " projects"))), environment: environment }));
33821
+ } }, "".concat(projects === null || projects === void 0 ? void 0 : projects.total_count, " projects"))) }));
33822
33822
  };
33823
33823
 
33824
33824
  var SelectRecipe = function (_a) {
33825
33825
  var _b;
33826
- var projectName = _a.projectName, authUser = _a.authUser, client = _a.client, setSelRecipe = _a.setSelRecipe;
33826
+ var projectName = _a.projectName, authUser = _a.authUser, client = _a.client, setSelRecipe = _a.setSelRecipe, environment = _a.environment;
33827
33827
  var _c = useState(), recipes = _c[0], setRecipes = _c[1];
33828
33828
  var comboBoxRef = useRef();
33829
33829
  var _d = useState(false), loading = _d[0], setLoading = _d[1];
@@ -33858,7 +33858,7 @@ var SelectRecipe = function (_a) {
33858
33858
  return;
33859
33859
  fetchRecipes(projectName, authUser.username);
33860
33860
  }, [authUser, fetchRecipes, projectName]);
33861
- return (React__default.createElement(ComboBox, { ref: comboBoxRef, items: (_b = recipes === null || recipes === void 0 ? void 0 : recipes.resources.map(function (r, i) { return (__assign$3(__assign$3({}, r), { name: r.metadata.name, id: "".concat(r.metadata.name, "-").concat(r.metadata.tag) })); })) !== null && _b !== void 0 ? _b : [], renderItem: function (item) { return (React__default.createElement("div", { style: {
33861
+ return (React__default.createElement(ComboBox, { ref: comboBoxRef, environment: environment, items: (_b = recipes === null || recipes === void 0 ? void 0 : recipes.resources.map(function (r, i) { return (__assign$3(__assign$3({}, r), { name: r.metadata.name, id: "".concat(r.metadata.name, "-").concat(r.metadata.tag) })); })) !== null && _b !== void 0 ? _b : [], renderItem: function (item) { return (React__default.createElement("div", { style: {
33862
33862
  display: 'flex',
33863
33863
  gap: 16,
33864
33864
  }, id: "".concat(item.metadata.name, "-").concat(item.metadata.tag) },