This commit is contained in:
18796357645 2025-03-31 20:06:02 +08:00
parent c61822a24d
commit 11657ae4f5
2070 changed files with 273192 additions and 0 deletions

28
App/__init__.py Normal file
View File

@ -0,0 +1,28 @@
# 初始化文件
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from .views import blue
from .exts import init_exts
from config import BaseConfig
from .urls import *
def create_app():
app = Flask(__name__)
# 添加配置文件
app.config.from_object(BaseConfig)
# 注册蓝图
app.register_blueprint(blueprint=blue)
# 初始化插件
init_exts(app= app)
HOSTNAME = "localhost"
PORT = 3306
USERNAME = "root"
PASSWORD = "123456"
DATABASE = "bs_jaotong"
app.config[
'SQLALCHEMY_DATABASE_URI'] = f"mysql+pymysql://{USERNAME}:{PASSWORD}@{HOSTNAME}:{PORT}/{DATABASE}?charset=utf8mb4"
return app

415
App/apis.py Normal file
View File

@ -0,0 +1,415 @@
import random
import requests
from flask import jsonify, request
from flask_restful import Resource, marshal_with, fields, reqparse
from App.exts import db
from App.models import User, CityCode, jam
from App.爬虫 import delayed, mock
from sqlalchemy import text
from flask import jsonify
from flask_restful import Resource
user_fields = {
'id': fields.Integer,
'nick_name': fields.String,
'username': fields.String,
'password': fields.String,
}
login_fields = {
'status': fields.Integer,
'msg': fields.String,
'data': fields.Nested(user_fields),
}
void_fields = {
'status': fields.Integer,
'msg': fields.String,
}
class loginResource(Resource):
@marshal_with(void_fields)
def post(self):
# 获取请求中的用户名和密码
data = request.get_json()
username = data['username']
password = data['password']
# 根据条件查询用户,例如根据用户名查询
is_username = User.query.filter_by(username=username).first()
is_username_password = User.query.filter_by(username=username,password=password).first()
if is_username is None:
return {
'status': 400,
'msg': '账号不正确或不存在',
}
elif is_username_password is None:
return {
'status': 400,
'msg': '密码不正确',
}
elif is_username_password is not None:
return {
'status': 200,
'msg': '登录成功',
}
else:
return {
'status': 400,
'msg': '异常登录,联系管理员',
}
# 注册
class signResource(Resource):
@marshal_with(void_fields)
def post(self):
# 解析请求参数
parser = reqparse.RequestParser()
parser.add_argument('username', type=str, required=True, help='Username is required')
parser.add_argument('password', type=str, required=True, help='Password is required')
args = parser.parse_args()
# 检查用户名和邮箱是否已经存在
existing_user = User.query.filter_by(username=args['username']).first()
if existing_user:
return {'status': 400,'msg': '用户名已经存在'}
else:
# 创建新用户
new_user = User(username=args['username'],password=args['password'])
# 保存到数据库
db.session.add(new_user)
db.session.commit()
return {
'status': 200,
'msg': '注册成功',
}
# 城市列表/////////////////////////////////////////////////
class cityCode(Resource):
def post(self):
# 获取请求中的用户名和密码
data = request.get_json()
pagesize = data['pagesize']
page = data['page']
print(pagesize, page)
pagesize = pagesize
offset = pagesize * (page - 1)
code_list = []
codes = CityCode.query.offset(offset).limit(pagesize).all() # 分页查询语法
for s in codes:
dic = {}
dic['code'] = s.code
dic['name'] = s.name
dic['pinyin'] = s.pinyin
code_list.append(dic)
return code_list
class jamApi(Resource):
def post(self):
# 获取请求中的用户名和密码
data = request.get_json()
pagesize = data['pagesize']
page = data['page']
pagesize = pagesize
offset = pagesize * (page - 1)
code_list = []
codes = jam.query.offset(offset).limit(pagesize).all() # 分页查询语法
for s in codes:
dic = {}
dic['id'] = s.id
dic['freeFlowSpeed'] = s.freeFlowSpeed
dic['realSpeed'] = s.realSpeed
dic['idxRatio'] = s.idxRatio
dic['idxRatioState'] = s.idxRatioState
dic['idx'] = s.idx
dic['label'] = s.label
dic['name'] = s.name
dic['create_time'] = str(s.create_time)
code_list.append(dic)
return code_list
class acquisitionApi(Resource):
def get(self):
delayed()
return {'code':200}
class forecast(Resource):
def get(self):
mock()
import pymysql
import pandas as pd
from statsmodels.tsa.arima.model import ARIMA
# 连接MySQL数据库
conn = pymysql.connect(host='localhost', user='root', password='123456', db='bs_jaotong')
# 创建cursor对象
cur = conn.cursor()
# 执行SQL查询
cur.execute("SELECT create_time as name, round(avg(`idx`), 2) as value FROM prediction GROUP BY create_time")
# 获取查询结果
rows = cur.fetchall()
# 获取列名
columns = [desc[0] for desc in cur.description]
# 将数据转换为DataFrame
df = pd.DataFrame(rows, columns=columns)
# 确定最后日期并计算未来五天日期
last_date = pd.to_datetime(df['name'].iloc[-1])
future_dates = pd.date_range(start=last_date + pd.Timedelta(days=1), periods=5, freq='D')
future_dates_str = future_dates.strftime('%Y-%m-%d')
# 创建包含未来五天日期的新DataFrame
future_df = pd.DataFrame({'name': future_dates_str})
# 合并原始DataFrame和未来日期的DataFrame
merged_df = pd.concat([df, future_df])
# 拟合ARIMA模型
model = ARIMA(merged_df['value'], order=(1, 1, 1))
model_fit = model.fit()
# 预测未来五天数据
forecast = model_fit.forecast(steps=5)
# 提取预测结果中未来五天的数据
future_forecast = pd.DataFrame({'name': future_dates_str, 'value': forecast})
# 关闭cursor和连接
cur.close()
conn.close()
return jsonify( future_forecast.values.tolist())
# 用户列表/////////////////////////////////////////////////
class userPage(Resource):
def get(self):
result = db.session.execute("select * from sys_user ")
# 将查询结果转换为字典
data = [{column: value for column, value in row.items()} for row in result]
return jsonify(data)
class delUser(Resource):
def post(self):
try:
data = request.get_json()
user_id = data['id']
user = User.query.get(user_id)
print(user.username)
if user:
db.session.delete(user)
db.session.commit()
print("删除")
return {'code': 200,'msg': '删除成功', }
except:
return {'code': 400, 'msg': '删除失败,可能值不存在', }
class Top1(Resource):
def get(self):
try:
result = db.session.execute(text("SELECT * FROM jam LIMIT 1"))
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class CongestionCityOrder(Resource):
def get(self):
try:
result = db.session.execute(text(
"SELECT label, freeFlowSpeed, realSpeed FROM jam "
"ORDER BY freeFlowSpeed, realSpeed DESC LIMIT 10"
))
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class CongestionCityOrderList(Resource):
def get(self):
try:
result = db.session.execute(text("SELECT * FROM jam LIMIT 10"))
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class rankList(Resource):
def get(self):
try:
result = db.session.execute(text("SELECT * FROM rank LIMIT 10"))
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class rankListView(Resource):
def get(self):
try:
result = db.session.execute(text(
"SELECT * FROM rank ORDER BY idx DESC LIMIT 10"
))
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class rankListViewPie(Resource):
def get(self):
try:
result = db.session.execute(text(
"SELECT healState as name, count(*) as value "
"FROM rank GROUP BY healState ORDER BY name"
))
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class headthView(Resource):
def get(self):
try:
result = db.session.execute(text(
"SELECT indicator as name, round(avg, 2) as value "
"FROM countryindicators"
))
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class getTimeHeath(Resource):
def get(self):
# 使用 text() 包装 SQL 语句
sql = text("SELECT DISTINCT code FROM city_code")
results = db.session.execute(sql)
# 获取结果的方式取决于你的数据库驱动
# 方法1如果使用 SQLAlchemy Core
code_list = [row[0] for row in results] # 使用索引访问第一列
if not code_list:
return jsonify({"error": "No data found"}), 404
random_element = random.choice(code_list)
# 使用参数化查询防止 SQL 注入
query_sql = text("""
SELECT name, res, DATE_FORMAT(FROM_UNIXTIME(inert_time / 1000), '%Y-%d-%y') as time
FROM city_week
WHERE code = :code
""")
result = db.session.execute(query_sql, {'code': int(random_element)})
# 获取列名
columns = result.keys()
# 构建结果字典
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
class getRoadHeath(Resource):
def get(self):
try:
# 使用text()包装SQL并参数化查询
# 获取不重复的code列表
distinct_codes = db.session.execute(
text("SELECT DISTINCT code FROM city_code")
)
# 安全处理结果 - 方法1适用于大多数驱动
code_list = [row[0] for row in distinct_codes] # 使用索引访问第一列
# 或者方法2如果驱动支持:
# code_list = [row.code for row in distinct_codes]
if not code_list:
return jsonify({"error": "No city codes found"}), 404
# 随机选择一个code
random_code = random.choice(code_list)
# 使用参数化查询防止SQL注入
road_data = db.session.execute(
text("SELECT * FROM city_road WHERE code = :code"),
{"code": int(random_code)}
)
# 获取列名并构建结果字典
columns = road_data.keys()
data = [dict(zip(columns, row)) for row in road_data]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
#城市拥堵指数占比分析
class cityListViewPie(Resource):
def get(self):
try:
# 使用text()包装SQL查询
result = db.session.execute(
text("""
SELECT name, avg(speed) as value
FROM city_road
GROUP BY name
LIMIT 20
""")
)
# 获取列名并构建结果字典
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class dataCount(Resource):
def get(self):
try:
# 使用text()包装SQL查询
result = db.session.execute(
text("""
SELECT sum(a.Rows) as dataCount
FROM (
SELECT TABLE_NAME AS `Table`, TABLE_ROWS AS `Rows`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'bs_jaotong'
) a
""")
)
# 获取列名并构建结果字典
columns = result.keys()
data = [dict(zip(columns, row)) for row in result]
return jsonify(data)
except Exception as e:
return jsonify({"error": str(e)}), 500
class jiashiData(Resource):
def get(self):
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
'Cookie': 'cna=jGJrHgCNgXIBASQOA6Fypcve; xlly_s=1; isg=BOnpxCMwqPzI-ZRIjwWwhSkd-JVDtt3oq4XyOovfz1BuUgxk0wQ-uRKLEPbkSnUg; tfstk=ekjvvAV7O7VmQWheroUl7K5BUCeuxiBqysWIjCAm5_CRMse2iCxcWfdR6E22jOOO6_APcIOMSh3O9sI0hh7q3a5hdmj0uhm90h-_tWq3x-W2bhMKMo6C3Z9LocV3xkXblK-GFW24T1Odmy0b0xancisMhyR6zF010YzBlB6XGtXcVoTmuTdRBOjXHTKfhaisfgpvkgzGxMIM2XApIqw8eVuwlLu9DgxbAl9rvLd3Hl3Z7UyyeB28wVuwlJJJt8fr7V8ly; user_unique_id=a1ac68b88d722bb9018e0cfc03e45d88; SESSION=074d5eba-96c3-4288-b3dc-3175a766ccdf'
}
req = requests.get(url="https://report.amap.com/sanjiyisu/roads.do?type=0", headers=headers)
data = req.json()
return jsonify(data)

