Skip to content

fix(global): Replace Angular-uuid with uuid #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
To setup this project, clone the repo and run `npm i` to install the dependencies.

## Documentation

You can find the documentation for all of our packages on our [Documentation Website](https://open-source.studiohyperdrive.be/).

### NPM
Expand Down
58 changes: 29 additions & 29 deletions libs/angular/authentication/package.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
"name": "@studiohyperdrive/ngx-auth",
"version": "19.0.0",
"description": "A library of core authentication functionality used with @studiohyperdrive/types-auth.",
"keywords": [
"angular",
"authentication",
"auth",
"feature",
"feature flag",
"a-b-testing",
"permission",
"permissions",
"guard",
"interceptor",
"directive",
"user",
"session"
],
"homepage": "https://open-source.studiohyperdrive.be/docs/angular/authentication/installation",
"license": "MIT",
"author": {
"name": "Studio Hyperdrive",
"url": "https://studiohyperdrive.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/studiohyperdrive/hyperdrive-opensource",
"directory": "libs/angular/authentication/src"
},
"version": "19.0.0",
"description": "A library of core authentication functionality used with @studiohyperdrive/types-auth.",
"keywords": [
"angular",
"authentication",
"auth",
"feature",
"feature flag",
"a-b-testing",
"permission",
"permissions",
"guard",
"interceptor",
"directive",
"user",
"session"
],
"homepage": "https://open-source.studiohyperdrive.be/docs/angular/authentication/installation",
"license": "MIT",
"author": {
"name": "Studio Hyperdrive",
"url": "https://studiohyperdrive.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/studiohyperdrive/hyperdrive-opensource",
"directory": "libs/angular/authentication/src"
},
"peerDependencies": {
"@angular/core": "^19.0.0",
"rxjs": "7.8.1",
"@angular/common": "19.0.3",
"obj-clean": "3.0.1",
"@studiohyperdrive/types-auth": "^2.0.0"
"@angular/router": "19.0.3"
},
"sideEffects": false
}
4 changes: 2 additions & 2 deletions libs/angular/i18n/src/lib/resolvers/i18n/i18n.resolver.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { UUID } from 'angular2-uuid';
import { v4 as uuid } from 'uuid';
import { finalize, map, Observable } from 'rxjs';

import { NgxI18nLoadingService, NgxI18nService } from '../../services';
Expand All @@ -17,7 +17,7 @@ export class NgxI18nTranslationLoaderResolver {

public resolve(): Observable<boolean> {
// Iben: Generate an id for the translations we're about to load
const id = UUID.UUID();
const id = uuid();

// Iben: Dispatch to the loader service that we're about to load a set of translations
this.i18nLoadingService.dispatchTranslationLoaderAction({ id, state: 'LOADING' });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Directive, ElementRef, HostBinding, HostListener, Input, Type } from '@angular/core';
import { UUID } from 'angular2-uuid';
import { v4 as uuid } from 'uuid';

import { NgxTooltipAbstractComponent } from '../../abstracts';
import { NgxTooltipPosition } from '../../types';
Expand Down Expand Up @@ -59,7 +59,7 @@ export class NgxTooltipDirective {
/**
* The id of the tooltip, unique in the DOM, required for accessibility. By default, this is an autogenerated UUID.
*/
@HostBinding('attr.aria-describedby') @Input() public ngxTooltipId: string = UUID.UUID();
@HostBinding('attr.aria-describedby') @Input() public ngxTooltipId: string = uuid();

/**
* The text of the tooltip
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { filter, map, Observable, of, take, tap } from 'rxjs';
import { inject } from '@angular/core';

import { UUID } from 'angular2-uuid';
import { v4 as uuid } from 'uuid';

import { LiveAnnouncer } from '@angular/cdk/a11y';
import {
Expand Down Expand Up @@ -120,7 +120,7 @@ export abstract class NgxAccessibleDragAndDropAbstractService {
public setDragAndDropDescription(parent: HTMLElement, description?: string): Observable<void> {
// Iben: Create the description element and its id
const element: HTMLParagraphElement = document.createElement('p');
const id: string = UUID.UUID();
const id: string = uuid();

// Iben: Take the current language to fetch the message
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
TemplateRef,
ViewChild,
} from '@angular/core';
import { UUID } from 'angular2-uuid';
import { v4 as uuid } from 'uuid';

import { NgTemplateOutlet } from '@angular/common';
import { NgxAccordionComponent } from '../accordion.component';
Expand Down Expand Up @@ -102,7 +102,7 @@ export class NgxAccordionItemComponent implements OnInit, AfterViewInit, OnDestr
/**
* The id of the accordion item
*/
public readonly id: string = UUID.UUID();
public readonly id: string = uuid();

/**
* Whether the accordion item is open
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MarkerView } from 'markerjs-live';
import { NgxWindowService } from '@studiohyperdrive/ngx-core';

import { Observable, Subject } from 'rxjs';
import { UUID } from 'angular2-uuid';
import { v4 as uuid } from 'uuid';
import {
NgxImageMarker,
NgxImageMarkerConfiguration,
Expand Down Expand Up @@ -48,7 +48,7 @@ export class NgxImageMarkerService implements OnDestroy {
}

// Iben: Create an id for the marker
const id = UUID.UUID();
const id = uuid();

// Iben: Depending on the provided mode, we create a edit view or a non editable view
return configuration.mode === 'edit'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
ViewChild,
WritableSignal,
} from '@angular/core';
import { UUID } from 'angular2-uuid';
import { v4 as uuid } from 'uuid';

import { NgxTourInteraction, NgxTourStepPosition } from '../../types';
import { NgxTourService } from '../../services';
Expand Down Expand Up @@ -121,7 +121,7 @@ export abstract class NgxTourStepComponent<DataType = any> implements OnInit, Af

// Iben: If the title element does not have an id, we generate one
if (!id) {
id = UUID.UUID();
id = uuid();
this.titleElement.nativeElement.setAttribute('id', id);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Input,
OnDestroy,
} from '@angular/core';
import { UUID } from 'angular2-uuid';
import { v4 as uuid } from 'uuid';

import { NgxTourService } from '../../services';

Expand Down Expand Up @@ -61,7 +61,7 @@ export class NgxTourItemDirective implements AfterViewInit, OnDestroy {

// Iben: Check if the element has an id, if not, give it a new id for accessibility
if (!this.elementRef.nativeElement.getAttribute('id')) {
this.elementRef.nativeElement.setAttribute('id', UUID.UUID());
this.elementRef.nativeElement.setAttribute('id', uuid());
}
}

Expand Down
25 changes: 17 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@
"@nx/eslint-plugin": "20.2.1",
"@studiohyperdrive/env": "1.0.4",
"@studiohyperdrive/ngx-core": "19.1.0",
"@studiohyperdrive/utils": "2.0.1",
"@studiohyperdrive/types-auth": "^2.0.0",
"@studiohyperdrive/utils": "2.0.1",
"@types/lodash": "4.17.12",
"angular2-uuid": "1.1.1",
"date-fns": "3.6.0",
"deepmerge-ts": "7.1.3",
"dot-prop": "9.0.0",
Expand All @@ -68,6 +67,7 @@
"swagger-express-ts": "1.1.0",
"tsconfig-paths": "4.2.0",
"tslib": "^2.8.0",
"uuid": "11.1.0",
"vanilla-cookieconsent": "3.0.1",
"zone.js": "0.15.0"
},
Expand Down