From 8591e7c59ba5eca6ec986d36b23b50a747442752 Mon Sep 17 00:00:00 2001 From: Alexandre Caron Date: Thu, 21 Sep 2023 08:59:07 -0400 Subject: [PATCH 1/4] fix(InteractiveTour): options migration from popperJS to floatingUI --- .../lib/interactive-tour/interactive-tour.service.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/common/src/lib/interactive-tour/interactive-tour.service.ts b/packages/common/src/lib/interactive-tour/interactive-tour.service.ts index bc45f5abe5..ead06d27c1 100644 --- a/packages/common/src/lib/interactive-tour/interactive-tour.service.ts +++ b/packages/common/src/lib/interactive-tour/interactive-tour.service.ts @@ -1,5 +1,7 @@ import { Injectable } from '@angular/core'; import { ShepherdService } from 'angular-shepherd'; +import Shepherd from 'shepherd.js'; +import { offset } from '@floating-ui/dom'; import { ConfigService, MediaService, LanguageService } from '@igo2/core'; import { InteractiveTourLoader } from './interactive-tour.loader'; @@ -282,17 +284,17 @@ export class InteractiveTourService { } private getShepherdSteps(stepConfig: InteractiveTourOptions) { - const shepherdSteps = []; + const shepherdSteps: Shepherd.Step.StepOptions[] = []; let i = 0; for (const step of stepConfig.steps) { shepherdSteps.push({ attachTo: { element: step.element, - on: step.position || stepConfig.position + on: (step.position || stepConfig.position) as any // PopperPlacement }, - popperOptions: { - modifiers: [{ name: 'offset', options: { offset: [0, 15] } }] + floatingUIOptions: { + middleware: [offset({ mainAxis: 15 })] }, beforeShowPromise: () => { return Promise.all([ @@ -331,7 +333,7 @@ export class InteractiveTourService { this.executeAction(step, step.onHide); } } - }); + } satisfies Shepherd.Step.StepOptions); i++; } From 73942f60f02298656cc8d464a4334667f9db7ce4 Mon Sep 17 00:00:00 2001 From: Alexandre Caron Date: Thu, 21 Sep 2023 12:04:24 -0400 Subject: [PATCH 2/4] chore(StartWatch): add DrawingToolModule to index file --- packages/integration/src/lib/draw/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/integration/src/lib/draw/index.ts b/packages/integration/src/lib/draw/index.ts index e9c93eb66b..c35825c64d 100644 --- a/packages/integration/src/lib/draw/index.ts +++ b/packages/integration/src/lib/draw/index.ts @@ -1,2 +1,3 @@ export * from './draw.state'; export * from './drawing-tool/drawing-tool.component'; +export * from './drawing-tool/drawing-tool.module'; From 6196cfe1b1ba6b76bbc341eefed06fa23ac644df Mon Sep 17 00:00:00 2001 From: Alexandre Caron Date: Thu, 21 Sep 2023 15:18:54 -0400 Subject: [PATCH 3/4] fix(InteractiveTour): add Placement types from @floating-ui --- package-lock.json | 45 ++++++++++--------- package.json | 1 + packages/common/package.json | 1 + .../interactive-tour.interface.ts | 4 +- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 468794740e..21799f6a70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "@angular/platform-browser-dynamic": "^16.2.5", "@angular/router": "^16.2.5", "@azure/msal-angular": "^3.0.4", + "@floating-ui/utils": "^0.1.4", "@mat-datetimepicker/core": "~12.0.0", "@mdi/angular-material": "^7.2.96", "@ngx-translate/core": "^15.0.0", @@ -27950,7 +27951,7 @@ }, "packages/auth": { "name": "@igo2/auth", - "version": "1.15.4", + "version": "16.0.0-rc.0", "license": "MIT", "dependencies": { "jwt-decode": "^2.2.0", @@ -27969,14 +27970,14 @@ "@angular/material": "^16.2.4", "@angular/router": "^16.2.5", "@azure/msal-angular": "^3.0.4", - "@igo2/core": "^1.15.4", - "@igo2/utils": "^1.15.4", + "@igo2/core": "^16.0.0-rc.0", + "@igo2/utils": "^16.0.0-rc.0", "rxjs": "^7.5.6" } }, "packages/common": { "name": "@igo2/common", - "version": "1.15.4", + "version": "16.0.0-rc.0", "license": "MIT", "dependencies": { "tslib": "^2.6.0" @@ -27989,8 +27990,8 @@ "@angular/core": "^16.2.5", "@angular/material": "^16.2.4", "@angular/platform-browser": "^16.2.5", - "@igo2/core": "^1.15.4", - "@igo2/utils": "^1.15.4", + "@igo2/core": "^16.0.0-rc.0", + "@igo2/utils": "^16.0.0-rc.0", "angular-shepherd": "16.0.0", "scroll-into-view-if-needed": "^3.0.0", "tinycolor2": "^1.6.0", @@ -27999,7 +28000,7 @@ }, "packages/context": { "name": "@igo2/context", - "version": "1.15.4", + "version": "16.0.0-rc.0", "license": "MIT", "dependencies": { "tslib": "^2.6.0" @@ -28014,18 +28015,18 @@ "@angular/forms": "^16.2.5", "@angular/material": "^16.2.4", "@angular/platform-browser": "^16.2.5", - "@igo2/auth": "^1.15.4", - "@igo2/common": "^1.15.4", - "@igo2/core": "^1.15.4", - "@igo2/geo": "^1.15.4", - "@igo2/utils": "^1.15.4", + "@igo2/auth": "^16.0.0-rc.0", + "@igo2/common": "^16.0.0-rc.0", + "@igo2/core": "^16.0.0-rc.0", + "@igo2/geo": "^16.0.0-rc.0", + "@igo2/utils": "^16.0.0-rc.0", "ol": "^8.1.0", "rxjs": "^7.8.0" } }, "packages/core": { "name": "@igo2/core", - "version": "1.15.4", + "version": "16.0.0-rc.0", "license": "MIT", "dependencies": { "@ngx-translate/core": "^15.0.0", @@ -28040,7 +28041,7 @@ "@angular/core": "^16.2.5", "@angular/platform-browser": "^16.2.5", "@angular/router": "^16.2.5", - "@igo2/utils": "^1.15.4", + "@igo2/utils": "^16.0.0-rc.0", "ngx-indexed-db": "^11.0.2", "ngx-toastr": "^17.0.0", "rxjs": "^7.8.0" @@ -28048,7 +28049,7 @@ }, "packages/geo": { "name": "@igo2/geo", - "version": "1.15.4", + "version": "16.0.0-rc.0", "license": "MIT", "dependencies": { "@turf/helpers": "^6.5.0", @@ -28077,9 +28078,9 @@ "@angular/forms": "^16.2.5", "@angular/material": "^16.2.4", "@angular/platform-browser": "^16.2.5", - "@igo2/common": "^1.15.4", - "@igo2/core": "^1.15.4", - "@igo2/utils": "^1.15.4", + "@igo2/common": "^16.0.0-rc.0", + "@igo2/core": "^16.0.0-rc.0", + "@igo2/utils": "^16.0.0-rc.0", "@mat-datetimepicker/core": "~12.0.0", "flexsearch": "0.7.21", "ngx-indexed-db": "^11.0.2", @@ -28092,7 +28093,7 @@ }, "packages/integration": { "name": "@igo2/integration", - "version": "1.15.4", + "version": "16.0.0-rc.0", "license": "MIT", "dependencies": { "tslib": "^2.6.0" @@ -28103,8 +28104,8 @@ "peerDependencies": { "@angular/common": "^16.2.5", "@angular/core": "^16.2.5", - "@igo2/context": "1.15.4", - "@igo2/geo": "1.15.4", + "@igo2/context": "16.0.0-rc.0", + "@igo2/geo": "16.0.0-rc.0", "jspdf": "^2.5.1", "jspdf-autotable": "^3.5.29", "rxjs": "^7.8.0" @@ -28112,7 +28113,7 @@ }, "packages/utils": { "name": "@igo2/utils", - "version": "1.15.4", + "version": "16.0.0-rc.0", "license": "MIT", "dependencies": { "bowser": "^2.10.0", diff --git a/package.json b/package.json index 074227b8e4..997cb77f4e 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "@angular/platform-browser-dynamic": "^16.2.5", "@angular/router": "^16.2.5", "@azure/msal-angular": "^3.0.4", + "@floating-ui/utils": "^0.1.4", "@mat-datetimepicker/core": "~12.0.0", "@mdi/angular-material": "^7.2.96", "@ngx-translate/core": "^15.0.0", diff --git a/packages/common/package.json b/packages/common/package.json index 6dc206c82b..7187c25af2 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -26,6 +26,7 @@ "@angular/core": "^16.2.5", "@angular/material": "^16.2.4", "@angular/platform-browser": "^16.2.5", + "@floating-ui/utils": "^0.1.4", "@igo2/core": "^16.0.0-rc.0", "@igo2/utils": "^16.0.0-rc.0", "angular-shepherd": "16.0.0", diff --git a/packages/common/src/lib/interactive-tour/interactive-tour.interface.ts b/packages/common/src/lib/interactive-tour/interactive-tour.interface.ts index 97ef2c3e78..d75198aa7f 100644 --- a/packages/common/src/lib/interactive-tour/interactive-tour.interface.ts +++ b/packages/common/src/lib/interactive-tour/interactive-tour.interface.ts @@ -1,6 +1,8 @@ +import { Placement } from '@floating-ui/utils'; + export interface InteractiveTourStep { element?: string; - position?: string; + position?: Placement; title?: string; text: string; beforeShow?: InteractiveTourAction; From d050252e96a5457a19213c3b1b3248f89aea12ed Mon Sep 17 00:00:00 2001 From: Alexandre Caron Date: Thu, 21 Sep 2023 15:20:31 -0400 Subject: [PATCH 4/4] Revert "Merge branch 'next' of https://github.com/infra-geo-ouverte/igo2-lib into 1398-interactive-tour" This reverts commit c2f9a2c0b8811cf18d0ac58257d2ed78b1abd423, reversing changes made to 6196cfe1b1ba6b76bbc341eefed06fa23ac644df. --- packages/integration/src/lib/draw/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/integration/src/lib/draw/index.ts b/packages/integration/src/lib/draw/index.ts index c35825c64d..e9c93eb66b 100644 --- a/packages/integration/src/lib/draw/index.ts +++ b/packages/integration/src/lib/draw/index.ts @@ -1,3 +1,2 @@ export * from './draw.state'; export * from './drawing-tool/drawing-tool.component'; -export * from './drawing-tool/drawing-tool.module';