17
App/exts.py Normal file
View File

@ -0,0 +1,17 @@
# exts.py:插件管理扩展的第三方插件并
#1.导入第三方插件
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_restful import Api
# 2、初始化
db=SQLAlchemy()# ORM
migrate = Migrate()
api = Api()
#3.和app对象绑定
def init_exts(app):
db.init_app(app = app)
migrate.init_app(app=app,db=db)
api.init_app(app=app)

32
App/models.py Normal file
View File

@ -0,0 +1,32 @@
# 模型,数据库
from App.exts import db
class User(db.Model):
#表名
__tablename__ = 'sys_user'
# 定义字段
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(255),unique=True,index=True)
password = db.Column(db.String(255),unique=True,index=True)
create_time = db.Column(db.String,unique=True,index=True)
class CityCode(db.Model):
#表名
__tablename__ = 'city_code'
# 定义字段
code = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(255),unique=True,index=True)
pinyin = db.Column(db.String(255),unique=True,index=True)
class jam(db.Model):
#表名
__tablename__ = 'jam'
# 定义字段
id = db.Column(db.Integer, primary_key=True)
freeFlowSpeed = db.Column(db.String(255))
realSpeed = db.Column(db.String(255),unique=True,index=True)
idxRatio = db.Column(db.Integer,unique=True,index=True)
idxRatioState = db.Column(db.String(255),unique=True,index=True)
idx = db.Column(db.String(255),unique=True,index=True)
label = db.Column(db.String(255),unique=True,index=True)
name = db.Column(db.Integer,unique=True,index=True)
create_time = db.Column(db.String(255),unique=True,index=True)

File diff suppressed because it is too large Load Diff

6
App/static/assets/css/app-rtl.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

19536
App/static/assets/css/app.css Normal file

File diff suppressed because it is too large Load Diff

6
App/static/assets/css/app.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

6
App/static/assets/css/icons.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,116 @@
[
{
"id": "node_1",
"icon": "ri-folder-line icon-lg text-success",
"text": "Node - 1",
"children": [
{
"id": "node_4",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 1.1",
"children": false
},
{
"id": "node_5",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 1.2",
"children": false
},
{
"id": "node_6",
"icon": "ri-folder-line icon-lg text-success",
"text": "Node - 1.3",
"children": [
{
"id": "node_13",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 1.3.1",
"children": false
},
{
"id": "node_15",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 1.3.2",
"children": false
}
]
}
]
},
{
"id": "node_2",
"icon": "ri-folder-line icon-lg text-success",
"text": "Node - 2",
"children": [
{
"id": "node_7",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 2.1",
"children": false
},
{
"id": "node_8",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 2.2",
"children": false
},
{
"id": "node_9",
"icon": "ri-folder-line icon-lg text-success",
"text": "Node - 2.3",
"children": [
{
"id": "node_16",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 2.3.1",
"children": false
},
{
"id": "node_17",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 2.3.2",
"children": false
}
]
}
]
},
{
"id": "node_3",
"icon": "ri-folder-line icon-lg text-success",
"text": "Node - 3",
"children": [
{
"id": "node_10",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 3.1",
"children": false
},
{
"id": "node_11",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 3.2",
"children": false
},
{
"id": "node_12",
"icon": "ri-folder-line icon-lg text-success",
"text": "Node - 3.3",
"children": [
{
"id": "node_18",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 3.3.1",
"children": false
},
{
"id": "node_19",
"icon": "ri-article-line icon-lg text-warning",
"text": "Node - 3.3.2",
"children": false
}
]
}
]
}
]

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 2.0 MiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 51 KiB

View File

