@portnet/ui 6.0.2 → 6.0.3
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/CHANGELOG.md +652 -0
- package/dist/esm/index.js +72 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/v2/__tests__/AppMain.test.js +130 -0
- package/dist/esm/v2/__tests__/AppMain.test.js.map +1 -0
- package/dist/esm/v2/__tests__/ChartFigure.test.js +180 -0
- package/dist/esm/v2/__tests__/ChartFigure.test.js.map +1 -0
- package/dist/esm/v2/__tests__/DataGridRowActionsPropagation.test.js +150 -0
- package/dist/esm/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
- package/dist/esm/v2/__tests__/DrawerTactileTargets.test.js +93 -0
- package/dist/esm/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FieldError.test.js +71 -38
- package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FieldNaming.test.js +160 -0
- package/dist/esm/v2/__tests__/FieldNaming.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FieldWidth.test.js +11 -11
- package/dist/esm/v2/__tests__/FieldWidth.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FileCard.test.js +18 -17
- package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikCheckbox.test.js +87 -179
- package/dist/esm/v2/__tests__/FormikCheckbox.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js +32 -44
- package/dist/esm/v2/__tests__/FormikDateTimePicker.test.js.map +1 -1
- package/dist/esm/v2/__tests__/FormikDisplayWidth.test.js +101 -0
- package/dist/esm/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FormikRadioGroup.test.js +118 -199
- package/dist/esm/v2/__tests__/FormikRadioGroup.test.js.map +1 -1
- package/dist/esm/v2/__tests__/MobileRowCard.test.js +44 -42
- package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -1
- package/dist/esm/v2/__tests__/PreviewDrawer.test.js +165 -0
- package/dist/esm/v2/__tests__/PreviewDrawer.test.js.map +1 -0
- package/dist/esm/v2/__tests__/ReferentielFieldContainer.test.js +156 -0
- package/dist/esm/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +37 -52
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
- package/dist/esm/v2/__tests__/apiError.test.js +50 -69
- package/dist/esm/v2/__tests__/apiError.test.js.map +1 -1
- package/dist/esm/v2/__tests__/banned-patterns.test.js +41 -122
- package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -1
- package/dist/esm/v2/__tests__/chart-palette.test.js +204 -0
- package/dist/esm/v2/__tests__/chart-palette.test.js.map +1 -0
- package/dist/esm/v2/__tests__/contrast-palette.test.js +42 -74
- package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -1
- package/dist/esm/v2/__tests__/cssVariables.test.js +44 -51
- package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -1
- package/dist/esm/v2/__tests__/fileValidation.test.js +134 -0
- package/dist/esm/v2/__tests__/fileValidation.test.js.map +1 -0
- package/dist/esm/v2/__tests__/filterCriteria.test.js +321 -0
- package/dist/esm/v2/__tests__/filterCriteria.test.js.map +1 -0
- package/dist/esm/v2/__tests__/fmtDate.test.js +68 -0
- package/dist/esm/v2/__tests__/fmtDate.test.js.map +1 -0
- package/dist/esm/v2/__tests__/gap-leakage-refonte.test.js +218 -0
- package/dist/esm/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
- package/dist/esm/v2/__tests__/labels-merge.test.js +17 -21
- package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -1
- package/dist/esm/v2/__tests__/locale-fallback.test.js +35 -40
- package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -1
- package/dist/esm/v2/__tests__/reviveSavedCriteria.test.js +143 -0
- package/dist/esm/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
- package/dist/esm/v2/__tests__/rowActions.test.js +182 -0
- package/dist/esm/v2/__tests__/rowActions.test.js.map +1 -0
- package/dist/esm/v2/__tests__/useFocusOnRouteChange.test.js +155 -0
- package/dist/esm/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
- package/dist/esm/v2/__tests__/useFocusTrap.test.js +266 -402
- package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -1
- package/dist/esm/v2/__tests__/usePrefersReducedMotion.test.js +120 -0
- package/dist/esm/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
- package/dist/esm/v2/components/Accordion.js +48 -70
- package/dist/esm/v2/components/Accordion.js.map +1 -1
- package/dist/esm/v2/components/ActionStrip.js +31 -43
- package/dist/esm/v2/components/ActionStrip.js.map +1 -1
- package/dist/esm/v2/components/Banner.js +25 -22
- package/dist/esm/v2/components/Banner.js.map +1 -1
- package/dist/esm/v2/components/Busy.js +14 -19
- package/dist/esm/v2/components/Busy.js.map +1 -1
- package/dist/esm/v2/components/Button.js +34 -45
- package/dist/esm/v2/components/Button.js.map +1 -1
- package/dist/esm/v2/components/CategoryTag.js +44 -27
- package/dist/esm/v2/components/CategoryTag.js.map +1 -1
- package/dist/esm/v2/components/Checkbox.js +32 -38
- package/dist/esm/v2/components/Checkbox.js.map +1 -1
- package/dist/esm/v2/components/Chip.js +23 -36
- package/dist/esm/v2/components/Chip.js.map +1 -1
- package/dist/esm/v2/components/Combobox.js +112 -136
- package/dist/esm/v2/components/Combobox.js.map +1 -1
- package/dist/esm/v2/components/CommandPalette.js +113 -198
- package/dist/esm/v2/components/CommandPalette.js.map +1 -1
- package/dist/esm/v2/components/ConfirmDialog.js +36 -45
- package/dist/esm/v2/components/ConfirmDialog.js.map +1 -1
- package/dist/esm/v2/components/DatePicker.js +78 -81
- package/dist/esm/v2/components/DatePicker.js.map +1 -1
- package/dist/esm/v2/components/DateRangePicker.js +63 -74
- package/dist/esm/v2/components/DateRangePicker.js.map +1 -1
- package/dist/esm/v2/components/DateTimePicker.js +81 -86
- package/dist/esm/v2/components/DateTimePicker.js.map +1 -1
- package/dist/esm/v2/components/Drawer.js +71 -65
- package/dist/esm/v2/components/Drawer.js.map +1 -1
- package/dist/esm/v2/components/Dropzone.js +130 -177
- package/dist/esm/v2/components/Dropzone.js.map +1 -1
- package/dist/esm/v2/components/EmptyState.js +9 -9
- package/dist/esm/v2/components/EmptyState.js.map +1 -1
- package/dist/esm/v2/components/FavoriteToggle.js +24 -33
- package/dist/esm/v2/components/FavoriteToggle.js.map +1 -1
- package/dist/esm/v2/components/Field.js +155 -59
- package/dist/esm/v2/components/Field.js.map +1 -1
- package/dist/esm/v2/components/FieldError.js +9 -13
- package/dist/esm/v2/components/FieldError.js.map +1 -1
- package/dist/esm/v2/components/FieldHelp.js +28 -49
- package/dist/esm/v2/components/FieldHelp.js.map +1 -1
- package/dist/esm/v2/components/FileCard.js +14 -19
- package/dist/esm/v2/components/FileCard.js.map +1 -1
- package/dist/esm/v2/components/FilterTab.js +22 -31
- package/dist/esm/v2/components/FilterTab.js.map +1 -1
- package/dist/esm/v2/components/ForbiddenPage.js +28 -8
- package/dist/esm/v2/components/ForbiddenPage.js.map +1 -1
- package/dist/esm/v2/components/FormGrid.js +48 -54
- package/dist/esm/v2/components/FormGrid.js.map +1 -1
- package/dist/esm/v2/components/FormikDisplay.js +98 -24
- package/dist/esm/v2/components/FormikDisplay.js.map +1 -1
- package/dist/esm/v2/components/Input.js +75 -34
- package/dist/esm/v2/components/Input.js.map +1 -1
- package/dist/esm/v2/components/KPICard.js +42 -51
- package/dist/esm/v2/components/KPICard.js.map +1 -1
- package/dist/esm/v2/components/KPIStrip.js +9 -15
- package/dist/esm/v2/components/KPIStrip.js.map +1 -1
- package/dist/esm/v2/components/KV.js +16 -23
- package/dist/esm/v2/components/KV.js.map +1 -1
- package/dist/esm/v2/components/KVGrid.js +15 -23
- package/dist/esm/v2/components/KVGrid.js.map +1 -1
- package/dist/esm/v2/components/Layout.js +81 -117
- package/dist/esm/v2/components/Layout.js.map +1 -1
- package/dist/esm/v2/components/MobileRowCard.js +64 -75
- package/dist/esm/v2/components/MobileRowCard.js.map +1 -1
- package/dist/esm/v2/components/Modal.js +44 -53
- package/dist/esm/v2/components/Modal.js.map +1 -1
- package/dist/esm/v2/components/NetworkErrorPage.js +28 -11
- package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -1
- package/dist/esm/v2/components/NotFoundPage.js +28 -9
- package/dist/esm/v2/components/NotFoundPage.js.map +1 -1
- package/dist/esm/v2/components/NumberInput.js +77 -107
- package/dist/esm/v2/components/NumberInput.js.map +1 -1
- package/dist/esm/v2/components/OverflowMenu.js +24 -42
- package/dist/esm/v2/components/OverflowMenu.js.map +1 -1
- package/dist/esm/v2/components/PdfViewer.js +24 -33
- package/dist/esm/v2/components/PdfViewer.js.map +1 -1
- package/dist/esm/v2/components/ProgressBar.js +28 -36
- package/dist/esm/v2/components/ProgressBar.js.map +1 -1
- package/dist/esm/v2/components/Radio.js +49 -57
- package/dist/esm/v2/components/Radio.js.map +1 -1
- package/dist/esm/v2/components/SectionErrorBoundary.js +84 -130
- package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -1
- package/dist/esm/v2/components/SectionHeader.js +24 -31
- package/dist/esm/v2/components/SectionHeader.js.map +1 -1
- package/dist/esm/v2/components/Segmented.js +59 -84
- package/dist/esm/v2/components/Segmented.js.map +1 -1
- package/dist/esm/v2/components/Select.js +100 -138
- package/dist/esm/v2/components/Select.js.map +1 -1
- package/dist/esm/v2/components/ServerErrorPage.js +27 -10
- package/dist/esm/v2/components/ServerErrorPage.js.map +1 -1
- package/dist/esm/v2/components/Skeleton.js +81 -96
- package/dist/esm/v2/components/Skeleton.js.map +1 -1
- package/dist/esm/v2/components/SkipLink.js +6 -7
- package/dist/esm/v2/components/SkipLink.js.map +1 -1
- package/dist/esm/v2/components/Spinner.js +13 -22
- package/dist/esm/v2/components/Spinner.js.map +1 -1
- package/dist/esm/v2/components/Status.js +14 -25
- package/dist/esm/v2/components/Status.js.map +1 -1
- package/dist/esm/v2/components/Stepper.js +68 -71
- package/dist/esm/v2/components/Stepper.js.map +1 -1
- package/dist/esm/v2/components/Surface.js +25 -44
- package/dist/esm/v2/components/Surface.js.map +1 -1
- package/dist/esm/v2/components/Switch.js +21 -29
- package/dist/esm/v2/components/Switch.js.map +1 -1
- package/dist/esm/v2/components/TabPanel.js +84 -0
- package/dist/esm/v2/components/TabPanel.js.map +1 -0
- package/dist/esm/v2/components/Tabs.js +43 -19
- package/dist/esm/v2/components/Tabs.js.map +1 -1
- package/dist/esm/v2/components/TelInput.js +75 -108
- package/dist/esm/v2/components/TelInput.js.map +1 -1
- package/dist/esm/v2/components/Textarea.js +21 -30
- package/dist/esm/v2/components/Textarea.js.map +1 -1
- package/dist/esm/v2/components/TimePicker.js +59 -69
- package/dist/esm/v2/components/TimePicker.js.map +1 -1
- package/dist/esm/v2/components/Toast.js +109 -163
- package/dist/esm/v2/components/Toast.js.map +1 -1
- package/dist/esm/v2/components/Tooltip.js +18 -31
- package/dist/esm/v2/components/Tooltip.js.map +1 -1
- package/dist/esm/v2/components/_ErrorPageBody.js +6 -5
- package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -1
- package/dist/esm/v2/components/_pickerShared.js +2 -2
- package/dist/esm/v2/components/_pickerShared.js.map +1 -1
- package/dist/esm/v2/components/index.js +37 -0
- package/dist/esm/v2/components/index.js.map +1 -1
- package/dist/esm/v2/hooks/index.js +62 -0
- package/dist/esm/v2/hooks/index.js.map +1 -1
- package/dist/esm/v2/hooks/useAppliedFilters.js +112 -0
- package/dist/esm/v2/hooks/useAppliedFilters.js.map +1 -0
- package/dist/esm/v2/hooks/useDebouncedCallback.js +82 -0
- package/dist/esm/v2/hooks/useDebouncedCallback.js.map +1 -0
- package/dist/esm/v2/hooks/useDelayedFlag.js +5 -19
- package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -1
- package/dist/esm/v2/hooks/useDensity.js +13 -17
- package/dist/esm/v2/hooks/useDensity.js.map +1 -1
- package/dist/esm/v2/hooks/useFocusFirstError.js +25 -33
- package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -1
- package/dist/esm/v2/hooks/useFocusOnRouteChange.js +81 -0
- package/dist/esm/v2/hooks/useFocusOnRouteChange.js.map +1 -0
- package/dist/esm/v2/hooks/useFocusTrap.js +19 -23
- package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -1
- package/dist/esm/v2/hooks/useFormAutoSave.js +38 -53
- package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -1
- package/dist/esm/v2/hooks/useFormCompletionProgress.js +32 -51
- package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -1
- package/dist/esm/v2/hooks/useKeyboardShortcuts.js +125 -0
- package/dist/esm/v2/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/esm/v2/hooks/usePrefersReducedMotion.js +99 -0
- package/dist/esm/v2/hooks/usePrefersReducedMotion.js.map +1 -0
- package/dist/esm/v2/hooks/useResolvedDensity.js +2 -10
- package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -1
- package/dist/esm/v2/hooks/useSortedRows.js +3 -5
- package/dist/esm/v2/hooks/useSortedRows.js.map +1 -1
- package/dist/esm/v2/hooks/useTabLoading.js +6 -21
- package/dist/esm/v2/hooks/useTabLoading.js.map +1 -1
- package/dist/esm/v2/index.js +2 -3
- package/dist/esm/v2/index.js.map +1 -1
- package/dist/esm/v2/modalContext.js +2 -2
- package/dist/esm/v2/modalContext.js.map +1 -1
- package/dist/esm/v2/models/favorite.js.map +1 -1
- package/dist/esm/v2/models/personalization.js.map +1 -1
- package/dist/esm/v2/models/referentiel.js.map +1 -1
- package/dist/esm/v2/models/savedFilter.js.map +1 -1
- package/dist/esm/v2/patterns/ActionBar.js +115 -159
- package/dist/esm/v2/patterns/ActionBar.js.map +1 -1
- package/dist/esm/v2/patterns/AppMain.js +108 -0
- package/dist/esm/v2/patterns/AppMain.js.map +1 -0
- package/dist/esm/v2/patterns/BulkActionBar.js +31 -34
- package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -1
- package/dist/esm/v2/patterns/ChartFigure.js +151 -0
- package/dist/esm/v2/patterns/ChartFigure.js.map +1 -0
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js +111 -152
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -1
- package/dist/esm/v2/patterns/ColumnsToggle.js +43 -77
- package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -1
- package/dist/esm/v2/patterns/DataGrid.js +221 -255
- package/dist/esm/v2/patterns/DataGrid.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js +76 -94
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridToolbar.js +85 -89
- package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -1
- package/dist/esm/v2/patterns/DataGridVirtualized.js +141 -182
- package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -1
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +26 -30
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
- package/dist/esm/v2/patterns/DetailSplit.js +108 -0
- package/dist/esm/v2/patterns/DetailSplit.js.map +1 -0
- package/dist/esm/v2/patterns/FavoriteColumn.js +15 -17
- package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -1
- package/dist/esm/v2/patterns/FavoritesFilter.js +30 -39
- package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -1
- package/dist/esm/v2/patterns/FilterTabBar.js +112 -0
- package/dist/esm/v2/patterns/FilterTabBar.js.map +1 -0
- package/dist/esm/v2/patterns/FormErrorSummary.js +12 -13
- package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -1
- package/dist/esm/v2/patterns/FormPageShell.js +43 -41
- package/dist/esm/v2/patterns/FormPageShell.js.map +1 -1
- package/dist/esm/v2/patterns/FormSection.js +30 -38
- package/dist/esm/v2/patterns/FormSection.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCheckbox.js +29 -39
- package/dist/esm/v2/patterns/FormikCheckbox.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js +56 -60
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -1
- package/dist/esm/v2/patterns/FormikCombobox.js +51 -69
- package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/esm/v2/patterns/FormikDatePicker.js +44 -58
- package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/esm/v2/patterns/FormikDateTimePicker.js +44 -58
- package/dist/esm/v2/patterns/FormikDateTimePicker.js.map +1 -1
- package/dist/esm/v2/patterns/FormikErrorFocus.js +22 -23
- package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -1
- package/dist/esm/v2/patterns/FormikErrorSummary.js +89 -0
- package/dist/esm/v2/patterns/FormikErrorSummary.js.map +1 -0
- package/dist/esm/v2/patterns/FormikFile.js +94 -78
- package/dist/esm/v2/patterns/FormikFile.js.map +1 -1
- package/dist/esm/v2/patterns/FormikInput.js +40 -53
- package/dist/esm/v2/patterns/FormikInput.js.map +1 -1
- package/dist/esm/v2/patterns/FormikRadioGroup.js +39 -51
- package/dist/esm/v2/patterns/FormikRadioGroup.js.map +1 -1
- package/dist/esm/v2/patterns/FormikReferentielField.js +49 -59
- package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -1
- package/dist/esm/v2/patterns/FormikSelect.js +64 -87
- package/dist/esm/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/esm/v2/patterns/FormikTextarea.js +30 -46
- package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +53 -71
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
- package/dist/esm/v2/patterns/NetworkErrorBanner.js +6 -7
- package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -1
- package/dist/esm/v2/patterns/PageContent.js +10 -14
- package/dist/esm/v2/patterns/PageContent.js.map +1 -1
- package/dist/esm/v2/patterns/PreviewDrawer.js +153 -0
- package/dist/esm/v2/patterns/PreviewDrawer.js.map +1 -0
- package/dist/esm/v2/patterns/ReferentielField.js +327 -312
- package/dist/esm/v2/patterns/ReferentielField.js.map +1 -1
- package/dist/esm/v2/patterns/RowFavoriteToggle.js +27 -22
- package/dist/esm/v2/patterns/RowFavoriteToggle.js.map +1 -1
- package/dist/esm/v2/patterns/SaveFilterDialog.js +38 -66
- package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -1
- package/dist/esm/v2/patterns/SavedFiltersMenu.js +62 -81
- package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -1
- package/dist/esm/v2/patterns/SkeletonPageShell.js +106 -129
- package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -1
- package/dist/esm/v2/patterns/SortableHeader.js +22 -45
- package/dist/esm/v2/patterns/SortableHeader.js.map +1 -1
- package/dist/esm/v2/patterns/Tour.js +94 -120
- package/dist/esm/v2/patterns/Tour.js.map +1 -1
- package/dist/esm/v2/patterns/_dataGridShared.js +107 -128
- package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -1
- package/dist/esm/v2/patterns/_pickerSerialisation.js +6 -8
- package/dist/esm/v2/patterns/_pickerSerialisation.js.map +1 -1
- package/dist/esm/v2/patterns/_sort.js +17 -33
- package/dist/esm/v2/patterns/_sort.js.map +1 -1
- package/dist/esm/v2/patterns/_useColumnReorder.js +122 -160
- package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -1
- package/dist/esm/v2/patterns/_useColumnResize.js +78 -96
- package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -1
- package/dist/esm/v2/patterns/filterCriteria.js +102 -0
- package/dist/esm/v2/patterns/filterCriteria.js.map +1 -0
- package/dist/esm/v2/patterns/index.js +152 -0
- package/dist/esm/v2/patterns/index.js.map +1 -1
- package/dist/esm/v2/patterns/rowActions.js +223 -0
- package/dist/esm/v2/patterns/rowActions.js.map +1 -0
- package/dist/esm/v2/personalization/PersonalizationProvider.js +50 -47
- package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/_storageKey.js +5 -5
- package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +22 -23
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +13 -13
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/favorites.js +36 -60
- package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/favoritesView.js +22 -34
- package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/gridPreferences.js +28 -34
- package/dist/esm/v2/personalization/capabilities/gridPreferences.js.map +1 -1
- package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js +119 -0
- package/dist/esm/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/savedFilters.js +90 -98
- package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -1
- package/dist/esm/v2/personalization/createPersonalizationStore.js +78 -181
- package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -1
- package/dist/esm/v2/personalization/index.js +17 -0
- package/dist/esm/v2/personalization/index.js.map +1 -1
- package/dist/esm/v2/personalization/personalizationContext.js +9 -9
- package/dist/esm/v2/personalization/personalizationContext.js.map +1 -1
- package/dist/esm/v2/personalization/schema.js +8 -9
- package/dist/esm/v2/personalization/schema.js.map +1 -1
- package/dist/esm/v2/referentiel/ReferentielProvider.js +27 -42
- package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -1
- package/dist/esm/v2/referentiel/types.js +2 -0
- package/dist/esm/v2/referentiel/types.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielClient.js +10 -11
- package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -1
- package/dist/esm/v2/referentiel/useReferentielOptions.js +60 -117
- package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -1
- package/dist/esm/v2/referentiel/useReferentielSearch.js +37 -91
- package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -1
- package/dist/esm/v2/theme/_brand.js +8 -24
- package/dist/esm/v2/theme/_brand.js.map +1 -1
- package/dist/esm/v2/theme/_brandSecondary.js +8 -24
- package/dist/esm/v2/theme/_brandSecondary.js.map +1 -1
- package/dist/esm/v2/theme/createPortnetTheme.js +51 -61
- package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -1
- package/dist/esm/v2/theme/cssVariables.js +62 -69
- package/dist/esm/v2/theme/cssVariables.js.map +1 -1
- package/dist/esm/v2/theme/index.js +5 -5
- package/dist/esm/v2/theme/index.js.map +1 -1
- package/dist/esm/v2/tokens/breakpoints.js +14 -14
- package/dist/esm/v2/tokens/breakpoints.js.map +1 -1
- package/dist/esm/v2/tokens/chart.js +261 -0
- package/dist/esm/v2/tokens/chart.js.map +1 -0
- package/dist/esm/v2/tokens/colors.js +22 -22
- package/dist/esm/v2/tokens/colors.js.map +1 -1
- package/dist/esm/v2/tokens/density.js +62 -7
- package/dist/esm/v2/tokens/density.js.map +1 -1
- package/dist/esm/v2/tokens/index.js +49 -34
- package/dist/esm/v2/tokens/index.js.map +1 -1
- package/dist/esm/v2/tokens/motion.js +12 -20
- package/dist/esm/v2/tokens/motion.js.map +1 -1
- package/dist/esm/v2/tokens/radius.js +1 -1
- package/dist/esm/v2/tokens/radius.js.map +1 -1
- package/dist/esm/v2/tokens/shadows.js +6 -6
- package/dist/esm/v2/tokens/shadows.js.map +1 -1
- package/dist/esm/v2/tokens/spacing.js +2 -2
- package/dist/esm/v2/tokens/spacing.js.map +1 -1
- package/dist/esm/v2/tokens/state.js +1 -1
- package/dist/esm/v2/tokens/state.js.map +1 -1
- package/dist/esm/v2/tokens/statusPalette.js +17 -21
- package/dist/esm/v2/tokens/statusPalette.js.map +1 -1
- package/dist/esm/v2/tokens/tokens.json +6 -1
- package/dist/esm/v2/tokens/typography.js +13 -13
- package/dist/esm/v2/tokens/typography.js.map +1 -1
- package/dist/esm/v2/tokens/zIndex.js +1 -1
- package/dist/esm/v2/tokens/zIndex.js.map +1 -1
- package/dist/esm/v2/types/datagrid.js.map +1 -1
- package/dist/esm/v2/utils/apiError.js +16 -37
- package/dist/esm/v2/utils/apiError.js.map +1 -1
- package/dist/esm/v2/utils/contrast.js +31 -32
- package/dist/esm/v2/utils/contrast.js.map +1 -1
- package/dist/esm/v2/utils/cx.js +5 -25
- package/dist/esm/v2/utils/cx.js.map +1 -1
- package/dist/esm/v2/utils/fileDownload.js +23 -26
- package/dist/esm/v2/utils/fileDownload.js.map +1 -1
- package/dist/esm/v2/utils/fileValidation.js +209 -0
- package/dist/esm/v2/utils/fileValidation.js.map +1 -0
- package/dist/esm/v2/utils/fmtDate.js +111 -0
- package/dist/esm/v2/utils/fmtDate.js.map +1 -0
- package/dist/esm/v2/utils/fmtMoney.js +8 -10
- package/dist/esm/v2/utils/fmtMoney.js.map +1 -1
- package/dist/esm/v2/utils/formikErrors.js +78 -0
- package/dist/esm/v2/utils/formikErrors.js.map +1 -0
- package/dist/esm/v2/utils/index.js +35 -2
- package/dist/esm/v2/utils/index.js.map +1 -1
- package/dist/esm/v2/utils/mergeLabels.js +7 -12
- package/dist/esm/v2/utils/mergeLabels.js.map +1 -1
- package/dist/esm/v2/utils/networkStatus.js +12 -12
- package/dist/esm/v2/utils/networkStatus.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +110 -49
- package/dist/index.js.map +1 -1
- package/dist/v2/__tests__/AppMain.test.js +133 -0
- package/dist/v2/__tests__/AppMain.test.js.map +1 -0
- package/dist/v2/__tests__/ChartFigure.test.js +183 -0
- package/dist/v2/__tests__/ChartFigure.test.js.map +1 -0
- package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js +153 -0
- package/dist/v2/__tests__/DataGridRowActionsPropagation.test.js.map +1 -0
- package/dist/v2/__tests__/DrawerTactileTargets.test.js +94 -0
- package/dist/v2/__tests__/DrawerTactileTargets.test.js.map +1 -0
- package/dist/v2/__tests__/FieldError.test.js +82 -49
- package/dist/v2/__tests__/FieldError.test.js.map +1 -1
- package/dist/v2/__tests__/FieldNaming.test.js +161 -0
- package/dist/v2/__tests__/FieldNaming.test.js.map +1 -0
- package/dist/v2/__tests__/FieldWidth.test.js +23 -25
- package/dist/v2/__tests__/FieldWidth.test.js.map +1 -1
- package/dist/v2/__tests__/FileCard.test.js +29 -28
- package/dist/v2/__tests__/FileCard.test.js.map +1 -1
- package/dist/v2/__tests__/FormikCheckbox.test.js +90 -183
- package/dist/v2/__tests__/FormikCheckbox.test.js.map +1 -1
- package/dist/v2/__tests__/FormikDateTimePicker.test.js +38 -48
- package/dist/v2/__tests__/FormikDateTimePicker.test.js.map +1 -1
- package/dist/v2/__tests__/FormikDisplayWidth.test.js +102 -0
- package/dist/v2/__tests__/FormikDisplayWidth.test.js.map +1 -0
- package/dist/v2/__tests__/FormikRadioGroup.test.js +123 -204
- package/dist/v2/__tests__/FormikRadioGroup.test.js.map +1 -1
- package/dist/v2/__tests__/MobileRowCard.test.js +63 -61
- package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -1
- package/dist/v2/__tests__/PreviewDrawer.test.js +169 -0
- package/dist/v2/__tests__/PreviewDrawer.test.js.map +1 -0
- package/dist/v2/__tests__/ReferentielFieldContainer.test.js +159 -0
- package/dist/v2/__tests__/ReferentielFieldContainer.test.js.map +1 -0
- package/dist/v2/__tests__/SectionErrorBoundary.test.js +53 -68
- package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -1
- package/dist/v2/__tests__/apiError.test.js +50 -69
- package/dist/v2/__tests__/apiError.test.js.map +1 -1
- package/dist/v2/__tests__/banned-patterns.test.js +42 -123
- package/dist/v2/__tests__/banned-patterns.test.js.map +1 -1
- package/dist/v2/__tests__/chart-palette.test.js +205 -0
- package/dist/v2/__tests__/chart-palette.test.js.map +1 -0
- package/dist/v2/__tests__/contrast-palette.test.js +42 -74
- package/dist/v2/__tests__/contrast-palette.test.js.map +1 -1
- package/dist/v2/__tests__/cssVariables.test.js +44 -51
- package/dist/v2/__tests__/cssVariables.test.js.map +1 -1
- package/dist/v2/__tests__/fileValidation.test.js +136 -0
- package/dist/v2/__tests__/fileValidation.test.js.map +1 -0
- package/dist/v2/__tests__/filterCriteria.test.js +324 -0
- package/dist/v2/__tests__/filterCriteria.test.js.map +1 -0
- package/dist/v2/__tests__/fmtDate.test.js +69 -0
- package/dist/v2/__tests__/fmtDate.test.js.map +1 -0
- package/dist/v2/__tests__/gap-leakage-refonte.test.js +221 -0
- package/dist/v2/__tests__/gap-leakage-refonte.test.js.map +1 -0
- package/dist/v2/__tests__/labels-merge.test.js +23 -27
- package/dist/v2/__tests__/labels-merge.test.js.map +1 -1
- package/dist/v2/__tests__/locale-fallback.test.js +47 -52
- package/dist/v2/__tests__/locale-fallback.test.js.map +1 -1
- package/dist/v2/__tests__/reviveSavedCriteria.test.js +144 -0
- package/dist/v2/__tests__/reviveSavedCriteria.test.js.map +1 -0
- package/dist/v2/__tests__/rowActions.test.js +186 -0
- package/dist/v2/__tests__/rowActions.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusOnRouteChange.test.js +156 -0
- package/dist/v2/__tests__/useFocusOnRouteChange.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusTrap.test.js +270 -407
- package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -1
- package/dist/v2/__tests__/usePrefersReducedMotion.test.js +123 -0
- package/dist/v2/__tests__/usePrefersReducedMotion.test.js.map +1 -0
- package/dist/v2/components/Accordion.js +60 -82
- package/dist/v2/components/Accordion.js.map +1 -1
- package/dist/v2/components/ActionStrip.js +40 -52
- package/dist/v2/components/ActionStrip.js.map +1 -1
- package/dist/v2/components/Banner.js +42 -41
- package/dist/v2/components/Banner.js.map +1 -1
- package/dist/v2/components/Busy.js +22 -27
- package/dist/v2/components/Busy.js.map +1 -1
- package/dist/v2/components/Button.js +39 -50
- package/dist/v2/components/Button.js.map +1 -1
- package/dist/v2/components/CategoryTag.d.ts.map +1 -1
- package/dist/v2/components/CategoryTag.js +49 -32
- package/dist/v2/components/CategoryTag.js.map +1 -1
- package/dist/v2/components/Checkbox.js +39 -45
- package/dist/v2/components/Checkbox.js.map +1 -1
- package/dist/v2/components/Chip.js +29 -42
- package/dist/v2/components/Chip.js.map +1 -1
- package/dist/v2/components/Combobox.js +122 -144
- package/dist/v2/components/Combobox.js.map +1 -1
- package/dist/v2/components/CommandPalette.js +138 -225
- package/dist/v2/components/CommandPalette.js.map +1 -1
- package/dist/v2/components/ConfirmDialog.js +46 -56
- package/dist/v2/components/ConfirmDialog.js.map +1 -1
- package/dist/v2/components/DatePicker.js +81 -86
- package/dist/v2/components/DatePicker.js.map +1 -1
- package/dist/v2/components/DateRangePicker.js +77 -87
- package/dist/v2/components/DateRangePicker.js.map +1 -1
- package/dist/v2/components/DateTimePicker.js +84 -91
- package/dist/v2/components/DateTimePicker.js.map +1 -1
- package/dist/v2/components/Drawer.d.ts.map +1 -1
- package/dist/v2/components/Drawer.js +93 -88
- package/dist/v2/components/Drawer.js.map +1 -1
- package/dist/v2/components/Dropzone.js +150 -196
- package/dist/v2/components/Dropzone.js.map +1 -1
- package/dist/v2/components/EmptyState.js +18 -20
- package/dist/v2/components/EmptyState.js.map +1 -1
- package/dist/v2/components/FavoriteToggle.js +28 -39
- package/dist/v2/components/FavoriteToggle.js.map +1 -1
- package/dist/v2/components/Field.d.ts +62 -4
- package/dist/v2/components/Field.d.ts.map +1 -1
- package/dist/v2/components/Field.js +169 -70
- package/dist/v2/components/Field.js.map +1 -1
- package/dist/v2/components/FieldError.js +18 -21
- package/dist/v2/components/FieldError.js.map +1 -1
- package/dist/v2/components/FieldHelp.js +40 -60
- package/dist/v2/components/FieldHelp.js.map +1 -1
- package/dist/v2/components/FileCard.js +27 -31
- package/dist/v2/components/FileCard.js.map +1 -1
- package/dist/v2/components/FilterTab.js +30 -38
- package/dist/v2/components/FilterTab.js.map +1 -1
- package/dist/v2/components/ForbiddenPage.d.ts +25 -1
- package/dist/v2/components/ForbiddenPage.d.ts.map +1 -1
- package/dist/v2/components/ForbiddenPage.js +37 -17
- package/dist/v2/components/ForbiddenPage.js.map +1 -1
- package/dist/v2/components/FormGrid.js +53 -59
- package/dist/v2/components/FormGrid.js.map +1 -1
- package/dist/v2/components/FormikDisplay.d.ts +50 -1
- package/dist/v2/components/FormikDisplay.d.ts.map +1 -1
- package/dist/v2/components/FormikDisplay.js +108 -33
- package/dist/v2/components/FormikDisplay.js.map +1 -1
- package/dist/v2/components/Input.d.ts +40 -0
- package/dist/v2/components/Input.d.ts.map +1 -1
- package/dist/v2/components/Input.js +81 -41
- package/dist/v2/components/Input.js.map +1 -1
- package/dist/v2/components/KPICard.js +57 -67
- package/dist/v2/components/KPICard.js.map +1 -1
- package/dist/v2/components/KPIStrip.js +16 -22
- package/dist/v2/components/KPIStrip.js.map +1 -1
- package/dist/v2/components/KV.js +25 -31
- package/dist/v2/components/KV.js.map +1 -1
- package/dist/v2/components/KVGrid.js +19 -26
- package/dist/v2/components/KVGrid.js.map +1 -1
- package/dist/v2/components/Layout.js +91 -120
- package/dist/v2/components/Layout.js.map +1 -1
- package/dist/v2/components/MobileRowCard.js +79 -91
- package/dist/v2/components/MobileRowCard.js.map +1 -1
- package/dist/v2/components/Modal.js +61 -69
- package/dist/v2/components/Modal.js.map +1 -1
- package/dist/v2/components/NetworkErrorPage.d.ts +19 -1
- package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -1
- package/dist/v2/components/NetworkErrorPage.js +38 -21
- package/dist/v2/components/NetworkErrorPage.js.map +1 -1
- package/dist/v2/components/NotFoundPage.d.ts +17 -1
- package/dist/v2/components/NotFoundPage.d.ts.map +1 -1
- package/dist/v2/components/NotFoundPage.js +37 -18
- package/dist/v2/components/NotFoundPage.js.map +1 -1
- package/dist/v2/components/NumberInput.js +88 -118
- package/dist/v2/components/NumberInput.js.map +1 -1
- package/dist/v2/components/OverflowMenu.js +38 -56
- package/dist/v2/components/OverflowMenu.js.map +1 -1
- package/dist/v2/components/PdfViewer.js +34 -45
- package/dist/v2/components/PdfViewer.js.map +1 -1
- package/dist/v2/components/ProgressBar.js +42 -49
- package/dist/v2/components/ProgressBar.js.map +1 -1
- package/dist/v2/components/Radio.js +59 -67
- package/dist/v2/components/Radio.js.map +1 -1
- package/dist/v2/components/SectionErrorBoundary.js +90 -135
- package/dist/v2/components/SectionErrorBoundary.js.map +1 -1
- package/dist/v2/components/SectionHeader.js +34 -41
- package/dist/v2/components/SectionHeader.js.map +1 -1
- package/dist/v2/components/Segmented.js +69 -93
- package/dist/v2/components/Segmented.js.map +1 -1
- package/dist/v2/components/Select.d.ts +26 -2
- package/dist/v2/components/Select.d.ts.map +1 -1
- package/dist/v2/components/Select.js +120 -155
- package/dist/v2/components/Select.js.map +1 -1
- package/dist/v2/components/ServerErrorPage.d.ts +27 -1
- package/dist/v2/components/ServerErrorPage.d.ts.map +1 -1
- package/dist/v2/components/ServerErrorPage.js +37 -20
- package/dist/v2/components/ServerErrorPage.js.map +1 -1
- package/dist/v2/components/Skeleton.js +86 -100
- package/dist/v2/components/Skeleton.js.map +1 -1
- package/dist/v2/components/SkipLink.js +9 -12
- package/dist/v2/components/SkipLink.js.map +1 -1
- package/dist/v2/components/Spinner.js +16 -25
- package/dist/v2/components/Spinner.js.map +1 -1
- package/dist/v2/components/Status.js +18 -29
- package/dist/v2/components/Status.js.map +1 -1
- package/dist/v2/components/Stepper.js +80 -82
- package/dist/v2/components/Stepper.js.map +1 -1
- package/dist/v2/components/Surface.js +34 -49
- package/dist/v2/components/Surface.js.map +1 -1
- package/dist/v2/components/Switch.js +29 -37
- package/dist/v2/components/Switch.js.map +1 -1
- package/dist/v2/components/TabPanel.d.ts +17 -0
- package/dist/v2/components/TabPanel.d.ts.map +1 -0
- package/dist/v2/components/TabPanel.js +90 -0
- package/dist/v2/components/TabPanel.js.map +1 -0
- package/dist/v2/components/Tabs.d.ts +25 -0
- package/dist/v2/components/Tabs.d.ts.map +1 -1
- package/dist/v2/components/Tabs.js +53 -29
- package/dist/v2/components/Tabs.js.map +1 -1
- package/dist/v2/components/TelInput.js +80 -115
- package/dist/v2/components/TelInput.js.map +1 -1
- package/dist/v2/components/Textarea.js +26 -35
- package/dist/v2/components/Textarea.js.map +1 -1
- package/dist/v2/components/TimePicker.js +62 -74
- package/dist/v2/components/TimePicker.js.map +1 -1
- package/dist/v2/components/Toast.js +119 -174
- package/dist/v2/components/Toast.js.map +1 -1
- package/dist/v2/components/Tooltip.js +23 -38
- package/dist/v2/components/Tooltip.js.map +1 -1
- package/dist/v2/components/_ErrorPageBody.js +15 -16
- package/dist/v2/components/_ErrorPageBody.js.map +1 -1
- package/dist/v2/components/_pickerShared.js +5 -5
- package/dist/v2/components/_pickerShared.js.map +1 -1
- package/dist/v2/components/index.d.ts +40 -1
- package/dist/v2/components/index.d.ts.map +1 -1
- package/dist/v2/components/index.js +153 -136
- package/dist/v2/components/index.js.map +1 -1
- package/dist/v2/hooks/index.d.ts +65 -0
- package/dist/v2/hooks/index.d.ts.map +1 -1
- package/dist/v2/hooks/index.js +63 -24
- package/dist/v2/hooks/index.js.map +1 -1
- package/dist/v2/hooks/useAppliedFilters.d.ts +102 -0
- package/dist/v2/hooks/useAppliedFilters.d.ts.map +1 -0
- package/dist/v2/hooks/useAppliedFilters.js +117 -0
- package/dist/v2/hooks/useAppliedFilters.js.map +1 -0
- package/dist/v2/hooks/useDebouncedCallback.d.ts +64 -0
- package/dist/v2/hooks/useDebouncedCallback.d.ts.map +1 -0
- package/dist/v2/hooks/useDebouncedCallback.js +87 -0
- package/dist/v2/hooks/useDebouncedCallback.js.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.js +6 -20
- package/dist/v2/hooks/useDelayedFlag.js.map +1 -1
- package/dist/v2/hooks/useDensity.d.ts.map +1 -1
- package/dist/v2/hooks/useDensity.js +14 -18
- package/dist/v2/hooks/useDensity.js.map +1 -1
- package/dist/v2/hooks/useFocusFirstError.js +26 -34
- package/dist/v2/hooks/useFocusFirstError.js.map +1 -1
- package/dist/v2/hooks/useFocusOnRouteChange.d.ts +65 -0
- package/dist/v2/hooks/useFocusOnRouteChange.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusOnRouteChange.js +88 -0
- package/dist/v2/hooks/useFocusOnRouteChange.js.map +1 -0
- package/dist/v2/hooks/useFocusTrap.js +20 -24
- package/dist/v2/hooks/useFocusTrap.js.map +1 -1
- package/dist/v2/hooks/useFormAutoSave.d.ts +4 -4
- package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -1
- package/dist/v2/hooks/useFormAutoSave.js +39 -54
- package/dist/v2/hooks/useFormAutoSave.js.map +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.d.ts +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -1
- package/dist/v2/hooks/useFormCompletionProgress.js +33 -52
- package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -1
- package/dist/v2/hooks/useKeyboardShortcuts.d.ts +25 -0
- package/dist/v2/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/v2/hooks/useKeyboardShortcuts.js +132 -0
- package/dist/v2/hooks/useKeyboardShortcuts.js.map +1 -0
- package/dist/v2/hooks/usePrefersReducedMotion.d.ts +56 -0
- package/dist/v2/hooks/usePrefersReducedMotion.d.ts.map +1 -0
- package/dist/v2/hooks/usePrefersReducedMotion.js +105 -0
- package/dist/v2/hooks/usePrefersReducedMotion.js.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.js +5 -13
- package/dist/v2/hooks/useResolvedDensity.js.map +1 -1
- package/dist/v2/hooks/useSortedRows.js +4 -6
- package/dist/v2/hooks/useSortedRows.js.map +1 -1
- package/dist/v2/hooks/useTabLoading.js +7 -22
- package/dist/v2/hooks/useTabLoading.js.map +1 -1
- package/dist/v2/index.js +143 -145
- package/dist/v2/index.js.map +1 -1
- package/dist/v2/modalContext.js +2 -2
- package/dist/v2/modalContext.js.map +1 -1
- package/dist/v2/models/favorite.d.ts +8 -9
- package/dist/v2/models/favorite.d.ts.map +1 -1
- package/dist/v2/models/favorite.js.map +1 -1
- package/dist/v2/models/index.js +4 -4
- package/dist/v2/models/index.js.map +1 -1
- package/dist/v2/models/personalization.d.ts +44 -48
- package/dist/v2/models/personalization.d.ts.map +1 -1
- package/dist/v2/models/personalization.js.map +1 -1
- package/dist/v2/models/referentiel.d.ts +32 -50
- package/dist/v2/models/referentiel.d.ts.map +1 -1
- package/dist/v2/models/referentiel.js.map +1 -1
- package/dist/v2/models/savedFilter.d.ts +8 -17
- package/dist/v2/models/savedFilter.d.ts.map +1 -1
- package/dist/v2/models/savedFilter.js.map +1 -1
- package/dist/v2/patterns/ActionBar.js +152 -187
- package/dist/v2/patterns/ActionBar.js.map +1 -1
- package/dist/v2/patterns/AppMain.d.ts +109 -0
- package/dist/v2/patterns/AppMain.d.ts.map +1 -0
- package/dist/v2/patterns/AppMain.js +115 -0
- package/dist/v2/patterns/AppMain.js.map +1 -0
- package/dist/v2/patterns/BulkActionBar.js +40 -42
- package/dist/v2/patterns/BulkActionBar.js.map +1 -1
- package/dist/v2/patterns/ChartFigure.d.ts +124 -0
- package/dist/v2/patterns/ChartFigure.d.ts.map +1 -0
- package/dist/v2/patterns/ChartFigure.js +159 -0
- package/dist/v2/patterns/ChartFigure.js.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js +138 -174
- package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -1
- package/dist/v2/patterns/ColumnsToggle.js +60 -94
- package/dist/v2/patterns/ColumnsToggle.js.map +1 -1
- package/dist/v2/patterns/DataGrid.d.ts.map +1 -1
- package/dist/v2/patterns/DataGrid.js +262 -297
- package/dist/v2/patterns/DataGrid.js.map +1 -1
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts +12 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -1
- package/dist/v2/patterns/DataGridSettingsMenu.js +104 -121
- package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -1
- package/dist/v2/patterns/DataGridToolbar.js +103 -106
- package/dist/v2/patterns/DataGridToolbar.js.map +1 -1
- package/dist/v2/patterns/DataGridVirtualized.js +179 -217
- package/dist/v2/patterns/DataGridVirtualized.js.map +1 -1
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js +32 -35
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -1
- package/dist/v2/patterns/DetailSplit.d.ts +87 -0
- package/dist/v2/patterns/DetailSplit.d.ts.map +1 -0
- package/dist/v2/patterns/DetailSplit.js +116 -0
- package/dist/v2/patterns/DetailSplit.js.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.js +22 -23
- package/dist/v2/patterns/FavoriteColumn.js.map +1 -1
- package/dist/v2/patterns/FavoritesFilter.js +36 -44
- package/dist/v2/patterns/FavoritesFilter.js.map +1 -1
- package/dist/v2/patterns/FilterTabBar.d.ts +28 -0
- package/dist/v2/patterns/FilterTabBar.d.ts.map +1 -0
- package/dist/v2/patterns/FilterTabBar.js +120 -0
- package/dist/v2/patterns/FilterTabBar.js.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.js +20 -23
- package/dist/v2/patterns/FormErrorSummary.js.map +1 -1
- package/dist/v2/patterns/FormPageShell.js +53 -50
- package/dist/v2/patterns/FormPageShell.js.map +1 -1
- package/dist/v2/patterns/FormSection.d.ts +8 -3
- package/dist/v2/patterns/FormSection.d.ts.map +1 -1
- package/dist/v2/patterns/FormSection.js +44 -51
- package/dist/v2/patterns/FormSection.js.map +1 -1
- package/dist/v2/patterns/FormikCheckbox.js +36 -45
- package/dist/v2/patterns/FormikCheckbox.js.map +1 -1
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts +17 -1
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -1
- package/dist/v2/patterns/FormikCheckboxGroup.js +62 -65
- package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -1
- package/dist/v2/patterns/FormikCombobox.js +55 -72
- package/dist/v2/patterns/FormikCombobox.js.map +1 -1
- package/dist/v2/patterns/FormikDatePicker.js +50 -64
- package/dist/v2/patterns/FormikDatePicker.js.map +1 -1
- package/dist/v2/patterns/FormikDateTimePicker.js +50 -64
- package/dist/v2/patterns/FormikDateTimePicker.js.map +1 -1
- package/dist/v2/patterns/FormikErrorFocus.js +25 -26
- package/dist/v2/patterns/FormikErrorFocus.js.map +1 -1
- package/dist/v2/patterns/FormikErrorSummary.d.ts +74 -0
- package/dist/v2/patterns/FormikErrorSummary.d.ts.map +1 -0
- package/dist/v2/patterns/FormikErrorSummary.js +97 -0
- package/dist/v2/patterns/FormikErrorSummary.js.map +1 -0
- package/dist/v2/patterns/FormikFile.d.ts +14 -1
- package/dist/v2/patterns/FormikFile.d.ts.map +1 -1
- package/dist/v2/patterns/FormikFile.js +99 -83
- package/dist/v2/patterns/FormikFile.js.map +1 -1
- package/dist/v2/patterns/FormikInput.js +45 -58
- package/dist/v2/patterns/FormikInput.js.map +1 -1
- package/dist/v2/patterns/FormikRadioGroup.js +45 -56
- package/dist/v2/patterns/FormikRadioGroup.js.map +1 -1
- package/dist/v2/patterns/FormikReferentielField.d.ts +12 -1
- package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -1
- package/dist/v2/patterns/FormikReferentielField.js +54 -64
- package/dist/v2/patterns/FormikReferentielField.js.map +1 -1
- package/dist/v2/patterns/FormikSelect.js +70 -92
- package/dist/v2/patterns/FormikSelect.js.map +1 -1
- package/dist/v2/patterns/FormikTextarea.js +35 -51
- package/dist/v2/patterns/FormikTextarea.js.map +1 -1
- package/dist/v2/patterns/KeyboardShortcutsHelp.js +60 -80
- package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -1
- package/dist/v2/patterns/NetworkErrorBanner.js +13 -16
- package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -1
- package/dist/v2/patterns/PageContent.js +17 -20
- package/dist/v2/patterns/PageContent.js.map +1 -1
- package/dist/v2/patterns/PreviewDrawer.d.ts +49 -0
- package/dist/v2/patterns/PreviewDrawer.d.ts.map +1 -0
- package/dist/v2/patterns/PreviewDrawer.js +159 -0
- package/dist/v2/patterns/PreviewDrawer.js.map +1 -0
- package/dist/v2/patterns/ReferentielField.d.ts +86 -2
- package/dist/v2/patterns/ReferentielField.d.ts.map +1 -1
- package/dist/v2/patterns/ReferentielField.js +347 -327
- package/dist/v2/patterns/ReferentielField.js.map +1 -1
- package/dist/v2/patterns/RowFavoriteToggle.d.ts +6 -0
- package/dist/v2/patterns/RowFavoriteToggle.d.ts.map +1 -1
- package/dist/v2/patterns/RowFavoriteToggle.js +38 -30
- package/dist/v2/patterns/RowFavoriteToggle.js.map +1 -1
- package/dist/v2/patterns/SaveFilterDialog.js +50 -77
- package/dist/v2/patterns/SaveFilterDialog.js.map +1 -1
- package/dist/v2/patterns/SavedFiltersMenu.js +89 -107
- package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -1
- package/dist/v2/patterns/SkeletonPageShell.js +122 -143
- package/dist/v2/patterns/SkeletonPageShell.js.map +1 -1
- package/dist/v2/patterns/SortableHeader.js +35 -57
- package/dist/v2/patterns/SortableHeader.js.map +1 -1
- package/dist/v2/patterns/Tour.js +121 -142
- package/dist/v2/patterns/Tour.js.map +1 -1
- package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -1
- package/dist/v2/patterns/_dataGridShared.js +131 -147
- package/dist/v2/patterns/_dataGridShared.js.map +1 -1
- package/dist/v2/patterns/_pickerSerialisation.js +9 -10
- package/dist/v2/patterns/_pickerSerialisation.js.map +1 -1
- package/dist/v2/patterns/_sort.js +17 -33
- package/dist/v2/patterns/_sort.js.map +1 -1
- package/dist/v2/patterns/_useColumnReorder.js +124 -163
- package/dist/v2/patterns/_useColumnReorder.js.map +1 -1
- package/dist/v2/patterns/_useColumnResize.js +80 -99
- package/dist/v2/patterns/_useColumnResize.js.map +1 -1
- package/dist/v2/patterns/filterCriteria.d.ts +78 -0
- package/dist/v2/patterns/filterCriteria.d.ts.map +1 -0
- package/dist/v2/patterns/filterCriteria.js +110 -0
- package/dist/v2/patterns/filterCriteria.js.map +1 -0
- package/dist/v2/patterns/index.d.ts +160 -0
- package/dist/v2/patterns/index.d.ts.map +1 -1
- package/dist/v2/patterns/index.js +157 -79
- package/dist/v2/patterns/index.js.map +1 -1
- package/dist/v2/patterns/rowActions.d.ts +150 -0
- package/dist/v2/patterns/rowActions.d.ts.map +1 -0
- package/dist/v2/patterns/rowActions.js +232 -0
- package/dist/v2/patterns/rowActions.js.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -1
- package/dist/v2/personalization/PersonalizationProvider.js +57 -53
- package/dist/v2/personalization/PersonalizationProvider.js.map +1 -1
- package/dist/v2/personalization/adapters/_storageKey.js +5 -5
- package/dist/v2/personalization/adapters/_storageKey.js.map +1 -1
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +25 -24
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -1
- package/dist/v2/personalization/adapters/createMemoryAdapter.js +14 -14
- package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -1
- package/dist/v2/personalization/adapters/index.js +5 -5
- package/dist/v2/personalization/adapters/index.js.map +1 -1
- package/dist/v2/personalization/capabilities/favorites.js +39 -62
- package/dist/v2/personalization/capabilities/favorites.js.map +1 -1
- package/dist/v2/personalization/capabilities/favoritesView.js +25 -37
- package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -1
- package/dist/v2/personalization/capabilities/gridPreferences.js +31 -36
- package/dist/v2/personalization/capabilities/gridPreferences.js.map +1 -1
- package/dist/v2/personalization/capabilities/index.js +12 -12
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts +88 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.js +126 -0
- package/dist/v2/personalization/capabilities/reviveSavedCriteria.js.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.js +93 -100
- package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -1
- package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -1
- package/dist/v2/personalization/createPersonalizationStore.js +81 -182
- package/dist/v2/personalization/createPersonalizationStore.js.map +1 -1
- package/dist/v2/personalization/index.d.ts +16 -0
- package/dist/v2/personalization/index.d.ts.map +1 -1
- package/dist/v2/personalization/index.js +30 -23
- package/dist/v2/personalization/index.js.map +1 -1
- package/dist/v2/personalization/personalizationContext.js +10 -12
- package/dist/v2/personalization/personalizationContext.js.map +1 -1
- package/dist/v2/personalization/schema.js +8 -9
- package/dist/v2/personalization/schema.js.map +1 -1
- package/dist/v2/referentiel/ReferentielProvider.js +31 -45
- package/dist/v2/referentiel/ReferentielProvider.js.map +1 -1
- package/dist/v2/referentiel/index.js +11 -13
- package/dist/v2/referentiel/index.js.map +1 -1
- package/dist/v2/referentiel/types.d.ts +105 -0
- package/dist/v2/referentiel/types.d.ts.map +1 -0
- package/dist/v2/referentiel/types.js +6 -0
- package/dist/v2/referentiel/types.js.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.js +13 -16
- package/dist/v2/referentiel/useReferentielClient.js.map +1 -1
- package/dist/v2/referentiel/useReferentielOptions.d.ts +7 -17
- package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -1
- package/dist/v2/referentiel/useReferentielOptions.js +63 -120
- package/dist/v2/referentiel/useReferentielOptions.js.map +1 -1
- package/dist/v2/referentiel/useReferentielSearch.d.ts +7 -48
- package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -1
- package/dist/v2/referentiel/useReferentielSearch.js +40 -95
- package/dist/v2/referentiel/useReferentielSearch.js.map +1 -1
- package/dist/v2/theme/_brand.js +12 -26
- package/dist/v2/theme/_brand.js.map +1 -1
- package/dist/v2/theme/_brandSecondary.js +12 -26
- package/dist/v2/theme/_brandSecondary.js.map +1 -1
- package/dist/v2/theme/createPortnetTheme.js +41 -49
- package/dist/v2/theme/createPortnetTheme.js.map +1 -1
- package/dist/v2/theme/cssVariables.d.ts +3 -3
- package/dist/v2/theme/cssVariables.d.ts.map +1 -1
- package/dist/v2/theme/cssVariables.js +65 -70
- package/dist/v2/theme/cssVariables.js.map +1 -1
- package/dist/v2/theme/index.js +10 -10
- package/dist/v2/theme/index.js.map +1 -1
- package/dist/v2/tokens/breakpoints.js +16 -16
- package/dist/v2/tokens/breakpoints.js.map +1 -1
- package/dist/v2/tokens/chart.d.ts +103 -0
- package/dist/v2/tokens/chart.d.ts.map +1 -0
- package/dist/v2/tokens/chart.js +270 -0
- package/dist/v2/tokens/chart.js.map +1 -0
- package/dist/v2/tokens/colors.js +24 -24
- package/dist/v2/tokens/colors.js.map +1 -1
- package/dist/v2/tokens/density.d.ts +104 -0
- package/dist/v2/tokens/density.d.ts.map +1 -1
- package/dist/v2/tokens/density.js +67 -12
- package/dist/v2/tokens/density.js.map +1 -1
- package/dist/v2/tokens/index.d.ts +50 -1
- package/dist/v2/tokens/index.d.ts.map +1 -1
- package/dist/v2/tokens/index.js +116 -68
- package/dist/v2/tokens/index.js.map +1 -1
- package/dist/v2/tokens/motion.js +16 -22
- package/dist/v2/tokens/motion.js.map +1 -1
- package/dist/v2/tokens/radius.js +3 -3
- package/dist/v2/tokens/radius.js.map +1 -1
- package/dist/v2/tokens/shadows.js +8 -8
- package/dist/v2/tokens/shadows.js.map +1 -1
- package/dist/v2/tokens/spacing.js +4 -4
- package/dist/v2/tokens/spacing.js.map +1 -1
- package/dist/v2/tokens/state.js +3 -3
- package/dist/v2/tokens/state.js.map +1 -1
- package/dist/v2/tokens/statusPalette.js +21 -23
- package/dist/v2/tokens/statusPalette.js.map +1 -1
- package/dist/v2/tokens/tokens.json +6 -1
- package/dist/v2/tokens/typography.js +15 -15
- package/dist/v2/tokens/typography.js.map +1 -1
- package/dist/v2/tokens/zIndex.js +3 -3
- package/dist/v2/tokens/zIndex.js.map +1 -1
- package/dist/v2/types/datagrid.d.ts +9 -1
- package/dist/v2/types/datagrid.d.ts.map +1 -1
- package/dist/v2/types/datagrid.js.map +1 -1
- package/dist/v2/types/index.js +2 -2
- package/dist/v2/types/index.js.map +1 -1
- package/dist/v2/utils/apiError.js +16 -37
- package/dist/v2/utils/apiError.js.map +1 -1
- package/dist/v2/utils/contrast.js +31 -32
- package/dist/v2/utils/contrast.js.map +1 -1
- package/dist/v2/utils/cx.js +7 -27
- package/dist/v2/utils/cx.js.map +1 -1
- package/dist/v2/utils/fileDownload.js +25 -28
- package/dist/v2/utils/fileDownload.js.map +1 -1
- package/dist/v2/utils/fileValidation.d.ts +116 -0
- package/dist/v2/utils/fileValidation.d.ts.map +1 -0
- package/dist/v2/utils/fileValidation.js +220 -0
- package/dist/v2/utils/fileValidation.js.map +1 -0
- package/dist/v2/utils/fmtDate.d.ts +103 -0
- package/dist/v2/utils/fmtDate.d.ts.map +1 -0
- package/dist/v2/utils/fmtDate.js +119 -0
- package/dist/v2/utils/fmtDate.js.map +1 -0
- package/dist/v2/utils/fmtMoney.d.ts +3 -3
- package/dist/v2/utils/fmtMoney.d.ts.map +1 -1
- package/dist/v2/utils/fmtMoney.js +9 -11
- package/dist/v2/utils/fmtMoney.js.map +1 -1
- package/dist/v2/utils/formikErrors.d.ts +67 -0
- package/dist/v2/utils/formikErrors.d.ts.map +1 -0
- package/dist/v2/utils/formikErrors.js +85 -0
- package/dist/v2/utils/formikErrors.js.map +1 -0
- package/dist/v2/utils/index.d.ts +5 -0
- package/dist/v2/utils/index.d.ts.map +1 -1
- package/dist/v2/utils/index.js +67 -18
- package/dist/v2/utils/index.js.map +1 -1
- package/dist/v2/utils/mergeLabels.js +9 -14
- package/dist/v2/utils/mergeLabels.js.map +1 -1
- package/dist/v2/utils/networkStatus.js +14 -14
- package/dist/v2/utils/networkStatus.js.map +1 -1
- package/package.json +26 -9
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -16,12 +15,20 @@ var _exportNames = {
|
|
|
16
15
|
getMimeType: true,
|
|
17
16
|
openBase64FileInTab: true,
|
|
18
17
|
downloadBlobFile: true,
|
|
18
|
+
fmtDate: true,
|
|
19
|
+
fmtDateTime: true,
|
|
20
|
+
isForbiddenExecutable: true,
|
|
21
|
+
isAcceptedFile: true,
|
|
22
|
+
getFileRejection: true,
|
|
23
|
+
describeAcceptedTypes: true,
|
|
24
|
+
toAcceptAttribute: true,
|
|
19
25
|
getApiErrorMessage: true,
|
|
20
26
|
getApiErrorDetail: true,
|
|
21
27
|
getApiErrorStatus: true,
|
|
22
28
|
DEFAULT_API_ERROR_MESSAGE: true,
|
|
23
29
|
networkStatus: true,
|
|
24
30
|
createNetworkStatus: true,
|
|
31
|
+
flattenFormikErrors: true,
|
|
25
32
|
SkeletonPageShell: true,
|
|
26
33
|
MODAL_POPPER_PROPS: true,
|
|
27
34
|
MODAL_ZINDEX: true,
|
|
@@ -37,6 +44,7 @@ var _exportNames = {
|
|
|
37
44
|
FAVORITES_FILTER: true,
|
|
38
45
|
FAVORITES_SORT: true,
|
|
39
46
|
useSavedFilters: true,
|
|
47
|
+
reviveSavedCriteria: true,
|
|
40
48
|
useGridPreferences: true,
|
|
41
49
|
GRID_PREFERENCES_CAPABILITY_ID: true,
|
|
42
50
|
ReferentielProvider: true,
|
|
@@ -48,235 +56,289 @@ var _exportNames = {
|
|
|
48
56
|
};
|
|
49
57
|
Object.defineProperty(exports, "DEFAULT_API_ERROR_MESSAGE", {
|
|
50
58
|
enumerable: true,
|
|
51
|
-
get: function
|
|
59
|
+
get: function () {
|
|
52
60
|
return _utils.DEFAULT_API_ERROR_MESSAGE;
|
|
53
61
|
}
|
|
54
62
|
});
|
|
55
63
|
Object.defineProperty(exports, "FAVORITES_FILTER", {
|
|
56
64
|
enumerable: true,
|
|
57
|
-
get: function
|
|
65
|
+
get: function () {
|
|
58
66
|
return _personalization.FAVORITES_FILTER;
|
|
59
67
|
}
|
|
60
68
|
});
|
|
61
69
|
Object.defineProperty(exports, "FAVORITES_SORT", {
|
|
62
70
|
enumerable: true,
|
|
63
|
-
get: function
|
|
71
|
+
get: function () {
|
|
64
72
|
return _personalization.FAVORITES_SORT;
|
|
65
73
|
}
|
|
66
74
|
});
|
|
67
75
|
Object.defineProperty(exports, "GRID_PREFERENCES_CAPABILITY_ID", {
|
|
68
76
|
enumerable: true,
|
|
69
|
-
get: function
|
|
77
|
+
get: function () {
|
|
70
78
|
return _personalization.GRID_PREFERENCES_CAPABILITY_ID;
|
|
71
79
|
}
|
|
72
80
|
});
|
|
73
81
|
Object.defineProperty(exports, "MODAL_POPPER_PROPS", {
|
|
74
82
|
enumerable: true,
|
|
75
|
-
get: function
|
|
83
|
+
get: function () {
|
|
76
84
|
return _modalContext.MODAL_POPPER_PROPS;
|
|
77
85
|
}
|
|
78
86
|
});
|
|
79
87
|
Object.defineProperty(exports, "MODAL_ZINDEX", {
|
|
80
88
|
enumerable: true,
|
|
81
|
-
get: function
|
|
89
|
+
get: function () {
|
|
82
90
|
return _modalContext.MODAL_ZINDEX;
|
|
83
91
|
}
|
|
84
92
|
});
|
|
85
93
|
Object.defineProperty(exports, "ReferentielContext", {
|
|
86
94
|
enumerable: true,
|
|
87
|
-
get: function
|
|
95
|
+
get: function () {
|
|
88
96
|
return _referentiel.ReferentielContext;
|
|
89
97
|
}
|
|
90
98
|
});
|
|
91
99
|
Object.defineProperty(exports, "ReferentielProvider", {
|
|
92
100
|
enumerable: true,
|
|
93
|
-
get: function
|
|
101
|
+
get: function () {
|
|
94
102
|
return _referentiel.ReferentielProvider;
|
|
95
103
|
}
|
|
96
104
|
});
|
|
97
105
|
Object.defineProperty(exports, "SkeletonPageShell", {
|
|
98
106
|
enumerable: true,
|
|
99
|
-
get: function
|
|
100
|
-
return _SkeletonPageShell
|
|
107
|
+
get: function () {
|
|
108
|
+
return _SkeletonPageShell.default;
|
|
101
109
|
}
|
|
102
110
|
});
|
|
103
111
|
Object.defineProperty(exports, "UserPersonalizationProvider", {
|
|
104
112
|
enumerable: true,
|
|
105
|
-
get: function
|
|
113
|
+
get: function () {
|
|
106
114
|
return _personalization.UserPersonalizationProvider;
|
|
107
115
|
}
|
|
108
116
|
});
|
|
109
117
|
Object.defineProperty(exports, "contrast", {
|
|
110
118
|
enumerable: true,
|
|
111
|
-
get: function
|
|
119
|
+
get: function () {
|
|
112
120
|
return _utils.contrast;
|
|
113
121
|
}
|
|
114
122
|
});
|
|
115
123
|
Object.defineProperty(exports, "createLocalStorageAdapter", {
|
|
116
124
|
enumerable: true,
|
|
117
|
-
get: function
|
|
125
|
+
get: function () {
|
|
118
126
|
return _personalization.createLocalStorageAdapter;
|
|
119
127
|
}
|
|
120
128
|
});
|
|
121
129
|
Object.defineProperty(exports, "createMemoryAdapter", {
|
|
122
130
|
enumerable: true,
|
|
123
|
-
get: function
|
|
131
|
+
get: function () {
|
|
124
132
|
return _personalization.createMemoryAdapter;
|
|
125
133
|
}
|
|
126
134
|
});
|
|
127
135
|
Object.defineProperty(exports, "createNetworkStatus", {
|
|
128
136
|
enumerable: true,
|
|
129
|
-
get: function
|
|
137
|
+
get: function () {
|
|
130
138
|
return _utils.createNetworkStatus;
|
|
131
139
|
}
|
|
132
140
|
});
|
|
133
141
|
Object.defineProperty(exports, "createPortnetTheme", {
|
|
134
142
|
enumerable: true,
|
|
135
|
-
get: function
|
|
143
|
+
get: function () {
|
|
136
144
|
return _theme.createPortnetTheme;
|
|
137
145
|
}
|
|
138
146
|
});
|
|
139
147
|
Object.defineProperty(exports, "cx", {
|
|
140
148
|
enumerable: true,
|
|
141
|
-
get: function
|
|
149
|
+
get: function () {
|
|
142
150
|
return _utils.cx;
|
|
143
151
|
}
|
|
144
152
|
});
|
|
153
|
+
Object.defineProperty(exports, "describeAcceptedTypes", {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function () {
|
|
156
|
+
return _utils.describeAcceptedTypes;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
145
159
|
Object.defineProperty(exports, "downloadBase64File", {
|
|
146
160
|
enumerable: true,
|
|
147
|
-
get: function
|
|
161
|
+
get: function () {
|
|
148
162
|
return _utils.downloadBase64File;
|
|
149
163
|
}
|
|
150
164
|
});
|
|
151
165
|
Object.defineProperty(exports, "downloadBlobFile", {
|
|
152
166
|
enumerable: true,
|
|
153
|
-
get: function
|
|
167
|
+
get: function () {
|
|
154
168
|
return _utils.downloadBlobFile;
|
|
155
169
|
}
|
|
156
170
|
});
|
|
157
171
|
Object.defineProperty(exports, "filterRowsByFavorites", {
|
|
158
172
|
enumerable: true,
|
|
159
|
-
get: function
|
|
173
|
+
get: function () {
|
|
160
174
|
return _personalization.filterRowsByFavorites;
|
|
161
175
|
}
|
|
162
176
|
});
|
|
177
|
+
Object.defineProperty(exports, "flattenFormikErrors", {
|
|
178
|
+
enumerable: true,
|
|
179
|
+
get: function () {
|
|
180
|
+
return _utils.flattenFormikErrors;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
Object.defineProperty(exports, "fmtDate", {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get: function () {
|
|
186
|
+
return _utils.fmtDate;
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
Object.defineProperty(exports, "fmtDateTime", {
|
|
190
|
+
enumerable: true,
|
|
191
|
+
get: function () {
|
|
192
|
+
return _utils.fmtDateTime;
|
|
193
|
+
}
|
|
194
|
+
});
|
|
163
195
|
Object.defineProperty(exports, "fmtMoney", {
|
|
164
196
|
enumerable: true,
|
|
165
|
-
get: function
|
|
197
|
+
get: function () {
|
|
166
198
|
return _utils.fmtMoney;
|
|
167
199
|
}
|
|
168
200
|
});
|
|
169
201
|
Object.defineProperty(exports, "getApiErrorDetail", {
|
|
170
202
|
enumerable: true,
|
|
171
|
-
get: function
|
|
203
|
+
get: function () {
|
|
172
204
|
return _utils.getApiErrorDetail;
|
|
173
205
|
}
|
|
174
206
|
});
|
|
175
207
|
Object.defineProperty(exports, "getApiErrorMessage", {
|
|
176
208
|
enumerable: true,
|
|
177
|
-
get: function
|
|
209
|
+
get: function () {
|
|
178
210
|
return _utils.getApiErrorMessage;
|
|
179
211
|
}
|
|
180
212
|
});
|
|
181
213
|
Object.defineProperty(exports, "getApiErrorStatus", {
|
|
182
214
|
enumerable: true,
|
|
183
|
-
get: function
|
|
215
|
+
get: function () {
|
|
184
216
|
return _utils.getApiErrorStatus;
|
|
185
217
|
}
|
|
186
218
|
});
|
|
187
219
|
Object.defineProperty(exports, "getCssVariables", {
|
|
188
220
|
enumerable: true,
|
|
189
|
-
get: function
|
|
221
|
+
get: function () {
|
|
190
222
|
return _theme.getCssVariables;
|
|
191
223
|
}
|
|
192
224
|
});
|
|
225
|
+
Object.defineProperty(exports, "getFileRejection", {
|
|
226
|
+
enumerable: true,
|
|
227
|
+
get: function () {
|
|
228
|
+
return _utils.getFileRejection;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
193
231
|
Object.defineProperty(exports, "getMimeType", {
|
|
194
232
|
enumerable: true,
|
|
195
|
-
get: function
|
|
233
|
+
get: function () {
|
|
196
234
|
return _utils.getMimeType;
|
|
197
235
|
}
|
|
198
236
|
});
|
|
199
237
|
Object.defineProperty(exports, "injectCssVariables", {
|
|
200
238
|
enumerable: true,
|
|
201
|
-
get: function
|
|
239
|
+
get: function () {
|
|
202
240
|
return _theme.injectCssVariables;
|
|
203
241
|
}
|
|
204
242
|
});
|
|
243
|
+
Object.defineProperty(exports, "isAcceptedFile", {
|
|
244
|
+
enumerable: true,
|
|
245
|
+
get: function () {
|
|
246
|
+
return _utils.isAcceptedFile;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
Object.defineProperty(exports, "isForbiddenExecutable", {
|
|
250
|
+
enumerable: true,
|
|
251
|
+
get: function () {
|
|
252
|
+
return _utils.isForbiddenExecutable;
|
|
253
|
+
}
|
|
254
|
+
});
|
|
205
255
|
Object.defineProperty(exports, "networkStatus", {
|
|
206
256
|
enumerable: true,
|
|
207
|
-
get: function
|
|
257
|
+
get: function () {
|
|
208
258
|
return _utils.networkStatus;
|
|
209
259
|
}
|
|
210
260
|
});
|
|
211
261
|
Object.defineProperty(exports, "openBase64FileInTab", {
|
|
212
262
|
enumerable: true,
|
|
213
|
-
get: function
|
|
263
|
+
get: function () {
|
|
214
264
|
return _utils.openBase64FileInTab;
|
|
215
265
|
}
|
|
216
266
|
});
|
|
217
267
|
Object.defineProperty(exports, "registerCapability", {
|
|
218
268
|
enumerable: true,
|
|
219
|
-
get: function
|
|
269
|
+
get: function () {
|
|
220
270
|
return _personalization.registerCapability;
|
|
221
271
|
}
|
|
222
272
|
});
|
|
223
273
|
Object.defineProperty(exports, "removeCssVariables", {
|
|
224
274
|
enumerable: true,
|
|
225
|
-
get: function
|
|
275
|
+
get: function () {
|
|
226
276
|
return _theme.removeCssVariables;
|
|
227
277
|
}
|
|
228
278
|
});
|
|
279
|
+
Object.defineProperty(exports, "reviveSavedCriteria", {
|
|
280
|
+
enumerable: true,
|
|
281
|
+
get: function () {
|
|
282
|
+
return _personalization.reviveSavedCriteria;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
229
285
|
Object.defineProperty(exports, "sortRowsByFavorites", {
|
|
230
286
|
enumerable: true,
|
|
231
|
-
get: function
|
|
287
|
+
get: function () {
|
|
232
288
|
return _personalization.sortRowsByFavorites;
|
|
233
289
|
}
|
|
234
290
|
});
|
|
291
|
+
Object.defineProperty(exports, "toAcceptAttribute", {
|
|
292
|
+
enumerable: true,
|
|
293
|
+
get: function () {
|
|
294
|
+
return _utils.toAcceptAttribute;
|
|
295
|
+
}
|
|
296
|
+
});
|
|
235
297
|
Object.defineProperty(exports, "useFavorites", {
|
|
236
298
|
enumerable: true,
|
|
237
|
-
get: function
|
|
299
|
+
get: function () {
|
|
238
300
|
return _personalization.useFavorites;
|
|
239
301
|
}
|
|
240
302
|
});
|
|
241
303
|
Object.defineProperty(exports, "useFavoritesView", {
|
|
242
304
|
enumerable: true,
|
|
243
|
-
get: function
|
|
305
|
+
get: function () {
|
|
244
306
|
return _personalization.useFavoritesView;
|
|
245
307
|
}
|
|
246
308
|
});
|
|
247
309
|
Object.defineProperty(exports, "useGridPreferences", {
|
|
248
310
|
enumerable: true,
|
|
249
|
-
get: function
|
|
311
|
+
get: function () {
|
|
250
312
|
return _personalization.useGridPreferences;
|
|
251
313
|
}
|
|
252
314
|
});
|
|
253
315
|
Object.defineProperty(exports, "useIsFavorite", {
|
|
254
316
|
enumerable: true,
|
|
255
|
-
get: function
|
|
317
|
+
get: function () {
|
|
256
318
|
return _personalization.useIsFavorite;
|
|
257
319
|
}
|
|
258
320
|
});
|
|
259
321
|
Object.defineProperty(exports, "useReferentielClient", {
|
|
260
322
|
enumerable: true,
|
|
261
|
-
get: function
|
|
323
|
+
get: function () {
|
|
262
324
|
return _referentiel.useReferentielClient;
|
|
263
325
|
}
|
|
264
326
|
});
|
|
265
327
|
Object.defineProperty(exports, "useReferentielOptions", {
|
|
266
328
|
enumerable: true,
|
|
267
|
-
get: function
|
|
329
|
+
get: function () {
|
|
268
330
|
return _referentiel.useReferentielOptions;
|
|
269
331
|
}
|
|
270
332
|
});
|
|
271
333
|
Object.defineProperty(exports, "useReferentielSearch", {
|
|
272
334
|
enumerable: true,
|
|
273
|
-
get: function
|
|
335
|
+
get: function () {
|
|
274
336
|
return _referentiel.useReferentielSearch;
|
|
275
337
|
}
|
|
276
338
|
});
|
|
277
339
|
Object.defineProperty(exports, "useSavedFilters", {
|
|
278
340
|
enumerable: true,
|
|
279
|
-
get: function
|
|
341
|
+
get: function () {
|
|
280
342
|
return _personalization.useSavedFilters;
|
|
281
343
|
}
|
|
282
344
|
});
|
|
@@ -288,7 +350,7 @@ Object.keys(_components).forEach(function (key) {
|
|
|
288
350
|
if (key in exports && exports[key] === _components[key]) return;
|
|
289
351
|
Object.defineProperty(exports, key, {
|
|
290
352
|
enumerable: true,
|
|
291
|
-
get: function
|
|
353
|
+
get: function () {
|
|
292
354
|
return _components[key];
|
|
293
355
|
}
|
|
294
356
|
});
|
|
@@ -300,7 +362,7 @@ Object.keys(_patterns).forEach(function (key) {
|
|
|
300
362
|
if (key in exports && exports[key] === _patterns[key]) return;
|
|
301
363
|
Object.defineProperty(exports, key, {
|
|
302
364
|
enumerable: true,
|
|
303
|
-
get: function
|
|
365
|
+
get: function () {
|
|
304
366
|
return _patterns[key];
|
|
305
367
|
}
|
|
306
368
|
});
|
|
@@ -312,7 +374,7 @@ Object.keys(_hooks).forEach(function (key) {
|
|
|
312
374
|
if (key in exports && exports[key] === _hooks[key]) return;
|
|
313
375
|
Object.defineProperty(exports, key, {
|
|
314
376
|
enumerable: true,
|
|
315
|
-
get: function
|
|
377
|
+
get: function () {
|
|
316
378
|
return _hooks[key];
|
|
317
379
|
}
|
|
318
380
|
});
|
|
@@ -330,7 +392,7 @@ Object.keys(_models).forEach(function (key) {
|
|
|
330
392
|
if (key in exports && exports[key] === _models[key]) return;
|
|
331
393
|
Object.defineProperty(exports, key, {
|
|
332
394
|
enumerable: true,
|
|
333
|
-
get: function
|
|
395
|
+
get: function () {
|
|
334
396
|
return _models[key];
|
|
335
397
|
}
|
|
336
398
|
});
|
|
@@ -342,14 +404,13 @@ Object.keys(_types).forEach(function (key) {
|
|
|
342
404
|
if (key in exports && exports[key] === _types[key]) return;
|
|
343
405
|
Object.defineProperty(exports, key, {
|
|
344
406
|
enumerable: true,
|
|
345
|
-
get: function
|
|
407
|
+
get: function () {
|
|
346
408
|
return _types[key];
|
|
347
409
|
}
|
|
348
410
|
});
|
|
349
411
|
});
|
|
350
412
|
var _v = _interopRequireWildcard(require("./v2"));
|
|
351
413
|
exports.v2 = _v;
|
|
352
|
-
function
|
|
353
|
-
function
|
|
354
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
414
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
415
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
355
416
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_components","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_patterns","_hooks","_theme","_utils","_SkeletonPageShell","_interopRequireDefault","_modalContext","_personalization","_referentiel","_models","_types","_v","_interopRequireWildcard","v2","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set"],"sources":["../src/lib/index.ts"],"sourcesContent":["/**\r\n * @portnet/ui — root entry (MUI v9)\r\n *\r\n * The v1 Pui* surface was REMOVED in 0.3.0-mui9. The package now\r\n * exposes the modernised v2 Design System directly at its root.\r\n *\r\n * Imports\r\n * -------\r\n *\r\n * // Components (flat — preferred)\r\n * import { Button, Modal, FormGrid, Combobox, ... } from \"@portnet/ui\";\r\n *\r\n * // Theme + CSS variables + tokens + hooks (flat, or subpath entrypoints)\r\n * import { createPortnetTheme, injectCssVariables } from \"@portnet/ui\";\r\n * import { palette, spacing } from \"@portnet/ui/tokens\";\r\n * import { useFocusTrap } from \"@portnet/ui/hooks\";\r\n *\r\n * // Misc utils (flat) — class names, money formatting, WCAG contrast,\r\n * // and base64 → browser download\r\n * import { cx, fmtMoney, contrast, downloadBase64File } from \"@portnet/ui\";\r\n *\r\n * // Modal layering constants (flat)\r\n * import { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"@portnet/ui\";\r\n *\r\n * // Personalization foundation (flat, or \"@portnet/ui/personalization\")\r\n * import { UserPersonalizationProvider, createLocalStorageAdapter } from \"@portnet/ui\";\r\n *\r\n * // Referentiel data layer (flat) — backs ReferentielField /\r\n * // FormikReferentielField. Mount the provider once at the app root.\r\n * import { ReferentielProvider, useReferentielSearch } from \"@portnet/ui\";\r\n *\r\n * // Domain models + UI types (flat, type-only)\r\n * import type { FavoriteItem, SavedFilter, GridColumn } from \"@portnet/ui\";\r\n *\r\n * // Legacy `@portnet/ui/v2/*` paths still resolve transitionally\r\n * // through the v2 re-export below, deprecated and scheduled for\r\n * // removal in 0.4.0. NOTE: capability added after that deprecation\r\n * // is surfaced flat ONLY and is deliberately absent from `v2.*`.\r\n *\r\n * No v1 surface remains. Consuming modules that still import any\r\n * Pui* component will fail to resolve and must migrate per the\r\n * table in docs/migration-mui9/03-batch3-purge-v1.md.\r\n */\r\n\r\n// Flat re-export of every v2 component, pattern, hook, and the\r\n// theme factory. This is what consuming modules pin against\r\n// (`import { Button } from \"@portnet/ui\"`).\r\nexport * from \"./v2/components\";\r\nexport * from \"./v2/patterns\";\r\nexport * from \"./v2/hooks\";\r\nexport {\r\n createPortnetTheme,\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./v2/theme\";\r\n\r\n// Theme factory typed contract, flat + type-only (capability gap G-33).\r\n//\r\n// The theme VALUES were flat-exported above while the types describing their\r\n// options were reachable ONLY from the deprecated `@portnet/ui/v2` subpath.\r\n// Every host module wraps createPortnetTheme in a local `build<Module>Theme`\r\n// helper (see the GU modules' utils/appearance), so every host needs this\r\n// contract to type its own wrapper — and had exactly two ways to get it:\r\n// import from a surface scheduled for removal in 0.4.0, or fall back to\r\n// `brand?: object` + `as Parameters<typeof createPortnetTheme>[0]`, both on\r\n// the Platform TypeScript Guidelines FORBIDDEN list. ./v2/theme's own doc\r\n// comment already names that anti-pattern as the reason these types were\r\n// published; it just never reached the surface consumers are told to migrate\r\n// TO. Closing that here removes the last reason a module needs `@portnet/ui/v2`\r\n// for the theme layer.\r\n//\r\n// Flat-only, per the `v2` policy note at the bottom of this file.\r\n// Purely additive and type-only; nothing existing changed.\r\nexport type {\r\n CreatePortnetThemeOptions,\r\n BrandTokens,\r\n BrandSecondaryTokens,\r\n} from \"./v2/theme\";\r\n\r\n// Added while migrating ms-dfd-fe to TypeScript: cx / fmtMoney / contrast had\r\n// no flat or subpath route, only the deprecated `v2.*` namespace below.\r\n// downloadBase64File + getMimeType were added later (mjcc-fe Area 5) and are\r\n// flat-only by policy — see the note on `v2` at the bottom of this file.\r\n// Purely additive re-exports; nothing existing changed.\r\n//\r\n// G-34 (caution-ui Area 6) — openBase64FileInTab + downloadBlobFile added.\r\n// These two were NOT flat-only additions: ./v2/index.ts has exported them all\r\n// along, so the FLAT ROOT — the surface the policy at the bottom of this file\r\n// tells every module to migrate TO — was a strict SUBSET of the deprecated\r\n// surface it replaces. A module obeying the migration policy lost access to\r\n// both, which is how caution-ui's Area 6 build broke:\r\n//\r\n// Attempted import error: 'downloadBlobFile' is not exported\r\n// from '@portnet/ui'\r\n//\r\n// Root cause is mechanical, and worth fixing properly rather than name by name:\r\n// ./v2/components, ./v2/patterns and ./v2/hooks are re-exported above with\r\n// `export *`, so anything added to them surfaces automatically. ./v2/utils is\r\n// re-exported by EXPLICIT NAME LIST, so every new util silently fails to reach\r\n// consumers until someone hits a build error. A wildcard is not a safe swap\r\n// here — ./v2/utils also carries `mergeLabels`, an internal label-merging\r\n// helper with no host use case, and widening a certified public surface by\r\n// accident is worse than the drift. The list stays, and the invariant is stated\r\n// instead: ANY addition to ./v2/utils intended for hosts must be added here in\r\n// the same commit.\r\nexport {\r\n cx,\r\n fmtMoney,\r\n contrast,\r\n downloadBase64File,\r\n getMimeType,\r\n openBase64FileInTab,\r\n downloadBlobFile,\r\n} from \"./v2/utils\";\r\n\r\n// Error narrowing + the network-status channel. Flat-only per the `v2` policy\r\n// note at the bottom of this file. Both were added from the\r\n// procuration-portnet-fe Area 5 gap audit (G-04, G-03):\r\n//\r\n// - getApiErrorMessage / getApiErrorStatus close the hole between two rules\r\n// the platform imposes together — `useUnknownInCatchVariables` is mandatory\r\n// and `any` / unsafe assertions are forbidden, with nothing sanctioned in\r\n// between. Every audited module had bridged it with\r\n// `error as { response?: { data?: { message?: unknown } } }`.\r\n//\r\n// - networkStatus is the feed for NetworkErrorBanner, which shipped as a\r\n// presentational component with its trigger contract left to consumers.\r\n//\r\n// G-34 — getApiErrorDetail added. Its own docstring PRESCRIBES a pairing that\r\n// was impossible to write, because the companion was never surfaced:\r\n//\r\n// toast(getApiErrorMessage(err, \"Échec de l'envoi.\"), \"error\");\r\n// console.error(\"[submit]\", getApiErrorStatus(err), getApiErrorDetail(err));\r\n//\r\n// The split exists because getApiErrorMessage deliberately SUPPRESSES transport\r\n// phrasings (G-07) — right for a toast, wrong for a console or an APM\r\n// breadcrumb, where \"Request failed with status code 502\" is exactly what an\r\n// operator needs. Without the escape hatch a host either logs the sanitised\r\n// string (losing the diagnostic) or re-reads `error.message` by hand with an\r\n// assertion (the very thing G-04 exists to prevent).\r\n//\r\n// Purely additive; nothing existing changed.\r\nexport {\r\n getApiErrorMessage,\r\n getApiErrorDetail,\r\n getApiErrorStatus,\r\n DEFAULT_API_ERROR_MESSAGE,\r\n networkStatus,\r\n createNetworkStatus,\r\n} from \"./v2/utils\";\r\nexport type { NetworkStatus, NetworkStatusListener } from \"./v2/utils\";\r\n\r\n// Route-level Suspense fallback. R-P.1 MUST requires a \"fallback skeleton page\",\r\n// and the library had every skeleton PART plus PageBusy, but nothing satisfying\r\n// the rule: PageBusy is a full-screen spinner, which R-8.1 MUST forbids for\r\n// navigation. So every module hand-built one, and to avoid the CLS a skeleton\r\n// exists to prevent it had to copy ActionBar's and PageContent's padding\r\n// literals out of this library. Owning it here keeps the three in lockstep.\r\n// Capability gap G-02 (procuration-portnet-fe Area 5). Flat-only, per the policy\r\n// note below.\r\nexport { default as SkeletonPageShell } from \"./v2/patterns/SkeletonPageShell\";\r\nexport type {\r\n SkeletonPageShellProps,\r\n SkeletonPageShellVariant,\r\n} from \"./v2/patterns/SkeletonPageShell\";\r\n\r\n// Modal/Drawer/Combobox/DatePicker layering constants - needed by any\r\n// consumer stacking a popover-ish component (Combobox, DateTimePicker)\r\n// above a Modal or Drawer. Was v2-namespace-only.\r\nexport { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"./v2/modalContext\";\r\n\r\n// Personalization foundation runtime API (favorites, saved filters).\r\n// Named re-export, not a wildcard: ./v2/personalization also carries\r\n// the Scope/FavoriteRef/SavedFilter model types for its own internal\r\n// use, which are already flat-exported canonically via ./v2/models\r\n// below - a wildcard here would re-export them a second time and\r\n// collide (TS2308). Mirrors exactly what ./v2/index.ts already does\r\n// internally for the same reason.\r\nexport {\r\n UserPersonalizationProvider,\r\n createLocalStorageAdapter,\r\n createMemoryAdapter,\r\n registerCapability,\r\n useFavorites,\r\n useIsFavorite,\r\n useFavoritesView,\r\n filterRowsByFavorites,\r\n sortRowsByFavorites,\r\n FAVORITES_FILTER,\r\n FAVORITES_SORT,\r\n useSavedFilters,\r\n} from \"./v2/personalization\";\r\n\r\n// Grid preferences capability (gap G-35) — per-user, per-resource hidden\r\n// columns. FLAT-ONLY, per the policy note on `v2` at the bottom of this file:\r\n// deliberately NOT added to ./v2/index.ts.\r\n//\r\n// DataGridToolbar owns the column-visibility UI but holds no state, so hosts\r\n// persisted it themselves in a bare localStorage key — not user-scoped, unlike\r\n// this foundation's `…:{userId}:{capabilityId}` scheme, so on a shared\r\n// workstation one user inherited another's hidden columns. Observed in\r\n// onssa-export-fe (\"onssaCertificates:listing:hiddenColumns\").\r\n//\r\n// It had to land in the library rather than the host: `registerCapability` is\r\n// exported above as a seam \"for custom/host-defined capabilities\", but the two\r\n// primitives a capability hook needs (usePersonalizationStore,\r\n// useStoreSelector) are private by design (§2.8, minimum API surface), so a\r\n// host-registered capability could be declared and never read or written.\r\n// Completing that seam instead would widen the internal surface AND leave every\r\n// module re-authoring the same slice; owning the slice here does neither.\r\nexport {\r\n useGridPreferences,\r\n GRID_PREFERENCES_CAPABILITY_ID,\r\n} from \"./v2/personalization\";\r\nexport type {\r\n UseGridPreferencesResult,\r\n GridPreferencesEntry,\r\n} from \"./v2/personalization\";\r\n\r\n// Referentiel data layer runtime API (config provider + hooks). Backs\r\n// ReferentielField / FormikReferentielField, which are flat-exported\r\n// above via ./v2/patterns - the field UI was reachable while the data\r\n// layer that feeds it was not, so consumers had to either import from\r\n// the deprecated `@portnet/ui/v2` surface or rebuild the client\r\n// locally. Added while auditing mjcc-fe, which had done the latter.\r\n//\r\n// Named re-export, not a wildcard, for the SAME reason as\r\n// personalization above: ./v2/referentiel also re-exports\r\n// ReferentielSearchArgs, ReferentielSearchResult and\r\n// ReferentielSearchFn for its own use, and those names are already\r\n// flat-exported canonically through ./v2/models below. A wildcard\r\n// would export them twice and collide (TS2308). The type layer keeps\r\n// its single canonical route.\r\nexport {\r\n ReferentielProvider,\r\n ReferentielContext,\r\n useReferentielClient,\r\n useReferentielOptions,\r\n useReferentielSearch,\r\n} from \"./v2/referentiel\";\r\n\r\n// Domain models & shared UI/structural types, flat + type-only (no\r\n// runtime cost). Mirrors the same re-export already done inside\r\n// ./v2 — added here so consumers migrating off `v2.*` have a route\r\n// to the shared types the platform guidelines require reusing\r\n// (DrawerProps, FavoriteItem, SavedFilter, GridColumn, GridAction,\r\n// WizardStep, Notification, FormField, etc.) without falling back to\r\n// the deprecated namespace just to get a type import. Conflicting\r\n// names across the two star-exports are omitted per ES module\r\n// semantics rather than erroring.\r\nexport * from \"./v2/models\";\r\nexport * from \"./v2/types\";\r\n\r\n// Transitional alias — the `@portnet/ui/v2` subpath kept resolving\r\n// for one minor cycle so consuming modules can migrate their\r\n// imports independently of the package bump. Scheduled removal:\r\n// 0.4.0. Track removal in the Batch 5 cleanup ticket.\r\n//\r\n// POLICY: capability added after this deprecation is surfaced on the\r\n// flat root ONLY and is not added to ./v2/index.ts — adding it there\r\n// would hand consumers a new reason to stay on a retiring surface.\r\n// downloadBase64File / getMimeType are the first such additions.\r\n//\r\n// COROLLARY, learned the hard way (G-34): the policy only works if the flat\r\n// root is a strict SUPERSET of ./v2. It was not — downloadBlobFile and\r\n// openBase64FileInTab were on v2 and missing here, so \"migrate off v2\" meant\r\n// \"lose two utilities\". Before deprecating anything further, diff the two\r\n// surfaces; `npm run api:check` covers the root but does not compare it against\r\n// ./v2.\r\nexport * as v2 from \"./v2\";\r\n"],"mappings":"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","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_components","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_patterns","_hooks","_theme","_utils","_SkeletonPageShell","_interopRequireDefault","_modalContext","_personalization","_referentiel","_models","_types","_v","_interopRequireWildcard","v2","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor"],"sources":["../src/lib/index.ts"],"sourcesContent":["/**\r\n * @portnet/ui — root entry (MUI v9)\r\n *\r\n * The v1 Pui* surface was REMOVED in 0.3.0-mui9. The package now\r\n * exposes the modernised v2 Design System directly at its root.\r\n *\r\n * Imports\r\n * -------\r\n *\r\n * // Components (flat — preferred)\r\n * import { Button, Modal, FormGrid, Combobox, ... } from \"@portnet/ui\";\r\n *\r\n * // Theme + CSS variables + tokens + hooks (flat, or subpath entrypoints)\r\n * import { createPortnetTheme, injectCssVariables } from \"@portnet/ui\";\r\n * import { palette, spacing } from \"@portnet/ui/tokens\";\r\n * import { useFocusTrap } from \"@portnet/ui/hooks\";\r\n *\r\n * // Misc utils (flat) — class names, money formatting, WCAG contrast,\r\n * // and base64 → browser download\r\n * import { cx, fmtMoney, contrast, downloadBase64File } from \"@portnet/ui\";\r\n *\r\n * // Modal layering constants (flat)\r\n * import { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"@portnet/ui\";\r\n *\r\n * // Personalization foundation (flat, or \"@portnet/ui/personalization\")\r\n * import { UserPersonalizationProvider, createLocalStorageAdapter } from \"@portnet/ui\";\r\n *\r\n * // Referentiel data layer (flat) — backs ReferentielField /\r\n * // FormikReferentielField. Mount the provider once at the app root.\r\n * import { ReferentielProvider, useReferentielSearch } from \"@portnet/ui\";\r\n *\r\n * // Domain models + UI types (flat, type-only)\r\n * import type { FavoriteItem, SavedFilter, GridColumn } from \"@portnet/ui\";\r\n *\r\n * // Legacy `@portnet/ui/v2/*` paths still resolve transitionally\r\n * // through the v2 re-export below, deprecated and scheduled for\r\n * // removal in 0.4.0. NOTE: capability added after that deprecation\r\n * // is surfaced flat ONLY and is deliberately absent from `v2.*`.\r\n *\r\n * No v1 surface remains. Consuming modules that still import any\r\n * Pui* component will fail to resolve and must migrate per the\r\n * table in docs/migration-mui9/03-batch3-purge-v1.md.\r\n */\r\n\r\n// Flat re-export of every v2 component, pattern, hook, and the\r\n// theme factory. This is what consuming modules pin against\r\n// (`import { Button } from \"@portnet/ui\"`).\r\nexport * from \"./v2/components\";\r\nexport * from \"./v2/patterns\";\r\nexport * from \"./v2/hooks\";\r\nexport {\r\n createPortnetTheme,\r\n getCssVariables,\r\n injectCssVariables,\r\n removeCssVariables,\r\n} from \"./v2/theme\";\r\n\r\n// Theme factory typed contract, flat + type-only (capability gap G-33).\r\n//\r\n// The theme VALUES were flat-exported above while the types describing their\r\n// options were reachable ONLY from the deprecated `@portnet/ui/v2` subpath.\r\n// Every host module wraps createPortnetTheme in a local `build<Module>Theme`\r\n// helper (see the GU modules' utils/appearance), so every host needs this\r\n// contract to type its own wrapper — and had exactly two ways to get it:\r\n// import from a surface scheduled for removal in 0.4.0, or fall back to\r\n// `brand?: object` + `as Parameters<typeof createPortnetTheme>[0]`, both on\r\n// the Platform TypeScript Guidelines FORBIDDEN list. ./v2/theme's own doc\r\n// comment already names that anti-pattern as the reason these types were\r\n// published; it just never reached the surface consumers are told to migrate\r\n// TO. Closing that here removes the last reason a module needs `@portnet/ui/v2`\r\n// for the theme layer.\r\n//\r\n// Flat-only, per the `v2` policy note at the bottom of this file.\r\n// Purely additive and type-only; nothing existing changed.\r\nexport type {\r\n CreatePortnetThemeOptions,\r\n BrandTokens,\r\n BrandSecondaryTokens,\r\n} from \"./v2/theme\";\r\n\r\n// Added while migrating ms-dfd-fe to TypeScript: cx / fmtMoney / contrast had\r\n// no flat or subpath route, only the deprecated `v2.*` namespace below.\r\n// downloadBase64File + getMimeType were added later (mjcc-fe Area 5) and are\r\n// flat-only by policy — see the note on `v2` at the bottom of this file.\r\n// Purely additive re-exports; nothing existing changed.\r\n//\r\n// G-34 (caution-ui Area 6) — openBase64FileInTab + downloadBlobFile added.\r\n// These two were NOT flat-only additions: ./v2/index.ts has exported them all\r\n// along, so the FLAT ROOT — the surface the policy at the bottom of this file\r\n// tells every module to migrate TO — was a strict SUBSET of the deprecated\r\n// surface it replaces. A module obeying the migration policy lost access to\r\n// both, which is how caution-ui's Area 6 build broke:\r\n//\r\n// Attempted import error: 'downloadBlobFile' is not exported\r\n// from '@portnet/ui'\r\n//\r\n// Root cause is mechanical, and worth fixing properly rather than name by name:\r\n// ./v2/components, ./v2/patterns and ./v2/hooks are re-exported above with\r\n// `export *`, so anything added to them surfaces automatically. ./v2/utils is\r\n// re-exported by EXPLICIT NAME LIST, so every new util silently fails to reach\r\n// consumers until someone hits a build error. A wildcard is not a safe swap\r\n// here — ./v2/utils also carries `mergeLabels`, an internal label-merging\r\n// helper with no host use case, and widening a certified public surface by\r\n// accident is worse than the drift. The list stays, and the invariant is stated\r\n// instead: ANY addition to ./v2/utils intended for hosts must be added here in\r\n// the same commit.\r\nexport {\r\n cx,\r\n fmtMoney,\r\n contrast,\r\n downloadBase64File,\r\n getMimeType,\r\n openBase64FileInTab,\r\n downloadBlobFile,\r\n} from \"./v2/utils\";\r\n\r\n// Date display (gap G-51) — fmtMoney's counterpart, added here in the SAME\r\n// commit as its entry in ./v2/utils/index.ts, per the invariant stated just\r\n// above. Flat-only by the `v2` policy at the bottom of this file.\r\n//\r\n// Nothing in the library rendered a date, while fmtMoney has covered amounts\r\n// since v1 — and a date is the more common cell by far. So every module wrote\r\n// the same helper, and every copy passed `new Date(undefined)` to `getDate()`,\r\n// which yields NaN for every accessor: optional date fields rendered the\r\n// literal \"NaN/NaN/NaN NaN:NaN\". Raised from autorisation-admis-pour-conforme-fe\r\n// (Area 5), where the guard had been added at eight call sites over four lots\r\n// before landing in the module's own helper.\r\nexport { fmtDate, fmtDateTime } from \"./v2/utils\";\r\nexport type { FmtDateInput, FmtDateOptions } from \"./v2/utils\";\r\n\r\n// Upload validation (gap G-52), flat-only, added here in the SAME commit as its\r\n// entry in ./v2/utils/index.ts — the invariant stated above.\r\n//\r\n// Dropzone reports rejections but validates nothing: `accept` is a picker\r\n// filter drag-and-drop ignores. Every host therefore wrote, next to its own\r\n// extension allow-list, the same executable/script DENY-LIST and the same\r\n// extension/MIME cross-check — neither of which is business policy. A security\r\n// decision duplicated across fifteen modules drifts silently: the day a type\r\n// must be added to the deny-list, nobody can say which modules have it. The\r\n// host keeps its allow-list; the library owns the rest. Raised from\r\n// autorisation-admis-pour-conforme-fe (Area 5), which carried a 21-entry\r\n// deny-list locally.\r\nexport {\r\n isForbiddenExecutable,\r\n isAcceptedFile,\r\n getFileRejection,\r\n describeAcceptedTypes,\r\n toAcceptAttribute,\r\n} from \"./v2/utils\";\r\nexport type {\r\n FileAcceptPolicy,\r\n FileRejection,\r\n FileRejectionReason,\r\n} from \"./v2/utils\";\r\n\r\n// Error narrowing + the network-status channel. Flat-only per the `v2` policy\r\n// note at the bottom of this file. Both were added from the\r\n// procuration-portnet-fe Area 5 gap audit (G-04, G-03):\r\n//\r\n// - getApiErrorMessage / getApiErrorStatus close the hole between two rules\r\n// the platform imposes together — `useUnknownInCatchVariables` is mandatory\r\n// and `any` / unsafe assertions are forbidden, with nothing sanctioned in\r\n// between. Every audited module had bridged it with\r\n// `error as { response?: { data?: { message?: unknown } } }`.\r\n//\r\n// - networkStatus is the feed for NetworkErrorBanner, which shipped as a\r\n// presentational component with its trigger contract left to consumers.\r\n//\r\n// G-34 — getApiErrorDetail added. Its own docstring PRESCRIBES a pairing that\r\n// was impossible to write, because the companion was never surfaced:\r\n//\r\n// toast(getApiErrorMessage(err, \"Échec de l'envoi.\"), \"error\");\r\n// console.error(\"[submit]\", getApiErrorStatus(err), getApiErrorDetail(err));\r\n//\r\n// The split exists because getApiErrorMessage deliberately SUPPRESSES transport\r\n// phrasings (G-07) — right for a toast, wrong for a console or an APM\r\n// breadcrumb, where \"Request failed with status code 502\" is exactly what an\r\n// operator needs. Without the escape hatch a host either logs the sanitised\r\n// string (losing the diagnostic) or re-reads `error.message` by hand with an\r\n// assertion (the very thing G-04 exists to prevent).\r\n//\r\n// Purely additive; nothing existing changed.\r\nexport {\r\n getApiErrorMessage,\r\n getApiErrorDetail,\r\n getApiErrorStatus,\r\n DEFAULT_API_ERROR_MESSAGE,\r\n networkStatus,\r\n createNetworkStatus,\r\n} from \"./v2/utils\";\r\nexport type { NetworkStatus, NetworkStatusListener } from \"./v2/utils\";\r\n\r\n// Formik error flattening (gap G-38). FLAT-ONLY, per the policy note at the\r\n// bottom of this file, and added here in the SAME commit as its entry in\r\n// ./v2/utils/index.ts — that is the invariant recorded above: ./v2/utils is\r\n// re-exported by explicit name list, so a util omitted here never reaches a\r\n// consumer, which is how G-34 broke caution-ui's build.\r\n//\r\n// It completes the failed-submit recipe the library already half-owned:\r\n// FormErrorSummary (R-FV.2) renders `{ name, message }[]`, focusFieldByName\r\n// (R-FV.3) resolves that same name, and nothing turned Formik's nested error\r\n// tree into the list both of them speak. Every host wrote the recursion, and a\r\n// wrong accumulated path fails SILENTLY — the banner lists the right messages\r\n// and its jump button targets a field that does not exist.\r\nexport { flattenFormikErrors } from \"./v2/utils\";\r\n\r\n// Route-level Suspense fallback. R-P.1 MUST requires a \"fallback skeleton page\",\r\n// and the library had every skeleton PART plus PageBusy, but nothing satisfying\r\n// the rule: PageBusy is a full-screen spinner, which R-8.1 MUST forbids for\r\n// navigation. So every module hand-built one, and to avoid the CLS a skeleton\r\n// exists to prevent it had to copy ActionBar's and PageContent's padding\r\n// literals out of this library. Owning it here keeps the three in lockstep.\r\n// Capability gap G-02 (procuration-portnet-fe Area 5). Flat-only, per the policy\r\n// note below.\r\nexport { default as SkeletonPageShell } from \"./v2/patterns/SkeletonPageShell\";\r\nexport type {\r\n SkeletonPageShellProps,\r\n SkeletonPageShellVariant,\r\n} from \"./v2/patterns/SkeletonPageShell\";\r\n\r\n// Modal/Drawer/Combobox/DatePicker layering constants - needed by any\r\n// consumer stacking a popover-ish component (Combobox, DateTimePicker)\r\n// above a Modal or Drawer. Was v2-namespace-only.\r\nexport { MODAL_POPPER_PROPS, MODAL_ZINDEX } from \"./v2/modalContext\";\r\n\r\n// Personalization foundation runtime API (favorites, saved filters).\r\n// Named re-export, not a wildcard: ./v2/personalization also carries\r\n// the Scope/FavoriteRef/SavedFilter model types for its own internal\r\n// use, which are already flat-exported canonically via ./v2/models\r\n// below - a wildcard here would re-export them a second time and\r\n// collide (TS2308). Mirrors exactly what ./v2/index.ts already does\r\n// internally for the same reason.\r\nexport {\r\n UserPersonalizationProvider,\r\n createLocalStorageAdapter,\r\n createMemoryAdapter,\r\n registerCapability,\r\n useFavorites,\r\n useIsFavorite,\r\n useFavoritesView,\r\n filterRowsByFavorites,\r\n sortRowsByFavorites,\r\n FAVORITES_FILTER,\r\n FAVORITES_SORT,\r\n useSavedFilters,\r\n // G-50 — reviveSavedCriteria. Listed HERE and not only in\r\n // ./v2/personalization/index.ts, because this block is an EXPLICIT NAME LIST\r\n // (see the collision note just above): the invariant recorded for ./v2/utils\r\n // a few blocks up applies verbatim to this barrel — any addition intended for\r\n // hosts must be added here in the same commit, or it silently fails to reach\r\n // them until a consuming module's build breaks on\r\n // \"has no exported member\". That is how G-34 broke caution-ui, and adding\r\n // this one without touching this line reproduced it for the module that\r\n // requested the capability.\r\n reviveSavedCriteria,\r\n} from \"./v2/personalization\";\r\n\r\n// Grid preferences capability (gap G-35) — per-user, per-resource hidden\r\n// columns. FLAT-ONLY, per the policy note on `v2` at the bottom of this file:\r\n// deliberately NOT added to ./v2/index.ts.\r\n//\r\n// DataGridToolbar owns the column-visibility UI but holds no state, so hosts\r\n// persisted it themselves in a bare localStorage key — not user-scoped, unlike\r\n// this foundation's `…:{userId}:{capabilityId}` scheme, so on a shared\r\n// workstation one user inherited another's hidden columns. Observed in\r\n// onssa-export-fe (\"onssaCertificates:listing:hiddenColumns\").\r\n//\r\n// It had to land in the library rather than the host: `registerCapability` is\r\n// exported above as a seam \"for custom/host-defined capabilities\", but the two\r\n// primitives a capability hook needs (usePersonalizationStore,\r\n// useStoreSelector) are private by design (§2.8, minimum API surface), so a\r\n// host-registered capability could be declared and never read or written.\r\n// Completing that seam instead would widen the internal surface AND leave every\r\n// module re-authoring the same slice; owning the slice here does neither.\r\nexport {\r\n useGridPreferences,\r\n GRID_PREFERENCES_CAPABILITY_ID,\r\n} from \"./v2/personalization\";\r\nexport type {\r\n UseGridPreferencesResult,\r\n GridPreferencesEntry,\r\n} from \"./v2/personalization\";\r\n\r\n// Referentiel data layer runtime API (config provider + hooks). Backs\r\n// ReferentielField / FormikReferentielField, which are flat-exported\r\n// above via ./v2/patterns - the field UI was reachable while the data\r\n// layer that feeds it was not, so consumers had to either import from\r\n// the deprecated `@portnet/ui/v2` surface or rebuild the client\r\n// locally. Added while auditing mjcc-fe, which had done the latter.\r\n//\r\n// Named re-export, not a wildcard, for the SAME reason as\r\n// personalization above: ./v2/referentiel also re-exports\r\n// ReferentielSearchArgs, ReferentielSearchResult and\r\n// ReferentielSearchFn for its own use, and those names are already\r\n// flat-exported canonically through ./v2/models below. A wildcard\r\n// would export them twice and collide (TS2308). The type layer keeps\r\n// its single canonical route.\r\nexport {\r\n ReferentielProvider,\r\n ReferentielContext,\r\n useReferentielClient,\r\n useReferentielOptions,\r\n useReferentielSearch,\r\n} from \"./v2/referentiel\";\r\n\r\n// Domain models & shared UI/structural types, flat + type-only (no\r\n// runtime cost). Mirrors the same re-export already done inside\r\n// ./v2 — added here so consumers migrating off `v2.*` have a route\r\n// to the shared types the platform guidelines require reusing\r\n// (DrawerProps, FavoriteItem, SavedFilter, GridColumn, GridAction,\r\n// WizardStep, Notification, FormField, etc.) without falling back to\r\n// the deprecated namespace just to get a type import. Conflicting\r\n// names across the two star-exports are omitted per ES module\r\n// semantics rather than erroring.\r\nexport * from \"./v2/models\";\r\nexport * from \"./v2/types\";\r\n\r\n// ReferentielField's SEARCH CONTRACT, under non-colliding names.\r\n//\r\n// `ReferentielSearchParams` / `ReferentielSearchResult` exist twice in this\r\n// library with different shapes: the pattern's ({criteria, page, pageSize,\r\n// sort}) and the data layer's in ./v2/models/referentiel ({path, ...}). Per the\r\n// star-export semantics noted above, the conflicting pattern names are omitted\r\n// and both resolve to the MODELS types -- so a host cannot name the parameter\r\n// type of the `search` prop that ReferentielField REQUIRES it to pass.\r\n//\r\n// Found migrating ms-ti-fe off its local AppFormikSearchField: a typed\r\n// `async function searchTransitaires({ criteria, page, pageSize }:\r\n// ReferentielSearchParams)` fails with \"Property 'criteria' does not exist on\r\n// type ReferentielSearchParams<Record<string, unknown>>\", leaving a host only\r\n// two bad options -- re-declare the shape locally (duplicating a shared type,\r\n// which the Platform TypeScript Guidelines forbid) or derive it via\r\n// `Parameters<ReferentielFieldProps<T>[\"search\"]>[0]`.\r\n//\r\n// Aliasing rather than renaming: both original names keep resolving exactly as\r\n// they do today, so this is additive, and it makes the flat root the strict\r\n// superset of ./v2 that the COROLLARY below requires.\r\nexport type {\r\n ReferentielSearchParams as ReferentielFieldSearchParams,\r\n ReferentielSearchResult as ReferentielFieldSearchResult,\r\n} from \"./v2/patterns/ReferentielField\";\r\n\r\n// Transitional alias — the `@portnet/ui/v2` subpath kept resolving\r\n// for one minor cycle so consuming modules can migrate their\r\n// imports independently of the package bump. Scheduled removal:\r\n// 0.4.0. Track removal in the Batch 5 cleanup ticket.\r\n//\r\n// POLICY: capability added after this deprecation is surfaced on the\r\n// flat root ONLY and is not added to ./v2/index.ts — adding it there\r\n// would hand consumers a new reason to stay on a retiring surface.\r\n// downloadBase64File / getMimeType are the first such additions.\r\n//\r\n// COROLLARY, learned the hard way (G-34): the policy only works if the flat\r\n// root is a strict SUPERSET of ./v2. It was not — downloadBlobFile and\r\n// openBase64FileInTab were on v2 and missing here, so \"migrate off v2\" meant\r\n// \"lose two utilities\". Before deprecating anything further, diff the two\r\n// surfaces; `npm run api:check` covers the root but does not compare it against\r\n// ./v2.\r\nexport * as v2 from \"./v2\";\r\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("@testing-library/jest-dom");
|
|
4
|
+
var _react = require("@testing-library/react");
|
|
5
|
+
var _AppMain = _interopRequireDefault(require("../patterns/AppMain"));
|
|
6
|
+
var _SkipLink = _interopRequireDefault(require("../components/SkipLink"));
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
describe("AppMain", () => {
|
|
10
|
+
it("renders a main landmark holding its children", () => {
|
|
11
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
12
|
+
children: "contenu"
|
|
13
|
+
}));
|
|
14
|
+
const main = _react.screen.getByRole("main");
|
|
15
|
+
expect(main).toHaveTextContent("contenu");
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/* The id is half of a contract: SkipLink's default href is "#main-content". */
|
|
19
|
+
it("defaults its id to SkipLink's default target", () => {
|
|
20
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
21
|
+
children: "x"
|
|
22
|
+
}));
|
|
23
|
+
expect(_react.screen.getByRole("main")).toHaveAttribute("id", "main-content");
|
|
24
|
+
});
|
|
25
|
+
it("accepts a custom id", () => {
|
|
26
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
27
|
+
id: "zone-principale",
|
|
28
|
+
children: "x"
|
|
29
|
+
}));
|
|
30
|
+
expect(_react.screen.getByRole("main")).toHaveAttribute("id", "zone-principale");
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/* Focusable programmatically, NOT a tab stop. */
|
|
34
|
+
it("is programmatically focusable without joining the tab order", () => {
|
|
35
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
36
|
+
children: "x"
|
|
37
|
+
}));
|
|
38
|
+
expect(_react.screen.getByRole("main")).toHaveAttribute("tabindex", "-1");
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/* R-L.5 — and the cap is meaningless without the auto margins: the content
|
|
42
|
+
* would pin left and leave the whole surplus as one gutter. */
|
|
43
|
+
it("caps the wide measure and centres it", () => {
|
|
44
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
45
|
+
children: "x"
|
|
46
|
+
}));
|
|
47
|
+
const main = _react.screen.getByRole("main");
|
|
48
|
+
expect(main.style.maxWidth).toBe("var(--content-max)");
|
|
49
|
+
expect(main.style.marginInline).toBe("auto");
|
|
50
|
+
});
|
|
51
|
+
it("caps the form measure at the form token", () => {
|
|
52
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
53
|
+
measure: "form",
|
|
54
|
+
children: "x"
|
|
55
|
+
}));
|
|
56
|
+
expect(_react.screen.getByRole("main").style.maxWidth).toBe("var(--form-max)");
|
|
57
|
+
});
|
|
58
|
+
it("applies no cap for the full measure", () => {
|
|
59
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
60
|
+
measure: "full",
|
|
61
|
+
children: "x"
|
|
62
|
+
}));
|
|
63
|
+
const main = _react.screen.getByRole("main");
|
|
64
|
+
expect(main.style.maxWidth).toBe("");
|
|
65
|
+
expect(main.style.marginInline).toBe("");
|
|
66
|
+
});
|
|
67
|
+
it("reserves a minimum height, overridable", () => {
|
|
68
|
+
const {
|
|
69
|
+
unmount
|
|
70
|
+
} = (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
71
|
+
children: "x"
|
|
72
|
+
}));
|
|
73
|
+
expect(_react.screen.getByRole("main").style.minHeight).toBe("100vh");
|
|
74
|
+
unmount();
|
|
75
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
76
|
+
minHeight: "480px",
|
|
77
|
+
children: "x"
|
|
78
|
+
}));
|
|
79
|
+
expect(_react.screen.getByRole("main").style.minHeight).toBe("480px");
|
|
80
|
+
});
|
|
81
|
+
it("lets an explicit style win over the computed one", () => {
|
|
82
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
83
|
+
style: {
|
|
84
|
+
maxWidth: "960px"
|
|
85
|
+
},
|
|
86
|
+
children: "x"
|
|
87
|
+
}));
|
|
88
|
+
expect(_react.screen.getByRole("main").style.maxWidth).toBe("960px");
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
/* PRE-CONTENT — the case that made these two props exist. A host rendering
|
|
92
|
+
* the landmark before its router mounts (R-Pp.1) has nothing inside to name
|
|
93
|
+
* it, and an empty landmark is indistinguishable from a failed one. */
|
|
94
|
+
it("names and marks the region busy when asked", () => {
|
|
95
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
96
|
+
ariaLabel: "Initialisation de l'application",
|
|
97
|
+
ariaBusy: true,
|
|
98
|
+
children: null
|
|
99
|
+
}));
|
|
100
|
+
const main = _react.screen.getByRole("main");
|
|
101
|
+
expect(main).toHaveAccessibleName("Initialisation de l'application");
|
|
102
|
+
expect(main).toHaveAttribute("aria-busy", "true");
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/* And stays silent otherwise: a `<main>` holding content needs no name, and
|
|
106
|
+
* a spurious `aria-busy="false"` on every page would be noise in the tree. */
|
|
107
|
+
it("emits neither attribute by default", () => {
|
|
108
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
109
|
+
children: "contenu"
|
|
110
|
+
}));
|
|
111
|
+
const main = _react.screen.getByRole("main");
|
|
112
|
+
expect(main).not.toHaveAttribute("aria-label");
|
|
113
|
+
expect(main).not.toHaveAttribute("aria-busy");
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
/* THE CONTRACT THIS PATTERN COMPLETES (WCAG 2.4.1 / R-N.6). Until now the
|
|
117
|
+
* library shipped the link and prescribed the target without providing it,
|
|
118
|
+
* so this pairing was only ever exercised in module code. */
|
|
119
|
+
it("receives focus when the skip link is activated", () => {
|
|
120
|
+
(0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
121
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SkipLink.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppMain.default, {
|
|
122
|
+
children: "contenu"
|
|
123
|
+
})]
|
|
124
|
+
}));
|
|
125
|
+
|
|
126
|
+
/* fireEvent rather than user-event: the assertion is about SkipLink's own
|
|
127
|
+
click handler moving focus, and it keeps this suite free of a testing
|
|
128
|
+
dependency the repo may not carry. */
|
|
129
|
+
_react.fireEvent.click(_react.screen.getByRole("link"));
|
|
130
|
+
expect(_react.screen.getByRole("main")).toHaveFocus();
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
//# sourceMappingURL=AppMain.test.js.map
|