From f2b30202c41d7a01ad1c6b7c244ca932a36faac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bitard=20Micha=C3=ABl?= Date: Thu, 12 Sep 2024 15:09:24 +0200 Subject: [PATCH] revert stuff --- packages/ui/src/api/_upload.ts | 14 +- .../components/_common/downloads.stories.tsx | 6 +- .../_common/dsfr-perimetre-table.tsx | 2 +- .../_common/dsfr-perimetre.stories.tsx | 18 +- .../src/components/_common/dsfr-perimetre.tsx | 2 +- .../_common/geosysteme-typeahead.stories.tsx | 4 +- .../_common/new-section-element.tsx | 2 +- .../substance-legale-typeahead.stories.tsx | 2 +- .../_common/titre-reference-select.tsx | 2 +- .../_common/titre-type-select.stories.tsx | 2 +- .../components/_common/titre-type-select.tsx | 4 +- packages/ui/src/components/_map/index.tsx | 2 +- packages/ui/src/components/_map/pattern.tsx | 4 +- .../ui/src/components/_ui/alert.stories.tsx | 4 +- packages/ui/src/components/_ui/alert.tsx | 2 +- .../ui/src/components/_ui/badge.stories.tsx | 2 +- .../components/_ui/dsfr-button.stories.tsx | 4 +- .../_ui/dsfr-input-checkbox.stories.tsx | 4 +- .../_ui/dsfr-input-checkboxes.stories.tsx | 2 +- .../_ui/dsfr-input-radio.stories.tsx | 8 +- .../src/components/_ui/dsfr-input.stories.tsx | 6 +- packages/ui/src/components/_ui/dsfr-input.tsx | 2 +- .../components/_ui/dsfr-select.stories.tsx | 10 +- .../ui/src/components/_ui/dsfr-separator.tsx | 2 +- .../components/_ui/dsfr-textarea.stories.tsx | 4 +- .../ui/src/components/_ui/dsfr-textarea.tsx | 2 +- .../components/_ui/dsfr-toggle.stories.tsx | 4 +- .../src/components/_ui/dsfrIconSpriteType.ts | 2 +- .../_ui/filters/filters.stories.tsx | 6 +- .../ui/src/components/_ui/filters/filters.tsx | 6 +- .../src/components/_ui/functional-loader.tsx | 6 +- .../_ui/functional-popup.stories.tsx | 4 +- .../src/components/_ui/functional-popup.tsx | 6 +- .../ui/src/components/_ui/icon.stories.tsx | 2 +- .../src/components/_ui/table-auto.stories.tsx | 2 +- .../src/components/_ui/table-pagination.tsx | 8 +- packages/ui/src/components/_ui/table.tsx | 1 - .../src/components/_ui/typeahead-single.tsx | 2 +- .../src/components/_ui/typeahead.stories.tsx | 2 +- ...activite.stories_snapshots_ACompleter.html | 2 +- .../activite.stories_snapshots_Deposable.html | 2 +- ...ctivite.stories_snapshots_Supprimable.html | 2 +- ...napshots_AvecDesDocumentsDejaPresents.html | 2 +- .../src/components/activite/depose-popup.tsx | 2 +- .../ui/src/components/activite/preview.tsx | 9 +- .../src/components/activite/remove-popup.tsx | 8 +- packages/ui/src/components/administration.tsx | 4 +- .../components/administration/permissions.tsx | 4 +- .../administration/titres-types.tsx | 2 +- packages/ui/src/components/content/about.tsx | 12 +- .../pure-entreprise-dashboard.stories.tsx | 6 +- .../ui/src/components/dashboard/testData.ts | 64 +++--- ...ape.stories_snapshots_AvisDesServices.html | 10 +- ...es_snapshots_AxmDeposableAvecDaeEtAsl.html | 42 ++-- ...snapshots_DemandeArmMecaniseDeposable.html | 24 +-- ...pshots_DemandeArmMecaniseNonDeposable.html | 20 +- ...pshots_DemandeArmNonMecaniseDeposable.html | 20 +- ...s_DemandeMultipleEntreprisesDocuments.html | 14 +- ...-etape.stories_snapshots_DemandeNoMap.html | 10 +- ...emarche-etape.stories_snapshots_Depot.html | 10 +- ..._snapshots_EtapeAvecNoteAvertissement.html | 10 +- .../components/demarche/demarche-etape.tsx | 8 +- .../src/components/demarche/demarche-map.tsx | 9 +- .../demarche/depose-etape-popup.tsx | 8 +- .../demarche/remove-etape-popup.tsx | 2 +- .../entreprise.stories_snapshots_Complet.html | 4 +- packages/ui/src/components/entreprise.tsx | 2 +- .../src/components/entreprise/add-popup.tsx | 2 +- .../src/components/entreprise/edit-popup.tsx | 2 +- .../entreprise/entreprise-documents.tsx | 7 +- .../entreprise/entreprise-fiscalite.tsx | 2 +- .../remove-entreprise-document-popup.tsx | 4 +- packages/ui/src/components/entreprises.tsx | 2 +- packages/ui/src/components/error.tsx | 4 +- ...ition.stories_snapshots_AffichageAide.html | 2 +- ...ion.stories_snapshots_AxmEnZoneDuSdom.html | 2 +- ....stories_snapshots_DemandeArmComplete.html | 2 +- ...dition.stories_snapshots_Modification.html | 2 +- ..._snapshots_ModificationDemandeHeritee.html | 2 +- packages/ui/src/components/etape-edition.tsx | 2 +- .../components/etape/add-etape-avis-popup.tsx | 6 +- .../ui/src/components/etape/bloc.stories.tsx | 4 +- packages/ui/src/components/etape/bloc.tsx | 2 +- .../etape/entreprises-documents-edit.tsx | 6 +- ...e-avis.stories_snapshots_NotConnected.html | 2 +- ....stories_snapshots_UserAdministration.html | 2 +- ...avis.stories_snapshots_UserEntreprise.html | 2 +- ...tape-avis.stories_snapshots_UserSuper.html | 2 +- .../ui/src/components/etape/etape-avis.tsx | 1 - ...uments.stories_snapshots_NotConnected.html | 8 +- ....stories_snapshots_UserAdministration.html | 14 +- ...ents.stories_snapshots_UserEntreprise.html | 14 +- ...documents.stories_snapshots_UserSuper.html | 14 +- .../src/components/etape/etape-documents.tsx | 1 - ...e-edit-form.stories_snapshots_Default.html | 2 +- ...eConsultationAdministrationsCentrales.html | 2 +- ...snapshots_EtapeDecisionAdministration.html | 2 +- ...m.stories_snapshots_EtapeModification.html | 2 +- ...ories_snapshots_EtapeModificationAvis.html | 2 +- .../components/etape/fondamentales-edit.tsx | 8 +- .../components/etape/forages-import-popup.tsx | 4 +- .../etape/heritage-edit.stories.tsx | 4 +- .../ui/src/components/etape/heritage-edit.tsx | 4 +- .../etape/perimetre-import-popup.tsx | 4 +- .../components/etape/points-import-popup.tsx | 4 +- .../etape/pure-form-save-btn.stories.tsx | 27 ++- .../components/etape/pure-form-save-btn.tsx | 4 +- .../ui/src/components/etape/type-edit.tsx | 2 +- .../src/components/journaux/differences.tsx | 2 +- .../ui/src/components/page/footer.stories.tsx | 2 +- .../page/footer/newsletter-form.stories.tsx | 8 +- .../page/footer/newsletter-form.tsx | 2 +- .../ui/src/components/page/header.stories.tsx | 22 +- .../page/quick-access-titre.stories.tsx | 10 +- .../statistiques/granulats-marins.tsx | 2 +- .../mineraux-metaux-metropole.stories.tsx | 192 +++++++++--------- .../mineraux-metaux-metropole.tsx | 8 +- packages/ui/src/components/titre-creation.tsx | 4 +- packages/ui/src/components/titre.stories.tsx | 19 +- .../titre.stories_snapshots_BasseManaMod.html | 2 +- ...ries_snapshots_BonEspoirProlongation2.html | 2 +- ...re.stories_snapshots_BonEspoirTravaux.html | 4 +- .../titre.stories_snapshots_Lenoncourt.html | 4 +- packages/ui/src/components/titre.tsx | 4 +- .../titre/demarche-edit-popup.stories.tsx | 4 +- .../components/titre/demarche-edit-popup.tsx | 2 +- .../titre/demarche-remove-popup.stories.tsx | 2 +- .../titre/demarche-remove-popup.tsx | 2 +- .../ui/src/components/titre/edit-popup.tsx | 2 +- .../ui/src/components/titre/remove-popup.tsx | 2 +- .../src/components/titre/titre-demarche.tsx | 4 +- .../src/components/titre/titre-timeline.tsx | 6 +- .../titre/travaux-icone.stories.tsx | 2 +- packages/ui/src/components/titres.tsx | 4 +- packages/ui/src/components/titres/mapUtil.ts | 2 +- packages/ui/src/components/travaux.tsx | 2 +- packages/ui/src/components/utilisateur.tsx | 2 +- .../src/components/utilisateur/qgis-token.tsx | 4 +- .../components/utilisateur/remove-popup.tsx | 2 +- packages/ui/src/router/routes.ts | 2 +- packages/ui/src/typings/vue-router.d.ts | 4 +- 141 files changed, 504 insertions(+), 494 deletions(-) diff --git a/packages/ui/src/api/_upload.ts b/packages/ui/src/api/_upload.ts index bbcc80d8a..ca486bf49 100644 --- a/packages/ui/src/api/_upload.ts +++ b/packages/ui/src/api/_upload.ts @@ -1,7 +1,7 @@ import Uppy from '@uppy/core' -import Tus from '@uppy/tus' +import Tus, { TusOptions } from '@uppy/tus' +import { Upload } from 'tus-js-client' import { TempDocumentName, tempDocumentNameValidator } from 'camino-common/src/document' -import { isNotNullNorUndefinedNorEmpty, isNullOrUndefinedOrEmpty } from 'camino-common/src/typescript-tools' const CHUNK_SIZE = 1048576 // 1 Mo const apiUrl = '/apiUrl' @@ -11,7 +11,7 @@ export const uploadCall = async (file: File, progressCb: (progress: number) => v autoProceed: true, }) - uppy.use(Tus, { + uppy.use(Tus, { chunkSize: CHUNK_SIZE, endpoint: `${apiUrl}/televersement`, onShouldRetry: () => { @@ -33,15 +33,11 @@ export const uploadCall = async (file: File, progressCb: (progress: number) => v uppy.on('complete', result => { const { successful, failed } = result - if (isNotNullNorUndefinedNorEmpty(failed) || isNullOrUndefinedOrEmpty(successful)) { + if (failed.length || !successful.length) { reject(new Error('Échec du téléversement')) } else { const [{ uploadURL }] = successful - if (isNullOrUndefinedOrEmpty(uploadURL)) { - reject(new Error("Pas d'URL d'upload")) - } else { - resolve(tempDocumentNameValidator.parse(uploadURL.substring(uploadURL.lastIndexOf('/') + 1))) - } + resolve(tempDocumentNameValidator.parse(uploadURL.substring(uploadURL.lastIndexOf('/') + 1))) } }) }) diff --git a/packages/ui/src/components/_common/downloads.stories.tsx b/packages/ui/src/components/_common/downloads.stories.tsx index ed9a0abeb..6c1690ce4 100644 --- a/packages/ui/src/components/_common/downloads.stories.tsx +++ b/packages/ui/src/components/_common/downloads.stories.tsx @@ -8,10 +8,10 @@ const meta: Meta = { } export default meta -export const Default: StoryFn = () => +export const Default: StoryFn = () => -export const OnlyOneFormat: StoryFn = () => +export const OnlyOneFormat: StoryFn = () => export const WithOverridenTitle: StoryFn = () => ( - + ) diff --git a/packages/ui/src/components/_common/dsfr-perimetre-table.tsx b/packages/ui/src/components/_common/dsfr-perimetre-table.tsx index add3af0eb..c26e5d129 100644 --- a/packages/ui/src/components/_common/dsfr-perimetre-table.tsx +++ b/packages/ui/src/components/_common/dsfr-perimetre-table.tsx @@ -147,7 +147,7 @@ const TableForages: FunctionalComponent(props => { return () => (
- + diff --git a/packages/ui/src/components/_common/dsfr-perimetre.stories.tsx b/packages/ui/src/components/_common/dsfr-perimetre.stories.tsx index 115be7b40..89a7179fa 100644 --- a/packages/ui/src/components/_common/dsfr-perimetre.stories.tsx +++ b/packages/ui/src/components/_common/dsfr-perimetre.stories.tsx @@ -70,7 +70,7 @@ export const DefaultNoSnapshot: StoryFn = () => ( geojson_origine_forages: null, surface: km2Validator.parse(3), }} - calculateNeighbours + calculateNeighbours={true} apiClient={{ ...apiClientMock, getTitresWithPerimetreForCarte: params => { @@ -182,7 +182,7 @@ export const PolygonWithLacuneNoSnapshot: StoryFn = () => ( geojson_origine_forages: null, surface: km2Validator.parse(3), }} - calculateNeighbours + calculateNeighbours={true} apiClient={apiClientMock} titreSlug={titreSlugValidator.parse('titre-slug')} router={{ @@ -202,9 +202,9 @@ const bigGeoJson: FeatureMultiPolygon = { geometry: { type: 'MultiPolygon', // prettier-ignore - coordinates: [[[[-4.370364497124209, 48.53380508608616], [-4.373271574712479, 48.47151134163559], [-4.03753485335386, 48.579164636474836], [-3.89919702975027, 48.603980178934115], [-3.860482328708233, 48.62511389817695], [-3.858436311611334, 48.629031691751045], [-3.862157259991486, 48.633014015139416], [-3.870281882041237, 48.63550010399696], [-3.879786359001045, 48.639113643702565], [-3.895430188480503, 48.64455770816115], [-3.89902273351368, 48.64822789311303], [-3.902536979616769, 48.654435032933826], [-3.906528075174153, 48.66061643462235], [-3.904489574558275, 48.6643307169305], [-3.89647573803132, 48.66601900245078], [-3.890673665115296, 48.667020244464325], [-3.890721315690864, 48.67062455977177], [-3.892950905315848, 48.67088770685571], [-3.898005277721187, 48.6723935639094], [-3.8992413951649, 48.67074624589731], [-3.903300809713803, 48.67034264689684], [-3.907548440632195, 48.66910635173531], [-3.91185396569359, 48.669954398127075], [-3.914635548862354, 48.67322568941628], [-3.920575104032537, 48.67458696237509], [-3.924157593611878, 48.669749821082725], [-3.927138109422188, 48.66538094626539], [-3.927802453245391, 48.66178827244388], [-3.92880004801291, 48.660065331624466], [-3.930674658925236, 48.657424523021], [-3.934385020441046, 48.65730036039394], [-3.940574301992641, 48.65682750256307], [-3.949892212356874, 48.653210569309856], [-3.9518951695476, 48.64983646195122], [-3.95135848409069, 48.646306571150944], [-3.952791103114349, 48.64456097348628], [-3.954311041643234, 48.64535110107629], [-3.957178207067545, 48.65093506946735], [-3.95632686509049, 48.654756209794456], [-3.954939197043658, 48.66049485799891], [-3.958264581105623, 48.66351217516115], [-3.954301077151103, 48.665175330569724], [-3.958113788215813, 48.66678821578858], [-3.958288500972019, 48.67004622329816], [-3.953583216471425, 48.67102223996598], [-3.952154912225681, 48.67280542236], [-3.954601922703807, 48.67354649576719], [-3.957150323952388, 48.6728667311387], [-3.962232217223142, 48.674085603023535], [-3.96509885038279, 48.67647290565392], [-3.968196892552599, 48.67354977814375], [-3.970552500285286, 48.67336152037275], [-3.971907150463719, 48.67429537178488], [-3.971687730880199, 48.67565139942766], [-3.968925351937541, 48.67998621214178], [-3.97276835094199, 48.68681279071675], [-3.969905040239144, 48.687617856017994], [-3.967785856011854, 48.69274164929216], [-3.97050395358365, 48.693904041872074], [-3.974129066864182, 48.69665141578885], [-3.976827175680581, 48.699084231748806], [-3.973964059500176, 48.70207052891004], [-3.97557715354335, 48.70449012698265], [-3.972337757698344, 48.70582333762662], [-3.974038535718974, 48.710344199247295], [-3.972061362590358, 48.71168433267898], [-3.969407494937729, 48.71919463600953], [-3.966114995158957, 48.719188628020184], [-3.964815895310649, 48.72248973384656], [-3.968123622922862, 48.72216808659624], [-3.970117554054281, 48.7239825094888], [-3.971030085004171, 48.72531725688056], [-3.974105493634571, 48.72442714535237], [-3.977130032296356, 48.72223266964199], [-3.98038470744471, 48.72282149601802], [-3.98267568678471, 48.72451484026706], [-3.983159793997456, 48.72623219482621], [-3.985655519886893, 48.726898196761965], [-3.988412331317411, 48.727004809776105], [-3.990251104366354, 48.72588975599552], [-3.992106999472123, 48.723541171653366], [-3.992308257471176, 48.72204072794657], [-3.990818477440011, 48.71838055340067], [-3.993241558794496, 48.715311146944074], [-3.99726181945054, 48.71273584775902], [-4.000886986292233, 48.71141716999743], [-4.005573266114372, 48.715195490443925], [-4.004640753163968, 48.716989015759715], [-4.007861713401779, 48.72044675798358], [-4.009590286562232, 48.72068101995395], [-4.012907971574204, 48.71865165832863], [-4.010881803078078, 48.716872551149415], [-4.013298574720932, 48.713765123429766], [-4.018283788022766, 48.71146515516518], [-4.02502266800395, 48.710486602386844], [-4.029102910364339, 48.7109751516783], [-4.032895375568785, 48.712496949149184], [-4.034013864663466, 48.71364906002572], [-4.035203599079426, 48.71386049099469], [-4.036426674181452, 48.711761570746404], [-4.035857818689737, 48.70935978588029], [-4.037836186006247, 48.70536884991981], [-4.040876440962449, 48.70331706201061], [-4.042661395770205, 48.70267658451317], [-4.044522857875245, 48.70264835316387], [-4.048746772595955, 48.70536952092104], [-4.051782617787177, 48.70458102418029], [-4.053387641319855, 48.70237110662314], [-4.054960885021424, 48.69887510664347], [-4.057098904957046, 48.688336149296134], [-4.047492224129947, 48.6881905546806], [-4.04264615919883, 48.688356681641565], [-4.05570877851515, 48.685187990084636], [-4.061384711067841, 48.687678086132514], [-4.063856568443375, 48.68626486757381], [-4.069006699782528, 48.687977416990556], [-4.066114156101222, 48.68600063748565], [-4.065917761777147, 48.68383188367652], [-4.06536435070835, 48.68281963355705], [-4.062811851052143, 48.68243638561189], [-4.063604286352126, 48.680735563101265], [-4.061249339782617, 48.68019915458731], [-4.060491984152113, 48.67893668983929], [-4.056630622211962, 48.67523642323898], [-4.055350396131191, 48.67179995101334], [-4.057224936686009, 48.670572879663034], [-4.057969445321888, 48.675068847630506], [-4.059622862128396, 48.675122344607715], [-4.06024682153259, 48.67613145254186], [-4.063213863275964, 48.67815002912692], [-4.064507934140134, 48.677605925445725], [-4.067195178609656, 48.67891661518815], [-4.068000601946539, 48.68272446881325], [-4.07116708376152, 48.68462241191764], [-4.080222240659125, 48.689712089777736], [-4.082890717412141, 48.693212237422216], [-4.0837341887691, 48.69168549285934], [-4.08645810312384, 48.69005696722575], [-4.08922980276701, 48.69161527586137], [-4.091651149022687, 48.69171173600047], [-4.095188717132302, 48.686965610139666], [-4.097383839952319, 48.69356464812578], [-4.102536986221444, 48.69351221259058], [-4.106197887484285, 48.692515838515405], [-4.109568285925066, 48.69472448012849], [-4.115803404112282, 48.69506791354793], [-4.118098969264236, 48.692778728280935], [-4.12511664716867, 48.693877169595176], [-4.127837461875522, 48.69361476668908], [-4.131236501370729, 48.6960475956426], [-4.136181126707938, 48.69293107079426], [-4.142132619722753, 48.69237814384752], [-4.150020162763907, 48.69217377284019], [-4.152170300893284, 48.691487051119246], [-4.162483098525137, 48.68833023827453], [-4.174170898732186, 48.657628672506775], [-4.409843663429304, 48.633874515395604], [-4.370364497124209, 48.53380508608616] - ] - ] + "coordinates": [ [ [ [ -4.370364497124209, 48.53380508608616 ], [ -4.373271574712479, 48.47151134163559 ], [ -4.03753485335386, 48.579164636474836 ], [ -3.89919702975027, 48.603980178934115 ], [ -3.860482328708233, 48.62511389817695 ], [ -3.858436311611334, 48.629031691751045 ], [ -3.862157259991486, 48.633014015139416 ], [ -3.870281882041237, 48.63550010399696 ], [ -3.879786359001045, 48.639113643702565 ], [ -3.895430188480503, 48.64455770816115 ], [ -3.89902273351368, 48.64822789311303 ], [ -3.902536979616769, 48.654435032933826 ], [ -3.906528075174153, 48.66061643462235 ], [ -3.904489574558275, 48.6643307169305 ], [ -3.89647573803132, 48.66601900245078 ], [ -3.890673665115296, 48.667020244464325 ], [ -3.890721315690864, 48.67062455977177 ], [ -3.892950905315848, 48.67088770685571 ], [ -3.898005277721187, 48.6723935639094 ], [ -3.8992413951649, 48.67074624589731 ], [ -3.903300809713803, 48.67034264689684 ], [ -3.907548440632195, 48.66910635173531 ], [ -3.91185396569359, 48.669954398127075 ], [ -3.914635548862354, 48.67322568941628 ], [ -3.920575104032537, 48.67458696237509 ], [ -3.924157593611878, 48.669749821082725 ], [ -3.927138109422188, 48.66538094626539 ], [ -3.927802453245391, 48.66178827244388 ], [ -3.92880004801291, 48.660065331624466 ], [ -3.930674658925236, 48.657424523021 ], [ -3.934385020441046, 48.65730036039394 ], [ -3.940574301992641, 48.65682750256307 ], [ -3.949892212356874, 48.653210569309856 ], [ -3.9518951695476, 48.64983646195122 ], [ -3.95135848409069, 48.646306571150944 ], [ -3.952791103114349, 48.64456097348628 ], [ -3.954311041643234, 48.64535110107629 ], [ -3.957178207067545, 48.65093506946735 ], [ -3.95632686509049, 48.654756209794456 ], [ -3.954939197043658, 48.66049485799891 ], [ -3.958264581105623, 48.66351217516115 ], [ -3.954301077151103, 48.665175330569724 ], [ -3.958113788215813, 48.66678821578858 ], [ -3.958288500972019, 48.67004622329816 ], [ -3.953583216471425, 48.67102223996598 ], [ -3.952154912225681, 48.67280542236 ], [ -3.954601922703807, 48.67354649576719 ], [ -3.957150323952388, 48.6728667311387 ], [ -3.962232217223142, 48.674085603023535 ], [ -3.96509885038279, 48.67647290565392 ], [ -3.968196892552599, 48.67354977814375 ], [ -3.970552500285286, 48.67336152037275 ], [ -3.971907150463719, 48.67429537178488 ], [ -3.971687730880199, 48.67565139942766 ], [ -3.968925351937541, 48.67998621214178 ], [ -3.97276835094199, 48.68681279071675 ], [ -3.969905040239144, 48.687617856017994 ], [ -3.967785856011854, 48.69274164929216 ], [ -3.97050395358365, 48.693904041872074 ], [ -3.974129066864182, 48.69665141578885 ], [ -3.976827175680581, 48.699084231748806 ], [ -3.973964059500176, 48.70207052891004 ], [ -3.97557715354335, 48.70449012698265 ], [ -3.972337757698344, 48.70582333762662 ], [ -3.974038535718974, 48.710344199247295 ], [ -3.972061362590358, 48.71168433267898 ], [ -3.969407494937729, 48.71919463600953 ], [ -3.966114995158957, 48.719188628020184 ], [ -3.964815895310649, 48.72248973384656 ], [ -3.968123622922862, 48.72216808659624 ], [ -3.970117554054281, 48.7239825094888 ], [ -3.971030085004171, 48.72531725688056 ], [ -3.974105493634571, 48.72442714535237 ], [ -3.977130032296356, 48.72223266964199 ], [ -3.98038470744471, 48.72282149601802 ], [ -3.98267568678471, 48.72451484026706 ], [ -3.983159793997456, 48.72623219482621 ], [ -3.985655519886893, 48.726898196761965 ], [ -3.988412331317411, 48.727004809776105 ], [ -3.990251104366354, 48.72588975599552 ], [ -3.992106999472123, 48.723541171653366 ], [ -3.992308257471176, 48.72204072794657 ], [ -3.990818477440011, 48.71838055340067 ], [ -3.993241558794496, 48.715311146944074 ], [ -3.99726181945054, 48.71273584775902 ], [ -4.000886986292233, 48.71141716999743 ], [ -4.005573266114372, 48.715195490443925 ], [ -4.004640753163968, 48.716989015759715 ], [ -4.007861713401779, 48.72044675798358 ], [ -4.009590286562232, 48.72068101995395 ], [ -4.012907971574204, 48.71865165832863 ], [ -4.010881803078078, 48.716872551149415 ], [ -4.013298574720932, 48.713765123429766 ], [ -4.018283788022766, 48.71146515516518 ], [ -4.02502266800395, 48.710486602386844 ], [ -4.029102910364339, 48.7109751516783 ], [ -4.032895375568785, 48.712496949149184 ], [ -4.034013864663466, 48.71364906002572 ], [ -4.035203599079426, 48.71386049099469 ], [ -4.036426674181452, 48.711761570746404 ], [ -4.035857818689737, 48.70935978588029 ], [ -4.037836186006247, 48.70536884991981 ], [ -4.040876440962449, 48.70331706201061 ], [ -4.042661395770205, 48.70267658451317 ], [ -4.044522857875245, 48.70264835316387 ], [ -4.048746772595955, 48.70536952092104 ], [ -4.051782617787177, 48.70458102418029 ], [ -4.053387641319855, 48.70237110662314 ], [ -4.054960885021424, 48.69887510664347 ], [ -4.057098904957046, 48.688336149296134 ], [ -4.047492224129947, 48.6881905546806 ], [ -4.04264615919883, 48.688356681641565 ], [ -4.05570877851515, 48.685187990084636 ], [ -4.061384711067841, 48.687678086132514 ], [ -4.063856568443375, 48.68626486757381 ], [ -4.069006699782528, 48.687977416990556 ], [ -4.066114156101222, 48.68600063748565 ], [ -4.065917761777147, 48.68383188367652 ], [ -4.06536435070835, 48.68281963355705 ], [ -4.062811851052143, 48.68243638561189 ], [ -4.063604286352126, 48.680735563101265 ], [ -4.061249339782617, 48.68019915458731 ], [ -4.060491984152113, 48.67893668983929 ], [ -4.056630622211962, 48.67523642323898 ], [ -4.055350396131191, 48.67179995101334 ], [ -4.057224936686009, 48.670572879663034 ], [ -4.057969445321888, 48.675068847630506 ], [ -4.059622862128396, 48.675122344607715 ], [ -4.06024682153259, 48.67613145254186 ], [ -4.063213863275964, 48.67815002912692 ], [ -4.064507934140134, 48.677605925445725 ], [ -4.067195178609656, 48.67891661518815 ], [ -4.068000601946539, 48.68272446881325 ], [ -4.07116708376152, 48.68462241191764 ], [ -4.080222240659125, 48.689712089777736 ], [ -4.082890717412141, 48.693212237422216 ], [ -4.0837341887691, 48.69168549285934 ], [ -4.08645810312384, 48.69005696722575 ], [ -4.08922980276701, 48.69161527586137 ], [ -4.091651149022687, 48.69171173600047 ], [ -4.095188717132302, 48.686965610139666 ], [ -4.097383839952319, 48.69356464812578 ], [ -4.102536986221444, 48.69351221259058 ], [ -4.106197887484285, 48.692515838515405 ], [ -4.109568285925066, 48.69472448012849 ], [ -4.115803404112282, 48.69506791354793 ], [ -4.118098969264236, 48.692778728280935 ], [ -4.12511664716867, 48.693877169595176 ], [ -4.127837461875522, 48.69361476668908 ], [ -4.131236501370729, 48.6960475956426 ], [ -4.136181126707938, 48.69293107079426 ], [ -4.142132619722753, 48.69237814384752 ], [ -4.150020162763907, 48.69217377284019 ], [ -4.152170300893284, 48.691487051119246 ], [ -4.162483098525137, 48.68833023827453 ], [ -4.174170898732186, 48.657628672506775 ], [ -4.409843663429304, 48.633874515395604 ], [ -4.370364497124209, 48.53380508608616 ] + ] + ] ], }, } @@ -232,7 +232,7 @@ export const BigNoSnapshot: StoryFn = () => ( return Promise.resolve() }, }} - calculateNeighbours + calculateNeighbours={true} apiClient={apiClientMock} /> @@ -298,7 +298,7 @@ export const MultipleNoSnapshot: StoryFn = () => ( return Promise.resolve() }, }} - calculateNeighbours + calculateNeighbours={true} apiClient={apiClientMock} /> @@ -378,7 +378,7 @@ export const MultiplePolygonWithLacuneTableau: StoryFn = () => ( geojson_origine_forages: null, surface: km2Validator.parse(3), }} - calculateNeighbours + calculateNeighbours={true} apiClient={apiClientMock} titreSlug={titreSlugValidator.parse('titre-slug')} router={{ @@ -388,7 +388,7 @@ export const MultiplePolygonWithLacuneTableau: StoryFn = () => ( return Promise.resolve() }, }} - initTab="points" + initTab={'points'} /> ) diff --git a/packages/ui/src/components/_common/dsfr-perimetre.tsx b/packages/ui/src/components/_common/dsfr-perimetre.tsx index 25b6087f1..f6af62932 100644 --- a/packages/ui/src/components/_common/dsfr-perimetre.tsx +++ b/packages/ui/src/components/_common/dsfr-perimetre.tsx @@ -76,7 +76,7 @@ export const DsfrPerimetre = defineComponent((props: Props) => { }, ] as const satisfies readonly Tab[] - return () => {}} /> + return () => {}} /> }) type TabCaminoMapProps = OmitDistributive & { diff --git a/packages/ui/src/components/_common/geosysteme-typeahead.stories.tsx b/packages/ui/src/components/_common/geosysteme-typeahead.stories.tsx index 86b04a40b..9625f4b15 100644 --- a/packages/ui/src/components/_common/geosysteme-typeahead.stories.tsx +++ b/packages/ui/src/components/_common/geosysteme-typeahead.stories.tsx @@ -11,5 +11,5 @@ export default meta const geoSystemeSelected = action('geoSystemeSelected') -export const Default: StoryFn = () => -export const WithGeoSystemeAlreadySelected: StoryFn = () => +export const Default: StoryFn = () => +export const WithGeoSystemeAlreadySelected: StoryFn = () => diff --git a/packages/ui/src/components/_common/new-section-element.tsx b/packages/ui/src/components/_common/new-section-element.tsx index acd2079e0..d8a87ce13 100644 --- a/packages/ui/src/components/_common/new-section-element.tsx +++ b/packages/ui/src/components/_common/new-section-element.tsx @@ -23,7 +23,7 @@ export const SectionElement: FunctionalComponent = (props: Props): JSX.El ) : ( {props.element.id === 'jorf' && props.element.value !== null && props.element.value !== '' ? ( - + {valeurFind(props.element)} ) : ( diff --git a/packages/ui/src/components/_common/substance-legale-typeahead.stories.tsx b/packages/ui/src/components/_common/substance-legale-typeahead.stories.tsx index 808b26eac..2d6f4fcfa 100644 --- a/packages/ui/src/components/_common/substance-legale-typeahead.stories.tsx +++ b/packages/ui/src/components/_common/substance-legale-typeahead.stories.tsx @@ -11,5 +11,5 @@ export default meta const substanceLegaleSelected = action('substanceLegaleSelected') -export const Default: StoryFn = () => +export const Default: StoryFn = () => export const WithSubstanceTypeAlreadySelected: StoryFn = () => diff --git a/packages/ui/src/components/_common/titre-reference-select.tsx b/packages/ui/src/components/_common/titre-reference-select.tsx index a320d0190..aa78cb214 100644 --- a/packages/ui/src/components/_common/titre-reference-select.tsx +++ b/packages/ui/src/components/_common/titre-reference-select.tsx @@ -51,7 +51,7 @@ export const TitreReferenceSelect = defineComponent(props => { ))} {isNullOrUndefined(references.value.find(r => !r.referenceTypeId || !r.nom)) ? ( - + ) : null}
) diff --git a/packages/ui/src/components/_common/titre-type-select.stories.tsx b/packages/ui/src/components/_common/titre-type-select.stories.tsx index 8aa684448..d47dd9263 100644 --- a/packages/ui/src/components/_common/titre-type-select.stories.tsx +++ b/packages/ui/src/components/_common/titre-type-select.stories.tsx @@ -16,4 +16,4 @@ export const Default: StoryFn = () => -export const AlreadySelected: StoryFn = () => +export const AlreadySelected: StoryFn = () => diff --git a/packages/ui/src/components/_common/titre-type-select.tsx b/packages/ui/src/components/_common/titre-type-select.tsx index 16afbd930..5e36a410a 100644 --- a/packages/ui/src/components/_common/titre-type-select.tsx +++ b/packages/ui/src/components/_common/titre-type-select.tsx @@ -70,11 +70,11 @@ export const TitreTypeSelect = defineComponent(props => { return () => ( <> {isNotNullNorUndefined(domainesFiltered.value) ? ( - + ) : null} {isNotNullNorUndefined(titresTypeTypes.value) ? ( - + ) : null} ) diff --git a/packages/ui/src/components/_map/index.tsx b/packages/ui/src/components/_map/index.tsx index 154e83c98..0e62ad5ea 100644 --- a/packages/ui/src/components/_map/index.tsx +++ b/packages/ui/src/components/_map/index.tsx @@ -266,7 +266,7 @@ export const CaminoMap = defineComponent((props, { expose }) => { const gauge = L.DomUtil.create('div') gauge.style.background = 'rgba(255,255,255)' gauge.style.textAlign = 'right' - gauge.innerHTML = 'Chargement...' + gauge.innerHTML = `Chargement...` return gauge }, diff --git a/packages/ui/src/components/_map/pattern.tsx b/packages/ui/src/components/_map/pattern.tsx index 7ff8b3987..3e465e385 100644 --- a/packages/ui/src/components/_map/pattern.tsx +++ b/packages/ui/src/components/_map/pattern.tsx @@ -24,7 +24,7 @@ export const MapPattern: FunctionalComponent = () => { // leaflet/mapUtil uses this return ( <> -
+
{domainesIds.map(id => (
@@ -52,7 +52,7 @@ export const MapPattern: FunctionalComponent = () => { height="8" patternTransform={`rotate(${defs[ttt.id].rotation})`} > - + ) })} diff --git a/packages/ui/src/components/_ui/alert.stories.tsx b/packages/ui/src/components/_ui/alert.stories.tsx index 60e45ada3..a93f2965a 100644 --- a/packages/ui/src/components/_ui/alert.stories.tsx +++ b/packages/ui/src/components/_ui/alert.stories.tsx @@ -14,8 +14,8 @@ export const Warning: StoryFn = () => Description en gras} /> export const Info: StoryFn = () => Description en gras} /> export const InfoSansDescription: StoryFn = () => -export const InfoSmall: StoryFn = () => -export const InfoSmallLink: StoryFn = () => } small /> +export const InfoSmall: StoryFn = () => +export const InfoSmallLink: StoryFn = () => } small={true} /> export const ApiErrorSimple: StoryFn = () => export const ApiErrorWithCompleteMessage: StoryFn = () => ( diff --git a/packages/ui/src/components/_ui/alert.tsx b/packages/ui/src/components/_ui/alert.tsx index e2f7c50ec..32eeb9f8a 100644 --- a/packages/ui/src/components/_ui/alert.tsx +++ b/packages/ui/src/components/_ui/alert.tsx @@ -58,7 +58,7 @@ export const CaminoApiAlert: FunctionalComponent<{ caminoApiError: CaminoError { - return + return } // Demandé par le router car utilisé dans un import asynchrone /shrug PageIntrouvableAlert.displayName = 'Page introuvable' diff --git a/packages/ui/src/components/_ui/badge.stories.tsx b/packages/ui/src/components/_ui/badge.stories.tsx index 4274a8e04..434baa77f 100644 --- a/packages/ui/src/components/_ui/badge.stories.tsx +++ b/packages/ui/src/components/_ui/badge.stories.tsx @@ -44,7 +44,7 @@ export const Systeme: StoryFn = () => ( - + ))} diff --git a/packages/ui/src/components/_ui/dsfr-button.stories.tsx b/packages/ui/src/components/_ui/dsfr-button.stories.tsx index 026cef679..f29adb0d4 100644 --- a/packages/ui/src/components/_ui/dsfr-button.stories.tsx +++ b/packages/ui/src/components/_ui/dsfr-button.stories.tsx @@ -10,7 +10,7 @@ export default meta const onClick = action('onClick') export const Default: StoryFn = () => -export const Disabled: StoryFn = () => +export const Disabled: StoryFn = () => export const All: StoryFn = () => (
{buttonTypes.map(buttonType => ( @@ -44,6 +44,6 @@ export const Link: StoryFn = () => ( - +
) diff --git a/packages/ui/src/components/_ui/dsfr-input-checkbox.stories.tsx b/packages/ui/src/components/_ui/dsfr-input-checkbox.stories.tsx index d9b21300c..52f0a8885 100644 --- a/packages/ui/src/components/_ui/dsfr-input-checkbox.stories.tsx +++ b/packages/ui/src/components/_ui/dsfr-input-checkbox.stories.tsx @@ -11,7 +11,7 @@ export default meta const valueChangedAction = action('valueChanged') -export const Checked: StoryFn = () => +export const Checked: StoryFn = () => export const NotChecked: StoryFn = () => -export const Disabled: StoryFn = () => +export const Disabled: StoryFn = () => export const Small: StoryFn = () => diff --git a/packages/ui/src/components/_ui/dsfr-input-checkboxes.stories.tsx b/packages/ui/src/components/_ui/dsfr-input-checkboxes.stories.tsx index 7d7daa0ac..930f55e90 100644 --- a/packages/ui/src/components/_ui/dsfr-input-checkboxes.stories.tsx +++ b/packages/ui/src/components/_ui/dsfr-input-checkboxes.stories.tsx @@ -57,7 +57,7 @@ export const Small: StoryFn = () => ( export const Disabled: StoryFn = () => ( ( export const Disabled: StoryFn = () => ( ( export const Required: StoryFn = () => ( ( ( export const Horizontal: StoryFn = () => ( ( ) -export const WithValue: StoryFn = () => -export const Disabled: StoryFn = () => -export const Required: StoryFn = () => +export const WithValue: StoryFn = () => +export const Disabled: StoryFn = () => +export const Required: StoryFn = () => export const Number: StoryFn = () => export const Date: StoryFn = () => ( diff --git a/packages/ui/src/components/_ui/dsfr-input.tsx b/packages/ui/src/components/_ui/dsfr-input.tsx index f8cbcd291..df703ce73 100644 --- a/packages/ui/src/components/_ui/dsfr-input.tsx +++ b/packages/ui/src/components/_ui/dsfr-input.tsx @@ -77,7 +77,7 @@ export const DsfrInput = defineComponent(props => { {(props.legend.visible ?? true) ? ( ) : null} ( ) -export const AlreadySelectedItem: StoryFn = () => +export const AlreadySelectedItem: StoryFn = () => -export const Disabled: StoryFn = () => -export const Required: StoryFn = () => +export const Disabled: StoryFn = () => +export const Required: StoryFn = () => export const ElementDisabled: StoryFn = () => ( ) diff --git a/packages/ui/src/components/_ui/dsfr-separator.tsx b/packages/ui/src/components/_ui/dsfr-separator.tsx index f9da3c38f..122d94379 100644 --- a/packages/ui/src/components/_ui/dsfr-separator.tsx +++ b/packages/ui/src/components/_ui/dsfr-separator.tsx @@ -4,5 +4,5 @@ type Props = { size?: 'sm' | 'md' } export const DsfrSeparator: FunctionalComponent = props => ( -
+
) diff --git a/packages/ui/src/components/_ui/dsfr-textarea.stories.tsx b/packages/ui/src/components/_ui/dsfr-textarea.stories.tsx index af5bbaf69..6d5369f47 100644 --- a/packages/ui/src/components/_ui/dsfr-textarea.stories.tsx +++ b/packages/ui/src/components/_ui/dsfr-textarea.stories.tsx @@ -12,5 +12,5 @@ const valueChangedAction = action('valueChanged') export const Default: StoryFn = () => export const WithDescriptionAndPlaceholder: StoryFn = () => -export const WithValue: StoryFn = () => -export const Required: StoryFn = () => +export const WithValue: StoryFn = () => +export const Required: StoryFn = () => diff --git a/packages/ui/src/components/_ui/dsfr-textarea.tsx b/packages/ui/src/components/_ui/dsfr-textarea.tsx index f43d2d422..351a6389e 100644 --- a/packages/ui/src/components/_ui/dsfr-textarea.tsx +++ b/packages/ui/src/components/_ui/dsfr-textarea.tsx @@ -23,7 +23,7 @@ export const DsfrTextarea = defineComponent(props => {