@ -0,0 +1 @@
<svg id="4306f7a5-0830-4d34-917a-62986225c636" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="737.61" height="734.73" viewBox="0 0 737.61 734.73"><defs><linearGradient id="530ae87c-3bb5-497b-99f4-8a54bdcef0e4" x1="600" y1="817.36" x2="600" y2="82.64" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="gray" stop-opacity="0.25"/><stop offset="0.54" stop-color="gray" stop-opacity="0.12"/><stop offset="1" stop-color="gray" stop-opacity="0.1"/></linearGradient><linearGradient id="98b0bd8b-d6e5-44e5-8134-4b720e26d691" x1="640.68" y1="541.38" x2="640.68" y2="111.38" gradientTransform="translate(-230.18 -83.96) rotate(0.13)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-opacity="0.12"/><stop offset="0.55" stop-opacity="0.09"/><stop offset="1" stop-opacity="0.02"/></linearGradient></defs><title>mail</title><path d="M968.8,384.4c.06-27.46-5.63-34.67-18-45.11L617.08,88.13A27.22,27.22,0,0,0,584.4,88L256.58,332.11c-12.44,10.38-24.09,22.48-24.15,49.94h-.36l-.84,376h0l0,16.74a41,41,0,0,0,40.92,41.1l16.16,0h0l310.85.69,327,.73a41,41,0,0,0,41.1-40.92l.87-392.05Z" transform="translate(-231.2 -82.64)" fill="url(#530ae87c-3bb5-497b-99f4-8a54bdcef0e4)"/><path d="M237.76,384.59h723a0,0,0,0,1,0,0v350A71.78,71.78,0,0,1,889,806.36H308.23a70.47,70.47,0,0,1-70.47-70.47V384.59a0,0,0,0,1,0,0Z" transform="translate(-229.87 -83.97) rotate(0.13)" fill="#3e60d5"/><path d="M238.23,383.78l-.81,365.62a56.16,56.16,0,0,0,56,56.28L904.18,807" transform="translate(-231.2 -82.64)" fill="#f5f5f5"/><path d="M961.27,385.39,960.46,751a56.16,56.16,0,0,1-56.28,56l-610.73-1.36" transform="translate(-231.2 -82.64)" fill="#fff"/><path d="M584.33,97.91l-322,237.32c-12.22,10.09-23.66,21.86-23.72,48.56L962,386.08c.06-26.7-5.53-33.71-17.7-43.86L616.43,98A27,27,0,0,0,584.33,97.91Z" transform="translate(-231.2 -82.64)" fill="#3e60d5"/><path d="M584.33,97.91l-322,237.32c-12.22,10.09-23.66,21.86-23.72,48.56L962,386.08c.06-26.7-5.53-33.71-17.7-43.86L616.43,98A27,27,0,0,0,584.33,97.91Z" transform="translate(-231.2 -82.64)" opacity="0.3"/><polygon points="651.79 97.86 564.3 29.19 352.78 297.12 239.11 208.99 167.94 299.45 333.36 425.81 333.36 425.81 374.37 458.76 651.79 97.86" fill="url(#98b0bd8b-d6e5-44e5-8134-4b720e26d691)"/><polygon points="645.39 96.18 566.06 35.35 355.92 309.4 239.21 219.91 178.38 299.24 334.74 418.96 334.74 418.96 374.84 449.01 645.39 96.18" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 47 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

665
App/static/assets/js/app.js Normal file
View File

@ -0,0 +1,665 @@
/**
* Theme: Powerx - Responsive Bootstrap 5 Admin Dashboard
* ¸üàÏÂÔØ£ºHttp://www.bootstrapmb.com
* Module/App: Main Js
*/
(function ($) {
'use strict';
// Bootstrap Components
function initComponents() {
// loader - Preloader
$(window).on('load', function () {
$('#status').fadeOut();
$('#preloader').delay(350).fadeOut('slow');
});
// Popovers
const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]')
const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl))
// Tooltips
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
// offcanvas
const offcanvasElementList = document.querySelectorAll('.offcanvas')
const offcanvasList = [...offcanvasElementList].map(offcanvasEl => new bootstrap.Offcanvas(offcanvasEl))
//Toasts
var toastPlacement = document.getElementById("toastPlacement");
if (toastPlacement) {
document.getElementById("selectToastPlacement").addEventListener("change", function () {
if (!toastPlacement.dataset.originalClass) {
toastPlacement.dataset.originalClass = toastPlacement.className;
}
toastPlacement.className = toastPlacement.dataset.originalClass + " " + this.value;
});
}
var toastElList = [].slice.call(document.querySelectorAll('.toast'))
var toastList = toastElList.map(function (toastEl) {
return new bootstrap.Toast(toastEl)
})
// Bootstrap Alert Live Example
const alertPlaceholder = document.getElementById('liveAlertPlaceholder')
const alert = (message, type) => {
const wrapper = document.createElement('div')
wrapper.innerHTML = [
`<div class="alert alert-${type} alert-dismissible" role="alert">`,
` <div>${message}</div>`,
' <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>',
'</div>'
].join('')
alertPlaceholder.append(wrapper)
}
const alertTrigger = document.getElementById('liveAlertBtn')
if (alertTrigger) {
alertTrigger.addEventListener('click', () => {
alert('Nice, you triggered this alert message!', 'success')
})
}
// RTL Layout
if (document.getElementById('app-style').href.includes('rtl.min.css')) {
document.getElementsByTagName('html')[0].dir = "rtl";
}
}
// Portlet Widget (Card Reload, Collapse, and Delete)
function initPortletCard() {
var portletIdentifier = ".card"
var portletCloser = '.card a[data-bs-toggle="remove"]'
var portletRefresher = '.card a[data-bs-toggle="reload"]'
let self = this
// Panel closest
$(document).on("click", portletCloser, function (ev) {
ev.preventDefault();
var $portlet = $(this).closest(portletIdentifier);
var $portlet_parent = $portlet.parent();
$portlet.remove();
if ($portlet_parent.children().length == 0) {
$portlet_parent.remove();
}
});
// Panel Reload
$(document).on("click", portletRefresher, function (ev) {
ev.preventDefault();
var $portlet = $(this).closest(portletIdentifier);
// This is just a simulation, nothing is going to be reloaded
$portlet.append('<div class="card-disabled"><div class="card-portlets-loader"></div></div>');
var $pd = $portlet.find('.card-disabled');
setTimeout(function () {
$pd.fadeOut('fast', function () {
$pd.remove();
});
}, 500 + 300 * (Math.random() * 5));
});
}
// Multi Dropdown
function initMultiDropdown() {
$('.dropdown-menu a.dropdown-toggle').on('click', function () {
var dropdown = $(this).next('.dropdown-menu');
var otherDropdown = $(this).parent().parent().find('.dropdown-menu').not(dropdown);
otherDropdown.removeClass('show')
otherDropdown.parent().find('.dropdown-toggle').removeClass('show')
return false;
});
}
// Left Sidebar Menu (Vertical Menu)
function initLeftSidebar() {
var self = this;
if ($(".side-nav").length) {
var navCollapse = $('.side-nav li .collapse');
var navToggle = $(".side-nav li [data-bs-toggle='collapse']");
navToggle.on('click', function (e) {
return false;
});
// open one menu at a time only
navCollapse.on({
'show.bs.collapse': function (event) {
var parent = $(event.target).parents('.collapse.show');
$('.side-nav .collapse.show').not(event.target).not(parent).collapse('hide');
}
});
// activate the menu in left side bar (Vertical Menu) based on url
$(".side-nav a").each(function () {
var pageUrl = window.location.href.split(/[?#]/)[0];
if (this.href == pageUrl) {
$(this).addClass("active");
$(this).parent().addClass("menuitem-active");
$(this).parent().parent().parent().addClass("show");
$(this).parent().parent().parent().parent().addClass("menuitem-active"); // add active to li of the current link
var firstLevelParent = $(this).parent().parent().parent().parent().parent().parent();
if (firstLevelParent.attr('id') !== 'sidebar-menu') firstLevelParent.addClass("show");
$(this).parent().parent().parent().parent().parent().parent().parent().addClass("menuitem-active");
var secondLevelParent = $(this).parent().parent().parent().parent().parent().parent().parent().parent().parent();
if (secondLevelParent.attr('id') !== 'wrapper') secondLevelParent.addClass("show");
var upperLevelParent = $(this).parent().parent().parent().parent().parent().parent().parent().parent().parent().parent();
if (!upperLevelParent.is('body')) upperLevelParent.addClass("menuitem-active");
}
});
setTimeout(function () {
var activatedItem = document.querySelector('li.menuitem-active .active');
if (activatedItem != null) {
var simplebarContent = document.querySelector('.leftside-menu .simplebar-content-wrapper');
var offset = activatedItem.offsetTop - 300;
if (simplebarContent && offset > 100) {
scrollTo(simplebarContent, offset, 600);
}
}
}, 200);
// scrollTo (Left Side Bar Active Menu)
function easeInOutQuad(t, b, c, d) {
t /= d / 2;
if (t < 1) return c / 2 * t * t + b;
t--;
return -c / 2 * (t * (t - 2) - 1) + b;
}
function scrollTo(element, to, duration) {
var start = element.scrollTop, change = to - start, currentTime = 0, increment = 20;
var animateScroll = function () {
currentTime += increment;
var val = easeInOutQuad(currentTime, start, change, duration);
element.scrollTop = val;
if (currentTime < duration) {
setTimeout(animateScroll, increment);
}
};
animateScroll();
}
}
}
// Topbar Search Form
function initSearch() {
// Serach Toggle
var navDropdowns = $('.navbar-custom .dropdown:not(.app-search)');
// hide on other click
$(document).on('click', function (e) {
if (e.target.id == "top-search" || e.target.closest('#search-dropdown')) {
$('#search-dropdown').addClass('d-block');
} else {
$('#search-dropdown').removeClass('d-block');
}
return true;
});
// Serach Toggle
$('#top-search').on('focus', function (e) {
e.preventDefault();
navDropdowns.children('.dropdown-menu.show').removeClass('show');
$('#search-dropdown').addClass('d-block');
return false;
});
// hide search on opening other dropdown
navDropdowns.on('show.bs.dropdown', function () {
$('#search-dropdown').removeClass('d-block');
});
}
// Topbar Fullscreen Button
function initfullScreenListener() {
var self = this;
var fullScreenBtn = document.querySelector('[data-toggle="fullscreen"]');
if (fullScreenBtn) {
fullScreenBtn.addEventListener('click', function (e) {
e.preventDefault();
document.body.classList.toggle('fullscreen-enable')
if (!document.fullscreenElement && /* alternative standard method */ !document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
}
});
}
}
// Show/Hide Password
function initShowHidePassword() {
$("[data-password]").on('click', function () {
if ($(this).attr('data-password') == "false") {
$(this).siblings("input").attr("type", "text");
$(this).attr('data-password', 'true');
$(this).addClass("show-password");
} else {
$(this).siblings("input").attr("type", "password");
$(this).attr('data-password', 'false');
$(this).removeClass("show-password");
}
});
}
// Form Validation
function initFormValidation() {
// Example starter JavaScript for disabling form submissions if there are invalid fields
// Fetch all the forms we want to apply custom Bootstrap validation styles to
// Loop over them and prevent submission
document.querySelectorAll('.needs-validation').forEach(form => {
form.addEventListener('submit', event => {
if (!form.checkValidity()) {
event.preventDefault()
event.stopPropagation()
}
form.classList.add('was-validated')
}, false)
})
}
// Form Advance
function initFormAdvance() {
// Select2
if (jQuery().select2) {
$('[data-toggle="select2"]').select2();
}
// Input Mask
if (jQuery().mask) {
$('[data-toggle="input-mask"]').each(function (idx, obj) {
var maskFormat = $(obj).data("maskFormat");
var reverse = $(obj).data("reverse");
if (reverse != null)
$(obj).mask(maskFormat, { 'reverse': reverse });
else
$(obj).mask(maskFormat);
});
}
// Date-Range-Picker
if (jQuery().daterangepicker) {
//date pickers ranges only
var start = moment().subtract(29, 'days');
var end = moment();
var defaultRangeOptions = {
startDate: start,
endDate: end,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
}
};
$('[data-toggle="date-picker-range"]').each(function (idx, obj) {
var objOptions = $.extend({}, defaultRangeOptions, $(obj).data());
var target = objOptions["targetDisplay"];
//rendering
$(obj).daterangepicker(objOptions, function (start, end) {
if (target)
$(target).html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
});
});
// Datetime and date range picker
var defaultOptions = {
"cancelClass": "btn-light",
"applyButtonClasses": "btn-success"
};
$('[data-toggle="date-picker"]').each(function (idx, obj) {
var objOptions = $.extend({}, defaultOptions, $(obj).data());
$(obj).daterangepicker(objOptions);
});
}
// Bootstrap Timepicker
if (jQuery().timepicker) {
var defaultOptions = {
"showSeconds": true,
"icons": {
"up": "mdi-chevron-up",
"down": "mdi-chevron-down"
}
};
$('[data-toggle="timepicker"]').each(function (idx, obj) {
var objOptions = $.extend({}, defaultOptions, $(obj).data());
$(obj).timepicker(objOptions);
});
}
// Bootstrap Touchspin
if (jQuery().TouchSpin) {
var defaultOptions = {
};
$('[data-toggle="touchspin"]').each(function (idx, obj) {
var objOptions = $.extend({}, defaultOptions, $(obj).data());
$(obj).TouchSpin(objOptions);
});
}
// Bootstrap Maxlength
if (jQuery().maxlength) {
var defaultOptions = {
warningClass: "badge bg-success",
limitReachedClass: "badge bg-danger",
separator: ' out of ',
preText: 'You typed ',
postText: ' chars available.',
placement: 'bottom',
};
$('[data-toggle="maxlength"]').each(function (idx, obj) {
var objOptions = $.extend({}, defaultOptions, $(obj).data());
$(obj).maxlength(objOptions);
});
}
}
function init() {
initComponents();
initPortletCard();
initMultiDropdown();
initLeftSidebar()
initSearch();
initfullScreenListener();
initShowHidePassword();
initFormValidation();
initFormAdvance();
}
init();
})(jQuery)
/**
* Theme: Powerx - Responsive Bootstrap 5 Admin Dashboard
* Author: Coderthemes
* Module/App: Layout Js
*/
class ThemeCustomizer {
constructor() {
this.html = document.getElementsByTagName('html')[0]
this.config = {};
this.defaultConfig = window.config;
}
initConfig() {
this.defaultConfig = JSON.parse(JSON.stringify(window.defaultConfig));
this.config = JSON.parse(JSON.stringify(window.config));
this.setSwitchFromConfig();
}
changeMenuColor(color) {
this.config.menu.color = color;
this.html.setAttribute('data-menu-color', color);
this.setSwitchFromConfig();
}
changeLeftbarSize(size, save = true) {
this.html.setAttribute('data-sidenav-size', size);
if (save) {
this.config.sidenav.size = size;
this.setSwitchFromConfig();
}
}
changeLayoutPosition(position) {
this.config.layout.position = position;
this.html.setAttribute('data-layout-position', position);
this.setSwitchFromConfig();
}
changeLayoutColor(color) {
this.config.theme = color;
this.html.setAttribute('data-bs-theme', color);
this.setSwitchFromConfig();
}
changeTopbarColor(color) {
this.config.topbar.color = color;
this.html.setAttribute('data-topbar-color', color);
this.setSwitchFromConfig();
}
changeSidebarUser(showUser) {
this.config.sidenav.user = showUser;
if (showUser) {
this.html.setAttribute('data-sidenav-user', showUser);
} else {
this.html.removeAttribute('data-sidenav-user');
}
this.setSwitchFromConfig();
}
resetTheme() {
this.config = JSON.parse(JSON.stringify(window.defaultConfig));
this.changeMenuColor(this.config.menu.color);
this.changeLeftbarSize(this.config.sidenav.size);
this.changeLayoutColor(this.config.theme);
this.changeLayoutPosition(this.config.layout.position);
this.changeTopbarColor(this.config.topbar.color);
this.changeSidebarUser(this.config.sidenav.user);
this._adjustLayout();
}
initSwitchListener() {
var self = this;
document.querySelectorAll('input[name=data-menu-color]').forEach(function (element) {
element.addEventListener('change', function (e) {
self.changeMenuColor(element.value);
})
});
document.querySelectorAll('input[name=data-sidenav-size]').forEach(function (element) {
element.addEventListener('change', function (e) {
self.changeLeftbarSize(element.value);
})
});
document.querySelectorAll('input[name=data-bs-theme]').forEach(function (element) {
element.addEventListener('change', function (e) {
self.changeLayoutColor(element.value);
})
});
document.querySelectorAll('input[name=data-layout-position]').forEach(function (element) {
element.addEventListener('change', function (e) {
self.changeLayoutPosition(element.value);
})
});
document.querySelectorAll('input[name=data-topbar-color]').forEach(function (element) {
element.addEventListener('change', function (e) {
self.changeTopbarColor(element.value);
})
});
document.querySelectorAll('input[name=sidebar-user]').forEach(function (element) {
element.addEventListener('change', function (e) {
self.changeSidebarUser(element.checked);
})
});
//TopBar Light Dark
var themeColorToggle = document.getElementById('light-dark-mode');
if (themeColorToggle) {
themeColorToggle.addEventListener('click', function (e) {
if (self.config.theme === 'light') {
self.changeLayoutColor('dark');
} else {
self.changeLayoutColor('light');
}
});
}
var resetBtn = document.querySelector('#reset-layout')
if (resetBtn) {
resetBtn.addEventListener('click', function (e) {
self.resetTheme();
});
}
var menuToggleBtn = document.querySelector('.button-toggle-menu');
if (menuToggleBtn) {
menuToggleBtn.addEventListener('click', function () {
var configSize = self.config.sidenav.size;
var size = self.html.getAttribute('data-sidenav-size', configSize);
if (size === 'full') {
self.showBackdrop();
} else {
if (configSize == 'fullscreen') {
if (size === 'fullscreen') {
self.changeLeftbarSize(configSize == 'fullscreen' ? 'default' : configSize, false);
} else {
self.changeLeftbarSize('fullscreen', false);
}
} else {
if (size === 'condensed') {
self.changeLeftbarSize(configSize == 'condensed' ? 'default' : configSize, false);
} else {
self.changeLeftbarSize('condensed', false);
}
}
}
// Todo: old implementation
self.html.classList.toggle('sidebar-enable');
});
}
var menuCloseBtn = document.querySelector('.button-close-fullsidebar');
if (menuCloseBtn) {
menuCloseBtn.addEventListener('click', function () {
self.html.classList.remove('sidebar-enable');
self.hideBackdrop();
});
}
}
showBackdrop() {
const backdrop = document.createElement('div');
backdrop.id = 'custom-backdrop';
backdrop.classList = 'offcanvas-backdrop fade show';
document.body.appendChild(backdrop);
document.body.style.overflow = "hidden";
if (window.innerWidth > 767) {
document.body.style.paddingRight = "15px";
}
const self = this
backdrop.addEventListener('click', function (e) {
self.html.classList.remove('sidebar-enable');
self.hideBackdrop();
})
}
hideBackdrop() {
var backdrop = document.getElementById('custom-backdrop');
if (backdrop) {
document.body.removeChild(backdrop);
document.body.style.overflow = null;
document.body.style.paddingRight = null;
}
}
initWindowSize() {
var self = this;
window.addEventListener('resize', function (e) {
self._adjustLayout();
})
}
_adjustLayout() {
var self = this;
if (window.innerWidth <= 767.98) {
self.changeLeftbarSize('full', false);
} else if (window.innerWidth >= 767 && window.innerWidth <= 1140) {
if (self.config.sidenav.size !== 'full' && self.config.sidenav.size !== 'fullscreen') {
if (self.config.sidenav.size === 'sm-hover') {
self.changeLeftbarSize('condensed');
} else {
self.changeLeftbarSize('condensed', false);
}
}
} else {
self.changeLeftbarSize(self.config.sidenav.size);
}
}
setSwitchFromConfig() {
sessionStorage.setItem('__POWERX_CONFIG__', JSON.stringify(this.config));
// localStorage.setItem('__POWERX_CONFIG__', JSON.stringify(this.config));
document.querySelectorAll('#theme-settings-offcanvas input[type=checkbox]').forEach(function (checkbox) {
checkbox.checked = false;
})
var config = this.config;
if (config) {
var layoutColorSwitch = document.querySelector('input[type=checkbox][name=data-bs-theme][value=' + config.theme + ']');
var topbarColorSwitch = document.querySelector('input[type=checkbox][name=data-topbar-color][value=' + config.topbar.color + ']');
var menuColorSwitch = document.querySelector('input[type=checkbox][name=data-menu-color][value=' + config.menu.color + ']');
var leftbarSizeSwitch = document.querySelector('input[type=checkbox][name=data-sidenav-size][value=' + config.sidenav.size + ']');
var layoutPositionSwitch = document.querySelector('input[type=radio][name=data-layout-position][value=' + config.layout.position + ']');
var sidebarUserSwitch = document.querySelector('input[type=checkbox][name=sidebar-user]');
if (layoutColorSwitch) layoutColorSwitch.checked = true;
if (topbarColorSwitch) topbarColorSwitch.checked = true;
if (menuColorSwitch) menuColorSwitch.checked = true;
if (leftbarSizeSwitch) leftbarSizeSwitch.checked = true;
if (layoutPositionSwitch) layoutPositionSwitch.checked = true;
if (sidebarUserSwitch && config.sidenav.user.toString() === "true") sidebarUserSwitch.checked = true;
}
}
init() {
this.initConfig();
this.initSwitchListener();
this.initWindowSize();
this._adjustLayout();
this.setSwitchFromConfig();
}
}
new ThemeCustomizer().init();

