diff --git a/app/(main)/ecommerce/checkout-form/page.tsx b/app/(main)/ecommerce/checkout-form/page.tsx deleted file mode 100644 index 119a7f4..0000000 --- a/app/(main)/ecommerce/checkout-form/page.tsx +++ /dev/null @@ -1,146 +0,0 @@ -'use client'; -import { Button } from 'primereact/button'; -import { Checkbox } from 'primereact/checkbox'; -import { Dropdown } from 'primereact/dropdown'; -import { InputNumber } from 'primereact/inputnumber'; -import { InputText } from 'primereact/inputtext'; -import React, { useState } from 'react'; - -function CheckoutForm() { - const [value, setValue] = useState(''); - const [quantities] = useState([1, 1, 1]); - const [checked, setChecked] = useState(true); - const [checked2, setChecked2] = useState(true); - const [selectedCity, setSelectedCity] = useState(null); - const [cities] = useState([ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]); - - return ( -
-
-
- Checkout -
-
-
    -
  • - Cart -
  • -
  • - Information - -
  • -
  • - Shipping - -
  • -
  • Payment
  • -
-
-
- Contact Information - -
- setChecked(e.checked ?? false)} checked={checked} inputId="checkbox-1"> - -
-
-
- Shipping - setSelectedCity(e.value)} placeholder="Country / Region" optionLabel="name" showClear className="w-full"> -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
- setChecked2(e.checked ?? false)} checked={checked2} inputId="checkbox-2"> - -
-
-
- - -
-
-
-
-
- Your Cart -
-
- product -
-
- Product Name - $123.00 -
-
Black | Large
-
- - -
-
-
-
-
- setValue(e.target.value)} placeholder="Promo code" className="w-full" /> - -
-
-
-
- Subtotal - $123.00 -
-
- Shipping - Free -
-
- Total - $123.00 -
-
-
- Country Flag - No additional duties or taxes. -
-
-
-
- ); -} - -export default CheckoutForm; diff --git a/app/(main)/ecommerce/new-product/page.tsx b/app/(main)/ecommerce/new-product/page.tsx deleted file mode 100644 index e462864..0000000 --- a/app/(main)/ecommerce/new-product/page.tsx +++ /dev/null @@ -1,291 +0,0 @@ -'use client'; -import { Button } from 'primereact/button'; -import { Chip } from 'primereact/chip'; -import { Dropdown } from 'primereact/dropdown'; -import { Editor } from 'primereact/editor'; -import { FileUpload, FileUploadSelectEvent, FileUploadUploadEvent, ItemTemplateOptions } from 'primereact/fileupload'; -import { InputSwitch } from 'primereact/inputswitch'; -import { InputText } from 'primereact/inputtext'; -import { classNames } from 'primereact/utils'; -import React, { useRef, useState } from 'react'; -import type { Demo } from '@/types'; - -function NewProduct() { - const colorOptions = [ - { name: 'Black', background: 'bg-gray-900' }, - { name: 'Orange', background: 'bg-orange-500' }, - { name: 'Navy', background: 'bg-blue-500' } - ]; - - const [product, setProduct] = useState({ - name: '', - price: '', - code: '', - sku: '', - status: 'Draft', - tags: ['Nike', 'Sneaker'], - category: 'Sneakers', - colors: [], - stock: 'Sneakers', - inStock: true, - description: '', - images: [] - }); - - const [selectedCategory, setSelectedCategory] = useState(product.category); - const [selectedStock, setSelectedStock] = useState(product.category); - const categoryOptions = ['Sneakers', 'Apparel', 'Socks']; - - const fileUploader = useRef(null); - - const chipTemplate = (tag: string) => { - return ( - - {tag} - onChipRemove(tag)}> - - - - ); - }; - - const onImageMouseOver = (ref: React.RefObject - - - - ); - }; - - return ( -
- Create Product -
-
-
-
- - setProduct((prevState) => ({ - ...prevState, - name: e.target.value - })) - } - placeholder="Product Name" - /> -
-
- - setProduct((prevState) => ({ - ...prevState, - price: parseFloat(e.target.value) || undefined - })) - } - /> -
-
- - setProduct((prevState) => ({ - ...prevState, - code: e.target.value - })) - } - /> -
-
- - setProduct((prevState) => ({ - ...prevState, - sku: e.target.value - })) - } - /> -
-
- -
-
- -
-
-
- -
-
- Publish -
-
- Status: - {product.status as string} - -
-
-
- -
- Tags -
- {(product.tags as string[])?.map((tag, i) => { - return chipTemplate(tag)} />; - })} -
-
- -
- Category -
- setSelectedCategory(e.value)} placeholder="Select a category"> -
-
- -
- Colors -
- {colorOptions.map((color, i) => { - return ( -
{ - onColorSelect(color.name, i); - }} - > - {(product.colors as string[]).includes(color.name) ? : null} -
- ); - })} -
-
- -
- Stock -
- setSelectedStock(e.value)} placeholder="Select stock"> -
-
- -
- In stock - - setProduct((prevState) => ({ - ...prevState, - inStock: e.value as boolean - })) - } - > -
- -
- - -
-
-
-
- ); -} - -export default NewProduct; diff --git a/app/(main)/ecommerce/order-history/page.tsx b/app/(main)/ecommerce/order-history/page.tsx deleted file mode 100644 index c383a56..0000000 --- a/app/(main)/ecommerce/order-history/page.tsx +++ /dev/null @@ -1,166 +0,0 @@ -'use client'; -import { Divider } from 'primereact/divider'; -import { Ripple } from 'primereact/ripple'; -import React from 'react'; - -function OrderHistory() { - const orders = [ - { - orderNumber: '45123', - orderDate: '7 February 2023', - amount: '$123.00', - products: [ - { - name: 'Product Name Placeholder A Little Bit Long One', - color: 'White', - size: 'Small', - price: '$50', - deliveryDate: 'Delivered on 7 February 2023', - image: '/demo/images/ecommerce/order-history/orderhistory-1.png' - }, - { - name: 'Product Name Placeholder A Little Bit Long One', - color: 'White', - size: 'Small', - price: '$50', - deliveryDate: 'Delivered on 7 February 2023', - image: '/demo/images/ecommerce/order-history/orderhistory-2.png' - }, - { - name: 'Product Name Placeholder A Little Bit Long One', - color: 'White', - size: 'Small', - price: '$63', - deliveryDate: 'Delivered on 7 February 2023', - image: '/demo/images/ecommerce/order-history/orderhistory-3.png' - } - ] - }, - { - orderNumber: '45126', - orderDate: '9 February 2023', - amount: '$250.00', - products: [ - { - name: 'Product Name Placeholder A Little Bit Long One', - color: 'White', - size: 'Small', - price: '$80', - deliveryDate: 'Delivered on 9 February 2023', - image: '/demo/images/ecommerce/order-history/orderhistory-4.png' - }, - { - name: 'Product Name Placeholder A Little Bit Long One', - color: 'White', - size: 'Small', - price: '$20', - deliveryDate: 'Delivered on 9 February 2023', - image: '/demo/images/ecommerce/order-history/orderhistory-5.png' - }, - { - name: 'Product Name Placeholder A Little Bit Long One', - color: 'White', - size: 'Small', - price: '$150', - deliveryDate: 'Delivered on 9 February 2023', - image: '/demo/images/ecommerce/order-history/orderhistory-6.png' - } - ] - } - ]; - - return ( -
-
-
- My Orders - Dignissim diam quis enim lobortis. -
- - - - -
- {orders.map((order, i) => { - return ( -
-
-
- Order Number - {order.orderNumber} -
- -
- Order Date - {order.orderDate} -
- -
- Total Amount - {order.amount} -
-
-
- {order.products.map((product, i) => { - return ( -
-
- product -
- {product.name} - - {product.color} | {product.size} - - - Buy Again | {product.price} - - -
-
-
- - - - {product.deliveryDate} -
- {i !== order.products.length - 1 && } -
- ); - })} -
-
- - Archive Order - - - Return - - - View Invoice - - - Write a Review - -
-
- ); - })} -
- ); -} - -export default OrderHistory; diff --git a/app/(main)/ecommerce/order-summary/page.tsx b/app/(main)/ecommerce/order-summary/page.tsx deleted file mode 100644 index f9d93e8..0000000 --- a/app/(main)/ecommerce/order-summary/page.tsx +++ /dev/null @@ -1,171 +0,0 @@ -'use client'; -import { Button } from 'primereact/button'; -import { classNames } from 'primereact/utils'; -import React from 'react'; - -function OrderSummary() { - const products = [ - { - name: 'Cotton Sweatshirt', - size: 'Medium', - color: 'White', - price: '$12', - quantity: '1', - image: '/demo/images/ecommerce/ordersummary/order-summary-1-1.png' - }, - { - name: 'Regular Jeans', - size: 'Large', - color: 'Black', - price: '$24', - quantity: '1', - image: '/demo/images/ecommerce/ordersummary/order-summary-1-2.png' - } - ]; - - return ( - <> -
- Thanks! -
Successful Order 🚀
-

Your order is on the way. It‘ll be shipped today. We‘ll inform you.

-
- -
-
- Order number: - 451234 -
-
- - -
-
-
-
    - {products.map((product, i) => { - return ( -
  • - {product.name} -
    - {product.name} - - {product.color} | {product.size} - - Quantity: {product.quantity} -
    - {product.price} -
  • - ); - })} -
-
-
-
- Shipping Address -
- Celeste Slater - 606-3727 Ullamcorper. Roseville NH 11523 - (786) 713-8616 -
- - Payment -
- visa -
- Visa Debit Card - **** **** **** 1234 -
-
-
-
-
    -
  • - Summary -
  • -
  • - Subtotal - $36.00 -
  • -
  • - Shipping - $5.00 -
  • -
  • - Tax - $4.00 -
  • -
  • - Total - $41.00 -
  • -
-
-
-
- -
-
- Thanks for your order! -
-
- Order ID - 451234 -
-
- Order Date - 7 Feb 2023 -
-
-
-
- summary-1-2 -
- Product Name -
Order Processing
-
-
-
-
- Ordered - Processing - Shipping - Delivered -
-
-
-
-
- Product Name - $21.00 -
-
- Shipping Address -
- Celeste Slater - 606-3727 Ullamcorper. Roseville NH 11523 - (786) 713-8616 -
-
-
- Payment -
- visa-2 -
- Visa Debit Card - **** **** **** 1234 -
-
-
-
-
- - ); -} - -export default OrderSummary; diff --git a/app/(main)/ecommerce/product-list/page.tsx b/app/(main)/ecommerce/product-list/page.tsx deleted file mode 100644 index 89e688c..0000000 --- a/app/(main)/ecommerce/product-list/page.tsx +++ /dev/null @@ -1,171 +0,0 @@ -'use client'; -import { Button } from 'primereact/button'; -import React, { useState } from 'react'; - -function ProductList() { - const [products] = useState([ - { - price: '$140.00', - image: 'demo/images/ecommerce/product-list/product-list-4-1.png' - }, - { - price: '$82.00', - image: 'demo/images/ecommerce/product-list/product-list-4-2.png' - }, - { - price: '$54.00', - image: 'demo/images/ecommerce/product-list/product-list-4-3.png' - }, - { - price: '$72.00', - image: 'demo/images/ecommerce/product-list/product-list-4-4.png' - }, - { - price: '$99.00', - image: 'demo/images/ecommerce/product-list/product-list-4-5.png' - }, - { - price: '$89.00', - image: 'demo/images/ecommerce/product-list/product-list-4-6.png' - } - ]); - - const [products2, setProducts2] = useState([ - { - color: 'Bluegray', - image: 'demo/images/ecommerce/product-list/product-list-2-1.png' - }, - { - color: 'Indigo', - image: 'demo/images/ecommerce/product-list/product-list-2-2.png' - }, - { - color: 'Green', - image: 'demo/images/ecommerce/product-list/product-list-2-3.png' - }, - { - color: 'Blue', - image: 'demo/images/ecommerce/product-list/product-list-2-4.png' - } - ]); - - const onColorChange = (color: string, productIndex: number) => { - const _products2 = [...products2]; - _products2[productIndex]['color'] = color; - setProducts2(_products2); - }; - - return ( - <> -
-
Popular Products
-

Exclusive Selection

-
- {products.map((product, i) => { - return ( -
-
-
-
- - Category - - {i.toString()} -
-
- Product Name - - - 5.0 - -
-

Enim nec dui nunc mattis enim ut tellus. Tincidunt arcu.

- {product.price} -
-
-
- ); - })} -
-
- -
-
- {products2.map((product, i) => { - return ( -
-
- {i.toString()} - -
-
- Product Name - $150.00 -
-
onColorChange('Bluegray', i)} - >
-
onColorChange('Indigo', i)} - >
-
onColorChange('Green', i)} - >
-
onColorChange('Blue', i)} - >
-
- {product.color} -
-
- ); - })} -
-
- - ); -} - -export default ProductList; diff --git a/app/(main)/ecommerce/product-overview/page.tsx b/app/(main)/ecommerce/product-overview/page.tsx deleted file mode 100644 index cc3f0cc..0000000 --- a/app/(main)/ecommerce/product-overview/page.tsx +++ /dev/null @@ -1,284 +0,0 @@ -'use client'; -import { Button } from 'primereact/button'; -import { InputNumber } from 'primereact/inputnumber'; -import { TabPanel, TabView } from 'primereact/tabview'; -import { classNames } from 'primereact/utils'; -import React, { useEffect, useState } from 'react'; - -function ProductOverview() { - const [images, setImages] = useState([]); - const [selectedImageIndex, setSelectedImageIndex] = useState(0); - const [liked, setLiked] = useState(false); - const [quantity, setQuantity] = useState(1); - const [color, setColor] = useState('bluegray'); - const [size, setSize] = useState('M'); - - useEffect(() => { - setImages(['product-overview-3-1.png', 'product-overview-3-2.png', 'product-overview-3-3.png', 'product-overview-3-4.png']); - }, [selectedImageIndex]); - - return ( -
-
-
-
-
- {images.map((image, i) => { - return ( - {i.toString()} setSelectedImageIndex(i)} - /> - ); - })} -
-
- {images[selectedImageIndex]} -
-
-
-
-
Product Title Placeholder
-
- $120 -
- - - - - - - - - 24 reviews - -
-
- -
Color
-
-
setColor('bluegray')} - >
-
setColor('green')} - >
-
setColor('blue')} - >
-
- -
- Size - - Size Guide - -
-
-
setSize('XS')} - > - XS -
-
setSize('S')} - > - S -
-
setSize('M')} - > - M -
-
setSize('L')} - > - L -
-
setSize('XL')} - > - XL -
-
- -
Quantity
-
- setQuantity(e.value ?? 0)} - decrementButtonClassName="p-button-text" - incrementButtonClassName="p-button-text" - incrementButtonIcon="pi pi-plus" - decrementButtonIcon="pi pi-minus" - > -
- - setLiked(!liked)} - > -
-
-
-
- - - -
Product Details
-

