diff --git a/apps/api/plane/api/views/issue.py b/apps/api/plane/api/views/issue.py index 7ba8cb2537..6a5016bec4 100644 --- a/apps/api/plane/api/views/issue.py +++ b/apps/api/plane/api/views/issue.py @@ -60,6 +60,7 @@ from plane.utils.host import base_host from plane.bgtasks.webhook_task import model_activity from plane.bgtasks.work_item_link_task import crawl_work_item_link_title + class WorkspaceIssueAPIEndpoint(BaseAPIView): """ This viewset provides `retrieveByIssueId` on workspace level diff --git a/apps/api/plane/app/serializers/cycle.py b/apps/api/plane/app/serializers/cycle.py index b3b69e3753..2aa2ac7b7c 100644 --- a/apps/api/plane/app/serializers/cycle.py +++ b/apps/api/plane/app/serializers/cycle.py @@ -102,4 +102,4 @@ class CycleUserPropertiesSerializer(BaseSerializer): class Meta: model = CycleUserProperties fields = "__all__" - read_only_fields = ["workspace", "project", "cycle" "user"] + read_only_fields = ["workspace", "project", "cycle", "user"] diff --git a/apps/api/plane/app/serializers/issue.py b/apps/api/plane/app/serializers/issue.py index c2aca4f812..965d78aa2b 100644 --- a/apps/api/plane/app/serializers/issue.py +++ b/apps/api/plane/app/serializers/issue.py @@ -726,7 +726,6 @@ class IssueSerializer(DynamicBaseSerializer): class IssueListDetailSerializer(serializers.Serializer): - def __init__(self, *args, **kwargs): # Extract expand parameter and store it as instance variable self.expand = kwargs.pop("expand", []) or [] diff --git a/apps/api/plane/app/serializers/project.py b/apps/api/plane/app/serializers/project.py index 8d521e8e83..3640904431 100644 --- a/apps/api/plane/app/serializers/project.py +++ b/apps/api/plane/app/serializers/project.py @@ -148,8 +148,8 @@ class ProjectMemberAdminSerializer(BaseSerializer): fields = "__all__" -class ProjectMemberRoleSerializer(DynamicBaseSerializer): - original_role = serializers.IntegerField(source='role', read_only=True) +class ProjectMemberRoleSerializer(DynamicBaseSerializer): + original_role = serializers.IntegerField(source="role", read_only=True) class Meta: model = ProjectMember diff --git a/apps/api/plane/app/serializers/user.py b/apps/api/plane/app/serializers/user.py index c5a3d35df0..7b54535688 100644 --- a/apps/api/plane/app/serializers/user.py +++ b/apps/api/plane/app/serializers/user.py @@ -110,7 +110,11 @@ class UserMeSettingsSerializer(BaseSerializer): workspace_member__member=obj.id, workspace_member__is_active=True, ).first() - logo_asset_url = workspace.logo_asset.asset_url if workspace.logo_asset is not None else "" + logo_asset_url = ( + workspace.logo_asset.asset_url + if workspace.logo_asset is not None + else "" + ) return { "last_workspace_id": profile.last_workspace_id, "last_workspace_slug": ( diff --git a/apps/api/plane/app/serializers/view.py b/apps/api/plane/app/serializers/view.py index 94ff68de39..bf7ff9727c 100644 --- a/apps/api/plane/app/serializers/view.py +++ b/apps/api/plane/app/serializers/view.py @@ -8,7 +8,6 @@ from plane.utils.issue_filters import issue_filters class ViewIssueListSerializer(serializers.Serializer): - def get_assignee_ids(self, instance): return [assignee.assignee_id for assignee in instance.issue_assignee.all()] diff --git a/apps/api/plane/app/views/analytic/advance.py b/apps/api/plane/app/views/analytic/advance.py index 8a2aea90b7..c690fbe7dc 100644 --- a/apps/api/plane/app/views/analytic/advance.py +++ b/apps/api/plane/app/views/analytic/advance.py @@ -160,7 +160,8 @@ class AdvanceAnalyticsStatsEndpoint(AdvanceAnalyticsBaseView): ) return ( - base_queryset.values("project_id", "project__name").annotate( + base_queryset.values("project_id", "project__name") + .annotate( cancelled_work_items=Count("id", filter=Q(state__group="cancelled")), completed_work_items=Count("id", filter=Q(state__group="completed")), backlog_work_items=Count("id", filter=Q(state__group="backlog")), @@ -173,8 +174,7 @@ class AdvanceAnalyticsStatsEndpoint(AdvanceAnalyticsBaseView): def get_work_items_stats(self) -> Dict[str, Dict[str, int]]: base_queryset = Issue.issue_objects.filter(**self.filters["base_filters"]) return ( - base_queryset - .values("project_id", "project__name") + base_queryset.values("project_id", "project__name") .annotate( cancelled_work_items=Count("id", filter=Q(state__group="cancelled")), completed_work_items=Count("id", filter=Q(state__group="completed")), diff --git a/apps/api/plane/app/views/notification/base.py b/apps/api/plane/app/views/notification/base.py index d2aa1a02d7..e84cf4d293 100644 --- a/apps/api/plane/app/views/notification/base.py +++ b/apps/api/plane/app/views/notification/base.py @@ -37,7 +37,7 @@ class NotificationViewSet(BaseViewSet, BasePaginator): workspace__slug=self.kwargs.get("slug"), receiver_id=self.request.user.id, ) - .select_related("workspace", "project," "triggered_by", "receiver") + .select_related("workspace", "project", "triggered_by", "receiver") ) @allow_permission( diff --git a/apps/api/plane/db/management/commands/create_dummy_data.py b/apps/api/plane/db/management/commands/create_dummy_data.py index 3eedc390ce..0915cd9d81 100644 --- a/apps/api/plane/db/management/commands/create_dummy_data.py +++ b/apps/api/plane/db/management/commands/create_dummy_data.py @@ -50,7 +50,7 @@ class Command(BaseCommand): project_count = int(input("Number of projects to be created: ")) for i in range(project_count): - print(f"Please provide the following details for project {i+1}:") + print(f"Please provide the following details for project {i + 1}:") issue_count = int(input("Number of issues to be created: ")) cycle_count = int(input("Number of cycles to be created: ")) module_count = int(input("Number of modules to be created: ")) diff --git a/apps/api/plane/tests/conftest.py b/apps/api/plane/tests/conftest.py index a7d4394e29..b70c9352a3 100644 --- a/apps/api/plane/tests/conftest.py +++ b/apps/api/plane/tests/conftest.py @@ -134,7 +134,7 @@ def workspace(create_user): ) WorkspaceMember.objects.create( - workspace=created_workspace, member=create_user, role=20 - ) - + workspace=created_workspace, member=create_user, role=20 + ) + return created_workspace diff --git a/apps/api/plane/tests/conftest_external.py b/apps/api/plane/tests/conftest_external.py index d2d6a2df51..50022b4906 100644 --- a/apps/api/plane/tests/conftest_external.py +++ b/apps/api/plane/tests/conftest_external.py @@ -21,7 +21,7 @@ def mock_redis(): mock_redis_client.ttl.return_value = -1 # Start the patch - with patch('plane.settings.redis.redis_instance', return_value=mock_redis_client): + with patch("plane.settings.redis.redis_instance", return_value=mock_redis_client): yield mock_redis_client @@ -44,7 +44,7 @@ def mock_elasticsearch(): mock_es_client.delete.return_value = {"_id": "test_id", "result": "deleted"} # Start the patch - with patch('elasticsearch.Elasticsearch', return_value=mock_es_client): + with patch("elasticsearch.Elasticsearch", return_value=mock_es_client): yield mock_es_client @@ -68,39 +68,30 @@ def mock_mongodb(): # Configure common MongoDB collection operations mock_mongo_collection.find_one.return_value = None mock_mongo_collection.find.return_value = MagicMock( - __iter__=lambda x: iter([]), - count=lambda: 0 + __iter__=lambda x: iter([]), count=lambda: 0 ) mock_mongo_collection.insert_one.return_value = MagicMock( - inserted_id="mock_id_123", - acknowledged=True + inserted_id="mock_id_123", acknowledged=True ) mock_mongo_collection.insert_many.return_value = MagicMock( - inserted_ids=["mock_id_123", "mock_id_456"], - acknowledged=True + inserted_ids=["mock_id_123", "mock_id_456"], acknowledged=True ) mock_mongo_collection.update_one.return_value = MagicMock( - modified_count=1, - matched_count=1, - acknowledged=True + modified_count=1, matched_count=1, acknowledged=True ) mock_mongo_collection.update_many.return_value = MagicMock( - modified_count=2, - matched_count=2, - acknowledged=True + modified_count=2, matched_count=2, acknowledged=True ) mock_mongo_collection.delete_one.return_value = MagicMock( - deleted_count=1, - acknowledged=True + deleted_count=1, acknowledged=True ) mock_mongo_collection.delete_many.return_value = MagicMock( - deleted_count=2, - acknowledged=True + deleted_count=2, acknowledged=True ) mock_mongo_collection.count_documents.return_value = 0 # Start the patch - with patch('pymongo.MongoClient', return_value=mock_mongo_client): + with patch("pymongo.MongoClient", return_value=mock_mongo_client): yield mock_mongo_client @@ -112,6 +103,6 @@ def mock_celery(): This fixture patches Celery's task.delay() to prevent actual task execution. """ # Start the patch - with patch('celery.app.task.Task.delay') as mock_delay: + with patch("celery.app.task.Task.delay") as mock_delay: mock_delay.return_value = MagicMock(id="mock-task-id") - yield mock_delay \ No newline at end of file + yield mock_delay diff --git a/apps/api/plane/tests/contract/app/__init__.py b/apps/api/plane/tests/contract/app/__init__.py index 0519ecba6e..e69de29bb2 100644 --- a/apps/api/plane/tests/contract/app/__init__.py +++ b/apps/api/plane/tests/contract/app/__init__.py @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/apps/api/plane/tests/contract/app/test_authentication.py b/apps/api/plane/tests/contract/app/test_authentication.py index 0dc5487104..a52882b9d2 100644 --- a/apps/api/plane/tests/contract/app/test_authentication.py +++ b/apps/api/plane/tests/contract/app/test_authentication.py @@ -16,7 +16,9 @@ from plane.license.models import Instance @pytest.fixture def setup_instance(db): """Create and configure an instance for authentication tests""" - instance_id = uuid.uuid4() if not Instance.objects.exists() else Instance.objects.first().id + instance_id = ( + uuid.uuid4() if not Instance.objects.exists() else Instance.objects.first().id + ) # Create or update instance with all required fields instance, _ = Instance.objects.update_or_create( @@ -28,7 +30,7 @@ def setup_instance(db): "domain": "http://localhost:8000", "last_checked_at": timezone.now(), "is_setup_done": True, - } + }, ) return instance @@ -36,7 +38,9 @@ def setup_instance(db): @pytest.fixture def django_client(): """Return a Django test client with User-Agent header for handling redirects""" - client = Client(HTTP_USER_AGENT="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1") + client = Client( + HTTP_USER_AGENT="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1" + ) return client @@ -79,7 +83,9 @@ class TestMagicLinkGenerate: @pytest.mark.django_db @patch("plane.bgtasks.magic_link_code_task.magic_link.delay") - def test_magic_generate(self, mock_magic_link, api_client, setup_user, setup_instance): + def test_magic_generate( + self, mock_magic_link, api_client, setup_user, setup_instance + ): """Test successful magic link generation""" url = reverse("magic-generate") @@ -97,7 +103,9 @@ class TestMagicLinkGenerate: @pytest.mark.django_db @patch("plane.bgtasks.magic_link_code_task.magic_link.delay") - def test_max_generate_attempt(self, mock_magic_link, api_client, setup_user, setup_instance): + def test_max_generate_attempt( + self, mock_magic_link, api_client, setup_user, setup_instance + ): """Test exceeding maximum magic link generation attempts""" url = reverse("magic-generate") @@ -163,10 +171,9 @@ class TestSignInEndpoint: url, {"email": "user@plane.so", "password": "user123"}, follow=True ) - # Check for the specific authentication error in the URL redirect_urls = [url for url, _ in response.redirect_chain] - redirect_contents = ' '.join(redirect_urls) + redirect_contents = " ".join(redirect_urls) # The actual error code for invalid password is AUTHENTICATION_FAILED_SIGN_IN assert "AUTHENTICATION_FAILED_SIGN_IN" in redirect_contents @@ -201,14 +208,13 @@ class TestSignInEndpoint: response = django_client.post( url, {"email": "user@plane.so", "password": "user@123", "next_path": next_path}, - follow=False + follow=False, ) # Check that the initial response is a redirect (302) without error code assert response.status_code == 302 assert "error_code" not in response.url - # In a real browser, the next_path would be used to build the absolute URL # Since we're just testing the authentication logic, we won't check for the exact URL structure # Instead, just verify that we're authenticated @@ -237,16 +243,16 @@ class TestMagicSignIn: assert "MAGIC_SIGN_IN_EMAIL_CODE_REQUIRED" in response.redirect_chain[-1][0] @pytest.mark.django_db - def test_expired_invalid_magic_link(self, django_client, setup_user, setup_instance): + def test_expired_invalid_magic_link( + self, django_client, setup_user, setup_instance + ): """Test magic link sign-in with expired/invalid link""" ri = redis_instance() ri.delete("magic_user@plane.so") url = reverse("magic-sign-in") response = django_client.post( - url, - {"email": "user@plane.so", "code": "xxxx-xxxxx-xxxx"}, - follow=False + url, {"email": "user@plane.so", "code": "xxxx-xxxxx-xxxx"}, follow=False ) # Check that we get a redirect @@ -254,7 +260,10 @@ class TestMagicSignIn: # The actual error code is EXPIRED_MAGIC_CODE_SIGN_IN (when key doesn't exist) # or INVALID_MAGIC_CODE_SIGN_IN (when key exists but code doesn't match) - assert "EXPIRED_MAGIC_CODE_SIGN_IN" in response.url or "INVALID_MAGIC_CODE_SIGN_IN" in response.url + assert ( + "EXPIRED_MAGIC_CODE_SIGN_IN" in response.url + or "INVALID_MAGIC_CODE_SIGN_IN" in response.url + ) @pytest.mark.django_db def test_user_does_not_exist(self, django_client, setup_instance): @@ -263,7 +272,7 @@ class TestMagicSignIn: response = django_client.post( url, {"email": "nonexistent@plane.so", "code": "xxxx-xxxxx-xxxx"}, - follow=True + follow=True, ) # Check redirect contains error code @@ -271,7 +280,9 @@ class TestMagicSignIn: @pytest.mark.django_db @patch("plane.bgtasks.magic_link_code_task.magic_link.delay") - def test_magic_code_sign_in(self, mock_magic_link, django_client, api_client, setup_user, setup_instance): + def test_magic_code_sign_in( + self, mock_magic_link, django_client, api_client, setup_user, setup_instance + ): """Test successful magic link sign-in process""" # First generate a magic link token gen_url = reverse("magic-generate") @@ -288,9 +299,7 @@ class TestMagicSignIn: # Use Django client to test the redirect flow without following redirects url = reverse("magic-sign-in") response = django_client.post( - url, - {"email": "user@plane.so", "code": token}, - follow=False + url, {"email": "user@plane.so", "code": token}, follow=False ) # Check that the initial response is a redirect without error code @@ -302,7 +311,9 @@ class TestMagicSignIn: @pytest.mark.django_db @patch("plane.bgtasks.magic_link_code_task.magic_link.delay") - def test_magic_sign_in_with_next_path(self, mock_magic_link, django_client, api_client, setup_user, setup_instance): + def test_magic_sign_in_with_next_path( + self, mock_magic_link, django_client, api_client, setup_user, setup_instance + ): """Test magic sign-in with next_path parameter""" # First generate a magic link token gen_url = reverse("magic-generate") @@ -322,7 +333,7 @@ class TestMagicSignIn: response = django_client.post( url, {"email": "user@plane.so", "code": token, "next_path": next_path}, - follow=False + follow=False, ) # Check that the initial response is a redirect without error code @@ -357,9 +368,7 @@ class TestMagicSignUp: url = reverse("magic-sign-up") response = django_client.post( - url, - {"email": "existing@plane.so", "code": "xxxx-xxxxx-xxxx"}, - follow=True + url, {"email": "existing@plane.so", "code": "xxxx-xxxxx-xxxx"}, follow=True ) # Check redirect contains error code @@ -370,9 +379,7 @@ class TestMagicSignUp: """Test magic link sign-up with expired/invalid link""" url = reverse("magic-sign-up") response = django_client.post( - url, - {"email": "new@plane.so", "code": "xxxx-xxxxx-xxxx"}, - follow=False + url, {"email": "new@plane.so", "code": "xxxx-xxxxx-xxxx"}, follow=False ) # Check that we get a redirect @@ -380,11 +387,16 @@ class TestMagicSignUp: # The actual error code is EXPIRED_MAGIC_CODE_SIGN_UP (when key doesn't exist) # or INVALID_MAGIC_CODE_SIGN_UP (when key exists but code doesn't match) - assert "EXPIRED_MAGIC_CODE_SIGN_UP" in response.url or "INVALID_MAGIC_CODE_SIGN_UP" in response.url + assert ( + "EXPIRED_MAGIC_CODE_SIGN_UP" in response.url + or "INVALID_MAGIC_CODE_SIGN_UP" in response.url + ) @pytest.mark.django_db @patch("plane.bgtasks.magic_link_code_task.magic_link.delay") - def test_magic_code_sign_up(self, mock_magic_link, django_client, api_client, setup_instance): + def test_magic_code_sign_up( + self, mock_magic_link, django_client, api_client, setup_instance + ): """Test successful magic link sign-up process""" email = "newuser@plane.so" @@ -403,9 +415,7 @@ class TestMagicSignUp: # Use Django client to test the redirect flow without following redirects url = reverse("magic-sign-up") response = django_client.post( - url, - {"email": email, "code": token}, - follow=False + url, {"email": email, "code": token}, follow=False ) # Check that the initial response is a redirect without error code @@ -420,7 +430,9 @@ class TestMagicSignUp: @pytest.mark.django_db @patch("plane.bgtasks.magic_link_code_task.magic_link.delay") - def test_magic_sign_up_with_next_path(self, mock_magic_link, django_client, api_client, setup_instance): + def test_magic_sign_up_with_next_path( + self, mock_magic_link, django_client, api_client, setup_instance + ): """Test magic sign-up with next_path parameter""" email = "newuser2@plane.so" @@ -440,9 +452,7 @@ class TestMagicSignUp: url = reverse("magic-sign-up") next_path = "onboarding" response = django_client.post( - url, - {"email": email, "code": token, "next_path": next_path}, - follow=False + url, {"email": email, "code": token, "next_path": next_path}, follow=False ) # Check that the initial response is a redirect without error code @@ -456,4 +466,4 @@ class TestMagicSignUp: assert User.objects.filter(email=email).exists() # Check if user is authenticated - assert "_auth_user_id" in django_client.session \ No newline at end of file + assert "_auth_user_id" in django_client.session diff --git a/apps/api/plane/tests/contract/app/test_workspace_app.py b/apps/api/plane/tests/contract/app/test_workspace_app.py index 71ad1d4124..9d4c560e51 100644 --- a/apps/api/plane/tests/contract/app/test_workspace_app.py +++ b/apps/api/plane/tests/contract/app/test_workspace_app.py @@ -21,7 +21,9 @@ class TestWorkspaceAPI: @pytest.mark.django_db @patch("plane.bgtasks.workspace_seed_task.workspace_seed.delay") - def test_create_workspace_valid_data(self, mock_workspace_seed, session_client, create_user): + def test_create_workspace_valid_data( + self, mock_workspace_seed, session_client, create_user + ): """Test creating a workspace with valid data""" url = reverse("workspace") user = create_user # Use the create_user fixture directly as it returns a user object @@ -30,7 +32,7 @@ class TestWorkspaceAPI: workspace_data = { "name": "Plane", "slug": "pla-ne-test", - "company_name": "Plane Inc." + "company_name": "Plane Inc.", } # Make the request @@ -57,15 +59,13 @@ class TestWorkspaceAPI: mock_workspace_seed.assert_called_once_with(response.data["id"]) @pytest.mark.django_db - @patch('plane.bgtasks.workspace_seed_task.workspace_seed.delay') + @patch("plane.bgtasks.workspace_seed_task.workspace_seed.delay") def test_create_duplicate_workspace(self, mock_workspace_seed, session_client): """Test creating a duplicate workspace""" url = reverse("workspace") # Create first workspace - session_client.post( - url, {"name": "Plane", "slug": "pla-ne"}, format="json" - ) + session_client.post(url, {"name": "Plane", "slug": "pla-ne"}, format="json") # Try to create a workspace with the same slug response = session_client.post( @@ -76,4 +76,4 @@ class TestWorkspaceAPI: assert response.status_code == status.HTTP_400_BAD_REQUEST # Optionally check the error message to confirm it's related to the duplicate slug - assert "slug" in response.data \ No newline at end of file + assert "slug" in response.data diff --git a/apps/api/plane/tests/factories.py b/apps/api/plane/tests/factories.py index 8d95773ded..b8cd78361a 100644 --- a/apps/api/plane/tests/factories.py +++ b/apps/api/plane/tests/factories.py @@ -2,26 +2,21 @@ import factory from uuid import uuid4 from django.utils import timezone -from plane.db.models import ( - User, - Workspace, - WorkspaceMember, - Project, - ProjectMember -) +from plane.db.models import User, Workspace, WorkspaceMember, Project, ProjectMember class UserFactory(factory.django.DjangoModelFactory): """Factory for creating User instances""" + class Meta: model = User - django_get_or_create = ('email',) + django_get_or_create = ("email",) id = factory.LazyFunction(uuid4) - email = factory.Sequence(lambda n: f'user{n}@plane.so') - password = factory.PostGenerationMethodCall('set_password', 'password') - first_name = factory.Sequence(lambda n: f'First{n}') - last_name = factory.Sequence(lambda n: f'Last{n}') + email = factory.Sequence(lambda n: f"user{n}@plane.so") + password = factory.PostGenerationMethodCall("set_password", "password") + first_name = factory.Sequence(lambda n: f"First{n}") + last_name = factory.Sequence(lambda n: f"Last{n}") is_active = True is_superuser = False is_staff = False @@ -29,13 +24,14 @@ class UserFactory(factory.django.DjangoModelFactory): class WorkspaceFactory(factory.django.DjangoModelFactory): """Factory for creating Workspace instances""" + class Meta: model = Workspace - django_get_or_create = ('slug',) + django_get_or_create = ("slug",) id = factory.LazyFunction(uuid4) - name = factory.Sequence(lambda n: f'Workspace {n}') - slug = factory.Sequence(lambda n: f'workspace-{n}') + name = factory.Sequence(lambda n: f"Workspace {n}") + slug = factory.Sequence(lambda n: f"workspace-{n}") owner = factory.SubFactory(UserFactory) created_at = factory.LazyFunction(timezone.now) updated_at = factory.LazyFunction(timezone.now) @@ -43,6 +39,7 @@ class WorkspaceFactory(factory.django.DjangoModelFactory): class WorkspaceMemberFactory(factory.django.DjangoModelFactory): """Factory for creating WorkspaceMember instances""" + class Meta: model = WorkspaceMember @@ -56,21 +53,23 @@ class WorkspaceMemberFactory(factory.django.DjangoModelFactory): class ProjectFactory(factory.django.DjangoModelFactory): """Factory for creating Project instances""" + class Meta: model = Project - django_get_or_create = ('name', 'workspace') + django_get_or_create = ("name", "workspace") id = factory.LazyFunction(uuid4) - name = factory.Sequence(lambda n: f'Project {n}') + name = factory.Sequence(lambda n: f"Project {n}") workspace = factory.SubFactory(WorkspaceFactory) - created_by = factory.SelfAttribute('workspace.owner') - updated_by = factory.SelfAttribute('workspace.owner') + created_by = factory.SelfAttribute("workspace.owner") + updated_by = factory.SelfAttribute("workspace.owner") created_at = factory.LazyFunction(timezone.now) updated_at = factory.LazyFunction(timezone.now) class ProjectMemberFactory(factory.django.DjangoModelFactory): """Factory for creating ProjectMember instances""" + class Meta: model = ProjectMember @@ -79,4 +78,4 @@ class ProjectMemberFactory(factory.django.DjangoModelFactory): member = factory.SubFactory(UserFactory) role = 20 # Admin role by default created_at = factory.LazyFunction(timezone.now) - updated_at = factory.LazyFunction(timezone.now) \ No newline at end of file + updated_at = factory.LazyFunction(timezone.now) diff --git a/apps/api/plane/tests/smoke/test_auth_smoke.py b/apps/api/plane/tests/smoke/test_auth_smoke.py index 4d6de6c35c..85ca476b4d 100644 --- a/apps/api/plane/tests/smoke/test_auth_smoke.py +++ b/apps/api/plane/tests/smoke/test_auth_smoke.py @@ -16,72 +16,79 @@ class TestAuthSmoke: # 1. Test bad login - test with wrong password response = requests.post( - url, - data={ - "email": user_data["email"], - "password": "wrong-password" - } + url, data={"email": user_data["email"], "password": "wrong-password"} ) # For bad credentials, any of these status codes would be valid # The test shouldn't be brittle to minor implementation changes - assert response.status_code != 500, "Authentication should not cause server errors" + assert response.status_code != 500, ( + "Authentication should not cause server errors" + ) assert response.status_code != 404, "Authentication endpoint should exist" if response.status_code == 200: # If API returns 200 for failures, check the response body for error indication - if hasattr(response, 'json'): + if hasattr(response, "json"): try: data = response.json() # JSON response might indicate error in its structure - assert "error" in data or "error_code" in data or "detail" in data or response.url.endswith("sign-in"), \ - "Error response should contain error details" + assert ( + "error" in data + or "error_code" in data + or "detail" in data + or response.url.endswith("sign-in") + ), "Error response should contain error details" except ValueError: # It's ok if response isn't JSON format pass elif response.status_code in [302, 303]: # If it's a redirect, it should redirect to a login page or error page - redirect_url = response.headers.get('Location', '') - assert "error" in redirect_url or "sign-in" in redirect_url, \ + redirect_url = response.headers.get("Location", "") + assert "error" in redirect_url or "sign-in" in redirect_url, ( "Failed login should redirect to login page or error page" + ) # 2. Test good login with correct credentials response = requests.post( url, - data={ - "email": user_data["email"], - "password": user_data["password"] - }, - allow_redirects=False # Don't follow redirects + data={"email": user_data["email"], "password": user_data["password"]}, + allow_redirects=False, # Don't follow redirects ) # Successful auth should not be a client error or server error - assert response.status_code not in range(400, 600), \ + assert response.status_code not in range(400, 600), ( f"Authentication with valid credentials failed with status {response.status_code}" + ) # Specific validation based on response type if response.status_code in [302, 303]: # Redirect-based auth: check that redirect URL doesn't contain error - redirect_url = response.headers.get('Location', '') - assert "error" not in redirect_url and "error_code" not in redirect_url, \ + redirect_url = response.headers.get("Location", "") + assert "error" not in redirect_url and "error_code" not in redirect_url, ( "Successful login redirect should not contain error parameters" + ) elif response.status_code == 200: # API token-based auth: check for tokens or user session - if hasattr(response, 'json'): + if hasattr(response, "json"): try: data = response.json() # If it's a token response if "access_token" in data: - assert "refresh_token" in data, "JWT auth should return both access and refresh tokens" + assert "refresh_token" in data, ( + "JWT auth should return both access and refresh tokens" + ) # If it's a user session response elif "user" in data: - assert "is_authenticated" in data and data["is_authenticated"], \ - "User session response should indicate authentication" + assert ( + "is_authenticated" in data and data["is_authenticated"] + ), "User session response should indicate authentication" # Otherwise it should at least indicate success else: - assert not any(error_key in data for error_key in ["error", "error_code", "detail"]), \ - "Success response should not contain error keys" + assert not any( + error_key in data + for error_key in ["error", "error_code", "detail"] + ), "Success response should not contain error keys" except ValueError: # Non-JSON is acceptable if it's a redirect or HTML response pass @@ -97,4 +104,4 @@ class TestHealthCheckSmoke: response = requests.get(f"{plane_server.url}/") # Should be OK - assert response.status_code == 200, "Health check endpoint should return 200 OK" \ No newline at end of file + assert response.status_code == 200, "Health check endpoint should return 200 OK" diff --git a/apps/api/plane/tests/unit/models/test_workspace_model.py b/apps/api/plane/tests/unit/models/test_workspace_model.py index 40380fa0f4..aa3c156454 100644 --- a/apps/api/plane/tests/unit/models/test_workspace_model.py +++ b/apps/api/plane/tests/unit/models/test_workspace_model.py @@ -13,10 +13,7 @@ class TestWorkspaceModel: """Test creating a workspace""" # Create a workspace workspace = Workspace.objects.create( - name="Test Workspace", - slug="test-workspace", - id=uuid4(), - owner=create_user + name="Test Workspace", slug="test-workspace", id=uuid4(), owner=create_user ) # Verify it was created @@ -30,21 +27,18 @@ class TestWorkspaceModel: """Test creating a workspace member""" # Create a workspace workspace = Workspace.objects.create( - name="Test Workspace", - slug="test-workspace", - id=uuid4(), - owner=create_user + name="Test Workspace", slug="test-workspace", id=uuid4(), owner=create_user ) # Create a workspace member workspace_member = WorkspaceMember.objects.create( workspace=workspace, member=create_user, - role=20 # Admin role + role=20, # Admin role ) # Verify it was created assert workspace_member.id is not None assert workspace_member.workspace == workspace assert workspace_member.member == create_user - assert workspace_member.role == 20 \ No newline at end of file + assert workspace_member.role == 20 diff --git a/apps/api/plane/tests/unit/serializers/test_workspace.py b/apps/api/plane/tests/unit/serializers/test_workspace.py index 19767a7c61..28e6c8d755 100644 --- a/apps/api/plane/tests/unit/serializers/test_workspace.py +++ b/apps/api/plane/tests/unit/serializers/test_workspace.py @@ -13,18 +13,13 @@ class TestWorkspaceLiteSerializer: """Test that the serializer includes the correct fields""" # Create a user to be the owner owner = User.objects.create( - email="test@example.com", - first_name="Test", - last_name="User" + email="test@example.com", first_name="Test", last_name="User" ) # Create a workspace with explicit ID to test serialization workspace_id = uuid4() workspace = Workspace.objects.create( - name="Test Workspace", - slug="test-workspace", - id=workspace_id, - owner=owner + name="Test Workspace", slug="test-workspace", id=workspace_id, owner=owner ) # Serialize the workspace @@ -43,23 +38,17 @@ class TestWorkspaceLiteSerializer: """Test that the serializer fields are read-only""" # Create a user to be the owner owner = User.objects.create( - email="test2@example.com", - first_name="Test", - last_name="User" + email="test2@example.com", first_name="Test", last_name="User" ) # Create a workspace workspace = Workspace.objects.create( - name="Test Workspace", - slug="test-workspace", - id=uuid4(), - owner=owner + name="Test Workspace", slug="test-workspace", id=uuid4(), owner=owner ) # Try to update via serializer serializer = WorkspaceLiteSerializer( - workspace, - data={"name": "Updated Name", "slug": "updated-slug"} + workspace, data={"name": "Updated Name", "slug": "updated-slug"} ) # Serializer should be valid (since read-only fields are ignored) @@ -68,4 +57,4 @@ class TestWorkspaceLiteSerializer: # Save should not update the read-only fields updated_workspace = serializer.save() assert updated_workspace.name == "Test Workspace" - assert updated_workspace.slug == "test-workspace" \ No newline at end of file + assert updated_workspace.slug == "test-workspace" diff --git a/apps/api/plane/tests/unit/utils/test_uuid.py b/apps/api/plane/tests/unit/utils/test_uuid.py index 81403c5bef..5503f2bc37 100644 --- a/apps/api/plane/tests/unit/utils/test_uuid.py +++ b/apps/api/plane/tests/unit/utils/test_uuid.py @@ -19,7 +19,9 @@ class TestUUIDUtils: assert is_valid_uuid("not-a-uuid") is False assert is_valid_uuid("123456789") is False assert is_valid_uuid("") is False - assert is_valid_uuid("00000000-0000-0000-0000-000000000000") is False # This is a valid UUID but version 1 + assert ( + is_valid_uuid("00000000-0000-0000-0000-000000000000") is False + ) # This is a valid UUID but version 1 def test_convert_uuid_to_integer(self): """Test convert_uuid_to_integer function""" @@ -46,4 +48,6 @@ class TestUUIDUtils: test_uuid = uuid.UUID(test_uuid_str) # Should get the same result whether passing UUID or string - assert convert_uuid_to_integer(test_uuid) == convert_uuid_to_integer(test_uuid_str) \ No newline at end of file + assert convert_uuid_to_integer(test_uuid) == convert_uuid_to_integer( + test_uuid_str + ) diff --git a/apps/api/plane/utils/global_paginator.py b/apps/api/plane/utils/global_paginator.py index 338d86117f..1b7f908c54 100644 --- a/apps/api/plane/utils/global_paginator.py +++ b/apps/api/plane/utils/global_paginator.py @@ -50,11 +50,11 @@ def paginate(base_queryset, queryset, cursor, on_result): paginated_data = queryset[start_index:end_index] # Create the pagination info object - prev_cursor = f"{page_size}:{cursor_object.current_page-1}:0" + prev_cursor = f"{page_size}:{cursor_object.current_page - 1}:0" cursor = f"{page_size}:{cursor_object.current_page}:0" next_cursor = None if end_index < total_results: - next_cursor = f"{page_size}:{cursor_object.current_page+1}:0" + next_cursor = f"{page_size}:{cursor_object.current_page + 1}:0" prev_page_results = False if cursor_object.current_page > 0: diff --git a/apps/api/plane/utils/paginator.py b/apps/api/plane/utils/paginator.py index 0793d2a30e..ce9c65f644 100644 --- a/apps/api/plane/utils/paginator.py +++ b/apps/api/plane/utils/paginator.py @@ -35,7 +35,7 @@ class Cursor: # Return the representation of the cursor def __repr__(self): - return f"{type(self).__name__,}: value={self.value} offset={self.offset}, is_prev={int(self.is_prev)}" + return f"{(type(self).__name__,)}: value={self.value} offset={self.offset}, is_prev={int(self.is_prev)}" # noqa: E501 # Return if the cursor is true def __bool__(self): diff --git a/apps/api/run_tests.py b/apps/api/run_tests.py index f4f0951b19..6f42229c9c 100755 --- a/apps/api/run_tests.py +++ b/apps/api/run_tests.py @@ -6,36 +6,20 @@ import sys def main(): parser = argparse.ArgumentParser(description="Run Plane tests") + parser.add_argument("-u", "--unit", action="store_true", help="Run unit tests only") parser.add_argument( - "-u", "--unit", - action="store_true", - help="Run unit tests only" + "-c", "--contract", action="store_true", help="Run contract tests only" ) parser.add_argument( - "-c", "--contract", - action="store_true", - help="Run contract tests only" + "-s", "--smoke", action="store_true", help="Run smoke tests only" ) parser.add_argument( - "-s", "--smoke", - action="store_true", - help="Run smoke tests only" + "-o", "--coverage", action="store_true", help="Generate coverage report" ) parser.add_argument( - "-o", "--coverage", - action="store_true", - help="Generate coverage report" - ) - parser.add_argument( - "-p", "--parallel", - action="store_true", - help="Run tests in parallel" - ) - parser.add_argument( - "-v", "--verbose", - action="store_true", - help="Verbose output" + "-p", "--parallel", action="store_true", help="Run tests in parallel" ) + parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output") args = parser.parse_args() # Build command @@ -71,10 +55,10 @@ def main(): # Print command print(f"Running: {' '.join(cmd)}") - + # Execute command result = subprocess.run(cmd) - + # Check coverage thresholds if coverage is enabled if args.coverage: print("Checking coverage thresholds...") @@ -83,9 +67,9 @@ def main(): if coverage_result.returncode != 0: print("Coverage below threshold (90%)") sys.exit(coverage_result.returncode) - + sys.exit(result.returncode) if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/apps/live/src/ce/lib/fetch-document.ts b/apps/live/src/ce/lib/fetch-document.ts index 5a27c2179a..f7b4d8ea67 100644 --- a/apps/live/src/ce/lib/fetch-document.ts +++ b/apps/live/src/ce/lib/fetch-document.ts @@ -6,9 +6,9 @@ type TArgs = { documentType: TDocumentTypes | undefined; pageId: string; params: URLSearchParams; -} +}; export const fetchDocument = async (args: TArgs): Promise => { const { documentType } = args; throw Error(`Fetch failed: Invalid document type ${documentType} provided.`); -} \ No newline at end of file +}; diff --git a/apps/live/src/ce/lib/update-document.ts b/apps/live/src/ce/lib/update-document.ts index b998e154f5..cbef54e746 100644 --- a/apps/live/src/ce/lib/update-document.ts +++ b/apps/live/src/ce/lib/update-document.ts @@ -7,9 +7,9 @@ type TArgs = { pageId: string; params: URLSearchParams; updatedDescription: Uint8Array; -} +}; export const updateDocument = async (args: TArgs): Promise => { const { documentType } = args; throw Error(`Update failed: Invalid document type ${documentType} provided.`); -} \ No newline at end of file +}; diff --git a/apps/live/src/core/extensions/index.ts b/apps/live/src/core/extensions/index.ts index 4867cad3d7..7364169a46 100644 --- a/apps/live/src/core/extensions/index.ts +++ b/apps/live/src/core/extensions/index.ts @@ -9,18 +9,12 @@ import { Redis as HocusPocusRedis } from "@hocuspocus/extension-redis"; import { manualLogger } from "@/core/helpers/logger.js"; import { getRedisUrl } from "@/core/lib/utils/redis-url.js"; // core libraries -import { - fetchPageDescriptionBinary, - updatePageDescription, -} from "@/core/lib/page.js"; +import { fetchPageDescriptionBinary, updatePageDescription } from "@/core/lib/page.js"; // plane live libraries import { fetchDocument } from "@/plane-live/lib/fetch-document.js"; import { updateDocument } from "@/plane-live/lib/update-document.js"; // types -import { - type HocusPocusServerContext, - type TDocumentTypes, -} from "@/core/types/common.js"; +import { type HocusPocusServerContext, type TDocumentTypes } from "@/core/types/common.js"; export const getExtensions: () => Promise = async () => { const extensions: Extension[] = [ @@ -35,20 +29,14 @@ export const getExtensions: () => Promise = async () => { const cookie = (context as HocusPocusServerContext).cookie; // query params const params = requestParameters; - const documentType = params.get("documentType")?.toString() as - | TDocumentTypes - | undefined; + const documentType = params.get("documentType")?.toString() as TDocumentTypes | undefined; // TODO: Fix this lint error. // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve) => { try { let fetchedData = null; if (documentType === "project_page") { - fetchedData = await fetchPageDescriptionBinary( - params, - pageId, - cookie, - ); + fetchedData = await fetchPageDescriptionBinary(params, pageId, cookie); } else { fetchedData = await fetchDocument({ cookie, @@ -63,18 +51,11 @@ export const getExtensions: () => Promise = async () => { } }); }, - store: async ({ - context, - state, - documentName: pageId, - requestParameters, - }) => { + store: async ({ context, state, documentName: pageId, requestParameters }) => { const cookie = (context as HocusPocusServerContext).cookie; // query params const params = requestParameters; - const documentType = params.get("documentType")?.toString() as - | TDocumentTypes - | undefined; + const documentType = params.get("documentType")?.toString() as TDocumentTypes | undefined; // TODO: Fix this lint error. // eslint-disable-next-line no-async-promise-executor @@ -107,16 +88,12 @@ export const getExtensions: () => Promise = async () => { await new Promise((resolve, reject) => { redisClient.on("error", (error: any) => { - if ( - error?.code === "ENOTFOUND" || - error.message.includes("WRONGPASS") || - error.message.includes("NOAUTH") - ) { + if (error?.code === "ENOTFOUND" || error.message.includes("WRONGPASS") || error.message.includes("NOAUTH")) { redisClient.disconnect(); } manualLogger.warn( `Redis Client wasn't able to connect, continuing without Redis (you won't be able to sync data between multiple plane live servers)`, - error, + error ); reject(error); }); @@ -130,12 +107,12 @@ export const getExtensions: () => Promise = async () => { } catch (error) { manualLogger.warn( `Redis Client wasn't able to connect, continuing without Redis (you won't be able to sync data between multiple plane live servers)`, - error, + error ); } } else { manualLogger.warn( - "Redis URL is not set, continuing without Redis (you won't be able to sync data between multiple plane live servers)", + "Redis URL is not set, continuing without Redis (you won't be able to sync data between multiple plane live servers)" ); } diff --git a/apps/live/src/core/helpers/error-handler.ts b/apps/live/src/core/helpers/error-handler.ts index 6cc46b6dd7..fac75f92f2 100644 --- a/apps/live/src/core/helpers/error-handler.ts +++ b/apps/live/src/core/helpers/error-handler.ts @@ -11,10 +11,7 @@ export const errorHandler: ErrorRequestHandler = (err, _req, res) => { // Send the response res.json({ error: { - message: - process.env.NODE_ENV === "production" - ? "An unexpected error occurred" - : err.message, + message: process.env.NODE_ENV === "production" ? "An unexpected error occurred" : err.message, ...(process.env.NODE_ENV !== "production" && { stack: err.stack }), }, }); diff --git a/apps/live/src/core/helpers/page.ts b/apps/live/src/core/helpers/page.ts index 4e79afe6b8..d4322d1ad8 100644 --- a/apps/live/src/core/helpers/page.ts +++ b/apps/live/src/core/helpers/page.ts @@ -1,17 +1,16 @@ import { getSchema } from "@tiptap/core"; import { generateHTML, generateJSON } from "@tiptap/html"; import { prosemirrorJSONToYDoc, yXmlFragmentToProseMirrorRootNode } from "y-prosemirror"; -import * as Y from "yjs" +import * as Y from "yjs"; // plane editor import { CoreEditorExtensionsWithoutProps, DocumentEditorExtensionsWithoutProps } from "@plane/editor/lib"; -const DOCUMENT_EDITOR_EXTENSIONS = [ - ...CoreEditorExtensionsWithoutProps, - ...DocumentEditorExtensionsWithoutProps, -]; +const DOCUMENT_EDITOR_EXTENSIONS = [...CoreEditorExtensionsWithoutProps, ...DocumentEditorExtensionsWithoutProps]; const documentEditorSchema = getSchema(DOCUMENT_EDITOR_EXTENSIONS); -export const getAllDocumentFormatsFromBinaryData = (description: Uint8Array): { +export const getAllDocumentFormatsFromBinaryData = ( + description: Uint8Array +): { contentBinaryEncoded: string; contentJSON: object; contentHTML: string; @@ -22,10 +21,7 @@ export const getAllDocumentFormatsFromBinaryData = (description: Uint8Array): { Y.applyUpdate(yDoc, description); // convert to JSON const type = yDoc.getXmlFragment("default"); - const contentJSON = yXmlFragmentToProseMirrorRootNode( - type, - documentEditorSchema - ).toJSON(); + const contentJSON = yXmlFragmentToProseMirrorRootNode(type, documentEditorSchema).toJSON(); // convert to HTML const contentHTML = generateHTML(contentJSON, DOCUMENT_EDITOR_EXTENSIONS); @@ -34,26 +30,21 @@ export const getAllDocumentFormatsFromBinaryData = (description: Uint8Array): { contentJSON, contentHTML, }; -} +}; -export const getBinaryDataFromHTMLString = (descriptionHTML: string): { - contentBinary: Uint8Array +export const getBinaryDataFromHTMLString = ( + descriptionHTML: string +): { + contentBinary: Uint8Array; } => { // convert HTML to JSON - const contentJSON = generateJSON( - descriptionHTML ?? "

