@strapi/content-type-builder 5.0.0-rc.4 → 5.0.0-rc.6

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.
@@ -4,13 +4,13 @@ import { createContext, useContext, useState, Fragment, useRef, useEffect, memo,
4
4
  import { useNotification, useTracking, useStrapiApp, ConfirmDialog, translatedErrors, useGuidedTour, useAppInfo, useAuth, useFetchClient, Page, Layouts } from "@strapi/admin/strapi-admin";
5
5
  import { useIntl } from "react-intl";
6
6
  import { NavLink, Link as Link$1, useNavigate, useLocation, useMatch, Navigate, Routes, Route } from "react-router-dom";
7
- import { Flex, Box, Typography, Link, useFilter, useCollator, SubNav, SubNavHeader, SubNavSections, SubNavSection, SubNavLinkSection, SubNavLink, TextButton, Field, MultiSelectNested, KeyboardNavigable, Grid, LinkButton, Modal, Tabs, Divider, SingleSelect, SingleSelectOption, inputFocusStyle, Checkbox, TextInput, NumberInput, Dialog, Button, Breadcrumbs, Crumb, Searchbar, IconButton, Tooltip, VisuallyHidden, TimePicker, Textarea, DatePicker, DateTimePicker, Toggle, JSONInput, Menu, Combobox, ComboboxOption } from "@strapi/design-system";
7
+ import { Flex, Box, Typography, Link, useFilter, useCollator, SubNavLink, SubNav, SubNavHeader, SubNavSections, SubNavSection, SubNavLinkSection, TextButton, Field, MultiSelectNested, KeyboardNavigable, Grid, LinkButton, Modal, Tabs, Divider, SingleSelect, SingleSelectOption, inputFocusStyle, Checkbox, TextInput, NumberInput, Dialog, Button, Breadcrumbs, Crumb, Searchbar, IconButton, Tooltip, VisuallyHidden, TimePicker, Textarea, DatePicker, DateTimePicker, Toggle, JSONInput, Menu, Combobox, ComboboxOption } from "@strapi/design-system";
8
8
  import * as Icons from "@strapi/icons";
9
9
  import { ArrowClockwise, Clock, Plus, Sparkle, ArrowLeft, Search, Trash, Eye, EyeStriked, OneWay, OneToOne, OneToMany, ManyToOne, ManyToMany, ManyWays } from "@strapi/icons";
10
10
  import { createPortal } from "react-dom";
11
11
  import { keyframes, styled } from "styled-components";
12
12
  import upperFirst from "lodash/upperFirst";
13
- import { p as pluginId, n as nameToSlug, O as ON_CHANGE_RELATION_TARGET, a as ON_CHANGE_RELATION_TYPE, g as getRelationType, M as MAX_COMPONENT_DEPTH, c as createComponentUid, b as createUid, i as initialState, S as SET_DATA_TO_EDIT, d as SET_DYNAMIC_ZONE_DATA_SCHEMA, e as SET_CUSTOM_FIELD_DATA_SCHEMA, f as SET_ATTRIBUTE_DATA_SCHEMA, R as RESET_PROPS, h as SET_ERRORS, j as ON_CHANGE, k as RESET_PROPS_AND_SET_THE_FORM_FOR_ADDING_A_COMPO_TO_A_DZ, l as RESET_PROPS_AND_SET_FORM_FOR_ADDING_AN_EXISTING_COMPO, m as RESET_PROPS_AND_SAVE_CURRENT_DATA, o as initialState$1, q as makeUnique, G as GET_DATA_SUCCEEDED, r as RELOAD_PLUGIN, s as retrieveComponentsFromSchema, t as SET_MODIFIED_DATA, A as ADD_CUSTOM_FIELD_ATTRIBUTE, E as EDIT_CUSTOM_FIELD_ATTRIBUTE, u as ADD_CREATED_COMPONENT_TO_DYNAMIC_ZONE, C as CHANGE_DYNAMIC_ZONE_COMPONENTS, D as DELETE_NOT_SAVED_TYPE, v as REMOVE_COMPONENT_FROM_DYNAMIC_ZONE, U as UPDATE_INITIAL_STATE, w as UPDATE_SCHEMA, x as EDIT_ATTRIBUTE, y as ADD_ATTRIBUTE, z as CREATE_SCHEMA, B as CREATE_COMPONENT_SCHEMA, F as REMOVE_FIELD_FROM_DISPLAYED_COMPONENT, H as REMOVE_FIELD, P as PERMISSIONS } from "./index-C3acMBQI.mjs";
13
+ import { p as pluginId, n as nameToSlug, O as ON_CHANGE_RELATION_TARGET, a as ON_CHANGE_RELATION_TYPE, g as getRelationType, M as MAX_COMPONENT_DEPTH, c as createComponentUid, b as createUid, i as initialState, S as SET_DATA_TO_EDIT, d as SET_DYNAMIC_ZONE_DATA_SCHEMA, e as SET_CUSTOM_FIELD_DATA_SCHEMA, f as SET_ATTRIBUTE_DATA_SCHEMA, R as RESET_PROPS, h as SET_ERRORS, j as ON_CHANGE, k as RESET_PROPS_AND_SET_THE_FORM_FOR_ADDING_A_COMPO_TO_A_DZ, l as RESET_PROPS_AND_SET_FORM_FOR_ADDING_AN_EXISTING_COMPO, m as RESET_PROPS_AND_SAVE_CURRENT_DATA, o as initialState$1, q as makeUnique, G as GET_DATA_SUCCEEDED, r as RELOAD_PLUGIN, s as retrieveComponentsFromSchema, t as SET_MODIFIED_DATA, A as ADD_CUSTOM_FIELD_ATTRIBUTE, E as EDIT_CUSTOM_FIELD_ATTRIBUTE, u as ADD_CREATED_COMPONENT_TO_DYNAMIC_ZONE, C as CHANGE_DYNAMIC_ZONE_COMPONENTS, D as DELETE_NOT_SAVED_TYPE, v as REMOVE_COMPONENT_FROM_DYNAMIC_ZONE, U as UPDATE_INITIAL_STATE, w as UPDATE_SCHEMA, x as EDIT_ATTRIBUTE, y as ADD_ATTRIBUTE, z as CREATE_SCHEMA, B as CREATE_COMPONENT_SCHEMA, F as REMOVE_FIELD_FROM_DISPLAYED_COMPONENT, H as REMOVE_FIELD, P as PERMISSIONS } from "./index-rrbnb3yU.mjs";
14
14
  import isEqual from "lodash/isEqual";
15
15
  import get from "lodash/get";
16
16
  import groupBy from "lodash/groupBy";
@@ -338,6 +338,17 @@ const useContentTypeBuilderMenu = () => {
338
338
  onSearchChange: setSearch
339
339
  };
340
340
  };
