synapse-react-client 3.0.15 → 3.0.16

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.
Files changed (27) hide show
  1. package/dist/containers/FullTextSearch.d.ts +6 -2
  2. package/dist/containers/FullTextSearch.js +18 -13
  3. package/dist/containers/FullTextSearch.js.map +1 -1
  4. package/dist/containers/SearchV2.d.ts +1 -0
  5. package/dist/containers/SearchV2.js.map +1 -1
  6. package/dist/containers/download_list/DownloadListTable.js +3 -3
  7. package/dist/containers/download_list/DownloadListTable.js.map +1 -1
  8. package/dist/containers/query_wrapper_plot_nav/QueryWrapperPlotNav.js +1 -1
  9. package/dist/containers/query_wrapper_plot_nav/QueryWrapperPlotNav.js.map +1 -1
  10. package/dist/containers/table/StandaloneQueryWrapper.js +1 -1
  11. package/dist/containers/table/StandaloneQueryWrapper.js.map +1 -1
  12. package/dist/containers/widgets/query-filter/EnumFacetFilter.js +3 -3
  13. package/dist/containers/widgets/query-filter/EnumFacetFilter.js.map +1 -1
  14. package/dist/style/components/_query-wrapper-text-input.scss +7 -0
  15. package/dist/style/main.css +9 -0
  16. package/dist/umd/synapse-react-client.development.css +9 -0
  17. package/dist/umd/synapse-react-client.development.css.map +2 -2
  18. package/dist/umd/synapse-react-client.development.js +35 -20
  19. package/dist/umd/synapse-react-client.development.js.map +2 -2
  20. package/dist/umd/synapse-react-client.production.min.css +1 -1
  21. package/dist/umd/synapse-react-client.production.min.js +60 -60
  22. package/dist/utils/SynapseClient.d.ts +1 -1
  23. package/dist/utils/SynapseClient.js.map +1 -1
  24. package/dist/utils/hooks/useGetInfoFromIds.d.ts +2 -3
  25. package/dist/utils/hooks/useGetInfoFromIds.js +13 -13
  26. package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
  27. package/package.json +1 -1
@@ -53687,11 +53687,12 @@ var SRC = (() => {
53687
53687
  }
53688
53688
 
53689
53689
  // src/lib/utils/hooks/useGetInfoFromIds.ts
53690
- var UserProfileTemplate = {
53690
+ var UserGroupHeaderTemplate = {
53691
53691
  ownerId: "",
53692
53692
  firstName: "Unknown",
53693
53693
  lastName: "Unknown",
53694
- userName: "Unknown"
53694
+ userName: "Unknown",
53695
+ isIndividual: false
53695
53696
  };
53696
53697
  var entityHeaderTemplate = {
53697
53698
  name: "Unknown",
@@ -53714,14 +53715,14 @@ var SRC = (() => {
53714
53715
  }));
53715
53716
  return [...newData.results, ...notFoundPlaceholders];
53716
53717
  });
