@opengis/admin 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{IconChevronDown-BJPl2auV.js → IconChevronDown-BPFs_myL.js} +1 -1
- package/dist/{add-page-Bpp_YRTr.js → add-page-CrpGB-Ou.js} +1 -1
- package/dist/{admin-interface-_iXu31D7.js → admin-interface-Bu8ADv9L.js} +2 -2
- package/dist/{admin-view-Bzdwnd_T.js → admin-view-Cy_FlaVp.js} +2 -2
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +6 -6
- package/dist/{card-view-C8_DUvzO.js → card-view-avp4Kaot.js} +1 -1
- package/dist/{edit-page-DFhmg_Wz.js → edit-page-BPxC4yZm.js} +1 -1
- package/dist/{import-file-By5-gtTh.js → import-file-sDPsfE3g.js} +21 -21
- package/package.json +2 -2
- package/server/helpers/list/buttonHelper.js +10 -10
- package/server/helpers/list/utils/button.js +5 -5
- package/server/routes/data/controllers/utils/conditions.js +20 -20
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as d, u as m, c as n } from "./import-file-
|
1
|
+
import { _ as d, u as m, c as n } from "./import-file-sDPsfE3g.js";
|
2
2
|
import { resolveComponent as b, openBlock as u, createElementBlock as h, createElementVNode as a, createBlock as f, createCommentVNode as p } from "vue";
|
3
3
|
const g = {
|
4
4
|
data() {
|
@@ -3594,16 +3594,16 @@ function eD(t) {
|
|
3594
3594
|
}
|
3595
3595
|
const tD = [
|
3596
3596
|
// { name: 'profile', path: '/profile', component: () => import('../components/profile/vs-profile.vue') },
|
3597
|
-
{ name: "edit", path: "/edit", component: () => import("./edit-page-
|
3598
|
-
{ name: "add", path: "/add", component: () => import("./add-page-
|
3597
|
+
{ name: "edit", path: "/edit", component: () => import("./edit-page-BPxC4yZm.js") },
|
3598
|
+
{ name: "add", path: "/add", component: () => import("./add-page-CrpGB-Ou.js") },
|
3599
3599
|
{
|
3600
3600
|
name: "card-view",
|
3601
3601
|
path: "/card",
|
3602
|
-
component: () => import("./card-view-
|
3602
|
+
component: () => import("./card-view-avp4Kaot.js"),
|
3603
3603
|
children: [{
|
3604
3604
|
name: "table",
|
3605
3605
|
path: ":table",
|
3606
|
-
component: () => import("./card-view-
|
3606
|
+
component: () => import("./card-view-avp4Kaot.js"),
|
3607
3607
|
children: [{ name: "card", path: ":id", component: () => Promise.resolve().then(() => i7) }]
|
3608
3608
|
}]
|
3609
3609
|
}
|
@@ -3657,14 +3657,14 @@ const oD = /* @__PURE__ */ Tt(nD, [["render", sD]]), aD = (t) => {
|
|
3657
3657
|
{
|
3658
3658
|
path: "/",
|
3659
3659
|
name: "home",
|
3660
|
-
component: () => import("./admin-view-
|
3660
|
+
component: () => import("./admin-view-Cy_FlaVp.js"),
|
3661
3661
|
children: [
|
3662
3662
|
...e,
|
3663
3663
|
...t,
|
3664
3664
|
// { path: '/', redirect: '/home' },
|
3665
3665
|
{
|
3666
3666
|
path: "/:catchAll(.*)",
|
3667
|
-
component: () => import("./admin-interface-
|
3667
|
+
component: () => import("./admin-interface-Bu8ADv9L.js")
|
3668
3668
|
}
|
3669
3669
|
]
|
3670
3670
|
}
|
@@ -6885,7 +6885,7 @@ function g1(t, e = {}) {
|
|
6885
6885
|
var _2 = { exports: {} };
|
6886
6886
|
/**
|
6887
6887
|
* MapLibre GL JS
|
6888
|
-
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.
|
6888
|
+
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.0/LICENSE.txt
|
6889
6889
|
*/
|
6890
6890
|
(function(t, e) {
|
6891
6891
|
(function(n, i) {
|
@@ -16106,7 +16106,7 @@ Use an identity property function instead: \`{ "type": "identity", "property": $
|
|
16106
16106
|
}
|
16107
16107
|
return u.i(self) && (self.worker = new wr(self)), wr;
|
16108
16108
|
}), r("index", ["exports", "./shared"], function(u, a) {
|
16109
|
-
var g = "4.7.
|
16109
|
+
var g = "4.7.0";
|
16110
16110
|
let _, w;
|
16111
16111
|
const S = { now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), frameAsync: (x) => new Promise((s, d) => {
|
16112
16112
|
const f = requestAnimationFrame(s);
|
@@ -19656,7 +19656,7 @@ void main() {
|
|
19656
19656
|
#pragma mapbox: initialize highp vec4 stroke_color
|
19657
19657
|
#pragma mapbox: initialize mediump float stroke_width
|
19658
19658
|
#pragma mapbox: initialize lowp float stroke_opacity
|
19659
|
-
vec2 extrude=v_data.xy;float extrude_length=length(extrude);float
|
19659
|
+
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
|
19660
19660
|
#ifdef OVERDRAW_INSPECTOR
|
19661
19661
|
gl_FragColor=vec4(1.0);
|
19662
19662
|
#endif
|
@@ -19676,7 +19676,7 @@ void main(void) {
|
|
19676
19676
|
#pragma mapbox: initialize highp vec4 stroke_color
|
19677
19677
|
#pragma mapbox: initialize mediump float stroke_width
|
19678
19678
|
#pragma mapbox: initialize lowp float stroke_opacity
|
19679
|
-
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur
|
19679
|
+
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`), clippingMask: vn("void main() {gl_FragColor=vec4(1.0);}", "attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"), heatmap: vn(`uniform highp float u_intensity;varying vec2 v_extrude;
|
19680
19680
|
#pragma mapbox: define highp float weight
|
19681
19681
|
#define GAUSS_COEF 0.3989422804014327
|
19682
19682
|
void main() {
|
@@ -21946,7 +21946,7 @@ uniform ${B} ${N} u_${Z};
|
|
21946
21946
|
}
|
21947
21947
|
return !1;
|
21948
21948
|
}, this._updateHashUnthrottled = () => {
|
21949
|
-
const d = window.location.href.replace(/(
|
21949
|
+
const d = window.location.href.replace(/(#.+)?$/, this.getHashString());
|
21950
21950
|
window.history.replaceState(window.history.state, null, d);
|
21951
21951
|
}, this._removeHash = () => {
|
21952
21952
|
const d = this._getCurrentHash();
|
@@ -48681,24 +48681,24 @@ const a7 = ({ api: t, confirm: e, method: n }) => new Promise((i) => {
|
|
48681
48681
|
t.component(n, i);
|
48682
48682
|
});
|
48683
48683
|
}, d7 = {
|
48684
|
-
async install(t, { componentsApp: e = {}, settings: n }) {
|
48684
|
+
async install(t, { componentsApp: e = {}, settings: n, routes: i = [] }) {
|
48685
48685
|
zd.value = { ...zd, ...n };
|
48686
48686
|
try {
|
48687
|
-
const
|
48688
|
-
...
|
48689
|
-
component: { ...F0, ...e }[
|
48687
|
+
const l = (await l7()).filter((a) => a == null ? void 0 : a.component).map((a) => ({
|
48688
|
+
...a,
|
48689
|
+
component: { ...F0, ...e }[a == null ? void 0 : a.component]
|
48690
48690
|
}));
|
48691
48691
|
c7(t, { ...F0, ...e }), t.component("admin", TP);
|
48692
|
-
const { router:
|
48693
|
-
window.app = { ...t, router:
|
48692
|
+
const { router: u } = await aD(l.concat(i));
|
48693
|
+
window.app = { ...t, router: u }, window.v3plugin = { ...t.config.globalProperties, ...kk }, t.config.globalProperties = {
|
48694
48694
|
...t.config.globalProperties,
|
48695
48695
|
$componentsConfig: { ...eF, componentsApp: e },
|
48696
|
-
$router:
|
48696
|
+
$router: u,
|
48697
48697
|
$v3plugin: kk,
|
48698
48698
|
$utils: { reloadCardPage: Gv }
|
48699
|
-
}, t.use(
|
48700
|
-
} catch (
|
48701
|
-
console.error(
|
48699
|
+
}, t.use(u);
|
48700
|
+
} catch (r) {
|
48701
|
+
console.error(r);
|
48702
48702
|
}
|
48703
48703
|
},
|
48704
48704
|
components: F0
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opengis/admin",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.1",
|
4
4
|
"description": "This project Softpro Admin",
|
5
5
|
"main": "dist/admin.js",
|
6
6
|
"type": "module",
|
@@ -80,4 +80,4 @@
|
|
80
80
|
"vitepress-plugin-tabs": "^0.5.0",
|
81
81
|
"vitepress-sidebar": "^1.22.0"
|
82
82
|
}
|
83
|
-
}
|
83
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
|
2
|
-
import button from './utils/button.js';
|
3
|
-
export default function buttonHelper(data, opt) {
|
4
|
-
const { hash } = opt;
|
5
|
-
|
6
|
-
// console.log(params)
|
7
|
-
|
8
|
-
if (!hash.token) return 'token empty';
|
9
|
-
|
10
|
-
return button(hash.token, hash.title);
|
1
|
+
|
2
|
+
import button from './utils/button.js';
|
3
|
+
export default function buttonHelper(data, opt) {
|
4
|
+
const { hash } = opt;
|
5
|
+
|
6
|
+
// console.log(params)
|
7
|
+
|
8
|
+
if (!hash.token) return 'token empty';
|
9
|
+
|
10
|
+
return button(hash.token, hash.title);
|
11
11
|
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export default function button(token, title) {
|
4
|
-
return `<button onclick="window.v3plugin.$form({ token: '${token}' })"
|
5
|
-
class="inline-flex items-center px-2 py-1 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white">${title || 'Додати'}</button>`;
|
1
|
+
|
2
|
+
|
3
|
+
export default function button(token, title) {
|
4
|
+
return `<button onclick="window.v3plugin.$form({ token: '${token}' })"
|
5
|
+
class="inline-flex items-center px-2 py-1 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white">${title || 'Додати'}</button>`;
|
6
6
|
}
|
@@ -1,21 +1,21 @@
|
|
1
|
-
function onCheck(rule, data) {
|
2
|
-
const val = data[rule[0]];
|
3
|
-
// console.log(val, rule[1], rule[2])
|
4
|
-
if (rule[1] === '==') return val === rule[2];
|
5
|
-
if (rule[1] === '!=') return val !== rule[2];
|
6
|
-
if (rule[1] === 'in' && rule[2].split) return rule[2].split(',').includes(val);
|
7
|
-
if (rule[1] === 'in' && rule[2].includes) return rule[2].includes(val);
|
8
|
-
|
9
|
-
if (rule[1] === 'not in' && rule[2].split) return !rule[2].split(',').includes(val);
|
10
|
-
if (rule[1] === 'not in' && rule[2].includes) return !rule[2].includes(val);
|
11
|
-
|
12
|
-
if (rule[1] === '>') return val > rule[2];
|
13
|
-
if (rule[1] === '<') return val < rule[2];
|
14
|
-
}
|
15
|
-
export default function conditions(rules, data) {
|
16
|
-
if (!rules?.length) return true;
|
17
|
-
const result = Array.isArray(rules[0]) ? !rules.filter(el => !onCheck(el, data)).length : onCheck(rules, data)
|
18
|
-
// console.log(rules, result)
|
19
|
-
return result;
|
20
|
-
|
1
|
+
function onCheck(rule, data) {
|
2
|
+
const val = data[rule[0]];
|
3
|
+
// console.log(val, rule[1], rule[2])
|
4
|
+
if (rule[1] === '==') return val === rule[2];
|
5
|
+
if (rule[1] === '!=') return val !== rule[2];
|
6
|
+
if (rule[1] === 'in' && rule[2].split) return rule[2].split(',').includes(val);
|
7
|
+
if (rule[1] === 'in' && rule[2].includes) return rule[2].includes(val);
|
8
|
+
|
9
|
+
if (rule[1] === 'not in' && rule[2].split) return !rule[2].split(',').includes(val);
|
10
|
+
if (rule[1] === 'not in' && rule[2].includes) return !rule[2].includes(val);
|
11
|
+
|
12
|
+
if (rule[1] === '>') return val > rule[2];
|
13
|
+
if (rule[1] === '<') return val < rule[2];
|
14
|
+
}
|
15
|
+
export default function conditions(rules, data) {
|
16
|
+
if (!rules?.length) return true;
|
17
|
+
const result = Array.isArray(rules[0]) ? !rules.filter(el => !onCheck(el, data)).length : onCheck(rules, data)
|
18
|
+
// console.log(rules, result)
|
19
|
+
return result;
|
20
|
+
|
21
21
|
}
|