@opengis/admin 0.1.96 → 0.1.97
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +29 -29
- package/config.js +4 -4
- package/dist/{IconChevronDown-uM7Af3-i.js → IconChevronDown-C6C2qgO7.js} +1 -1
- package/dist/{add-page-BgPkyqnr.js → add-page-Bz9AriTG.js} +14 -18
- package/dist/{admin-interface-x__pW8O9.js → admin-interface-QcGlLoY3.js} +5 -6
- package/dist/{admin-view-CApDgTHa.js → admin-view-AjnQFK-4.js} +148 -153
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +55 -55
- package/dist/assets/logo.svg +41 -41
- package/dist/{card-view-CUEAR-Gl.js → card-view-BFYrLzFg.js} +1 -1
- package/dist/{edit-page-Xu43ZBzj.js → edit-page-BlHpTvcw.js} +1 -1
- package/dist/{import-file-CLrvcYj9.js → import-file-2vpw3792.js} +5171 -5242
- package/dist/style.css +1 -1
- package/module/settings/card/admin.roles.table/access.hbs +27 -24
- package/module/settings/card/admin.roles.table/general_info.hbs +16 -16
- package/module/settings/card/admin.roles.table/index.yml +14 -18
- package/module/settings/card/admin.roles.table/users.hbs +27 -27
- package/module/settings/card/admin.routes.table/general_info.hbs +40 -40
- package/module/settings/card/admin.routes.table/index.yml +8 -8
- package/module/settings/card/admin.routes.table/users.hbs +33 -33
- package/module/settings/card/admin.users.table/general_info.hbs +25 -25
- package/module/settings/card/admin.users.table/index.yml +12 -12
- package/module/settings/card/admin.users.table/logs.hbs +30 -30
- package/module/settings/card/admin.users.table/user_roles.hbs +24 -24
- package/module/settings/cls/core.actions.json +17 -17
- package/module/settings/cls/core.scope.json +13 -13
- package/module/settings/cls/properties.site_status.json +13 -13
- package/module/settings/cls/properties.widget_status.json +13 -13
- package/module/settings/cls/users.user_type.json +13 -13
- package/module/settings/form/admin.access.form.json +36 -36
- package/module/settings/form/admin.custom_column.form.json +71 -71
- package/module/settings/form/admin.properties.form.json +15 -15
- package/module/settings/form/admin.roles.form.json +19 -21
- package/module/settings/form/admin.routes.form.json +25 -25
- package/module/settings/form/admin.user_properties.form.json +15 -15
- package/module/settings/form/admin.user_roles.form.json +21 -21
- package/module/settings/form/admin.users.form.json +153 -153
- package/module/settings/form/user.user_roles.form.json +13 -13
- package/module/settings/interface/admin.properties.json +4 -4
- package/module/settings/interface/admin.roles.json +4 -4
- package/module/settings/interface/admin.routes.json +4 -4
- package/module/settings/interface/admin.users.json +4 -4
- package/module/settings/menu.json +50 -60
- package/module/settings/select/core.roles.json +2 -2
- package/module/settings/select/core.routes.sql +1 -1
- package/module/settings/select/core.user_mentioned.sql +1 -1
- package/module/settings/select/core.user_uid.sql +1 -1
- package/module/settings/table/admin.access.table.json +83 -83
- package/module/settings/table/admin.custom_column.table.json +99 -99
- package/module/settings/table/admin.properties.table.json +39 -39
- package/module/settings/table/admin.roles.table.json +64 -64
- package/module/settings/table/admin.routes.table.json +68 -68
- package/module/settings/table/admin.user_properties.table.json +34 -34
- package/module/settings/table/admin.user_roles.table.json +72 -72
- package/module/settings/table/admin.users.table.json +121 -121
- package/package.json +82 -82
- package/plugin.js +29 -29
- package/server/helpers/controllers/badge.js +12 -0
- package/server/helpers/controllers/hb.js +3 -0
- package/server/helpers/controllers/map.js +3 -0
- package/server/helpers/controllers/mls.js +3 -0
- package/server/helpers/{core → controllers}/token.js +16 -16
- package/server/helpers/controllers/vue.js +3 -0
- package/server/helpers/index.mjs +29 -0
- package/server/helpers/list/buttonHelper.js +10 -10
- package/server/helpers/list/descriptionList.js +34 -43
- package/server/helpers/list/tableList.js +65 -78
- package/server/helpers/list/utils/button.js +5 -5
- package/server/plugins/access/funcs/getAdminAccess.js +14 -12
- package/server/plugins/access/index.mjs +6 -6
- package/server/plugins/adminHook.js +81 -81
- package/server/plugins/cron.js +10 -10
- package/server/plugins/docs.js +28 -28
- package/server/plugins/hook.js +226 -226
- package/server/plugins/vite.js +71 -71
- package/server/routes/access/controllers/access.group.js +29 -29
- package/server/routes/access/controllers/access.group.post.js +43 -48
- package/server/routes/access/index.mjs +63 -8
- package/server/routes/calendar/controllers/calendar.data.js +87 -87
- package/server/routes/calendar/index.mjs +7 -7
- package/server/routes/calendar/schema.js +21 -21
- package/server/routes/data/controllers/cardData.js +89 -89
- package/server/routes/data/controllers/cardTabData.js +49 -49
- package/server/routes/data/controllers/funcs/getFilterSQL/index.js +92 -92
- package/server/routes/data/controllers/funcs/getFilterSQL/util/formatValue.js +170 -170
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getCustomQuery.js +13 -13
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getFilterQuery.js +64 -64
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getOptimizedQuery.js +12 -12
- package/server/routes/data/controllers/funcs/getFilterSQL/util/getTableSql.js +34 -34
- package/server/routes/data/controllers/tableData.js +20 -20
- package/server/routes/data/controllers/tableDataId.js +27 -27
- package/server/routes/data/controllers/tableFilter.js +67 -67
- package/server/routes/data/controllers/tokenInfo.js +9 -9
- package/server/routes/data/controllers/utils/assignTokens.js +30 -30
- package/server/routes/data/controllers/utils/conditions.js +20 -20
- package/server/routes/data/controllers/utils/getColumns.js +8 -8
- package/server/routes/data/index.mjs +17 -17
- package/server/routes/data/schema.js +54 -54
- package/server/routes/menu/controllers/getMenu.js +67 -67
- package/server/routes/menu/index.mjs +5 -5
- package/server/routes/notifications/controllers/readNotifications.js +27 -27
- package/server/routes/notifications/controllers/testEmail.js +35 -35
- package/server/routes/notifications/controllers/userNotifications.js +53 -53
- package/server/routes/notifications/funcs/addNotification.js +21 -21
- package/server/routes/notifications/funcs/sendNotification.js +92 -92
- package/server/routes/notifications/hook/onWidgetSet.js +57 -57
- package/server/routes/notifications/index.mjs +27 -27
- package/server/routes/notifications/schema.js +16 -16
- package/server/routes/properties/controllers/admin.properties.get.js +29 -29
- package/server/routes/properties/controllers/user.properties.get.js +30 -30
- package/server/routes/properties/controllers/user.properties.post.js +30 -30
- package/server/routes/properties/funcs/getSettings.js +56 -56
- package/server/routes/properties/funcs/setSettings.js +44 -44
- package/server/routes/properties/funcs/utils/dataInsert.js +26 -26
- package/server/routes/properties/index.mjs +14 -14
- package/server/routes/properties/schema.js +10 -10
- package/server/routes/root.mjs +3 -3
- package/server/routes/templates/controllers/getTemplate.js +26 -26
- package/server/routes/templates/index.mjs +16 -16
- package/server/routes/templates/schema.js +8 -8
- package/server/routes/user/controllers/user.cls.id.js +14 -14
- package/server/routes/user/controllers/user.cls.js +71 -71
- package/server/routes/user/controllers/user.cls.post.js +52 -52
- package/server/routes/user/controllers/user.info.js +17 -17
- package/server/routes/user/schema.js +14 -14
- package/server/routes/widget/controllers/utils/historyFormat.js +75 -75
- package/server/routes/widget/controllers/utils/obj2db.js +13 -13
- package/server/routes/widget/controllers/widget.del.js +41 -41
- package/server/routes/widget/controllers/widget.get.js +96 -96
- package/server/routes/widget/controllers/widget.set.js +76 -76
- package/server/routes/widget/index.mjs +11 -11
- package/server/routes/widget/schema.js +12 -12
- package/server/templates/cls/itree.recrzone_category.json +73 -73
- package/server/templates/cls/test.json +9 -9
- package/server/templates/form/admin.user_cls.data.form.json +49 -49
- package/server/templates/form/admin.user_group_rel.form.json +21 -21
- package/server/templates/form/cp_building.form.json +32 -32
- package/server/templates/form/form-user-pass.json +10 -10
- package/server/templates/form/form-user_group.json +39 -39
- package/server/templates/form/form-users.json +156 -156
- package/server/templates/form/user_group_access.form.json +22 -22
- package/server/templates/select/account_id.json +2 -2
- package/server/templates/table/gis.dataset.table.json +43 -43
- package/server/templates/table/management.user_group.table.json +112 -112
- package/server/templates/table/management.users.table.json +126 -126
- package/utils.js +29 -29
- package/server/helpers/core/badge.js +0 -16
- package/server/helpers/core/buttonHelper.js +0 -14
- package/server/helpers/core/select.js +0 -50
- package/server/helpers/index.js +0 -28
- package/server/helpers/temp/contentList.js +0 -58
- package/server/helpers/temp/ifCond.js +0 -101
- package/server/helpers/utils/button.js +0 -6
- package/server/helpers/utils/buttonDel.js +0 -6
- package/server/routes/access/schema.mjs +0 -58
@@ -1,7 +1,7 @@
|
|
1
|
-
import { _, I as
|
2
|
-
import { openBlock as
|
3
|
-
import { I as
|
4
|
-
const
|
1
|
+
import { _ as b, I as A, u as E, s as B, a as Q, b as F, c as S } from "./import-file-2vpw3792.js";
|
2
|
+
import { openBlock as n, createElementBlock as l, createElementVNode as s, createStaticVNode as q, resolveComponent as p, normalizeClass as I, createTextVNode as D, toDisplayString as Z, createVNode as d, Transition as G, withCtx as O, withDirectives as J, Fragment as N, renderList as U, vShow as K, withModifiers as P, createCommentVNode as T, createBlock as R, resolveDynamicComponent as W } from "vue";
|
3
|
+
import { I as X } from "./IconChevronDown-C6C2qgO7.js";
|
4
|
+
const Y = {}, e1 = {
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
6
6
|
viewBox: "0 0 24 24",
|
7
7
|
fill: "none",
|
@@ -11,37 +11,37 @@ const t1 = {}, o1 = {
|
|
11
11
|
"stroke-linejoin": "round",
|
12
12
|
class: "icon icon-tabler icons-tabler-outline icon-tabler-logout"
|
13
13
|
};
|
14
|
-
function
|
15
|
-
return
|
16
|
-
|
14
|
+
function t1(e, t, o, a, r, u) {
|
15
|
+
return n(), l("svg", e1, t[0] || (t[0] = [
|
16
|
+
s("path", {
|
17
17
|
stroke: "none",
|
18
18
|
d: "M0 0h24v24H0z",
|
19
19
|
fill: "none"
|
20
20
|
}, null, -1),
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
s("path", { d: "M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" }, null, -1),
|
22
|
+
s("path", { d: "M9 12h12l-3 -3" }, null, -1),
|
23
|
+
s("path", { d: "M18 15l3 -3" }, null, -1)
|
24
24
|
]));
|
25
25
|
}
|
26
|
-
const
|
26
|
+
const o1 = /* @__PURE__ */ b(Y, [["render", t1]]), r1 = {}, s1 = {
|
27
27
|
viewBox: "0 0 1823 249",
|
28
28
|
fill: "none",
|
29
29
|
xmlns: "http://www.w3.org/2000/svg"
|
30
30
|
};
|
31
|
-
function
|
32
|
-
return
|
33
|
-
|
31
|
+
function n1(e, t, o, a, r, u) {
|
32
|
+
return n(), l("svg", s1, t[0] || (t[0] = [
|
33
|
+
q('<path d="M218.88 96.05C223.55 99.19 228.69 101.56 234.09 103.07V145.42C212.05 151.54 195.83 171.79 195.83 195.75C195.83 200.22 196.41 204.65 197.53 208.94L160.92 230.08C156.82 226.06 152.08 222.73 146.91 220.24V171.62C164.83 163.13 176.59 145.06 176.59 124.48C176.59 123.17 176.54 121.86 176.44 120.56L218.88 96.05ZM220.32 79.09L160.97 113.36C162.04 116.88 162.61 120.61 162.61 124.48C162.61 142.66 149.93 157.87 132.93 161.76V230.05C143.4 232.46 152.23 239.16 157.46 248.21L215 214.99C211.7 209.34 209.81 202.77 209.81 195.75C209.81 174.62 226.94 157.49 248.07 157.49V91.02C237.14 91.02 227.29 86.43 220.32 79.09Z" fill="#CE3936"></path><path d="M161.39 19.13L197.44 39.94C196.39 44.11 195.84 48.42 195.84 52.75C195.84 54.21 195.9 55.65 196.02 57.1L153.9 81.42C145.27 75.5 134.95 72.24 124.36 72.24C113.83 72.24 103.57 75.47 94.96 81.32L52.71 56.93C52.82 55.55 52.88 54.16 52.88 52.76C52.88 48.43 52.34 44.12 51.28 39.95L87.3 19.16C96.98 28.89 110.26 34.58 124.34 34.58C138.42 34.57 151.7 28.87 161.39 19.13ZM157.77 0.919983C151.24 12.66 138.71 20.6 124.33 20.6C109.95 20.6 97.44 12.67 90.9 0.939983L33.9 33.85C37.08 39.43 38.91 45.88 38.91 52.76C38.91 56.71 38.31 60.52 37.2 64.11L96.46 98.32C103.44 90.87 113.36 86.22 124.37 86.22C135.44 86.22 145.41 90.93 152.39 98.44L211.59 64.27C210.45 60.64 209.83 56.78 209.83 52.77C209.83 45.89 211.65 39.44 214.84 33.86L157.77 0.919983Z" fill="#CE3936"></path><path d="M29.97 95.95L72.28 120.38C72.17 121.74 72.12 123.1 72.12 124.47C72.12 145.02 83.86 163.08 101.74 171.58V220.23C96.58 222.71 91.84 226.04 87.75 230.05L51.17 208.93C52.29 204.64 52.87 200.21 52.87 195.74C52.87 171.78 36.65 151.53 14.61 145.41V103.06C20.07 101.55 25.27 99.14 29.97 95.95ZM28.5 78.97C21.52 86.38 11.63 91.02 0.640015 91.02V157.49C21.77 157.49 38.9 174.62 38.9 195.75C38.9 202.77 37 209.33 33.71 214.99L91.2 248.18C96.43 239.14 105.25 232.45 115.71 230.04V161.73C98.74 157.81 86.09 142.62 86.09 124.46C86.09 120.54 86.68 116.75 87.78 113.18L28.5 78.97Z" fill="#CE3936"></path><path d="M498.39 177.5V144.88C498.39 128.55 485.11 115.27 468.78 115.27H343.22C342.69 115.27 342.18 115.32 341.67 115.4H337.19C332.35 115.4 328.42 111.46 328.42 106.63V74C328.42 69.16 332.36 65.23 337.19 65.23H486.33C492.08 65.23 496.75 60.57 496.75 54.81C496.75 49.06 492.08 44.39 486.33 44.39H337.19C320.86 44.39 307.58 57.67 307.58 74V106.62C307.58 122.95 320.86 136.23 337.19 136.23H462.75C463.28 136.23 463.79 136.18 464.3 136.1H468.78C473.62 136.1 477.55 140.04 477.55 144.87V177.49C477.55 182.33 473.61 186.26 468.78 186.26H319.64C313.89 186.26 309.22 190.92 309.22 196.68C309.22 202.43 313.89 207.1 319.64 207.1H468.78C485.11 207.11 498.39 193.83 498.39 177.5Z" fill="#CE3935"></path><path d="M710.7 177.32V75.24C710.7 58.91 697.42 45.63 681.09 45.63H550.05C533.72 45.63 520.44 58.91 520.44 75.24V177.32C520.44 193.65 533.72 206.93 550.05 206.93H681.1C697.42 206.93 710.7 193.65 710.7 177.32ZM541.27 75.24C541.27 70.4 545.21 66.47 550.04 66.47H681.09C685.93 66.47 689.86 70.41 689.86 75.24V177.32C689.86 182.16 685.92 186.09 681.09 186.09H550.05C545.21 186.09 541.28 182.15 541.28 177.32V75.24H541.27Z" fill="#CE3935"></path><path d="M1823 177.32V75.24C1823 58.91 1809.72 45.63 1793.39 45.63H1662.34C1646.01 45.63 1632.73 58.91 1632.73 75.24V177.32C1632.73 193.65 1646.01 206.93 1662.34 206.93H1793.39C1809.72 206.93 1823 193.65 1823 177.32ZM1653.57 75.24C1653.57 70.4 1657.51 66.47 1662.34 66.47H1793.39C1798.23 66.47 1802.16 70.41 1802.16 75.24V177.32C1802.16 182.16 1798.22 186.09 1793.39 186.09H1662.34C1657.5 186.09 1653.57 182.15 1653.57 177.32V75.24Z" fill="#CE3935"></path><path d="M756.76 196.51V152H849.42C855.17 152 859.84 147.34 859.84 141.58C859.84 135.83 855.17 131.16 849.42 131.16H756.76V75.23C756.76 70.39 760.7 66.46 765.53 66.46H893.29C899.04 66.46 903.71 61.8 903.71 56.04C903.71 50.29 899.04 45.62 893.29 45.62H765.53C749.2 45.62 735.92 58.9 735.92 75.23V196.5C735.92 202.25 740.59 206.92 746.34 206.92C752.09 206.93 756.76 202.27 756.76 196.51Z" fill="#CE3935"></path><path d="M933.86 66.47H1006.51V194.32C1006.51 200.07 1011.18 204.74 1016.93 204.74C1022.68 204.74 1027.35 200.07 1027.35 194.32V66.47H1100C1105.75 66.47 1110.42 61.81 1110.42 56.05C1110.42 50.3 1105.76 45.63 1100 45.63H933.86C928.11 45.63 923.44 50.29 923.44 56.05C923.45 61.81 928.11 66.47 933.86 66.47Z" fill="#CE3935"></path><path d="M1218.44 204.19C1224.19 204.19 1228.86 199.53 1228.86 193.77V152H1368.13C1384.46 152 1397.74 138.72 1397.74 122.39V75.24C1397.74 58.91 1384.46 45.63 1368.13 45.63H1237.63C1221.3 45.63 1208.02 58.91 1208.02 75.24V193.77C1208.02 199.53 1212.68 204.19 1218.44 204.19ZM1237.63 66.47H1368.13C1372.97 66.47 1376.9 70.41 1376.9 75.24V122.39C1376.9 127.23 1372.96 131.16 1368.13 131.16H1228.86V75.23C1228.86 70.41 1232.79 66.47 1237.63 66.47Z" fill="#CE3935"></path><path d="M1430.64 204.19C1436.39 204.19 1441.06 199.53 1441.06 193.77V152H1523.95C1524.57 153.18 1525.42 154.26 1526.51 155.17L1581.89 201.23C1583.83 202.85 1586.2 203.64 1588.55 203.64C1591.54 203.64 1594.5 202.36 1596.57 199.88C1600.25 195.46 1599.64 188.89 1595.22 185.21L1555.29 152H1580.33C1596.66 152 1609.94 138.72 1609.94 122.39V75.24C1609.94 58.91 1596.66 45.63 1580.33 45.63H1449.83C1433.5 45.63 1420.22 58.91 1420.22 75.24V193.77C1420.22 199.53 1424.88 204.19 1430.64 204.19ZM1449.83 66.47H1580.33C1585.17 66.47 1589.1 70.41 1589.1 75.24V122.39C1589.1 127.23 1585.17 131.16 1580.33 131.16H1441.06V75.23C1441.05 70.41 1444.99 66.47 1449.83 66.47Z" fill="#CE3935"></path>', 10)
|
34
34
|
]));
|
35
35
|
}
|
36
|
-
const
|
37
|
-
components: { IconChevronDown:
|
38
|
-
props: { route: Object
|
36
|
+
const l1 = /* @__PURE__ */ b(r1, [["render", n1]]), a1 = {
|
37
|
+
components: { IconChevronDown: X },
|
38
|
+
props: { route: Object },
|
39
39
|
mounted() {
|
40
40
|
var e, t, o;
|
41
41
|
(e = this.route) != null && e.menu && (o = (t = this.route) == null ? void 0 : t.menu) != null && o.some(
|
42
42
|
(a) => {
|
43
|
-
var r,
|
44
|
-
return (a == null ? void 0 : a.path) === this.$route.path.replace("/", "") || ((
|
43
|
+
var r, u;
|
44
|
+
return (a == null ? void 0 : a.path) === this.$route.path.replace("/", "") || ((u = (r = this.$route) == null ? void 0 : r.params) == null ? void 0 : u.table) === (a == null ? void 0 : a.table) && (a == null ? void 0 : a.table);
|
45
45
|
}
|
46
46
|
) && (this.isOpen = !0);
|
47
47
|
},
|
@@ -54,85 +54,83 @@ const c1 = /* @__PURE__ */ _(s1, [["render", a1]]), i1 = {
|
|
54
54
|
return {
|
55
55
|
isOpen: !1
|
56
56
|
};
|
57
|
-
},
|
58
|
-
methods: {
|
59
|
-
highLight(e) {
|
60
|
-
if (!this.searchable) return e;
|
61
|
-
const t = this.searchable.replace(
|
62
|
-
/[.*+?^${}()|[\]\\]/g,
|
63
|
-
"\\$&"
|
64
|
-
), o = new RegExp(`(${t})(\\s*)`, "gi");
|
65
|
-
return e.replace(
|
66
|
-
o,
|
67
|
-
(a, r, s) => `<span style="color:#1989fa;">${r}</span>${s}`
|
68
|
-
);
|
69
|
-
}
|
70
57
|
}
|
71
58
|
}, u1 = {
|
72
59
|
key: 0,
|
73
60
|
class: ""
|
74
|
-
},
|
75
|
-
function
|
76
|
-
var
|
61
|
+
}, c1 = { class: "ml-[30px] py-[6px] before:block before:absolute relative w-[196px] flex flex-col gap-[6px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer" }, i1 = { key: 1 };
|
62
|
+
function d1(e, t, o, a, r, u) {
|
63
|
+
var x, g, h, _, v, w, m, y, k, V, H, $, M;
|
77
64
|
const C = p("IconChevronDown"), f = p("router-link");
|
78
|
-
return (
|
79
|
-
|
80
|
-
onClick: t[0] || (t[0] = (
|
65
|
+
return (x = o.route) != null && x.menu ? (n(), l("div", u1, [
|
66
|
+
s("button", {
|
67
|
+
onClick: t[0] || (t[0] = (i) => r.isOpen = !r.isOpen),
|
81
68
|
class: I(["flex items-center justify-start w-full px-3 py-2 text-sm text-left text-gray-800 duration-300 border-none rounded-lg cursor-pointer gap-x-3 focus:outline-none hover:bg-gray-100", [
|
82
|
-
((h = (
|
83
|
-
(
|
84
|
-
var
|
85
|
-
return (
|
69
|
+
((h = (g = o.route) == null ? void 0 : g.menu) == null ? void 0 : h.some(
|
70
|
+
(i) => {
|
71
|
+
var c, L;
|
72
|
+
return (i == null ? void 0 : i.path) === e.$route.path.replace("/", "") || (i == null ? void 0 : i.table) === ((L = (c = e.$route) == null ? void 0 : c.params) == null ? void 0 : L.table) && (i == null ? void 0 : i.table);
|
86
73
|
}
|
87
74
|
)) && "bg-gray-100"
|
88
75
|
]])
|
89
76
|
}, [
|
90
|
-
|
91
|
-
|
77
|
+
D(Z((_ = o.route) == null ? void 0 : _.ua) + " ", 1),
|
78
|
+
d(C, {
|
92
79
|
class: I([[r.isOpen && "-rotate-180"], "ml-auto duration-300"]),
|
93
80
|
width: "14",
|
94
81
|
height: "14"
|
95
82
|
}, null, 8, ["class"])
|
96
83
|
], 2),
|
97
|
-
|
98
|
-
default:
|
99
|
-
var
|
84
|
+
d(G, { name: "fade" }, {
|
85
|
+
default: O(() => {
|
86
|
+
var i;
|
100
87
|
return [
|
101
|
-
|
102
|
-
(
|
103
|
-
var
|
104
|
-
return
|
88
|
+
J(s("ul", c1, [
|
89
|
+
(n(!0), l(N, null, U((i = o.route) == null ? void 0 : i.menu, (c, L) => {
|
90
|
+
var z, j;
|
91
|
+
return n(), l("li", {
|
105
92
|
key: L,
|
106
93
|
class: "w-full"
|
107
94
|
}, [
|
108
|
-
|
109
|
-
|
110
|
-
to: "/" + (i == null ? void 0 : i.path),
|
95
|
+
d(f, {
|
96
|
+
to: "/" + (c == null ? void 0 : c.path),
|
111
97
|
class: I([[
|
112
|
-
((
|
113
|
-
], "
|
114
|
-
},
|
98
|
+
((c == null ? void 0 : c.path) === e.$route.path.replace("/", "") || ((j = (z = e.$route) == null ? void 0 : z.params) == null ? void 0 : j.table) === (c == null ? void 0 : c.table) && (c == null ? void 0 : c.table)) && "bg-gray-100"
|
99
|
+
], "flex px-3 py-2 text-sm text-gray-800 rounded-lg gap-x-4 hover:bg-gray-100 focus:outline-none focus:bg-gray-100"])
|
100
|
+
}, {
|
101
|
+
default: O(() => [
|
102
|
+
D(Z(c == null ? void 0 : c.ua), 1)
|
103
|
+
]),
|
104
|
+
_: 2
|
105
|
+
}, 1032, ["to", "class"])
|
115
106
|
]);
|
116
107
|
}), 128))
|
117
108
|
], 512), [
|
118
|
-
[
|
109
|
+
[K, r.isOpen]
|
119
110
|
])
|
120
111
|
];
|
121
112
|
}),
|
122
113
|
_: 1
|
123
114
|
})
|
124
|
-
])) : (
|
125
|
-
|
126
|
-
|
127
|
-
to: ((y = (m = o.route) == null ? void 0 : m.path) == null ? void 0 : y[0]) === "/" ? (k = o.route) == null ? void 0 : k.path : "/" + ((V = o.route) == null ? void 0 : V.path),
|
115
|
+
])) : (n(), l("div", i1, [
|
116
|
+
d(f, {
|
117
|
+
to: ((w = (v = o.route) == null ? void 0 : v.path) == null ? void 0 : w[0]) === "/" ? (m = o.route) == null ? void 0 : m.path : "/" + ((y = o.route) == null ? void 0 : y.path),
|
128
118
|
class: I([[
|
129
|
-
(((
|
130
|
-
], "
|
131
|
-
},
|
119
|
+
(((k = o.route) == null ? void 0 : k.path.replace("/", "")) === e.$route.path.replace("/", "") || ((H = (V = e.$route) == null ? void 0 : V.params) == null ? void 0 : H.table) === (($ = o.route) == null ? void 0 : $.table) && ((M = o.route) == null ? void 0 : M.table)) && "bg-gray-100"
|
120
|
+
], "flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])
|
121
|
+
}, {
|
122
|
+
default: O(() => {
|
123
|
+
var i;
|
124
|
+
return [
|
125
|
+
D(Z((i = o.route) == null ? void 0 : i.ua), 1)
|
126
|
+
];
|
127
|
+
}),
|
128
|
+
_: 1
|
129
|
+
}, 8, ["to", "class"])
|
132
130
|
]));
|
133
131
|
}
|
134
|
-
const
|
135
|
-
components: { IconLogout:
|
132
|
+
const p1 = /* @__PURE__ */ b(a1, [["render", d1]]), h1 = {
|
133
|
+
components: { IconLogout: o1, NavbarItem: p1, IconLogo: l1, IconSearch: A },
|
136
134
|
data() {
|
137
135
|
return {
|
138
136
|
activeIndex: null,
|
@@ -142,11 +140,11 @@ const f1 = /* @__PURE__ */ _(i1, [["render", h1]]), C1 = {
|
|
142
140
|
computed: {
|
143
141
|
data() {
|
144
142
|
var e;
|
145
|
-
return (e = this.searchValue) != null && e.trim() ? this.filterMenu(
|
143
|
+
return (e = this.searchValue) != null && e.trim() ? this.filterMenu(E.value, this.searchValue) : E.value;
|
146
144
|
},
|
147
145
|
logo() {
|
148
146
|
var e;
|
149
|
-
return ((e =
|
147
|
+
return ((e = B.value) == null ? void 0 : e.logo) || "/assets/logo.svg";
|
150
148
|
}
|
151
149
|
},
|
152
150
|
methods: {
|
@@ -154,39 +152,39 @@ const f1 = /* @__PURE__ */ _(i1, [["render", h1]]), C1 = {
|
|
154
152
|
return e.map((o) => {
|
155
153
|
var a, r;
|
156
154
|
if (o.menu) {
|
157
|
-
const
|
158
|
-
if (
|
159
|
-
return { ...o, menu:
|
155
|
+
const u = this.filterMenu(o.menu, t);
|
156
|
+
if (u.length > 0)
|
157
|
+
return { ...o, menu: u, open: !0 };
|
160
158
|
} else if ((r = (a = o.ua) == null ? void 0 : a.toLowerCase()) != null && r.includes(t.toLowerCase()))
|
161
159
|
return o;
|
162
160
|
return null;
|
163
161
|
}).filter(Boolean);
|
164
162
|
}
|
165
163
|
}
|
166
|
-
},
|
164
|
+
}, f1 = { class: "flex flex-col h-[100vh] border-r w-[260px] shrink-0" }, C1 = ["src"], x1 = { class: "relative" }, g1 = { class: "p-[16px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" }, _1 = { class: "flex flex-col flex-wrap w-full pb-3" }, b1 = {
|
167
165
|
key: 0,
|
168
166
|
class: "flex flex-col gap-[6px]"
|
169
|
-
},
|
167
|
+
}, v1 = {
|
170
168
|
key: 1,
|
171
169
|
class: "text-gray-800 text-lg mt-[20px]"
|
172
170
|
};
|
173
|
-
function
|
174
|
-
var
|
175
|
-
const C = p("IconSearch"), f = p("VsText"),
|
176
|
-
return
|
177
|
-
|
178
|
-
src:
|
171
|
+
function w1(e, t, o, a, r, u) {
|
172
|
+
var g;
|
173
|
+
const C = p("IconSearch"), f = p("VsText"), x = p("NavbarItem");
|
174
|
+
return n(), l("div", f1, [
|
175
|
+
s("img", {
|
176
|
+
src: u.logo,
|
179
177
|
height: "40",
|
180
178
|
width: "200",
|
181
179
|
class: "my-[20px] ml-[20px]"
|
182
|
-
}, null, 8,
|
183
|
-
|
184
|
-
|
180
|
+
}, null, 8, C1),
|
181
|
+
s("div", x1, [
|
182
|
+
d(C, {
|
185
183
|
height: "16",
|
186
184
|
width: "16",
|
187
185
|
class: "absolute top-[12px] left-[30px] text-gray-500 z-[1]"
|
188
186
|
}),
|
189
|
-
|
187
|
+
d(f, {
|
190
188
|
type: "text",
|
191
189
|
modelValue: r.searchValue,
|
192
190
|
"onUpdate:modelValue": t[0] || (t[0] = (h) => r.searchValue = h),
|
@@ -195,24 +193,21 @@ function y1(e, t, o, a, r, s) {
|
|
195
193
|
class: "[&>input]:h-[40px] [&>input]:block [&>input]:rounded-none [&>input]:border-x-0 [&>input]:pl-[60px] [&>input:focus]:outline-none [&>input:focus]:focus:ring-0 [&>input:focus]:border-y-gray-200 [&>input:focus]:border-y-1 [&>input:focus]:border-x-0"
|
196
194
|
}, null, 8, ["modelValue"])
|
197
195
|
]),
|
198
|
-
|
199
|
-
|
200
|
-
(
|
201
|
-
(
|
202
|
-
key:
|
196
|
+
s("div", g1, [
|
197
|
+
s("nav", _1, [
|
198
|
+
(g = u.data) != null && g.length ? (n(), l("ul", b1, [
|
199
|
+
(n(!0), l(N, null, U(u.data, (h, _) => (n(), l("li", {
|
200
|
+
key: _,
|
203
201
|
class: "flex flex-col gap-[6px]"
|
204
202
|
}, [
|
205
|
-
|
206
|
-
route: h,
|
207
|
-
searchable: r.searchValue
|
208
|
-
}, null, 8, ["route", "searchable"])
|
203
|
+
d(x, { route: h }, null, 8, ["route"])
|
209
204
|
]))), 128))
|
210
|
-
])) : (
|
205
|
+
])) : (n(), l("div", v1, "Не знайдено"))
|
211
206
|
])
|
212
207
|
])
|
213
208
|
]);
|
214
209
|
}
|
215
|
-
const
|
210
|
+
const m1 = /* @__PURE__ */ b(h1, [["render", w1]]), y1 = {}, k1 = {
|
216
211
|
class: "flex-shrink-0 size-4",
|
217
212
|
xmlns: "http://www.w3.org/2000/svg",
|
218
213
|
viewBox: "0 0 24 24",
|
@@ -222,19 +217,19 @@ const k1 = /* @__PURE__ */ _(C1, [["render", y1]]), V1 = {}, H1 = {
|
|
222
217
|
"stroke-linecap": "round",
|
223
218
|
"stroke-linejoin": "round"
|
224
219
|
};
|
225
|
-
function
|
226
|
-
return
|
227
|
-
|
220
|
+
function V1(e, t, o, a, r, u) {
|
221
|
+
return n(), l("svg", k1, t[0] || (t[0] = [
|
222
|
+
s("circle", {
|
228
223
|
cx: "12",
|
229
224
|
cy: "12",
|
230
225
|
r: "10"
|
231
226
|
}, null, -1),
|
232
|
-
|
233
|
-
|
227
|
+
s("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }, null, -1),
|
228
|
+
s("path", { d: "M12 17h.01" }, null, -1)
|
234
229
|
]));
|
235
230
|
}
|
236
|
-
const
|
237
|
-
components: { IconQuestion:
|
231
|
+
const H1 = /* @__PURE__ */ b(y1, [["render", V1]]), $1 = {
|
232
|
+
components: { IconQuestion: H1, IconUser: Q, AdminNotification: F },
|
238
233
|
mounted() {
|
239
234
|
this.getUserData();
|
240
235
|
},
|
@@ -255,14 +250,14 @@ const M1 = /* @__PURE__ */ _(V1, [["render", $1]]), L1 = {
|
|
255
250
|
methods: {
|
256
251
|
async getUserData() {
|
257
252
|
try {
|
258
|
-
const { data: e } = await
|
253
|
+
const { data: e } = await S.get("/user");
|
259
254
|
this.userData = e;
|
260
255
|
} catch {
|
261
256
|
}
|
262
257
|
},
|
263
258
|
async logout() {
|
264
259
|
try {
|
265
|
-
await
|
260
|
+
await S.get("/logout"), await window.history.pushState({}, "", "/login"), await location.reload(), localStorage.removeItem("user");
|
266
261
|
} catch {
|
267
262
|
}
|
268
263
|
},
|
@@ -273,111 +268,111 @@ const M1 = /* @__PURE__ */ _(V1, [["render", $1]]), L1 = {
|
|
273
268
|
beforeUnmount() {
|
274
269
|
window.removeEventListener("click", this.closeOnOutsideClick);
|
275
270
|
}
|
276
|
-
},
|
271
|
+
}, M1 = {
|
277
272
|
class: "h-[60px] border-b flex justify-end px-[20px]",
|
278
273
|
style: { width: "calc(100vw - 260px)" }
|
279
|
-
},
|
274
|
+
}, L1 = { class: "flex items-center gap-[6px]" }, I1 = {
|
280
275
|
href: "docs-softpro.com",
|
281
276
|
class: "size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"
|
282
|
-
},
|
277
|
+
}, D1 = { class: "relative" }, Z1 = ["src"], O1 = {
|
283
278
|
key: 1,
|
284
279
|
class: "size-[40px] rounded-full bg-gray-200 flex items-center justify-center"
|
285
|
-
},
|
280
|
+
}, E1 = { class: "p-[10px] gap-[6px] items-center border-b flex justify-between" }, N1 = ["src"], z1 = {
|
286
281
|
key: 1,
|
287
282
|
class: "size-[40px] rounded-full bg-gray-200 flex items-center justify-center"
|
288
|
-
},
|
289
|
-
function
|
290
|
-
var h,
|
291
|
-
const C = p("IconQuestion"), f = p("AdminNotification"),
|
292
|
-
return
|
293
|
-
|
294
|
-
|
295
|
-
|
283
|
+
}, j1 = { class: "text-[14px] mr-[10px] text-gray-500" }, S1 = { class: "flex flex-col p-[4px]" };
|
284
|
+
function B1(e, t, o, a, r, u) {
|
285
|
+
var h, _, v, w, m, y, k, V, H, $;
|
286
|
+
const C = p("IconQuestion"), f = p("AdminNotification"), x = p("IconUser"), g = p("router-link");
|
287
|
+
return n(), l("div", M1, [
|
288
|
+
s("div", L1, [
|
289
|
+
s("a", I1, [
|
290
|
+
d(C, {
|
296
291
|
height: "24",
|
297
292
|
width: "24"
|
298
293
|
})
|
299
294
|
]),
|
300
|
-
|
301
|
-
t[4] || (t[4] =
|
302
|
-
|
303
|
-
|
295
|
+
d(f),
|
296
|
+
t[4] || (t[4] = s("div", { class: "h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]" }, null, -1)),
|
297
|
+
s("div", D1, [
|
298
|
+
s("div", {
|
304
299
|
onClick: t[0] || (t[0] = (M) => r.isVisible = !0),
|
305
300
|
class: "cursor-pointer"
|
306
301
|
}, [
|
307
|
-
(
|
302
|
+
(_ = (h = r.userData) == null ? void 0 : h.user) != null && _.avatar ? (n(), l("img", {
|
308
303
|
key: 0,
|
309
304
|
class: "flex-shrink-0 size-[30px] rounded-full",
|
310
305
|
src: (w = (v = r.userData) == null ? void 0 : v.user) == null ? void 0 : w.avatar,
|
311
306
|
alt: "Image Description"
|
312
|
-
}, null, 8,
|
313
|
-
|
307
|
+
}, null, 8, Z1)) : (n(), l("div", O1, [
|
308
|
+
d(x)
|
314
309
|
]))
|
315
310
|
]),
|
316
|
-
r.isVisible ? (
|
311
|
+
r.isVisible ? (n(), l("div", {
|
317
312
|
key: 0,
|
318
|
-
onClick: t[2] || (t[2] =
|
313
|
+
onClick: t[2] || (t[2] = P(() => {
|
319
314
|
}, ["stop"])),
|
320
315
|
class: "fixed bg-white w-[180px] top-[55px] right-[20px] shadow-xl rounded-xl z-[1]"
|
321
316
|
}, [
|
322
|
-
|
323
|
-
(y = (m = r.userData) == null ? void 0 : m.user) != null && y.avatar ? (
|
317
|
+
s("div", E1, [
|
318
|
+
(y = (m = r.userData) == null ? void 0 : m.user) != null && y.avatar ? (n(), l("img", {
|
324
319
|
key: 0,
|
325
320
|
class: "flex-shrink-0 size-[30px] rounded-full",
|
326
321
|
src: (V = (k = r.userData) == null ? void 0 : k.user) == null ? void 0 : V.avatar,
|
327
322
|
alt: "Image Description"
|
328
|
-
}, null, 8,
|
329
|
-
|
323
|
+
}, null, 8, N1)) : (n(), l("div", z1, [
|
324
|
+
d(x)
|
330
325
|
])),
|
331
|
-
|
332
|
-
|
326
|
+
s("div", null, [
|
327
|
+
s("p", j1, Z(($ = (H = r.userData) == null ? void 0 : H.user) == null ? void 0 : $.username), 1)
|
333
328
|
])
|
334
329
|
]),
|
335
|
-
|
336
|
-
|
330
|
+
s("div", S1, [
|
331
|
+
d(g, {
|
337
332
|
to: "profile",
|
338
333
|
disabled: !0,
|
339
334
|
class: "p-[8px] block rounded-lg w-full mb-[4px] text-start hover:bg-gray-100 !duration-300"
|
340
335
|
}, {
|
341
|
-
default:
|
342
|
-
|
336
|
+
default: O(() => t[3] || (t[3] = [
|
337
|
+
D("Профіль")
|
343
338
|
])),
|
344
339
|
_: 1
|
345
340
|
}),
|
346
|
-
|
347
|
-
onClick: t[1] || (t[1] = (...M) =>
|
341
|
+
s("button", {
|
342
|
+
onClick: t[1] || (t[1] = (...M) => u.logout && u.logout(...M)),
|
348
343
|
class: "p-[8px] block rounded-lg w-full text-start hover:bg-gray-100 !duration-300"
|
349
344
|
}, " Вийти ")
|
350
345
|
])
|
351
|
-
])) :
|
346
|
+
])) : T("", !0)
|
352
347
|
])
|
353
348
|
])
|
354
349
|
]);
|
355
350
|
}
|
356
|
-
const
|
357
|
-
components: { navbar:
|
351
|
+
const U1 = /* @__PURE__ */ b($1, [["render", B1]]), T1 = {
|
352
|
+
components: { navbar: m1, AdminHeader: U1 },
|
358
353
|
computed: {
|
359
354
|
isMenu() {
|
360
|
-
return
|
355
|
+
return E.value || null;
|
361
356
|
},
|
362
357
|
header() {
|
363
358
|
var e;
|
364
|
-
return ((e =
|
359
|
+
return ((e = B.value) == null ? void 0 : e.header) || "admin-header";
|
365
360
|
}
|
366
361
|
}
|
367
|
-
},
|
368
|
-
function
|
362
|
+
}, A1 = { class: "admin-wrapper" }, Q1 = { class: "flex flex-col" };
|
363
|
+
function F1(e, t, o, a, r, u) {
|
369
364
|
const C = p("navbar"), f = p("router-view");
|
370
|
-
return
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
(
|
375
|
-
|
376
|
-
], 64)) :
|
365
|
+
return n(), l("div", A1, [
|
366
|
+
d(C),
|
367
|
+
s("div", Q1, [
|
368
|
+
u.isMenu ? (n(), l(N, { key: 0 }, [
|
369
|
+
(n(), R(W(u.header))),
|
370
|
+
d(f)
|
371
|
+
], 64)) : T("", !0)
|
377
372
|
])
|
378
373
|
]);
|
379
374
|
}
|
380
|
-
const
|
375
|
+
const K1 = /* @__PURE__ */ b(T1, [["render", F1], ["__scopeId", "data-v-68620ef3"]]);
|
381
376
|
export {
|
382
|
-
|
377
|
+
K1 as default
|
383
378
|
};
|
package/dist/admin.js
CHANGED