341
+ const SubNavLinkCustom = styled(SubNavLink)`
342
+ div {
343
+ width: inherit;
344
+ span:nth-child(2) {
345
+ white-space: nowrap;
346
+ overflow: hidden;
347
+ text-overflow: ellipsis;
348
+ width: inherit;
349
+ }
350
+ }
351
+ `;
341
352
  const ContentTypeBuilderNav = () => {
342
353
  const { menu, searchValue, onSearchChange } = useContentTypeBuilderMenu();
343
354
  const { formatMessage } = useIntl();
@@ -386,7 +397,17 @@ const ContentTypeBuilderNav = () => {
386
397
  subLink.name
387
398
  )) }, link.name);
388
399
  }
389
- return /* @__PURE__ */ jsx(SubNavLink, { tag: NavLink, to: link.to, active: link.active, children: upperFirst(formatMessage({ id: link.name, defaultMessage: link.title })) }, link.name);
400
+ return /* @__PURE__ */ jsx(
401
+ SubNavLinkCustom,
402
+ {
403
+ tag: NavLink,
404
+ to: link.to,
405
+ active: link.active,
406
+ width: "100%",
407
+ children: upperFirst(formatMessage({ id: link.name, defaultMessage: link.title }))
408
+ },
409
+ link.name
410
+ );
390
411
  })
391
412
  }
392
413
  ),
@@ -2252,6 +2273,12 @@ const RelationTargetPicker = ({
2252
2273
  ] });
2253
2274
  };
2254
2275
  const MenuTrigger = styled(Menu.Trigger)`
2276
+ max-width: 16.8rem;
2277
+ span {
2278
+ white-space: nowrap;
2279
+ overflow: hidden;
2280
+ text-overflow: ellipsis;
2281
+ }
2255
2282
  svg {
2256
2283
  width: 0.6rem;
2257
2284
  height: 0.4rem;
@@ -6682,11 +6709,11 @@ const FormModalNavigationProvider = ({ children }) => {
6682
6709
  }
6683
6710
  );
6684
6711
  };
6685
- const ListView$1 = lazy(() => import("./ListView-05K9pfmR.mjs"));
6712
+ const ListView$1 = lazy(() => import("./ListView-DUCQo3ex.mjs"));
6686
6713
  const RecursivePath = () => {
6687
6714
  return /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Page.Loading, {}), children: /* @__PURE__ */ jsx(Routes, { children: /* @__PURE__ */ jsx(Route, { path: `/:componentUid`, element: /* @__PURE__ */ jsx(ListView$1, {}) }) }) });
6688
6715
  };
6689
- const ListView = lazy(() => import("./ListView-05K9pfmR.mjs"));
6716
+ const ListView = lazy(() => import("./ListView-DUCQo3ex.mjs"));
6690
6717
  const App = () => {
6691
6718
  const { formatMessage } = useIntl();
6692
6719
  const title = formatMessage({
@@ -6720,4 +6747,4 @@ export {
6720
6747
  index as i,
6721
6748
  useDataManager as u
6722
6749
  };
6723
- //# sourceMappingURL=index-HzPkNuuR.mjs.map
6750
+ //# sourceMappingURL=index-a9CiYyoa.mjs.map