@portnet/ui 5.0.32 → 6.0.1
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 +524 -0
- package/README.md +101 -38
- package/dist/esm/index.js +196 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/v2/__tests__/FieldError.test.js +160 -0
- package/dist/esm/v2/__tests__/FieldError.test.js.map +1 -0
- package/dist/esm/v2/__tests__/FileCard.test.js +144 -0
- package/dist/esm/v2/__tests__/FileCard.test.js.map +1 -0
- package/dist/esm/v2/__tests__/MobileRowCard.test.js +333 -0
- package/dist/esm/v2/__tests__/MobileRowCard.test.js.map +1 -0
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js +235 -0
- package/dist/esm/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
- package/dist/esm/v2/__tests__/apiError.test.js +181 -0
- package/dist/esm/v2/__tests__/apiError.test.js.map +1 -0
- package/dist/esm/v2/__tests__/banned-patterns.test.js +270 -0
- package/dist/esm/v2/__tests__/banned-patterns.test.js.map +1 -0
- package/dist/esm/v2/__tests__/contrast-palette.test.js +224 -0
- package/dist/esm/v2/__tests__/contrast-palette.test.js.map +1 -0
- package/dist/esm/v2/__tests__/cssVariables.test.js +157 -0
- package/dist/esm/v2/__tests__/cssVariables.test.js.map +1 -0
- package/dist/esm/v2/__tests__/labels-merge.test.js +147 -0
- package/dist/esm/v2/__tests__/labels-merge.test.js.map +1 -0
- package/dist/esm/v2/__tests__/locale-fallback.test.js +109 -0
- package/dist/esm/v2/__tests__/locale-fallback.test.js.map +1 -0
- package/dist/esm/v2/__tests__/useFocusTrap.test.js +514 -0
- package/dist/esm/v2/__tests__/useFocusTrap.test.js.map +1 -0
- package/dist/esm/v2/components/Accordion.js +230 -0
- package/dist/esm/v2/components/Accordion.js.map +1 -0
- package/dist/esm/v2/components/ActionStrip.js +146 -0
- package/dist/esm/v2/components/ActionStrip.js.map +1 -0
- package/dist/esm/v2/components/Banner.js +254 -0
- package/dist/esm/v2/components/Banner.js.map +1 -0
- package/dist/esm/v2/components/Busy.js +97 -0
- package/dist/esm/v2/components/Busy.js.map +1 -0
- package/dist/esm/v2/components/Button.js +114 -0
- package/dist/esm/v2/components/Button.js.map +1 -0
- package/dist/esm/v2/components/CategoryTag.js +81 -0
- package/dist/esm/v2/components/CategoryTag.js.map +1 -0
- package/dist/esm/v2/components/Checkbox.js +124 -0
- package/dist/esm/v2/components/Checkbox.js.map +1 -0
- package/dist/esm/v2/components/Chip.js +124 -0
- package/dist/esm/v2/components/Chip.js.map +1 -0
- package/dist/esm/v2/components/Combobox.js +394 -0
- package/dist/esm/v2/components/Combobox.js.map +1 -0
- package/dist/esm/v2/components/CommandPalette.js +660 -0
- package/dist/esm/v2/components/CommandPalette.js.map +1 -0
- package/dist/esm/v2/components/ConfirmDialog.js +144 -0
- package/dist/esm/v2/components/ConfirmDialog.js.map +1 -0
- package/dist/esm/v2/components/DatePicker.js +200 -0
- package/dist/esm/v2/components/DatePicker.js.map +1 -0
- package/dist/esm/v2/components/DateRangePicker.js +289 -0
- package/dist/esm/v2/components/DateRangePicker.js.map +1 -0
- package/dist/esm/v2/components/DateTimePicker.js +182 -0
- package/dist/esm/v2/components/DateTimePicker.js.map +1 -0
- package/dist/esm/v2/components/Drawer.js +333 -0
- package/dist/esm/v2/components/Drawer.js.map +1 -0
- package/dist/esm/v2/components/Dropzone.js +540 -0
- package/dist/esm/v2/components/Dropzone.js.map +1 -0
- package/dist/esm/v2/components/EmptyState.js +102 -0
- package/dist/esm/v2/components/EmptyState.js.map +1 -0
- package/dist/esm/v2/components/FavoriteToggle.js +127 -0
- package/dist/esm/v2/components/FavoriteToggle.js.map +1 -0
- package/dist/esm/v2/components/Field.js +197 -0
- package/dist/esm/v2/components/Field.js.map +1 -0
- package/dist/esm/v2/components/FieldError.js +124 -0
- package/dist/esm/v2/components/FieldError.js.map +1 -0
- package/dist/esm/v2/components/FieldHelp.js +202 -0
- package/dist/esm/v2/components/FieldHelp.js.map +1 -0
- package/dist/esm/v2/components/FileCard.js +162 -0
- package/dist/esm/v2/components/FileCard.js.map +1 -0
- package/dist/esm/v2/components/FilterTab.js +138 -0
- package/dist/esm/v2/components/FilterTab.js.map +1 -0
- package/dist/esm/v2/components/ForbiddenPage.js +74 -0
- package/dist/esm/v2/components/ForbiddenPage.js.map +1 -0
- package/dist/esm/v2/components/FormGrid.js +179 -0
- package/dist/esm/v2/components/FormGrid.js.map +1 -0
- package/dist/esm/v2/components/FormikDisplay.js +118 -0
- package/dist/esm/v2/components/FormikDisplay.js.map +1 -0
- package/dist/esm/v2/components/Input.js +107 -0
- package/dist/esm/v2/components/Input.js.map +1 -0
- package/dist/esm/v2/components/KPICard.js +237 -0
- package/dist/esm/v2/components/KPICard.js.map +1 -0
- package/dist/esm/v2/components/KPIStrip.js +84 -0
- package/dist/esm/v2/components/KPIStrip.js.map +1 -0
- package/dist/esm/v2/components/KV.js +75 -0
- package/dist/esm/v2/components/KV.js.map +1 -0
- package/dist/esm/v2/components/KVGrid.js +74 -0
- package/dist/esm/v2/components/KVGrid.js.map +1 -0
- package/dist/esm/v2/components/Layout.js +284 -0
- package/dist/esm/v2/components/Layout.js.map +1 -0
- package/dist/esm/v2/components/MobileRowCard.js +314 -0
- package/dist/esm/v2/components/MobileRowCard.js.map +1 -0
- package/dist/esm/v2/components/Modal.js +276 -0
- package/dist/esm/v2/components/Modal.js.map +1 -0
- package/dist/esm/v2/components/NetworkErrorPage.js +78 -0
- package/dist/esm/v2/components/NetworkErrorPage.js.map +1 -0
- package/dist/esm/v2/components/NotFoundPage.js +58 -0
- package/dist/esm/v2/components/NotFoundPage.js.map +1 -0
- package/dist/esm/v2/components/NumberInput.js +309 -0
- package/dist/esm/v2/components/NumberInput.js.map +1 -0
- package/dist/esm/v2/components/OverflowMenu.js +184 -0
- package/dist/esm/v2/components/OverflowMenu.js.map +1 -0
- package/dist/esm/v2/components/PdfViewer.js +122 -0
- package/dist/esm/v2/components/PdfViewer.js.map +1 -0
- package/dist/esm/v2/components/ProgressBar.js +202 -0
- package/dist/esm/v2/components/ProgressBar.js.map +1 -0
- package/dist/esm/v2/components/Radio.js +228 -0
- package/dist/esm/v2/components/Radio.js.map +1 -0
- package/dist/esm/v2/components/SectionErrorBoundary.js +214 -0
- package/dist/esm/v2/components/SectionErrorBoundary.js.map +1 -0
- package/dist/esm/v2/components/SectionHeader.js +132 -0
- package/dist/esm/v2/components/SectionHeader.js.map +1 -0
- package/dist/esm/v2/components/Segmented.js +254 -0
- package/dist/esm/v2/components/Segmented.js.map +1 -0
- package/dist/esm/v2/components/Select.js +490 -0
- package/dist/esm/v2/components/Select.js.map +1 -0
- package/dist/esm/v2/components/ServerErrorPage.js +74 -0
- package/dist/esm/v2/components/ServerErrorPage.js.map +1 -0
- package/dist/esm/v2/components/Skeleton.js +269 -0
- package/dist/esm/v2/components/Skeleton.js.map +1 -0
- package/dist/esm/v2/components/SkipLink.js +49 -0
- package/dist/esm/v2/components/SkipLink.js.map +1 -0
- package/dist/esm/v2/components/Spinner.js +69 -0
- package/dist/esm/v2/components/Spinner.js.map +1 -0
- package/dist/esm/v2/components/Status.js +64 -0
- package/dist/esm/v2/components/Status.js.map +1 -0
- package/dist/esm/v2/components/Stepper.js +432 -0
- package/dist/esm/v2/components/Stepper.js.map +1 -0
- package/dist/esm/v2/components/Surface.js +159 -0
- package/dist/esm/v2/components/Surface.js.map +1 -0
- package/dist/esm/v2/components/Switch.js +128 -0
- package/dist/esm/v2/components/Switch.js.map +1 -0
- package/dist/esm/v2/components/Tabs.js +150 -0
- package/dist/esm/v2/components/Tabs.js.map +1 -0
- package/dist/esm/v2/components/TelInput.js +274 -0
- package/dist/esm/v2/components/TelInput.js.map +1 -0
- package/dist/esm/v2/components/Textarea.js +72 -0
- package/dist/esm/v2/components/Textarea.js.map +1 -0
- package/dist/esm/v2/components/TimePicker.js +134 -0
- package/dist/esm/v2/components/TimePicker.js.map +1 -0
- package/dist/esm/v2/components/Toast.js +376 -0
- package/dist/esm/v2/components/Toast.js.map +1 -0
- package/dist/esm/v2/components/Tooltip.js +161 -0
- package/dist/esm/v2/components/Tooltip.js.map +1 -0
- package/dist/esm/v2/components/_ErrorPageBody.js +85 -0
- package/dist/esm/v2/components/_ErrorPageBody.js.map +1 -0
- package/dist/esm/v2/components/_pickerShared.js +60 -0
- package/dist/esm/v2/components/_pickerShared.js.map +1 -0
- package/dist/esm/v2/components/index.js +244 -0
- package/dist/esm/v2/components/index.js.map +1 -0
- package/dist/esm/v2/hooks/index.js +10 -0
- package/dist/esm/v2/hooks/index.js.map +1 -0
- package/dist/esm/v2/hooks/useDelayedFlag.js +55 -0
- package/dist/esm/v2/hooks/useDelayedFlag.js.map +1 -0
- package/dist/esm/v2/hooks/useDensity.js +119 -0
- package/dist/esm/v2/hooks/useDensity.js.map +1 -0
- package/dist/esm/v2/hooks/useFocusFirstError.js +197 -0
- package/dist/esm/v2/hooks/useFocusFirstError.js.map +1 -0
- package/dist/esm/v2/hooks/useFocusTrap.js +202 -0
- package/dist/esm/v2/hooks/useFocusTrap.js.map +1 -0
- package/dist/esm/v2/hooks/useFormAutoSave.js +181 -0
- package/dist/esm/v2/hooks/useFormAutoSave.js.map +1 -0
- package/dist/esm/v2/hooks/useFormCompletionProgress.js +131 -0
- package/dist/esm/v2/hooks/useFormCompletionProgress.js.map +1 -0
- package/dist/esm/v2/hooks/useResolvedDensity.js +44 -0
- package/dist/esm/v2/hooks/useResolvedDensity.js.map +1 -0
- package/dist/esm/v2/hooks/useSortedRows.js +32 -0
- package/dist/esm/v2/hooks/useSortedRows.js.map +1 -0
- package/dist/esm/v2/hooks/useTabLoading.js +79 -0
- package/dist/esm/v2/hooks/useTabLoading.js.map +1 -0
- package/dist/esm/v2/index.js +121 -0
- package/dist/esm/v2/index.js.map +1 -0
- package/dist/esm/v2/modalContext.js +108 -0
- package/dist/esm/v2/modalContext.js.map +1 -0
- package/dist/esm/v2/models/favorite.js +2 -0
- package/dist/esm/v2/models/favorite.js.map +1 -0
- package/dist/esm/v2/models/index.js +12 -0
- package/dist/esm/v2/models/index.js.map +1 -0
- package/dist/esm/v2/models/personalization.js +2 -0
- package/dist/esm/v2/models/personalization.js.map +1 -0
- package/dist/esm/v2/models/referentiel.js +2 -0
- package/dist/esm/v2/models/referentiel.js.map +1 -0
- package/dist/esm/v2/models/savedFilter.js +2 -0
- package/dist/esm/v2/models/savedFilter.js.map +1 -0
- package/dist/esm/v2/patterns/ActionBar.js +603 -0
- package/dist/esm/v2/patterns/ActionBar.js.map +1 -0
- package/dist/esm/v2/patterns/BulkActionBar.js +147 -0
- package/dist/esm/v2/patterns/BulkActionBar.js.map +1 -0
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js +303 -0
- package/dist/esm/v2/patterns/CollapsibleDataGrid.js.map +1 -0
- package/dist/esm/v2/patterns/ColumnsToggle.js +301 -0
- package/dist/esm/v2/patterns/ColumnsToggle.js.map +1 -0
- package/dist/esm/v2/patterns/DataGrid.js +820 -0
- package/dist/esm/v2/patterns/DataGrid.js.map +1 -0
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js +375 -0
- package/dist/esm/v2/patterns/DataGridSettingsMenu.js.map +1 -0
- package/dist/esm/v2/patterns/DataGridToolbar.js +249 -0
- package/dist/esm/v2/patterns/DataGridToolbar.js.map +1 -0
- package/dist/esm/v2/patterns/DataGridVirtualized.js +523 -0
- package/dist/esm/v2/patterns/DataGridVirtualized.js.map +1 -0
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js +70 -0
- package/dist/esm/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
- package/dist/esm/v2/patterns/FavoriteColumn.js +164 -0
- package/dist/esm/v2/patterns/FavoriteColumn.js.map +1 -0
- package/dist/esm/v2/patterns/FavoritesFilter.js +91 -0
- package/dist/esm/v2/patterns/FavoritesFilter.js.map +1 -0
- package/dist/esm/v2/patterns/FormErrorSummary.js +101 -0
- package/dist/esm/v2/patterns/FormErrorSummary.js.map +1 -0
- package/dist/esm/v2/patterns/FormPageShell.js +126 -0
- package/dist/esm/v2/patterns/FormPageShell.js.map +1 -0
- package/dist/esm/v2/patterns/FormSection.js +190 -0
- package/dist/esm/v2/patterns/FormSection.js.map +1 -0
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js +110 -0
- package/dist/esm/v2/patterns/FormikCheckboxGroup.js.map +1 -0
- package/dist/esm/v2/patterns/FormikCombobox.js +115 -0
- package/dist/esm/v2/patterns/FormikCombobox.js.map +1 -0
- package/dist/esm/v2/patterns/FormikDatePicker.js +196 -0
- package/dist/esm/v2/patterns/FormikDatePicker.js.map +1 -0
- package/dist/esm/v2/patterns/FormikErrorFocus.js +77 -0
- package/dist/esm/v2/patterns/FormikErrorFocus.js.map +1 -0
- package/dist/esm/v2/patterns/FormikFile.js +148 -0
- package/dist/esm/v2/patterns/FormikFile.js.map +1 -0
- package/dist/esm/v2/patterns/FormikInput.js +127 -0
- package/dist/esm/v2/patterns/FormikInput.js.map +1 -0
- package/dist/esm/v2/patterns/FormikReferentielField.js +116 -0
- package/dist/esm/v2/patterns/FormikReferentielField.js.map +1 -0
- package/dist/esm/v2/patterns/FormikSelect.js +159 -0
- package/dist/esm/v2/patterns/FormikSelect.js.map +1 -0
- package/dist/esm/v2/patterns/FormikTextarea.js +76 -0
- package/dist/esm/v2/patterns/FormikTextarea.js.map +1 -0
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js +195 -0
- package/dist/esm/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
- package/dist/esm/v2/patterns/NetworkErrorBanner.js +72 -0
- package/dist/esm/v2/patterns/NetworkErrorBanner.js.map +1 -0
- package/dist/esm/v2/patterns/PageContent.js +62 -0
- package/dist/esm/v2/patterns/PageContent.js.map +1 -0
- package/dist/esm/v2/patterns/ReferentielField.js +615 -0
- package/dist/esm/v2/patterns/ReferentielField.js.map +1 -0
- package/dist/esm/v2/patterns/SaveFilterDialog.js +197 -0
- package/dist/esm/v2/patterns/SaveFilterDialog.js.map +1 -0
- package/dist/esm/v2/patterns/SavedFiltersMenu.js +406 -0
- package/dist/esm/v2/patterns/SavedFiltersMenu.js.map +1 -0
- package/dist/esm/v2/patterns/SkeletonPageShell.js +342 -0
- package/dist/esm/v2/patterns/SkeletonPageShell.js.map +1 -0
- package/dist/esm/v2/patterns/SortableHeader.js +179 -0
- package/dist/esm/v2/patterns/SortableHeader.js.map +1 -0
- package/dist/esm/v2/patterns/Tour.js +471 -0
- package/dist/esm/v2/patterns/Tour.js.map +1 -0
- package/dist/esm/v2/patterns/_dataGridShared.js +431 -0
- package/dist/esm/v2/patterns/_dataGridShared.js.map +1 -0
- package/dist/esm/v2/patterns/_sort.js +112 -0
- package/dist/esm/v2/patterns/_sort.js.map +1 -0
- package/dist/esm/v2/patterns/_useColumnReorder.js +257 -0
- package/dist/esm/v2/patterns/_useColumnReorder.js.map +1 -0
- package/dist/esm/v2/patterns/_useColumnResize.js +191 -0
- package/dist/esm/v2/patterns/_useColumnResize.js.map +1 -0
- package/dist/esm/v2/patterns/index.js +95 -0
- package/dist/esm/v2/patterns/index.js.map +1 -0
- package/dist/esm/v2/personalization/PersonalizationProvider.js +168 -0
- package/dist/esm/v2/personalization/PersonalizationProvider.js.map +1 -0
- package/dist/esm/v2/personalization/adapters/_storageKey.js +60 -0
- package/dist/esm/v2/personalization/adapters/_storageKey.js.map +1 -0
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js +124 -0
- package/dist/esm/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js +70 -0
- package/dist/esm/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
- package/dist/esm/v2/personalization/adapters/index.js +11 -0
- package/dist/esm/v2/personalization/adapters/index.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/favorites.js +216 -0
- package/dist/esm/v2/personalization/capabilities/favorites.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/favoritesView.js +111 -0
- package/dist/esm/v2/personalization/capabilities/favoritesView.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/index.js +17 -0
- package/dist/esm/v2/personalization/capabilities/index.js.map +1 -0
- package/dist/esm/v2/personalization/capabilities/savedFilters.js +291 -0
- package/dist/esm/v2/personalization/capabilities/savedFilters.js.map +1 -0
- package/dist/esm/v2/personalization/createPersonalizationStore.js +472 -0
- package/dist/esm/v2/personalization/createPersonalizationStore.js.map +1 -0
- package/dist/esm/v2/personalization/index.js +46 -0
- package/dist/esm/v2/personalization/index.js.map +1 -0
- package/dist/esm/v2/personalization/personalizationContext.js +108 -0
- package/dist/esm/v2/personalization/personalizationContext.js.map +1 -0
- package/dist/esm/v2/personalization/schema.js +92 -0
- package/dist/esm/v2/personalization/schema.js.map +1 -0
- package/dist/esm/v2/personalization/types.js +2 -0
- package/dist/esm/v2/personalization/types.js.map +1 -0
- package/dist/esm/v2/referentiel/ReferentielProvider.js +87 -0
- package/dist/esm/v2/referentiel/ReferentielProvider.js.map +1 -0
- package/dist/esm/v2/referentiel/index.js +15 -0
- package/dist/esm/v2/referentiel/index.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielClient.js +37 -0
- package/dist/esm/v2/referentiel/useReferentielClient.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielOptions.js +169 -0
- package/dist/esm/v2/referentiel/useReferentielOptions.js.map +1 -0
- package/dist/esm/v2/referentiel/useReferentielSearch.js +132 -0
- package/dist/esm/v2/referentiel/useReferentielSearch.js.map +1 -0
- package/dist/esm/v2/styles/base.css +425 -0
- package/dist/esm/v2/styles/css.d.ts +10 -0
- package/dist/esm/v2/styles/index.js +12 -0
- package/dist/esm/v2/styles/index.js.map +1 -0
- package/dist/esm/v2/theme/_brand.js +64 -0
- package/dist/esm/v2/theme/_brand.js.map +1 -0
- package/dist/esm/v2/theme/_brandSecondary.js +60 -0
- package/dist/esm/v2/theme/_brandSecondary.js.map +1 -0
- package/dist/esm/v2/theme/createPortnetTheme.js +548 -0
- package/dist/esm/v2/theme/createPortnetTheme.js.map +1 -0
- package/dist/esm/v2/theme/cssVariables.js +198 -0
- package/dist/esm/v2/theme/cssVariables.js.map +1 -0
- package/dist/esm/v2/theme/index.js +32 -0
- package/dist/esm/v2/theme/index.js.map +1 -0
- package/dist/esm/v2/tokens/breakpoints.js +106 -0
- package/dist/esm/v2/tokens/breakpoints.js.map +1 -0
- package/dist/esm/v2/tokens/colors.js +219 -0
- package/dist/esm/v2/tokens/colors.js.map +1 -0
- package/dist/esm/v2/tokens/density.js +98 -0
- package/dist/esm/v2/tokens/density.js.map +1 -0
- package/dist/esm/v2/tokens/index.js +80 -0
- package/dist/esm/v2/tokens/index.js.map +1 -0
- package/dist/esm/v2/tokens/motion.js +88 -0
- package/dist/esm/v2/tokens/motion.js.map +1 -0
- package/dist/esm/v2/tokens/radius.js +22 -0
- package/dist/esm/v2/tokens/radius.js.map +1 -0
- package/dist/esm/v2/tokens/shadows.js +40 -0
- package/dist/esm/v2/tokens/shadows.js.map +1 -0
- package/dist/esm/v2/tokens/spacing.js +51 -0
- package/dist/esm/v2/tokens/spacing.js.map +1 -0
- package/dist/esm/v2/tokens/state.js +41 -0
- package/dist/esm/v2/tokens/state.js.map +1 -0
- package/dist/esm/v2/tokens/statusPalette.js +66 -0
- package/dist/esm/v2/tokens/statusPalette.js.map +1 -0
- package/dist/esm/v2/tokens/tokens.json +153 -0
- package/dist/esm/v2/tokens/typography.js +149 -0
- package/dist/esm/v2/tokens/typography.js.map +1 -0
- package/dist/esm/v2/tokens/zIndex.js +44 -0
- package/dist/esm/v2/tokens/zIndex.js.map +1 -0
- package/dist/esm/v2/types/common.js +2 -0
- package/dist/esm/v2/types/common.js.map +1 -0
- package/dist/esm/v2/types/datagrid.js +2 -0
- package/dist/esm/v2/types/datagrid.js.map +1 -0
- package/dist/esm/v2/types/index.js +12 -0
- package/dist/esm/v2/types/index.js.map +1 -0
- package/dist/esm/v2/utils/apiError.js +281 -0
- package/dist/esm/v2/utils/apiError.js.map +1 -0
- package/dist/esm/v2/utils/contrast.js +157 -0
- package/dist/esm/v2/utils/contrast.js.map +1 -0
- package/dist/esm/v2/utils/cx.js +38 -0
- package/dist/esm/v2/utils/cx.js.map +1 -0
- package/dist/esm/v2/utils/fileDownload.js +226 -0
- package/dist/esm/v2/utils/fileDownload.js.map +1 -0
- package/dist/esm/v2/utils/fmtMoney.js +78 -0
- package/dist/esm/v2/utils/fmtMoney.js.map +1 -0
- package/dist/esm/v2/utils/index.js +43 -0
- package/dist/esm/v2/utils/index.js.map +1 -0
- package/dist/esm/v2/utils/mergeLabels.js +86 -0
- package/dist/esm/v2/utils/mergeLabels.js.map +1 -0
- package/dist/esm/v2/utils/networkStatus.js +114 -0
- package/dist/esm/v2/utils/networkStatus.js.map +1 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +183 -191
- package/dist/index.js.map +1 -0
- package/dist/v2/__tests__/FieldError.test.js +164 -0
- package/dist/v2/__tests__/FieldError.test.js.map +1 -0
- package/dist/v2/__tests__/FileCard.test.js +148 -0
- package/dist/v2/__tests__/FileCard.test.js.map +1 -0
- package/dist/v2/__tests__/MobileRowCard.test.js +337 -0
- package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -0
- package/dist/v2/__tests__/SectionErrorBoundary.test.js +237 -0
- package/dist/v2/__tests__/SectionErrorBoundary.test.js.map +1 -0
- package/dist/v2/__tests__/apiError.test.js +182 -0
- package/dist/v2/__tests__/apiError.test.js.map +1 -0
- package/dist/v2/__tests__/banned-patterns.test.js +272 -0
- package/dist/v2/__tests__/banned-patterns.test.js.map +1 -0
- package/dist/v2/__tests__/contrast-palette.test.js +225 -0
- package/dist/v2/__tests__/contrast-palette.test.js.map +1 -0
- package/dist/v2/__tests__/cssVariables.test.js +158 -0
- package/dist/v2/__tests__/cssVariables.test.js.map +1 -0
- package/dist/v2/__tests__/labels-merge.test.js +153 -0
- package/dist/v2/__tests__/labels-merge.test.js.map +1 -0
- package/dist/v2/__tests__/locale-fallback.test.js +111 -0
- package/dist/v2/__tests__/locale-fallback.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusTrap.test.js +517 -0
- package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -0
- package/dist/v2/components/Accordion.d.ts +56 -0
- package/dist/v2/components/Accordion.d.ts.map +1 -0
- package/dist/v2/components/Accordion.js +238 -0
- package/dist/v2/components/Accordion.js.map +1 -0
- package/dist/v2/components/ActionStrip.d.ts +67 -0
- package/dist/v2/components/ActionStrip.d.ts.map +1 -0
- package/dist/v2/components/ActionStrip.js +154 -0
- package/dist/v2/components/ActionStrip.js.map +1 -0
- package/dist/v2/components/Banner.d.ts +88 -0
- package/dist/v2/components/Banner.d.ts.map +1 -0
- package/dist/v2/components/Banner.js +264 -0
- package/dist/v2/components/Banner.js.map +1 -0
- package/dist/v2/components/Busy.d.ts +18 -0
- package/dist/v2/components/Busy.d.ts.map +1 -0
- package/dist/v2/components/Busy.js +104 -0
- package/dist/v2/components/Busy.js.map +1 -0
- package/dist/v2/components/Button.d.ts +36 -0
- package/dist/v2/components/Button.d.ts.map +1 -0
- package/dist/v2/components/Button.js +122 -0
- package/dist/v2/components/Button.js.map +1 -0
- package/dist/v2/components/CategoryTag.d.ts +45 -0
- package/dist/v2/components/CategoryTag.d.ts.map +1 -0
- package/dist/v2/components/CategoryTag.js +89 -0
- package/dist/v2/components/CategoryTag.js.map +1 -0
- package/dist/v2/components/Checkbox.d.ts +59 -0
- package/dist/v2/components/Checkbox.d.ts.map +1 -0
- package/dist/v2/components/Checkbox.js +134 -0
- package/dist/v2/components/Checkbox.js.map +1 -0
- package/dist/v2/components/Chip.d.ts +48 -0
- package/dist/v2/components/Chip.d.ts.map +1 -0
- package/dist/v2/components/Chip.js +132 -0
- package/dist/v2/components/Chip.js.map +1 -0
- package/dist/v2/components/Combobox.d.ts +134 -0
- package/dist/v2/components/Combobox.d.ts.map +1 -0
- package/dist/v2/components/Combobox.js +400 -0
- package/dist/v2/components/Combobox.js.map +1 -0
- package/dist/v2/components/CommandPalette.d.ts +36 -0
- package/dist/v2/components/CommandPalette.d.ts.map +1 -0
- package/dist/v2/components/CommandPalette.js +668 -0
- package/dist/v2/components/CommandPalette.js.map +1 -0
- package/dist/v2/components/ConfirmDialog.d.ts +23 -0
- package/dist/v2/components/ConfirmDialog.d.ts.map +1 -0
- package/dist/v2/components/ConfirmDialog.js +151 -0
- package/dist/v2/components/ConfirmDialog.js.map +1 -0
- package/dist/v2/components/DatePicker.d.ts +21 -0
- package/dist/v2/components/DatePicker.d.ts.map +1 -0
- package/dist/v2/components/DatePicker.js +207 -0
- package/dist/v2/components/DatePicker.js.map +1 -0
- package/dist/v2/components/DateRangePicker.d.ts +81 -0
- package/dist/v2/components/DateRangePicker.d.ts.map +1 -0
- package/dist/v2/components/DateRangePicker.js +296 -0
- package/dist/v2/components/DateRangePicker.js.map +1 -0
- package/dist/v2/components/DateTimePicker.d.ts +21 -0
- package/dist/v2/components/DateTimePicker.d.ts.map +1 -0
- package/dist/v2/components/DateTimePicker.js +189 -0
- package/dist/v2/components/DateTimePicker.js.map +1 -0
- package/dist/v2/components/Drawer.d.ts +34 -0
- package/dist/v2/components/Drawer.d.ts.map +1 -0
- package/dist/v2/components/Drawer.js +340 -0
- package/dist/v2/components/Drawer.js.map +1 -0
- package/dist/v2/components/Dropzone.d.ts +150 -0
- package/dist/v2/components/Dropzone.d.ts.map +1 -0
- package/dist/v2/components/Dropzone.js +547 -0
- package/dist/v2/components/Dropzone.js.map +1 -0
- package/dist/v2/components/EmptyState.d.ts +36 -0
- package/dist/v2/components/EmptyState.d.ts.map +1 -0
- package/dist/v2/components/EmptyState.js +112 -0
- package/dist/v2/components/EmptyState.js.map +1 -0
- package/dist/v2/components/FavoriteToggle.d.ts +22 -0
- package/dist/v2/components/FavoriteToggle.d.ts.map +1 -0
- package/dist/v2/components/FavoriteToggle.js +135 -0
- package/dist/v2/components/FavoriteToggle.js.map +1 -0
- package/dist/v2/components/Field.d.ts +63 -0
- package/dist/v2/components/Field.d.ts.map +1 -0
- package/dist/v2/components/Field.js +204 -0
- package/dist/v2/components/Field.js.map +1 -0
- package/dist/v2/components/FieldError.d.ts +78 -0
- package/dist/v2/components/FieldError.d.ts.map +1 -0
- package/dist/v2/components/FieldError.js +131 -0
- package/dist/v2/components/FieldError.js.map +1 -0
- package/dist/v2/components/FieldHelp.d.ts +54 -0
- package/dist/v2/components/FieldHelp.d.ts.map +1 -0
- package/dist/v2/components/FieldHelp.js +209 -0
- package/dist/v2/components/FieldHelp.js.map +1 -0
- package/dist/v2/components/FileCard.d.ts +75 -0
- package/dist/v2/components/FileCard.d.ts.map +1 -0
- package/dist/v2/components/FileCard.js +169 -0
- package/dist/v2/components/FileCard.js.map +1 -0
- package/dist/v2/components/FilterTab.d.ts +35 -0
- package/dist/v2/components/FilterTab.d.ts.map +1 -0
- package/dist/v2/components/FilterTab.js +145 -0
- package/dist/v2/components/FilterTab.js.map +1 -0
- package/dist/v2/components/ForbiddenPage.d.ts +40 -0
- package/dist/v2/components/ForbiddenPage.d.ts.map +1 -0
- package/dist/v2/components/ForbiddenPage.js +81 -0
- package/dist/v2/components/ForbiddenPage.js.map +1 -0
- package/dist/v2/components/FormGrid.d.ts +81 -0
- package/dist/v2/components/FormGrid.d.ts.map +1 -0
- package/dist/v2/components/FormGrid.js +187 -0
- package/dist/v2/components/FormGrid.js.map +1 -0
- package/dist/v2/components/FormikDisplay.d.ts +38 -0
- package/dist/v2/components/FormikDisplay.d.ts.map +1 -0
- package/dist/v2/components/FormikDisplay.js +125 -0
- package/dist/v2/components/FormikDisplay.js.map +1 -0
- package/dist/v2/components/Input.d.ts +62 -0
- package/dist/v2/components/Input.d.ts.map +1 -0
- package/dist/v2/components/Input.js +115 -0
- package/dist/v2/components/Input.js.map +1 -0
- package/dist/v2/components/KPICard.d.ts +52 -0
- package/dist/v2/components/KPICard.d.ts.map +1 -0
- package/dist/v2/components/KPICard.js +244 -0
- package/dist/v2/components/KPICard.js.map +1 -0
- package/dist/v2/components/KPIStrip.d.ts +68 -0
- package/dist/v2/components/KPIStrip.d.ts.map +1 -0
- package/dist/v2/components/KPIStrip.js +92 -0
- package/dist/v2/components/KPIStrip.js.map +1 -0
- package/dist/v2/components/KV.d.ts +25 -0
- package/dist/v2/components/KV.d.ts.map +1 -0
- package/dist/v2/components/KV.js +82 -0
- package/dist/v2/components/KV.js.map +1 -0
- package/dist/v2/components/KVGrid.d.ts +44 -0
- package/dist/v2/components/KVGrid.d.ts.map +1 -0
- package/dist/v2/components/KVGrid.js +80 -0
- package/dist/v2/components/KVGrid.js.map +1 -0
- package/dist/v2/components/Layout.d.ts +78 -0
- package/dist/v2/components/Layout.d.ts.map +1 -0
- package/dist/v2/components/Layout.js +284 -0
- package/dist/v2/components/Layout.js.map +1 -0
- package/dist/v2/components/MobileRowCard.d.ts +63 -0
- package/dist/v2/components/MobileRowCard.d.ts.map +1 -0
- package/dist/v2/components/MobileRowCard.js +321 -0
- package/dist/v2/components/MobileRowCard.js.map +1 -0
- package/dist/v2/components/Modal.d.ts +21 -0
- package/dist/v2/components/Modal.d.ts.map +1 -0
- package/dist/v2/components/Modal.js +281 -0
- package/dist/v2/components/Modal.js.map +1 -0
- package/dist/v2/components/NetworkErrorPage.d.ts +11 -0
- package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -0
- package/dist/v2/components/NetworkErrorPage.js +86 -0
- package/dist/v2/components/NetworkErrorPage.js.map +1 -0
- package/dist/v2/components/NotFoundPage.d.ts +9 -0
- package/dist/v2/components/NotFoundPage.d.ts.map +1 -0
- package/dist/v2/components/NotFoundPage.js +66 -0
- package/dist/v2/components/NotFoundPage.js.map +1 -0
- package/dist/v2/components/NumberInput.d.ts +83 -0
- package/dist/v2/components/NumberInput.d.ts.map +1 -0
- package/dist/v2/components/NumberInput.js +317 -0
- package/dist/v2/components/NumberInput.js.map +1 -0
- package/dist/v2/components/OverflowMenu.d.ts +55 -0
- package/dist/v2/components/OverflowMenu.d.ts.map +1 -0
- package/dist/v2/components/OverflowMenu.js +192 -0
- package/dist/v2/components/OverflowMenu.js.map +1 -0
- package/dist/v2/components/PdfViewer.d.ts +56 -0
- package/dist/v2/components/PdfViewer.d.ts.map +1 -0
- package/dist/v2/components/PdfViewer.js +132 -0
- package/dist/v2/components/PdfViewer.js.map +1 -0
- package/dist/v2/components/ProgressBar.d.ts +53 -0
- package/dist/v2/components/ProgressBar.d.ts.map +1 -0
- package/dist/v2/components/ProgressBar.js +209 -0
- package/dist/v2/components/ProgressBar.js.map +1 -0
- package/dist/v2/components/Radio.d.ts +78 -0
- package/dist/v2/components/Radio.d.ts.map +1 -0
- package/dist/v2/components/Radio.js +238 -0
- package/dist/v2/components/Radio.js.map +1 -0
- package/dist/v2/components/SectionErrorBoundary.d.ts +89 -0
- package/dist/v2/components/SectionErrorBoundary.d.ts.map +1 -0
- package/dist/v2/components/SectionErrorBoundary.js +221 -0
- package/dist/v2/components/SectionErrorBoundary.js.map +1 -0
- package/dist/v2/components/SectionHeader.d.ts +53 -0
- package/dist/v2/components/SectionHeader.d.ts.map +1 -0
- package/dist/v2/components/SectionHeader.js +140 -0
- package/dist/v2/components/SectionHeader.js.map +1 -0
- package/dist/v2/components/Segmented.d.ts +61 -0
- package/dist/v2/components/Segmented.d.ts.map +1 -0
- package/dist/v2/components/Segmented.js +261 -0
- package/dist/v2/components/Segmented.js.map +1 -0
- package/dist/v2/components/Select.d.ts +90 -0
- package/dist/v2/components/Select.d.ts.map +1 -0
- package/dist/v2/components/Select.js +499 -0
- package/dist/v2/components/Select.js.map +1 -0
- package/dist/v2/components/ServerErrorPage.d.ts +11 -0
- package/dist/v2/components/ServerErrorPage.d.ts.map +1 -0
- package/dist/v2/components/ServerErrorPage.js +82 -0
- package/dist/v2/components/ServerErrorPage.js.map +1 -0
- package/dist/v2/components/Skeleton.d.ts +56 -0
- package/dist/v2/components/Skeleton.d.ts.map +1 -0
- package/dist/v2/components/Skeleton.js +281 -0
- package/dist/v2/components/Skeleton.js.map +1 -0
- package/dist/v2/components/SkipLink.d.ts +30 -0
- package/dist/v2/components/SkipLink.d.ts.map +1 -0
- package/dist/v2/components/SkipLink.js +58 -0
- package/dist/v2/components/SkipLink.js.map +1 -0
- package/dist/v2/components/Spinner.d.ts +40 -0
- package/dist/v2/components/Spinner.d.ts.map +1 -0
- package/dist/v2/components/Spinner.js +76 -0
- package/dist/v2/components/Spinner.js.map +1 -0
- package/dist/v2/components/Status.d.ts +42 -0
- package/dist/v2/components/Status.d.ts.map +1 -0
- package/dist/v2/components/Status.js +71 -0
- package/dist/v2/components/Status.js.map +1 -0
- package/dist/v2/components/Stepper.d.ts +142 -0
- package/dist/v2/components/Stepper.d.ts.map +1 -0
- package/dist/v2/components/Stepper.js +441 -0
- package/dist/v2/components/Stepper.js.map +1 -0
- package/dist/v2/components/Surface.d.ts +94 -0
- package/dist/v2/components/Surface.d.ts.map +1 -0
- package/dist/v2/components/Surface.js +163 -0
- package/dist/v2/components/Surface.js.map +1 -0
- package/dist/v2/components/Switch.d.ts +30 -0
- package/dist/v2/components/Switch.d.ts.map +1 -0
- package/dist/v2/components/Switch.js +136 -0
- package/dist/v2/components/Switch.js.map +1 -0
- package/dist/v2/components/Tabs.d.ts +49 -0
- package/dist/v2/components/Tabs.d.ts.map +1 -0
- package/dist/v2/components/Tabs.js +160 -0
- package/dist/v2/components/Tabs.js.map +1 -0
- package/dist/v2/components/TelInput.d.ts +33 -0
- package/dist/v2/components/TelInput.d.ts.map +1 -0
- package/dist/v2/components/TelInput.js +282 -0
- package/dist/v2/components/TelInput.js.map +1 -0
- package/dist/v2/components/Textarea.d.ts +23 -0
- package/dist/v2/components/Textarea.d.ts.map +1 -0
- package/dist/v2/components/Textarea.js +80 -0
- package/dist/v2/components/Textarea.js.map +1 -0
- package/dist/v2/components/TimePicker.d.ts +21 -0
- package/dist/v2/components/TimePicker.d.ts.map +1 -0
- package/dist/v2/components/TimePicker.js +141 -0
- package/dist/v2/components/TimePicker.js.map +1 -0
- package/dist/v2/components/Toast.d.ts +32 -0
- package/dist/v2/components/Toast.d.ts.map +1 -0
- package/dist/v2/components/Toast.js +385 -0
- package/dist/v2/components/Toast.js.map +1 -0
- package/dist/v2/components/Tooltip.d.ts +9 -0
- package/dist/v2/components/Tooltip.d.ts.map +1 -0
- package/dist/v2/components/Tooltip.js +169 -0
- package/dist/v2/components/Tooltip.js.map +1 -0
- package/dist/v2/components/_ErrorPageBody.d.ts +48 -0
- package/dist/v2/components/_ErrorPageBody.d.ts.map +1 -0
- package/dist/v2/components/_ErrorPageBody.js +96 -0
- package/dist/v2/components/_ErrorPageBody.js.map +1 -0
- package/dist/v2/components/_pickerShared.d.ts +47 -0
- package/dist/v2/components/_pickerShared.d.ts.map +1 -0
- package/dist/v2/components/_pickerShared.js +68 -0
- package/dist/v2/components/_pickerShared.js.map +1 -0
- package/dist/v2/components/index.d.ts +226 -0
- package/dist/v2/components/index.d.ts.map +1 -0
- package/dist/v2/components/index.js +512 -0
- package/dist/v2/components/index.js.map +1 -0
- package/dist/v2/hooks/index.d.ts +11 -0
- package/dist/v2/hooks/index.d.ts.map +1 -0
- package/dist/v2/hooks/index.js +85 -0
- package/dist/v2/hooks/index.js.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.d.ts +22 -0
- package/dist/v2/hooks/useDelayedFlag.d.ts.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.js +60 -0
- package/dist/v2/hooks/useDelayedFlag.js.map +1 -0
- package/dist/v2/hooks/useDensity.d.ts +23 -0
- package/dist/v2/hooks/useDensity.d.ts.map +1 -0
- package/dist/v2/hooks/useDensity.js +124 -0
- package/dist/v2/hooks/useDensity.js.map +1 -0
- package/dist/v2/hooks/useFocusFirstError.d.ts +121 -0
- package/dist/v2/hooks/useFocusFirstError.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusFirstError.js +203 -0
- package/dist/v2/hooks/useFocusFirstError.js.map +1 -0
- package/dist/v2/hooks/useFocusTrap.d.ts +3 -0
- package/dist/v2/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusTrap.js +207 -0
- package/dist/v2/hooks/useFocusTrap.js.map +1 -0
- package/dist/v2/hooks/useFormAutoSave.d.ts +42 -0
- package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -0
- package/dist/v2/hooks/useFormAutoSave.js +186 -0
- package/dist/v2/hooks/useFormAutoSave.js.map +1 -0
- package/dist/v2/hooks/useFormCompletionProgress.d.ts +52 -0
- package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -0
- package/dist/v2/hooks/useFormCompletionProgress.js +136 -0
- package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.d.ts +31 -0
- package/dist/v2/hooks/useResolvedDensity.d.ts.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.js +50 -0
- package/dist/v2/hooks/useResolvedDensity.js.map +1 -0
- package/dist/v2/hooks/useSortedRows.d.ts +25 -0
- package/dist/v2/hooks/useSortedRows.d.ts.map +1 -0
- package/dist/v2/hooks/useSortedRows.js +38 -0
- package/dist/v2/hooks/useSortedRows.js.map +1 -0
- package/dist/v2/hooks/useTabLoading.d.ts +39 -0
- package/dist/v2/hooks/useTabLoading.d.ts.map +1 -0
- package/dist/v2/hooks/useTabLoading.js +85 -0
- package/dist/v2/hooks/useTabLoading.js.map +1 -0
- package/dist/v2/index.d.ts +115 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +1127 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/modalContext.d.ts +96 -0
- package/dist/v2/modalContext.d.ts.map +1 -0
- package/dist/v2/modalContext.js +113 -0
- package/dist/v2/modalContext.js.map +1 -0
- package/dist/v2/models/favorite.d.ts +14 -0
- package/dist/v2/models/favorite.d.ts.map +1 -0
- package/dist/v2/models/favorite.js +6 -0
- package/dist/v2/models/favorite.js.map +1 -0
- package/dist/v2/models/index.d.ts +11 -0
- package/dist/v2/models/index.d.ts.map +1 -0
- package/dist/v2/models/index.js +50 -0
- package/dist/v2/models/index.js.map +1 -0
- package/dist/v2/models/personalization.d.ts +65 -0
- package/dist/v2/models/personalization.d.ts.map +1 -0
- package/dist/v2/models/personalization.js +6 -0
- package/dist/v2/models/personalization.js.map +1 -0
- package/dist/v2/models/referentiel.d.ts +67 -0
- package/dist/v2/models/referentiel.d.ts.map +1 -0
- package/dist/v2/models/referentiel.js +6 -0
- package/dist/v2/models/referentiel.js.map +1 -0
- package/dist/v2/models/savedFilter.d.ts +22 -0
- package/dist/v2/models/savedFilter.d.ts.map +1 -0
- package/dist/v2/models/savedFilter.js +6 -0
- package/dist/v2/models/savedFilter.js.map +1 -0
- package/dist/v2/patterns/ActionBar.d.ts +137 -0
- package/dist/v2/patterns/ActionBar.d.ts.map +1 -0
- package/dist/v2/patterns/ActionBar.js +602 -0
- package/dist/v2/patterns/ActionBar.js.map +1 -0
- package/dist/v2/patterns/BulkActionBar.d.ts +63 -0
- package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -0
- package/dist/v2/patterns/BulkActionBar.js +154 -0
- package/dist/v2/patterns/BulkActionBar.js.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.d.ts +62 -0
- package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js +306 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -0
- package/dist/v2/patterns/ColumnsToggle.d.ts +55 -0
- package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -0
- package/dist/v2/patterns/ColumnsToggle.js +310 -0
- package/dist/v2/patterns/ColumnsToggle.js.map +1 -0
- package/dist/v2/patterns/DataGrid.d.ts +7 -0
- package/dist/v2/patterns/DataGrid.d.ts.map +1 -0
- package/dist/v2/patterns/DataGrid.js +834 -0
- package/dist/v2/patterns/DataGrid.js.map +1 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts +68 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridSettingsMenu.js +382 -0
- package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -0
- package/dist/v2/patterns/DataGridToolbar.d.ts +81 -0
- package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridToolbar.js +256 -0
- package/dist/v2/patterns/DataGridToolbar.js.map +1 -0
- package/dist/v2/patterns/DataGridVirtualized.d.ts +76 -0
- package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridVirtualized.js +528 -0
- package/dist/v2/patterns/DataGridVirtualized.js.map +1 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +46 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js +77 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.d.ts +72 -0
- package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.js +171 -0
- package/dist/v2/patterns/FavoriteColumn.js.map +1 -0
- package/dist/v2/patterns/FavoritesFilter.d.ts +51 -0
- package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -0
- package/dist/v2/patterns/FavoritesFilter.js +98 -0
- package/dist/v2/patterns/FavoritesFilter.js.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.d.ts +39 -0
- package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.js +111 -0
- package/dist/v2/patterns/FormErrorSummary.js.map +1 -0
- package/dist/v2/patterns/FormPageShell.d.ts +55 -0
- package/dist/v2/patterns/FormPageShell.d.ts.map +1 -0
- package/dist/v2/patterns/FormPageShell.js +133 -0
- package/dist/v2/patterns/FormPageShell.js.map +1 -0
- package/dist/v2/patterns/FormSection.d.ts +64 -0
- package/dist/v2/patterns/FormSection.d.ts.map +1 -0
- package/dist/v2/patterns/FormSection.js +197 -0
- package/dist/v2/patterns/FormSection.js.map +1 -0
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts +51 -0
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -0
- package/dist/v2/patterns/FormikCheckboxGroup.js +117 -0
- package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -0
- package/dist/v2/patterns/FormikCombobox.d.ts +43 -0
- package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -0
- package/dist/v2/patterns/FormikCombobox.js +121 -0
- package/dist/v2/patterns/FormikCombobox.js.map +1 -0
- package/dist/v2/patterns/FormikDatePicker.d.ts +115 -0
- package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -0
- package/dist/v2/patterns/FormikDatePicker.js +203 -0
- package/dist/v2/patterns/FormikDatePicker.js.map +1 -0
- package/dist/v2/patterns/FormikErrorFocus.d.ts +59 -0
- package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -0
- package/dist/v2/patterns/FormikErrorFocus.js +83 -0
- package/dist/v2/patterns/FormikErrorFocus.js.map +1 -0
- package/dist/v2/patterns/FormikFile.d.ts +43 -0
- package/dist/v2/patterns/FormikFile.d.ts.map +1 -0
- package/dist/v2/patterns/FormikFile.js +156 -0
- package/dist/v2/patterns/FormikFile.js.map +1 -0
- package/dist/v2/patterns/FormikInput.d.ts +72 -0
- package/dist/v2/patterns/FormikInput.d.ts.map +1 -0
- package/dist/v2/patterns/FormikInput.js +135 -0
- package/dist/v2/patterns/FormikInput.js.map +1 -0
- package/dist/v2/patterns/FormikReferentielField.d.ts +33 -0
- package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -0
- package/dist/v2/patterns/FormikReferentielField.js +124 -0
- package/dist/v2/patterns/FormikReferentielField.js.map +1 -0
- package/dist/v2/patterns/FormikSelect.d.ts +61 -0
- package/dist/v2/patterns/FormikSelect.d.ts.map +1 -0
- package/dist/v2/patterns/FormikSelect.js +165 -0
- package/dist/v2/patterns/FormikSelect.js.map +1 -0
- package/dist/v2/patterns/FormikTextarea.d.ts +31 -0
- package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -0
- package/dist/v2/patterns/FormikTextarea.js +84 -0
- package/dist/v2/patterns/FormikTextarea.js.map +1 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +44 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.js +203 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
- package/dist/v2/patterns/NetworkErrorBanner.d.ts +26 -0
- package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -0
- package/dist/v2/patterns/NetworkErrorBanner.js +82 -0
- package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -0
- package/dist/v2/patterns/PageContent.d.ts +40 -0
- package/dist/v2/patterns/PageContent.d.ts.map +1 -0
- package/dist/v2/patterns/PageContent.js +69 -0
- package/dist/v2/patterns/PageContent.js.map +1 -0
- package/dist/v2/patterns/ReferentielField.d.ts +118 -0
- package/dist/v2/patterns/ReferentielField.d.ts.map +1 -0
- package/dist/v2/patterns/ReferentielField.js +618 -0
- package/dist/v2/patterns/ReferentielField.js.map +1 -0
- package/dist/v2/patterns/SaveFilterDialog.d.ts +68 -0
- package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -0
- package/dist/v2/patterns/SaveFilterDialog.js +204 -0
- package/dist/v2/patterns/SaveFilterDialog.js.map +1 -0
- package/dist/v2/patterns/SavedFiltersMenu.d.ts +74 -0
- package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -0
- package/dist/v2/patterns/SavedFiltersMenu.js +413 -0
- package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -0
- package/dist/v2/patterns/SkeletonPageShell.d.ts +76 -0
- package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -0
- package/dist/v2/patterns/SkeletonPageShell.js +347 -0
- package/dist/v2/patterns/SkeletonPageShell.js.map +1 -0
- package/dist/v2/patterns/SortableHeader.d.ts +47 -0
- package/dist/v2/patterns/SortableHeader.d.ts.map +1 -0
- package/dist/v2/patterns/SortableHeader.js +193 -0
- package/dist/v2/patterns/SortableHeader.js.map +1 -0
- package/dist/v2/patterns/Tour.d.ts +55 -0
- package/dist/v2/patterns/Tour.d.ts.map +1 -0
- package/dist/v2/patterns/Tour.js +474 -0
- package/dist/v2/patterns/Tour.js.map +1 -0
- package/dist/v2/patterns/_dataGridShared.d.ts +144 -0
- package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -0
- package/dist/v2/patterns/_dataGridShared.js +440 -0
- package/dist/v2/patterns/_dataGridShared.js.map +1 -0
- package/dist/v2/patterns/_sort.d.ts +22 -0
- package/dist/v2/patterns/_sort.d.ts.map +1 -0
- package/dist/v2/patterns/_sort.js +118 -0
- package/dist/v2/patterns/_sort.js.map +1 -0
- package/dist/v2/patterns/_useColumnReorder.d.ts +69 -0
- package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -0
- package/dist/v2/patterns/_useColumnReorder.js +264 -0
- package/dist/v2/patterns/_useColumnReorder.js.map +1 -0
- package/dist/v2/patterns/_useColumnResize.d.ts +49 -0
- package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -0
- package/dist/v2/patterns/_useColumnResize.js +198 -0
- package/dist/v2/patterns/_useColumnResize.js.map +1 -0
- package/dist/v2/patterns/index.d.ts +89 -0
- package/dist/v2/patterns/index.d.ts.map +1 -0
- package/dist/v2/patterns/index.js +246 -0
- package/dist/v2/patterns/index.js.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts +80 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.js +177 -0
- package/dist/v2/personalization/PersonalizationProvider.js.map +1 -0
- package/dist/v2/personalization/adapters/_storageKey.d.ts +35 -0
- package/dist/v2/personalization/adapters/_storageKey.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/_storageKey.js +69 -0
- package/dist/v2/personalization/adapters/_storageKey.js.map +1 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +31 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +128 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +25 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.js +76 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
- package/dist/v2/personalization/adapters/index.d.ts +10 -0
- package/dist/v2/personalization/adapters/index.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/index.js +21 -0
- package/dist/v2/personalization/adapters/index.js.map +1 -0
- package/dist/v2/personalization/capabilities/favorites.d.ts +53 -0
- package/dist/v2/personalization/capabilities/favorites.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/favorites.js +223 -0
- package/dist/v2/personalization/capabilities/favorites.js.map +1 -0
- package/dist/v2/personalization/capabilities/favoritesView.d.ts +58 -0
- package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/favoritesView.js +121 -0
- package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -0
- package/dist/v2/personalization/capabilities/index.d.ts +16 -0
- package/dist/v2/personalization/capabilities/index.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/index.js +69 -0
- package/dist/v2/personalization/capabilities/index.js.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.d.ts +61 -0
- package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.js +297 -0
- package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -0
- package/dist/v2/personalization/createPersonalizationStore.d.ts +76 -0
- package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -0
- package/dist/v2/personalization/createPersonalizationStore.js +475 -0
- package/dist/v2/personalization/createPersonalizationStore.js.map +1 -0
- package/dist/v2/personalization/index.d.ts +33 -0
- package/dist/v2/personalization/index.d.ts.map +1 -0
- package/dist/v2/personalization/index.js +111 -0
- package/dist/v2/personalization/index.js.map +1 -0
- package/dist/v2/personalization/personalizationContext.d.ts +78 -0
- package/dist/v2/personalization/personalizationContext.d.ts.map +1 -0
- package/dist/v2/personalization/personalizationContext.js +121 -0
- package/dist/v2/personalization/personalizationContext.js.map +1 -0
- package/dist/v2/personalization/schema.d.ts +60 -0
- package/dist/v2/personalization/schema.d.ts.map +1 -0
- package/dist/v2/personalization/schema.js +102 -0
- package/dist/v2/personalization/schema.js.map +1 -0
- package/dist/v2/personalization/types.d.ts +81 -0
- package/dist/v2/personalization/types.d.ts.map +1 -0
- package/dist/v2/personalization/types.js +6 -0
- package/dist/v2/personalization/types.js.map +1 -0
- package/dist/v2/referentiel/ReferentielProvider.d.ts +53 -0
- package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -0
- package/dist/v2/referentiel/ReferentielProvider.js +94 -0
- package/dist/v2/referentiel/ReferentielProvider.js.map +1 -0
- package/dist/v2/referentiel/index.d.ts +18 -0
- package/dist/v2/referentiel/index.d.ts.map +1 -0
- package/dist/v2/referentiel/index.js +44 -0
- package/dist/v2/referentiel/index.js.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.d.ts +15 -0
- package/dist/v2/referentiel/useReferentielClient.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.js +46 -0
- package/dist/v2/referentiel/useReferentielClient.js.map +1 -0
- package/dist/v2/referentiel/useReferentielOptions.d.ts +40 -0
- package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielOptions.js +177 -0
- package/dist/v2/referentiel/useReferentielOptions.js.map +1 -0
- package/dist/v2/referentiel/useReferentielSearch.d.ts +76 -0
- package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielSearch.js +140 -0
- package/dist/v2/referentiel/useReferentielSearch.js.map +1 -0
- package/dist/v2/styles/base.css +425 -0
- package/dist/v2/styles/css.d.ts +10 -0
- package/dist/v2/styles/index.d.ts +12 -0
- package/dist/v2/styles/index.d.ts.map +1 -0
- package/dist/v2/styles/index.js +4 -0
- package/dist/v2/styles/index.js.map +1 -0
- package/dist/v2/theme/_brand.d.ts +29 -0
- package/dist/v2/theme/_brand.d.ts.map +1 -0
- package/dist/v2/theme/_brand.js +69 -0
- package/dist/v2/theme/_brand.js.map +1 -0
- package/dist/v2/theme/_brandSecondary.d.ts +26 -0
- package/dist/v2/theme/_brandSecondary.d.ts.map +1 -0
- package/dist/v2/theme/_brandSecondary.js +65 -0
- package/dist/v2/theme/_brandSecondary.js.map +1 -0
- package/dist/v2/theme/createPortnetTheme.d.ts +75 -0
- package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -0
- package/dist/v2/theme/createPortnetTheme.js +553 -0
- package/dist/v2/theme/createPortnetTheme.js.map +1 -0
- package/dist/v2/theme/cssVariables.d.ts +41 -0
- package/dist/v2/theme/cssVariables.d.ts.map +1 -0
- package/dist/v2/theme/cssVariables.js +205 -0
- package/dist/v2/theme/cssVariables.js.map +1 -0
- package/dist/v2/theme/index.d.ts +33 -0
- package/dist/v2/theme/index.d.ts.map +1 -0
- package/dist/v2/theme/index.js +60 -0
- package/dist/v2/theme/index.js.map +1 -0
- package/dist/v2/tokens/breakpoints.d.ts +74 -0
- package/dist/v2/tokens/breakpoints.d.ts.map +1 -0
- package/dist/v2/tokens/breakpoints.js +114 -0
- package/dist/v2/tokens/breakpoints.js.map +1 -0
- package/dist/v2/tokens/colors.d.ts +228 -0
- package/dist/v2/tokens/colors.d.ts.map +1 -0
- package/dist/v2/tokens/colors.js +225 -0
- package/dist/v2/tokens/colors.js.map +1 -0
- package/dist/v2/tokens/density.d.ts +142 -0
- package/dist/v2/tokens/density.d.ts.map +1 -0
- package/dist/v2/tokens/density.js +111 -0
- package/dist/v2/tokens/density.js.map +1 -0
- package/dist/v2/tokens/index.d.ts +556 -0
- package/dist/v2/tokens/index.d.ts.map +1 -0
- package/dist/v2/tokens/index.js +313 -0
- package/dist/v2/tokens/index.js.map +1 -0
- package/dist/v2/tokens/motion.d.ts +85 -0
- package/dist/v2/tokens/motion.d.ts.map +1 -0
- package/dist/v2/tokens/motion.js +94 -0
- package/dist/v2/tokens/motion.js.map +1 -0
- package/dist/v2/tokens/radius.d.ts +18 -0
- package/dist/v2/tokens/radius.d.ts.map +1 -0
- package/dist/v2/tokens/radius.js +28 -0
- package/dist/v2/tokens/radius.js.map +1 -0
- package/dist/v2/tokens/shadows.d.ts +25 -0
- package/dist/v2/tokens/shadows.d.ts.map +1 -0
- package/dist/v2/tokens/shadows.js +46 -0
- package/dist/v2/tokens/shadows.js.map +1 -0
- package/dist/v2/tokens/spacing.d.ts +38 -0
- package/dist/v2/tokens/spacing.d.ts.map +1 -0
- package/dist/v2/tokens/spacing.js +57 -0
- package/dist/v2/tokens/spacing.js.map +1 -0
- package/dist/v2/tokens/state.d.ts +40 -0
- package/dist/v2/tokens/state.d.ts.map +1 -0
- package/dist/v2/tokens/state.js +47 -0
- package/dist/v2/tokens/state.js.map +1 -0
- package/dist/v2/tokens/statusPalette.d.ts +54 -0
- package/dist/v2/tokens/statusPalette.d.ts.map +1 -0
- package/dist/v2/tokens/statusPalette.js +72 -0
- package/dist/v2/tokens/statusPalette.js.map +1 -0
- package/dist/v2/tokens/tokens.json +153 -0
- package/dist/v2/tokens/typography.d.ts +206 -0
- package/dist/v2/tokens/typography.d.ts.map +1 -0
- package/dist/v2/tokens/typography.js +155 -0
- package/dist/v2/tokens/typography.js.map +1 -0
- package/dist/v2/tokens/zIndex.d.ts +33 -0
- package/dist/v2/tokens/zIndex.d.ts.map +1 -0
- package/dist/v2/tokens/zIndex.js +50 -0
- package/dist/v2/tokens/zIndex.js.map +1 -0
- package/dist/v2/types/common.d.ts +24 -0
- package/dist/v2/types/common.d.ts.map +1 -0
- package/dist/v2/types/common.js +6 -0
- package/dist/v2/types/common.js.map +1 -0
- package/dist/v2/types/datagrid.d.ts +131 -0
- package/dist/v2/types/datagrid.d.ts.map +1 -0
- package/dist/v2/types/datagrid.js +6 -0
- package/dist/v2/types/datagrid.js.map +1 -0
- package/dist/v2/types/index.d.ts +11 -0
- package/dist/v2/types/index.d.ts.map +1 -0
- package/dist/v2/types/index.js +28 -0
- package/dist/v2/types/index.js.map +1 -0
- package/dist/v2/utils/apiError.d.ts +151 -0
- package/dist/v2/utils/apiError.d.ts.map +1 -0
- package/dist/v2/utils/apiError.js +290 -0
- package/dist/v2/utils/apiError.js.map +1 -0
- package/dist/v2/utils/contrast.d.ts +68 -0
- package/dist/v2/utils/contrast.d.ts.map +1 -0
- package/dist/v2/utils/contrast.js +167 -0
- package/dist/v2/utils/contrast.js.map +1 -0
- package/dist/v2/utils/cx.d.ts +9 -0
- package/dist/v2/utils/cx.d.ts.map +1 -0
- package/dist/v2/utils/cx.js +45 -0
- package/dist/v2/utils/cx.js.map +1 -0
- package/dist/v2/utils/fileDownload.d.ts +94 -0
- package/dist/v2/utils/fileDownload.d.ts.map +1 -0
- package/dist/v2/utils/fileDownload.js +236 -0
- package/dist/v2/utils/fileDownload.js.map +1 -0
- package/dist/v2/utils/fmtMoney.d.ts +28 -0
- package/dist/v2/utils/fmtMoney.d.ts.map +1 -0
- package/dist/v2/utils/fmtMoney.js +84 -0
- package/dist/v2/utils/fmtMoney.js.map +1 -0
- package/dist/v2/utils/index.d.ts +9 -0
- package/dist/v2/utils/index.d.ts.map +1 -0
- package/dist/v2/utils/index.js +97 -0
- package/dist/v2/utils/index.js.map +1 -0
- package/dist/v2/utils/mergeLabels.d.ts +59 -0
- package/dist/v2/utils/mergeLabels.d.ts.map +1 -0
- package/dist/v2/utils/mergeLabels.js +93 -0
- package/dist/v2/utils/mergeLabels.js.map +1 -0
- package/dist/v2/utils/networkStatus.d.ts +88 -0
- package/dist/v2/utils/networkStatus.d.ts.map +1 -0
- package/dist/v2/utils/networkStatus.js +121 -0
- package/dist/v2/utils/networkStatus.js.map +1 -0
- package/package.json +198 -76
- package/dist/api/guideApi.js +0 -12
- package/dist/api/guideImageService.js +0 -119
- package/dist/api/reclamationApi.js +0 -119
- package/dist/assets/guides/FAQ.json +0 -118
- package/dist/assets/guides/index.js +0 -11
- package/dist/assets/images/tijariaLogo.ico +0 -0
- package/dist/components/buttons/PuiButton.js +0 -217
- package/dist/components/buttons/PuiIconButton.js +0 -98
- package/dist/components/common/PuiAlertContext.js +0 -12
- package/dist/components/common/PuiHelpWidgetContext.js +0 -17
- package/dist/components/common/StyledMuiButton.js +0 -48
- package/dist/components/common/StyledMuiTextField.js +0 -180
- package/dist/components/inputs/PuiAutocomplete.js +0 -352
- package/dist/components/inputs/PuiCheckbox.js +0 -308
- package/dist/components/inputs/PuiCheckboxGroup.js +0 -215
- package/dist/components/inputs/PuiCheckboxItem.js +0 -162
- package/dist/components/inputs/PuiDateField.js +0 -280
- package/dist/components/inputs/PuiDateTimeField.js +0 -276
- package/dist/components/inputs/PuiFileField.js +0 -265
- package/dist/components/inputs/PuiRadioGroup.js +0 -197
- package/dist/components/inputs/PuiRadioItem.js +0 -100
- package/dist/components/inputs/PuiSelect.js +0 -427
- package/dist/components/inputs/PuiTextField.js +0 -263
- package/dist/components/others/PuiBadge.js +0 -58
- package/dist/components/others/PuiChip.js +0 -150
- package/dist/components/others/PuiDialog.js +0 -102
- package/dist/components/others/PuiFormikForm.js +0 -70
- package/dist/components/others/PuiGrid.js +0 -23
- package/dist/components/others/PuiIcon.js +0 -92
- package/dist/components/others/PuiLoadingBackdrop.js +0 -32
- package/dist/components/others/PuiMainContainer.js +0 -41
- package/dist/components/others/PuiNavigation.js +0 -68
- package/dist/components/others/PuiSection.js +0 -187
- package/dist/components/others/PuiTooltip.js +0 -86
- package/dist/components/providers/PuiAlertProvider.js +0 -134
- package/dist/components/providers/PuiHelpWidgetProvider.js +0 -91
- package/dist/components/providers/PuiLocalizationProvider.js +0 -34
- package/dist/components/referentiel/common/ReferetielContext.js +0 -12
- package/dist/components/referentiel/common/constants/specificReferentielsApis.js +0 -22
- package/dist/components/referentiel/common/constants/specificReferentielsBaseColumns.js +0 -691
- package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +0 -598
- package/dist/components/referentiel/common/constants/specificReferentielsInitialValues.js +0 -80
- package/dist/components/referentiel/common/constants/specificReferentielsKeys.js +0 -18
- package/dist/components/referentiel/common/constants/specificReferentielsTitles.js +0 -22
- package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +0 -85
- package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +0 -356
- package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +0 -181
- package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +0 -325
- package/dist/components/referentiel/components/PuiSimpleReferentielField.js +0 -203
- package/dist/components/referentiel/components/PuiSpecificReferentielField.js +0 -352
- package/dist/components/referentiel/providers/PuiReferentielProvider.js +0 -66
- package/dist/components/tab/PuiTab.js +0 -25
- package/dist/components/tab/PuiTabs.js +0 -148
- package/dist/components/table/PuiTable.js +0 -643
- package/dist/components/table/PuiTableAction.js +0 -75
- package/dist/components/typography/PuiDefinition.js +0 -42
- package/dist/components/typography/PuiIndication.js +0 -80
- package/dist/components/typography/PuiMainTitle.js +0 -144
- package/dist/components/ui/dialogs/PuiSearchDialog.js +0 -106
- package/dist/components/ui/pages/errors/PuiErrorBasePage.js +0 -73
- package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +0 -36
- package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +0 -36
- package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +0 -30
- package/dist/components/ui/pages/errors/PuiServerErrorPage.js +0 -37
- package/dist/components/ui/pages/general/PuiDefaultPage.js +0 -68
- package/dist/components/ui/pages/general/PuiSearchPage.js +0 -203
- package/dist/components/widgets/GuideImage.js +0 -251
- package/dist/components/widgets/PuiHelpWidget.js +0 -4276
- package/dist/config/apperance.js +0 -26
- package/dist/config/mapping.js +0 -26
- package/dist/config/referentiel.js +0 -10
- package/dist/general/yupValidationErrors.js +0 -8
- package/dist/hooks/useAlert.js +0 -19
- package/dist/hooks/useAxios.js +0 -23
- package/dist/hooks/useQuery.js +0 -21
- package/dist/hooks/useReclamation.js +0 -116
- package/dist/styles/ReclamationFormModal.css +0 -629
- package/dist/styles/help-widget.css +0 -621
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
require("@testing-library/jest-dom");
|
|
5
|
+
var React = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _react2 = require("@testing-library/react");
|
|
7
|
+
var _FieldError = _interopRequireDefault(require("../components/FieldError"));
|
|
8
|
+
var _Field = _interopRequireDefault(require("../components/Field"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
/**
|
|
14
|
+
* FieldError — contract tests, including its integration into Field.
|
|
15
|
+
*
|
|
16
|
+
* WHY THIS FILE EXISTS
|
|
17
|
+
* --------------------
|
|
18
|
+
* §10.3 R-G.6 MUST. But the real reason is narrower and worth stating: the
|
|
19
|
+
* contract this component carries is INVISIBLE. `Field` supplies an id, and that
|
|
20
|
+
* id must reach the control's `aria-describedby` so a screen reader announces
|
|
21
|
+
* the error when focus lands on the input. Break that wiring and NOTHING
|
|
22
|
+
* changes: same pixels, same screenshot, same visual review — only a blind user
|
|
23
|
+
* silently stops being told why their submit failed. There is no way to catch
|
|
24
|
+
* that except by asserting it.
|
|
25
|
+
*
|
|
26
|
+
* The assertions below use `toHaveAccessibleDescription`, not id comparisons, on
|
|
27
|
+
* purpose. It resolves aria-describedby to the text a screen reader would
|
|
28
|
+
* actually announce, so the test states the USER-FACING outcome and stays true
|
|
29
|
+
* if the id-generation scheme ever changes.
|
|
30
|
+
*
|
|
31
|
+
* NOT COVERED — deliberately
|
|
32
|
+
* R-4.1's visual half ("sous le champ, en rouge, avec icône") and the
|
|
33
|
+
* first-line icon alignment on a wrapping message are layout and colour. jsdom
|
|
34
|
+
* resolves neither CSS variables nor flexbox, so asserting them here would pass
|
|
35
|
+
* while the message rendered black and centred. Those live in
|
|
36
|
+
* FieldError.stories.tsx.
|
|
37
|
+
*/describe("FieldError — standalone", function () {
|
|
38
|
+
test("announces itself as an alert carrying the message", function () {
|
|
39
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FieldError["default"], {
|
|
40
|
+
children: "Ajoutez au moins un article avant de soumettre."
|
|
41
|
+
}));
|
|
42
|
+
expect(_react2.screen.getByRole("alert")).toHaveTextContent("Ajoutez au moins un article avant de soumettre.");
|
|
43
|
+
});
|
|
44
|
+
test("forwards id so a host can wire its own aria-describedby", function () {
|
|
45
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FieldError["default"], {
|
|
46
|
+
id: "articles-error",
|
|
47
|
+
children: "Ajoutez au moins un article."
|
|
48
|
+
}));
|
|
49
|
+
expect(_react2.screen.getByRole("alert")).toHaveAttribute("id", "articles-error");
|
|
50
|
+
});
|
|
51
|
+
test("omits id when none is supplied", function () {
|
|
52
|
+
/* The list-level case usually has nothing to bind to. Emitting an empty or
|
|
53
|
+
* generated id would create a describedby target nobody references. */
|
|
54
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FieldError["default"], {
|
|
55
|
+
children: "Ajoutez au moins un article."
|
|
56
|
+
}));
|
|
57
|
+
expect(_react2.screen.getByRole("alert")).not.toHaveAttribute("id");
|
|
58
|
+
});
|
|
59
|
+
test("the icon is hidden from assistive tech", function () {
|
|
60
|
+
/* R-Ar.2 — the message IS the announcement; an announced glyph would double
|
|
61
|
+
* it. No semantic query reaches a role-less, name-less element, hence the
|
|
62
|
+
* testid the component exposes for exactly this assertion. */
|
|
63
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FieldError["default"], {
|
|
64
|
+
children: "Message"
|
|
65
|
+
}));
|
|
66
|
+
expect(_react2.screen.getByTestId("fielderror-icon")).toHaveAttribute("aria-hidden", "true");
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
describe("FieldError — inside Field (the wiring that has no visual tell)", function () {
|
|
70
|
+
test("the error becomes the control's accessible description", function () {
|
|
71
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
72
|
+
label: "Num\xE9ro de titre",
|
|
73
|
+
error: "Le num\xE9ro est invalide. Format : AAAA-IM-NNNNN.",
|
|
74
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {})
|
|
75
|
+
}));
|
|
76
|
+
expect(_react2.screen.getByRole("textbox")).toHaveAccessibleDescription("Le numéro est invalide. Format : AAAA-IM-NNNNN.");
|
|
77
|
+
});
|
|
78
|
+
test("the control is marked invalid", function () {
|
|
79
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
80
|
+
label: "Num\xE9ro",
|
|
81
|
+
error: "Invalide.",
|
|
82
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {})
|
|
83
|
+
}));
|
|
84
|
+
// jest-dom's toBeInvalid reads aria-invalid — R-I.3.
|
|
85
|
+
expect(_react2.screen.getByRole("textbox")).toBeInvalid();
|
|
86
|
+
});
|
|
87
|
+
test("a host-supplied aria-describedby is PRESERVED, not replaced", function () {
|
|
88
|
+
/* The merge is the fragile part. Overwriting instead of merging silently
|
|
89
|
+
* drops a consumer's external help text, and again nothing visual changes.
|
|
90
|
+
* Asserted with two order-independent regexes rather than one exact string,
|
|
91
|
+
* so the test does not encode which fragment Field puts first. */
|
|
92
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
94
|
+
id: "host-help",
|
|
95
|
+
children: "Format attendu : AAAA-IM-NNNNN."
|
|
96
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
97
|
+
label: "Num\xE9ro",
|
|
98
|
+
error: "Le num\xE9ro est incomplet.",
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
100
|
+
"aria-describedby": "host-help"
|
|
101
|
+
})
|
|
102
|
+
})]
|
|
103
|
+
}));
|
|
104
|
+
var input = _react2.screen.getByRole("textbox");
|
|
105
|
+
expect(input).toHaveAccessibleDescription(/Format attendu/);
|
|
106
|
+
expect(input).toHaveAccessibleDescription(/incomplet/);
|
|
107
|
+
});
|
|
108
|
+
test("the hint is suppressed while an error is shown", function () {
|
|
109
|
+
/* Two competing descriptions under one field is worse than one. The hint
|
|
110
|
+
* returns once the error clears — verified by the rerender below. */
|
|
111
|
+
var _render = (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
112
|
+
label: "Num\xE9ro",
|
|
113
|
+
hint: "Format : AAAA-IM-NNNNN",
|
|
114
|
+
error: "Le num\xE9ro est incomplet.",
|
|
115
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {})
|
|
116
|
+
})),
|
|
117
|
+
rerender = _render.rerender;
|
|
118
|
+
expect(_react2.screen.getByRole("alert")).toHaveTextContent("Le numéro est incomplet.");
|
|
119
|
+
expect(_react2.screen.queryByText("Format : AAAA-IM-NNNNN")).not.toBeInTheDocument();
|
|
120
|
+
rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
121
|
+
label: "Num\xE9ro",
|
|
122
|
+
hint: "Format : AAAA-IM-NNNNN",
|
|
123
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {})
|
|
124
|
+
}));
|
|
125
|
+
expect(_react2.screen.getByText("Format : AAAA-IM-NNNNN")).toBeInTheDocument();
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
describe("FieldError — live-region mounting contract", function () {
|
|
129
|
+
test("no alert exists until an error appears", function () {
|
|
130
|
+
/* THE contract. `role=\"alert\"` announces on INSERTION: an element mounted
|
|
131
|
+
* permanently with empty content announces nothing when it later fills, so
|
|
132
|
+
* a well-meaning refactor that always renders the container — to \"avoid
|
|
133
|
+
* layout shift\", say — silently kills the announcement while every pixel
|
|
134
|
+
* and every screenshot stays identical. */
|
|
135
|
+
var _render2 = (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
136
|
+
label: "Num\xE9ro",
|
|
137
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {})
|
|
138
|
+
})),
|
|
139
|
+
rerender = _render2.rerender;
|
|
140
|
+
expect(_react2.screen.queryByRole("alert")).not.toBeInTheDocument();
|
|
141
|
+
rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
142
|
+
label: "Num\xE9ro",
|
|
143
|
+
error: "Le num\xE9ro est incomplet.",
|
|
144
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {})
|
|
145
|
+
}));
|
|
146
|
+
expect(_react2.screen.getByRole("alert")).toBeInTheDocument();
|
|
147
|
+
});
|
|
148
|
+
test("the alert unmounts when the error clears", function () {
|
|
149
|
+
var _render3 = (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
150
|
+
label: "Num\xE9ro",
|
|
151
|
+
error: "Le num\xE9ro est incomplet.",
|
|
152
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {})
|
|
153
|
+
})),
|
|
154
|
+
rerender = _render3.rerender;
|
|
155
|
+
expect(_react2.screen.getByRole("alert")).toBeInTheDocument();
|
|
156
|
+
rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_Field["default"], {
|
|
157
|
+
label: "Num\xE9ro",
|
|
158
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {})
|
|
159
|
+
}));
|
|
160
|
+
expect(_react2.screen.queryByRole("alert")).not.toBeInTheDocument();
|
|
161
|
+
expect(_react2.screen.getByRole("textbox")).not.toBeInvalid();
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
//# sourceMappingURL=FieldError.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldError.test.js","names":["require","React","_interopRequireWildcard","_react2","_FieldError","_interopRequireDefault","_Field","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","describe","test","render","jsx","children","expect","screen","getByRole","toHaveTextContent","id","toHaveAttribute","not","getByTestId","label","error","toHaveAccessibleDescription","toBeInvalid","jsxs","Fragment","input","_render","hint","rerender","queryByText","toBeInTheDocument","getByText","_render2","queryByRole","_render3"],"sources":["../../../src/lib/v2/__tests__/FieldError.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport * as React from \"react\";\r\nimport { render, screen } from \"@testing-library/react\";\r\nimport FieldError from \"../components/FieldError\";\r\nimport Field from \"../components/Field\";\r\n\r\n/**\r\n * FieldError — contract tests, including its integration into Field.\r\n *\r\n * WHY THIS FILE EXISTS\r\n * --------------------\r\n * §10.3 R-G.6 MUST. But the real reason is narrower and worth stating: the\r\n * contract this component carries is INVISIBLE. `Field` supplies an id, and that\r\n * id must reach the control's `aria-describedby` so a screen reader announces\r\n * the error when focus lands on the input. Break that wiring and NOTHING\r\n * changes: same pixels, same screenshot, same visual review — only a blind user\r\n * silently stops being told why their submit failed. There is no way to catch\r\n * that except by asserting it.\r\n *\r\n * The assertions below use `toHaveAccessibleDescription`, not id comparisons, on\r\n * purpose. It resolves aria-describedby to the text a screen reader would\r\n * actually announce, so the test states the USER-FACING outcome and stays true\r\n * if the id-generation scheme ever changes.\r\n *\r\n * NOT COVERED — deliberately\r\n * R-4.1's visual half (\"sous le champ, en rouge, avec icône\") and the\r\n * first-line icon alignment on a wrapping message are layout and colour. jsdom\r\n * resolves neither CSS variables nor flexbox, so asserting them here would pass\r\n * while the message rendered black and centred. Those live in\r\n * FieldError.stories.tsx.\r\n */\r\ndescribe(\"FieldError — standalone\", () => {\r\n test(\"announces itself as an alert carrying the message\", () => {\r\n render(<FieldError>Ajoutez au moins un article avant de soumettre.</FieldError>);\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\r\n \"Ajoutez au moins un article avant de soumettre.\"\r\n );\r\n });\r\n\r\n test(\"forwards id so a host can wire its own aria-describedby\", () => {\r\n render(<FieldError id=\"articles-error\">Ajoutez au moins un article.</FieldError>);\r\n expect(screen.getByRole(\"alert\")).toHaveAttribute(\"id\", \"articles-error\");\r\n });\r\n\r\n test(\"omits id when none is supplied\", () => {\r\n /* The list-level case usually has nothing to bind to. Emitting an empty or\r\n * generated id would create a describedby target nobody references. */\r\n render(<FieldError>Ajoutez au moins un article.</FieldError>);\r\n expect(screen.getByRole(\"alert\")).not.toHaveAttribute(\"id\");\r\n });\r\n\r\n test(\"the icon is hidden from assistive tech\", () => {\r\n /* R-Ar.2 — the message IS the announcement; an announced glyph would double\r\n * it. No semantic query reaches a role-less, name-less element, hence the\r\n * testid the component exposes for exactly this assertion. */\r\n render(<FieldError>Message</FieldError>);\r\n expect(screen.getByTestId(\"fielderror-icon\")).toHaveAttribute(\"aria-hidden\", \"true\");\r\n });\r\n});\r\n\r\ndescribe(\"FieldError — inside Field (the wiring that has no visual tell)\", () => {\r\n test(\"the error becomes the control's accessible description\", () => {\r\n render(\r\n <Field label=\"Numéro de titre\" error=\"Le numéro est invalide. Format : AAAA-IM-NNNNN.\">\r\n <input />\r\n </Field>\r\n );\r\n\r\n expect(screen.getByRole(\"textbox\")).toHaveAccessibleDescription(\r\n \"Le numéro est invalide. Format : AAAA-IM-NNNNN.\"\r\n );\r\n });\r\n\r\n test(\"the control is marked invalid\", () => {\r\n render(\r\n <Field label=\"Numéro\" error=\"Invalide.\">\r\n <input />\r\n </Field>\r\n );\r\n // jest-dom's toBeInvalid reads aria-invalid — R-I.3.\r\n expect(screen.getByRole(\"textbox\")).toBeInvalid();\r\n });\r\n\r\n test(\"a host-supplied aria-describedby is PRESERVED, not replaced\", () => {\r\n /* The merge is the fragile part. Overwriting instead of merging silently\r\n * drops a consumer's external help text, and again nothing visual changes.\r\n * Asserted with two order-independent regexes rather than one exact string,\r\n * so the test does not encode which fragment Field puts first. */\r\n render(\r\n <>\r\n <span id=\"host-help\">Format attendu : AAAA-IM-NNNNN.</span>\r\n <Field label=\"Numéro\" error=\"Le numéro est incomplet.\">\r\n <input aria-describedby=\"host-help\" />\r\n </Field>\r\n </>\r\n );\r\n\r\n const input = screen.getByRole(\"textbox\");\r\n expect(input).toHaveAccessibleDescription(/Format attendu/);\r\n expect(input).toHaveAccessibleDescription(/incomplet/);\r\n });\r\n\r\n test(\"the hint is suppressed while an error is shown\", () => {\r\n /* Two competing descriptions under one field is worse than one. The hint\r\n * returns once the error clears — verified by the rerender below. */\r\n const { rerender } = render(\r\n <Field label=\"Numéro\" hint=\"Format : AAAA-IM-NNNNN\" error=\"Le numéro est incomplet.\">\r\n <input />\r\n </Field>\r\n );\r\n\r\n expect(screen.getByRole(\"alert\")).toHaveTextContent(\"Le numéro est incomplet.\");\r\n expect(screen.queryByText(\"Format : AAAA-IM-NNNNN\")).not.toBeInTheDocument();\r\n\r\n rerender(\r\n <Field label=\"Numéro\" hint=\"Format : AAAA-IM-NNNNN\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.getByText(\"Format : AAAA-IM-NNNNN\")).toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"FieldError — live-region mounting contract\", () => {\r\n test(\"no alert exists until an error appears\", () => {\r\n /* THE contract. `role=\\\"alert\\\"` announces on INSERTION: an element mounted\r\n * permanently with empty content announces nothing when it later fills, so\r\n * a well-meaning refactor that always renders the container — to \\\"avoid\r\n * layout shift\\\", say — silently kills the announcement while every pixel\r\n * and every screenshot stays identical. */\r\n const { rerender } = render(\r\n <Field label=\"Numéro\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n\r\n rerender(\r\n <Field label=\"Numéro\" error=\"Le numéro est incomplet.\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"the alert unmounts when the error clears\", () => {\r\n const { rerender } = render(\r\n <Field label=\"Numéro\" error=\"Le numéro est incomplet.\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.getByRole(\"alert\")).toBeInTheDocument();\r\n\r\n rerender(\r\n <Field label=\"Numéro\">\r\n <input />\r\n </Field>\r\n );\r\n expect(screen.queryByRole(\"alert\")).not.toBeInTheDocument();\r\n expect(screen.getByRole(\"textbox\")).not.toBeInvalid();\r\n });\r\n});\r\n"],"mappings":";;;AAAAA,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,MAAA,GAAAD,sBAAA,CAAAL,OAAA;AAAwC,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAK,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAM,GAAA,EAAAG,WAAA,SAAAA,WAAA,IAAAH,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAO,OAAA,CAAAP,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAQ,KAAA,GAAAN,wBAAA,CAAAC,WAAA,OAAAK,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBA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B,CAAC,CAAC;EACvD,CAAC,CAAC;EAEFvB,IAAI,CAAC,0CAA0C,EAAE,YAAM;IACrD,IAAA2B,QAAA,GAAqB,IAAA1B,cAAM,eACzB,IAAAzB,WAAA,CAAA0B,GAAA,EAAC3B,MAAA,WAAK;QAACqC,KAAK,EAAC,WAAQ;QAACC,KAAK,EAAC,6BAA0B;QAAAV,QAAA,eACpD,IAAA3B,WAAA,CAAA0B,GAAA,aAAQ;MAAC,CACJ,CACT,CAAC;MAJOmB,QAAQ,GAAAM,QAAA,CAARN,QAAQ;IAKhBjB,MAAM,CAACC,cAAM,CAACC,SAAS,CAAC,OAAO,CAAC,CAAC,CAACiB,iBAAiB,CAAC,CAAC;IAErDF,QAAQ,cACN,IAAA7C,WAAA,CAAA0B,GAAA,EAAC3B,MAAA,WAAK;MAACqC,KAAK,EAAC,WAAQ;MAAAT,QAAA,eACnB,IAAA3B,WAAA,CAAA0B,GAAA,aAAQ;IAAC,CACJ,CACT,CAAC;IACDE,MAAM,CAACC,cAAM,CAACqB,WAAW,CAAC,OAAO,CAAC,CAAC,CAAChB,GAAG,CAACa,iBAAiB,CAAC,CAAC;IAC3DnB,MAAM,CAACC,cAAM,CAACC,SAAS,CAAC,SAAS,CAAC,CAAC,CAACI,GAAG,CAACK,WAAW,CAAC,CAAC;EACvD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
require("@testing-library/jest-dom");
|
|
5
|
+
var React = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _react2 = require("@testing-library/react");
|
|
7
|
+
var _FileCard = _interopRequireDefault(require("../components/FileCard"));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
+
/**
|
|
13
|
+
* FileCard — contract tests.
|
|
14
|
+
*
|
|
15
|
+
* WHY THIS FILE EXISTS
|
|
16
|
+
* --------------------
|
|
17
|
+
* §10.3 R-G.6 MUST — "Snapshot Storybook + tests Jest/Testing-Library". The
|
|
18
|
+
* component was extracted from THREE hand-written copies found in addpe-fe
|
|
19
|
+
* (Attachment, AutorisationPreviewDrawer, AutorisationDetail), which had drifted
|
|
20
|
+
* to three different paddings for one concept. Consolidating them means a single
|
|
21
|
+
* change now moves every attachment row in the fleet, so the contracts below are
|
|
22
|
+
* the ones that must not move silently.
|
|
23
|
+
*
|
|
24
|
+
* NOT COVERED — deliberately
|
|
25
|
+
* The width negotiation is the most fragile part of this component and it is
|
|
26
|
+
* NOT tested here: `text-overflow: ellipsis`, `minWidth: 0` on the identity
|
|
27
|
+
* block and `flexShrink: 0` on the action cluster are LAYOUT, and jsdom computes
|
|
28
|
+
* no layout. A test asserting them would pass while the card is broken on a
|
|
29
|
+
* phone — worse than no coverage, because it would look like coverage. That
|
|
30
|
+
* contract lives in FileCard.stories.tsx ("Long filename"), which is where a
|
|
31
|
+
* browser can actually check it. Same reasoning as MobileRowCard.test.tsx
|
|
32
|
+
* records for R-G.3.
|
|
33
|
+
*/describe("FileCard — identity", function () {
|
|
34
|
+
test("renders the filename and mirrors it into title for the truncated case", function () {
|
|
35
|
+
var name = "autorisation-de-depot-prealable-a-l-exportation-2025-IM-0042-revision-finale.pdf";
|
|
36
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
37
|
+
name: name
|
|
38
|
+
}));
|
|
39
|
+
|
|
40
|
+
/* The title attribute is the ONLY reason `name` is typed `string` rather
|
|
41
|
+
* than ReactNode: once the CSS ellipsis hides the tail, the attribute is
|
|
42
|
+
* what keeps the full filename reachable. Losing it is invisible in every
|
|
43
|
+
* screenshot and only hurts the user with the long filename. */
|
|
44
|
+
expect(_react2.screen.getByText(name)).toHaveAttribute("title", name);
|
|
45
|
+
});
|
|
46
|
+
test("renders the meta line when supplied", function () {
|
|
47
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
48
|
+
name: "facture.pdf",
|
|
49
|
+
meta: "1,24 Mo"
|
|
50
|
+
}));
|
|
51
|
+
expect(_react2.screen.getByText("1,24 Mo")).toBeInTheDocument();
|
|
52
|
+
});
|
|
53
|
+
test("omits the meta line entirely when absent or empty", function () {
|
|
54
|
+
/* Not rendered rather than rendered blank: an empty second line reads as
|
|
55
|
+
* missing data, and it changes the row height, which breaks the alignment
|
|
56
|
+
* of a list of files. Both `undefined` and `""` are covered because a host
|
|
57
|
+
* formatting a byte count from an optional field produces either.
|
|
58
|
+
*
|
|
59
|
+
* Queried by testid, not by walking parentElement: "absent, not empty"
|
|
60
|
+
* cannot be expressed as a text query, and the repo's eslint config forbids
|
|
61
|
+
* direct node access — correctly, since a structural child count would also
|
|
62
|
+
* break the moment the component gains an unrelated third line. */
|
|
63
|
+
var _render = (0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
64
|
+
name: "a.pdf"
|
|
65
|
+
})),
|
|
66
|
+
rerender = _render.rerender;
|
|
67
|
+
expect(_react2.screen.getByText("a.pdf")).toBeInTheDocument();
|
|
68
|
+
expect(_react2.screen.queryByTestId("filecard-meta")).not.toBeInTheDocument();
|
|
69
|
+
rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
70
|
+
name: "a.pdf",
|
|
71
|
+
meta: ""
|
|
72
|
+
}));
|
|
73
|
+
expect(_react2.screen.queryByTestId("filecard-meta")).not.toBeInTheDocument();
|
|
74
|
+
rerender(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
75
|
+
name: "a.pdf",
|
|
76
|
+
meta: "248 Ko"
|
|
77
|
+
}));
|
|
78
|
+
expect(_react2.screen.getByTestId("filecard-meta")).toHaveTextContent("248 Ko");
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
describe("FileCard — actions slot", function () {
|
|
82
|
+
test("renders host-supplied actions", function () {
|
|
83
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
84
|
+
name: "a.pdf",
|
|
85
|
+
actions: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
children: "T\xE9l\xE9charger"
|
|
88
|
+
})
|
|
89
|
+
}));
|
|
90
|
+
expect(_react2.screen.getByRole("button", {
|
|
91
|
+
name: "Télécharger"
|
|
92
|
+
})).toBeInTheDocument();
|
|
93
|
+
});
|
|
94
|
+
test("renders no action cluster when actions is absent", function () {
|
|
95
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
96
|
+
name: "a.pdf"
|
|
97
|
+
}));
|
|
98
|
+
expect(_react2.screen.queryByRole("button")).not.toBeInTheDocument();
|
|
99
|
+
});
|
|
100
|
+
test("does not invent any action of its own", function () {
|
|
101
|
+
/* Regression guard on the component's SCOPE, not its rendering. FileCard is
|
|
102
|
+
* presentational: a download link, a delete confirmation and a blob URL all
|
|
103
|
+
* belong to the host. If a future change adds a built-in button, this fails
|
|
104
|
+
* — which is the intent. */
|
|
105
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
106
|
+
name: "a.pdf",
|
|
107
|
+
meta: "1 Ko"
|
|
108
|
+
}));
|
|
109
|
+
expect(_react2.screen.queryByRole("button")).not.toBeInTheDocument();
|
|
110
|
+
expect(_react2.screen.queryByRole("link")).not.toBeInTheDocument();
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
describe("FileCard — accessibility", function () {
|
|
114
|
+
test("the leading icon is hidden from assistive tech", function () {
|
|
115
|
+
/* R-Ar.2 — the filename IS the accessible name; a decorative glyph carrying
|
|
116
|
+
* one would make a screen reader announce the row twice. The wrapper has no
|
|
117
|
+
* role and no name by design, so there is no semantic query for it: the
|
|
118
|
+
* component exposes a stable testid for exactly this assertion. */
|
|
119
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
120
|
+
name: "a.pdf"
|
|
121
|
+
}));
|
|
122
|
+
expect(_react2.screen.getByTestId("filecard-icon")).toHaveAttribute("aria-hidden", "true");
|
|
123
|
+
});
|
|
124
|
+
test("a custom icon replaces the default and stays hidden", function () {
|
|
125
|
+
/* The second assertion is the one that matters: a host passing its own glyph
|
|
126
|
+
* must not be able to leak it into the accessibility tree. */
|
|
127
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
128
|
+
name: "a.pdf",
|
|
129
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
|
130
|
+
"data-testid": "custom"
|
|
131
|
+
})
|
|
132
|
+
}));
|
|
133
|
+
expect(_react2.screen.getByTestId("custom")).toBeInTheDocument();
|
|
134
|
+
expect(_react2.screen.getByTestId("filecard-icon")).toHaveAttribute("aria-hidden", "true");
|
|
135
|
+
});
|
|
136
|
+
test("carries no role of its own", function () {
|
|
137
|
+
/* The card is not interactive — only its actions are. Giving it role=button
|
|
138
|
+
* or wrapping it in a group without an accessible name would add noise to
|
|
139
|
+
* the SR tree. Asserted so a future "make the whole row clickable" change
|
|
140
|
+
* has to be a deliberate decision rather than a drive-by. */
|
|
141
|
+
(0, _react2.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileCard["default"], {
|
|
142
|
+
name: "a.pdf"
|
|
143
|
+
}));
|
|
144
|
+
expect(_react2.screen.queryByRole("button")).not.toBeInTheDocument();
|
|
145
|
+
expect(_react2.screen.queryByRole("group")).not.toBeInTheDocument();
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
//# sourceMappingURL=FileCard.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileCard.test.js","names":["require","React","_interopRequireWildcard","_react2","_FileCard","_interopRequireDefault","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","describe","test","name","render","jsx","expect","screen","getByText","toHaveAttribute","meta","toBeInTheDocument","_render","rerender","queryByTestId","not","getByTestId","toHaveTextContent","actions","type","children","getByRole","queryByRole","icon"],"sources":["../../../src/lib/v2/__tests__/FileCard.test.tsx"],"sourcesContent":["import \"@testing-library/jest-dom\";\r\nimport * as React from \"react\";\r\nimport { render, screen } from \"@testing-library/react\";\r\nimport FileCard from \"../components/FileCard\";\r\n\r\n/**\r\n * FileCard — contract tests.\r\n *\r\n * WHY THIS FILE EXISTS\r\n * --------------------\r\n * §10.3 R-G.6 MUST — \"Snapshot Storybook + tests Jest/Testing-Library\". The\r\n * component was extracted from THREE hand-written copies found in addpe-fe\r\n * (Attachment, AutorisationPreviewDrawer, AutorisationDetail), which had drifted\r\n * to three different paddings for one concept. Consolidating them means a single\r\n * change now moves every attachment row in the fleet, so the contracts below are\r\n * the ones that must not move silently.\r\n *\r\n * NOT COVERED — deliberately\r\n * The width negotiation is the most fragile part of this component and it is\r\n * NOT tested here: `text-overflow: ellipsis`, `minWidth: 0` on the identity\r\n * block and `flexShrink: 0` on the action cluster are LAYOUT, and jsdom computes\r\n * no layout. A test asserting them would pass while the card is broken on a\r\n * phone — worse than no coverage, because it would look like coverage. That\r\n * contract lives in FileCard.stories.tsx (\"Long filename\"), which is where a\r\n * browser can actually check it. Same reasoning as MobileRowCard.test.tsx\r\n * records for R-G.3.\r\n */\r\ndescribe(\"FileCard — identity\", () => {\r\n test(\"renders the filename and mirrors it into title for the truncated case\", () => {\r\n const name =\r\n \"autorisation-de-depot-prealable-a-l-exportation-2025-IM-0042-revision-finale.pdf\";\r\n render(<FileCard name={name} />);\r\n\r\n /* The title attribute is the ONLY reason `name` is typed `string` rather\r\n * than ReactNode: once the CSS ellipsis hides the tail, the attribute is\r\n * what keeps the full filename reachable. Losing it is invisible in every\r\n * screenshot and only hurts the user with the long filename. */\r\n expect(screen.getByText(name)).toHaveAttribute(\"title\", name);\r\n });\r\n\r\n test(\"renders the meta line when supplied\", () => {\r\n render(<FileCard name=\"facture.pdf\" meta=\"1,24 Mo\" />);\r\n expect(screen.getByText(\"1,24 Mo\")).toBeInTheDocument();\r\n });\r\n\r\n test(\"omits the meta line entirely when absent or empty\", () => {\r\n /* Not rendered rather than rendered blank: an empty second line reads as\r\n * missing data, and it changes the row height, which breaks the alignment\r\n * of a list of files. Both `undefined` and `\"\"` are covered because a host\r\n * formatting a byte count from an optional field produces either.\r\n *\r\n * Queried by testid, not by walking parentElement: \"absent, not empty\"\r\n * cannot be expressed as a text query, and the repo's eslint config forbids\r\n * direct node access — correctly, since a structural child count would also\r\n * break the moment the component gains an unrelated third line. */\r\n const { rerender } = render(<FileCard name=\"a.pdf\" />);\r\n expect(screen.getByText(\"a.pdf\")).toBeInTheDocument();\r\n expect(screen.queryByTestId(\"filecard-meta\")).not.toBeInTheDocument();\r\n\r\n rerender(<FileCard name=\"a.pdf\" meta=\"\" />);\r\n expect(screen.queryByTestId(\"filecard-meta\")).not.toBeInTheDocument();\r\n\r\n rerender(<FileCard name=\"a.pdf\" meta=\"248 Ko\" />);\r\n expect(screen.getByTestId(\"filecard-meta\")).toHaveTextContent(\"248 Ko\");\r\n });\r\n});\r\n\r\ndescribe(\"FileCard — actions slot\", () => {\r\n test(\"renders host-supplied actions\", () => {\r\n render(\r\n <FileCard\r\n name=\"a.pdf\"\r\n actions={<button type=\"button\">Télécharger</button>}\r\n />\r\n );\r\n expect(screen.getByRole(\"button\", { name: \"Télécharger\" })).toBeInTheDocument();\r\n });\r\n\r\n test(\"renders no action cluster when actions is absent\", () => {\r\n render(<FileCard name=\"a.pdf\" />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n });\r\n\r\n test(\"does not invent any action of its own\", () => {\r\n /* Regression guard on the component's SCOPE, not its rendering. FileCard is\r\n * presentational: a download link, a delete confirmation and a blob URL all\r\n * belong to the host. If a future change adds a built-in button, this fails\r\n * — which is the intent. */\r\n render(<FileCard name=\"a.pdf\" meta=\"1 Ko\" />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n expect(screen.queryByRole(\"link\")).not.toBeInTheDocument();\r\n });\r\n});\r\n\r\ndescribe(\"FileCard — accessibility\", () => {\r\n test(\"the leading icon is hidden from assistive tech\", () => {\r\n /* R-Ar.2 — the filename IS the accessible name; a decorative glyph carrying\r\n * one would make a screen reader announce the row twice. The wrapper has no\r\n * role and no name by design, so there is no semantic query for it: the\r\n * component exposes a stable testid for exactly this assertion. */\r\n render(<FileCard name=\"a.pdf\" />);\r\n expect(screen.getByTestId(\"filecard-icon\")).toHaveAttribute(\"aria-hidden\", \"true\");\r\n });\r\n\r\n test(\"a custom icon replaces the default and stays hidden\", () => {\r\n /* The second assertion is the one that matters: a host passing its own glyph\r\n * must not be able to leak it into the accessibility tree. */\r\n render(<FileCard name=\"a.pdf\" icon={<svg data-testid=\"custom\" />} />);\r\n expect(screen.getByTestId(\"custom\")).toBeInTheDocument();\r\n expect(screen.getByTestId(\"filecard-icon\")).toHaveAttribute(\"aria-hidden\", \"true\");\r\n });\r\n\r\n test(\"carries no role of its own\", () => {\r\n /* The card is not interactive — only its actions are. Giving it role=button\r\n * or wrapping it in a group without an accessible name would add noise to\r\n * the SR tree. Asserted so a future \"make the whole row clickable\" change\r\n * has to be a deliberate decision rather than a drive-by. */\r\n render(<FileCard name=\"a.pdf\" />);\r\n expect(screen.queryByRole(\"button\")).not.toBeInTheDocument();\r\n expect(screen.queryByRole(\"group\")).not.toBeInTheDocument();\r\n });\r\n});\r\n"],"mappings":";;;AAAAA,OAAA;AACA,IAAAC,KAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAC,sBAAA,CAAAL,OAAA;AAA8C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAK,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAK,GAAA,EAAAG,WAAA,SAAAA,WAAA,IAA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