53717
- var getUserProfileItems = (lookupList) => __async(void 0, null, function* () {
53718
- const newData = yield getUserProfileWithProfilePicAttached(lookupList);
53719
- const notFound = lookupList.filter((item) => newData.list.map((item2) => item2.ownerId).indexOf(item) === -1);
53720
- const notFoundPlaceholders = notFound.map((item) => __spreadProps(__spreadValues({}, UserProfileTemplate), {
53718
+ var getUserGroupHeaderItems = (lookupList) => __async(void 0, null, function* () {
53719
+ const newData = (yield getGroupHeadersBatch(lookupList)).children;
53720
+ const notFound = lookupList.filter((item) => newData.map((item2) => item2.ownerId).indexOf(item) === -1);
53721
+ const notFoundPlaceholders = notFound.map((item) => __spreadProps(__spreadValues({}, UserGroupHeaderTemplate), {
53721
53722
  ownerId: item,
53722
53723
  name: `Unknown User (${item})`
53723
53724
  }));
53724
- return [...newData.list, ...notFoundPlaceholders];
53725
+ return [...newData, ...notFoundPlaceholders];
53725
53726
  });
53726
53727
  function useGetInfoFromIds(props) {
53727
53728
  const { ids, type } = props;
@@ -53759,7 +53760,7 @@ var SRC = (() => {
53759
53760
  const newReferencesChunks = chunk_default(newReferences, 45);
53760
53761
  const totalData = [];
53761
53762
  for (const newReferences2 of newReferencesChunks) {
53762
- const newData = type === "USER_PROFILE" ? yield getUserProfileItems(newReferences2) : yield getEntityHeaderItems(newReferences2, accessToken);
53763
+ const newData = type === "USER_PROFILE" ? yield getUserGroupHeaderItems(newReferences2) : yield getEntityHeaderItems(newReferences2, accessToken);
53763
53764
  totalData.push(...newData);
53764
53765
  }
53765
53766
  setData((oldData) => oldData.concat(...totalData));
@@ -58878,7 +58879,7 @@ var SRC = (() => {
58878
58879
  createdOn = requestedFile == null ? void 0 : requestedFile.createdOn;
58879
58880
  }
58880
58881
  createdOn = (0, import_moment2.default)(createdOn).format("L LT");
58881
- const userProfile = userProfiles.find((el2) => el2.ownerId === createdBy);
58882
+ const userGroupHeader = userProfiles.find((el2) => el2.ownerId === createdBy);
58882
58883
  return /* @__PURE__ */ import_react54.default.createElement("tr", {
58883
58884
  className: isCurrentlyBeingDeletedClass,
58884
58885
  key: fileHandleId
@@ -58893,11 +58894,10 @@ var SRC = (() => {
58893
58894
  entityId: synId,
58894
58895
  isInDownloadList: true,
58895
58896
  forceSamePage
58896
- })), /* @__PURE__ */ import_react54.default.createElement("td", null, userProfile && /* @__PURE__ */ import_react54.default.createElement(UserCard_default, {
58897
+ })), /* @__PURE__ */ import_react54.default.createElement("td", null, userGroupHeader && /* @__PURE__ */ import_react54.default.createElement(UserCard_default, {
58897
58898
  size: "SMALL USER CARD",
58898
- userProfile,
58899
- preSignedURL: userProfile.clientPreSignedURL
58900
- }), canDownload && !userProfile && /* @__PURE__ */ import_react54.default.createElement("span", {
58899
+ ownerId: userGroupHeader.ownerId
58900
+ }), canDownload && !userGroupHeader && /* @__PURE__ */ import_react54.default.createElement("span", {
58901
58901
  className: "spinner"
58902
58902
  })), /* @__PURE__ */ import_react54.default.createElement("td", null, createdOn), /* @__PURE__ */ import_react54.default.createElement("td", null, contentSize && calculateFriendlyFileSize(contentSize)), /* @__PURE__ */ import_react54.default.createElement("td", null, /* @__PURE__ */ import_react54.default.createElement("button", {
58903
58903
  className: TESTING_TRASH_BTN_CLASS,
@@ -91487,7 +91487,10 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
91487
91487
  library.add(faSearch);
91488
91488
  library.add(faTimes);
91489
91489
  var MIN_SEARCH_QUERY_LENGTH = 3;
91490
- function FullTextSearch() {
91490
+ var FullTextSearch = ({
91491
+ helpMessage = "This search bar is powered by MySQL Full Text Search.",
91492
+ helpUrl
91493
+ }) => {
91491
91494
  const { executeQueryRequest, getLastQueryRequest } = useQueryContext();
91492
91495
  const {
91493
91496
  topLevelControlsState: { showSearchBar, showFacetFilter }
@@ -91526,6 +91529,8 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
91526
91529
  }, /* @__PURE__ */ import_react223.default.createElement(Collapse_default, {
91527
91530
  in: showSearchBar,
91528
91531
  timeout: { enter: 300, exit: 300 }
91532
+ }, /* @__PURE__ */ import_react223.default.createElement("div", {
91533
+ className: "QueryWrapperSearchInput__helppopoverwrapper"
91529
91534
  }, /* @__PURE__ */ import_react223.default.createElement("form", {
91530
91535
  className: "QueryWrapperSearchInput__searchbar",
91531
91536
  onSubmit: search
@@ -91549,8 +91554,14 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
91549
91554
  }, /* @__PURE__ */ import_react223.default.createElement(FontAwesomeIcon, {
91550
91555
  className: "SRC-primary-text-color",
91551
91556
  icon: "times"
91557
+ }))), /* @__PURE__ */ import_react223.default.createElement("div", {
91558
+ className: "QueryWrapperSearchInput__helppopover"
91559
+ }, /* @__PURE__ */ import_react223.default.createElement(HelpPopover, {
91560
+ markdownText: helpMessage,
91561
+ helpUrl,
91562
+ placement: "left"
91552
91563
  })))));
91553
- }
91564
+ };
91554
91565
  var FullTextSearch_default = FullTextSearch;
91555
91566
 
91556
91567
  // src/lib/containers/ModalDownload.tsx
@@ -92708,7 +92719,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
92708
92719
  let timer;
92709
92720
  const allIsSelected = facetValues.filter((item) => item.isSelected).length === 0;
92710
92721
  const userIds = (columnModel == null ? void 0 : columnModel.columnType) === ColumnType.USERID || (columnModel == null ? void 0 : columnModel.columnType) === ColumnType.USERID_LIST ? facetValues.map((facet) => facet.value) : [];
92711
- const userProfiles = useGetInfoFromIds({
92722
+ const userGroupHeaders = useGetInfoFromIds({
92712
92723
  ids: userIds,
92713
92724
  type: "USER_PROFILE"
92714
92725
  });
@@ -92728,7 +92739,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
92728
92739
  setFilteredSet(facetValues);
92729
92740
  } else {
92730
92741
  const filtered = facetValues.filter((obj) => {
92731
- const label = valueToLabel(obj, userProfiles, entityHeaders);
92742
+ const label = valueToLabel(obj, userGroupHeaders, entityHeaders);
92732
92743
  return label.toLowerCase().indexOf(inputValue.trim().toLowerCase()) > -1 ? obj : null;
92733
92744
  });
92734
92745
  setFilteredSet(filtered);
@@ -92798,7 +92809,7 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
92798
92809
  key: `checkLabel${index3}`,
92799
92810
  id: valueToId(facet.value),
92800
92811
  index: index3,
92801
- label: valueToLabel(facet, userProfiles, entityHeaders),
92812
+ label: valueToLabel(facet, userGroupHeaders, entityHeaders),
92802
92813
  count: facet.count,
92803
92814
  isDropdown,
92804
92815
  initialIsSelected: facet.isSelected,
@@ -97830,7 +97841,9 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
97830
97841
  const showFacetFilter = (queryVisualizationContext == null ? void 0 : queryVisualizationContext.topLevelControlsState.showFacetFilter) || (queryVisualizationContext == null ? void 0 : queryVisualizationContext.topLevelControlsState.showFacetFilter) === void 0;
97831
97842
  return /* @__PURE__ */ React413.createElement(React413.Fragment, null, /* @__PURE__ */ React413.createElement("div", {
97832
97843
  className: `ErrorBannerWrapper ${showFacetFilter ? QUERY_FILTERS_EXPANDED_CSS2 : QUERY_FILTERS_COLLAPSED_CSS2}`
97833
- }, /* @__PURE__ */ React413.createElement(QueryWrapperErrorBanner, null)), isFullTextSearchEnabled ? /* @__PURE__ */ React413.createElement(FullTextSearch_default, null) : /* @__PURE__ */ React413.createElement(SearchV2_default, __spreadProps(__spreadValues({}, searchConfiguration), {
97844
+ }, /* @__PURE__ */ React413.createElement(QueryWrapperErrorBanner, null)), isFullTextSearchEnabled ? /* @__PURE__ */ React413.createElement(FullTextSearch_default, {
97845
+ helpUrl: searchConfiguration == null ? void 0 : searchConfiguration.fullTextSearchHelpURL
97846
+ }) : /* @__PURE__ */ React413.createElement(SearchV2_default, __spreadProps(__spreadValues({}, searchConfiguration), {
97834
97847
  queryContext,
97835
97848
  queryVisualizationContext
97836
97849
  })), /* @__PURE__ */ React413.createElement(SqlEditor_default, null), /* @__PURE__ */ React413.createElement(DownloadConfirmation, {
@@ -97936,7 +97949,9 @@ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_liter
97936
97949
  hideQueryCount,
97937
97950
  hideFacetFilterControl: true,
97938
97951
  hideVisualizationsControl: true
97939
- }), entity && isTableEntity(entity) && entity.isSearchEnabled ? /* @__PURE__ */ import_react264.default.createElement(FullTextSearch_default, null) : /* @__PURE__ */ import_react264.default.createElement(SearchV2_default, __spreadProps(__spreadValues({}, searchConfiguration), {
97952
+ }), entity && isTableEntity(entity) && entity.isSearchEnabled ? /* @__PURE__ */ import_react264.default.createElement(FullTextSearch_default, {
97953
+ helpUrl: searchConfiguration == null ? void 0 : searchConfiguration.fullTextSearchHelpURL
97954
+ }) : /* @__PURE__ */ import_react264.default.createElement(SearchV2_default, __spreadProps(__spreadValues({}, searchConfiguration), {
97940
97955
  queryContext,
97941
97956
  queryVisualizationContext
97942
97957
  })), /* @__PURE__ */ import_react264.default.createElement(SqlEditor_default, null), showTopLevelControls && /* @__PURE__ */ import_react264.default.createElement(TotalQueryResults_default, {