", - DOCUMENT_EDITOR_EXTENSIONS - ); + const contentJSON = generateJSON(descriptionHTML ?? "

", DOCUMENT_EDITOR_EXTENSIONS); // convert JSON to Y.Doc format - const transformedData = prosemirrorJSONToYDoc( - documentEditorSchema, - contentJSON, - "default" - ); + const transformedData = prosemirrorJSONToYDoc(documentEditorSchema, contentJSON, "default"); // convert Y.Doc to Uint8Array format const encodedData = Y.encodeStateAsUpdate(transformedData); return { - contentBinary: encodedData - } -} \ No newline at end of file + contentBinary: encodedData, + }; +}; diff --git a/apps/live/src/core/hocuspocus-server.ts b/apps/live/src/core/hocuspocus-server.ts index 51896c23bc..072d45cbc2 100644 --- a/apps/live/src/core/hocuspocus-server.ts +++ b/apps/live/src/core/hocuspocus-server.ts @@ -4,10 +4,7 @@ import { v4 as uuidv4 } from "uuid"; import { handleAuthentication } from "@/core/lib/authentication.js"; // extensions import { getExtensions } from "@/core/extensions/index.js"; -import { - DocumentCollaborativeEvents, - TDocumentEventsServer, -} from "@plane/editor/lib"; +import { DocumentCollaborativeEvents, TDocumentEventsServer } from "@plane/editor/lib"; // editor types import { TUserDetails } from "@plane/editor"; // types @@ -61,8 +58,7 @@ export const getHocusPocusServer = async () => { }, async onStateless({ payload, document }) { // broadcast the client event (derived from the server event) to all the clients so that they can update their state - const response = - DocumentCollaborativeEvents[payload as TDocumentEventsServer].client; + const response = DocumentCollaborativeEvents[payload as TDocumentEventsServer].client; if (response) { document.broadcastStateless(response); } diff --git a/apps/live/src/core/lib/page.ts b/apps/live/src/core/lib/page.ts index c2110a2b8d..7d23d8b195 100644 --- a/apps/live/src/core/lib/page.ts +++ b/apps/live/src/core/lib/page.ts @@ -1,8 +1,5 @@ // helpers -import { - getAllDocumentFormatsFromBinaryData, - getBinaryDataFromHTMLString, -} from "@/core/helpers/page.js"; +import { getAllDocumentFormatsFromBinaryData, getBinaryDataFromHTMLString } from "@/core/helpers/page.js"; // services import { PageService } from "@/core/services/page.service.js"; import { manualLogger } from "../helpers/logger.js"; @@ -12,20 +9,17 @@ export const updatePageDescription = async ( params: URLSearchParams, pageId: string, updatedDescription: Uint8Array, - cookie: string | undefined, + cookie: string | undefined ) => { if (!(updatedDescription instanceof Uint8Array)) { - throw new Error( - "Invalid updatedDescription: must be an instance of Uint8Array", - ); + throw new Error("Invalid updatedDescription: must be an instance of Uint8Array"); } const workspaceSlug = params.get("workspaceSlug")?.toString(); const projectId = params.get("projectId")?.toString(); if (!workspaceSlug || !projectId || !cookie) return; - const { contentBinaryEncoded, contentHTML, contentJSON } = - getAllDocumentFormatsFromBinaryData(updatedDescription); + const { contentBinaryEncoded, contentHTML, contentJSON } = getAllDocumentFormatsFromBinaryData(updatedDescription); try { const payload = { description_binary: contentBinaryEncoded, @@ -33,13 +27,7 @@ export const updatePageDescription = async ( description: contentJSON, }; - await pageService.updateDescription( - workspaceSlug, - projectId, - pageId, - payload, - cookie, - ); + await pageService.updateDescription(workspaceSlug, projectId, pageId, payload, cookie); } catch (error) { manualLogger.error("Update error:", error); throw error; @@ -50,26 +38,16 @@ const fetchDescriptionHTMLAndTransform = async ( workspaceSlug: string, projectId: string, pageId: string, - cookie: string, + cookie: string ) => { if (!workspaceSlug || !projectId || !cookie) return; try { - const pageDetails = await pageService.fetchDetails( - workspaceSlug, - projectId, - pageId, - cookie, - ); - const { contentBinary } = getBinaryDataFromHTMLString( - pageDetails.description_html ?? "

