mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 07:11:08 -05:00
feat: Add PrimeProgress, PrimeSelect, and PrimeSkeleton components with customizable styles and props
- Implemented PrimeProgress component with support for labels, helper text, and various styles (size, variant, color). - Created PrimeSelect component with dropdown functionality, custom templates, and validation states. - Developed PrimeSkeleton component for loading placeholders with different shapes and animations. - Updated index.ts to export new components for easy import. - Enhanced PrimeVueTest.vue to include tests for new components and their functionalities. - Introduced a custom ThrillWiki theme for PrimeVue with tailored color schemes and component styles. - Added ambient type declarations for various components to improve TypeScript support.
This commit is contained in:
@@ -10,7 +10,7 @@ from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import status
|
||||
from rest_framework.permissions import AllowAny
|
||||
from drf_spectacular.utils import extend_schema, extend_schema_view
|
||||
from drf_spectacular.utils import extend_schema, extend_schema_view, OpenApiParameter
|
||||
from drf_spectacular.types import OpenApiTypes
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -21,54 +21,62 @@ logger = logging.getLogger(__name__)
|
||||
summary="Get map locations",
|
||||
description="Get map locations with optional clustering and filtering.",
|
||||
parameters=[
|
||||
{
|
||||
"name": "north",
|
||||
"in": "query",
|
||||
"required": False,
|
||||
"schema": {"type": "number"},
|
||||
},
|
||||
{
|
||||
"name": "south",
|
||||
"in": "query",
|
||||
"required": False,
|
||||
"schema": {"type": "number"},
|
||||
},
|
||||
{
|
||||
"name": "east",
|
||||
"in": "query",
|
||||
"required": False,
|
||||
"schema": {"type": "number"},
|
||||
},
|
||||
{
|
||||
"name": "west",
|
||||
"in": "query",
|
||||
"required": False,
|
||||
"schema": {"type": "number"},
|
||||
},
|
||||
{
|
||||
"name": "zoom",
|
||||
"in": "query",
|
||||
"required": False,
|
||||
"schema": {"type": "integer"},
|
||||
},
|
||||
{
|
||||
"name": "types",
|
||||
"in": "query",
|
||||
"required": False,
|
||||
"schema": {"type": "string"},
|
||||
},
|
||||
{
|
||||
"name": "cluster",
|
||||
"in": "query",
|
||||
"required": False,
|
||||
"schema": {"type": "boolean"},
|
||||
},
|
||||
{
|
||||
"name": "q",
|
||||
"in": "query",
|
||||
"required": False,
|
||||
"schema": {"type": "string"},
|
||||
},
|
||||
OpenApiParameter(
|
||||
"north",
|
||||
type=OpenApiTypes.NUMBER,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=False,
|
||||
description="Northern latitude bound",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"south",
|
||||
type=OpenApiTypes.NUMBER,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=False,
|
||||
description="Southern latitude bound",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"east",
|
||||
type=OpenApiTypes.NUMBER,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=False,
|
||||
description="Eastern longitude bound",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"west",
|
||||
type=OpenApiTypes.NUMBER,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=False,
|
||||
description="Western longitude bound",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"zoom",
|
||||
type=OpenApiTypes.INT,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=False,
|
||||
description="Map zoom level",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"types",
|
||||
type=OpenApiTypes.STR,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=False,
|
||||
description="Comma-separated location types",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"cluster",
|
||||
type=OpenApiTypes.BOOL,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=False,
|
||||
description="Enable clustering",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"q",
|
||||
type=OpenApiTypes.STR,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=False,
|
||||
description="Text query",
|
||||
),
|
||||
],
|
||||
responses={200: OpenApiTypes.OBJECT},
|
||||
tags=["Maps"],
|
||||
@@ -105,18 +113,20 @@ class MapLocationsAPIView(APIView):
|
||||
summary="Get location details",
|
||||
description="Get detailed information about a specific location.",
|
||||
parameters=[
|
||||
{
|
||||
"name": "location_type",
|
||||
"in": "path",
|
||||
"required": True,
|
||||
"schema": {"type": "string"},
|
||||
},
|
||||
{
|
||||
"name": "location_id",
|
||||
"in": "path",
|
||||
"required": True,
|
||||
"schema": {"type": "integer"},
|
||||
},
|
||||
OpenApiParameter(
|
||||
"location_type",
|
||||
type=OpenApiTypes.STR,
|
||||
location=OpenApiParameter.PATH,
|
||||
required=True,
|
||||
description="Type of location",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"location_id",
|
||||
type=OpenApiTypes.INT,
|
||||
location=OpenApiParameter.PATH,
|
||||
required=True,
|
||||
description="ID of the location",
|
||||
),
|
||||
],
|
||||
responses={200: OpenApiTypes.OBJECT, 404: OpenApiTypes.OBJECT},
|
||||
tags=["Maps"],
|
||||
@@ -157,12 +167,13 @@ class MapLocationDetailAPIView(APIView):
|
||||
summary="Search map locations",
|
||||
description="Search locations by text query with optional bounds filtering.",
|
||||
parameters=[
|
||||
{
|
||||
"name": "q",
|
||||
"in": "query",
|
||||
"required": True,
|
||||
"schema": {"type": "string"},
|
||||
},
|
||||
OpenApiParameter(
|
||||
"q",
|
||||
type=OpenApiTypes.STR,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=True,
|
||||
description="Search query",
|
||||
),
|
||||
],
|
||||
responses={200: OpenApiTypes.OBJECT, 400: OpenApiTypes.OBJECT},
|
||||
tags=["Maps"],
|
||||
@@ -208,30 +219,34 @@ class MapSearchAPIView(APIView):
|
||||
summary="Get locations within bounds",
|
||||
description="Get locations within specific geographic bounds.",
|
||||
parameters=[
|
||||
{
|
||||
"name": "north",
|
||||
"in": "query",
|
||||
"required": True,
|
||||
"schema": {"type": "number"},
|
||||
},
|
||||
{
|
||||
"name": "south",
|
||||
"in": "query",
|
||||
"required": True,
|
||||
"schema": {"type": "number"},
|
||||
},
|
||||
{
|
||||
"name": "east",
|
||||
"in": "query",
|
||||
"required": True,
|
||||
"schema": {"type": "number"},
|
||||
},
|
||||
{
|
||||
"name": "west",
|
||||
"in": "query",
|
||||
"required": True,
|
||||
"schema": {"type": "number"},
|
||||
},
|
||||
OpenApiParameter(
|
||||
"north",
|
||||
type=OpenApiTypes.NUMBER,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=True,
|
||||
description="Northern latitude bound",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"south",
|
||||
type=OpenApiTypes.NUMBER,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=True,
|
||||
description="Southern latitude bound",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"east",
|
||||
type=OpenApiTypes.NUMBER,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=True,
|
||||
description="Eastern longitude bound",
|
||||
),
|
||||
OpenApiParameter(
|
||||
"west",
|
||||
type=OpenApiTypes.NUMBER,
|
||||
location=OpenApiParameter.QUERY,
|
||||
required=True,
|
||||
description="Western longitude bound",
|
||||
),
|
||||
],
|
||||
responses={200: OpenApiTypes.OBJECT, 400: OpenApiTypes.OBJECT},
|
||||
tags=["Maps"],
|
||||
|
||||
Reference in New Issue
Block a user