- Volutpat maecenas volutpat blandit aliquam etiam erat velit scelerisque in. Duis ultricies lacus sed turpis tincidunt id. Sed tempus urna et pharetra. Metus vulputate eu scelerisque felis imperdiet proin fermentum. Venenatis - urna cursus eget nunc scelerisque viverra mauris in. Viverra justo nec ultrices dui sapien eget mi proin. Laoreet suspendisse interdum consectetur libero id faucibus. -

- -
-
- Highlights -
    -
  • Vulputate sapien nec.
  • -
  • Purus gravida quis blandit.
  • -
  • Nisi quis eleifend quam adipiscing.
  • -
  • Imperdiet proin fermentum.
  • -
-
-
- Size and Fit -
    -
  • - Leo vel: Egestas congue. -
  • -
  • - Sociis natoque: Parturient montes nascetur. -
  • -
  • - Suspendisse in: Purus sit amet volutpat. -
  • -
-
-
- Material & Care -
    -
  • - - Not dryer safe -
  • -
  • - - No chemical wash -
  • -
  • - - Iron medium heat -
  • -
  • - - Dry flat -
  • -
-
-
-
- -
Customer Reviews
-
    -
  • - - - - - - - -
    Absolute Perfection!
    -

    - Blandit libero volutpat sed cras ornare arcu dui vivamus. Arcu dictum varius duis at consectetur lorem donec massa. Imperdiet proin fermentum leo vel orci porta non. Porttitor rhoncus dolor purus non. -

    - Darlene Robertson, 2 days ago -
  • -
  • - - - - - - - -
    Classy
    -

    Venenatis cras sed felis eget. Proin nibh nisl condimentum id venenatis a condimentum.

    - Kristin Watson, 2 days ago -
  • -
-
- -
Shipping Placeholder
-

- Mattis aliquam faucibus purus in massa tempor nec feugiat nisl. Justo donec enim diam vulputate ut pharetra. Tempus egestas sed sed risus. Feugiat sed lectus vestibulum mattis. Tristique nulla aliquet enim tortor at auctor - urna nunc. Habitant morbi tristique senectus et. Facilisi nullam vehicula ipsum. -

- -
-
- Shipping Costs -
    -
  • Japan - JPY 2,500.
  • -
  • Europe - EUR 10
  • -
  • Switzerland - CHF 10
  • -
  • Canada - CAD 25
  • -
  • USA - USD 20
  • -
  • Australia - AUD 30
  • -
  • United Kingdom - GBP 10
  • -
-
-
- Return Policy -

Pharetra et ultrices neque ornare aenean euismod elementum nisi. Diam phasellus vestibulum lorem sed. Mattis molestie a iaculis at.

-
-
-
-
-
- ); -} - -export default ProductOverview; diff --git a/app/(main)/ecommerce/shopping-cart/page.tsx b/app/(main)/ecommerce/shopping-cart/page.tsx deleted file mode 100644 index 787f619..0000000 --- a/app/(main)/ecommerce/shopping-cart/page.tsx +++ /dev/null @@ -1,129 +0,0 @@ -'use client'; -import { Button } from 'primereact/button'; -import { Dropdown } from 'primereact/dropdown'; -import React, { useState } from 'react'; - -function ShoppingCart() { - const quantityOptions = [ - { label: '1', value: 1 }, - { label: '2', value: 2 }, - { label: '3', value: 3 }, - { label: '4', value: 4 } - ]; - const [selectedQuantity, setselectedQuantity] = useState(1); - const [selectedQuantity2, setselectedQuantity2] = useState(1); - - return ( -
-
-
Your cart total is $82.00
-

FREE SHIPPING AND RETURN

-
-
    -
  • - shopping-cart-2-1 -
    -
    -
    - Product Name - Medium -
    -
    -
    - setselectedQuantity(e.value)}> -
    -
    - $20.00 - - Remove - -
    -
    -
    -
    - - - Order today. - - - - - Delivery by Dec 23. - - - - - Only 8 Available. - -
    -
    -
  • -
  • - shopping-cart-2-2 -
    -
    -
    - Product Name - Medium -
    -
    -
    - setselectedQuantity2(e.value)}> -
    -
    - $62.00 - - Remove - -
    -
    -
    -
    - - - Order today. - - - - - Delivery by Dec 23. - - - - - Only 2 Available. - -
    -
    -
  • -
-
-
-
    -
  • - Subtotal - $82.00 -
  • -
  • - Shipping - Free -
  • -
  • - VAT - $8.00 -
  • -
  • - Total - $90.00 -
  • -
  • - -
  • -
