@acvl/frontend-components 0.0.77 → 0.0.78

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/dist/index.d.ts CHANGED
@@ -3141,11 +3141,29 @@ interface DetachedPage {
3141
3141
  title: string;
3142
3142
  path: string;
3143
3143
  breadcrumbs: Breadcrumb[];
3144
+ /**
3145
+ * El título en singular, para cuando la heurística no dé con él.
3146
+ * @see MainLayoutPageHeaderProps.singularTitles
3147
+ */
3148
+ singularTitle?: string;
3144
3149
  }
3145
3150
  interface MainLayoutPageHeaderProps extends PageHeaderProps {
3146
3151
  fullScreen?: boolean;
3147
3152
  detachedPages?: DetachedPage[];
3148
3153
  documentTitleSuffix?: string;
3154
+ /**
3155
+ * Títulos en singular declarados a mano, indexados por la ruta de la página
3156
+ * (`{ "/cobranza/ordenes-de-envio": "Orden de envío" }`).
3157
+ *
3158
+ * El singular se deduce del título de la navegación —"Embarques" nombra a sus
3159
+ * registros "Embarque 1234" y a su formulario "Crear embarque"—, y deducirlo es una
3160
+ * heurística: acierta en los plurales regulares y se queda corta en los que la
3161
+ * morfología española no deja resolver ("Meses" y "Bases" se escriben igual y se
3162
+ * singularizan distinto), en los títulos con dos núcleos ("Órdenes de envíos") y en
3163
+ * los que no son un plural en absoluto. Aquí se declara el que haga falta.
3164
+ * @see singularizarTitulo
3165
+ */
3166
+ singularTitles?: Record<string, string>;
3149
3167
  /**
3150
3168
  * El padding horizontal del panel de contenido, que el `MainLayout` le pasa tal cual.
3151
3169
  *
@@ -3233,6 +3251,16 @@ interface MainLayoutProps {
3233
3251
  detachedPages?: DetachedPage[];
3234
3252
  /** Sufijo del `document.title` (ej. "Embarques" => "Título | Embarques"). */
3235
3253
  documentTitleSuffix?: string;
3254
+ /**
3255
+ * Títulos en singular declarados a mano, indexados por la ruta de la página
3256
+ * (`{ "/cobranza/ordenes-de-envio": "Orden de envío" }`).
3257
+ *
3258
+ * El `PageHeader` nombra los registros con el título de su página puesto en singular
3259
+ * ("Embarques" → "Embarque 1234", "Crear embarque"), y lo deduce con una heurística
3260
+ * de plurales españoles. Aquí se corrige la que no acierte.
3261
+ * @see MainLayoutPageHeaderProps.singularTitles
3262
+ */
3263
+ singularTitles?: Record<string, string>;
3236
3264
  /**
3237
3265
  * Configuración del pie del sidebar por defecto: versión, copyright, aviso de
3238
3266
  * privacidad y enlace a las novedades. Cada pieza se pinta sólo si se pasa.
@@ -3356,6 +3384,18 @@ interface MainLayoutProps {
3356
3384
  declare const SIDE_PANEL_WIDTH_VAR = "--acv-side-panel-width";
3357
3385
  declare const MainLayout: (props: MainLayoutProps) => react_jsx_runtime.JSX.Element;
3358
3386
 
3387
+ /**
3388
+ * Pasa a singular una palabra suelta. Devuelve la palabra tal cual cuando no reconoce un
3389
+ * plural, que es el modo seguro de fallar: un título sin tocar se lee bien igual.
3390
+ */
3391
+ declare function singularizarPalabra(palabra: string): string;
3392
+ /**
3393
+ * Pasa a singular un título completo, que es pasar a singular su núcleo: todas las
3394
+ * palabras hasta el primer conector —"Notas rojas" → "Nota roja"— y ninguna después
3395
+ * —"Órdenes de envío" → "Orden de envío"—.
3396
+ */
3397
+ declare function singularizarTitulo(titulo: string): string;
3398
+
3359
3399
  interface PageInfoProps {
3360
3400
  /**
3361
3401
  * La nota. Admite marcado —negritas, listas, enlaces—, así que puede ser lo mismo
@@ -3761,5 +3801,5 @@ interface UseColorModeResult {
3761
3801
  }
3762
3802
  declare function useColorMode(): UseColorModeResult;
3763
3803
 
3764
- export { APIContext, APIProvider, AccountMenuContent, ActiveCell, ActiveIcon, Base, ButtonWithDrawer, COLOR_SCHEME_SELECTOR, CSVUpload, ChipCell, ConfirmDialog, ContentLayout, ControlledAddressAutocomplete, ControlledAmountWithCurrency, ControlledAutocomplete, ControlledColor, ControlledDate$1 as ControlledDate, ControlledDate as ControlledDate_v2, ControlledDropdown, ControlledFileField$1 as ControlledFileField, ControlledFileField as ControlledFileField_v2, FileUploadBox as ControlledFileUploadBox, ControlledNumber, ControlledPhoneNumber, ControlledSelect$1 as ControlledSelect, ControlledSelect as ControlledSelect_v2, ControlledSlider as ControlledSimpleSlider, ControlledSlider$1 as ControlledSlider, ControlledSwitch, ControlledText, ControlledTimePicker, ControlledToggleButtons, CoverPage, CreateButtonBase, CreateButtonWithMenuOptions, CrudDropdown, CustomNoRows, DEFAULT_FORM_BREAKPOINTS, DEFAULT_PAGINATION, DeleteButton, DeleteConfirmationDialog, DetailFormDialog as DetailFormDialog_v2, DetailFormDrawer as DetailFormDrawer_v2, DetailForm as DetailForm_v2, DetailPage$1 as DetailPage, DetailPage as DetailPage_v2, DrawerGrid as DrawerGrid_v2, EditButton, ExportCSV$1 as ExportCSV, ExportCSV as ExportCSV_v2, ExtraButtons, FORM_CONTAINER_NAME, GlobalSearch, HEADER_CONTAINER, HEADER_NARROW, HistorialDrawer, KpiCard, LAYER_ORDER, ListPage, Loadable, LoadingComponent, Logo, MainDrawer, MainDrawer$1 as MainDrawer_v2, MainLayout, MenuItemWithLoading, ModuleCard, MoreOptions, MyGridEditSingleSelect, NavigationContext, NavigationProvider, NormalOrIcon, NotAllowed, NotFound, NotificationItem, NotificationsBell, ObjectProgressStack, PAGE_SIZE_OPTIONS, PageActionsHostContext, PageBadgeHostContext, PageInfo, PageInfoHostContext, Panel, PollingCountdownChip, PulseDot, RESPONSIVE_ACTION_MODES, ResponsiveActions, SIDE_PANEL_WIDTH_VAR, SaveCancelButton, ServerGrid as ServerGrid_v2, SidePanelHostContext, StatusBadge, StickyPageHeaderContext, StyledMenu, Tabs, Transitions, TrueFalse, UncontrolledText, changeTitle, closeProgressSnack, composeGridProps, deleteColumn$1 as deleteColumn, deleteColumn as deleteColumn_v2, editColumn, filterQuery, formContainerSx, formGridSx, formParser, headerContainerSx, _default as headerReducer, manualCacheRefresh, mergeSettings, openProgressSnack, query, renderChipCell, renderEditCellWithErrorTooltip, resolveChipOption, resolveInitialState, resolveStatusColor, setErrors, _default$1 as snackProgressReducer, statusColors, tags, theme, togglableFields, updateProgressSnackData, useAPI, useColorMode, useDetailForm, useHasPermission, useHasPermission_v2, useKeyboardShortcut, useMutationHandler, useNavigation, usePageActionsHost, usePageBadgeHost, usePageInfoHost, useServerGrid, useSidePanelHost, useStickyPageHeader, useStickyPageHeaderHost, valueLabel };
3804
+ export { APIContext, APIProvider, AccountMenuContent, ActiveCell, ActiveIcon, Base, ButtonWithDrawer, COLOR_SCHEME_SELECTOR, CSVUpload, ChipCell, ConfirmDialog, ContentLayout, ControlledAddressAutocomplete, ControlledAmountWithCurrency, ControlledAutocomplete, ControlledColor, ControlledDate$1 as ControlledDate, ControlledDate as ControlledDate_v2, ControlledDropdown, ControlledFileField$1 as ControlledFileField, ControlledFileField as ControlledFileField_v2, FileUploadBox as ControlledFileUploadBox, ControlledNumber, ControlledPhoneNumber, ControlledSelect$1 as ControlledSelect, ControlledSelect as ControlledSelect_v2, ControlledSlider as ControlledSimpleSlider, ControlledSlider$1 as ControlledSlider, ControlledSwitch, ControlledText, ControlledTimePicker, ControlledToggleButtons, CoverPage, CreateButtonBase, CreateButtonWithMenuOptions, CrudDropdown, CustomNoRows, DEFAULT_FORM_BREAKPOINTS, DEFAULT_PAGINATION, DeleteButton, DeleteConfirmationDialog, DetailFormDialog as DetailFormDialog_v2, DetailFormDrawer as DetailFormDrawer_v2, DetailForm as DetailForm_v2, DetailPage$1 as DetailPage, DetailPage as DetailPage_v2, DrawerGrid as DrawerGrid_v2, EditButton, ExportCSV$1 as ExportCSV, ExportCSV as ExportCSV_v2, ExtraButtons, FORM_CONTAINER_NAME, GlobalSearch, HEADER_CONTAINER, HEADER_NARROW, HistorialDrawer, KpiCard, LAYER_ORDER, ListPage, Loadable, LoadingComponent, Logo, MainDrawer, MainDrawer$1 as MainDrawer_v2, MainLayout, MenuItemWithLoading, ModuleCard, MoreOptions, MyGridEditSingleSelect, NavigationContext, NavigationProvider, NormalOrIcon, NotAllowed, NotFound, NotificationItem, NotificationsBell, ObjectProgressStack, PAGE_SIZE_OPTIONS, PageActionsHostContext, PageBadgeHostContext, PageInfo, PageInfoHostContext, Panel, PollingCountdownChip, PulseDot, RESPONSIVE_ACTION_MODES, ResponsiveActions, SIDE_PANEL_WIDTH_VAR, SaveCancelButton, ServerGrid as ServerGrid_v2, SidePanelHostContext, StatusBadge, StickyPageHeaderContext, StyledMenu, Tabs, Transitions, TrueFalse, UncontrolledText, changeTitle, closeProgressSnack, composeGridProps, deleteColumn$1 as deleteColumn, deleteColumn as deleteColumn_v2, editColumn, filterQuery, formContainerSx, formGridSx, formParser, headerContainerSx, _default as headerReducer, manualCacheRefresh, mergeSettings, openProgressSnack, query, renderChipCell, renderEditCellWithErrorTooltip, resolveChipOption, resolveInitialState, resolveStatusColor, setErrors, singularizarPalabra, singularizarTitulo, _default$1 as snackProgressReducer, statusColors, tags, theme, togglableFields, updateProgressSnackData, useAPI, useColorMode, useDetailForm, useHasPermission, useHasPermission_v2, useKeyboardShortcut, useMutationHandler, useNavigation, usePageActionsHost, usePageBadgeHost, usePageInfoHost, useServerGrid, useSidePanelHost, useStickyPageHeader, useStickyPageHeaderHost, valueLabel };
3765
3805
  export type { APIcontextProps, AccountMenuContentProps, AccountMenuItem, AddressValue, AppTheme, AutocompleteOption, ChipCellProps, ChipColor, ChipOption, ColorMode, ComoOpcionesProps, ConfirmDialogProps, ControlledAutocompleteProps, ControlledInput, CustomFilterDef, CustomToolbarProps, DeleteGridColumnsProps$1 as DeleteGridColumnsProps, DetachedPage, DetailExtraButton, DetailFormApi, DetailFormConfig, DetailFormController, DetailFormDialogProps, DetailFormDrawerNavigation, DetailFormDrawerProps, DetailFormProps, DetailFormStatus, DetailPageV2Props, DetailRenderProps, DrawerGridDrawerConfig, DrawerGridEditConfig, DrawerGridProps, EditGridColumnsProps, EditReadOnlyFields, ExportCSVProps as ExportCSVProps_v2, FieldFilter, FieldProps$1 as FieldProps, FieldValidationProps, FilterInput, FormBreakpoint, FormGridSxOptions, GlobalSearchOption, GlobalSearchProps, GridArgs, GridColDefPropsOverrides, GridLayerContribution, GridLayerId, GridLayerMap, JSONFormProps, JSONParserProps, KeyboardShortcut, KpiCardProps, MainDrawerV2Props, MainLayoutFooterConfig, MainLayoutPageHeaderProps, MainLayoutProps, MainLayoutSidebarFooterProps, MyDataGridProps, MyGridFilterModel, MyTab, MyTabProps, NotificationItemProps, NotificationsApi, NotificationsBellProps, PageActionsHost, PageBadgeHost, PageInfoHost, PageInfoProps, PageType, PanelProps, PollingCountdownChipProps, ProgressStatusProps, PulseDotProps, ResponsiveAction, ResponsiveActionsMode, ResponsiveActionsProps, RowsSnapshot, ServerGridArgs, ServerGridCreateApi, ServerGridDataApi, ServerGridDeleteApi, ServerGridEditApi, ServerGridEditToggleApi, ServerGridHandle, ServerGridProps, ServerGridSnapshot, ServerGridState, SidePanelHost, StatusColor, StickyPageHeaderHost, UseColorModeResult, UseServerGridOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acvl/frontend-components",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "description": "Component library for ACV frontend projects.",
5
5
  "homepage": "https://github.com/ACV-Logistics/acv-frontend-components#readme",
6
6
  "access": "public",