From 4a03b35e2d78828f25673f4e42f45929b4b87fe2 Mon Sep 17 00:00:00 2001 From: Nicolas Molina Monroy Date: Tue, 30 Jul 2024 11:02:21 -0400 Subject: [PATCH] feat(ui): create a collapse breadcrumb (#29379) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Parent Issue https://github.com/dotCMS/core/issues/29358 ### Proposed Changes * Create new component named DotCollapseBreadcrumbComponent * Create DotCollapseBreadcrumbComponent Storybook * Create basic functionality to collapse items based on maxItems input * Fix bug with dot-crumbtrail scope styles ### Checklist - [x] Tests - [x] Translations - [x] Security Implications Contemplated (add notes if applicable) ### Goal Create a reusable breadcrumb component in the @dotcms/ui package that extends the official PrimeNG [breadcrumb](https://www.primefaces.org/primeng-v15-lts/breadcrumb) by adding collapsible items. ### References Screenshot 2024-07-10 at 12 16 04 PM Screenshot 2024-07-10 at 12 16 12 PM Screenshot 2024-07-10 at 12 16 19 PM ### Result ![Screenshot 2024-07-29 at 3 29 45 PM](https://github.com/user-attachments/assets/f8d526c9-813f-4cbc-8f8e-02b4391f165b) ![Screenshot 2024-07-29 at 3 29 56 PM](https://github.com/user-attachments/assets/a3032765-da68-44da-b65e-b5c6acaa6c54) ![Screenshot 2024-07-29 at 3 30 08 PM](https://github.com/user-attachments/assets/169bb329-e951-4f25-9429-845de7e17d92) --- .gitignore | 10 ++ core-web/.prettierignore | 1 + .../dot-crumbtrail.component.scss | 2 +- .../menu/DotCollapseBreadcrumb.stories.ts | 81 ++++++++++++ core-web/libs/ui/src/index.ts | 1 + .../dot-collapse-breadcrumb.component.html | 19 +++ .../dot-collapse-breadcrumb.component.spec.ts | 101 +++++++++++++++ .../dot-collapse-breadcrumb.component.ts | 73 +++++++++++ .../dot-collapse-breadcrumb.costants.ts | 1 + core-web/yarn.lock | 117 +++++++++++------- 10 files changed, 359 insertions(+), 47 deletions(-) create mode 100644 core-web/apps/dotcms-ui/src/stories/dotcms/menu/DotCollapseBreadcrumb.stories.ts create mode 100644 core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.html create mode 100644 core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.spec.ts create mode 100644 core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.ts create mode 100644 core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.costants.ts diff --git a/.gitignore b/.gitignore index a0c8c5623aaf..054c298a51fc 100644 --- a/.gitignore +++ b/.gitignore @@ -108,6 +108,16 @@ node_modules/ /core-web/target /core-web/~/dotcms/* +# Yarn +/core-web/.yarn/* +/core-web/.pnp.* +/core-web/.pnp** +!/core-web/.yarn/cache +!/core-web/.yarn/releases +!/core-web/.yarn/plugins +!/core-web/.yarn/sdks +!/core-web/.yarn/versions + # misc /core-web/.nx /core-web/.angular/cache diff --git a/core-web/.prettierignore b/core-web/.prettierignore index 248f8594d74e..6cd679cf8e92 100644 --- a/core-web/.prettierignore +++ b/core-web/.prettierignore @@ -5,6 +5,7 @@ /target /tmp /tools +/.yarn package.json package-lock.json diff --git a/core-web/apps/dotcms-ui/src/app/view/components/dot-crumbtrail/dot-crumbtrail.component.scss b/core-web/apps/dotcms-ui/src/app/view/components/dot-crumbtrail/dot-crumbtrail.component.scss index 5133ad405ede..6ce41e8d6c4a 100644 --- a/core-web/apps/dotcms-ui/src/app/view/components/dot-crumbtrail/dot-crumbtrail.component.scss +++ b/core-web/apps/dotcms-ui/src/app/view/components/dot-crumbtrail/dot-crumbtrail.component.scss @@ -1,6 +1,6 @@ @use "variables" as *; -::ng-deep .p-breadcrumb { +::ng-deep dot-crumbtrail .p-breadcrumb { ul li { .p-menuitem-link[href] { .p-menuitem-text { diff --git a/core-web/apps/dotcms-ui/src/stories/dotcms/menu/DotCollapseBreadcrumb.stories.ts b/core-web/apps/dotcms-ui/src/stories/dotcms/menu/DotCollapseBreadcrumb.stories.ts new file mode 100644 index 000000000000..1ece5d8ace1d --- /dev/null +++ b/core-web/apps/dotcms-ui/src/stories/dotcms/menu/DotCollapseBreadcrumb.stories.ts @@ -0,0 +1,81 @@ +/* eslint-disable no-console */ +import { + Meta, + StoryObj, + moduleMetadata, + componentWrapperDecorator, + argsToTemplate, + applicationConfig +} from '@storybook/angular'; + +import { importProvidersFrom } from '@angular/core'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +import { MenuItem } from 'primeng/api'; +import { ToastModule } from 'primeng/toast'; + +import { DotCollapseBreadcrumbComponent } from '@dotcms/ui'; + +type Args = DotCollapseBreadcrumbComponent & { + model: MenuItem[]; + maxItems: number; +}; + +const meta: Meta = { + title: 'DotCMS/Menu/DotCollapseBreadcrumb', + component: DotCollapseBreadcrumbComponent, + decorators: [ + applicationConfig({ + providers: [importProvidersFrom(BrowserAnimationsModule)] + }), + moduleMetadata({ + imports: [BrowserAnimationsModule, ToastModule] + }), + componentWrapperDecorator( + (story) => + `
${story}
` + ) + ], + parameters: { + layout: 'centered', + docs: { + description: { + component: + 'Breadcrumb provides contextual information about page hierarchy.: https://primefaces.org/primeng/showcase/#/breadcrumb' + } + } + }, + args: { + maxItems: 4, + model: [ + { label: 'Electronics', command: console.log }, + { label: 'Computer', command: console.log }, + { label: 'Accessories', command: console.log }, + { label: 'Keyboard', command: console.log }, + { label: 'Wireless', command: console.log } + ] + }, + argTypes: { + model: { + description: 'Menu items to display' + }, + maxItems: { + description: 'Max items to display', + control: { type: 'number' } + } + }, + render: (args: Args) => { + return { + props: { + ...args + }, + template: `` + }; + } +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = {}; diff --git a/core-web/libs/ui/src/index.ts b/core-web/libs/ui/src/index.ts index 1ad687a964bb..4c4fbddb77c9 100644 --- a/core-web/libs/ui/src/index.ts +++ b/core-web/libs/ui/src/index.ts @@ -30,6 +30,7 @@ export * from './lib/components/dot-menu/dot-menu.component'; export * from './lib/components/dot-action-menu-button/dot-action-menu-button.component'; export * from './lib/components/dot-ai-image-prompt/ai-image-prompt.component'; export * from './lib/components/dot-ai-image-prompt/ai-image-prompt.store'; +export * from './lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component'; // Directives export * from './lib/dot-field-required/dot-field-required.directive'; diff --git a/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.html b/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.html new file mode 100644 index 000000000000..ebe107f2997b --- /dev/null +++ b/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.html @@ -0,0 +1,19 @@ +
+ @if ($isCollapsed()) { +
+
+ + +
+
+ +
+
+ } + +
diff --git a/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.spec.ts b/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.spec.ts new file mode 100644 index 000000000000..dd34e9e11c05 --- /dev/null +++ b/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.spec.ts @@ -0,0 +1,101 @@ +import { byTestId, createRoutingFactory, Spectator } from '@ngneat/spectator'; + +import { ActivatedRoute } from '@angular/router'; + +import { ButtonModule } from 'primeng/button'; +import { MenuModule } from 'primeng/menu'; + +import { DotCollapseBreadcrumbComponent } from './dot-collapse-breadcrumb.component'; +import { MAX_ITEMS } from './dot-collapse-breadcrumb.costants'; + +describe('DotCollapseBreadcrumbComponent', () => { + let spectator: Spectator; + + const createComponent = createRoutingFactory({ + component: DotCollapseBreadcrumbComponent, + providers: [ActivatedRoute], + imports: [MenuModule, ButtonModule] + }); + + beforeEach(() => { + spectator = createComponent(); + }); + + it('should be created', () => { + spectator.detectChanges(); + expect(spectator.component).toBeTruthy(); + }); + + describe('MaxItems', () => { + it('should have the default', () => { + spectator.detectChanges(); + expect(spectator.component.$maxItems()).toBe(MAX_ITEMS); + }); + + it('should show the options without btn collapse', () => { + spectator.setInput('maxItems', 5); + spectator.setInput('model', [ + { label: 'Electronics', url: '' }, + { label: 'Computer', url: '' }, + { label: 'Accessories', url: '' }, + { label: 'Keyboard', url: '' }, + { label: 'Wireless', url: '' } + ]); + spectator.detectChanges(); + expect(spectator.query(byTestId('btn-collapse'))).toBeNull(); + expect(spectator.queryAll('.p-menuitem-link').length).toBe(5); + }); + + it('should show maxItems options with btn collapse', () => { + spectator.setInput('maxItems', 4); + spectator.setInput('model', [ + { label: 'Electronics', url: '' }, + { label: 'Computer', url: '' }, + { label: 'Accessories', url: '' }, + { label: 'Keyboard', url: '' }, + { label: 'Wireless', url: '' } + ]); + spectator.detectChanges(); + expect(spectator.query(byTestId('btn-collapse'))).toBeTruthy(); + expect(spectator.queryAll('.p-menuitem-link').length).toBe(4); + }); + }); + + it('should call itemClick when click home ', () => { + spectator.setInput('maxItems', 5); + spectator.setInput('model', [ + { label: 'Electronics', url: '' }, + { label: 'Computer', url: '' }, + { label: 'Accessories', url: '' }, + { label: 'Keyboard', url: '' }, + { label: 'Wireless', url: '' } + ]); + spectator.detectChanges(); + + const itemClickSpy = spyOn(spectator.component.onItemClick, 'emit'); + const firstEl = spectator.query('.p-menuitem-link'); + spectator.click(firstEl); + spectator.detectChanges(); + + expect(itemClickSpy).toHaveBeenCalled(); + }); + + it('should call itemClick when click home with routerLink', () => { + spectator.setInput('maxItems', 5); + spectator.setInput('model', [ + { label: 'Electronics', routerLink: '/' }, + { label: 'Computer', routerLink: '/' }, + { label: 'Accessories', routerLink: '/' }, + { label: 'Keyboard', routerLink: '/' }, + { label: 'Wireless', routerLink: '/' } + ]); + spectator.detectChanges(); + + const itemClickSpy = spyOn(spectator.component.onItemClick, 'emit'); + const firstEl = spectator.query('.p-menuitem-link'); + spectator.click(firstEl); + spectator.detectChanges(); + + expect(itemClickSpy).toHaveBeenCalled(); + }); +}); diff --git a/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.ts b/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.ts new file mode 100644 index 000000000000..3bfa35ee3cf2 --- /dev/null +++ b/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.component.ts @@ -0,0 +1,73 @@ +import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import { MenuItem } from 'primeng/api'; +import { BreadcrumbModule } from 'primeng/breadcrumb'; +import { ButtonModule } from 'primeng/button'; +import { ChevronRightIcon } from 'primeng/icons/chevronright'; +import { MenuModule } from 'primeng/menu'; + +import { MAX_ITEMS } from './dot-collapse-breadcrumb.costants'; +/** + * Component to display a breadcrumb with a collapse button + * + * @export + * @class DotCollapseBreadcrumbComponent + */ +@Component({ + imports: [ChevronRightIcon, ButtonModule, MenuModule, RouterModule, BreadcrumbModule], + standalone: true, + selector: 'dot-collapse-breadcrumb', + templateUrl: './dot-collapse-breadcrumb.component.html', + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class DotCollapseBreadcrumbComponent { + /** + * Menu items to display + * + * @memberof DotCollapseBreadcrumbComponent + */ + $model = input([], { alias: 'model' }); + /** + * Max items to display + * + * @memberof DotCollapseBreadcrumbComponent + */ + $maxItems = input(MAX_ITEMS, { alias: 'maxItems' }); + /** + * Items to show + * + * @memberof DotCollapseBreadcrumbComponent + */ + $itemsToShow = computed(() => { + const items = this.$model(); + const size = items.length; + const maxItems = this.$maxItems(); + + return size > maxItems ? items.slice(size - maxItems) : items; + }); + /** + * Items to hide + * + * @memberof DotCollapseBreadcrumbComponent + */ + $itemsToHide = computed(() => { + const items = this.$model(); + const size = items.length; + const maxItems = this.$maxItems(); + + return size > maxItems ? items.slice(0, size - maxItems) : []; + }); + /** + * Indicates if the menu is collapsed + * + * @memberof DotCollapseBreadcrumbComponent + */ + $isCollapsed = computed(() => this.$itemsToHide().length > 0); + /** + * Event emitted when a menu item is clicked + * + * @memberof DotCollapseBreadcrumbComponent + */ + onItemClick = output<{ originalEvent: Event; item: MenuItem }>(); +} diff --git a/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.costants.ts b/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.costants.ts new file mode 100644 index 000000000000..3a82f7fff768 --- /dev/null +++ b/core-web/libs/ui/src/lib/components/dot-collapse-breadcrumb/dot-collapse-breadcrumb.costants.ts @@ -0,0 +1 @@ +export const MAX_ITEMS = 4; diff --git a/core-web/yarn.lock b/core-web/yarn.lock index 24ebcd8725ab..605040fd867f 100644 --- a/core-web/yarn.lock +++ b/core-web/yarn.lock @@ -7371,13 +7371,13 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" -"@typescript-eslint/scope-manager@7.17.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.17.0.tgz#e072d0f914662a7bfd6c058165e3c2b35ea26b9d" - integrity sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA== +"@typescript-eslint/scope-manager@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz#c928e7a9fc2c0b3ed92ab3112c614d6bd9951c83" + integrity sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA== dependencies: - "@typescript-eslint/types" "7.17.0" - "@typescript-eslint/visitor-keys" "7.17.0" + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/visitor-keys" "7.18.0" "@typescript-eslint/scope-manager@7.2.0": version "7.2.0" @@ -7426,12 +7426,12 @@ ts-api-utils "^1.0.1" "@typescript-eslint/type-utils@^7.3.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.17.0.tgz#c5da78feb134c9c9978cbe89e2b1a589ed22091a" - integrity sha512-XD3aaBt+orgkM/7Cei0XNEm1vwUxQ958AOLALzPlbPqb8C1G8PZK85tND7Jpe69Wualri81PLU+Zc48GVKIMMA== + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz#2165ffaee00b1fbbdd2d40aa85232dab6998f53b" + integrity sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA== dependencies: - "@typescript-eslint/typescript-estree" "7.17.0" - "@typescript-eslint/utils" "7.17.0" + "@typescript-eslint/typescript-estree" "7.18.0" + "@typescript-eslint/utils" "7.18.0" debug "^4.3.4" ts-api-utils "^1.3.0" @@ -7445,10 +7445,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/types@7.17.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.17.0.tgz#7ce8185bdf06bc3494e73d143dbf3293111b9cff" - integrity sha512-a29Ir0EbyKTKHnZWbNsrc/gqfIBqYPwj3F2M+jWE/9bqfEHg0AMtXzkbUkOG6QgEScxh2+Pz9OXe11jHDnHR7A== +"@typescript-eslint/types@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9" + integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ== "@typescript-eslint/types@7.2.0": version "7.2.0" @@ -7487,13 +7487,13 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/typescript-estree@7.17.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.17.0.tgz#dcab3fea4c07482329dd6107d3c6480e228e4130" - integrity sha512-72I3TGq93t2GoSBWI093wmKo0n6/b7O4j9o8U+f65TVD0FS6bI2180X5eGEr8MA8PhKMvYe9myZJquUT2JkCZw== +"@typescript-eslint/typescript-estree@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz#b5868d486c51ce8f312309ba79bdb9f331b37931" + integrity sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA== dependencies: - "@typescript-eslint/types" "7.17.0" - "@typescript-eslint/visitor-keys" "7.17.0" + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/visitor-keys" "7.18.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -7542,15 +7542,15 @@ "@typescript-eslint/typescript-estree" "6.21.0" semver "^7.5.4" -"@typescript-eslint/utils@7.17.0", "@typescript-eslint/utils@^7.3.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.17.0.tgz#815cd85b9001845d41b699b0ce4f92d6dfb84902" - integrity sha512-r+JFlm5NdB+JXc7aWWZ3fKSm1gn0pkswEwIYsrGPdsT2GjsRATAKXiNtp3vgAAO1xZhX8alIOEQnNMl3kbTgJw== +"@typescript-eslint/utils@7.18.0", "@typescript-eslint/utils@^7.3.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f" + integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw== dependencies: "@eslint-community/eslint-utils" "^4.4.0" - "@typescript-eslint/scope-manager" "7.17.0" - "@typescript-eslint/types" "7.17.0" - "@typescript-eslint/typescript-estree" "7.17.0" + "@typescript-eslint/scope-manager" "7.18.0" + "@typescript-eslint/types" "7.18.0" + "@typescript-eslint/typescript-estree" "7.18.0" "@typescript-eslint/utils@7.2.0": version "7.2.0" @@ -7605,12 +7605,12 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@typescript-eslint/visitor-keys@7.17.0": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.17.0.tgz#680465c734be30969e564b4647f38d6cdf49bfb0" - integrity sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A== +"@typescript-eslint/visitor-keys@7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz#0564629b6124d67607378d0f0332a0495b25e7d7" + integrity sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg== dependencies: - "@typescript-eslint/types" "7.17.0" + "@typescript-eslint/types" "7.18.0" eslint-visitor-keys "^3.4.3" "@typescript-eslint/visitor-keys@7.2.0": @@ -13224,7 +13224,7 @@ function-bind@^1.1.2: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== -function.prototype.name@^1.1.5, function.prototype.name@^1.1.6: +function.prototype.name@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== @@ -22158,7 +22158,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -22176,6 +22176,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -22272,7 +22281,7 @@ stringify-package@^1.0.0, stringify-package@^1.0.1: resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -22300,6 +22309,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -24187,12 +24203,12 @@ which-boxed-primitive@^1.0.2: is-symbol "^1.0.3" which-builtin-type@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.3.tgz#b1b8443707cc58b6e9bf98d32110ff0c2cbd029b" - integrity sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw== + version "1.1.4" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.4.tgz#592796260602fc3514a1b5ee7fa29319b72380c3" + integrity sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w== dependencies: - function.prototype.name "^1.1.5" - has-tostringtag "^1.0.0" + function.prototype.name "^1.1.6" + has-tostringtag "^1.0.2" is-async-function "^2.0.0" is-date-object "^1.0.5" is-finalizationregistry "^1.0.2" @@ -24201,10 +24217,10 @@ which-builtin-type@^1.1.3: is-weakref "^1.0.2" isarray "^2.0.5" which-boxed-primitive "^1.0.2" - which-collection "^1.0.1" - which-typed-array "^1.1.9" + which-collection "^1.0.2" + which-typed-array "^1.1.15" -which-collection@^1.0.1: +which-collection@^1.0.1, which-collection@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== @@ -24219,7 +24235,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== -which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2, which-typed-array@^1.1.9: +which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.2: version "1.1.15" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== @@ -24299,7 +24315,7 @@ worker-farm@^1.6.0, worker-farm@^1.7.0: dependencies: errno "~0.1.7" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -24334,6 +24350,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"