1
App/static/assets/js/app.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(){var t=sessionStorage.getItem("__POWERX_CONFIG__"),e=document.getElementsByTagName("html")[0],i={theme:"light",layout:{position:"fixed"},topbar:{color:"light"},menu:{color:"light"},sidenav:{size:"default",user:!1}},o=(this.html=document.getElementsByTagName("html")[0],config=Object.assign(JSON.parse(JSON.stringify(i)),{}),this.html.getAttribute("data-bs-theme")),o=(config.theme=null!==o?o:i.theme,this.html.getAttribute("data-layout-position")),o=(config.layout.position=null!==o?o:i.layout.position,this.html.getAttribute("data-topbar-color")),o=(config.topbar.color=null!=o?o:i.topbar.color,this.html.getAttribute("data-sidenav-size")),o=(config.sidenav.size=null!==o?o:i.sidenav.size,this.html.getAttribute("data-sidenav-user")),o=(config.sidenav.user=null!==o||i.sidenav.user,this.html.getAttribute("data-menu-color"));if(config.menu.color=null!==o?o:i.menu.color,window.defaultConfig=JSON.parse(JSON.stringify(config)),null!==t&&(config=JSON.parse(t)),window.config=config){e.setAttribute("data-bs-theme",config.theme),e.setAttribute("data-menu-color",config.menu.color),e.setAttribute("data-topbar-color",config.topbar.color),e.setAttribute("data-layout-position",config.layout.position);let t=config.sidenav.size;window.innerWidth<=767?t="full":767<=window.innerWidth&&window.innerWidth<=1140&&"full"!==self.config.sidenav.size&&"fullscreen"!==self.config.sidenav.size&&(t="condensed"),e.setAttribute("data-sidenav-size",t),config.sidenav.user&&"true"===config.sidenav.user.toString()?e.setAttribute("data-sidenav-user",!0):e.removeAttribute("data-sidenav-user")}}();

View File

@ -0,0 +1 @@
!function(a){"use strict";function t(){this.$body=a("body"),this.$chatInput=a(".chat-input"),this.$chatList=a(".conversation-list"),this.$chatSendBtn=a(".chat-send"),this.$chatForm=a("#chat-form")}t.prototype.save=function(){var t=this.$chatInput.val(),i=moment().format("h:mm");return""==t?(this.$chatInput.focus(),!1):(a('<li class="clearfix odd"><div class="chat-avatar"><img src="assets/images/users/avatar-1.jpg" alt="male"><i>'+i+'</i></div><div class="conversation-text"><div class="ctext-wrap"><i>Dominic</i><p>'+t+"</p></div></div></li>").appendTo(".conversation-list"),this.$chatInput.focus(),this.$chatList.animate({scrollTop:this.$chatList.prop("scrollHeight")},1e3),!0)},t.prototype.init=function(){var i=this;i.$chatInput.keypress(function(t){if(13==t.which)return i.save(),!1}),i.$chatForm.on("submit",function(t){return t.preventDefault(),i.save(),i.$chatForm.removeClass("was-validated"),i.$chatInput.val(""),!1})},a.ChatApp=new t,a.ChatApp.Constructor=t}(window.jQuery),function(){"use strict";window.jQuery.ChatApp.init()}();

View File

@ -0,0 +1 @@
!function(r){"use strict";function t(){this.$body=r("body")}t.prototype.init=function(){r('[data-plugin="dragula"]').each(function(){var t=r(this).data("containers"),a=[];if(t)for(var n=0;n<t.length;n++)a.push(r("#"+t[n])[0]);else a=[r(this)[0]];var i=r(this).data("handleclass");i?dragula(a,{moves:function(t,a,n){return n.classList.contains(i)}}):dragula(a)})},r.Dragula=new t,r.Dragula.Constructor=t}(window.jQuery),function(){"use strict";window.jQuery.Dragula.init()}();

View File

@ -0,0 +1 @@
!function(e){"use strict";function t(){this.$body=e("body")}t.prototype.init=function(){Dropzone.autoDiscover=!1,e('[data-plugin="dropzone"]').each(function(){var t=e(this).attr("action"),i=e(this).data("previewsContainer"),t={url:t},i=(i&&(t.previewsContainer=i),e(this).data("uploadPreviewTemplate"));i&&(t.previewTemplate=e(i).html()),e(this).dropzone(t)})},e.FileUpload=new t,e.FileUpload.Constructor=t}(window.jQuery),function(){"use strict";window.jQuery.FileUpload.init()}();

View File

@ -0,0 +1 @@
!function(n){"use strict";function i(){this.$body=n("body")}i.prototype.init=function(){n('[data-plugin="range-slider"]').each(function(){var i=n(this).data();n(this).ionRangeSlider(i)})},n.RangeSlider=new i,n.RangeSlider.Constructor=i}(window.jQuery),function(){"use strict";window.jQuery.RangeSlider.init()}();

View File