", - ); + const pageDetails = await pageService.fetchDetails(workspaceSlug, projectId, pageId, cookie); + const { contentBinary } = getBinaryDataFromHTMLString(pageDetails.description_html ?? "

"); return contentBinary; } catch (error) { - manualLogger.error( - "Error while transforming from HTML to Uint8Array", - error, - ); + manualLogger.error("Error while transforming from HTML to Uint8Array", error); throw error; } }; @@ -77,28 +55,18 @@ const fetchDescriptionHTMLAndTransform = async ( export const fetchPageDescriptionBinary = async ( params: URLSearchParams, pageId: string, - cookie: string | undefined, + cookie: string | undefined ) => { const workspaceSlug = params.get("workspaceSlug")?.toString(); const projectId = params.get("projectId")?.toString(); if (!workspaceSlug || !projectId || !cookie) return null; try { - const response = await pageService.fetchDescriptionBinary( - workspaceSlug, - projectId, - pageId, - cookie, - ); + const response = await pageService.fetchDescriptionBinary(workspaceSlug, projectId, pageId, cookie); const binaryData = new Uint8Array(response); if (binaryData.byteLength === 0) { - const binary = await fetchDescriptionHTMLAndTransform( - workspaceSlug, - projectId, - pageId, - cookie, - ); + const binary = await fetchDescriptionHTMLAndTransform(workspaceSlug, projectId, pageId, cookie); if (binary) { return binary; } diff --git a/apps/live/src/core/services/page.service.ts b/apps/live/src/core/services/page.service.ts index 7218ee003d..9c1ed82377 100644 --- a/apps/live/src/core/services/page.service.ts +++ b/apps/live/src/core/services/page.service.ts @@ -8,42 +8,26 @@ export class PageService extends APIService { super(API_BASE_URL); } - async fetchDetails( - workspaceSlug: string, - projectId: string, - pageId: string, - cookie: string - ): Promise { - return this.get( - `/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/${pageId}/`, - { - headers: { - Cookie: cookie, - }, - } - ) + async fetchDetails(workspaceSlug: string, projectId: string, pageId: string, cookie: string): Promise { + return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/${pageId}/`, { + headers: { + Cookie: cookie, + }, + }) .then((response) => response?.data) .catch((error) => { throw error?.response?.data; }); } - async fetchDescriptionBinary( - workspaceSlug: string, - projectId: string, - pageId: string, - cookie: string - ): Promise { - return this.get( - `/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/${pageId}/description/`, - { - headers: { - "Content-Type": "application/octet-stream", - Cookie: cookie, - }, - responseType: "arraybuffer", - } - ) + async fetchDescriptionBinary(workspaceSlug: string, projectId: string, pageId: string, cookie: string): Promise { + return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/${pageId}/description/`, { + headers: { + "Content-Type": "application/octet-stream", + Cookie: cookie, + }, + responseType: "arraybuffer", + }) .then((response) => response?.data) .catch((error) => { throw error?.response?.data; @@ -61,15 +45,11 @@ export class PageService extends APIService { }, cookie: string ): Promise { - return this.patch( - `/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/${pageId}/description/`, - data, - { - headers: { - Cookie: cookie, - }, - } - ) + return this.patch(`/api/workspaces/${workspaceSlug}/projects/${projectId}/pages/${pageId}/description/`, data, { + headers: { + Cookie: cookie, + }, + }) .then((response) => response?.data) .catch((error) => { throw error; diff --git a/apps/live/src/ee/lib/fetch-document.ts b/apps/live/src/ee/lib/fetch-document.ts index 9c9516937c..33aa90bba3 100644 --- a/apps/live/src/ee/lib/fetch-document.ts +++ b/apps/live/src/ee/lib/fetch-document.ts @@ -1 +1 @@ -export * from "../../ce/lib/fetch-document.js" \ No newline at end of file +export * from "../../ce/lib/fetch-document.js"; diff --git a/apps/live/src/ee/types/common.d.ts b/apps/live/src/ee/types/common.d.ts index 8ebedf3814..4f11c54d02 100644 --- a/apps/live/src/ee/types/common.d.ts +++ b/apps/live/src/ee/types/common.d.ts @@ -1 +1 @@ -export * from "../../ce/types/common.js" \ No newline at end of file +export * from "../../ce/types/common.js"; diff --git a/apps/space/core/components/issues/filters/applied-filters/root.tsx b/apps/space/core/components/issues/filters/applied-filters/root.tsx index 6bed900769..af7be085d4 100644 --- a/apps/space/core/components/issues/filters/applied-filters/root.tsx +++ b/apps/space/core/components/issues/filters/applied-filters/root.tsx @@ -35,9 +35,9 @@ export const IssueAppliedFilters: FC = observer((props) => const updateRouteParams = useCallback( (key: keyof TIssueQueryFilters, value: string[]) => { - const state = key === "state" ? value : issueFilters?.filters?.state ?? []; - const priority = key === "priority" ? value : issueFilters?.filters?.priority ?? []; - const labels = key === "labels" ? value : issueFilters?.filters?.labels ?? []; + const state = key === "state" ? value : (issueFilters?.filters?.state ?? []); + const priority = key === "priority" ? value : (issueFilters?.filters?.priority ?? []); + const labels = key === "labels" ? value : (issueFilters?.filters?.labels ?? []); let params: any = { board: activeLayout || "list" }; if (priority.length > 0) params = { ...params, priority: priority.join(",") }; diff --git a/apps/space/core/components/issues/issue-layouts/kanban/kanban-group.tsx b/apps/space/core/components/issues/issue-layouts/kanban/kanban-group.tsx index 50e6ba7740..e6090a938e 100644 --- a/apps/space/core/components/issues/issue-layouts/kanban/kanban-group.tsx +++ b/apps/space/core/components/issues/issue-layouts/kanban/kanban-group.tsx @@ -76,8 +76,8 @@ export const KanbanGroup = observer((props: IKanbanGroup) => { const isSubGroup = !!subGroupId && subGroupId !== "null"; const issueIds = isSubGroup - ? (groupedIssueIds as TSubGroupedIssues)?.[groupId]?.[subGroupId] ?? [] - : (groupedIssueIds as TGroupedIssues)?.[groupId] ?? []; + ? ((groupedIssueIds as TSubGroupedIssues)?.[groupId]?.[subGroupId] ?? []) + : ((groupedIssueIds as TGroupedIssues)?.[groupId] ?? []); const groupIssueCount = getGroupIssueCount(groupId, subGroupId, false) ?? 0; const nextPageResults = getPaginationData(groupId, subGroupId)?.nextPageResults; diff --git a/apps/space/core/components/issues/issue-layouts/kanban/swimlanes.tsx b/apps/space/core/components/issues/issue-layouts/kanban/swimlanes.tsx index 48dd4047c3..8860e73958 100644 --- a/apps/space/core/components/issues/issue-layouts/kanban/swimlanes.tsx +++ b/apps/space/core/components/issues/issue-layouts/kanban/swimlanes.tsx @@ -133,12 +133,7 @@ const SubGroupSwimlaneHeader: React.FC = observer( if (subGroupByVisibilityToggle === false) return <>; return (
- +
); })} diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/cycles/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/cycles/page.tsx index 7bc67af5b5..b7f59441f4 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/cycles/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/cycles/page.tsx @@ -28,4 +28,4 @@ const ProjectArchivedCyclesPage = observer(() => { ); }); -export default ProjectArchivedCyclesPage; \ No newline at end of file +export default ProjectArchivedCyclesPage; diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(list)/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(list)/page.tsx index afa6c0d724..a52b3596f3 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(list)/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/archives/issues/(list)/page.tsx @@ -28,4 +28,4 @@ const ProjectArchivedIssuesPage = observer(() => { ); }); -export default ProjectArchivedIssuesPage; \ No newline at end of file +export default ProjectArchivedIssuesPage; diff --git a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/sidebar.tsx b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/sidebar.tsx index 0f346f5d9a..08ad0f72fa 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/sidebar.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(settings)/settings/(workspace)/sidebar.tsx @@ -1,6 +1,12 @@ import { useParams, usePathname } from "next/navigation"; import { ArrowUpToLine, Building, CreditCard, Users, Webhook } from "lucide-react"; -import { EUserPermissionsLevel, GROUPED_WORKSPACE_SETTINGS, WORKSPACE_SETTINGS_CATEGORIES, EUserPermissions, WORKSPACE_SETTINGS_CATEGORY } from "@plane/constants"; +import { + EUserPermissionsLevel, + GROUPED_WORKSPACE_SETTINGS, + WORKSPACE_SETTINGS_CATEGORIES, + EUserPermissions, + WORKSPACE_SETTINGS_CATEGORY, +} from "@plane/constants"; import { EUserWorkspaceRoles } from "@plane/types"; import { SettingsSidebar } from "@/components/settings"; import { useUserPermissions } from "@/hooks/store/user"; diff --git a/apps/web/app/(all)/layout.preload.tsx b/apps/web/app/(all)/layout.preload.tsx index 18ca3b4b38..fb72b72a5c 100644 --- a/apps/web/app/(all)/layout.preload.tsx +++ b/apps/web/app/(all)/layout.preload.tsx @@ -18,7 +18,7 @@ export const usePreloadResources = () => { `${process.env.NEXT_PUBLIC_API_BASE_URL}/api/users/me/workspaces/?v=${Date.now()}`, ]; - urls.forEach(url => preloadItem(url)); + urls.forEach((url) => preloadItem(url)); }, []); }; diff --git a/apps/web/app/(all)/sign-up/layout.tsx b/apps/web/app/(all)/sign-up/layout.tsx index 3ae0977219..9e259b304a 100644 --- a/apps/web/app/(all)/sign-up/layout.tsx +++ b/apps/web/app/(all)/sign-up/layout.tsx @@ -5,7 +5,7 @@ export const metadata: Metadata = { robots: { index: true, follow: false, - } + }, }; export default function SignUpLayout({ children }: { children: React.ReactNode }) { diff --git a/apps/web/app/(home)/layout.tsx b/apps/web/app/(home)/layout.tsx index 0ed40f86b2..af7645f3c7 100644 --- a/apps/web/app/(home)/layout.tsx +++ b/apps/web/app/(home)/layout.tsx @@ -15,7 +15,5 @@ export const viewport: Viewport = { }; export default function HomeLayout({ children }: { children: React.ReactNode }) { - return ( - <>{children} - ); + return <>{children}; } diff --git a/apps/web/ce/components/common/subscription/index.ts b/apps/web/ce/components/common/subscription/index.ts index beb26e1d97..cfd65903d4 100644 --- a/apps/web/ce/components/common/subscription/index.ts +++ b/apps/web/ce/components/common/subscription/index.ts @@ -1 +1 @@ -export * from "./subscription-pill"; \ No newline at end of file +export * from "./subscription-pill"; diff --git a/apps/web/ce/components/global/product-updates-header.tsx b/apps/web/ce/components/global/product-updates-header.tsx index 8a2a94c5b4..776d9667dd 100644 --- a/apps/web/ce/components/global/product-updates-header.tsx +++ b/apps/web/ce/components/global/product-updates-header.tsx @@ -14,7 +14,7 @@ export const ProductUpdatesHeader = observer(() => {
{t("whats_new")}
-
{ const { t } = useTranslation(); - return {t("version")}: v{packageJson.version}; + return ( + + {t("version")}: v{packageJson.version} + + ); }; diff --git a/apps/web/ce/components/issues/bulk-operations/index.ts b/apps/web/ce/components/issues/bulk-operations/index.ts index 50a9c47c01..1efe34c51e 100644 --- a/apps/web/ce/components/issues/bulk-operations/index.ts +++ b/apps/web/ce/components/issues/bulk-operations/index.ts @@ -1 +1 @@ -export * from "./root"; \ No newline at end of file +export * from "./root"; diff --git a/apps/web/ce/components/issues/issue-modal/index.ts b/apps/web/ce/components/issues/issue-modal/index.ts index b35c5de10d..f63453ba3e 100644 --- a/apps/web/ce/components/issues/issue-modal/index.ts +++ b/apps/web/ce/components/issues/issue-modal/index.ts @@ -2,4 +2,3 @@ export * from "./provider"; export * from "./issue-type-select"; export * from "./additional-properties"; export * from "./template-select"; - diff --git a/apps/web/ce/components/relations/activity.ts b/apps/web/ce/components/relations/activity.ts index 30f08cb749..3b39ae5fe7 100644 --- a/apps/web/ce/components/relations/activity.ts +++ b/apps/web/ce/components/relations/activity.ts @@ -5,13 +5,17 @@ export const getRelationActivityContent = (activity: TIssueActivity | undefined) switch (activity.field) { case "blocking": - return activity.old_value === "" ? `marked this work item is blocking work item ` : `removed the blocking work item `; + return activity.old_value === "" + ? `marked this work item is blocking work item ` + : `removed the blocking work item `; case "blocked_by": return activity.old_value === "" ? `marked this work item is being blocked by ` : `removed this work item being blocked by work item `; case "duplicate": - return activity.old_value === "" ? `marked this work item as duplicate of ` : `removed this work item as a duplicate of `; + return activity.old_value === "" + ? `marked this work item as duplicate of ` + : `removed this work item as a duplicate of `; case "relates_to": return activity.old_value === "" ? `marked that this work item relates to ` : `removed the relation from `; } diff --git a/apps/web/ce/helpers/workspace.helper.ts b/apps/web/ce/helpers/workspace.helper.ts index 7f223f12f4..5e4bf3e464 100644 --- a/apps/web/ce/helpers/workspace.helper.ts +++ b/apps/web/ce/helpers/workspace.helper.ts @@ -1,2 +1,2 @@ export type TRenderSettingsLink = (workspaceSlug: string, settingKey: string) => boolean; -export const shouldRenderSettingLink: TRenderSettingsLink = (workspaceSlug, settingKey) => true; \ No newline at end of file +export const shouldRenderSettingLink: TRenderSettingsLink = (workspaceSlug, settingKey) => true; diff --git a/apps/web/ce/services/project/index.ts b/apps/web/ce/services/project/index.ts index 6c0fc3df4b..15e12c5fd3 100644 --- a/apps/web/ce/services/project/index.ts +++ b/apps/web/ce/services/project/index.ts @@ -1,2 +1,2 @@ export * from "./estimate.service"; -export * from "./view.service"; \ No newline at end of file +export * from "./view.service"; diff --git a/apps/web/ce/types/projects/projects.ts b/apps/web/ce/types/projects/projects.ts index 92c32b65d3..462192e262 100644 --- a/apps/web/ce/types/projects/projects.ts +++ b/apps/web/ce/types/projects/projects.ts @@ -2,4 +2,4 @@ import { IPartialProject, IProject } from "@plane/types"; export type TPartialProject = IPartialProject; -export type TProject = TPartialProject & IProject; +export type TProject = TPartialProject & IProject; diff --git a/apps/web/core/components/account/oauth/oauth-options.tsx b/apps/web/core/components/account/oauth/oauth-options.tsx index eb4ec48518..c4b6ff647a 100644 --- a/apps/web/core/components/account/oauth/oauth-options.tsx +++ b/apps/web/core/components/account/oauth/oauth-options.tsx @@ -12,7 +12,8 @@ export const OAuthOptions: React.FC = observer(() => { // hooks const { config } = useInstance(); - const isOAuthEnabled = (config && (config?.is_google_enabled || config?.is_github_enabled || config?.is_gitlab_enabled)) || false; + const isOAuthEnabled = + (config && (config?.is_google_enabled || config?.is_github_enabled || config?.is_gitlab_enabled)) || false; if (!isOAuthEnabled) return null; diff --git a/apps/web/core/components/analytics/select/project.tsx b/apps/web/core/components/analytics/select/project.tsx index 61a9942081..fa03d56dfe 100644 --- a/apps/web/core/components/analytics/select/project.tsx +++ b/apps/web/core/components/analytics/select/project.tsx @@ -47,11 +47,11 @@ export const ProjectSelect: React.FC = observer((props) => { {value && value.length > 3 ? `3+ projects` : value && value.length > 0 - ? projectIds - ?.filter((p) => value.includes(p)) - .map((p) => getProjectById(p)?.name) - .join(", ") - : "All projects"} + ? projectIds + ?.filter((p) => value.includes(p)) + .map((p) => getProjectById(p)?.name) + .join(", ") + : "All projects"}
} multiple diff --git a/apps/web/core/components/analytics/work-items/workitems-insight-table.tsx b/apps/web/core/components/analytics/work-items/workitems-insight-table.tsx index 480c72b6c5..d0b6262fdd 100644 --- a/apps/web/core/components/analytics/work-items/workitems-insight-table.tsx +++ b/apps/web/core/components/analytics/work-items/workitems-insight-table.tsx @@ -21,7 +21,6 @@ import { InsightTable } from "../insight-table"; const analyticsService = new AnalyticsService(); - declare module "@tanstack/react-table" { interface ColumnMeta { export: { diff --git a/apps/web/core/components/api-token/modal/form.tsx b/apps/web/core/components/api-token/modal/form.tsx index eafd3e8210..279722cfdd 100644 --- a/apps/web/core/components/api-token/modal/form.tsx +++ b/apps/web/core/components/api-token/modal/form.tsx @@ -251,4 +251,4 @@ export const CreateApiTokenForm: React.FC = (props) => {
); -}; \ No newline at end of file +}; diff --git a/apps/web/core/components/api-token/token-list-item.tsx b/apps/web/core/components/api-token/token-list-item.tsx index 37b3549608..f1ec2ff459 100644 --- a/apps/web/core/components/api-token/token-list-item.tsx +++ b/apps/web/core/components/api-token/token-list-item.tsx @@ -60,4 +60,4 @@ export const ApiTokenListItem: React.FC = (props) => {
); -}; \ No newline at end of file +}; diff --git a/apps/web/core/components/automation/auto-archive-automation.tsx b/apps/web/core/components/automation/auto-archive-automation.tsx index c1a8c0b750..719b0b8c75 100644 --- a/apps/web/core/components/automation/auto-archive-automation.tsx +++ b/apps/web/core/components/automation/auto-archive-automation.tsx @@ -39,7 +39,7 @@ export const AutoArchiveAutomation: React.FC = observer((props) => { EUserPermissionsLevel.PROJECT, workspaceSlug?.toString(), currentProjectDetails?.id -); + ); return ( <> diff --git a/apps/web/core/components/chart/utils.ts b/apps/web/core/components/chart/utils.ts index bbdc06f475..6d6895e067 100644 --- a/apps/web/core/components/chart/utils.ts +++ b/apps/web/core/components/chart/utils.ts @@ -1,7 +1,13 @@ import { getWeekOfMonth, isValid } from "date-fns"; import { CHART_X_AXIS_DATE_PROPERTIES, ChartXAxisDateGrouping, TO_CAPITALIZE_PROPERTIES } from "@plane/constants"; import { ChartXAxisProperty, TChart, TChartDatum } from "@plane/types"; -import { capitalizeFirstLetter, hexToHsl, hslToHex, renderFormattedDate, renderFormattedDateWithoutYear } from "@plane/utils"; +import { + capitalizeFirstLetter, + hexToHsl, + hslToHex, + renderFormattedDate, + renderFormattedDateWithoutYear, +} from "@plane/utils"; // const getDateGroupingName = (date: string, dateGrouping: ChartXAxisDateGrouping): string => { @@ -61,7 +67,7 @@ export const parseChartData = ( const updatedWidgetData: TChartDatum[] = widgetData.map((datum) => { const keys = Object.keys(datum); const missingKeys = allKeys.filter((key) => !keys.includes(key)); - const missingValues: Record = Object.fromEntries(missingKeys.map(key => [key, 0])); + const missingValues: Record = Object.fromEntries(missingKeys.map((key) => [key, 0])); if (xAxisProperty) { // capitalize first letter if xAxisProperty is in TO_CAPITALIZE_PROPERTIES and no groupByProperty is set @@ -163,4 +169,4 @@ export const generateExtendedColors = (baseColorSet: string[], targetCount: numb } return colors.slice(0, targetCount); -}; \ No newline at end of file +}; diff --git a/apps/web/core/components/global/product-updates/footer.tsx b/apps/web/core/components/global/product-updates/footer.tsx index 84966e6370..c6ef12036d 100644 --- a/apps/web/core/components/global/product-updates/footer.tsx +++ b/apps/web/core/components/global/product-updates/footer.tsx @@ -13,51 +13,51 @@ export const ProductUpdatesFooter = () => { - Plane {t("powered_by_plane_pages")} diff --git a/apps/web/core/components/issues/archived-issues-header.tsx b/apps/web/core/components/issues/archived-issues-header.tsx index 41929b564c..d9504e3218 100644 --- a/apps/web/core/components/issues/archived-issues-header.tsx +++ b/apps/web/core/components/issues/archived-issues-header.tsx @@ -6,7 +6,12 @@ import { EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_PAGE } from "@plane/constant // i18n import { useTranslation } from "@plane/i18n"; // types -import { EIssuesStoreType, IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "@plane/types"; +import { + EIssuesStoreType, + IIssueDisplayFilterOptions, + IIssueDisplayProperties, + IIssueFilterOptions, +} from "@plane/types"; // components import { isIssueFilterActive } from "@plane/utils"; import { ArchiveTabsList } from "@/components/archives"; @@ -74,7 +79,11 @@ export const ArchivedIssuesHeader: FC = observer(() => { {/* filter options */}
- + = observer((props) => { /> ) : ( -
+
{t("labels")}
diff --git a/apps/web/core/components/issues/workspace-draft/empty-state.tsx b/apps/web/core/components/issues/workspace-draft/empty-state.tsx index cc637321e8..3cd990d07a 100644 --- a/apps/web/core/components/issues/workspace-draft/empty-state.tsx +++ b/apps/web/core/components/issues/workspace-draft/empty-state.tsx @@ -43,7 +43,7 @@ export const WorkspaceDraftEmptyState: FC = observer(() => { onClick: () => { setIsDraftIssueModalOpen(true); }, - disabled: !canPerformEmptyStateActions + disabled: !canPerformEmptyStateActions, }} />
diff --git a/apps/web/core/components/modules/gantt-chart/modules-list-layout.tsx b/apps/web/core/components/modules/gantt-chart/modules-list-layout.tsx index c87f1c4d5f..1260d5621a 100644 --- a/apps/web/core/components/modules/gantt-chart/modules-list-layout.tsx +++ b/apps/web/core/components/modules/gantt-chart/modules-list-layout.tsx @@ -3,10 +3,7 @@ import { useParams } from "next/navigation"; // PLane import { IBlockUpdateData, IBlockUpdateDependencyData, IModule } from "@plane/types"; // components -import { - GanttChartRoot, - ModuleGanttSidebar, -} from "@/components/gantt-chart"; +import { GanttChartRoot, ModuleGanttSidebar } from "@/components/gantt-chart"; import { ETimeLineTypeType, TimeLineTypeContext } from "@/components/gantt-chart/contexts"; import { ModuleGanttBlock } from "@/components/modules"; // hooks diff --git a/apps/web/core/components/profile/overview/activity.tsx b/apps/web/core/components/profile/overview/activity.tsx index 10313ef923..002286c770 100644 --- a/apps/web/core/components/profile/overview/activity.tsx +++ b/apps/web/core/components/profile/overview/activity.tsx @@ -63,7 +63,9 @@ export const ProfileActivity = observer(() => {

- {currentUser?.id === activity.actor_detail?.id ? "You" : activity.actor_detail?.display_name}{" "} + {currentUser?.id === activity.actor_detail?.id + ? "You" + : activity.actor_detail?.display_name}{" "} {activity.field ? ( diff --git a/apps/web/core/components/profile/profile-issues-filter.tsx b/apps/web/core/components/profile/profile-issues-filter.tsx index 7a44b9911e..7339ebdc4a 100644 --- a/apps/web/core/components/profile/profile-issues-filter.tsx +++ b/apps/web/core/components/profile/profile-issues-filter.tsx @@ -6,7 +6,12 @@ import { EIssueLayoutTypes, EIssueFilterType, ISSUE_DISPLAY_FILTERS_BY_PAGE } fr // i18n import { useTranslation } from "@plane/i18n"; // types -import { EIssuesStoreType, IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "@plane/types"; +import { + EIssuesStoreType, + IIssueDisplayFilterOptions, + IIssueDisplayProperties, + IIssueFilterOptions, +} from "@plane/types"; // components import { isIssueFilterActive } from "@plane/utils"; import { DisplayFiltersSelection, FilterSelection, FiltersDropdown, LayoutSelection } from "@/components/issues"; @@ -107,7 +112,11 @@ export const ProfileIssuesFilter = observer(() => { selectedLayout={activeLayout} /> - + { ))} - {currentWorkspaceViews?.map((viewId) => )} + {currentWorkspaceViews?.map((viewId) => ( + + ))}

{isAuthorizedUser ? ( diff --git a/apps/web/core/lib/n-progress/index.tsx b/apps/web/core/lib/n-progress/index.tsx index ed7ad04b74..316628e545 100644 --- a/apps/web/core/lib/n-progress/index.tsx +++ b/apps/web/core/lib/n-progress/index.tsx @@ -1,9 +1,6 @@ -import { start, done } from 'nprogress'; -import { - AppProgressBar as AppProgressBarComponent, - useRouter, -} from './AppProgressBar'; -import withSuspense from './withSuspense'; +import { start, done } from "nprogress"; +import { AppProgressBar as AppProgressBarComponent, useRouter } from "./AppProgressBar"; +import withSuspense from "./withSuspense"; export interface NProgressOptions { minimum?: number; diff --git a/apps/web/core/lib/n-progress/utils/sameURL.ts b/apps/web/core/lib/n-progress/utils/sameURL.ts index 14c689f756..46f8adbb17 100644 --- a/apps/web/core/lib/n-progress/utils/sameURL.ts +++ b/apps/web/core/lib/n-progress/utils/sameURL.ts @@ -1,16 +1,13 @@ export function isSameURL(target: URL, current: URL) { - const cleanTarget = - target.protocol + '//' + target.host + target.pathname + target.search; - const cleanCurrent = - current.protocol + '//' + current.host + current.pathname + current.search; + const cleanTarget = target.protocol + "//" + target.host + target.pathname + target.search; + const cleanCurrent = current.protocol + "//" + current.host + current.pathname + current.search; return cleanTarget === cleanCurrent; } export function isSameURLWithoutSearch(target: URL, current: URL) { - const cleanTarget = target.protocol + '//' + target.host + target.pathname; - const cleanCurrent = - current.protocol + '//' + current.host + current.pathname; + const cleanTarget = target.protocol + "//" + target.host + target.pathname; + const cleanCurrent = current.protocol + "//" + current.host + current.pathname; return cleanTarget === cleanCurrent; } diff --git a/apps/web/core/lib/posthog-view.tsx b/apps/web/core/lib/posthog-view.tsx index 5ec20b970f..4192e8930e 100644 --- a/apps/web/core/lib/posthog-view.tsx +++ b/apps/web/core/lib/posthog-view.tsx @@ -1,9 +1,9 @@ -'use client' +"use client"; import { useEffect } from "react"; import { usePathname, useSearchParams } from "next/navigation"; // posthog -import { usePostHog } from 'posthog-js/react'; +import { usePostHog } from "posthog-js/react"; export default function PostHogPageView(): null { const pathname = usePathname(); @@ -12,18 +12,15 @@ export default function PostHogPageView(): null { useEffect(() => { // Track pageviews if (pathname && posthog) { - let url = window.origin + pathname + let url = window.origin + pathname; if (searchParams.toString()) { - url = url + `?${searchParams.toString()}` + url = url + `?${searchParams.toString()}`; } - posthog.capture( - '$pageview', - { - '$current_url': url, - } - ) + posthog.capture("$pageview", { + $current_url: url, + }); } - }, [pathname, searchParams, posthog]) + }, [pathname, searchParams, posthog]); - return null + return null; } diff --git a/apps/web/core/lib/store-context.tsx b/apps/web/core/lib/store-context.tsx index f06dfb4d83..89fc33a479 100644 --- a/apps/web/core/lib/store-context.tsx +++ b/apps/web/core/lib/store-context.tsx @@ -17,4 +17,6 @@ const initializeStore = () => { export const store = initializeStore(); -export const StoreProvider = ({ children }: { children: ReactElement }) => {children}; +export const StoreProvider = ({ children }: { children: ReactElement }) => ( + {children} +); diff --git a/apps/web/core/local-db/worker/wa-sqlite/src/types/globals.d.ts b/apps/web/core/local-db/worker/wa-sqlite/src/types/globals.d.ts index f7c883b460..e32bd32c80 100644 --- a/apps/web/core/local-db/worker/wa-sqlite/src/types/globals.d.ts +++ b/apps/web/core/local-db/worker/wa-sqlite/src/types/globals.d.ts @@ -59,4 +59,4 @@ declare var _modRename; declare var _jsAuth; -declare var _jsProgress; \ No newline at end of file +declare var _jsProgress; diff --git a/apps/web/core/local-db/worker/wa-sqlite/src/types/index.d.ts b/apps/web/core/local-db/worker/wa-sqlite/src/types/index.d.ts index e693a646bb..0f522f6e16 100644 --- a/apps/web/core/local-db/worker/wa-sqlite/src/types/index.d.ts +++ b/apps/web/core/local-db/worker/wa-sqlite/src/types/index.d.ts @@ -15,7 +15,7 @@ * each element converted to a byte); SQLite always returns blob data as * `Uint8Array` */ -type SQLiteCompatibleType = number|string|Uint8Array|Array|bigint|null; +type SQLiteCompatibleType = number | string | Uint8Array | Array | bigint | null; /** * SQLite Virtual File System object @@ -37,83 +37,50 @@ declare interface SQLiteVFS { /** Maximum length of a file path in UTF-8 bytes (default 64) */ mxPathName?: number; - close(): void|Promise; - isReady(): boolean|Promise; + close(): void | Promise; + isReady(): boolean | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xClose(fileId: number): number|Promise; + xClose(fileId: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xRead( - fileId: number, - pData: number, - iAmt: number, - iOffsetLo: number, - iOffsetHi: number - ): number|Promise; + xRead(fileId: number, pData: number, iAmt: number, iOffsetLo: number, iOffsetHi: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xWrite( - fileId: number, - pData: number, - iAmt: number, - iOffsetLo: number, - iOffsetHi: number - ): number|Promise; + xWrite(fileId: number, pData: number, iAmt: number, iOffsetLo: number, iOffsetHi: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xTruncate(fileId: number, iSizeLo: number, iSizeHi): number|Promise; + xTruncate(fileId: number, iSizeLo: number, iSizeHi): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xSync(fileId: number, flags: number): number|Promise; + xSync(fileId: number, flags: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xFileSize( - fileId: number, - pSize64: number - ): number|Promise; + xFileSize(fileId: number, pSize64: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xLock(fileId: number, flags: number): number|Promise; + xLock(fileId: number, flags: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xUnlock(fileId: number, flags: number): number|Promise; + xUnlock(fileId: number, flags: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xCheckReservedLock( - fileId: number, - pResOut: number - ): number|Promise; + xCheckReservedLock(fileId: number, pResOut: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xFileControl( - fileId: number, - flags: number, - pOut: number - ): number|Promise; + xFileControl(fileId: number, flags: number, pOut: number): number | Promise; /** @see https://sqlite.org/c3ref/io_methods.html */ - xDeviceCharacteristics(fileId: number): number|Promise; + xDeviceCharacteristics(fileId: number): number | Promise; /** @see https://sqlite.org/c3ref/vfs.html */ - xOpen( - pVfs: number, - zName: number, - pFile: number, - flags: number, - pOutFlags: number - ): number|Promise; + xOpen(pVfs: number, zName: number, pFile: number, flags: number, pOutFlags: number): number | Promise; /** @see https://sqlite.org/c3ref/vfs.html */ - xDelete(pVfs: number, zName: number, syncDir: number): number|Promise; + xDelete(pVfs: number, zName: number, syncDir: number): number | Promise; /** @see https://sqlite.org/c3ref/vfs.html */ - xAccess( - pVfs: number, - zName: number, - flags: number, - pResOut: number - ): number|Promise; + xAccess(pVfs: number, zName: number, flags: number, pResOut: number): number | Promise; } /** @@ -217,7 +184,7 @@ declare interface SQLiteAPI { */ bind_collection( stmt: number, - bindings: {[index: string]: SQLiteCompatibleType|null}|Array + bindings: { [index: string]: SQLiteCompatibleType | null } | Array ): number; /** @@ -230,7 +197,7 @@ declare interface SQLiteAPI { * @param value * @returns `SQLITE_OK` (throws exception on error) */ - bind(stmt: number, i: number, value: SQLiteCompatibleType|null): number; + bind(stmt: number, i: number, value: SQLiteCompatibleType | null): number; /** * Bind blob to prepared statement parameter @@ -242,7 +209,7 @@ declare interface SQLiteAPI { * @param value * @returns `SQLITE_OK` (throws exception on error) */ - bind_blob(stmt: number, i: number, value: Uint8Array|Array): number; + bind_blob(stmt: number, i: number, value: Uint8Array | Array): number; /** * Bind number to prepared statement parameter @@ -254,9 +221,9 @@ declare interface SQLiteAPI { * @param value * @returns `SQLITE_OK` (throws exception on error) */ - bind_double(stmt: number, i: number, value: number): number; + bind_double(stmt: number, i: number, value: number): number; - /** + /** * Bind number to prepared statement parameter * * Note that binding indices begin with 1. @@ -268,7 +235,7 @@ declare interface SQLiteAPI { */ bind_int(stmt: number, i: number, value: number): number; - /** + /** * Bind number to prepared statement parameter * * Note that binding indices begin with 1. @@ -278,9 +245,9 @@ declare interface SQLiteAPI { * @param value * @returns `SQLITE_OK` (throws exception on error) */ - bind_int64(stmt: number, i: number, value: bigint): number; + bind_int64(stmt: number, i: number, value: bigint): number; - /** + /** * Bind null to prepared statement * * Note that binding indices begin with 1. @@ -310,7 +277,7 @@ declare interface SQLiteAPI { */ bind_parameter_name(stmt: number, i: number): string; - /** + /** * Bind string to prepared statement * * Note that binding indices begin with 1. @@ -419,7 +386,7 @@ declare interface SQLiteAPI { */ column_int64(stmt: number, i: number): bigint; - /** + /** * Get a column name for a prepared statement * @see https://www.sqlite.org/c3ref/column_blob.html * @param stmt prepared statement pointer @@ -482,9 +449,10 @@ declare interface SQLiteAPI { nArg: number, eTextRep: number, pApp: number, - xFunc?: (context: number, values: Uint32Array) => void|Promise, - xStep?: (context: number, values: Uint32Array) => void|Promise, - xFinal?: (context: number) => void|Promise): number; + xFunc?: (context: number, values: Uint32Array) => void | Promise, + xStep?: (context: number, values: Uint32Array) => void | Promise, + xFinal?: (context: number) => void | Promise + ): number; /** * Get number of columns in current row of a prepared statement @@ -509,7 +477,7 @@ declare interface SQLiteAPI { exec( db: number, zSQL: string, - callback?: (row: Array, columns: string[]) => void + callback?: (row: Array, columns: string[]) => void ): Promise; /** @@ -543,7 +511,7 @@ declare interface SQLiteAPI { * @see https://www.sqlite.org/c3ref/libversion.html * @returns version number, e.g. 3035005 */ - libversion_number(): number + libversion_number(): number; /** * Set a usage limit on a connection. @@ -553,10 +521,7 @@ declare interface SQLiteAPI { * @param newVal * @returns previous setting */ - limit( - db: number, - id: number, - newVal: number): number; + limit(db: number, id: number, newVal: number): number; /** * Opening a new database connection. @@ -570,11 +535,7 @@ declare interface SQLiteAPI { * @param zVfs VFS name * @returns Promise-wrapped database pointer. */ - open_v2( - zFilename: string, - iFlags?: number, - zVfs?: string - ): Promise; + open_v2(zFilename: string, iFlags?: number, zVfs?: string): Promise; /** * Specify callback to be invoked between long-running queries @@ -588,7 +549,7 @@ declare interface SQLiteAPI { * @param handler * @param userData */ - progress_handler(db: number, nProgressOps: number, handler: (userData: any) => number|Promise, userData); + progress_handler(db: number, nProgressOps: number, handler: (userData: any) => number | Promise, userData); /** * Reset a prepared statement object @@ -603,7 +564,7 @@ declare interface SQLiteAPI { * @param context context pointer * @param value */ - result(context: number, value: (SQLiteCompatibleType|number[])|null): void; + result(context: number, value: (SQLiteCompatibleType | number[]) | null): void; /** * Set the result of a function or vtable column @@ -611,7 +572,7 @@ declare interface SQLiteAPI { * @param context context pointer * @param value */ - result_blob(context: number, value: Uint8Array|number[]): void; + result_blob(context: number, value: Uint8Array | number[]): void; /** * Set the result of a function or vtable column @@ -650,19 +611,19 @@ declare interface SQLiteAPI { * @param context context pointer * @param value */ - result_text(context: number, value: string): void; + result_text(context: number, value: string): void; - /** - * Get all column data for a row from a prepared statement step - * - * This convenience function will return a copy of any blob, unlike - * {@link column_blob} which returns a value referencing volatile WASM - * memory with short validity. Like {@link column}, it will return a - * BigInt for integers outside the safe integer bounds for Number. - * @param stmt prepared statement pointer - * @returns row data - */ - row(stmt: number): Array; + /** + * Get all column data for a row from a prepared statement step + * + * This convenience function will return a copy of any blob, unlike + * {@link column_blob} which returns a value referencing volatile WASM + * memory with short validity. Like {@link column}, it will return a + * BigInt for integers outside the safe integer bounds for Number. + * @param stmt prepared statement pointer + * @returns row data + */ + row(stmt: number): Array; /** * Register a callback function that is invoked to authorize certain SQL statement actions. @@ -673,8 +634,16 @@ declare interface SQLiteAPI { */ set_authorizer( db: number, - authFunction: (userData: any, iActionCode: number, param3: string|null, param4: string|null, param5: string|null, param6: string|null) => number|Promise, - userData: any): number; + authFunction: ( + userData: any, + iActionCode: number, + param3: string | null, + param4: string | null, + param5: string | null, + param6: string | null + ) => number | Promise, + userData: any + ): number; /** * Get statement SQL @@ -733,7 +702,7 @@ declare interface SQLiteAPI { */ step(stmt: number): Promise; - /** + /** * Register an update hook * * The callback is invoked whenever a row is updated, inserted, or deleted @@ -749,9 +718,10 @@ declare interface SQLiteAPI { * @param db database pointer * @param callback */ - update_hook( + update_hook( db: number, - callback: (updateType: number, dbName: string|null, tblName: string|null, rowid: bigint) => void): void; + callback: (updateType: number, dbName: string | null, tblName: string | null, rowid: bigint) => void + ): void; /** * Extract a value from `sqlite3_value` @@ -809,7 +779,7 @@ declare interface SQLiteAPI { * @param pValue `sqlite3_value` pointer * @returns value */ - value_int64(pValue: number): bigint; + value_int64(pValue: number): bigint; /** * Extract a value from `sqlite3_value` @@ -839,7 +809,7 @@ declare interface SQLiteAPI { } /** @ignore */ -declare module 'wa-sqlite/src/sqlite-constants.js' { +declare module "wa-sqlite/src/sqlite-constants.js" { export const SQLITE_OK: 0; export const SQLITE_ERROR: 1; export const SQLITE_INTERNAL: 2; @@ -1074,8 +1044,8 @@ declare module 'wa-sqlite/src/sqlite-constants.js' { export const SQLITE_PREPARE_NO_VTAB: 0x04; } -declare module 'wa-sqlite' { - export * from 'wa-sqlite/src/sqlite-constants.js'; +declare module "wa-sqlite" { + export * from "wa-sqlite/src/sqlite-constants.js"; /** * @ignore @@ -1088,26 +1058,26 @@ declare module 'wa-sqlite' { export function Factory(Module: any): SQLiteAPI; export class SQLiteError extends Error { - constructor(message: any, code: any); - code: any; + constructor(message: any, code: any); + code: any; } } /** @ignore */ -declare module 'wa-sqlite/dist/wa-sqlite.mjs' { +declare module "wa-sqlite/dist/wa-sqlite.mjs" { function ModuleFactory(config?: object): Promise; export = ModuleFactory; } /** @ignore */ -declare module 'wa-sqlite/dist/wa-sqlite-async.mjs' { +declare module "wa-sqlite/dist/wa-sqlite-async.mjs" { function ModuleFactory(config?: object): Promise; export = ModuleFactory; } /** @ignore */ -declare module 'wa-sqlite/src/VFS.js' { - export * from 'wa-sqlite/src/sqlite-constants.js'; +declare module "wa-sqlite/src/VFS.js" { + export * from "wa-sqlite/src/sqlite-constants.js"; export class Base { mxPathName: number; @@ -1122,20 +1092,28 @@ declare module 'wa-sqlite/src/VFS.js' { * @param {number} iOffset * @returns {number} */ - xRead(fileId: number, pData: { + xRead( + fileId: number, + pData: { size: number; value: Uint8Array; - }, iOffset: number): number; + }, + iOffset: number + ): number; /** * @param {number} fileId * @param {Uint8Array} pData * @param {number} iOffset * @returns {number} */ - xWrite(fileId: number, pData: { + xWrite( + fileId: number, + pData: { size: number; value: Uint8Array; - }, iOffset: number): number; + }, + iOffset: number + ): number; /** * @param {number} fileId * @param {number} iSize @@ -1222,7 +1200,7 @@ declare module 'wa-sqlite/src/VFS.js' { } /** @ignore */ -declare module 'wa-sqlite/src/examples/IndexedDbVFS.js' { +declare module "wa-sqlite/src/examples/IndexedDbVFS.js" { import * as VFS from "wa-sqlite/src/VFS.js"; export class IndexedDbVFS extends VFS.Base { /** @@ -1275,7 +1253,7 @@ declare module 'wa-sqlite/src/examples/IndexedDbVFS.js' { } /** @ignore */ -declare module 'wa-sqlite/src/examples/MemoryVFS.js' { +declare module "wa-sqlite/src/examples/MemoryVFS.js" { // eslint-disable-next-line no-duplicate-imports import * as VFS from "wa-sqlite/src/VFS.js"; /** @ignore */ @@ -1287,14 +1265,13 @@ declare module 'wa-sqlite/src/examples/MemoryVFS.js' { } /** @ignore */ -declare module 'wa-sqlite/src/examples/MemoryAsyncVFS.js' { +declare module "wa-sqlite/src/examples/MemoryAsyncVFS.js" { import { MemoryVFS } from "wa-sqlite/src/examples/MemoryVFS.js"; - export class MemoryAsyncVFS extends MemoryVFS { - } + export class MemoryAsyncVFS extends MemoryVFS {} } /** @ignore */ -declare module 'wa-sqlite/src/examples/tag.js' { +declare module "wa-sqlite/src/examples/tag.js" { /** * @ignore * Template tag builder. This function creates a tag with an API and diff --git a/apps/web/core/store/issue/draft/issue.store.ts b/apps/web/core/store/issue/draft/issue.store.ts index 6dfbeac80a..c1ccc98a7b 100644 --- a/apps/web/core/store/issue/draft/issue.store.ts +++ b/apps/web/core/store/issue/draft/issue.store.ts @@ -2,7 +2,14 @@ import { action, makeObservable, runInAction } from "mobx"; // base class // services // types -import { TIssue, TLoader, ViewFlags, IssuePaginationOptions, TIssuesResponse, TBulkOperationsPayload } from "@plane/types"; +import { + TIssue, + TLoader, + ViewFlags, + IssuePaginationOptions, + TIssuesResponse, + TBulkOperationsPayload, +} from "@plane/types"; import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store"; import { IIssueRootStore } from "../root.store"; import { IDraftIssuesFilter } from "./filter.store"; diff --git a/apps/web/core/store/issue/helpers/base-issues.store.ts b/apps/web/core/store/issue/helpers/base-issues.store.ts index ef6323af29..263c1081ae 100644 --- a/apps/web/core/store/issue/helpers/base-issues.store.ts +++ b/apps/web/core/store/issue/helpers/base-issues.store.ts @@ -830,7 +830,7 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore { updates: { id: string; start_date?: string; target_date?: string }[], projectId?: string ) { - if(!projectId) return; + if (!projectId) return; const issueDatesBeforeChange: { id: string; start_date?: string; target_date?: string }[] = []; try { const getIssueById = this.rootIssueStore.issues.getIssueById; diff --git a/apps/web/core/store/issue/profile/issue.store.ts b/apps/web/core/store/issue/profile/issue.store.ts index d8728a9358..b26dda529a 100644 --- a/apps/web/core/store/issue/profile/issue.store.ts +++ b/apps/web/core/store/issue/profile/issue.store.ts @@ -1,6 +1,13 @@ import { action, observable, makeObservable, computed, runInAction } from "mobx"; // base class -import { TIssue, TLoader, IssuePaginationOptions, TIssuesResponse, ViewFlags, TBulkOperationsPayload } from "@plane/types"; +import { + TIssue, + TLoader, + IssuePaginationOptions, + TIssuesResponse, + ViewFlags, + TBulkOperationsPayload, +} from "@plane/types"; import { UserService } from "@/services/user.service"; // services diff --git a/apps/web/core/store/issue/root.store.ts b/apps/web/core/store/issue/root.store.ts index 112f3b41f5..5178f2cd54 100644 --- a/apps/web/core/store/issue/root.store.ts +++ b/apps/web/core/store/issue/root.store.ts @@ -1,7 +1,16 @@ import isEmpty from "lodash/isEmpty"; import { autorun, makeObservable, observable } from "mobx"; // types -import { EIssueServiceType, ICycle, IIssueLabel, IModule, IProject, IState, IUserLite, TIssueServiceType } from "@plane/types"; +import { + EIssueServiceType, + ICycle, + IIssueLabel, + IModule, + IProject, + IState, + IUserLite, + TIssueServiceType, +} from "@plane/types"; // plane web store import { IProjectEpics, IProjectEpicsFilter, ProjectEpics, ProjectEpicsFilter } from "@/plane-web/store/issue/epic"; import { IIssueDetail, IssueDetail } from "@/plane-web/store/issue/issue-details/root.store"; diff --git a/apps/web/core/store/issue/workspace-draft/filter.store.ts b/apps/web/core/store/issue/workspace-draft/filter.store.ts index 922931291f..8c6a557a5d 100644 --- a/apps/web/core/store/issue/workspace-draft/filter.store.ts +++ b/apps/web/core/store/issue/workspace-draft/filter.store.ts @@ -1,5 +1,4 @@ -import -isEmpty from "lodash/isEmpty"; +import isEmpty from "lodash/isEmpty"; import set from "lodash/set"; import { action, computed, makeObservable, observable, runInAction } from "mobx"; // base class diff --git a/apps/web/core/store/user/profile.store.ts b/apps/web/core/store/user/profile.store.ts index b478f10025..6c7d12545d 100644 --- a/apps/web/core/store/user/profile.store.ts +++ b/apps/web/core/store/user/profile.store.ts @@ -171,7 +171,6 @@ export class ProfileStore implements IUserProfileStore { runInAction(() => { this.mutateUserProfile({ ...dataToUpdate, is_onboarded: true }); }); - } catch (error) { runInAction(() => { this.error = { @@ -181,7 +180,7 @@ export class ProfileStore implements IUserProfileStore { }); throw error; } - } + }; /** * @description updates the user tour completed status diff --git a/apps/web/core/store/workspace/home.ts b/apps/web/core/store/workspace/home.ts index 109132fb66..551ef7a237 100644 --- a/apps/web/core/store/workspace/home.ts +++ b/apps/web/core/store/workspace/home.ts @@ -20,7 +20,12 @@ export interface IHomeStore { // actions toggleWidgetSettings: (value?: boolean) => void; fetchWidgets: (workspaceSlug: string) => Promise; - reorderWidget: (workspaceSlug: string, widgetKey: string, destinationId: string, edge: string | undefined) => Promise; + reorderWidget: ( + workspaceSlug: string, + widgetKey: string, + destinationId: string, + edge: string | undefined + ) => Promise; toggleWidget: (workspaceSlug: string, widgetKey: string, is_enabled: boolean) => void; } diff --git a/apps/web/ee/components/active-cycles/workspace-active-cycles-upgrade.tsx b/apps/web/ee/components/active-cycles/workspace-active-cycles-upgrade.tsx index c773486878..f35c1f8482 100644 --- a/apps/web/ee/components/active-cycles/workspace-active-cycles-upgrade.tsx +++ b/apps/web/ee/components/active-cycles/workspace-active-cycles-upgrade.tsx @@ -1 +1 @@ -export * from "ce/components/active-cycles/workspace-active-cycles-upgrade"; \ No newline at end of file +export * from "ce/components/active-cycles/workspace-active-cycles-upgrade"; diff --git a/apps/web/ee/components/breadcrumbs/index.ts b/apps/web/ee/components/breadcrumbs/index.ts index ae95faf6bd..eecd3efb09 100644 --- a/apps/web/ee/components/breadcrumbs/index.ts +++ b/apps/web/ee/components/breadcrumbs/index.ts @@ -1 +1 @@ -export * from "ce/components/breadcrumbs"; \ No newline at end of file +export * from "ce/components/breadcrumbs"; diff --git a/apps/web/ee/components/issues/bulk-operations/index.ts b/apps/web/ee/components/issues/bulk-operations/index.ts index 5470941b5a..9427e2fa20 100644 --- a/apps/web/ee/components/issues/bulk-operations/index.ts +++ b/apps/web/ee/components/issues/bulk-operations/index.ts @@ -1 +1 @@ -export * from "ce/components/issues/bulk-operations/index"; \ No newline at end of file +export * from "ce/components/issues/bulk-operations/index"; diff --git a/apps/web/ee/components/issues/issue-layouts/quick-action-dropdowns/index.ts b/apps/web/ee/components/issues/issue-layouts/quick-action-dropdowns/index.ts index 5100afc5a7..2538e79a73 100644 --- a/apps/web/ee/components/issues/issue-layouts/quick-action-dropdowns/index.ts +++ b/apps/web/ee/components/issues/issue-layouts/quick-action-dropdowns/index.ts @@ -1 +1 @@ -export * from "ce/components/issues/issue-layouts/quick-action-dropdowns" \ No newline at end of file +export * from "ce/components/issues/issue-layouts/quick-action-dropdowns"; diff --git a/apps/web/ee/components/sidebar/index.ts b/apps/web/ee/components/sidebar/index.ts index ffc5f14cf7..144cfa2c2a 100644 --- a/apps/web/ee/components/sidebar/index.ts +++ b/apps/web/ee/components/sidebar/index.ts @@ -1 +1 @@ -export * from "ce/components/sidebar"; \ No newline at end of file +export * from "ce/components/sidebar"; diff --git a/apps/web/ee/components/workspace/billing/index.ts b/apps/web/ee/components/workspace/billing/index.ts index 50a9c47c01..1efe34c51e 100644 --- a/apps/web/ee/components/workspace/billing/index.ts +++ b/apps/web/ee/components/workspace/billing/index.ts @@ -1 +1 @@ -export * from "./root"; \ No newline at end of file +export * from "./root"; diff --git a/apps/web/public/animated-icons/uploading.json b/apps/web/public/animated-icons/uploading.json index 1560fd40ef..2258e72bc4 100644 --- a/apps/web/public/animated-icons/uploading.json +++ b/apps/web/public/animated-icons/uploading.json @@ -1 +1,742 @@ -{"v":"5.3.4","fr":60,"ip":0,"op":84,"w":678,"h":896,"nm":"share","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Слой 18","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.347,"y":1},"o":{"x":0.333,"y":0},"n":"0p347_1_0p333_0","t":64,"s":[338,1288,0],"e":[338,492,0],"to":[0,-132.66667175293,0],"ti":[0,132.66667175293,0]},{"t":76}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.354,"y":1},"o":{"x":0.333,"y":0},"n":"0p354_1_0p333_0","t":65,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0.125,-433.461],[0.223,-433.488],[0,-433.488],[0.229,-433.33],[0,-433.488],[0.25,-433.262]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[177,-256.711],[0.223,-433.488],[0,-433.488],[-176.777,-256.711],[0,-433.488],[0,169.488]],"c":false}]},{"t":79}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0,0,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":50,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":65,"op":84,"st":63,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Слой 15","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.393,"y":1},"o":{"x":0.333,"y":0},"n":"0p393_1_0p333_0","t":5,"s":[338,492,0],"e":[338,482,0],"to":[0,-1.66666662693024,0],"ti":[0,-22.1666660308838,0]},{"i":{"x":0.418,"y":1},"o":{"x":0.333,"y":0},"n":"0p418_1_0p333_0","t":15,"s":[338,482,0],"e":[338,625,0],"to":[0,22.1666660308838,0],"ti":[0,-1.66666662693024,0]},{"i":{"x":0.362,"y":1},"o":{"x":0.333,"y":0},"n":"0p362_1_0p333_0","t":26,"s":[338,625,0],"e":[338,492,0],"to":[0,1.66666662693024,0],"ti":[0,22.1666660308838,0]},{"t":35}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.338,"y":1},"o":{"x":0.333,"y":0},"n":"0p338_1_0p333_0","t":0,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[177,-256.711],[0.223,-433.488],[0,-433.488],[-176.777,-256.711],[0,-433.488],[0,169.488]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[169,-252.711],[0.223,-433.488],[0,-433.488],[-168.777,-252.711],[0,-433.488],[0,169.488]],"c":false}]},{"i":{"x":0.368,"y":1},"o":{"x":0.333,"y":0},"n":"0p368_1_0p333_0","t":10,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[169,-252.711],[0.223,-433.488],[0,-433.488],[-168.777,-252.711],[0,-433.488],[0,169.488]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[189,-181.274],[0.223,-273],[0,-273],[-198.777,-181.274],[0,-273],[0,169.488]],"c":false}]},{"i":{"x":0.301,"y":1},"o":{"x":0.333,"y":0},"n":"0p301_1_0p333_0","t":21,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[189,-181.274],[0.223,-273],[0,-273],[-198.777,-181.274],[0,-273],[0,169.488]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[177,-256.711],[0.223,-433.488],[0,-433.488],[-176.777,-256.711],[0,-433.488],[0,169.488]],"c":false}]},{"i":{"x":0.338,"y":1},"o":{"x":0.333,"y":0},"n":"0p338_1_0p333_0","t":30,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[177,-256.711],[0.223,-433.488],[0,-433.488],[-176.777,-256.711],[0,-433.488],[0,169.488]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[55,-331.686],[0.223,-433.488],[0,-433.488],[-52.777,-331.843],[0,-433.488],[0,-78.512]],"c":false}]},{"i":{"x":0.301,"y":1},"o":{"x":0.333,"y":0},"n":"0p301_1_0p333_0","t":36,"s":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[55,-331.686],[0.223,-433.488],[0,-433.488],[-52.777,-331.843],[0,-433.488],[0,-78.512]],"c":false}],"e":[{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[0.25,-432.593],[0.223,-433.488],[0,-433.488],[-0.027,-433.093],[0,-433.488],[0,-432.512]],"c":false}]},{"t":42}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0,0,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":50,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":39,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Слой 17","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[338,492,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[48,-30.133],[32.954,0],[0,0],[25.447,15.225],[0,61.848],[0,0]],"o":[[0,0],[0,60.546],[-26.126,16.401],[0,0],[-31.652,0],[-49.724,-29.75],[0,0],[0,0]],"v":[[301.777,0],[301.777,196],[221.699,340.096],[131.777,366],[-131.777,366],[-218.579,342.008],[-301.777,196],[-301.777,0]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0,0,0,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":50,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.473],"y":[-0.005]},"n":["0p833_1_0p473_-0p005"],"t":8,"s":[0],"e":[10]},{"i":{"x":[0.411],"y":[0.948]},"o":{"x":[0.167],"y":[0]},"n":["0p411_0p948_0p167_0"],"t":19,"s":[10],"e":[0]},{"t":40}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.473],"y":[0.005]},"n":["0p833_1_0p473_0p005"],"t":8,"s":[100],"e":[90]},{"i":{"x":[0.411],"y":[1.052]},"o":{"x":[0.167],"y":[0]},"n":["0p411_1p052_0p167_0"],"t":19,"s":[90],"e":[100]},{"t":40}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":84,"st":0,"bm":0}],"markers":[]} \ No newline at end of file +{ + "v": "5.3.4", + "fr": 60, + "ip": 0, + "op": 84, + "w": 678, + "h": 896, + "nm": "share", + "ddd": 0, + "assets": [], + "layers": [ + { + "ddd": 0, + "ind": 1, + "ty": 4, + "nm": "Слой 18", + "sr": 1, + "ks": { + "o": { "a": 0, "k": 100, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { + "a": 1, + "k": [ + { + "i": { "x": 0.347, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p347_1_0p333_0", + "t": 64, + "s": [338, 1288, 0], + "e": [338, 492, 0], + "to": [0, -132.66667175293, 0], + "ti": [0, 132.66667175293, 0] + }, + { "t": 76 } + ], + "ix": 2 + }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100, 100], "ix": 6 } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 1, + "k": [ + { + "i": { "x": 0.354, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p354_1_0p333_0", + "t": 65, + "s": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [0.125, -433.461], + [0.223, -433.488], + [0, -433.488], + [0.229, -433.33], + [0, -433.488], + [0.25, -433.262] + ], + "c": false + } + ], + "e": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [177, -256.711], + [0.223, -433.488], + [0, -433.488], + [-176.777, -256.711], + [0, -433.488], + [0, 169.488] + ], + "c": false + } + ] + }, + { "t": 79 } + ], + "ix": 2 + }, + "nm": "Path 1", + "mn": "ADBE Vector Shape - Group", + "hd": false + }, + { + "ty": "st", + "c": { "a": 0, "k": [0, 0, 0, 1], "ix": 3 }, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 50, "ix": 5 }, + "lc": 2, + "lj": 2, + "nm": "Stroke 1", + "mn": "ADBE Vector Graphic - Stroke", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Transform" + } + ], + "nm": "Group 1", + "np": 2, + "cix": 2, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 65, + "op": 84, + "st": 63, + "bm": 0 + }, + { + "ddd": 0, + "ind": 2, + "ty": 4, + "nm": "Слой 15", + "sr": 1, + "ks": { + "o": { "a": 0, "k": 100, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { + "a": 1, + "k": [ + { + "i": { "x": 0.393, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p393_1_0p333_0", + "t": 5, + "s": [338, 492, 0], + "e": [338, 482, 0], + "to": [0, -1.66666662693024, 0], + "ti": [0, -22.1666660308838, 0] + }, + { + "i": { "x": 0.418, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p418_1_0p333_0", + "t": 15, + "s": [338, 482, 0], + "e": [338, 625, 0], + "to": [0, 22.1666660308838, 0], + "ti": [0, -1.66666662693024, 0] + }, + { + "i": { "x": 0.362, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p362_1_0p333_0", + "t": 26, + "s": [338, 625, 0], + "e": [338, 492, 0], + "to": [0, 1.66666662693024, 0], + "ti": [0, 22.1666660308838, 0] + }, + { "t": 35 } + ], + "ix": 2 + }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100, 100], "ix": 6 } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 1, + "k": [ + { + "i": { "x": 0.338, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p338_1_0p333_0", + "t": 0, + "s": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [177, -256.711], + [0.223, -433.488], + [0, -433.488], + [-176.777, -256.711], + [0, -433.488], + [0, 169.488] + ], + "c": false + } + ], + "e": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [169, -252.711], + [0.223, -433.488], + [0, -433.488], + [-168.777, -252.711], + [0, -433.488], + [0, 169.488] + ], + "c": false + } + ] + }, + { + "i": { "x": 0.368, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p368_1_0p333_0", + "t": 10, + "s": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [169, -252.711], + [0.223, -433.488], + [0, -433.488], + [-168.777, -252.711], + [0, -433.488], + [0, 169.488] + ], + "c": false + } + ], + "e": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [189, -181.274], + [0.223, -273], + [0, -273], + [-198.777, -181.274], + [0, -273], + [0, 169.488] + ], + "c": false + } + ] + }, + { + "i": { "x": 0.301, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p301_1_0p333_0", + "t": 21, + "s": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [189, -181.274], + [0.223, -273], + [0, -273], + [-198.777, -181.274], + [0, -273], + [0, 169.488] + ], + "c": false + } + ], + "e": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [177, -256.711], + [0.223, -433.488], + [0, -433.488], + [-176.777, -256.711], + [0, -433.488], + [0, 169.488] + ], + "c": false + } + ] + }, + { + "i": { "x": 0.338, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p338_1_0p333_0", + "t": 30, + "s": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [177, -256.711], + [0.223, -433.488], + [0, -433.488], + [-176.777, -256.711], + [0, -433.488], + [0, 169.488] + ], + "c": false + } + ], + "e": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [55, -331.686], + [0.223, -433.488], + [0, -433.488], + [-52.777, -331.843], + [0, -433.488], + [0, -78.512] + ], + "c": false + } + ] + }, + { + "i": { "x": 0.301, "y": 1 }, + "o": { "x": 0.333, "y": 0 }, + "n": "0p301_1_0p333_0", + "t": 36, + "s": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [55, -331.686], + [0.223, -433.488], + [0, -433.488], + [-52.777, -331.843], + [0, -433.488], + [0, -78.512] + ], + "c": false + } + ], + "e": [ + { + "i": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "o": [ + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ], + "v": [ + [0.25, -432.593], + [0.223, -433.488], + [0, -433.488], + [-0.027, -433.093], + [0, -433.488], + [0, -432.512] + ], + "c": false + } + ] + }, + { "t": 42 } + ], + "ix": 2 + }, + "nm": "Path 1", + "mn": "ADBE Vector Shape - Group", + "hd": false + }, + { + "ty": "st", + "c": { "a": 0, "k": [0, 0, 0, 1], "ix": 3 }, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 50, "ix": 5 }, + "lc": 2, + "lj": 2, + "nm": "Stroke 1", + "mn": "ADBE Vector Graphic - Stroke", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Transform" + } + ], + "nm": "Group 1", + "np": 2, + "cix": 2, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 39, + "st": 0, + "bm": 0 + }, + { + "ddd": 0, + "ind": 3, + "ty": 4, + "nm": "Слой 17", + "sr": 1, + "ks": { + "o": { "a": 0, "k": 100, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { "a": 0, "k": [338, 492, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100, 100], "ix": 6 } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "ind": 0, + "ty": "sh", + "ix": 1, + "ks": { + "a": 0, + "k": { + "i": [ + [0, 0], + [0, 0], + [48, -30.133], + [32.954, 0], + [0, 0], + [25.447, 15.225], + [0, 61.848], + [0, 0] + ], + "o": [ + [0, 0], + [0, 60.546], + [-26.126, 16.401], + [0, 0], + [-31.652, 0], + [-49.724, -29.75], + [0, 0], + [0, 0] + ], + "v": [ + [301.777, 0], + [301.777, 196], + [221.699, 340.096], + [131.777, 366], + [-131.777, 366], + [-218.579, 342.008], + [-301.777, 196], + [-301.777, 0] + ], + "c": false + }, + "ix": 2 + }, + "nm": "Path 1", + "mn": "ADBE Vector Shape - Group", + "hd": false + }, + { + "ty": "st", + "c": { "a": 0, "k": [0, 0, 0, 1], "ix": 3 }, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 50, "ix": 5 }, + "lc": 2, + "lj": 2, + "nm": "Stroke 1", + "mn": "ADBE Vector Graphic - Stroke", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [0, 0], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Transform" + } + ], + "nm": "Group 1", + "np": 2, + "cix": 2, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + }, + { + "ty": "tm", + "s": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [1] }, + "o": { "x": [0.473], "y": [-0.005] }, + "n": ["0p833_1_0p473_-0p005"], + "t": 8, + "s": [0], + "e": [10] + }, + { + "i": { "x": [0.411], "y": [0.948] }, + "o": { "x": [0.167], "y": [0] }, + "n": ["0p411_0p948_0p167_0"], + "t": 19, + "s": [10], + "e": [0] + }, + { "t": 40 } + ], + "ix": 1 + }, + "e": { + "a": 1, + "k": [ + { + "i": { "x": [0.833], "y": [1] }, + "o": { "x": [0.473], "y": [0.005] }, + "n": ["0p833_1_0p473_0p005"], + "t": 8, + "s": [100], + "e": [90] + }, + { + "i": { "x": [0.411], "y": [1.052] }, + "o": { "x": [0.167], "y": [0] }, + "n": ["0p411_1p052_0p167_0"], + "t": 19, + "s": [90], + "e": [100] + }, + { "t": 40 } + ], + "ix": 2 + }, + "o": { "a": 0, "k": 0, "ix": 3 }, + "m": 1, + "ix": 2, + "nm": "Trim Paths 1", + "mn": "ADBE Vector Filter - Trim", + "hd": false + } + ], + "ip": 0, + "op": 84, + "st": 0, + "bm": 0 + } + ], + "markers": [] +} diff --git a/apps/web/styles/nprogress.css b/apps/web/styles/nprogress.css index 338d24189e..772360a82e 100644 --- a/apps/web/styles/nprogress.css +++ b/apps/web/styles/nprogress.css @@ -21,7 +21,9 @@ right: 0px; width: 100px; height: 100%; - box-shadow: 0 0 10px #3f76ff, 0 0 5px #3f76ff; + box-shadow: + 0 0 10px #3f76ff, + 0 0 5px #3f76ff; opacity: 1; -webkit-transform: rotate(3deg) translate(0px, -4px); diff --git a/packages/constants/src/analytics/index.ts b/packages/constants/src/analytics/index.ts index 3e2372da34..6b57160892 100644 --- a/packages/constants/src/analytics/index.ts +++ b/packages/constants/src/analytics/index.ts @@ -1 +1 @@ -export * from "./common" \ No newline at end of file +export * from "./common"; diff --git a/packages/constants/src/auth.ts b/packages/constants/src/auth.ts index 1b6cb9111a..16ee1f3e74 100644 --- a/packages/constants/src/auth.ts +++ b/packages/constants/src/auth.ts @@ -11,8 +11,7 @@ export const SPACE_PASSWORD_CRITERIA = [ { key: "min_8_char", label: "Min 8 characters", - isCriteriaValid: (password: string) => - password.length >= PASSWORD_MIN_LENGTH, + isCriteriaValid: (password: string) => password.length >= PASSWORD_MIN_LENGTH, }, // { // key: "min_1_upper_case", diff --git a/packages/constants/src/chart.ts b/packages/constants/src/chart.ts index 42f7f96eae..8bffef4d64 100644 --- a/packages/constants/src/chart.ts +++ b/packages/constants/src/chart.ts @@ -3,7 +3,6 @@ import { ChartXAxisProperty, TChartColorScheme } from "@plane/types"; export const LABEL_CLASSNAME = "uppercase text-custom-text-300/60 text-sm tracking-wide"; export const AXIS_LABEL_CLASSNAME = "uppercase text-custom-text-300/60 text-sm tracking-wide"; - export enum ChartXAxisDateGrouping { DAY = "DAY", WEEK = "WEEK", @@ -23,7 +22,6 @@ export const CHART_X_AXIS_DATE_PROPERTIES: ChartXAxisProperty[] = [ ChartXAxisProperty.COMPLETED_AT, ]; - export enum EChartModels { BASIC = "BASIC", STACKED = "STACKED", @@ -39,88 +37,88 @@ export const CHART_COLOR_PALETTES: { light: string[]; dark: string[]; }[] = [ - { - key: "modern", - i18n_label: "dashboards.widget.color_palettes.modern", - light: [ - "#6172E8", - "#8B6EDB", - "#E05F99", - "#29A383", - "#CB8A37", - "#3AA7C1", - "#F1B24A", - "#E84855", - "#50C799", - "#B35F9E", - ], - dark: [ - "#6B7CDE", - "#8E9DE6", - "#D45D9E", - "#2EAF85", - "#D4A246", - "#29A7C1", - "#B89F6A", - "#D15D64", - "#4ED079", - "#A169A4", - ], - }, - { - key: "horizon", - i18n_label: "dashboards.widget.color_palettes.horizon", - light: [ - "#E76E50", - "#289D90", - "#F3A362", - "#E9C368", - "#264753", - "#8A6FA0", - "#5B9EE5", - "#7CC474", - "#BA7DB5", - "#CF8640", - ], - dark: [ - "#E05A3A", - "#1D8A7E", - "#D98B4D", - "#D1AC50", - "#3A6B7C", - "#7D6297", - "#4D8ACD", - "#569C64", - "#C16A8C", - "#B77436", - ], - }, - { - key: "earthen", - i18n_label: "dashboards.widget.color_palettes.earthen", - light: [ - "#386641", - "#6A994E", - "#A7C957", - "#E97F4E", - "#BC4749", - "#9E2A2B", - "#80CED1", - "#5C3E79", - "#526EAB", - "#6B5B95", - ], - dark: [ - "#497752", - "#7BAA5F", - "#B8DA68", - "#FA905F", - "#CD585A", - "#AF3B3C", - "#91DFE2", - "#6D4F8A", - "#637FBC", - "#7C6CA6", - ], - }, - ]; + { + key: "modern", + i18n_label: "dashboards.widget.color_palettes.modern", + light: [ + "#6172E8", + "#8B6EDB", + "#E05F99", + "#29A383", + "#CB8A37", + "#3AA7C1", + "#F1B24A", + "#E84855", + "#50C799", + "#B35F9E", + ], + dark: [ + "#6B7CDE", + "#8E9DE6", + "#D45D9E", + "#2EAF85", + "#D4A246", + "#29A7C1", + "#B89F6A", + "#D15D64", + "#4ED079", + "#A169A4", + ], + }, + { + key: "horizon", + i18n_label: "dashboards.widget.color_palettes.horizon", + light: [ + "#E76E50", + "#289D90", + "#F3A362", + "#E9C368", + "#264753", + "#8A6FA0", + "#5B9EE5", + "#7CC474", + "#BA7DB5", + "#CF8640", + ], + dark: [ + "#E05A3A", + "#1D8A7E", + "#D98B4D", + "#D1AC50", + "#3A6B7C", + "#7D6297", + "#4D8ACD", + "#569C64", + "#C16A8C", + "#B77436", + ], + }, + { + key: "earthen", + i18n_label: "dashboards.widget.color_palettes.earthen", + light: [ + "#386641", + "#6A994E", + "#A7C957", + "#E97F4E", + "#BC4749", + "#9E2A2B", + "#80CED1", + "#5C3E79", + "#526EAB", + "#6B5B95", + ], + dark: [ + "#497752", + "#7BAA5F", + "#B8DA68", + "#FA905F", + "#CD585A", + "#AF3B3C", + "#91DFE2", + "#6D4F8A", + "#637FBC", + "#7C6CA6", + ], + }, +]; diff --git a/packages/constants/src/issue/layout.ts b/packages/constants/src/issue/layout.ts index 6dd62fd177..7319a532b6 100644 --- a/packages/constants/src/issue/layout.ts +++ b/packages/constants/src/issue/layout.ts @@ -1,9 +1,4 @@ -export type TIssueLayout = - | "list" - | "kanban" - | "calendar" - | "spreadsheet" - | "gantt"; +export type TIssueLayout = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt"; export enum EIssueLayoutTypes { LIST = "list", diff --git a/packages/constants/src/metadata.ts b/packages/constants/src/metadata.ts index 017cc84c25..5bd6e36b4e 100644 --- a/packages/constants/src/metadata.ts +++ b/packages/constants/src/metadata.ts @@ -1,22 +1,16 @@ -export const SITE_NAME = - "Plane | Simple, extensible, open-source project management tool."; -export const SITE_TITLE = - "Plane | Simple, extensible, open-source project management tool."; +export const SITE_NAME = "Plane | Simple, extensible, open-source project management tool."; +export const SITE_TITLE = "Plane | Simple, extensible, open-source project management tool."; export const SITE_DESCRIPTION = "Open-source project management tool to manage work items, cycles, and product roadmaps easily"; export const SITE_KEYWORDS = "software development, plan, ship, software, accelerate, code management, release management, project management, work items tracking, agile, scrum, kanban, collaboration"; export const SITE_URL = "https://app.plane.so/"; -export const TWITTER_USER_NAME = - "Plane | Simple, extensible, open-source project management tool."; +export const TWITTER_USER_NAME = "Plane | Simple, extensible, open-source project management tool."; // Plane Sites Metadata -export const SPACE_SITE_NAME = - "Plane Publish | Make your Plane boards and roadmaps pubic with just one-click. "; -export const SPACE_SITE_TITLE = - "Plane Publish | Make your Plane boards public with one-click"; -export const SPACE_SITE_DESCRIPTION = - "Plane Publish is a customer feedback management tool built on top of plane.so"; +export const SPACE_SITE_NAME = "Plane Publish | Make your Plane boards and roadmaps pubic with just one-click. "; +export const SPACE_SITE_TITLE = "Plane Publish | Make your Plane boards public with one-click"; +export const SPACE_SITE_DESCRIPTION = "Plane Publish is a customer feedback management tool built on top of plane.so"; export const SPACE_SITE_KEYWORDS = "software development, customer feedback, software, accelerate, code management, release management, project management, work items tracking, agile, scrum, kanban, collaboration"; export const SPACE_SITE_URL = "https://app.plane.so/"; diff --git a/packages/constants/src/notification.ts b/packages/constants/src/notification.ts index cb267c4ad1..793a1fa928 100644 --- a/packages/constants/src/notification.ts +++ b/packages/constants/src/notification.ts @@ -31,8 +31,7 @@ export const NOTIFICATION_TABS = [ { i18n_label: "notification.tabs.all", value: ENotificationTab.ALL, - count: (unReadNotification: TUnreadNotificationsCount) => - unReadNotification?.total_unread_notifications_count || 0, + count: (unReadNotification: TUnreadNotificationsCount) => unReadNotification?.total_unread_notifications_count || 0, }, { i18n_label: "notification.tabs.mentions", diff --git a/packages/constants/src/tab-indices.ts b/packages/constants/src/tab-indices.ts index 0382b67f3f..8295841316 100644 --- a/packages/constants/src/tab-indices.ts +++ b/packages/constants/src/tab-indices.ts @@ -53,14 +53,7 @@ export const PROJECT_CREATE_TAB_INDICES = [ "logo_props", ]; -export const PROJECT_CYCLE_TAB_INDICES = [ - "name", - "description", - "date_range", - "cancel", - "submit", - "project_id", -]; +export const PROJECT_CYCLE_TAB_INDICES = ["name", "description", "date_range", "cancel", "submit", "project_id"]; export const PROJECT_MODULE_TAB_INDICES = [ "name", @@ -73,21 +66,9 @@ export const PROJECT_MODULE_TAB_INDICES = [ "submit", ]; -export const PROJECT_VIEW_TAB_INDICES = [ - "name", - "description", - "filters", - "cancel", - "submit", -]; +export const PROJECT_VIEW_TAB_INDICES = ["name", "description", "filters", "cancel", "submit"]; -export const PROJECT_PAGE_TAB_INDICES = [ - "name", - "public", - "private", - "cancel", - "submit", -]; +export const PROJECT_PAGE_TAB_INDICES = ["name", "public", "private", "cancel", "submit"]; export enum ETabIndices { ISSUE_FORM = "issue-form", diff --git a/packages/constants/src/themes.ts b/packages/constants/src/themes.ts index 84e8c0d0b7..bd5d9ba2d3 100644 --- a/packages/constants/src/themes.ts +++ b/packages/constants/src/themes.ts @@ -1,10 +1,4 @@ -export const THEMES = [ - "light", - "dark", - "light-contrast", - "dark-contrast", - "custom", -]; +export const THEMES = ["light", "dark", "light-contrast", "dark-contrast", "custom"]; export interface I_THEME_OPTION { key: string; diff --git a/packages/constants/src/user.ts b/packages/constants/src/user.ts index 2e2f3b162a..b13c953116 100644 --- a/packages/constants/src/user.ts +++ b/packages/constants/src/user.ts @@ -52,11 +52,7 @@ export type TUserAllowedPermissions = { export const USER_ALLOWED_PERMISSIONS: TUserAllowedPermissions = { workspace: { dashboard: { - read: [ - EUserPermissions.ADMIN, - EUserPermissions.MEMBER, - EUserPermissions.GUEST, - ], + read: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST], }, }, project: {}, diff --git a/packages/decorators/src/index.ts b/packages/decorators/src/index.ts index ef71360595..4050664c3f 100644 --- a/packages/decorators/src/index.ts +++ b/packages/decorators/src/index.ts @@ -12,4 +12,3 @@ import * as WebSocketDecorators from "./websocket"; // Named namespace exports export const Rest = RestDecorators; export const WebSocketNS = WebSocketDecorators; - diff --git a/packages/decorators/src/rest.ts b/packages/decorators/src/rest.ts index 68c0fba545..e643e26a93 100644 --- a/packages/decorators/src/rest.ts +++ b/packages/decorators/src/rest.ts @@ -21,13 +21,13 @@ export function Controller(baseRoute: string = ""): ClassDecorator { * @returns Method decorator */ function createHttpMethodDecorator( - method: RestMethod + method: RestMethod, ): (route: string) => MethodDecorator { return function (route: string): MethodDecorator { return function ( target: object, propertyKey: string | symbol, - descriptor: PropertyDescriptor + descriptor: PropertyDescriptor, ) { Reflect.defineMetadata("method", method, target, propertyKey); Reflect.defineMetadata("route", route, target, propertyKey); diff --git a/packages/decorators/tsconfig.json b/packages/decorators/tsconfig.json index 02b459b9f6..72638244b8 100644 --- a/packages/decorators/tsconfig.json +++ b/packages/decorators/tsconfig.json @@ -10,12 +10,6 @@ "@/*": ["./src/*"] } }, - "include": [ - "./src" - ], - "exclude": [ - "dist", - "build", - "node_modules" - ] + "include": ["./src"], + "exclude": ["dist", "build", "node_modules"] } diff --git a/packages/decorators/tsup.config.ts b/packages/decorators/tsup.config.ts index 757dd8ba38..f89f983283 100644 --- a/packages/decorators/tsup.config.ts +++ b/packages/decorators/tsup.config.ts @@ -1,12 +1,12 @@ -import { defineConfig } from 'tsup'; +import { defineConfig } from "tsup"; export default defineConfig({ - entry: ['src/index.ts'], - format: ['esm', 'cjs'], + entry: ["src/index.ts"], + format: ["esm", "cjs"], dts: true, splitting: false, sourcemap: true, clean: true, - external: ['express', 'ws'], + external: ["express", "ws"], treeshake: true, -}); \ No newline at end of file +}); diff --git a/packages/editor/src/ce/types/utils.ts b/packages/editor/src/ce/types/utils.ts index 25a666b938..1f4efd8b74 100644 --- a/packages/editor/src/ce/types/utils.ts +++ b/packages/editor/src/ce/types/utils.ts @@ -1 +1 @@ -export type TAdditionalActiveDropbarExtensions = never; \ No newline at end of file +export type TAdditionalActiveDropbarExtensions = never; diff --git a/packages/editor/src/core/components/editors/editor-container.tsx b/packages/editor/src/core/components/editors/editor-container.tsx index 3553f07fd8..f189bde985 100644 --- a/packages/editor/src/core/components/editors/editor-container.tsx +++ b/packages/editor/src/core/components/editors/editor-container.tsx @@ -55,7 +55,8 @@ export const EditorContainer: FC = (props) => { // Check if its last node and add new node if (lastNode) { - const isLastNodeEmptyParagraph = lastNode.type.name === CORE_EXTENSIONS.PARAGRAPH && lastNode.content.size === 0; + const isLastNodeEmptyParagraph = + lastNode.type.name === CORE_EXTENSIONS.PARAGRAPH && lastNode.content.size === 0; // Only insert a new paragraph if the last node is not an empty paragraph and not a doc node if (!isLastNodeEmptyParagraph && lastNode.type.name !== "doc") { const endPosition = editor?.state.doc.content.size; diff --git a/packages/editor/src/core/components/menus/bubble-menu/root.tsx b/packages/editor/src/core/components/menus/bubble-menu/root.tsx index a3fa3e2d7d..fa5427c3b4 100644 --- a/packages/editor/src/core/components/menus/bubble-menu/root.tsx +++ b/packages/editor/src/core/components/menus/bubble-menu/root.tsx @@ -39,13 +39,13 @@ export interface EditorStateType { center: boolean; color: { key: string; label: string; textColor: string; backgroundColor: string } | undefined; backgroundColor: - | { - key: string; - label: string; - textColor: string; - backgroundColor: string; - } - | undefined; + | { + key: string; + label: string; + textColor: string; + backgroundColor: string; + } + | undefined; } export const EditorBubbleMenu: FC = (props: { editor: Editor }) => { diff --git a/packages/hooks/src/use-local-storage.tsx b/packages/hooks/src/use-local-storage.tsx index f04e0e71ba..0aa8bfcc59 100644 --- a/packages/hooks/src/use-local-storage.tsx +++ b/packages/hooks/src/use-local-storage.tsx @@ -1,8 +1,7 @@ import { useState, useEffect, useCallback } from "react"; export const getValueFromLocalStorage = (key: string, defaultValue: any) => { - if (typeof window === undefined || typeof window === "undefined") - return defaultValue; + if (typeof window === undefined || typeof window === "undefined") return defaultValue; try { const item = window.localStorage.getItem(key); return item ? JSON.parse(item) : defaultValue; @@ -13,8 +12,7 @@ export const getValueFromLocalStorage = (key: string, defaultValue: any) => { }; export const setValueIntoLocalStorage = (key: string, value: any) => { - if (typeof window === undefined || typeof window === "undefined") - return false; + if (typeof window === undefined || typeof window === "undefined") return false; try { window.localStorage.setItem(key, JSON.stringify(value)); return true; @@ -24,9 +22,7 @@ export const setValueIntoLocalStorage = (key: string, value: any) => { }; export const useLocalStorage = (key: string, initialValue: T) => { - const [storedValue, setStoredValue] = useState(() => - getValueFromLocalStorage(key, initialValue) - ); + const [storedValue, setStoredValue] = useState(() => getValueFromLocalStorage(key, initialValue)); const setValue = useCallback( (value: T) => { diff --git a/packages/logger/README.md b/packages/logger/README.md index 6b83eb52bb..4391b898ae 100644 --- a/packages/logger/README.md +++ b/packages/logger/README.md @@ -3,6 +3,7 @@ This package provides a logger and a request logger utility built using [Winston](https://github.com/winstonjs/winston). It offers customizable log levels using env and supports structured logging for general application logs and HTTP requests. ## Features. + - Dynamic log level configuration using env. - Pre-configured winston logger for general usage (`logger`). - Request logger middleware that logs incoming request @@ -10,7 +11,9 @@ This package provides a logger and a request logger utility built using [Winston ## Usage ### Adding as a package + Add this package as a dependency in package.json + ```typescript dependency: { ... @@ -20,11 +23,15 @@ dependency: { ``` ### Importing the Logger + ```typescript -import { logger, requestLogger } from '@plane/logger' +import { logger, requestLogger } from "@plane/logger"; ``` + ### Usage + ### `logger`: General Logger + Use this for general application logs. ```typescript @@ -34,14 +41,16 @@ logger.error("This is an error"); ``` ### `requestLogger`: Request Logger Middleware + Use this as a middleware for incoming requests ```typescript -const app = express() -app.use(requestLogger) +const app = express(); +app.use(requestLogger); ``` ## Available Log Levels + - `error` - `warn` - `info` (default) @@ -51,9 +60,11 @@ app.use(requestLogger) - `silly` ## Log file -- Log files are stored in logs folder of current working directory. Error logs are stored in files with format `error-%DATE%.log` and combined logs are stored with format `combined-%DATE%.log`. + +- Log files are stored in logs folder of current working directory. Error logs are stored in files with format `error-%DATE%.log` and combined logs are stored with format `combined-%DATE%.log`. - Log files have a 7 day rotation period defined. ## Configuration -- By default, the log level is set to `info`. -- You can specify a log level by adding a LOG_LEVEL in .env. \ No newline at end of file + +- By default, the log level is set to `info`. +- You can specify a log level by adding a LOG_LEVEL in .env. diff --git a/packages/propel/src/charts/components/legend.tsx b/packages/propel/src/charts/components/legend.tsx index 3c45581208..94ca2a2bfe 100644 --- a/packages/propel/src/charts/components/legend.tsx +++ b/packages/propel/src/charts/components/legend.tsx @@ -15,16 +15,16 @@ export const getLegendProps = (args: TChartLegend): LegendProps => { overflow: "hidden", ...(layout === "vertical" ? { - top: 0, - alignItems: "center", - height: "100%", - } + top: 0, + alignItems: "center", + height: "100%", + } : { - left: 0, - bottom: 0, - width: "100%", - justifyContent: "center", - }), + left: 0, + bottom: 0, + width: "100%", + justifyContent: "center", + }), ...args.wrapperStyles, }, content: , @@ -34,8 +34,8 @@ export const getLegendProps = (args: TChartLegend): LegendProps => { const CustomLegend = React.forwardRef< HTMLDivElement, React.ComponentProps<"div"> & - Pick & - TChartLegend + Pick & + TChartLegend >((props, ref) => { const { formatter, layout, onClick, onMouseEnter, onMouseLeave, payload } = props; diff --git a/packages/propel/src/charts/components/tick.tsx b/packages/propel/src/charts/components/tick.tsx index 4b64e83736..1a79ca3340 100644 --- a/packages/propel/src/charts/components/tick.tsx +++ b/packages/propel/src/charts/components/tick.tsx @@ -23,25 +23,23 @@ export const CustomYAxisTick = React.memo(({ x, y, payload }: any) => ( CustomYAxisTick.displayName = "CustomYAxisTick"; -export const CustomRadarAxisTick = React.memo( - ({ x, y, payload, getLabel, cx, cy, offset = 16 }: any) => { - // Calculate direction vector from center to tick - const dx = x - cx; - const dy = y - cy; - // Normalize and apply offset - const length = Math.sqrt(dx * dx + dy * dy); - const normX = dx / length; - const normY = dy / length; - const labelX = x + normX * offset; - const labelY = y + normY * offset; +export const CustomRadarAxisTick = React.memo(({ x, y, payload, getLabel, cx, cy, offset = 16 }: any) => { + // Calculate direction vector from center to tick + const dx = x - cx; + const dy = y - cy; + // Normalize and apply offset + const length = Math.sqrt(dx * dx + dy * dy); + const normX = dx / length; + const normY = dy / length; + const labelX = x + normX * offset; + const labelY = y + normY * offset; - return ( - - - {getLabel ? getLabel(payload.value) : payload.value} - - - ); - } -); + return ( + + + {getLabel ? getLabel(payload.value) : payload.value} + + + ); +}); CustomRadarAxisTick.displayName = "CustomRadarAxisTick"; diff --git a/packages/propel/src/charts/radar-chart/index.ts b/packages/propel/src/charts/radar-chart/index.ts index 50a9c47c01..1efe34c51e 100644 --- a/packages/propel/src/charts/radar-chart/index.ts +++ b/packages/propel/src/charts/radar-chart/index.ts @@ -1 +1 @@ -export * from "./root"; \ No newline at end of file +export * from "./root"; diff --git a/packages/propel/src/charts/scatter-chart/index.ts b/packages/propel/src/charts/scatter-chart/index.ts index 50a9c47c01..1efe34c51e 100644 --- a/packages/propel/src/charts/scatter-chart/index.ts +++ b/packages/propel/src/charts/scatter-chart/index.ts @@ -1 +1 @@ -export * from "./root"; \ No newline at end of file +export * from "./root"; diff --git a/packages/propel/src/charts/scatter-chart/root.tsx b/packages/propel/src/charts/scatter-chart/root.tsx index 5187d131bb..25d7b84b47 100644 --- a/packages/propel/src/charts/scatter-chart/root.tsx +++ b/packages/propel/src/charts/scatter-chart/root.tsx @@ -156,4 +156,4 @@ export const ScatterChart = React.memo((prop
); }); -ScatterChart.displayName = "ScatterChart"; \ No newline at end of file +ScatterChart.displayName = "ScatterChart"; diff --git a/packages/propel/src/charts/tree-map/map-content.tsx b/packages/propel/src/charts/tree-map/map-content.tsx index f3b062cb08..0e4a6e2f35 100644 --- a/packages/propel/src/charts/tree-map/map-content.tsx +++ b/packages/propel/src/charts/tree-map/map-content.tsx @@ -252,8 +252,8 @@ export const CustomTreeMapContent: React.FC = ({ {bottom.labelTruncated ? truncateText( label, - availableTextWidth - calculateContentWidth(value, LAYOUT.TEXT.FONT_SIZES.SM) - 4, - LAYOUT.TEXT.FONT_SIZES.SM + availableTextWidth - calculateContentWidth(value, LAYOUT.TEXT.FONT_SIZES.SM) - 4, + LAYOUT.TEXT.FONT_SIZES.SM ) : label} diff --git a/packages/propel/src/table/index.ts b/packages/propel/src/table/index.ts index 8b83d73fe9..8d119dee81 100644 --- a/packages/propel/src/table/index.ts +++ b/packages/propel/src/table/index.ts @@ -1 +1 @@ -export * from "./core"; \ No newline at end of file +export * from "./core"; diff --git a/packages/services/src/file/file-upload.service.ts b/packages/services/src/file/file-upload.service.ts index a2e5ce5e6e..6613cf1d52 100644 --- a/packages/services/src/file/file-upload.service.ts +++ b/packages/services/src/file/file-upload.service.ts @@ -21,10 +21,7 @@ export class FileUploadService extends APIService { * @returns {Promise} Promise resolving to void * @throws {Error} If the request fails */ - async uploadFile( - url: string, - data: FormData, - ): Promise { + async uploadFile(url: string, data: FormData): Promise { this.cancelSource = axios.CancelToken.source(); return this.post(url, data, { headers: { @@ -49,4 +46,4 @@ export class FileUploadService extends APIService { cancelUpload() { this.cancelSource.cancel("Upload canceled"); } -} \ No newline at end of file +} diff --git a/packages/services/tsconfig.json b/packages/services/tsconfig.json index efce2a9fe8..e8af9092ad 100644 --- a/packages/services/tsconfig.json +++ b/packages/services/tsconfig.json @@ -2,7 +2,7 @@ "extends": "@plane/typescript-config/react-library.json", "compilerOptions": { "jsx": "react", - "lib": ["esnext", "dom"], + "lib": ["esnext", "dom"] }, "include": ["./src"], "exclude": ["dist", "build", "node_modules"] diff --git a/packages/types/src/activity.ts b/packages/types/src/activity.ts index 98d54dabc4..957a2028db 100644 --- a/packages/types/src/activity.ts +++ b/packages/types/src/activity.ts @@ -1,7 +1,4 @@ -export type TBaseActivity< - TFieldKey extends string = string, - TVerbKey extends string = string, -> = { +export type TBaseActivity = { id: string; field: TFieldKey | undefined; epoch: number; @@ -19,17 +16,14 @@ export type TBaseActivity< updated_at: string; }; -export type TWorkspaceBaseActivity< - K extends string = string, - V extends string = string, -> = TBaseActivity & { +export type TWorkspaceBaseActivity = TBaseActivity & { workspace: string; }; -export type TProjectBaseActivity< - K extends string = string, - V extends string = string, -> = TWorkspaceBaseActivity & { +export type TProjectBaseActivity = TWorkspaceBaseActivity< + K, + V +> & { project: string; }; diff --git a/packages/types/src/analytics.ts b/packages/types/src/analytics.ts index c40f7e7fdb..e66794f7c3 100644 --- a/packages/types/src/analytics.ts +++ b/packages/types/src/analytics.ts @@ -30,7 +30,6 @@ export enum ChartYAxisMetric { BLOCKED_WORK_ITEM_COUNT = "BLOCKED_WORK_ITEM_COUNT", } - export type TAnalyticsTabsBase = "overview" | "work-items"; export type TAnalyticsGraphsBase = "projects" | "work-items" | "custom-work-items"; export interface AnalyticsTab { diff --git a/packages/types/src/charts/common.ts b/packages/types/src/charts/common.ts index 85034c2fe7..0827021382 100644 --- a/packages/types/src/charts/common.ts +++ b/packages/types/src/charts/common.ts @@ -1,5 +1,3 @@ - - export type TChartColorScheme = "modern" | "horizon" | "earthen"; export type TChartDatum = { @@ -12,5 +10,3 @@ export type TChart = { data: TChartDatum[]; schema: Record; }; - - diff --git a/packages/types/src/command-palette.ts b/packages/types/src/command-palette.ts index 6e072ab8fb..c773c2d36c 100644 --- a/packages/types/src/command-palette.ts +++ b/packages/types/src/command-palette.ts @@ -1,7 +1,4 @@ -export type TCommandPaletteActionList = Record< - string, - { title: string; description: string; action: () => void } ->; +export type TCommandPaletteActionList = Record void }>; export type TCommandPaletteShortcutList = { key: string; diff --git a/packages/types/src/instance/auth.ts b/packages/types/src/instance/auth.ts index 33c2c75476..274c5a29cd 100644 --- a/packages/types/src/instance/auth.ts +++ b/packages/types/src/instance/auth.ts @@ -15,9 +15,7 @@ export type TInstanceAuthenticationMethodKeys = | "IS_GITHUB_ENABLED" | "IS_GITLAB_ENABLED"; -export type TInstanceGoogleAuthenticationConfigurationKeys = - | "GOOGLE_CLIENT_ID" - | "GOOGLE_CLIENT_SECRET"; +export type TInstanceGoogleAuthenticationConfigurationKeys = "GOOGLE_CLIENT_ID" | "GOOGLE_CLIENT_SECRET"; export type TInstanceGithubAuthenticationConfigurationKeys = | "GITHUB_CLIENT_ID" @@ -34,9 +32,7 @@ export type TInstanceAuthenticationConfigurationKeys = | TInstanceGithubAuthenticationConfigurationKeys | TInstanceGitlabAuthenticationConfigurationKeys; -export type TInstanceAuthenticationKeys = - | TInstanceAuthenticationMethodKeys - | TInstanceAuthenticationConfigurationKeys; +export type TInstanceAuthenticationKeys = TInstanceAuthenticationMethodKeys | TInstanceAuthenticationConfigurationKeys; export type TGetBaseAuthenticationModeProps = { disabled: boolean; diff --git a/packages/types/src/instance/image.ts b/packages/types/src/instance/image.ts index 7eee3bf91d..9660a8559d 100644 --- a/packages/types/src/instance/image.ts +++ b/packages/types/src/instance/image.ts @@ -1 +1 @@ -export type TInstanceImageConfigurationKeys = "UNSPLASH_ACCESS_KEY"; \ No newline at end of file +export type TInstanceImageConfigurationKeys = "UNSPLASH_ACCESS_KEY"; diff --git a/packages/types/src/issues/base.ts b/packages/types/src/issues/base.ts index b01bd3b7c0..26054bf134 100644 --- a/packages/types/src/issues/base.ts +++ b/packages/types/src/issues/base.ts @@ -7,13 +7,7 @@ export * from "./issue_relation"; export * from "./issue_sub_issues"; export * from "./activity/base"; - -export type TLoader = - | "init-loader" - | "mutation" - | "pagination" - | "loaded" - | undefined; +export type TLoader = "init-loader" | "mutation" | "pagination" | "loaded" | undefined; export type TGroupedIssues = { [group_id: string]: string[]; diff --git a/packages/types/src/issues/issue.ts b/packages/types/src/issues/issue.ts index 6b5cc0638d..3047ebd650 100644 --- a/packages/types/src/issues/issue.ts +++ b/packages/types/src/issues/issue.ts @@ -207,4 +207,4 @@ export interface IWorkItemPeekOverview { embedRemoveCurrentNotification?: () => void; is_draft?: boolean; storeType?: EIssuesStoreType; -} \ No newline at end of file +} diff --git a/packages/types/src/issues/issue_attachment.ts b/packages/types/src/issues/issue_attachment.ts index f7503b9d20..d118568afd 100644 --- a/packages/types/src/issues/issue_attachment.ts +++ b/packages/types/src/issues/issue_attachment.ts @@ -15,7 +15,7 @@ export type TIssueAttachment = { }; export type TIssueAttachmentUploadResponse = TFileSignedURLResponse & { - attachment: TIssueAttachment + attachment: TIssueAttachment; }; export type TIssueAttachmentMap = { diff --git a/packages/types/src/module/modules.ts b/packages/types/src/module/modules.ts index b428fc8b63..50e9e8af0d 100644 --- a/packages/types/src/module/modules.ts +++ b/packages/types/src/module/modules.ts @@ -2,13 +2,7 @@ import type { TIssue } from "../issues/issue"; import type { IIssueFilterOptions } from "../view-props"; import type { ILinkDetails } from "../issues"; -export type TModuleStatus = - | "backlog" - | "planned" - | "in-progress" - | "paused" - | "completed" - | "cancelled"; +export type TModuleStatus = "backlog" | "planned" | "in-progress" | "paused" | "completed" | "cancelled"; export type TModuleCompletionChartDistribution = { [key: string]: number | null; @@ -114,9 +108,7 @@ export type ModuleLink = { url: string; }; -export type SelectModuleType = - | (IModule & { actionType: "edit" | "delete" | "create-issue" }) - | undefined; +export type SelectModuleType = (IModule & { actionType: "edit" | "delete" | "create-issue" }) | undefined; export type TModulePlotType = "burndown" | "points"; diff --git a/packages/types/src/pragmatic.ts b/packages/types/src/pragmatic.ts index 439e2b54fb..bd0969ce2b 100644 --- a/packages/types/src/pragmatic.ts +++ b/packages/types/src/pragmatic.ts @@ -26,9 +26,4 @@ export interface IPragmaticDropPayload { self: TDropTarget & TDropTargetMiscellaneousData; } -export type InstructionType = - | "reparent" - | "reorder-above" - | "reorder-below" - | "make-child" - | "instruction-blocked"; \ No newline at end of file +export type InstructionType = "reparent" | "reorder-above" | "reorder-below" | "make-child" | "instruction-blocked"; diff --git a/packages/types/src/project/project_filters.ts b/packages/types/src/project/project_filters.ts index 77da7365fb..4c21488ab9 100644 --- a/packages/types/src/project/project_filters.ts +++ b/packages/types/src/project/project_filters.ts @@ -13,9 +13,7 @@ export type TProjectDisplayFilters = { order_by?: TProjectOrderByOptions; }; -export type TProjectAppliedDisplayFilterKeys = - | "my_projects" - | "archived_projects"; +export type TProjectAppliedDisplayFilterKeys = "my_projects" | "archived_projects"; export type TProjectFilters = { access?: string[] | null; diff --git a/packages/types/src/project/projects.ts b/packages/types/src/project/projects.ts index 3de3c71ab9..6927688752 100644 --- a/packages/types/src/project/projects.ts +++ b/packages/types/src/project/projects.ts @@ -152,4 +152,4 @@ export interface ISearchIssueResponse { export type TPartialProject = IPartialProject; -export type TProject = TPartialProject & IProject; +export type TProject = TPartialProject & IProject; diff --git a/packages/types/src/views.ts b/packages/types/src/views.ts index f7630422b6..79af8b7391 100644 --- a/packages/types/src/views.ts +++ b/packages/types/src/views.ts @@ -1,9 +1,5 @@ import { TLogoProps } from "./common"; -import { - IIssueDisplayFilterOptions, - IIssueDisplayProperties, - IIssueFilterOptions, -} from "./view-props"; +import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions } from "./view-props"; export enum EViewAccess { PRIVATE, diff --git a/packages/types/src/workspace-views.ts b/packages/types/src/workspace-views.ts index 2554d63056..00c07aec5a 100644 --- a/packages/types/src/workspace-views.ts +++ b/packages/types/src/workspace-views.ts @@ -32,8 +32,4 @@ export interface IWorkspaceView { }; } -export type TStaticViewTypes = - | "all-issues" - | "assigned" - | "created" - | "subscribed"; +export type TStaticViewTypes = "all-issues" | "assigned" | "created" | "subscribed"; diff --git a/packages/ui/.storybook/main.ts b/packages/ui/.storybook/main.ts index 06442d65f0..4fe51da88b 100644 --- a/packages/ui/.storybook/main.ts +++ b/packages/ui/.storybook/main.ts @@ -18,7 +18,7 @@ const config: StorybookConfig = { getAbsolutePath("@storybook/addon-essentials"), getAbsolutePath("@chromatic-com/storybook"), getAbsolutePath("@storybook/addon-interactions"), - "@storybook/addon-styling-webpack" + "@storybook/addon-styling-webpack", ], framework: { name: getAbsolutePath("@storybook/react-webpack5"), diff --git a/packages/ui/src/dropdown/Readme.md b/packages/ui/src/dropdown/Readme.md index 314347b1e6..4c9bad817c 100644 --- a/packages/ui/src/dropdown/Readme.md +++ b/packages/ui/src/dropdown/Readme.md @@ -1,6 +1,7 @@ Below is a detailed list of the props included: ### Root Props + - value: string | string[]; - Current selected value. - onChange: (value: string | string []) => void; - Callback function for handling value changes. - options: TDropdownOption[] | undefined; - Array of options. @@ -14,6 +15,7 @@ Below is a detailed list of the props included: --- ### Button Props + - buttonContent?: (isOpen: boolean) => React.ReactNode; - Function to render the content of the button based on the open state. - buttonContainerClassName?: string; - Class name for the button container. - buttonClassName?: string; - Class name for the button itself. @@ -21,6 +23,7 @@ Below is a detailed list of the props included: --- ### Input Props + - disableSearch?: boolean; - Disables the search input if set to true. - inputPlaceholder?: string; - Placeholder text for the search input. - inputClassName?: string; - Class name for the search input. @@ -30,6 +33,7 @@ Below is a detailed list of the props included: --- ### Options Props + - keyExtractor: (option: TDropdownOption) => string; - Function to extract the key from each option. - optionsContainerClassName?: string; - Class name for the options container. - queryArray: string[]; - Array of strings to be used for querying the options. @@ -41,4 +45,4 @@ Below is a detailed list of the props included: --- -These properties offer extensive control over the dropdown's behavior and presentation, making it a highly versatile component suitable for various scenarios. \ No newline at end of file +These properties offer extensive control over the dropdown's behavior and presentation, making it a highly versatile component suitable for various scenarios. diff --git a/packages/ui/styles/globals.css b/packages/ui/styles/globals.css index 43338b7a9a..1901c93069 100644 --- a/packages/ui/styles/globals.css +++ b/packages/ui/styles/globals.css @@ -57,23 +57,31 @@ --color-border-300: 212, 212, 212; /* strong border- 1 */ --color-border-400: 185, 185, 185; /* strong border- 2 */ - --color-shadow-2xs: 0px 0px 1px 0px rgba(23, 23, 23, 0.06), 0px 1px 2px 0px rgba(23, 23, 23, 0.06), + --color-shadow-2xs: + 0px 0px 1px 0px rgba(23, 23, 23, 0.06), 0px 1px 2px 0px rgba(23, 23, 23, 0.06), 0px 1px 2px 0px rgba(23, 23, 23, 0.14); - --color-shadow-xs: 0px 1px 2px 0px rgba(0, 0, 0, 0.16), 0px 2px 4px 0px rgba(16, 24, 40, 0.12), + --color-shadow-xs: + 0px 1px 2px 0px rgba(0, 0, 0, 0.16), 0px 2px 4px 0px rgba(16, 24, 40, 0.12), 0px 1px 8px -1px rgba(16, 24, 40, 0.1); - --color-shadow-sm: 0px 1px 4px 0px rgba(0, 0, 0, 0.01), 0px 4px 8px 0px rgba(0, 0, 0, 0.02), - 0px 1px 12px 0px rgba(0, 0, 0, 0.12); - --color-shadow-rg: 0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 4px 4px 0px rgba(16, 24, 40, 0.08), + --color-shadow-sm: + 0px 1px 4px 0px rgba(0, 0, 0, 0.01), 0px 4px 8px 0px rgba(0, 0, 0, 0.02), 0px 1px 12px 0px rgba(0, 0, 0, 0.12); + --color-shadow-rg: + 0px 3px 6px 0px rgba(0, 0, 0, 0.1), 0px 4px 4px 0px rgba(16, 24, 40, 0.08), 0px 1px 12px 0px rgba(16, 24, 40, 0.04); - --color-shadow-md: 0px 4px 8px 0px rgba(0, 0, 0, 0.12), 0px 6px 12px 0px rgba(16, 24, 40, 0.12), + --color-shadow-md: + 0px 4px 8px 0px rgba(0, 0, 0, 0.12), 0px 6px 12px 0px rgba(16, 24, 40, 0.12), 0px 1px 16px 0px rgba(16, 24, 40, 0.12); - --color-shadow-lg: 0px 6px 12px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.12), + --color-shadow-lg: + 0px 6px 12px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.12), 0px 1px 24px 0px rgba(16, 24, 40, 0.12); - --color-shadow-xl: 0px 0px 18px 0px rgba(0, 0, 0, 0.16), 0px 0px 24px 0px rgba(16, 24, 40, 0.16), + --color-shadow-xl: + 0px 0px 18px 0px rgba(0, 0, 0, 0.16), 0px 0px 24px 0px rgba(16, 24, 40, 0.16), 0px 0px 52px 0px rgba(16, 24, 40, 0.16); - --color-shadow-2xl: 0px 8px 16px 0px rgba(0, 0, 0, 0.12), 0px 12px 24px 0px rgba(16, 24, 40, 0.12), + --color-shadow-2xl: + 0px 8px 16px 0px rgba(0, 0, 0, 0.12), 0px 12px 24px 0px rgba(16, 24, 40, 0.12), 0px 1px 32px 0px rgba(16, 24, 40, 0.12); - --color-shadow-3xl: 0px 12px 24px 0px rgba(0, 0, 0, 0.12), 0px 16px 32px 0px rgba(0, 0, 0, 0.12), + --color-shadow-3xl: + 0px 12px 24px 0px rgba(0, 0, 0, 0.12), 0px 16px 32px 0px rgba(0, 0, 0, 0.12), 0px 1px 48px 0px rgba(16, 24, 40, 0.12); --color-shadow-4xl: 0px 8px 40px 0px rgba(0, 0, 61, 0.05), 0px 12px 32px -16px rgba(0, 0, 0, 0.05); diff --git a/packages/utils/src/array.ts b/packages/utils/src/array.ts index 12727d3a00..5d1791c72a 100644 --- a/packages/utils/src/array.ts +++ b/packages/utils/src/array.ts @@ -96,7 +96,6 @@ export const checkIfArraysHaveSameElements = (arr1: any[] | null, arr2: any[] | return arr1.length === arr2.length && arr1.every((e) => arr2.includes(e)); }; - type GroupedItems = { [key: string]: T[] }; /** diff --git a/packages/utils/src/calendar.ts b/packages/utils/src/calendar.ts index c982ff91cc..a8038ec5ef 100644 --- a/packages/utils/src/calendar.ts +++ b/packages/utils/src/calendar.ts @@ -1,7 +1,7 @@ // plane imports import { EStartOfTheWeek, ICalendarDate, ICalendarPayload } from "@plane/types"; // local imports -import { getWeekNumberOfDate, renderFormattedPayloadDate } from "./datetime"; +import { getWeekNumberOfDate, renderFormattedPayloadDate } from "./datetime"; /** * @returns {ICalendarPayload} calendar payload to render the calendar @@ -66,8 +66,9 @@ export const getOrderedDays = ( items: T[], getDayIndex: (item: T) => number, startOfWeek: EStartOfTheWeek = EStartOfTheWeek.SUNDAY -): T[] => [...items].sort((a, b) => { +): T[] => + [...items].sort((a, b) => { const dayA = (7 + getDayIndex(a) - startOfWeek) % 7; const dayB = (7 + getDayIndex(b) - startOfWeek) % 7; return dayA - dayB; - }) + }); diff --git a/packages/utils/src/cycle.ts b/packages/utils/src/cycle.ts index 66002c740e..133db15958 100644 --- a/packages/utils/src/cycle.ts +++ b/packages/utils/src/cycle.ts @@ -6,8 +6,8 @@ import uniqBy from "lodash/uniqBy"; // plane imports import { ICycle, TCycleFilters } from "@plane/types"; // local imports -import { findTotalDaysInRange, generateDateArray, getDate } from "./datetime"; -import { satisfiesDateFilter } from "./filter"; +import { findTotalDaysInRange, generateDateArray, getDate } from "./datetime"; +import { satisfiesDateFilter } from "./filter"; /** * Orders cycles based on their status diff --git a/packages/utils/src/module.ts b/packages/utils/src/module.ts index b1e9f314db..37108b9304 100644 --- a/packages/utils/src/module.ts +++ b/packages/utils/src/module.ts @@ -2,8 +2,8 @@ import sortBy from "lodash/sortBy"; // plane imports import { IModule, TModuleDisplayFilters, TModuleFilters, TModuleOrderByOptions } from "@plane/types"; // local imports -import { getDate } from "./datetime"; -import { satisfiesDateFilter } from "./filter"; +import { getDate } from "./datetime"; +import { satisfiesDateFilter } from "./filter"; /** * @description orders modules based on their status diff --git a/packages/utils/src/page.ts b/packages/utils/src/page.ts index 2501bc5226..3016bc0b63 100644 --- a/packages/utils/src/page.ts +++ b/packages/utils/src/page.ts @@ -2,8 +2,8 @@ import sortBy from "lodash/sortBy"; // plane imports import { TPage, TPageFilterProps, TPageFiltersSortBy, TPageFiltersSortKey, TPageNavigationTabs } from "@plane/types"; // local imports -import { getDate } from "./datetime"; -import { satisfiesDateFilter } from "./filter"; +import { getDate } from "./datetime"; +import { satisfiesDateFilter } from "./filter"; /** * @description filters pages based on the page type @@ -84,4 +84,3 @@ export const getPageName = (name: string | undefined) => { if (!name || name.trim() === "") return "Untitled"; return name; }; - diff --git a/packages/utils/src/project-views.ts b/packages/utils/src/project-views.ts index 5263d70988..aa11f4de07 100644 --- a/packages/utils/src/project-views.ts +++ b/packages/utils/src/project-views.ts @@ -4,7 +4,7 @@ import orderBy from "lodash/orderBy"; import { SPACE_BASE_PATH, SPACE_BASE_URL } from "@plane/constants"; import { IProjectView, TViewFilterProps, TViewFiltersSortBy, TViewFiltersSortKey } from "@plane/types"; // local imports -import { getDate } from "./datetime"; +import { getDate } from "./datetime"; import { satisfiesDateFilter } from "./filter"; /** diff --git a/packages/utils/src/string.ts b/packages/utils/src/string.ts index 58822e1e90..302bf30411 100644 --- a/packages/utils/src/string.ts +++ b/packages/utils/src/string.ts @@ -319,7 +319,6 @@ export const copyTextToClipboard = async (text: string): Promise => { await navigator.clipboard.writeText(text); }; - /** * @description Joins URL path segments properly, removing duplicate slashes using URL encoding * @param {...string} segments - URL path segments to join @@ -371,4 +370,4 @@ export const joinUrlPath = (...segments: string[]): string => { const pathParts = joined.split("/").filter((part) => part !== ""); return pathParts.length > 0 ? `/${pathParts.join("/")}` : ""; } -}; \ No newline at end of file +}; diff --git a/packages/utils/src/work-item/modal.ts b/packages/utils/src/work-item/modal.ts index 74bb1063bb..f39f87eda0 100644 --- a/packages/utils/src/work-item/modal.ts +++ b/packages/utils/src/work-item/modal.ts @@ -33,7 +33,6 @@ export const convertWorkItemDataToSearchResponse = ( workspace__slug: workspaceSlug, }); - export function getChangedIssuefields(formData: Partial, dirtyFields: { [key: string]: boolean | undefined }) { const changedFields = {};