From 2ec3c1a18a426fd86b19db0ce65f6492c5c5fb9b Mon Sep 17 00:00:00 2001 From: Alex Rock Date: Thu, 11 Apr 2024 22:44:00 -0600 Subject: [PATCH] feat: update dependencies --- package-lock.json | 154 +----------------- packages/angular/package.json | 8 +- .../angular/projects/spaces/package-lock.json | 20 +-- packages/angular/projects/spaces/package.json | 2 +- .../projects/spaces/src/utils/addSpaceInfo.ts | 4 +- .../spaces/src/utils/useInitializeSpace.ts | 2 +- packages/angular/src/app/app.component.ts | 11 +- packages/angular/src/app/reuse.component.ts | 11 +- .../angular/src/app/simplified.component.ts | 30 ++-- 9 files changed, 49 insertions(+), 193 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1ac41bf3..6868a4a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31352,10 +31352,10 @@ "@angular/platform-browser": "^16.2.0", "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", - "@flatfile/api": "^1.6.7", - "@flatfile/embedded-utils": "1.1.14", - "@flatfile/listener": "1.0.1", - "@flatfile/plugin-record-hook": "1.4.1", + "@flatfile/api": "^1.7.11", + "@flatfile/embedded-utils": "^1.1.15", + "@flatfile/listener": "^1.0.2", + "@flatfile/plugin-record-hook": "^1.4.1", "rxjs": "~7.8.0", "symbol-observable": "^4.0.0", "tslib": "^2.3.0", @@ -32272,32 +32272,6 @@ "resolved": "https://registry.npmjs.org/@flatfile/cross-env-config/-/cross-env-config-0.0.4.tgz", "integrity": "sha512-mNaqtASTly4N09pjQts5zDnYXFLC891TCxJEiFUnil8p6lQciyd0gnPSnhJD0TTlO5817gX3mLE9RDoAETtIbg==" }, - "packages/angular/node_modules/@flatfile/embedded-utils": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/@flatfile/embedded-utils/-/embedded-utils-1.1.14.tgz", - "integrity": "sha512-34P6yVGKRBcKjME+krzEvlyztzgJVoeZnWx5CpXNpflKYMMnskEOOIJh5ytUtcvBI3gnfIn8Mv9dTe+cCpzS3Q==", - "dependencies": { - "@flatfile/api": "^1.7.11", - "@flatfile/listener": "^1.0.0", - "@flatfile/util-common": "^1.1.0", - "pubnub": "^7.2.2" - } - }, - "packages/angular/node_modules/@flatfile/listener": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@flatfile/listener/-/listener-1.0.1.tgz", - "integrity": "sha512-XClO1KhQDL9Q7zfTANcMeole7Q/2QaIhzttZI+p04PjB+bUlIvk+yUbHvhnLahNkvLHRoIth4p+oBj8tPC1cxA==", - "dependencies": { - "ansi-colors": "^4.1.3", - "cross-fetch": "^4.0.0", - "flat": "^5.0.2", - "pako": "^2.1.0", - "wildcard-match": "^5.1.2" - }, - "peerDependencies": { - "@flatfile/api": "^1.5.10" - } - }, "packages/angular/node_modules/@flatfile/plugin-record-hook": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@flatfile/plugin-record-hook/-/plugin-record-hook-1.4.1.tgz", @@ -41083,126 +41057,6 @@ "@vue/server-renderer": "3.3.4", "@vue/shared": "3.3.4" } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.1.tgz", - "integrity": "sha512-uvTZrZa4D0bdWa1jJ7X1tBGIxzpqSnw/ATxWvoRO9CVBvXSx87JyuISY+BWsfLFF59IRodESdeZwkWM2l6+Kjg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.1.tgz", - "integrity": "sha512-/52ThlqdORPQt3+AlMoO+omicdYyUEDeRDGPAj86ULpV4dg+/GCFCKAmFWT0Q4zChFwsAoZUECLcKbRdcc0SNg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.1.tgz", - "integrity": "sha512-L4qNXSOHeu1hEAeeNsBgIYVnvm0gg9fj2O2Yx/qawgQEGuFBfcKqlmIE/Vp8z6gwlppxz5d7v6pmHs1NB6R37w==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.1.tgz", - "integrity": "sha512-QVvMrlrFFYvLtABk092kcZ5Mzlmsk2+SV3xYuAu8sbTuIoh0U2+HGNhVklmuYCuM3DAAxdiMQTNlRQmNH11udw==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.1.tgz", - "integrity": "sha512-bBnr+XuWc28r9e8gQ35XBtyi5KLHLhTbEvrSgcWna8atI48sNggjIK8IyiEBO3KIrcUVXYkldAzGXPEYMnKt1g==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.1.tgz", - "integrity": "sha512-EQGeE4S5c9v06jje9gr4UlxqUEA+zrsgPi6kg9VwR+dQHirzbnVJISF69UfKVkmLntknZJJI9XpWPB6q0Z7mTg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.1.tgz", - "integrity": "sha512-1y31Q6awzofVjmbTLtRl92OX3s+W0ZfO8AP8fTnITcIo9a6ATDc/eqa08fd6tSpFu6IFpxOBbdevOjwYTGx/AQ==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.5.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.1.tgz", - "integrity": "sha512-+9XBQizy7X/GuwNegq+5QkkxAPV7SBsIwapVRQd9WSvvU20YO23B3bZUpevdabi4fsd25y9RJDDncljy/V54ww==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } } } } diff --git a/packages/angular/package.json b/packages/angular/package.json index bdc93506..e01249ba 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -18,10 +18,10 @@ "@angular/platform-browser": "^16.2.0", "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", - "@flatfile/api": "^1.6.7", - "@flatfile/embedded-utils": "1.1.14", - "@flatfile/listener": "1.0.1", - "@flatfile/plugin-record-hook": "1.4.1", + "@flatfile/api": "^1.7.11", + "@flatfile/embedded-utils": "^1.1.15", + "@flatfile/listener": "^1.0.2", + "@flatfile/plugin-record-hook": "^1.4.1", "rxjs": "~7.8.0", "symbol-observable": "^4.0.0", "tslib": "^2.3.0", diff --git a/packages/angular/projects/spaces/package-lock.json b/packages/angular/projects/spaces/package-lock.json index 84eb0460..ff2a4a9e 100644 --- a/packages/angular/projects/spaces/package-lock.json +++ b/packages/angular/projects/spaces/package-lock.json @@ -1,15 +1,15 @@ { "name": "@flatfile/angular-sdk", - "version": "1.1.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@flatfile/angular-sdk", - "version": "1.1.0", + "version": "1.3.0", "license": "MIT", "dependencies": { - "@flatfile/embedded-utils": "1.1.14", + "@flatfile/embedded-utils": "1.1.15", "@flatfile/hooks": "^1.3.2", "tslib": "^2.3.0" }, @@ -71,12 +71,12 @@ "integrity": "sha512-mNaqtASTly4N09pjQts5zDnYXFLC891TCxJEiFUnil8p6lQciyd0gnPSnhJD0TTlO5817gX3mLE9RDoAETtIbg==" }, "node_modules/@flatfile/embedded-utils": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/@flatfile/embedded-utils/-/embedded-utils-1.1.14.tgz", - "integrity": "sha512-34P6yVGKRBcKjME+krzEvlyztzgJVoeZnWx5CpXNpflKYMMnskEOOIJh5ytUtcvBI3gnfIn8Mv9dTe+cCpzS3Q==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/@flatfile/embedded-utils/-/embedded-utils-1.1.15.tgz", + "integrity": "sha512-xi0XWDo7ZdTHwDcNgfM3Mewg6w2kD14w1lpvQB0/KW6SOCjxSHd6CY/GazWVXf0DOSaaaW2UaiVrsH855cOwfA==", "dependencies": { "@flatfile/api": "^1.7.11", - "@flatfile/listener": "^1.0.0", + "@flatfile/listener": "^1.0.2", "@flatfile/util-common": "^1.1.0", "pubnub": "^7.2.2" } @@ -87,9 +87,9 @@ "integrity": "sha512-5HUBar6CnhhMU7lr4DnD79QfV4MtR1dUjZQJdt50HCS5pxy+tbF70JJSnoF/6itj+0hATkSC/Ep5C1XfABAGYw==" }, "node_modules/@flatfile/listener": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@flatfile/listener/-/listener-1.0.1.tgz", - "integrity": "sha512-XClO1KhQDL9Q7zfTANcMeole7Q/2QaIhzttZI+p04PjB+bUlIvk+yUbHvhnLahNkvLHRoIth4p+oBj8tPC1cxA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@flatfile/listener/-/listener-1.0.2.tgz", + "integrity": "sha512-/VW0UvSGBwDG85LbSOa9Nj2aCQ8pMNsaGqiK7N/tWCXtiwF0Pnani1KoESMsGN3ECS7IIrDNuGYmtlc1igUDiQ==", "dependencies": { "ansi-colors": "^4.1.3", "cross-fetch": "^4.0.0", diff --git a/packages/angular/projects/spaces/package.json b/packages/angular/projects/spaces/package.json index 35cd54c1..db7a57da 100644 --- a/packages/angular/projects/spaces/package.json +++ b/packages/angular/projects/spaces/package.json @@ -17,7 +17,7 @@ "@angular/core": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" }, "dependencies": { - "@flatfile/embedded-utils": "1.1.14", + "@flatfile/embedded-utils": "1.1.15", "@flatfile/hooks": "^1.3.2", "tslib": "^2.3.0" }, diff --git a/packages/angular/projects/spaces/src/utils/addSpaceInfo.ts b/packages/angular/projects/spaces/src/utils/addSpaceInfo.ts index 3700c8e9..67ff0938 100644 --- a/packages/angular/projects/spaces/src/utils/addSpaceInfo.ts +++ b/packages/angular/projects/spaces/src/utils/addSpaceInfo.ts @@ -23,7 +23,7 @@ const addSpaceInfo = async ( if (workbook) { const localWorkbook = await api.workbooks.create({ spaceId, - environmentId, + ...(environmentId ? { environmentId } : {}), ...workbook, }) if (!localWorkbook || !localWorkbook.data || !localWorkbook.data.id) { @@ -32,7 +32,7 @@ const addSpaceInfo = async ( } const updatedSpace = await api.spaces.update(spaceId, { - environmentId, + ...(environmentId ? { environmentId } : {}), metadata: { theme: themeConfig, sidebarConfig: sidebarConfig || { showSidebar: false }, diff --git a/packages/angular/projects/spaces/src/utils/useInitializeSpace.ts b/packages/angular/projects/spaces/src/utils/useInitializeSpace.ts index 97572741..6666f883 100644 --- a/packages/angular/projects/spaces/src/utils/useInitializeSpace.ts +++ b/packages/angular/projects/spaces/src/utils/useInitializeSpace.ts @@ -56,7 +56,7 @@ const useInitializeSpace = ( try { space = await limitedAccessApi.spaces.create({ - environmentId, + ...(environmentId ? { environmentId } : {}), ...spaceRequestBody, }) } catch (error) { diff --git a/packages/angular/src/app/app.component.ts b/packages/angular/src/app/app.component.ts index 11fc3510..51d11360 100644 --- a/packages/angular/src/app/app.component.ts +++ b/packages/angular/src/app/app.component.ts @@ -1,7 +1,7 @@ -import { Component } from '@angular/core'; +import { Component } from '@angular/core' import { ISpace, SpaceService } from '@flatfile/angular' -import { workbook } from "./workbook"; -import { listener } from "./listener"; +import { workbook } from './workbook' +import { listener } from './listener' @Component({ selector: 'app-root', @@ -9,13 +9,13 @@ import { listener } from "./listener"; styleUrls: ['./app.component.scss'], }) export class AppComponent { - showSpace: boolean = false; + showSpace: boolean = false constructor(private spaceService: SpaceService) {} toggleSpace() { this.spaceService.OpenEmbed() - this.showSpace = !this.showSpace; + this.showSpace = !this.showSpace } closeSpace() { @@ -24,7 +24,6 @@ export class AppComponent { spaceProps: ISpace = { name: 'Trste!', - environmentId: 'us_env_1234', publishableKey: 'sk_1234', workbook, listener, diff --git a/packages/angular/src/app/reuse.component.ts b/packages/angular/src/app/reuse.component.ts index 7e017a7c..91213e6b 100644 --- a/packages/angular/src/app/reuse.component.ts +++ b/packages/angular/src/app/reuse.component.ts @@ -1,6 +1,6 @@ -import { Component } from '@angular/core'; +import { Component } from '@angular/core' import { ISpace, SpaceService } from '@flatfile/angular' -import { listener } from "./listener"; +import { listener } from './listener' @Component({ selector: 'app-root', @@ -8,13 +8,13 @@ import { listener } from "./listener"; styleUrls: ['./app.component.scss'], }) export class AppComponent { - showSpace: boolean = false; + showSpace: boolean = false constructor(private spaceService: SpaceService) {} toggleSpace() { this.spaceService.OpenEmbed() - this.showSpace = !this.showSpace; + this.showSpace = !this.showSpace } closeSpace() { @@ -24,9 +24,8 @@ export class AppComponent { spaceProps: ISpace = { space: { id: 'us_sp_123', - accessToken: 'sk_1234' + accessToken: 'sk_1234', }, - environmentId: 'us_env_1234', listener, closeSpace: { operation: 'submitActionFg', diff --git a/packages/angular/src/app/simplified.component.ts b/packages/angular/src/app/simplified.component.ts index 39de35ad..2a409a18 100644 --- a/packages/angular/src/app/simplified.component.ts +++ b/packages/angular/src/app/simplified.component.ts @@ -1,36 +1,40 @@ -import { Component, OnInit } from '@angular/core'; -import { sheet } from './sheet'; +import { Component, OnInit } from '@angular/core' +import { sheet } from './sheet' @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + styleUrls: ['./app.component.scss'], }) export class AppComponent implements OnInit { - showSpace: boolean = false; - data: any; + showSpace: boolean = false + data: any constructor() {} - ngOnInit() { } - - title = 'angular'; + ngOnInit() {} + title = 'angular' toggleSpace() { - this.showSpace = !this.showSpace; + this.showSpace = !this.showSpace } closeSpace() { - this.showSpace = false; + this.showSpace = false } spaceProps = { name: 'My space!', - environmentId: 'us_env_1234', publishableKey: 'sk_1234', sheet, - onSubmit: async ({ job, sheet, }: { job?: any, sheet?: any }): Promise => { + onSubmit: async ({ + job, + sheet, + }: { + job?: any + sheet?: any + }): Promise => { const data = await sheet.allData() console.log('onSubmit', data) }, @@ -46,6 +50,6 @@ export class AppComponent implements OnInit { closeSpace: { operation: 'submitActionFg', onClose: this.closeSpace.bind(this), - } + }, } }