@ -0,0 +1 @@
$("#js-interaction").bind("rated",function(t,e){$("#jsvalue").text("You've rated it: "+e)}),$("#js-interaction").bind("reset",function(){$("#jsvalue").text("Rating reset")}),$("#js-interaction").bind("over",function(t,e){$("#jshover").text("Hovering over: "+e)});

View File

@ -0,0 +1 @@
$(".slimscroll-leftbar").slimscroll({height:"auto",position:"left",size:"4px",color:"#9ea5ab",wheelStep:5,touchScrollStep:20}),$(".slimscroll-size").slimscroll({height:"auto",position:"right",size:"10px",color:"#9ea5ab",wheelStep:5,touchScrollStep:20}),$(".slimscroll-color").slimscroll({height:"auto",position:"right",size:"5px",color:"#3e60d5",wheelStep:5,touchScrollStep:20}),$(".slimscroll-always-visible").slimscroll({height:"auto",position:"right",size:"5px",color:"#9ea5ab",wheelStep:5,alwaysVisible:!0,touchScrollStep:20});

View File

@ -0,0 +1 @@
!function(t){"use strict";function o(){this.$body=t("body"),this.$todoContainer=t("#todo-container"),this.$todoMessage=t("#todo-message"),this.$todoRemaining=t("#todo-remaining"),this.$todoTotal=t("#todo-total"),this.$archiveBtn=t("#btn-archive"),this.$todoList=t("#todo-list"),this.$todoDonechk=".todo-done",this.$todoForm=t("#todo-form"),this.$todoInput=t("#todo-input-text"),this.$todoBtn=t("#todo-btn-submit"),this.$todoData=[{id:"1",text:"Design One page theme",done:!1},{id:"2",text:"Build a js based app",done:!0},{id:"3",text:"Creating component page",done:!0},{id:"4",text:"Testing??",done:!0},{id:"5",text:"Hehe!! This looks cool!",done:!1},{id:"6",text:"Create new version 3.0",done:!1},{id:"7",text:"Build an angular app",done:!0}],this.$todoCompletedData=[],this.$todoUnCompletedData=[]}o.prototype.markTodo=function(t,o){for(var e=0;e<this.$todoData.length;e++)this.$todoData[e].id==t&&(this.$todoData[e].done=o)},o.prototype.addTodo=function(t){this.$todoData.push({id:this.$todoData.length,text:t,done:!1}),this.generate()},o.prototype.archives=function(){this.$todoUnCompletedData=[];for(var t=0;t<this.$todoData.length;t++){var o=this.$todoData[t];(1==o.done?this.$todoCompletedData:this.$todoUnCompletedData).push(o)}this.$todoData=[],this.$todoData=[].concat(this.$todoUnCompletedData),this.generate()},o.prototype.generate=function(){this.$todoList.html("");for(var t=0,o=0;o<this.$todoData.length;o++){var e=this.$todoData[o];1==e.done?this.$todoList.prepend('<li class="list-group-item border-0 ps-0"><div class="form-check mb-0"><input type="checkbox" class="form-check-input todo-done" id="'+e.id+'" checked><label class="form-check-label" for="'+e.id+'"><s>'+e.text+"</s></label></div></li>"):(t+=1,this.$todoList.prepend('<li class="list-group-item border-0 ps-0"><div class="form-check mb-0"><input type="checkbox" class="form-check-input todo-done" id="'+e.id+'"><label class="form-check-label" for="'+e.id+'">'+e.text+"</label></div></li>"))}this.$todoTotal.text(this.$todoData.length),this.$todoRemaining.text(t)},o.prototype.init=function(){var o=this;this.generate(),this.$archiveBtn.on("click",function(t){return t.preventDefault(),o.archives(),!1}),t(document).on("change",this.$todoDonechk,function(){this.checked?o.markTodo(t(this).attr("id"),!0):o.markTodo(t(this).attr("id"),!1),o.generate()}),this.$todoForm.on("submit",function(t){return t.preventDefault(),""==o.$todoInput.val()||void 0===o.$todoInput.val()||null==o.$todoInput.val()?(o.$todoInput.focus(),!1):(o.addTodo(o.$todoInput.val()),o.$todoForm.removeClass("was-validated"),o.$todoInput.val(""),!0)})},t.TodoApp=new o,t.TodoApp.Constructor=o}(window.jQuery),function(){"use strict";window.jQuery.TodoApp.init()}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
var colors=["#3e60d5","#47ad77","#fa5c7c"],dataColors=$("#basic-boxplot").data("colors"),options={series:[{type:"boxPlot",data:[{x:"Jan 2015",y:[54,66,69,75,88]},{x:"Jan 2016",y:[43,65,69,76,81]},{x:"Jan 2017",y:[31,39,45,51,59]},{x:"Jan 2018",y:[39,46,55,65,71]},{x:"Jan 2019",y:[29,31,35,39,44]},{x:"Jan 2020",y:[41,49,58,61,67]},{x:"Jan 2021",y:[54,59,66,71,88]}]}],chart:{type:"boxPlot",height:350,toolbar:{show:!1}},plotOptions:{boxPlot:{colors:{upper:(colors=dataColors?dataColors.split(","):colors)[0],lower:colors[1]}}},stroke:{colors:["#a1a9b1"]}},chart=new ApexCharts(document.querySelector("#basic-boxplot"),options),colors=(chart.render(),["#3e60d5","#47ad77","#fa5c7c"]),options=((dataColors=$("#scatter-boxplot").data("colors"))&&(colors=dataColors.split(",")),{series:[{name:"Box",type:"boxPlot",data:[{x:new Date("2017-01-01").getTime(),y:[54,66,69,75,88]},{x:new Date("2018-01-01").getTime(),y:[43,65,69,76,81]},{x:new Date("2019-01-01").getTime(),y:[31,39,45,51,59]},{x:new Date("2020-01-01").getTime(),y:[39,46,55,65,71]},{x:new Date("2021-01-01").getTime(),y:[29,31,35,39,44]}]},{name:"Outliers",type:"scatter",data:[{x:new Date("2017-01-01").getTime(),y:32},{x:new Date("2018-01-01").getTime(),y:25},{x:new Date("2019-01-01").getTime(),y:64},{x:new Date("2020-01-01").getTime(),y:27},{x:new Date("2020-01-01").getTime(),y:78},{x:new Date("2021-01-01").getTime(),y:15}]}],chart:{type:"boxPlot",height:350},colors:colors,stroke:{colors:["#a1a9b1"]},legend:{offsetY:10},xaxis:{type:"datetime",tooltip:{formatter:function(o){return new Date(o).getFullYear()}}},grid:{padding:{bottom:5}},tooltip:{shared:!1,intersect:!0},plotOptions:{boxPlot:{colors:{upper:colors[0],lower:colors[1]}}}}),colors=((chart=new ApexCharts(document.querySelector("#scatter-boxplot"),options)).render(),["#3e60d5","#47ad77","#fa5c7c"]),dataColors=$("#horizontal-boxplot").data("colors"),options={series:[{data:[{x:"Category A",y:[54,66,69,75,88]},{x:"Category B",y:[43,65,69,76,81]},{x:"Category C",y:[31,39,45,51,59]},{x:"Category D",y:[39,46,55,65,71]},{x:"Category E",y:[29,31,35,39,44]},{x:"Category F",y:[41,49,58,61,67]},{x:"Category G",y:[54,59,66,71,88]}]}],chart:{type:"boxPlot",height:350},plotOptions:{bar:{horizontal:!0,barHeight:"50%"},boxPlot:{colors:{upper:(colors=dataColors?dataColors.split(","):colors)[0],lower:colors[1]}}},stroke:{colors:["#a1a9b1"]}};(chart=new ApexCharts(document.querySelector("#horizontal-boxplot"),options)).render();

View File