-
-
- ); -} - -export default ShoppingCart; diff --git a/app/(main)/pages/aboutus/page.tsx b/app/(main)/pages/aboutus/page.tsx deleted file mode 100644 index c22b83f..0000000 --- a/app/(main)/pages/aboutus/page.tsx +++ /dev/null @@ -1,140 +0,0 @@ -'use client'; - -import React, { useState } from 'react'; - -function AboutUs() { - const [visibleMember, setVisibleMember] = useState(null); - - return ( - <> -
-
-
- Image -
-
-
About us
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est - laborum. -

-

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo - enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, - consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. -

-

- Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae - consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? -

-
-
-
- Our Team -
Faucibus ornare suspendisse sed nisi. Nisl rhoncus mattis rhoncus urna neque viverra justo nec.
-
-
-
setVisibleMember(0)} onMouseLeave={() => setVisibleMember(-1)}> - Team 1 - {visibleMember === 0 && ( -
-
- Jeff Davies - Software Developer - -
-
- )} -
-
-
-
setVisibleMember(1)} onMouseLeave={() => setVisibleMember(-1)}> - Team 2 - {visibleMember === 1 && ( -
-
- Kristin Watson - UI/UX Designer - -
-
- )} -
-
-
-
setVisibleMember(2)} onMouseLeave={() => setVisibleMember(-1)}> - Team 3 - {visibleMember === 2 && ( -
-
- Jenna Williams - Marketing Specialist - -
-
- )} -
-
-
-
setVisibleMember(3)} onMouseLeave={() => setVisibleMember(-1)}> - Team 4 - {visibleMember === 3 && ( -
-
- Joe Clifford - Customer Relations - -
-
- )} -
-
-
-
-
- - ); -} - -export default AboutUs; diff --git a/app/(main)/pages/access/page.tsx b/app/(main)/pages/access/page.tsx deleted file mode 100644 index 7735ae5..0000000 --- a/app/(main)/pages/access/page.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import Link from 'next/link'; - -function Access() { - return ( -
- diamond-layout - -
-
ACCESS DENIED
-
You do not have the necessary permissions.
- Go to Dashboard -
-
- ); -} - -export default Access; diff --git a/app/(main)/pages/contact/page.tsx b/app/(main)/pages/contact/page.tsx deleted file mode 100644 index 11eaac3..0000000 --- a/app/(main)/pages/contact/page.tsx +++ /dev/null @@ -1,87 +0,0 @@ -'use client'; - -import React, { useState, useContext } from 'react'; - -import { InputText } from 'primereact/inputtext'; -import { InputTextarea } from 'primereact/inputtextarea'; -import { Button } from 'primereact/button'; -import { classNames } from 'primereact/utils'; -import { LayoutContext } from '../../../../layout/context/layoutcontext'; - -function Contact() { - const [name, setName] = useState(''); - const [email, setEmail] = useState(''); - const [message, setMessage] = useState(''); - const [content] = useState([ - { icon: 'pi pi-fw pi-phone', title: 'Phone', info: '1 (833) 597-7538' }, - { - icon: 'pi pi-fw pi-map-marker', - title: 'Our Head Office', - info: 'Churchill-laan 16 II, 1052 CD, Amsterdam' - }, - { icon: 'pi pi-fw pi-print', title: 'Fax', info: '3 (833) 297-1548' } - ]); - - const { layoutConfig } = useContext(LayoutContext); - return ( -
-
-

Contact Us

-
-
-
-
- {content.map((item, i) => { - return ( -
- - {item.title} - {item.info} -
- ); - })} -
-
- -
-

Send Us Email

-
-
- - - - setName(e.target.value)} placeholder="Name" className="w-full px-7 text-900 font-semibold" style={{ height: '3.5rem' }} /> - -
- -
- - - - setEmail(e.target.value)} placeholder="Email" className="w-full px-7 text-900 font-semibold" style={{ height: '3.5rem' }} /> - -
- -
- - setMessage(event.target.value)} /> - -
-
-
-
- ); -} - -export default Contact; diff --git a/app/(main)/pages/empty/page.tsx b/app/(main)/pages/empty/page.tsx deleted file mode 100644 index c77d8af..0000000 --- a/app/(main)/pages/empty/page.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; - -const EmptyPage = () => { - return ( -
-
-
-

Empty Page

-

Use this page to start from scratch and place your custom content.

-
-
-
- ); -}; - -export default EmptyPage; diff --git a/app/(main)/pages/faq/page.tsx b/app/(main)/pages/faq/page.tsx deleted file mode 100644 index 0f75db7..0000000 --- a/app/(main)/pages/faq/page.tsx +++ /dev/null @@ -1,73 +0,0 @@ -'use client'; - -import React, { useState } from 'react'; -import { Accordion, AccordionTab } from 'primereact/accordion'; - -function Faq() { - const [activeIndex, setActiveIndex] = useState(0); - const items = [ - { - label: 'General', - icon: 'pi pi-fw pi-info-circle', - questions: ['Is there a trial period?', 'Do I need to sign up with credit card?', 'Is the subscription monthly or annual?', 'How many tiers are there?'] - }, - { - label: 'Mailing', - icon: 'pi pi-fw pi-envelope', - questions: ['How do I setup my account?', 'Is there a limit on mails to send?', 'What is my inbox size?', 'How can I add attachements?'] - }, - { - label: 'Support', - icon: 'pi pi-fw pi-question-circle', - questions: ['How can I get support?', 'What is the response time?', 'Is there a community forum?', 'Is live chat available?'] - }, - { - label: 'Billing', - icon: 'pi pi-fw pi-credit-card', - questions: ['Will I receive an invoice?', 'How to provide my billing information?', 'Is VAT included?', 'Can I receive PDF invoices?'] - } - ]; - const changeItem = (i) => { - setActiveIndex(i); - }; - - return ( -
-
-
Frequently Asked Questions
-

Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit.

-
- -
-
-
Categories
- -
-
- - {items[activeIndex].questions.map((question, i) => ( - -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea - commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit - anim id est laborum. -

-
- ))} -
-
-
-
- ); -} - -export default Faq; diff --git a/app/(main)/pages/help/page.tsx b/app/(main)/pages/help/page.tsx deleted file mode 100644 index 697623d..0000000 --- a/app/(main)/pages/help/page.tsx +++ /dev/null @@ -1,164 +0,0 @@ -'use client'; - -import React from 'react'; -import { InputText } from 'primereact/inputtext'; - -function Help() { - return ( -
-
-
- - - -
How can we help?
- - - - -
- -
-
-
- - - -
Getting Started
- -
-
-
-
- - - -
Transactions
- -
-
-
-
- - - -
Profile
- -
-
-
-
- - - -
Billing
- -
-
-
-
- - - -
Integrations
- -
-
-
-
- - - -
Security
- -
-
-
-
-
- ); -} - -export default Help; diff --git a/app/(main)/pages/invoice/page.tsx b/app/(main)/pages/invoice/page.tsx deleted file mode 100644 index 92e589e..0000000 --- a/app/(main)/pages/invoice/page.tsx +++ /dev/null @@ -1,99 +0,0 @@ -import React from 'react'; - -function Invoice() { - return ( -
-
-
- - - -
YOUR COMPANY
- 9137 3rd Lane California City - CA 93504, U.S.A. -
-
-
INVOICE
-
-
- DATE - 30/08/2019 -
-
- INVOICE # - 8523 -
-
- CUSTOMER ID - C1613 -
-
-
-
- -
-
BILL TO
- Claire Williams, 148 Hope Lane - Palo Alto, CA 94304. -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DescriptionQuantityUnit PriceLine Total
Green T-Shirt1$49.00$49.00
Game Controller2$99.00$198.00
Mini Speakers1$85.00$85.00
-
- -
-
NOTES
-
-
- SUBTOTAL - $332.00 -
-
- VAT # - 0 -
-
- TOTAL - $332.00 -
-
-
-
- ); -} - -export default Invoice; diff --git a/app/(main)/pages/timeline/page.tsx b/app/(main)/pages/timeline/page.tsx deleted file mode 100644 index fc8efc8..0000000 --- a/app/(main)/pages/timeline/page.tsx +++ /dev/null @@ -1,115 +0,0 @@ -'use client'; -import { Button } from 'primereact/button'; -import { Card } from 'primereact/card'; -import { Timeline } from 'primereact/timeline'; -import React from 'react'; -import type { CustomEvent } from '@/types'; - -const TimelineDemo = () => { - const customEvents: CustomEvent[] = [ - { - status: 'Ordered', - date: '15/09/2022 10:30', - icon: 'pi pi-shopping-cart', - color: '#9C27B0', - image: 'game-controller.jpg' - }, - { - status: 'Processing', - date: '15/09/2022 14:00', - icon: 'pi pi-cog', - color: '#673AB7' - }, - { - status: 'Shipped', - date: '15/09/2022 16:15', - icon: 'pi pi-envelope', - color: '#FF9800' - }, - { - status: 'Delivered', - date: '16/09/2022 10:00', - icon: 'pi pi-check', - color: '#607D8B' - } - ]; - - const horizontalEvents = ['2023', '2024', '2025', '2026']; - - const customizedContent = (item: CustomEvent) => { - return ( - - {item.image && ( - ((e.target as HTMLImageElement).src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt={item.name} width={200} className="shadow-2" /> - )} -

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore sed consequuntur error repudiandae numquam deserunt quisquam repellat libero asperiores earum nam nobis, culpa ratione quam perferendis esse, cupiditate neque - quas! -

- -
- ); - }; - - const customizedMarker = (item: CustomEvent) => { - return ( - - - - ); - }; - - return ( -
-
-
-
-
Left Align
- item.status} /> -
-
-
-
-
Right Align
- item.status} /> -
-
-
-
-
Alternate Align
- item.status} /> -
-
- -
-
-
Opposite Content
- item.status} content={(item) => {item.date}} /> -
-
- -
-
-
Customized
- -
-
-
-
-
Horizontal
-
Top Align
- item} /> - -
Bottom Align
- item} /> - -
Alternate Align
- item} opposite={ } /> -
-
-
-
- ); -}; - -export default TimelineDemo; diff --git a/app/(main)/uikit/button/index.module.scss b/app/(main)/uikit/button/index.module.scss deleted file mode 100644 index 2ee1482..0000000 --- a/app/(main)/uikit/button/index.module.scss +++ /dev/null @@ -1,151 +0,0 @@ -.p-button{ - padding: 0%; -&.google { - background: linear-gradient(to left, var(--purple-600) 50%, var(--purple-700) 50%); - background-size: 200% 100%; - background-position: right bottom; - transition: background-position 0.5s ease-out; - border-color: var(--purple-700); - display: flex; - align-items: stretch; - padding: 0; - - - &:enabled:hover { - background: linear-gradient(to left, var(--purple-600) 50%, var(--purple-700) 50%); - background-size: 200% 100%; - background-position: left bottom; - border-color: var(--purple-700); - } - - &:focus { - box-shadow: 0 0 0 1px var(--purple-400); - } -} - -&.twitter { - background: linear-gradient(to left, var(--blue-400) 50%, var(--blue-500) 50%); - background-size: 200% 100%; - background-position: right bottom; - transition: background-position 0.5s ease-out; - border-color: var(--blue-500); - padding: 0; - display: flex; - align-items: stretch; - - &:enabled:hover { - background: linear-gradient(to left, var(--blue-400) 50%, var(--blue-500) 50%); - background-size: 200% 100%; - background-position: left bottom; - border-color: var(--blue-500); - } - - &:focus { - box-shadow: 0 0 0 1px var(--blue-200); - } -} - -&.discord { - background: linear-gradient(to left, var(--bluegray-700) 50%, var(--bluegray-800) 50%); - background-size: 200% 100%; - background-position: right bottom; - transition: background-position 0.5s ease-out; - border-color: var(--bluegray-800); - padding: 0; - display: flex; - align-items: stretch; - - &:enabled:hover { - background: linear-gradient(to left, var(--bluegray-700) 50%, var(--bluegray-800) 50%); - background-size: 200% 100%; - background-position: left bottom; - border-color: var(--bluegray-800); - } - - &:focus { - box-shadow: 0 0 0 1px var(--purple-500); - } -} - -.template-button .p-button.twitter { - background: linear-gradient(to left, var(--blue-400) 50%, var(--blue-500) 50%); - background-size: 200% 100%; - background-position: right bottom; - transition: background-position 0.5s ease-out; - color: #fff; - border-color: var(--blue-500); -} -.template-button .p-button.twitter:hover { - background-position: left bottom; -} -.template-button .p-button.twitter i { - background-color: var(--blue-500); -} -.template-button .p-button.twitter:focus { - box-shadow: 0 0 0 1px var(--blue-200); -} -.template-button .p-button.slack { - background: linear-gradient(to left, var(--orange-400) 50%, var(--orange-500) 50%); - background-size: 200% 100%; - background-position: right bottom; - transition: background-position 0.5s ease-out; - color: #fff; - border-color: var(--orange-500); -} -.template-button .p-button.slack:hover { - background-position: left bottom; -} -.template-button .p-button.slack i { - background-color: var(--orange-500); -} -.template-button .p-button.slack:focus { - box-shadow: 0 0 0 1px var(--orange-200); -} -.template-button .p-button.amazon { - background: linear-gradient(to left, var(--yellow-400) 50%, var(--yellow-500) 50%); - background-size: 200% 100%; - background-position: right bottom; - transition: background-position 0.5s ease-out; - color: #000; - border-color: var(--yellow-500); -} -.template-button .p-button.amazon:hover { - background-position: left bottom; -} -.template-button .p-button.amazon i { - background-color: var(--yellow-500); -} -.template-button .p-button.amazon:focus { - box-shadow: 0 0 0 1px var(--yellow-200); -} -.template-button .p-button.discord { - background: linear-gradient(to left, var(--bluegray-700) 50%, var(--bluegray-800) 50%); - background-size: 200% 100%; - background-position: right bottom; - transition: background-position 0.5s ease-out; - color: #fff; - border-color: var(--bluegray-800); -} -.template-button .p-button.discord:hover { - background-position: left bottom; -} -.template-button .p-button.discord i { - background-color: var(--bluegray-800); -} -.template-button .p-button.discord:focus { - box-shadow: 0 0 0 1px var(--bluegray-500); -} -@media screen and (max-width: 960px) { - -button .p-button { - margin-bottom: 0.5rem; - } - -button .p-button:not(.p-button-icon-only) { - display: flex; - flex-wrap: wrap; - - } - -button .p-buttonset .p-button { - margin-bottom: 0; - } -} -} \ No newline at end of file diff --git a/app/(main)/uikit/button/page.tsx b/app/(main)/uikit/button/page.tsx deleted file mode 100644 index c501261..0000000 --- a/app/(main)/uikit/button/page.tsx +++ /dev/null @@ -1,248 +0,0 @@ -'use client'; -import React, { useState } from 'react'; -import { SplitButton } from 'primereact/splitbutton'; -import { Button } from 'primereact/button'; -import styles from './index.module.scss'; -import { classNames } from 'primereact/utils'; - -const ButtonDemo = () => { - const [loading1, setLoading1] = useState(false); - const [loading2, setLoading2] = useState(false); - const [loading3, setLoading3] = useState(false); - const [loading4, setLoading4] = useState(false); - - const onLoadingClick1 = () => { - setLoading1(true); - - setTimeout(() => { - setLoading1(false); - }, 2000); - }; - - const onLoadingClick2 = () => { - setLoading2(true); - - setTimeout(() => { - setLoading2(false); - }, 2000); - }; - - const onLoadingClick3 = () => { - setLoading3(true); - - setTimeout(() => { - setLoading3(false); - }, 2000); - }; - - const onLoadingClick4 = () => { - setLoading4(true); - - setTimeout(() => { - setLoading4(false); - }, 2000); - }; - - const items = [ - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-times' - }, - { - label: 'Home', - icon: 'pi pi-home' - } - ]; - - return ( -
-
-
-
Default
-
- - - -
-
- -
-
Severities
-
-
-
- -
-
Text
-
-
-
- -
-
Outlined
-
-
-
- -
-
Button Group
- -
- -
-
SplitButton
-
- - - - - -
-
- -
-
Template
-
- - - -
-
-
- -
-
-
Icons
-
- - - -
-
- -
-
Raised
-
-
-
- -
-
Rounded
-
-
-
- -
-
Rounded Icons
-
-
-
- -
-
Rounded Text
-
-
-
- -
-
Rounded Outlined
-
-
-
- -
-
Loading
-
-
-
-
-
- ); -}; - -export default ButtonDemo; diff --git a/app/(main)/uikit/charts/page.tsx b/app/(main)/uikit/charts/page.tsx deleted file mode 100644 index 763a013..0000000 --- a/app/(main)/uikit/charts/page.tsx +++ /dev/null @@ -1,283 +0,0 @@ -'use client'; -import { ChartData, ChartOptions } from 'chart.js'; -import { Chart } from 'primereact/chart'; -import React, { useContext, useEffect, useState } from 'react'; -import { LayoutContext } from '../../../../layout/context/layoutcontext'; -import type { ChartDataState, ChartOptionsState } from '@/types'; - -const ChartDemo = () => { - const [options, setOptions] = useState({}); - const [data, setChartData] = useState({}); - const { layoutConfig } = useContext(LayoutContext); - - useEffect(() => { - const documentStyle = getComputedStyle(document.documentElement); - const textColor = documentStyle.getPropertyValue('--text-color') || '#495057'; - const textColorSecondary = documentStyle.getPropertyValue('--text-color-secondary') || '#6c757d'; - const surfaceBorder = documentStyle.getPropertyValue('--surface-border') || '#dee2e6'; - const barData: ChartData = { - labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], - datasets: [ - { - label: 'My First dataset', - backgroundColor: documentStyle.getPropertyValue('--primary-500') || '#2196f3', - borderColor: documentStyle.getPropertyValue('--primary-500') || '#2196f3', - data: [65, 59, 80, 81, 56, 55, 40] - }, - { - label: 'My Second dataset', - backgroundColor: documentStyle.getPropertyValue('--primary-200') || '#a0d2fa', - borderColor: documentStyle.getPropertyValue('--primary-200') || '#a0d2fa', - data: [28, 48, 40, 19, 86, 27, 90] - } - ] - }; - - const barOptions: ChartOptions = { - plugins: { - legend: { - labels: { - color: textColor - } - } - }, - scales: { - x: { - ticks: { - color: textColorSecondary, - font: { - weight: '500' - } - }, - grid: { - display: false - }, - border: { - display: false - } - }, - y: { - ticks: { - color: textColorSecondary - }, - grid: { - color: surfaceBorder - }, - border: { - display: false - } - } - } - }; - - const pieData: ChartData = { - labels: ['A', 'B', 'C'], - datasets: [ - { - data: [540, 325, 702], - backgroundColor: [documentStyle.getPropertyValue('--indigo-500') || '#3f51b5', documentStyle.getPropertyValue('--purple-500') || '#9c27b0', documentStyle.getPropertyValue('--teal-500') || '#009688'], - hoverBackgroundColor: [documentStyle.getPropertyValue('--indigo-400') || '#6372c3', documentStyle.getPropertyValue('--purple-400') || '#af50bf', documentStyle.getPropertyValue('--teal-400') || '#30aa9f'] - } - ] - }; - - const pieOptions: ChartOptions = { - plugins: { - legend: { - labels: { - usePointStyle: true, - color: textColor - } - } - } - }; - - const lineData: ChartData = { - labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], - datasets: [ - { - label: 'First Dataset', - data: [65, 59, 80, 81, 56, 55, 40], - fill: false, - backgroundColor: documentStyle.getPropertyValue('--primary-500') || '#2196f3', - borderColor: documentStyle.getPropertyValue('--primary-500') || '#2196f3', - tension: 0.4 - }, - { - label: 'Second Dataset', - data: [28, 48, 40, 19, 86, 27, 90], - fill: false, - backgroundColor: documentStyle.getPropertyValue('--primary-200') || '#a0d2fa', - borderColor: documentStyle.getPropertyValue('--primary-200') || '#a0d2fa', - tension: 0.4 - } - ] - }; - - const lineOptions: ChartOptions = { - plugins: { - legend: { - labels: { - color: textColor - } - } - }, - scales: { - x: { - ticks: { - color: textColorSecondary - }, - grid: { - color: surfaceBorder - }, - border: { - display: false - } - }, - y: { - ticks: { - color: textColorSecondary - }, - grid: { - color: surfaceBorder - }, - border: { - display: false - } - } - } - }; - - const polarData: ChartData = { - datasets: [ - { - data: [11, 16, 7, 3], - backgroundColor: [ - documentStyle.getPropertyValue('--indigo-500') || '#3f51b5', - documentStyle.getPropertyValue('--purple-500') || '#9c27b0', - documentStyle.getPropertyValue('--teal-500') || '#009688', - documentStyle.getPropertyValue('--orange-500') || '#f57c00' - ], - label: 'My dataset' - } - ], - labels: ['Indigo', 'Purple', 'Teal', 'Orange'] - }; - - const polarOptions: ChartOptions = { - plugins: { - legend: { - labels: { - color: textColor - } - } - }, - scales: { - r: { - grid: { - color: surfaceBorder - } - } - } - }; - - const radarData: ChartData = { - labels: ['Eating', 'Drinking', 'Sleeping', 'Designing', 'Coding', 'Cycling', 'Running'], - datasets: [ - { - label: 'My First dataset', - borderColor: documentStyle.getPropertyValue('--indigo-400') || '#6372c3', - pointBackgroundColor: documentStyle.getPropertyValue('--indigo-400') || '#6372c3', - pointBorderColor: documentStyle.getPropertyValue('--indigo-400') || '#6372c3', - pointHoverBackgroundColor: textColor, - pointHoverBorderColor: documentStyle.getPropertyValue('--indigo-400') || '#6372c3', - data: [65, 59, 90, 81, 56, 55, 40] - }, - { - label: 'My Second dataset', - borderColor: documentStyle.getPropertyValue('--purple-400') || '#af50bf', - pointBackgroundColor: documentStyle.getPropertyValue('--purple-400') || '#af50bf', - pointBorderColor: documentStyle.getPropertyValue('--purple-400') || '#af50bf', - pointHoverBackgroundColor: textColor, - pointHoverBorderColor: documentStyle.getPropertyValue('--purple-400') || '#af50bf', - data: [28, 48, 40, 19, 96, 27, 100] - } - ] - }; - - const radarOptions: ChartOptions = { - plugins: { - legend: { - labels: { - color: textColor - } - } - }, - scales: { - r: { - grid: { - color: textColorSecondary - } - } - } - }; - - setOptions({ - barOptions, - pieOptions, - lineOptions, - polarOptions, - radarOptions - }); - setChartData({ - barData, - pieData, - lineData, - polarData, - radarData - }); - }, [layoutConfig]); - - return ( -
-
-
-
Linear Chart
- -
-
-
-
-
Bar Chart
- -
-
-
-
-
Pie Chart
- -
-
-
-
-
Doughnut Chart
- -
-
-
-
-
Polar Area Chart
- -
-
-
-
-
Radar Chart
- -
-
-
- ); -}; - -export default ChartDemo; diff --git a/app/(main)/uikit/file/page.tsx b/app/(main)/uikit/file/page.tsx deleted file mode 100644 index 9dd41f9..0000000 --- a/app/(main)/uikit/file/page.tsx +++ /dev/null @@ -1,35 +0,0 @@ -'use client'; - -import React, { useRef } from 'react'; -import { FileUpload } from 'primereact/fileupload'; -import { Toast } from 'primereact/toast'; - -const FileDemo = () => { - const toast = useRef(null); - - const onUpload = () => { - toast.current?.show({ - severity: 'info', - summary: 'Success', - detail: 'File Uploaded', - life: 3000 - }); - }; - - return ( -
- -
-
-
Advanced
- - -
Basic
- -
-
-
- ); -}; - -export default FileDemo; diff --git a/app/(main)/uikit/floatlabel/page.tsx b/app/(main)/uikit/floatlabel/page.tsx deleted file mode 100644 index 52e6038..0000000 --- a/app/(main)/uikit/floatlabel/page.tsx +++ /dev/null @@ -1,148 +0,0 @@ -'use client'; -import type { Demo } from '@/types'; -import { AutoComplete, AutoCompleteCompleteEvent } from 'primereact/autocomplete'; -import { Calendar } from 'primereact/calendar'; -import { Chips } from 'primereact/chips'; -import { Dropdown } from 'primereact/dropdown'; -import { InputMask } from 'primereact/inputmask'; -import { InputNumber } from 'primereact/inputnumber'; -import { InputText } from 'primereact/inputtext'; -import { InputTextarea } from 'primereact/inputtextarea'; -import { MultiSelect } from 'primereact/multiselect'; -import { useEffect, useState } from 'react'; -import { CountryService } from '../../../../demo/service/CountryService'; - -const FloatLabelDemo = () => { - const [countries, setCountries] = useState([]); - const [filteredCountries, setFilteredCountries] = useState([]); - const [value1, setValue1] = useState(''); - const [value2, setValue2] = useState(null); - const [value3, setValue3] = useState(''); - const [value4, setValue4] = useState(''); - const [value5, setValue5] = useState(null); - const [value6, setValue6] = useState([]); - const [value7, setValue7] = useState(''); - const [value8, setValue8] = useState(null); - const [value9, setValue9] = useState(''); - const [value10, setValue10] = useState(null); - const [value11, setValue11] = useState(null); - const [value12, setValue12] = useState(''); - - const cities = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - useEffect(() => { - CountryService.getCountries().then((countries) => { - setCountries(countries); - }); - }, []); - - const searchCountry = (event: AutoCompleteCompleteEvent) => { - const filtered = []; - const query = event.query; - for (let i = 0; i < countries.length; i++) { - const country = countries[i]; - if (country.name.toLowerCase().indexOf(query.toLowerCase()) === 0) { - filtered.push(country); - } - } - setFilteredCountries(filtered); - }; - - return ( -
-
Float Label
-

- All input text components support floating labels by adding (.p-float-label) to wrapper class. -

-
-
- - setValue1(e.target.value)} /> - - -
-
- - setValue2(e.value)} suggestions={filteredCountries} completeMethod={searchCountry} field="name"> - - -
-
- - - setValue3(e.target.value)} /> - - -
-
- - - setValue4(e.target.value)} /> - - -
-
- - setValue5(e.value ?? '')}> - - -
-
- - setValue6(e.value ?? [])}> - - -
-
- - setValue7(e.value ?? '')}> - - -
-
- - setValue8(e.target.value ?? null)}> - - -
-
-
- - - - - setValue9(e.target.value)} /> - - -
-
-
- - setValue10(e.value)} optionLabel="name"> - - -
-
- - setValue11(e.value)} optionLabel="name"> - - -
-
- - setValue12(e.target.value)}> - - -
-
-
- ); -}; - -export default FloatLabelDemo; diff --git a/app/(main)/uikit/formlayout/page.tsx b/app/(main)/uikit/formlayout/page.tsx deleted file mode 100644 index 01e9805..0000000 --- a/app/(main)/uikit/formlayout/page.tsx +++ /dev/null @@ -1,148 +0,0 @@ -'use client'; - -import React, { useState, useEffect, useMemo } from 'react'; -import { InputText } from 'primereact/inputtext'; -import { Button } from 'primereact/button'; -import { InputTextarea } from 'primereact/inputtextarea'; -import { Dropdown } from 'primereact/dropdown'; - -interface DropdownItem { - name: string; - code: string; -} - -const FormLayoutDemo = () => { - const [dropdownItem, setDropdownItem] = useState(null); - const dropdownItems: DropdownItem[] = useMemo( - () => [ - { name: 'Option 1', code: 'Option 1' }, - { name: 'Option 2', code: 'Option 2' }, - { name: 'Option 3', code: 'Option 3' } - ], - [] - ); - - useEffect(() => { - setDropdownItem(dropdownItems[0]); - }, [dropdownItems]); - - return ( -
-
-
-
Vertical
-
- - -
-
- - -
-
- - -
-
- -
-
Vertical Grid
-
-
- - -
-
- - -
-
-
-
- -
-
-
Horizontal
-
- -
- -
-
-
- -
- -
-
-
- -
-
Inline
-
-
- - -
-
- - -
- -
-
- -
-
Help Text
-
- - - Enter your username to reset your password. -
-
-
- -
-
-
Advanced
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - setDropdownItem(e.value)} options={dropdownItems} optionLabel="name" placeholder="Select One"> -
-
- - -
-
-
-
-
- ); -}; - -export default FormLayoutDemo; diff --git a/app/(main)/uikit/input/page.tsx b/app/(main)/uikit/input/page.tsx deleted file mode 100644 index 363ebaf..0000000 --- a/app/(main)/uikit/input/page.tsx +++ /dev/null @@ -1,352 +0,0 @@ -'use client'; -import type { Demo, Page } from '@/types'; -import { AutoComplete, AutoCompleteCompleteEvent } from 'primereact/autocomplete'; -import { Button } from 'primereact/button'; -import { Calendar } from 'primereact/calendar'; -import { Checkbox, CheckboxChangeEvent } from 'primereact/checkbox'; -import { Chips } from 'primereact/chips'; -import { ColorPicker, ColorPickerHSBType, ColorPickerRGBType } from 'primereact/colorpicker'; -import { Dropdown } from 'primereact/dropdown'; -import { InputNumber } from 'primereact/inputnumber'; -import { InputSwitch } from 'primereact/inputswitch'; -import { InputText } from 'primereact/inputtext'; -import { InputTextarea } from 'primereact/inputtextarea'; -import { Knob } from 'primereact/knob'; -import { ListBox } from 'primereact/listbox'; -import { MultiSelect } from 'primereact/multiselect'; -import { RadioButton } from 'primereact/radiobutton'; -import { Rating } from 'primereact/rating'; -import { SelectButton } from 'primereact/selectbutton'; -import { Slider } from 'primereact/slider'; -import { ToggleButton } from 'primereact/togglebutton'; -import { useEffect, useState } from 'react'; -import { CountryService } from '../../../../demo/service/CountryService'; - -interface InputValue { - name: string; - code: string; -} - -const InputDemo: Page = () => { - const [floatValue, setFloatValue] = useState(''); - const [autoValue, setAutoValue] = useState([]); - const [selectedAutoValue, setSelectedAutoValue] = useState(null); - const [autoFilteredValue, setAutoFilteredValue] = useState([]); - const [calendarValue, setCalendarValue] = useState(null); - const [inputNumberValue, setInputNumberValue] = useState(null); - const [chipsValue, setChipsValue] = useState([]); - const [sliderValue, setSliderValue] = useState(''); - const [ratingValue, setRatingValue] = useState(null); - const [colorValue, setColorValue] = useState('1976D2'); - const [knobValue, setKnobValue] = useState(20); - const [radioValue, setRadioValue] = useState(null); - const [checkboxValue, setCheckboxValue] = useState([]); - const [switchValue, setSwitchValue] = useState(false); - const [listboxValue, setListboxValue] = useState(null); - const [dropdownValue, setDropdownValue] = useState(null); - const [multiselectValue, setMultiselectValue] = useState(null); - const [toggleValue, setToggleValue] = useState(false); - const [selectButtonValue1, setSelectButtonValue1] = useState(null); - const [selectButtonValue2, setSelectButtonValue2] = useState(null); - const [inputGroupValue, setInputGroupValue] = useState(false); - - const listboxValues: InputValue[] = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - const dropdownValues: InputValue[] = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - const multiselectValues: InputValue[] = [ - { name: 'Australia', code: 'AU' }, - { name: 'Brazil', code: 'BR' }, - { name: 'China', code: 'CN' }, - { name: 'Egypt', code: 'EG' }, - { name: 'France', code: 'FR' }, - { name: 'Germany', code: 'DE' }, - { name: 'India', code: 'IN' }, - { name: 'Japan', code: 'JP' }, - { name: 'Spain', code: 'ES' }, - { name: 'United States', code: 'US' } - ]; - - const selectButtonValues1: InputValue[] = [ - { name: 'Option 1', code: 'O1' }, - { name: 'Option 2', code: 'O2' }, - { name: 'Option 3', code: 'O3' } - ]; - - const selectButtonValues2: InputValue[] = [ - { name: 'Option 1', code: 'O1' }, - { name: 'Option 2', code: 'O2' }, - { name: 'Option 3', code: 'O3' } - ]; - - useEffect(() => { - CountryService.getCountries().then((data) => setAutoValue(data)); - }, []); - - const searchCountry = (event: AutoCompleteCompleteEvent) => { - setTimeout(() => { - if (!event.query.trim().length) { - setAutoFilteredValue([...autoValue]); - } else { - setAutoFilteredValue( - autoValue.filter((country) => { - return country.name.toLowerCase().startsWith(event.query.toLowerCase()); - }) - ); - } - }, 250); - }; - - const onCheckboxChange = (e: CheckboxChangeEvent) => { - let selectedValue = [...checkboxValue]; - if (e.checked) selectedValue.push(e.value); - else selectedValue.splice(selectedValue.indexOf(e.value), 1); - - setCheckboxValue(selectedValue); - }; - - const itemTemplate = (option: InputValue) => { - return ( -
- {option.name} (e.currentTarget.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} - className={`flag flag-${option.code.toLowerCase()}`} - style={{ width: '21px' }} - /> - {option.name} -
- ); - }; - - return ( -
-
-
-
InputText
-
-
- -
-
- -
-
- -
-
- -
Icons
-
-
- - - - -
-
- - - - -
-
- - - - - -
-
- -
Float Label
- - setFloatValue(e.target.value)} /> - - - -
Textarea
- - -
AutoComplete
- setSelectedAutoValue(e.value)} suggestions={autoFilteredValue} completeMethod={searchCountry} field="name" /> - -
Calendar
- setCalendarValue(e.value ?? null)} /> - -
InputNumber
- setInputNumberValue(e.value ?? null)} showButtons mode="decimal"> - -
Chips
- setChipsValue(e.value ?? [])} /> -
- -
-
-
-
Slider
- setSliderValue(parseInt(e.target.value, 10))} /> - setSliderValue(e.value as number)} /> -
-
-
Rating
- setRatingValue(e.value ?? 0)} /> -
-
-
ColorPicker
- setColorValue(e.value ?? '')} style={{ width: '2rem' }} /> -
-
-
Knob
- setKnobValue(e.value)} step={10} min={-50} max={50} /> -
-
-
-
- -
-
-
RadioButton
-
-
-
- setRadioValue(e.value)} /> - -
-
-
-
- setRadioValue(e.value)} /> - -
-
-
-
- setRadioValue(e.value)} /> - -
-
-
- -
Checkbox
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- -
Input Switch
- setSwitchValue(e.value ?? false)} /> -
- -
-
Listbox
- setListboxValue(e.value)} options={listboxValues} optionLabel="name" filter /> - -
Dropdown
- setDropdownValue(e.value)} options={dropdownValues} optionLabel="name" placeholder="Select" /> - -
MultiSelect
- setMultiselectValue(e.value)} - options={multiselectValues} - itemTemplate={itemTemplate} - optionLabel="name" - placeholder="Select Countries" - filter - className="multiselect-custom" - display="chip" - /> -
- -
-
ToggleButton
- setToggleValue(e.value)} onLabel="Yes" offLabel="No" /> - -
SelectButton
- setSelectButtonValue1(e.value)} options={selectButtonValues1} optionLabel="name" /> - -
SelectButton - Multiple
- setSelectButtonValue2(e.value)} options={selectButtonValues2} optionLabel="name" multiple /> -
-
- -
-
-
Input Groups
-
-
-
- - - - -
-
- -
-
- - - - - - - - $ - .00 -
-
- -
-
-
-
- -
-
- - setInputGroupValue(e.checked ?? false)} /> - - -
-
-
-
-
-
- ); -}; - -export default InputDemo; diff --git a/app/(main)/uikit/invalidstate/page.tsx b/app/(main)/uikit/invalidstate/page.tsx deleted file mode 100644 index a2f0567..0000000 --- a/app/(main)/uikit/invalidstate/page.tsx +++ /dev/null @@ -1,117 +0,0 @@ -'use client'; - -import type { Demo } from '@/types'; -import { AutoComplete, AutoCompleteCompleteEvent } from 'primereact/autocomplete'; -import { Calendar } from 'primereact/calendar'; -import { Chips } from 'primereact/chips'; -import { Dropdown } from 'primereact/dropdown'; -import { InputMask } from 'primereact/inputmask'; -import { InputNumber } from 'primereact/inputnumber'; -import { InputText } from 'primereact/inputtext'; -import { InputTextarea } from 'primereact/inputtextarea'; -import { MultiSelect } from 'primereact/multiselect'; -import { Password } from 'primereact/password'; -import { useEffect, useState } from 'react'; -import { CountryService } from '../../../../demo/service/CountryService'; - -const InvalidStateDemo = () => { - const [countries, setCountries] = useState([]); - const [filteredCountries, setFilteredCountries] = useState([]); - const [value1, setValue1] = useState(''); - const [value2, setValue2] = useState(null); - const [value3, setValue3] = useState(null); - const [value4, setValue4] = useState([]); - const [value5, setValue5] = useState(''); - const [value6, setValue6] = useState(''); - const [value7, setValue7] = useState(0); - const [value8, setValue8] = useState(null); - const [value9, setValue9] = useState(null); - const [value10, setValue10] = useState(''); - - const cities = [ - { name: 'New York', code: 'NY' }, - { name: 'Rome', code: 'RM' }, - { name: 'London', code: 'LDN' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Paris', code: 'PRS' } - ]; - - useEffect(() => { - CountryService.getCountries().then((countries) => { - setCountries(countries); - }); - }, []); - - const searchCountry = (event: AutoCompleteCompleteEvent) => { - // in a real application, make a request to a remote url with the query and - // return filtered results, for demo we filter at client side - const filtered = []; - const query = event.query; - for (let i = 0; i < countries.length; i++) { - const country = countries[i]; - if (country.name.toLowerCase().indexOf(query.toLowerCase()) === 0) { - filtered.push(country); - } - } - setFilteredCountries(filtered); - }; - - const onCalendarChange = (e: any) => { - setValue3(e.value!); - }; - - return ( -
-
Invalid State
-
-
-
- - setValue1(e.target.value)} className="p-invalid" /> -
-
- - setValue2(e.value)} suggestions={filteredCountries} completeMethod={searchCountry} field="name" className="p-invalid" /> -
-
- - -
-
- - setValue4(e.value ?? [])} className="p-invalid" /> -
-
- - setValue5(e.target.value)} className="p-invalid" /> -
-
- -
-
- - setValue6(e.value ?? '')} className="p-invalid" /> -
-
- - setValue7(e.target.value ?? 0)} className="p-invalid" /> -
-
- - setValue8(e.value)} optionLabel="name" className="p-invalid" /> -
-
- - setValue9(e.value)} optionLabel="name" className="p-invalid" /> -
-
- - setValue10(e.target.value)} className="p-invalid" /> -
-
-
-
- ); -}; - -export default InvalidStateDemo; diff --git a/app/(main)/uikit/list/page.tsx b/app/(main)/uikit/list/page.tsx deleted file mode 100644 index 31e24b5..0000000 --- a/app/(main)/uikit/list/page.tsx +++ /dev/null @@ -1,192 +0,0 @@ -'use client'; - -import React, { useState, useEffect } from 'react'; -import { DataView, DataViewLayoutOptions } from 'primereact/dataview'; -import { Button } from 'primereact/button'; -import { Dropdown, DropdownChangeEvent } from 'primereact/dropdown'; -import { Rating } from 'primereact/rating'; -import { PickList } from 'primereact/picklist'; -import { OrderList } from 'primereact/orderlist'; -import { ProductService } from '../../../../demo/service/ProductService'; -import { InputText } from 'primereact/inputtext'; -import type { Demo } from '@/types'; - -const ListDemo = () => { - const listValue = [ - { name: 'San Francisco', code: 'SF' }, - { name: 'London', code: 'LDN' }, - { name: 'Paris', code: 'PRS' }, - { name: 'Istanbul', code: 'IST' }, - { name: 'Berlin', code: 'BRL' }, - { name: 'Barcelona', code: 'BRC' }, - { name: 'Rome', code: 'RM' } - ]; - - const [picklistSourceValue, setPicklistSourceValue] = useState(listValue); - const [picklistTargetValue, setPicklistTargetValue] = useState([]); - const [orderlistValue, setOrderlistValue] = useState(listValue); - const [dataViewValue, setDataViewValue] = useState([]); - const [globalFilterValue, setGlobalFilterValue] = useState(''); - const [filteredValue, setFilteredValue] = useState(null); - const [layout, setLayout] = useState<'grid' | 'list' | (string & Record)>('grid'); - const [sortKey, setSortKey] = useState(null); - const [sortOrder, setSortOrder] = useState<0 | 1 | -1 | null>(null); - const [sortField, setSortField] = useState(''); - - const sortOptions = [ - { label: 'Price High to Low', value: '!price' }, - { label: 'Price Low to High', value: 'price' } - ]; - - useEffect(() => { - ProductService.getProducts().then((data) => setDataViewValue(data)); - setGlobalFilterValue(''); - }, []); - - useEffect(() => { - ProductService.getProducts().then((data) => setDataViewValue(data)); - setGlobalFilterValue(''); - }, []); - - const onFilter = (e: React.ChangeEvent) => { - const value = e.target.value; - setGlobalFilterValue(value); - if (value.length === 0) { - setFilteredValue(null); - } else { - const filtered = dataViewValue?.filter((product) => { - const productNameLowercase = product.name.toLowerCase(); - const searchValueLowercase = value.toLowerCase(); - return productNameLowercase.includes(searchValueLowercase); - }); - - setFilteredValue(filtered); - } - }; - - const onSortChange = (event: DropdownChangeEvent) => { - const value = event.value; - - if (value.indexOf('!') === 0) { - setSortOrder(-1); - setSortField(value.substring(1, value.length)); - setSortKey(value); - } else { - setSortOrder(1); - setSortField(value); - setSortKey(value); - } - }; - - const dataViewHeader = ( -
- - - - - - setLayout(e.value)} /> -
- ); - - const dataviewListItem = (data: Demo.Product) => { - return ( -
-
- {data.name} -
-
{data.name}
-
{data.description}
- -
- - {data.category} -
-
-
- ${data.price} - - {data.inventoryStatus} -
-
-
- ); - }; - - const dataviewGridItem = (data: Demo.Product) => { - return ( -
-
-
-
- - {data.category} -
- {data.inventoryStatus} -
-
- {data.name} -
{data.name}
-
{data.description}
- -
-
- ${data.price} -
-
-
- ); - }; - - const itemTemplate = (data: Demo.Product, layout: 'grid' | 'list' | (string & Record)) => { - if (!data) { - return; - } - - if (layout === 'list') { - return dataviewListItem(data); - } else if (layout === 'grid') { - return dataviewGridItem(data); - } - }; - - return ( -
-
-
-
DataView
- -
-
- -
-
-
PickList
-
{item.name}
} - onChange={(e) => { - setPicklistSourceValue(e.source); - setPicklistTargetValue(e.target); - }} - sourceStyle={{ height: '200px' }} - targetStyle={{ height: '200px' }} - >
-
-
- -
-
-
OrderList
-
{item.name}
} onChange={(e) => setOrderlistValue(e.value)}>
-
-
-
- ); -}; - -export default ListDemo; diff --git a/app/(main)/uikit/media/page.tsx b/app/(main)/uikit/media/page.tsx deleted file mode 100644 index 2305073..0000000 --- a/app/(main)/uikit/media/page.tsx +++ /dev/null @@ -1,109 +0,0 @@ -'use client'; - -import { Button } from 'primereact/button'; -import { Carousel } from 'primereact/carousel'; -import { Galleria } from 'primereact/galleria'; -import { Image } from 'primereact/image'; -import React, { useEffect, useState } from 'react'; -import { PhotoService } from '../../../../demo/service/PhotoService'; -import { ProductService } from '../../../../demo/service/ProductService'; -import type { Demo } from '@/types'; - -const MediaDemo = () => { - const [products, setProducts] = useState([]); - const [images, setImages] = useState([]); - - const galleriaResponsiveOptions = [ - { - breakpoint: '1024px', - numVisible: 5 - }, - { - breakpoint: '960px', - numVisible: 4 - }, - { - breakpoint: '768px', - numVisible: 3 - }, - { - breakpoint: '560px', - numVisible: 1 - } - ]; - const carouselResponsiveOptions = [ - { - breakpoint: '1024px', - numVisible: 3, - numScroll: 3 - }, - { - breakpoint: '768px', - numVisible: 2, - numScroll: 2 - }, - { - breakpoint: '560px', - numVisible: 1, - numScroll: 1 - } - ]; - - useEffect(() => { - ProductService.getProductsSmall().then((products) => setProducts(products)); - - PhotoService.getImages().then((images) => setImages(images)); - }, []); - - const carouselItemTemplate = (product: Demo.Product) => { - return ( -
-
- {product.name} -
-
-

{product.name}

-
${product.price}
- {product.inventoryStatus} -
- - - -
-
-
- ); - }; - - const galleriaItemTemplate = (item: Demo.Photo) => {item.alt}; - const galleriaThumbnailTemplate = (item: Demo.Photo) => {item.alt}; - - return ( -
-
-
-
Carousel
- -
-
- -
-
-
Image
-
- Image -
-
-
- -
-
-
Galleria
- -
-
-
- ); -}; - -export default MediaDemo; diff --git a/app/(main)/uikit/menu/confirmation/page.tsx b/app/(main)/uikit/menu/confirmation/page.tsx deleted file mode 100644 index 8b5b8d2..0000000 --- a/app/(main)/uikit/menu/confirmation/page.tsx +++ /dev/null @@ -1,16 +0,0 @@ -'use client'; - -import React from 'react'; -import Menu from '../page'; -function ConfirmationDemo() { - return ( - -
- -

Confirmation Component Content via Child Route

-
-
- ); -} - -export default ConfirmationDemo; diff --git a/app/(main)/uikit/menu/page.tsx b/app/(main)/uikit/menu/page.tsx deleted file mode 100644 index c49836b..0000000 --- a/app/(main)/uikit/menu/page.tsx +++ /dev/null @@ -1,584 +0,0 @@ -'use client'; -import React, { useCallback, useEffect, useRef, useState } from 'react'; -import { Menubar } from 'primereact/menubar'; -import { InputText } from 'primereact/inputtext'; -import { BreadCrumb } from 'primereact/breadcrumb'; -import { Steps } from 'primereact/steps'; -import { TabMenu } from 'primereact/tabmenu'; -import { TieredMenu } from 'primereact/tieredmenu'; -import { Menu } from 'primereact/menu'; -import { Button } from 'primereact/button'; -import { ContextMenu } from 'primereact/contextmenu'; -import { MegaMenu } from 'primereact/megamenu'; -import { PanelMenu } from 'primereact/panelmenu'; -import { useRouter } from 'next/navigation'; -import { usePathname } from 'next/navigation'; - -const MenuDemo = ({ children }: any) => { - const [activeIndex, setActiveIndex] = useState(0); - const menu = useRef(null); - const contextMenu = useRef(null); - const router = useRouter(); - const pathname = usePathname(); - - const checkActiveIndex = useCallback(() => { - const paths = pathname.split('/'); - const currentPath = paths[paths.length - 1]; - - switch (currentPath) { - case 'seat': - setActiveIndex(1); - break; - case 'payment': - setActiveIndex(2); - break; - case 'confirmation': - setActiveIndex(3); - break; - default: - break; - } - }, [pathname]); - - useEffect(() => { - checkActiveIndex(); - }, [checkActiveIndex]); - - const nestedMenuitems = [ - { - label: 'Customers', - icon: 'pi pi-fw pi-table', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus', - items: [ - { - label: 'Customer', - icon: 'pi pi-fw pi-plus' - }, - { - label: 'Duplicate', - icon: 'pi pi-fw pi-copy' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-user-edit' - } - ] - }, - { - label: 'Orders', - icon: 'pi pi-fw pi-shopping-cart', - items: [ - { - label: 'View', - icon: 'pi pi-fw pi-list' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-search' - } - ] - }, - { - label: 'Shipments', - icon: 'pi pi-fw pi-envelope', - items: [ - { - label: 'Tracker', - icon: 'pi pi-fw pi-compass' - }, - { - label: 'Map', - icon: 'pi pi-fw pi-map-marker' - }, - { - label: 'Manage', - icon: 'pi pi-fw pi-pencil' - } - ] - }, - { - label: 'Profile', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'Settings', - icon: 'pi pi-fw pi-cog' - }, - { - label: 'Billing', - icon: 'pi pi-fw pi-file' - } - ] - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-sign-out' - } - ]; - - const breadcrumbHome = { icon: 'pi pi-home', to: '/' }; - const breadcrumbItems = [{ label: 'Computer' }, { label: 'Notebook' }, { label: 'Accessories' }, { label: 'Backpacks' }, { label: 'Item' }]; - - const wizardItems = [ - { label: 'Personal', command: () => router.push('/uikit/menu') }, - { label: 'Seat', command: () => router.push('/uikit/menu/seat') }, - { label: 'Payment', command: () => router.push('/uikit/menu/payment') }, - { - label: 'Confirmation', - command: () => router.push('/uikit/menu/confirmation') - } - ]; - - const tieredMenuItems = [ - { - label: 'Customers', - icon: 'pi pi-fw pi-table', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus', - items: [ - { - label: 'Customer', - icon: 'pi pi-fw pi-plus' - }, - { - label: 'Duplicate', - icon: 'pi pi-fw pi-copy' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-user-edit' - } - ] - }, - { - label: 'Orders', - icon: 'pi pi-fw pi-shopping-cart', - items: [ - { - label: 'View', - icon: 'pi pi-fw pi-list' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-search' - } - ] - }, - { - label: 'Shipments', - icon: 'pi pi-fw pi-envelope', - items: [ - { - label: 'Tracker', - icon: 'pi pi-fw pi-compass' - }, - { - label: 'Map', - icon: 'pi pi-fw pi-map-marker' - }, - { - label: 'Manage', - icon: 'pi pi-fw pi-pencil' - } - ] - }, - { - label: 'Profile', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'Settings', - icon: 'pi pi-fw pi-cog' - }, - { - label: 'Billing', - icon: 'pi pi-fw pi-file' - } - ] - }, - { - separator: true - }, - { - label: 'Quit', - icon: 'pi pi-fw pi-sign-out' - } - ]; - - const overlayMenuItems = [ - { - label: 'Save', - icon: 'pi pi-save' - }, - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-trash' - }, - { - separator: true - }, - { - label: 'Home', - icon: 'pi pi-home' - } - ]; - - const menuitems = [ - { - label: 'Customers', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-plus' - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-user-edit' - } - ] - }, - { - label: 'Orders', - items: [ - { - label: 'View', - icon: 'pi pi-fw pi-list' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-search' - } - ] - } - ]; - - const contextMenuItems = [ - { - label: 'Save', - icon: 'pi pi-save' - }, - { - label: 'Update', - icon: 'pi pi-refresh' - }, - { - label: 'Delete', - icon: 'pi pi-trash' - }, - { - separator: true - }, - { - label: 'Options', - icon: 'pi pi-cog' - } - ]; - - const megamenuItems = [ - { - label: 'Fashion', - icon: 'pi pi-fw pi-tag', - items: [ - [ - { - label: 'Woman', - items: [{ label: 'Woman Item' }, { label: 'Woman Item' }, { label: 'Woman Item' }] - }, - { - label: 'Men', - items: [{ label: 'Men Item' }, { label: 'Men Item' }, { label: 'Men Item' }] - } - ], - [ - { - label: 'Kids', - items: [{ label: 'Kids Item' }, { label: 'Kids Item' }] - }, - { - label: 'Luggage', - items: [{ label: 'Luggage Item' }, { label: 'Luggage Item' }, { label: 'Luggage Item' }] - } - ] - ] - }, - { - label: 'Electronics', - icon: 'pi pi-fw pi-desktop', - items: [ - [ - { - label: 'Computer', - items: [{ label: 'Computer Item' }, { label: 'Computer Item' }] - }, - { - label: 'Camcorder', - items: [{ label: 'Camcorder Item' }, { label: 'Camcorder Item' }, { label: 'Camcorder Item' }] - } - ], - [ - { - label: 'TV', - items: [{ label: 'TV Item' }, { label: 'TV Item' }] - }, - { - label: 'Audio', - items: [{ label: 'Audio Item' }, { label: 'Audio Item' }, { label: 'Audio Item' }] - } - ], - [ - { - label: 'Sports.7', - items: [{ label: 'Sports.7.1' }, { label: 'Sports.7.2' }] - } - ] - ] - }, - { - label: 'Furniture', - icon: 'pi pi-fw pi-image', - items: [ - [ - { - label: 'Living Room', - items: [{ label: 'Living Room Item' }, { label: 'Living Room Item' }] - }, - { - label: 'Kitchen', - items: [{ label: 'Kitchen Item' }, { label: 'Kitchen Item' }, { label: 'Kitchen Item' }] - } - ], - [ - { - label: 'Bedroom', - items: [{ label: 'Bedroom Item' }, { label: 'Bedroom Item' }] - }, - { - label: 'Outdoor', - items: [{ label: 'Outdoor Item' }, { label: 'Outdoor Item' }, { label: 'Outdoor Item' }] - } - ] - ] - }, - { - label: 'Sports', - icon: 'pi pi-fw pi-star', - items: [ - [ - { - label: 'Basketball', - items: [{ label: 'Basketball Item' }, { label: 'Basketball Item' }] - }, - { - label: 'Football', - items: [{ label: 'Football Item' }, { label: 'Football Item' }, { label: 'Football Item' }] - } - ], - [ - { - label: 'Tennis', - items: [{ label: 'Tennis Item' }, { label: 'Tennis Item' }] - } - ] - ] - } - ]; - - const panelMenuitems = [ - { - label: 'Customers', - icon: 'pi pi-fw pi-table', - items: [ - { - label: 'New', - icon: 'pi pi-fw pi-user-plus', - items: [ - { - label: 'Customer', - icon: 'pi pi-fw pi-plus' - }, - { - label: 'Duplicate', - icon: 'pi pi-fw pi-copy' - } - ] - }, - { - label: 'Edit', - icon: 'pi pi-fw pi-user-edit' - } - ] - }, - { - label: 'Orders', - icon: 'pi pi-fw pi-shopping-cart', - items: [ - { - label: 'View', - icon: 'pi pi-fw pi-list' - }, - { - label: 'Search', - icon: 'pi pi-fw pi-search' - } - ] - }, - { - label: 'Shipments', - icon: 'pi pi-fw pi-envelope', - items: [ - { - label: 'Tracker', - icon: 'pi pi-fw pi-compass' - }, - { - label: 'Map', - icon: 'pi pi-fw pi-map-marker' - }, - { - label: 'Manage', - icon: 'pi pi-fw pi-pencil' - } - ] - }, - { - label: 'Profile', - icon: 'pi pi-fw pi-user', - items: [ - { - label: 'Settings', - icon: 'pi pi-fw pi-cog' - }, - { - label: 'Billing', - icon: 'pi pi-fw pi-file' - } - ] - } - ]; - - const toggleMenu = (event: React.MouseEvent) => { - menu.current?.toggle(event); - }; - - const onContextRightClick = (event: React.MouseEvent) => { - contextMenu.current?.show(event); - }; - - const menubarEndTemplate = () => { - return ( - - - - - ); - }; - - return ( -
-
-
-
Menubar
- -
-
- -
-
-
Breadcrumb
- -
-
- -
-
-
Steps
- setActiveIndex(e.index)} readOnly={false} /> - {pathname === '/uikit/menu' ? ( -
- -

Personal Component Content via Child Route

-
- ) : ( - <>{children} - )} -
-
- -
-
-
TabMenu
- setActiveIndex(e.index)} /> - {pathname === '/uikit/menu' ? ( -
- -

Personal Component Content via Child Route

-
- ) : ( - <>{children} - )} -
-
- -
-
-
Tiered Menu
- -
-
- -
-
-
Plain Menu
- -
-
- -
-
-
Overlay Menu
- - -
- -
-
ContextMenu
- Right click to display. - -
-
- -
-
-
MegaMenu - Horizontal
- - -
MegaMenu - Vertical
- -
-
- -
-
-
PanelMenu
- -
-
-
- ); -}; - -export default MenuDemo; diff --git a/app/(main)/uikit/menu/payment/page.tsx b/app/(main)/uikit/menu/payment/page.tsx deleted file mode 100644 index 4f19d0b..0000000 --- a/app/(main)/uikit/menu/payment/page.tsx +++ /dev/null @@ -1,15 +0,0 @@ -'use client'; -import React from 'react'; -import Menu from '../page'; -function PaymentDemo() { - return ( - -
- -

Payment Component Content via Child Route

-
-
- ); -} - -export default PaymentDemo; diff --git a/app/(main)/uikit/menu/seat/page.tsx b/app/(main)/uikit/menu/seat/page.tsx deleted file mode 100644 index a4dd25c..0000000 --- a/app/(main)/uikit/menu/seat/page.tsx +++ /dev/null @@ -1,16 +0,0 @@ -'use client'; - -import React from 'react'; -import Menu from '../page'; -function SeatDemo() { - return ( - -
- -

Seat Component Content via Child Route

-
-
- ); -} - -export default SeatDemo; diff --git a/app/(main)/uikit/message/page.tsx b/app/(main)/uikit/message/page.tsx deleted file mode 100644 index 772cb85..0000000 --- a/app/(main)/uikit/message/page.tsx +++ /dev/null @@ -1,131 +0,0 @@ -'use client'; -import React, { useRef, useState } from 'react'; -import { Toast } from 'primereact/toast'; -import { Messages } from 'primereact/messages'; -import { Message } from 'primereact/message'; -import { InputText } from 'primereact/inputtext'; -import { Button } from 'primereact/button'; - -const MessagesDemo = () => { - const [username, setUsername] = useState(''); - const [email, setEmail] = useState(''); - const toast = useRef(null); - const message = useRef(null); - - const addSuccessMessage = () => { - message.current?.show({ severity: 'success', content: 'Message Detail' }); - }; - - const addInfoMessage = () => { - message.current?.show({ severity: 'info', content: 'Message Detail' }); - }; - - const addWarnMessage = () => { - message.current?.show({ severity: 'warn', content: 'Message Detail' }); - }; - - const addErrorMessage = () => { - message.current?.show({ severity: 'error', content: 'Message Detail' }); - }; - - const showSuccess = () => { - toast.current?.show({ - severity: 'success', - summary: 'Success Message', - detail: 'Message Detail', - life: 3000 - }); - }; - - const showInfo = () => { - toast.current?.show({ - severity: 'info', - summary: 'Info Message', - detail: 'Message Detail', - life: 3000 - }); - }; - - const showWarn = () => { - toast.current?.show({ - severity: 'warn', - summary: 'Warn Message', - detail: 'Message Detail', - life: 3000 - }); - }; - - const showError = () => { - toast.current?.show({ - severity: 'error', - summary: 'Error Message', - detail: 'Message Detail', - life: 3000 - }); - }; - - return ( -
-
-
-
Toast
-
- -
-
-
- -
-
-
Messages
-
-
- -
-
- -
-
-
Inline
-
- - setUsername(e.target.value)} required className="p-invalid" /> - -
-
- - setEmail(e.target.value)} required className="p-invalid" /> - -
-
-
- -
-
-
Help Text
-
- - - - Enter your username to reset your password. - -
-
-
-
- ); -}; - -export default MessagesDemo; diff --git a/app/(main)/uikit/misc/page.tsx b/app/(main)/uikit/misc/page.tsx deleted file mode 100644 index 92c72d8..0000000 --- a/app/(main)/uikit/misc/page.tsx +++ /dev/null @@ -1,220 +0,0 @@ -'use client'; - -import React, { useState, useEffect, useRef } from 'react'; -import { ProgressBar } from 'primereact/progressbar'; -import { Button } from 'primereact/button'; -import { Badge } from 'primereact/badge'; -import { Tag } from 'primereact/tag'; -import { Avatar } from 'primereact/avatar'; -import { AvatarGroup } from 'primereact/avatargroup'; -import { Chip } from 'primereact/chip'; -import { Skeleton } from 'primereact/skeleton'; -import { ScrollPanel } from 'primereact/scrollpanel'; -import { ScrollTop } from 'primereact/scrolltop'; - -const MiscDemo = () => { - const [value, setValue] = useState(0); - const intervalRef = useRef(null); - - useEffect(() => { - const interval = setInterval(() => { - setValue((prevValue) => { - const newVal = prevValue + Math.floor(Math.random() * 10) + 1; - return newVal >= 100 ? 100 : newVal; - }); - }, 2000); - - intervalRef.current = interval; - - return () => { - clearInterval(intervalRef.current as NodeJS.Timeout); - intervalRef.current = null; - }; - }, []); - - return ( -
-
-
-
ProgressBar
-
-
- -
-
- -
-
-
-
-
-
-

Badge

-
Numbers
-
- - - - - -
- -
Positioned Badge
-
- - - - - - - - - -
- -
Button Badge
-
- - -
-
Sizes
-
- - - -
-
- -
-

Avatar

-
Avatar Group
- - - - - - - - - -
Label - Circle
-
- - - -
- -
Icon - Badge
- - - -
- -
-

ScrollTop

- -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vitae et leo duis ut diam. Ultricies mi quis hendrerit dolor magna eget est lorem. Amet - consectetur adipiscing elit ut. Nam libero justo laoreet sit amet. Pharetra massa massa ultricies mi quis hendrerit dolor magna. Est ultricies integer quis auctor elit sed vulputate. Consequat ac felis donec et. Tellus - orci ac auctor augue mauris. Semper feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Tincidunt arcu non sodales neque sodales. Metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices. Sodales ut - etiam sit amet nisl purus. Cursus sit amet dictum sit amet. Tristique senectus et netus et malesuada fames ac turpis egestas. Et tortor consequat id porta nibh venenatis cras sed. Diam maecenas ultricies mi eget mauris. - Eget egestas purus viverra accumsan in nisl nisi. Suscipit adipiscing bibendum est ultricies integer. Mattis aliquam faucibus purus in massa tempor nec. -

- -
-
-
-
-
-

Tag

-
Tags
-
- - - - - -
- -
Pills
-
- - - - - -
- -
Icons
-
- - - - - -
-
- -
-

Chip

-
Basic
-
- - - - -
- -
Icon
-
- - - - -
- -
Image
-
- - - - -
- -
Styling
-
- - - - -
-
- -
-

Skeleton

-
-
- -
- - - -
-
- -
- - -
-
-
-
-
- ); -}; - -export default MiscDemo; diff --git a/app/(main)/uikit/overlay/page.tsx b/app/(main)/uikit/overlay/page.tsx deleted file mode 100644 index 22af4da..0000000 --- a/app/(main)/uikit/overlay/page.tsx +++ /dev/null @@ -1,222 +0,0 @@ -'use client'; - -import { Button } from 'primereact/button'; -import { Column } from 'primereact/column'; -import { confirmPopup, ConfirmPopup } from 'primereact/confirmpopup'; -import { DataTable, DataTableSelectEvent } from 'primereact/datatable'; -import { Dialog } from 'primereact/dialog'; -import { InputText } from 'primereact/inputtext'; -import { OverlayPanel } from 'primereact/overlaypanel'; -import { Sidebar } from 'primereact/sidebar'; -import { Toast } from 'primereact/toast'; -import React, { useEffect, useRef, useState } from 'react'; -import { ProductService } from '../../../../demo/service/ProductService'; -import type { Demo } from '@/types'; - -type ButtonEvent = React.MouseEvent; -const OverlayDemo = () => { - const [displayBasic, setDisplayBasic] = useState(false); - const [displayConfirmation, setDisplayConfirmation] = useState(false); - const [visibleLeft, setVisibleLeft] = useState(false); - const [visibleRight, setVisibleRight] = useState(false); - const [visibleTop, setVisibleTop] = useState(false); - const [visibleBottom, setVisibleBottom] = useState(false); - const [visibleFullScreen, setVisibleFullScreen] = useState(false); - const [products, setProducts] = useState([]); - const [selectedProduct, setSelectedProduct] = useState(null); - const op = useRef(null); - const op2 = useRef(null); - const toast = useRef(null); - - const accept = () => { - toast.current?.show({ - severity: 'info', - summary: 'Confirmed', - detail: 'You have accepted', - life: 3000 - }); - }; - - const reject = () => { - toast.current?.show({ - severity: 'error', - summary: 'Rejected', - detail: 'You have rejected', - life: 3000 - }); - }; - - const confirm = (event: React.MouseEvent) => { - confirmPopup({ - target: event.currentTarget, - message: 'Are you sure you want to proceed?', - icon: 'pi pi-exclamation-triangle', - accept, - reject - }); - }; - - useEffect(() => { - ProductService.getProductsSmall().then((data) => setProducts(data)); - }, []); - - const toggle = (event: ButtonEvent) => { - op.current?.toggle(event); - }; - - const toggleDataTable = (event: ButtonEvent) => { - op2.current?.toggle(event); - }; - - const formatCurrency = (value: number) => { - return value.toLocaleString('en-US', { - style: 'currency', - currency: 'USD' - }); - }; - - const onProductSelect = (event: DataTableSelectEvent) => { - op2.current?.hide(); - toast.current?.show({ - severity: 'info', - summary: 'Product Selected', - detail: event.data.name, - life: 3000 - }); - }; - - const onSelectionChange = (e: any): void => { - setSelectedProduct(e.value as Demo.Product); - }; - - const basicDialogFooter = - - - - - ); -}; - -export default OverlayDemo; diff --git a/app/(main)/uikit/panel/page.tsx b/app/(main)/uikit/panel/page.tsx deleted file mode 100644 index a751530..0000000 --- a/app/(main)/uikit/panel/page.tsx +++ /dev/null @@ -1,233 +0,0 @@ -'use client'; - -import React, { useRef } from 'react'; -import { Toolbar } from 'primereact/toolbar'; -import { Button } from 'primereact/button'; -import { SplitButton } from 'primereact/splitbutton'; -import { Accordion, AccordionTab } from 'primereact/accordion'; -import { TabView, TabPanel } from 'primereact/tabview'; -import { Panel } from 'primereact/panel'; -import { Fieldset } from 'primereact/fieldset'; -import { Card } from 'primereact/card'; -import { Divider } from 'primereact/divider'; -import { InputText } from 'primereact/inputtext'; -import { Splitter, SplitterPanel } from 'primereact/splitter'; -import { Menu } from 'primereact/menu'; - -const PanelDemo = () => { - const menu1 = useRef(null); - const toolbarItems = [ - { - label: 'Save', - icon: 'pi pi-check' - }, - { - label: 'Update', - icon: 'pi pi-sync' - }, - { - label: 'Delete', - icon: 'pi pi-trash' - }, - { - label: 'Home Page', - icon: 'pi pi-home' - } - ]; - - const toolbarLeftTemplate = () => { - return ( - <> - - - -
- - OR - -
-
-

- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. - Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Consectetur, adipisci velit, sed quia non numquam eius modi. -

- - - Badge - - -

- At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt - in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo - minus. -

- - - - - -

- Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut - reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Donec vel volutpat ipsum. Integer nunc magna, posuere ut tincidunt eget, egestas vitae sapien. Morbi dapibus luctus odio. -

-
- - - - -
-
-
Splitter
- - -
Panel 1
-
- - - -
Panel 2
-
- -
Panel 3
-
-
-
-
-
-
- - ); -}; - -export default PanelDemo; diff --git a/app/(main)/uikit/table/page.tsx b/app/(main)/uikit/table/page.tsx deleted file mode 100644 index cb39906..0000000 --- a/app/(main)/uikit/table/page.tsx +++ /dev/null @@ -1,464 +0,0 @@ -'use client'; -import { CustomerService } from '../../../../demo/service/CustomerService'; -import { ProductService } from '../../../../demo/service/ProductService'; -import { FilterMatchMode, FilterOperator } from 'primereact/api'; -import { Button } from 'primereact/button'; -import { Calendar } from 'primereact/calendar'; -import { Column, ColumnFilterApplyTemplateOptions, ColumnFilterClearTemplateOptions, ColumnFilterElementTemplateOptions } from 'primereact/column'; -import { DataTable, DataTableExpandedRows, DataTableFilterMeta } from 'primereact/datatable'; -import { Dropdown } from 'primereact/dropdown'; -import { InputNumber } from 'primereact/inputnumber'; -import { InputText } from 'primereact/inputtext'; -import { MultiSelect } from 'primereact/multiselect'; -import { ProgressBar } from 'primereact/progressbar'; -import { Rating } from 'primereact/rating'; -import { Slider } from 'primereact/slider'; -import { ToggleButton } from 'primereact/togglebutton'; -import { TriStateCheckbox } from 'primereact/tristatecheckbox'; -import { classNames } from 'primereact/utils'; -import React, { useEffect, useState } from 'react'; -import type { Demo } from '@/types'; - -const TableDemo = () => { - const [customers1, setCustomers1] = useState([]); - const [customers2, setCustomers2] = useState([]); - const [customers3, setCustomers3] = useState([]); - const [filters1, setFilters1] = useState({}); - const [loading1, setLoading1] = useState(true); - const [loading2, setLoading2] = useState(true); - const [idFrozen, setIdFrozen] = useState(false); - const [products, setProducts] = useState([]); - const [globalFilterValue1, setGlobalFilterValue1] = useState(''); - const [expandedRows, setExpandedRows] = useState([]); - const [allExpanded, setAllExpanded] = useState(false); - - const representatives = [ - { name: 'Amy Elsner', image: 'amyelsner.png' }, - { name: 'Anna Fali', image: 'annafali.png' }, - { name: 'Asiya Javayant', image: 'asiyajavayant.png' }, - { name: 'Bernardo Dominic', image: 'bernardodominic.png' }, - { name: 'Elwin Sharvill', image: 'elwinsharvill.png' }, - { name: 'Ioni Bowcher', image: 'ionibowcher.png' }, - { name: 'Ivan Magalhaes', image: 'ivanmagalhaes.png' }, - { name: 'Onyama Limba', image: 'onyamalimba.png' }, - { name: 'Stephen Shaw', image: 'stephenshaw.png' }, - { name: 'XuXue Feng', image: 'xuxuefeng.png' } - ]; - - const statuses = ['unqualified', 'qualified', 'new', 'negotiation', 'renewal', 'proposal']; - - const clearFilter1 = () => { - initFilters1(); - }; - - const onGlobalFilterChange1 = (e: React.ChangeEvent) => { - const value = e.target.value; - let _filters1 = { ...filters1 }; - (_filters1['global'] as any).value = value; - - setFilters1(_filters1); - setGlobalFilterValue1(value); - }; - - const renderHeader1 = () => { - return ( -
-
- ); - }; - - useEffect(() => { - setLoading2(true); - - CustomerService.getCustomersLarge().then((data) => { - setCustomers1(getCustomers(data)); - setLoading1(false); - }); - CustomerService.getCustomersLarge().then((data) => { - setCustomers2(getCustomers(data)); - setLoading2(false); - }); - CustomerService.getCustomersMedium().then((data) => setCustomers3(data)); - ProductService.getProductsWithOrdersSmall().then((data) => setProducts(data)); - - initFilters1(); - }, []); - - const balanceTemplate = (rowData: Demo.Customer) => { - return ( -
- {formatCurrency(rowData.balance as number)} -
- ); - }; - - const getCustomers = (data: Demo.Customer[]) => { - return [...(data || [])].map((d) => { - d.date = new Date(d.date); - return d; - }); - }; - - const formatDate = (value: Date) => { - return value.toLocaleDateString('en-US', { - day: '2-digit', - month: '2-digit', - year: 'numeric' - }); - }; - - const formatCurrency = (value: number) => { - return value.toLocaleString('en-US', { - style: 'currency', - currency: 'USD' - }); - }; - - const initFilters1 = () => { - setFilters1({ - global: { value: null, matchMode: FilterMatchMode.CONTAINS }, - name: { - operator: FilterOperator.AND, - constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] - }, - 'country.name': { - operator: FilterOperator.AND, - constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] - }, - representative: { value: null, matchMode: FilterMatchMode.IN }, - date: { - operator: FilterOperator.AND, - constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] - }, - balance: { - operator: FilterOperator.AND, - constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] - }, - status: { - operator: FilterOperator.OR, - constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] - }, - activity: { value: null, matchMode: FilterMatchMode.BETWEEN }, - verified: { value: null, matchMode: FilterMatchMode.EQUALS } - }); - setGlobalFilterValue1(''); - }; - - const countryBodyTemplate = (rowData: Demo.Customer) => { - return ( - - flag - {rowData.country.name} - - ); - }; - - const filterClearTemplate = (options: ColumnFilterClearTemplateOptions) => { - return ; - }; - - const filterApplyTemplate = (options: ColumnFilterApplyTemplateOptions) => { - return ; - }; - - const representativeBodyTemplate = (rowData: Demo.Customer) => { - const representative = rowData.representative; - return ( - - {representative.name} ((e.target as HTMLImageElement).src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} - width={32} - style={{ verticalAlign: 'middle' }} - /> - {representative.name} - - ); - }; - - const representativeFilterTemplate = (options: ColumnFilterElementTemplateOptions) => { - return ( - <> -
Agent Picker
- options.filterCallback(e.value)} optionLabel="name" placeholder="Any" className="p-column-filter" /> - - ); - }; - - const representativesItemTemplate = (option: any) => { - return ( -
- {option.name} - {option.name} -
- ); - }; - - const dateBodyTemplate = (rowData: Demo.Customer) => { - return formatDate(rowData.date); - }; - - const dateFilterTemplate = (options: ColumnFilterElementTemplateOptions) => { - return options.filterCallback(e.value, options.index)} dateFormat="mm/dd/yy" placeholder="mm/dd/yyyy" mask="99/99/9999" />; - }; - - const balanceBodyTemplate = (rowData: Demo.Customer) => { - return formatCurrency(rowData.balance as number); - }; - - const balanceFilterTemplate = (options: ColumnFilterElementTemplateOptions) => { - return options.filterCallback(e.value, options.index)} mode="currency" currency="USD" locale="en-US" />; - }; - - const statusBodyTemplate = (rowData: Demo.Customer) => { - return {rowData.status}; - }; - - const statusFilterTemplate = (options: ColumnFilterElementTemplateOptions) => { - return options.filterCallback(e.value, options.index)} itemTemplate={statusItemTemplate} placeholder="Select a Status" className="p-column-filter" showClear />; - }; - - const statusItemTemplate = (option: any) => { - return {option}; - }; - - const activityBodyTemplate = (rowData: Demo.Customer) => { - return ; - }; - - const activityFilterTemplate = (options: ColumnFilterElementTemplateOptions) => { - return ( - - options.filterCallback(e.value)} range className="m-3"> -
- {options.value ? options.value[0] : 0} - {options.value ? options.value[1] : 100} -
-
- ); - }; - - const verifiedBodyTemplate = (rowData: Demo.Customer) => { - return ( - - ); - }; - - const verifiedFilterTemplate = (options: ColumnFilterElementTemplateOptions) => { - return options.filterCallback(e.value)} />; - }; - - const toggleAll = () => { - if (allExpanded) collapseAll(); - else expandAll(); - }; - - const expandAll = () => { - let _expandedRows = {} as { [key: string]: boolean }; - products.forEach((p) => (_expandedRows[`${p.id}`] = true)); - - setExpandedRows(_expandedRows); - setAllExpanded(true); - }; - - const collapseAll = () => { - setExpandedRows([]); - setAllExpanded(false); - }; - - const amountBodyTemplate = (rowData: Demo.Customer) => { - return formatCurrency(rowData.amount as number); - }; - - const statusOrderBodyTemplate = (rowData: Demo.Customer) => { - return {rowData.status}; - }; - - const searchBodyTemplate = () => { - return