@bigbinary/neeto-fields-frontend 1.3.39 → 1.3.41

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/README.md CHANGED
@@ -173,12 +173,13 @@ default, but you can customize its behavior by passing optional props.
173
173
  URL will be shown in the `NoData` screen.
174
174
  12. `nameAliases`: This property accepts alias names as key-value pairs to be
175
175
  displayed for the names of resource types in header and menubar.
176
- 13. `headerTitle`: Specify the header title explicitly. Default is 'fields'. TIt
176
+ 13. `headerTitle`: Specify the header title explicitly. Default is 'fields'. It
177
177
  also specifies the title of `HelpPopover`.
178
178
  14. `resources`: For owner-based field categorization, provide an array of
179
179
  objects with `id` and `name` properties for each owner. For resource
180
180
  type-based categorization, use an array of objects with `label` and `value`
181
181
  properties representing each resource types.
182
+ 15. `headerSize`: To specify the header size explicitly. Default is 'small'.
182
183
 
183
184
  > If no resources are provided, for resource type-based categorization, the
184
185
  > menu bar will fetch all resource types. For owner-based categorization, it
package/dist/index.cjs.js CHANGED
@@ -2896,6 +2896,7 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
2896
2896
  };
2897
2897
  var isSingleResource = menuItems.length === 1;
2898
2898
  var isMenuBarNeeded = !isSingleResource && !isConfigsLoading;
2899
+ var isSearchBarNeeded = state === FIELD_STATES.active ? activeFieldsCount > 0 : inactiveFieldsCount > 0;
2899
2900
  var resourceName = React.useMemo(function () {
2900
2901
  return getResourceName({
2901
2902
  isOwnerBased: isOwnerBased,
@@ -2962,7 +2963,7 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
2962
2963
  handleAlertClose: handleAlertClose,
2963
2964
  handleClosePane: handleClosePane,
2964
2965
  handleReorderPaneClose: handleReorderPaneClose,
2965
- searchInputProps: searchInputProps,
2966
+ searchInputProps: isSearchBarNeeded ? searchInputProps : null,
2966
2967
  searchKeywordProps: searchKeywordProps,
2967
2968
  stateFilterTabs: stateFilterTabs,
2968
2969
  menuBarItems: menuBarItems,
@@ -3097,19 +3098,20 @@ var ActionBlock = function ActionBlock(_ref) {
3097
3098
  }));
3098
3099
  };
3099
3100
 
3100
- var _excluded = ["searchInputProps", "breadcrumbs", "title", "helpDocUrl", "helpDescription"];
3101
+ var _excluded = ["searchInputProps", "breadcrumbs", "title", "helpDocUrl", "helpDescription", "size"];
3101
3102
  var Header = reactUtils.withT(function (_ref) {
3102
3103
  var searchInputProps = _ref.searchInputProps,
3103
3104
  breadcrumbs = _ref.breadcrumbs,
3104
3105
  title = _ref.title,
3105
3106
  helpDocUrl = _ref.helpDocUrl,
3106
3107
  helpDescription = _ref.helpDescription,
3108
+ size = _ref.size,
3107
3109
  actionBlockProps = _objectWithoutProperties(_ref, _excluded);
3108
3110
  return /*#__PURE__*/React__default["default"].createElement(NeetoUIHeader__default["default"], {
3109
3111
  breadcrumbs: breadcrumbs,
3112
+ size: size,
3110
3113
  actionBlock: /*#__PURE__*/React__default["default"].createElement(ActionBlock, actionBlockProps),
3111
3114
  searchProps: searchInputProps,
3112
- size: "small",
3113
3115
  title: /*#__PURE__*/React__default["default"].createElement("span", null, title, (helpDocUrl || helpDescription) && /*#__PURE__*/React__default["default"].createElement(HelpPopover__default["default"], _extends({
3114
3116
  className: "ml-2 self-center"
3115
3117
  }, helpDocUrl && {
@@ -7555,7 +7557,9 @@ var FieldsDashboard = function FieldsDashboard(_ref) {
7555
7557
  _ref$nameAliases = _ref.nameAliases,
7556
7558
  nameAliases = _ref$nameAliases === void 0 ? {} : _ref$nameAliases,
7557
7559
  headerTitle = _ref.headerTitle,
7558
- resources = _ref.resources;
7560
+ resources = _ref.resources,
7561
+ _ref$headerSize = _ref.headerSize,
7562
+ headerSize = _ref$headerSize === void 0 ? "small" : _ref$headerSize;
7559
7563
  var _useTranslation = reactI18next.useTranslation(),
7560
7564
  t = _useTranslation.t;
7561
7565
  var title = neetoCist.capitalize(headerTitle || t("neetoFields.titles.field", constants.PLURAL));
@@ -7605,7 +7609,8 @@ var FieldsDashboard = function FieldsDashboard(_ref) {
7605
7609
  searchInputProps: searchInputProps,
7606
7610
  setIsPaneOpen: setIsPaneOpen,
7607
7611
  setIsReorderPaneOpen: setIsReorderPaneOpen,
7608
- title: headerDisplayTitle
7612
+ title: headerDisplayTitle,
7613
+ size: headerSize
7609
7614
  };
7610
7615
  var showSubheader = showCountSubheader || neetoCist.isPresent(searchKeywordProps.value);
7611
7616
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isMenuBarNeeded && /*#__PURE__*/React__default["default"].createElement(Menubar, {