@ -0,0 +1 @@
function generateData(a,e,t){for(var o=0,r=[];o<e;){var n=Math.floor(750*Math.random())+1,l=Math.floor(Math.random()*(t.max-t.min+1))+t.min,d=Math.floor(61*Math.random())+15;r.push([n,l,d]),o++}return r}var colors=["#3e60d5","#ffbc00","#fa5c7c"],dataColors=$("#simple-bubble").data("colors"),options=(dataColors&&(colors=dataColors.split(",")),{chart:{height:380,type:"bubble",toolbar:{show:!1}},dataLabels:{enabled:!1},series:[{name:"Bubble 1",data:generateData(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})},{name:"Bubble 2",data:generateData(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})},{name:"Bubble 3",data:generateData(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})}],fill:{opacity:.8,gradient:{enabled:!1}},colors:colors,xaxis:{tickAmount:12,type:"category"},yaxis:{max:70},grid:{borderColor:"#f1f3fa",padding:{bottom:5}},legend:{offsetY:7}}),chart=new ApexCharts(document.querySelector("#simple-bubble"),options);function generateData1(a,e,t){for(var o=0,r=[];o<e;){var n=Math.floor(Math.random()*(t.max-t.min+1))+t.min,l=Math.floor(61*Math.random())+15;r.push([a,n,l]),a+=864e5,o++}return r}chart.render();var colors=["#3e60d5","#47ad77","#fa5c7c","#39afd1"],options2=((dataColors=$("#second-bubble").data("colors"))&&(colors=dataColors.split(",")),{chart:{height:380,type:"bubble",toolbar:{show:!1}},dataLabels:{enabled:!1},series:[{name:"Product 1",data:generateData1(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})},{name:"Product 2",data:generateData1(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})},{name:"Product 3",data:generateData1(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})},{name:"Product 4",data:generateData1(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})}],fill:{type:"gradient"},colors:colors,xaxis:{tickAmount:12,type:"datetime",labels:{rotate:0}},yaxis:{max:70},legend:{offsetY:7},grid:{borderColor:"#f1f3fa",padding:{bottom:5}}});(chart=new ApexCharts(document.querySelector("#second-bubble"),options2)).render();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
function generateData(a,e){for(var t=0,r=[];t<a;){var n=(t+1).toString(),o=Math.floor(Math.random()*(e.max-e.min+1))+e.min;r.push({x:n,y:o}),t++}return r}var colors=["#3e60d5"],dataColors=$("#basic-heatmap").data("colors"),options={chart:{height:380,type:"heatmap"},dataLabels:{enabled:!1},colors:colors=dataColors?dataColors.split(","):colors,series:[{name:"Metric 1",data:generateData(20,{min:0,max:90})},{name:"Metric 2",data:generateData(20,{min:0,max:90})},{name:"Metric 3",data:generateData(20,{min:0,max:90})},{name:"Metric 4",data:generateData(20,{min:0,max:90})},{name:"Metric 5",data:generateData(20,{min:0,max:90})},{name:"Metric 6",data:generateData(20,{min:0,max:90})},{name:"Metric 7",data:generateData(20,{min:0,max:90})},{name:"Metric 8",data:generateData(20,{min:0,max:90})},{name:"Metric 9",data:generateData(20,{min:0,max:90})}],xaxis:{type:"category"}},chart=new ApexCharts(document.querySelector("#basic-heatmap"),options);function generateData(a,e){for(var t=0,r=[];t<a;){var n=(t+1).toString(),o=Math.floor(Math.random()*(e.max-e.min+1))+e.min;r.push({x:n,y:o}),t++}return r}chart.render();colors=["#F3B415","#F27036","#663F59","#6A6E94","#4E88B4","#00A7C6","#18D8D8","#A9D794","#46AF78"],dataColors=$("#multiple-series-heatmap").data("colors"),options={chart:{height:380,type:"heatmap"},dataLabels:{enabled:!1},colors:colors=dataColors?dataColors.split(","):colors,series:[{name:"Metric 1",data:generateData(20,{min:0,max:90})},{name:"Metric 2",data:generateData(20,{min:0,max:90})},{name:"Metric 3",data:generateData(20,{min:0,max:90})},{name:"Metric 4",data:generateData(20,{min:0,max:90})},{name:"Metric 5",data:generateData(20,{min:0,max:90})},{name:"Metric 6",data:generateData(20,{min:0,max:90})},{name:"Metric 7",data:generateData(20,{min:0,max:90})},{name:"Metric 8",data:generateData(20,{min:0,max:90})},{name:"Metric 9",data:generateData(20,{min:0,max:90})}],xaxis:{type:"category"}};function generateData(a,e){for(var t=0,r=[];t<a;){var n=(t+1).toString(),o=Math.floor(Math.random()*(e.max-e.min+1))+e.min;r.push({x:n,y:o}),t++}return r}(chart=new ApexCharts(document.querySelector("#multiple-series-heatmap"),options)).render();colors=["#fa6767","#f9bc0d","#44badc","#42d29d"],dataColors=$("#color-range-heatmap").data("colors"),options={chart:{height:380,type:"heatmap"},plotOptions:{heatmap:{shadeIntensity:.5,colorScale:{ranges:[{from:-30,to:5,name:"Low",color:(colors=dataColors?dataColors.split(","):colors)[0]},{from:6,to:20,name:"Medium",color:colors[1]},{from:21,to:45,name:"High",color:colors[2]},{from:46,to:55,name:"Extreme",color:colors[3]}]}}},dataLabels:{enabled:!1},series:[{name:"Jan",data:generateData(20,{min:-30,max:55})},{name:"Feb",data:generateData(20,{min:-30,max:55})},{name:"Mar",data:generateData(20,{min:-30,max:55})},{name:"Apr",data:generateData(20,{min:-30,max:55})},{name:"May",data:generateData(20,{min:-30,max:55})},{name:"Jun",data:generateData(20,{min:-30,max:55})},{name:"Jul",data:generateData(20,{min:-30,max:55})},{name:"Aug",data:generateData(20,{min:-30,max:55})},{name:"Sep",data:generateData(20,{min:-30,max:55})}]};function generateData(a,e){for(var t=0,r=[];t<a;){var n=(t+1).toString(),o=Math.floor(Math.random()*(e.max-e.min+1))+e.min;r.push({x:n,y:o}),t++}return r}(chart=new ApexCharts(document.querySelector("#color-range-heatmap"),options)).render();colors=["#39afd1","#47ad77"],dataColors=$("#rounded-heatmap").data("colors"),options={chart:{height:380,type:"heatmap"},stroke:{width:0},plotOptions:{heatmap:{radius:30,enableShades:!1,colorScale:{ranges:[{from:0,to:50,color:(colors=dataColors?dataColors.split(","):colors)[0]},{from:51,to:100,color:colors[1]}]}}},colors:colors,dataLabels:{enabled:!0,style:{colors:["#fff"]}},series:[{name:"Metric1",data:generateData(20,{min:0,max:90})},{name:"Metric2",data:generateData(20,{min:0,max:90})},{name:"Metric3",data:generateData(20,{min:0,max:90})},{name:"Metric4",data:generateData(20,{min:0,max:90})},{name:"Metric5",data:generateData(20,{min:0,max:90})},{name:"Metric6",data:generateData(20,{min:0,max:90})},{name:"Metric7",data:generateData(20,{min:0,max:90})},{name:"Metric8",data:generateData(20,{min:0,max:90})},{name:"Metric8",data:generateData(20,{min:0,max:90})}],xaxis:{type:"category"},grid:{borderColor:"#f1f3fa"}};(chart=new ApexCharts(document.querySelector("#rounded-heatmap"),options)).render();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
var colors=["#3e60d5","#47ad77"],dataColors=$("#line-column-mixed").data("colors"),options={chart:{height:380,type:"line",toolbar:{show:!1}},series:[{name:"Website Blog",type:"column",data:[440,505,414,671,227,413,201,352,752,320,257,160]},{name:"Social Media",type:"line",data:[23,42,35,27,43,22,17,31,22,22,12,16]}],stroke:{width:[0,4]},labels:["01 Jan 2001","02 Jan 2001","03 Jan 2001","04 Jan 2001","05 Jan 2001","06 Jan 2001","07 Jan 2001","08 Jan 2001","09 Jan 2001","10 Jan 2001","11 Jan 2001","12 Jan 2001"],xaxis:{type:"datetime"},colors:colors=dataColors?dataColors.split(","):colors,yaxis:[{title:{text:"Website Blog"}},{opposite:!0,title:{text:"Social Media"}}],legend:{offsetY:7},grid:{borderColor:"#f1f3fa",padding:{bottom:5}}},chart=new ApexCharts(document.querySelector("#line-column-mixed"),options),colors=(chart.render(),["#3e60d5","#39afd1","#fa5c7c"]),dataColors=$("#multiple-yaxis-mixed").data("colors"),options={chart:{height:380,type:"line",stacked:!1,toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{width:[0,0,3]},series:[{name:"Income",type:"column",data:[1.4,2,2.5,1.5,2.5,2.8,3.8,4.6]},{name:"Cashflow",type:"column",data:[1.1,3,3.1,4,4.1,4.9,6.5,8.5]},{name:"Revenue",type:"line",data:[20,29,37,36,44,45,50,58]}],colors:colors=dataColors?dataColors.split(","):colors,xaxis:{categories:[2009,2010,2011,2012,2013,2014,2015,2016]},yaxis:[{axisTicks:{show:!0},axisBorder:{show:!0,color:colors[0]},labels:{style:{color:colors[0]}},title:{text:"Income (thousand crores)"}},{axisTicks:{show:!0},axisBorder:{show:!0,color:colors[1]},labels:{style:{color:colors[1]},offsetX:10},title:{text:"Operating Cashflow (thousand crores)"}},{opposite:!0,axisTicks:{show:!0},axisBorder:{show:!0,color:colors[2]},labels:{style:{color:colors[2]}},title:{text:"Revenue (thousand crores)"}}],tooltip:{followCursor:!0,y:{formatter:function(o){return void 0!==o?o+" thousand crores":o}}},grid:{borderColor:"#f1f3fa",padding:{bottom:5}},legend:{offsetY:7},responsive:[{breakpoint:600,options:{yaxis:{show:!1},legend:{show:!1}}}]},colors=((chart=new ApexCharts(document.querySelector("#multiple-yaxis-mixed"),options)).render(),["#47ad77","#fa5c7c"]),dataColors=$("#line-area-mixed").data("colors"),options={chart:{height:380,type:"line",toolbar:{show:!1}},stroke:{curve:"smooth",width:2},series:[{name:"Team A",type:"area",data:[44,55,31,47,31,43,26,41,31,47,33]},{name:"Team B",type:"line",data:[55,69,45,61,43,54,37,52,44,61,43]}],fill:{type:"solid",opacity:[.35,1]},labels:["Dec 01","Dec 02","Dec 03","Dec 04","Dec 05","Dec 06","Dec 07","Dec 08","Dec 09 ","Dec 10","Dec 11"],markers:{size:0},legend:{offsetY:7},colors:colors=dataColors?dataColors.split(","):colors,yaxis:[{title:{text:"Series A"}},{opposite:!0,title:{text:"Series B"}}],tooltip:{shared:!0,intersect:!1,y:{formatter:function(o){return void 0!==o?o.toFixed(0)+" points":o}}},grid:{borderColor:"#f1f3fa",padding:{bottom:5}},responsive:[{breakpoint:600,options:{yaxis:{show:!1},legend:{show:!1}}}]},colors=((chart=new ApexCharts(document.querySelector("#line-area-mixed"),options)).render(),["#3e60d5","#39afd1","#fa5c7c"]),dataColors=$("#all-mixed").data("colors"),options={chart:{height:380,type:"line",stacked:!1,toolbar:{show:!1}},stroke:{width:[0,2,4],curve:"smooth"},plotOptions:{bar:{columnWidth:"50%"}},colors:colors=dataColors?dataColors.split(","):colors,series:[{name:"Team A",type:"column",data:[23,11,22,27,13,22,37,21,44,22,30]},{name:"Team B",type:"area",data:[44,55,41,67,22,43,21,41,56,27,43]},{name:"Team C",type:"line",data:[30,25,36,30,45,35,64,52,59,36,39]}],fill:{opacity:[.85,.25,1],gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.85,opacityTo:.55,stops:[0,100,100,100]}},labels:["01/01/2003","02/01/2003","03/01/2003","04/01/2003","05/01/2003","06/01/2003","07/01/2003","08/01/2003","09/01/2003","10/01/2003","11/01/2003"],markers:{size:0},legend:{offsetY:7},xaxis:{type:"datetime"},yaxis:{title:{text:"Points"}},tooltip:{shared:!0,intersect:!1,y:{formatter:function(o){return void 0!==o?o.toFixed(0)+" points":o}}},grid:{borderColor:"#f1f3fa",padding:{bottom:5}}};(chart=new ApexCharts(document.querySelector("#all-mixed"),options)).render();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
var colors=["#3e60d5","#47ad77","#fa5c7c"],dataColors=$("#basic-polar-area").data("colors"),options={series:[14,23,21,17,15,10],chart:{height:380,type:"polarArea"},stroke:{colors:["#fff"]},fill:{opacity:.8},labels:["Vote A","Vote B","Vote C","Vote D","Vote E","Vote F"],legend:{position:"bottom"},colors:colors=dataColors?dataColors.split(","):colors,responsive:[{breakpoint:480,options:{chart:{width:200},legend:{position:"bottom"}}}]},chart=new ApexCharts(document.querySelector("#basic-polar-area"),options),options=(chart.render(),{series:[42,47,52,58,65],chart:{height:380,type:"polarArea"},labels:["Rose A","Rose B","Rose C","Rose D","Rose E"],fill:{opacity:1},stroke:{width:1},yaxis:{show:!1},legend:{position:"bottom"},plotOptions:{polarArea:{rings:{strokeWidth:0},spokes:{strokeWidth:0}}},theme:{monochrome:{enabled:!0,shadeTo:"light",color:"#3e60d5",shadeIntensity:.6}}});(chart=new ApexCharts(document.querySelector("#monochrome-polar-area"),options)).render();

View File

@ -0,0 +1 @@
var colors=["#3e60d5"],dataColors=$("#basic-radar").data("colors"),options={chart:{height:350,type:"radar"},series:[{name:"Series 1",data:[80,50,30,40,100,20]}],colors:colors=dataColors?dataColors.split(","):colors,labels:["January","February","March","April","May","June"]},chart=new ApexCharts(document.querySelector("#basic-radar"),options),colors=(chart.render(),["#FF4560"]),dataColors=$("#radar-polygon").data("colors"),options={chart:{height:350,type:"radar"},series:[{name:"Series 1",data:[20,100,40,30,50,80,33]}],labels:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],plotOptions:{radar:{size:140}},colors:colors=dataColors?dataColors.split(","):colors,markers:{size:4,colors:["#fff"],strokeColor:colors,strokeWidth:2},tooltip:{y:{formatter:function(r){return r}}},yaxis:{tickAmount:7,labels:{formatter:function(r,a){return a%2==0?r:""}}}},colors=((chart=new ApexCharts(document.querySelector("#radar-polygon"),options)).render(),["#3e60d5","#02a8b5","#fd7e14"]),dataColors=$("#radar-multiple-series").data("colors"),options={chart:{height:350,type:"radar"},series:[{name:"Series 1",data:[80,50,30,40,100,20]},{name:"Series 2",data:[20,30,40,80,20,80]},{name:"Series 3",data:[44,76,78,13,43,10]}],stroke:{width:0},fill:{opacity:.4},markers:{size:0},legend:{offsetY:-10},colors:colors=dataColors?dataColors.split(","):colors,labels:["2011","2012","2013","2014","2015","2016"]};function update(){function r(){for(var r=[],a=0;a<6;a++)r.push(Math.floor(100*Math.random()));return r}chart.updateSeries([{name:"Series 1",data:r()},{name:"Series 2",data:r()},{name:"Series 3",data:r()}])}(chart=new ApexCharts(document.querySelector("#radar-multiple-series"),options)).render();

View File

@ -0,0 +1 @@
var colors=["#39afd1"],dataColors=$("#basic-radialbar").data("colors"),options={chart:{height:320,type:"radialBar"},plotOptions:{radialBar:{hollow:{size:"70%"},track:{background:"rgba(170,184,197, 0.2)"}}},colors:colors=dataColors?dataColors.split(","):colors,series:[70],labels:["CRICKET"]},chart=new ApexCharts(document.querySelector("#basic-radialbar"),options),colors=(chart.render(),["#6c757d","#ffbc00","#3e60d5","#47ad77"]),dataColors=$("#multiple-radialbar").data("colors"),options={chart:{height:320,type:"radialBar"},plotOptions:{circle:{dataLabels:{showOn:"hover"}},radialBar:{track:{background:"rgba(170,184,197, 0.2)"}}},colors:colors=dataColors?dataColors.split(","):colors,series:[44,55,67,83],labels:["Apples","Oranges","Bananas","Berries"],responsive:[{breakpoint:380,options:{chart:{height:260}}}]},colors=((chart=new ApexCharts(document.querySelector("#multiple-radialbar"),options)).render(),["#47ad77","#3e60d5"]),dataColors=$("#circle-angle-radial").data("colors"),options={chart:{height:380,type:"radialBar"},plotOptions:{radialBar:{offsetY:-30,startAngle:0,endAngle:270,hollow:{margin:5,size:"30%",background:"transparent",image:void 0},track:{background:"rgba(170,184,197, 0.2)"},dataLabels:{name:{show:!1},value:{show:!1}}}},colors:colors=dataColors?dataColors.split(","):colors,series:[76,67,61,90],labels:["Vimeo","Messenger","Facebook","LinkedIn"],legend:{show:!0,floating:!0,fontSize:"13px",position:"left",offsetX:10,offsetY:10,labels:{useSeriesColors:!0},markers:{size:0},formatter:function(a,o){return a+": "+o.w.globals.series[o.seriesIndex]},itemMargin:{horizontal:1}},responsive:[{breakpoint:480,options:{legend:{show:!1}}}]},options=((chart=new ApexCharts(document.querySelector("#circle-angle-radial"),options)).render(),{chart:{height:360,type:"radialBar"},fill:{type:"image",image:{src:["assets/images/small/small-2.jpg"]}},plotOptions:{radialBar:{hollow:{size:"70%"}}},series:[70],stroke:{lineCap:"round"},labels:["Volatility"],responsive:[{breakpoint:380,options:{chart:{height:280}}}]}),colors=((chart=new ApexCharts(document.querySelector("#image-radial"),options)).render(),["#3e60d5"]),dataColors=$("#stroked-guage-radial").data("colors"),options={chart:{height:380,type:"radialBar"},plotOptions:{radialBar:{startAngle:-135,endAngle:135,dataLabels:{name:{fontSize:"16px",color:void 0,offsetY:120},value:{offsetY:76,fontSize:"22px",color:void 0,formatter:function(a){return a+"%"}}},track:{background:"rgba(170,184,197, 0.2)",margin:0}}},fill:{gradient:{enabled:!0,shade:"dark",shadeIntensity:.2,inverseColors:!1,opacityFrom:1,opacityTo:1,stops:[0,50,65,91]}},stroke:{dashArray:4},colors:colors=dataColors?dataColors.split(","):colors,series:[67],labels:["Median Ratio"],responsive:[{breakpoint:380,options:{chart:{height:280}}}]},colors=((chart=new ApexCharts(document.querySelector("#stroked-guage-radial"),options)).render(),["#8f75da","#3e60d5"]),dataColors=$("#gradient-chart").data("colors"),options={chart:{height:330,type:"radialBar",toolbar:{show:!0}},plotOptions:{radialBar:{startAngle:-135,endAngle:225,hollow:{margin:0,size:"70%",background:"transparent",image:void 0,imageOffsetX:0,imageOffsetY:0,position:"front",dropShadow:{enabled:!0,top:3,left:0,blur:4,opacity:.24}},track:{background:"rgba(170,184,197, 0.2)",strokeWidth:"67%",margin:0},dataLabels:{showOn:"always",name:{offsetY:-10,show:!0,color:"#888",fontSize:"17px"},value:{formatter:function(a){return parseInt(a)},color:"#111",fontSize:"36px",show:!0}}}},fill:{type:"gradient",gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:colors=dataColors?dataColors.split(","):colors,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,100]}},series:[75],stroke:{lineCap:"round"},labels:["Percent"]},colors=((chart=new ApexCharts(document.querySelector("#gradient-chart"),options)).render(),["#8f75da","#3e60d5"]),dataColors=$("#gradient-chart").data("colors"),options={series:[76],chart:{type:"radialBar",offsetY:-20,sparkline:{enabled:!0}},plotOptions:{radialBar:{startAngle:-90,endAngle:90,track:{background:"rgba(170,184,197, 0.2)",strokeWidth:"97%",margin:5,dropShadow:{top:2,left:0,color:"#eef2f7",opacity:1,blur:2}},dataLabels:{name:{show:!1},value:{offsetY:-2,fontSize:"22px"}}}},grid:{padding:{top:-10}},colors:colors=dataColors?dataColors.split(","):colors,labels:["Average Results"]};(chart=new ApexCharts(document.querySelector("#semi-circle-gauge"),options)).render();

View File

@ -0,0 +1 @@
var colors=["#3e60d5","#47ad77","#fa5c7c"],dataColors=$("#basic-scatter").data("colors"),options={chart:{height:380,type:"scatter",zoom:{enabled:!1}},series:[{name:"Sample A",data:[[16.4,5.4],[21.7,2],[25.4,3],[19,2],[10.9,1],[13.6,3.2],[10.9,7.4],[10.9,0],[10.9,8.2],[16.4,0],[16.4,1.8],[13.6,.3],[13.6,0],[29.9,0],[27.1,2.3],[16.4,0],[13.6,3.7],[10.9,5.2],[16.4,6.5],[10.9,0],[24.5,7.1],[10.9,0],[8.1,4.7],[19,0],[21.7,1.8],[27.1,0],[24.5,0],[27.1,0],[29.9,1.5],[27.1,.8],[22.1,2]]},{name:"Sample B",data:[[6.4,13.4],[1.7,11],[5.4,8],[9,17],[1.9,4],[3.6,12.2],[1.9,14.4],[1.9,9],[1.9,13.2],[1.4,7],[6.4,8.8],[3.6,4.3],[1.6,10],[9.9,2],[7.1,15],[1.4,0],[3.6,13.7],[1.9,15.2],[6.4,16.5],[.9,10],[4.5,17.1],[10.9,10],[.1,14.7],[9,10],[12.7,11.8],[2.1,10],[2.5,10],[27.1,10],[2.9,11.5],[7.1,10.8],[2.1,12]]},{name:"Sample C",data:[[21.7,3],[23.6,3.5],[24.6,3],[29.9,3],[21.7,20],[23,2],[10.9,3],[28,4],[27.1,.3],[16.4,4],[13.6,0],[19,5],[22.4,3],[24.5,3],[32.6,3],[27.1,4],[29.6,6],[31.6,8],[21.6,5],[20.9,4],[22.4,0],[32.6,10.3],[29.7,20.8],[24.5,.8],[21.4,0],[21.7,6.9],[28.6,7.7],[15.4,0],[18.1,0],[33.4,0],[16.4,0]]}],xaxis:{tickAmount:10},yaxis:{tickAmount:7},colors:colors=dataColors?dataColors.split(","):colors,grid:{borderColor:"#f1f3fa",padding:{bottom:5}},legend:{offsetY:7},responsive:[{breakpoint:600,options:{chart:{toolbar:{show:!1}},legend:{show:!1}}}]},chart=new ApexCharts(document.querySelector("#basic-scatter"),options),colors=(chart.render(),["#39afd1","#47ad77","#e3eaef","#6c757d","#ffbc00"]),options=((dataColors=$("#datetime-scatter").data("colors"))&&(colors=dataColors.split(",")),{chart:{height:380,type:"scatter",zoom:{type:"xy"}},series:[{name:"Team 1",data:generateDayWiseTimeSeries(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})},{name:"Team 2",data:generateDayWiseTimeSeries(new Date("11 Feb 2017 GMT").getTime(),20,{min:10,max:60})},{name:"Team 3",data:generateDayWiseTimeSeries(new Date("11 Feb 2017 GMT").getTime(),30,{min:10,max:60})},{name:"Team 4",data:generateDayWiseTimeSeries(new Date("11 Feb 2017 GMT").getTime(),10,{min:10,max:60})},{name:"Team 5",data:generateDayWiseTimeSeries(new Date("11 Feb 2017 GMT").getTime(),30,{min:10,max:60})}],dataLabels:{enabled:!1},colors:colors,grid:{borderColor:"#f1f3fa",padding:{bottom:5},xaxis:{showLines:!0},yaxis:{showLines:!0}},legend:{offsetY:10},xaxis:{type:"datetime"},yaxis:{max:70},responsive:[{breakpoint:600,options:{chart:{toolbar:{show:!1}},legend:{show:!1}}}]});function generateDayWiseTimeSeries(e,a,t){for(var s=0,o=[];s<a;){var r=Math.floor(Math.random()*(t.max-t.min+1))+t.min;o.push([e,r]),e+=864e5,s++}return o}(chart=new ApexCharts(document.querySelector("#datetime-scatter"),options)).render();colors=["#056BF6","#D2376A"],dataColors=$("#scatter-images").data("colors"),options={chart:{height:380,type:"scatter",animations:{enabled:!1},zoom:{enabled:!1},toolbar:{show:!1}},colors:colors=dataColors?dataColors.split(","):colors,series:[{name:"Messenger",data:[[16.4,5.4],[21.7,4],[25.4,3],[19,2],[10.9,1],[13.6,3.2],[10.9,7],[10.9,8.2],[16.4,4],[13.6,4.3],[13.6,12],[29.9,3],[10.9,5.2],[16.4,6.5],[10.9,8],[24.5,7.1],[10.9,7],[8.1,4.7],[19,10],[27.1,10],[24.5,8],[27.1,3],[29.9,11.5],[27.1,.8],[22.1,2]]},{name:"Instagram",data:[[6.4,5.4],[11.7,4],[15.4,3],[9,2],[10.9,11],[20.9,7],[12.9,8.2],[6.4,14],[11.6,12]]}],xaxis:{tickAmount:10,min:0,max:40},yaxis:{tickAmount:7},markers:{size:20},fill:{type:"image",opacity:1,image:{src:["assets/images/brands/messenger.png","assets/images/brands/instagram.png"],width:40,height:40}},legend:{labels:{useSeriesColors:!0},offsetY:7}};(chart=new ApexCharts(document.querySelector("#scatter-images"),options)).render();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
var colors=["#3e60d5","#47ad77","#fa5c7c"],dataColors=$("#basic-treemap").data("colors"),options={series:[{data:[{x:"New Delhi",y:218},{x:"Kolkata",y:149},{x:"Mumbai",y:184},{x:"Ahmedabad",y:55},{x:"Bangaluru",y:84},{x:"Pune",y:31},{x:"Chennai",y:70},{x:"Jaipur",y:30},{x:"Surat",y:44},{x:"Hyderabad",y:68},{x:"Lucknow",y:28},{x:"Indore",y:19},{x:"Kanpur",y:29}]}],colors:colors=dataColors?dataColors.split(","):colors,legend:{show:!1},chart:{height:350,type:"treemap"},title:{text:"Basic Treemap",align:"center"}},chart=new ApexCharts(document.querySelector("#basic-treemap"),options),colors=(chart.render(),["#3e60d5","#47ad77","#fa5c7c"]),dataColors=$("#multiple-treemap").data("colors"),options={series:[{name:"Desktops",data:[{x:"ABC",y:10},{x:"DEF",y:60},{x:"XYZ",y:41}]},{name:"Mobile",data:[{x:"ABCD",y:10},{x:"DEFG",y:20},{x:"WXYZ",y:51},{x:"PQR",y:30},{x:"MNO",y:20},{x:"CDE",y:30}]}],legend:{show:!1},chart:{height:350,type:"treemap"},colors:colors=dataColors?dataColors.split(","):colors,title:{text:"Multi-dimensional Treemap",align:"center"}},colors=((chart=new ApexCharts(document.querySelector("#multiple-treemap"),options)).render(),["#3e60d5","#47ad77","#fa5c7c"]),dataColors=$("#distributed-treemap").data("colors"),options={series:[{data:[{x:"New Delhi",y:218},{x:"Kolkata",y:149},{x:"Mumbai",y:184},{x:"Ahmedabad",y:55},{x:"Bangaluru",y:84},{x:"Pune",y:31},{x:"Chennai",y:70},{x:"Jaipur",y:30},{x:"Surat",y:44},{x:"Hyderabad",y:68},{x:"Lucknow",y:28},{x:"Indore",y:19},{x:"Kanpur",y:29}]}],legend:{show:!1},chart:{height:350,type:"treemap"},title:{text:"Distibuted Treemap (different color for each cell)",align:"center"},colors:colors=dataColors?dataColors.split(","):colors,plotOptions:{treemap:{distributed:!0,enableShades:!1}}},colors=((chart=new ApexCharts(document.querySelector("#distributed-treemap"),options)).render(),["#3e60d5","#47ad77","#fa5c7c"]),dataColors=$("#color-range-treemap").data("colors"),options={series:[{data:[{x:"INTC",y:1.2},{x:"GS",y:.4},{x:"CVX",y:-1.4},{x:"GE",y:2.7},{x:"CAT",y:-.3},{x:"RTX",y:5.1},{x:"CSCO",y:-2.3},{x:"JNJ",y:2.1},{x:"PG",y:.3},{x:"TRV",y:.12},{x:"MMM",y:-2.31},{x:"NKE",y:3.98},{x:"IYT",y:1.67}]}],legend:{show:!1},chart:{height:350,type:"treemap"},title:{text:"Treemap with Color scale",align:"center"},dataLabels:{enabled:!0,style:{fontSize:"12px"},formatter:function(e,a){return[e,a.value]},offsetY:-4},plotOptions:{treemap:{enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!0,colorScale:{ranges:[{from:-6,to:0,color:(colors=dataColors?dataColors.split(","):colors)[0]},{from:.001,to:6,color:colors[1]}]}}}};(chart=new ApexCharts(document.querySelector("#color-range-treemap"),options)).render();

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(l){"use strict";function e(){this.$body=l("body"),this.$modal=new bootstrap.Modal(document.getElementById("event-modal"),{backdrop:"static"}),this.$calendar=l("#calendar"),this.$formEvent=l("#form-event"),this.$btnNewEvent=l("#btn-new-event"),this.$btnDeleteEvent=l("#btn-delete-event"),this.$btnSaveEvent=l("#btn-save-event"),this.$modalTitle=l("#modal-title"),this.$calendarObj=null,this.$selectedEvent=null,this.$newEventData=null}e.prototype.onEventClick=function(e){this.$formEvent[0].reset(),this.$formEvent.removeClass("was-validated"),this.$newEventData=null,this.$btnDeleteEvent.show(),this.$modalTitle.text("Edit Event"),this.$modal.show(),this.$selectedEvent=e.event,l("#event-title").val(this.$selectedEvent.title),l("#event-category").val(this.$selectedEvent.classNames[0])},e.prototype.onSelect=function(e){this.$formEvent[0].reset(),this.$formEvent.removeClass("was-validated"),this.$selectedEvent=null,this.$newEventData=e,this.$btnDeleteEvent.hide(),this.$modalTitle.text("Add New Event"),this.$modal.show(),this.$calendarObj.unselect()},e.prototype.init=function(){var e=new Date(l.now()),e=(new FullCalendar.Draggable(document.getElementById("external-events"),{itemSelector:".external-event",eventData:function(e){return{title:e.innerText,className:l(e).data("class")}}}),[{title:"Meeting with Mr. Shreyu",start:new Date(l.now()+158e6),end:new Date(l.now()+338e6),className:"bg-warning"},{title:"Interview - Backend Engineer",start:e,end:e,className:"bg-success"},{title:"Phone Screen - Frontend Engineer",start:new Date(l.now()+168e6),className:"bg-info"},{title:"Buy Design Assets",start:new Date(l.now()+338e6),end:new Date(l.now()+4056e5),className:"bg-primary"}]),a=this;a.$calendarObj=new FullCalendar.Calendar(a.$calendar[0],{slotDuration:"00:15:00",slotMinTime:"08:00:00",slotMaxTime:"19:00:00",themeSystem:"bootstrap",bootstrapFontAwesome:!1,buttonText:{today:"Today",month:"Month",week:"Week",day:"Day",list:"List",prev:"Prev",next:"Next"},initialView:"dayGridMonth",handleWindowResize:!0,height:l(window).height()-200,headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay,listMonth"},initialEvents:e,editable:!0,droppable:!0,selectable:!0,dateClick:function(e){a.onSelect(e)},eventClick:function(e){a.onEventClick(e)}}),a.$calendarObj.render(),a.$btnNewEvent.on("click",function(e){a.onSelect({date:new Date,allDay:!0})}),a.$formEvent.on("submit",function(e){e.preventDefault();var t,n=a.$formEvent[0];n.checkValidity()?(a.$selectedEvent?(a.$selectedEvent.setProp("title",l("#event-title").val()),a.$selectedEvent.setProp("classNames",[l("#event-category").val()])):(t={title:l("#event-title").val(),start:a.$newEventData.date,allDay:a.$newEventData.allDay,className:l("#event-category").val()},a.$calendarObj.addEvent(t)),a.$modal.hide()):(e.stopPropagation(),n.classList.add("was-validated"))}),l(a.$btnDeleteEvent.on("click",function(e){a.$selectedEvent&&(a.$selectedEvent.remove(),a.$selectedEvent=null,a.$modal.hide())}))},l.CalendarApp=new e,l.CalendarApp.Constructor=e}(window.jQuery),function(){"use strict";window.jQuery.CalendarApp.init()}();

Some files were not shown because too many files have changed in this diff Show More