@ztwoint/z-ui 0.1.121 → 0.1.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/chart-card/builders/bar-chart-builder.d.ts +1 -1
- package/dist/components/chart-card/builders/bar-chart-builder.js +78 -31
- package/dist/components/chart-card/builders/chart-builder-factory.d.ts +1 -1
- package/dist/components/chart-card/builders/chart-builder-factory.js +15 -15
- package/dist/components/chart-card/builders/line-chart-builder.d.ts +1 -1
- package/dist/components/chart-card/builders/line-chart-builder.js +85 -38
- package/dist/components/chart-card/builders/pie-chart-builder.d.ts +1 -1
- package/dist/components/chart-card/builders/pie-chart-builder.js +37 -34
- package/dist/components/chart-card/chart-card.config.types.d.ts +27 -0
- package/dist/components/chart-card/chart-card.d.ts +1 -1
- package/dist/components/chart-card/chart-card.js +25 -23
- package/dist/components/chart-card/chart-card.types.d.ts +2 -0
- package/dist/components/chart-card/config/defaults.d.ts +28 -0
- package/dist/components/chart-card/config/defaults.js +105 -88
- package/dist/components/table/components/cell/avatar-cell.js +13 -6
- package/dist/components/table/table-provider.js +7 -0
- package/dist/components/table-card/table-card.js +52 -45
- package/dist/components/z2map/components/index.d.ts +5 -0
- package/dist/components/z2map/components/map-controls.d.ts +12 -0
- package/dist/components/z2map/components/map-controls.js +29 -0
- package/dist/components/z2map/components/map-empty-state.d.ts +2 -0
- package/dist/components/z2map/components/map-empty-state.js +10 -0
- package/dist/components/z2map/components/map-loading-state.d.ts +8 -0
- package/dist/components/z2map/components/map-loading-state.js +45 -0
- package/dist/components/z2map/components/map-pin-content.d.ts +8 -0
- package/dist/components/z2map/components/map-pin-content.js +27 -0
- package/dist/components/z2map/components/map-pin.d.ts +19 -0
- package/dist/components/z2map/components/map-pin.js +116 -0
- package/dist/components/z2map/components/map-style-control.d.ts +8 -0
- package/dist/components/z2map/components/map-style-control.js +45 -0
- package/dist/components/z2map/components/map-zoom-control.d.ts +8 -0
- package/dist/components/z2map/components/map-zoom-control.js +49 -0
- package/dist/components/z2map/index.d.ts +9 -0
- package/dist/components/z2map/map.constants.d.ts +47 -0
- package/dist/components/z2map/map.constants.js +40 -0
- package/dist/components/z2map/map.d.ts +4 -0
- package/dist/components/z2map/map.hook.d.ts +33 -0
- package/dist/components/z2map/map.hook.js +99 -0
- package/dist/components/z2map/map.js +161 -0
- package/dist/components/z2map/map.type.d.ts +45 -0
- package/dist/components/z2map/map.utils.d.ts +10 -0
- package/dist/components/z2map/map.utils.js +37 -0
- package/dist/css/node_modules/mapbox-gl/dist/mapbox-gl.css +1 -0
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +128 -112
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/attribution-control.js +12 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/fullscreen-control.js +12 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/geolocate-control.js +30 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/map.js +54 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/marker.js +56 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/navigation-control.js +12 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/popup.js +35 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/scale-control.js +14 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/use-control.js +14 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/components/use-map.js +6 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/create-ref.js +77 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/mapbox.js +315 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/mapbox/proxy-transform.js +35 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/apply-react-style.js +13 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/compare-class-names.js +16 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/deep-equal.js +33 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/set-globals.js +18 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/style-utils.js +25 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/transform.js +40 -0
- package/dist/node_modules/@vis.gl/react-mapbox/dist/utils/use-isomorphic-layout-effect.js +5 -0
- package/dist/routes/map.d.ts +2 -0
- package/dist/types/components/chart-card/builders/bar-chart-builder.d.ts +1 -1
- package/dist/types/components/chart-card/builders/chart-builder-factory.d.ts +1 -1
- package/dist/types/components/chart-card/builders/line-chart-builder.d.ts +1 -1
- package/dist/types/components/chart-card/builders/pie-chart-builder.d.ts +1 -1
- package/dist/types/components/chart-card/chart-card.config.types.d.ts +27 -0
- package/dist/types/components/chart-card/chart-card.d.ts +1 -1
- package/dist/types/components/chart-card/chart-card.types.d.ts +2 -0
- package/dist/types/components/chart-card/config/defaults.d.ts +28 -0
- package/dist/types/components/z2map/components/index.d.ts +5 -0
- package/dist/types/components/z2map/components/map-controls.d.ts +12 -0
- package/dist/types/components/z2map/components/map-empty-state.d.ts +2 -0
- package/dist/types/components/z2map/components/map-loading-state.d.ts +8 -0
- package/dist/types/components/z2map/components/map-pin-content.d.ts +8 -0
- package/dist/types/components/z2map/components/map-pin.d.ts +19 -0
- package/dist/types/components/z2map/components/map-style-control.d.ts +8 -0
- package/dist/types/components/z2map/components/map-zoom-control.d.ts +8 -0
- package/dist/types/components/z2map/index.d.ts +9 -0
- package/dist/types/components/z2map/map.constants.d.ts +47 -0
- package/dist/types/components/z2map/map.d.ts +5 -0
- package/dist/types/components/z2map/map.hook.d.ts +33 -0
- package/dist/types/components/z2map/map.type.d.ts +45 -0
- package/dist/types/components/z2map/map.utils.d.ts +10 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/routes/map.d.ts +2 -0
- package/package.json +6 -2
|
@@ -1,156 +1,173 @@
|
|
|
1
|
-
import { UI_COLORS as
|
|
2
|
-
const
|
|
3
|
-
fontFamily:
|
|
4
|
-
color:
|
|
1
|
+
import { UI_COLORS as c } from "./colors.js";
|
|
2
|
+
const S = "Inter Variable, sans-serif", d = {
|
|
3
|
+
fontFamily: S,
|
|
4
|
+
color: c.text.primary
|
|
5
5
|
};
|
|
6
|
-
function
|
|
7
|
-
if ((
|
|
6
|
+
function T(a, r) {
|
|
7
|
+
if ((r == null ? void 0 : r.show) === !1)
|
|
8
8
|
return;
|
|
9
|
-
const
|
|
9
|
+
const e = (r == null ? void 0 : r.position) ?? "left", l = (r == null ? void 0 : r.fontSize) ?? 16, f = (r == null ? void 0 : r.color) ?? c.text.primary;
|
|
10
10
|
return {
|
|
11
|
-
text:
|
|
11
|
+
text: a,
|
|
12
12
|
textStyle: {
|
|
13
|
-
fontFamily:
|
|
14
|
-
fontSize:
|
|
13
|
+
fontFamily: S,
|
|
14
|
+
fontSize: l,
|
|
15
15
|
fontWeight: 500,
|
|
16
16
|
color: f
|
|
17
17
|
},
|
|
18
|
-
left:
|
|
18
|
+
left: e,
|
|
19
19
|
top: 12,
|
|
20
20
|
padding: [0, 0, 8, 0]
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return (
|
|
25
|
-
trigger: (
|
|
26
|
-
backgroundColor:
|
|
27
|
-
borderColor:
|
|
23
|
+
function z(a) {
|
|
24
|
+
return (a == null ? void 0 : a.show) === !1 ? void 0 : {
|
|
25
|
+
trigger: (a == null ? void 0 : a.trigger) ?? "axis",
|
|
26
|
+
backgroundColor: c.background.default,
|
|
27
|
+
borderColor: c.border.default,
|
|
28
28
|
borderWidth: 1,
|
|
29
29
|
textStyle: {
|
|
30
|
-
...
|
|
30
|
+
...d
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
34
|
+
function F(a, r = !1, e) {
|
|
35
|
+
var y, h;
|
|
36
|
+
if ((e == null ? void 0 : e.show) === !1)
|
|
36
37
|
return;
|
|
37
|
-
const
|
|
38
|
-
let u =
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
const l = (e == null ? void 0 : e.position) ?? "top", f = (e == null ? void 0 : e.orient) ?? "horizontal", m = (e == null ? void 0 : e.scrollable) ?? !1;
|
|
39
|
+
let u = r ? 48 : 16, g, b = "center", x;
|
|
40
|
+
l === "bottom" ? (u = "auto", g = 10) : l === "left" ? (u = "middle", b = 10) : l === "right" && (u = "middle", b = "auto", x = 10);
|
|
41
|
+
const t = {
|
|
42
|
+
data: a,
|
|
41
43
|
top: u,
|
|
42
|
-
bottom:
|
|
43
|
-
left:
|
|
44
|
-
right:
|
|
44
|
+
bottom: g,
|
|
45
|
+
left: b,
|
|
46
|
+
right: x,
|
|
45
47
|
orient: f,
|
|
46
48
|
itemGap: 20,
|
|
47
49
|
padding: [8, 0, 12, 0],
|
|
48
50
|
textStyle: {
|
|
49
|
-
...
|
|
51
|
+
...d,
|
|
50
52
|
fontSize: 12
|
|
51
53
|
},
|
|
52
54
|
itemWidth: 25,
|
|
53
55
|
itemHeight: 14
|
|
54
56
|
};
|
|
57
|
+
return m ? {
|
|
58
|
+
...t,
|
|
59
|
+
type: "scroll",
|
|
60
|
+
pageButtonItemGap: (e == null ? void 0 : e.pageButtonItemGap) ?? 5,
|
|
61
|
+
pageButtonGap: (e == null ? void 0 : e.pageButtonGap) ?? 10,
|
|
62
|
+
pageButtonPosition: (e == null ? void 0 : e.pageButtonPosition) ?? "end",
|
|
63
|
+
pageFormatter: (e == null ? void 0 : e.pageFormatter) ?? "{current}/{total}",
|
|
64
|
+
pageIconColor: (e == null ? void 0 : e.pageIconColor) ?? "#2f4554",
|
|
65
|
+
pageIconInactiveColor: (e == null ? void 0 : e.pageIconInactiveColor) ?? "#aaa",
|
|
66
|
+
pageIconSize: (e == null ? void 0 : e.pageIconSize) ?? 12,
|
|
67
|
+
pageTextStyle: {
|
|
68
|
+
color: ((y = e == null ? void 0 : e.pageTextStyle) == null ? void 0 : y.color) ?? "#333",
|
|
69
|
+
fontSize: ((h = e == null ? void 0 : e.pageTextStyle) == null ? void 0 : h.fontSize) ?? 12
|
|
70
|
+
}
|
|
71
|
+
} : t;
|
|
55
72
|
}
|
|
56
|
-
function
|
|
73
|
+
function L(a) {
|
|
57
74
|
return {
|
|
58
|
-
color:
|
|
59
|
-
fontFamily:
|
|
75
|
+
color: c.text.secondary,
|
|
76
|
+
fontFamily: S,
|
|
60
77
|
fontSize: 11,
|
|
61
|
-
...
|
|
78
|
+
...a && { rotate: a }
|
|
62
79
|
};
|
|
63
80
|
}
|
|
64
|
-
function
|
|
81
|
+
function C(a = !0) {
|
|
65
82
|
return {
|
|
66
|
-
show:
|
|
83
|
+
show: a,
|
|
67
84
|
lineStyle: {
|
|
68
|
-
color:
|
|
85
|
+
color: c.border.default
|
|
69
86
|
}
|
|
70
87
|
};
|
|
71
88
|
}
|
|
72
|
-
function
|
|
89
|
+
function I(a = !0) {
|
|
73
90
|
return {
|
|
74
|
-
show:
|
|
91
|
+
show: a,
|
|
75
92
|
lineStyle: {
|
|
76
|
-
color:
|
|
93
|
+
color: c.border.light
|
|
77
94
|
}
|
|
78
95
|
};
|
|
79
96
|
}
|
|
80
|
-
function
|
|
81
|
-
if (
|
|
97
|
+
function w(a, r = !1, e = "top", l) {
|
|
98
|
+
if (l)
|
|
82
99
|
return {
|
|
83
|
-
left:
|
|
84
|
-
right:
|
|
85
|
-
bottom:
|
|
86
|
-
top:
|
|
100
|
+
left: l.left ?? "3%",
|
|
101
|
+
right: l.right ?? "4%",
|
|
102
|
+
bottom: l.bottom ?? "3%",
|
|
103
|
+
top: l.top ?? 20,
|
|
87
104
|
containLabel: !0
|
|
88
105
|
};
|
|
89
106
|
let f = 20;
|
|
90
|
-
|
|
107
|
+
a && (f += 48), r && e === "top" && (f += 40);
|
|
108
|
+
let m = "3%";
|
|
109
|
+
r && e === "bottom" && (m = 60);
|
|
91
110
|
let u = "3%";
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
right: d,
|
|
99
|
-
bottom: u,
|
|
111
|
+
r && e === "left" && (u = 100);
|
|
112
|
+
let g = "4%";
|
|
113
|
+
return r && e === "right" && (g = 100), {
|
|
114
|
+
left: u,
|
|
115
|
+
right: g,
|
|
116
|
+
bottom: m,
|
|
100
117
|
top: f,
|
|
101
118
|
containLabel: !0
|
|
102
119
|
};
|
|
103
120
|
}
|
|
104
|
-
function
|
|
105
|
-
return (
|
|
121
|
+
function A(a, r = !0, e) {
|
|
122
|
+
return (e == null ? void 0 : e.show) === !1 ? { show: !1 } : {
|
|
106
123
|
type: "category",
|
|
107
|
-
data:
|
|
108
|
-
boundaryGap:
|
|
109
|
-
name:
|
|
110
|
-
nameLocation: (
|
|
111
|
-
nameGap:
|
|
112
|
-
nameTextStyle:
|
|
113
|
-
...
|
|
124
|
+
data: a,
|
|
125
|
+
boundaryGap: r,
|
|
126
|
+
name: e == null ? void 0 : e.name,
|
|
127
|
+
nameLocation: (e == null ? void 0 : e.nameLocation) ?? "middle",
|
|
128
|
+
nameGap: e != null && e.name ? 30 : void 0,
|
|
129
|
+
nameTextStyle: e != null && e.name ? {
|
|
130
|
+
...d,
|
|
114
131
|
fontSize: 12,
|
|
115
132
|
fontWeight: 500
|
|
116
133
|
} : void 0,
|
|
117
|
-
axisLine:
|
|
118
|
-
axisLabel:
|
|
119
|
-
splitLine:
|
|
134
|
+
axisLine: C(),
|
|
135
|
+
axisLabel: L(e == null ? void 0 : e.labelRotate),
|
|
136
|
+
splitLine: I((e == null ? void 0 : e.gridLines) ?? !1)
|
|
120
137
|
};
|
|
121
138
|
}
|
|
122
|
-
function
|
|
123
|
-
if ((
|
|
139
|
+
function B(a) {
|
|
140
|
+
if ((a == null ? void 0 : a.show) === !1)
|
|
124
141
|
return { show: !1 };
|
|
125
|
-
const
|
|
142
|
+
const r = (a == null ? void 0 : a.min) === "auto" || a == null ? void 0 : a.min, e = (a == null ? void 0 : a.max) === "auto" || a == null ? void 0 : a.max;
|
|
126
143
|
return {
|
|
127
144
|
type: "value",
|
|
128
|
-
name:
|
|
129
|
-
nameLocation: (
|
|
130
|
-
nameGap:
|
|
145
|
+
name: a == null ? void 0 : a.name,
|
|
146
|
+
nameLocation: (a == null ? void 0 : a.nameLocation) ?? "middle",
|
|
147
|
+
nameGap: a != null && a.name ? 50 : void 0,
|
|
131
148
|
nameRotate: 90,
|
|
132
|
-
nameTextStyle:
|
|
133
|
-
...
|
|
149
|
+
nameTextStyle: a != null && a.name ? {
|
|
150
|
+
...d,
|
|
134
151
|
fontSize: 12,
|
|
135
152
|
fontWeight: 500
|
|
136
153
|
} : void 0,
|
|
137
|
-
min:
|
|
138
|
-
max:
|
|
139
|
-
axisLine:
|
|
140
|
-
axisLabel:
|
|
141
|
-
splitLine:
|
|
154
|
+
min: r,
|
|
155
|
+
max: e,
|
|
156
|
+
axisLine: C(!1),
|
|
157
|
+
axisLabel: L(),
|
|
158
|
+
splitLine: I((a == null ? void 0 : a.gridLines) ?? !0)
|
|
142
159
|
};
|
|
143
160
|
}
|
|
144
161
|
export {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
162
|
+
d as COMMON_TEXT_STYLE,
|
|
163
|
+
S as DEFAULT_FONT_FAMILY,
|
|
164
|
+
L as buildAxisLabelConfig,
|
|
165
|
+
C as buildAxisLineConfig,
|
|
166
|
+
w as buildGridConfig,
|
|
167
|
+
F as buildLegendConfig,
|
|
168
|
+
I as buildSplitLineConfig,
|
|
169
|
+
T as buildTitleConfig,
|
|
170
|
+
z as buildTooltipConfig,
|
|
171
|
+
A as buildXAxisConfig,
|
|
172
|
+
B as buildYAxisConfig
|
|
156
173
|
};
|
|
@@ -47,13 +47,20 @@ import "../../../dynamic-table/z2-table-context.js";
|
|
|
47
47
|
import "../../../chart/chart.js";
|
|
48
48
|
import "../../../chart-card/config/defaults.js";
|
|
49
49
|
import "../../../chart-card/config/colors.js";
|
|
50
|
-
|
|
50
|
+
import "../../../z2map/map.js";
|
|
51
|
+
import "../../../z2map/map.constants.js";
|
|
52
|
+
import "../../../z2map/components/map-pin.js";
|
|
53
|
+
import "../../../z2map/components/map-pin-content.js";
|
|
54
|
+
import "../../../z2map/components/map-controls.js";
|
|
55
|
+
import "../../../z2map/components/map-zoom-control.js";
|
|
56
|
+
import "../../../z2map/components/map-style-control.js";
|
|
57
|
+
const xt = ({
|
|
51
58
|
avatar: m,
|
|
52
59
|
value: a,
|
|
53
60
|
rightIcon: o,
|
|
54
61
|
className: s,
|
|
55
|
-
helperText:
|
|
56
|
-
description:
|
|
62
|
+
helperText: p,
|
|
63
|
+
description: e
|
|
57
64
|
}) => /* @__PURE__ */ i(
|
|
58
65
|
"div",
|
|
59
66
|
{
|
|
@@ -74,16 +81,16 @@ const pt = ({
|
|
|
74
81
|
a
|
|
75
82
|
] }),
|
|
76
83
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2.5", children: [
|
|
77
|
-
|
|
84
|
+
p && /* @__PURE__ */ t("span", { className: "text-text-neutral-secondary", children: p }),
|
|
78
85
|
o && /* @__PURE__ */ t("span", { className: r("min-h-max min-w-max"), children: o })
|
|
79
86
|
] })
|
|
80
87
|
]
|
|
81
88
|
}
|
|
82
89
|
),
|
|
83
|
-
|
|
90
|
+
e && /* @__PURE__ */ t("div", { className: "text-text-neutral-secondary w-full", children: e })
|
|
84
91
|
]
|
|
85
92
|
}
|
|
86
93
|
);
|
|
87
94
|
export {
|
|
88
|
-
|
|
95
|
+
xt as AvatarCell
|
|
89
96
|
};
|
|
@@ -52,6 +52,13 @@ import "../dynamic-table/z2-table-context.js";
|
|
|
52
52
|
import "../chart/chart.js";
|
|
53
53
|
import "../chart-card/config/defaults.js";
|
|
54
54
|
import "../chart-card/config/colors.js";
|
|
55
|
+
import "../z2map/map.js";
|
|
56
|
+
import "../z2map/map.constants.js";
|
|
57
|
+
import "../z2map/components/map-pin.js";
|
|
58
|
+
import "../z2map/components/map-pin-content.js";
|
|
59
|
+
import "../z2map/components/map-controls.js";
|
|
60
|
+
import "../z2map/components/map-zoom-control.js";
|
|
61
|
+
import "../z2map/components/map-style-control.js";
|
|
55
62
|
import { TableHeaderWrapper as T } from "./components/table-header-wrapper.js";
|
|
56
63
|
import { TableHeaderContent as b } from "./components/table-header-content.js";
|
|
57
64
|
import { TableFooter as s } from "./components/table-footer.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { Table as r } from "../table/table-provider.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import { cn as d } from "../../lib/utils.js";
|
|
@@ -47,8 +47,15 @@ import "../dynamic-table/z2-table-context.js";
|
|
|
47
47
|
import "../chart/chart.js";
|
|
48
48
|
import "../chart-card/config/defaults.js";
|
|
49
49
|
import "../chart-card/config/colors.js";
|
|
50
|
+
import "../z2map/map.js";
|
|
51
|
+
import "../z2map/map.constants.js";
|
|
52
|
+
import "../z2map/components/map-pin.js";
|
|
53
|
+
import "../z2map/components/map-pin-content.js";
|
|
54
|
+
import "../z2map/components/map-controls.js";
|
|
55
|
+
import "../z2map/components/map-zoom-control.js";
|
|
56
|
+
import "../z2map/components/map-style-control.js";
|
|
50
57
|
import "../table/table.context.js";
|
|
51
|
-
const
|
|
58
|
+
const zt = ({
|
|
52
59
|
dataSource: w,
|
|
53
60
|
schema: B,
|
|
54
61
|
loading: b,
|
|
@@ -58,8 +65,8 @@ const _e = ({
|
|
|
58
65
|
bordered: n = !0,
|
|
59
66
|
showHeader: g = !0,
|
|
60
67
|
headerClassName: j,
|
|
61
|
-
search:
|
|
62
|
-
filter:
|
|
68
|
+
search: a,
|
|
69
|
+
filter: e,
|
|
63
70
|
headerLeftContent: h,
|
|
64
71
|
headerActions: p,
|
|
65
72
|
body: l = {
|
|
@@ -71,24 +78,24 @@ const _e = ({
|
|
|
71
78
|
footerClassName: T,
|
|
72
79
|
pagination: o,
|
|
73
80
|
paginationInfo: i,
|
|
74
|
-
paginationQuickJumper:
|
|
81
|
+
paginationQuickJumper: s,
|
|
75
82
|
error: u = !1,
|
|
76
83
|
dataSourceError: _ = !1
|
|
77
84
|
}) => {
|
|
78
85
|
var F;
|
|
79
86
|
if (u)
|
|
80
|
-
return /* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
typeof u == "string" && /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ t("div", { className: "flex flex-col items-center justify-center h-64 bg-background-error-subtle rounded-lg text-text-warning-secondary", children: /* @__PURE__ */ m("div", { className: "flex gap-2", children: [
|
|
88
|
+
/* @__PURE__ */ t(S, { className: "mt-1.5" }),
|
|
89
|
+
/* @__PURE__ */ m("div", { className: "flex flex-col gap-2", children: [
|
|
90
|
+
/* @__PURE__ */ t("div", { className: "text-text-error-primary text-lg font-medium", children: "Error loading data" }),
|
|
91
|
+
/* @__PURE__ */ t("div", { className: "text-sm", children: "Please try again later" }),
|
|
92
|
+
typeof u == "string" && /* @__PURE__ */ t("div", { className: "text-text-warning-secondary text-sm", children: u })
|
|
86
93
|
] })
|
|
87
94
|
] }) });
|
|
88
|
-
const C =
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
g && v && /* @__PURE__ */
|
|
95
|
+
const C = s && s.totalPage && s.totalPage >= 2, N = o && o.totalPage && o.totalPage >= 2 || !!i || C, v = a || e || h || p, R = typeof (e == null ? void 0 : e.showFilterButton) > "u" ? !0 : e == null ? void 0 : e.showFilterButton;
|
|
96
|
+
return /* @__PURE__ */ m("div", { className: d("flex flex-col overflow-hidden relative", H), children: [
|
|
97
|
+
/* @__PURE__ */ m(r, { dataSource: w, schema: B, emptyMessage: k, children: [
|
|
98
|
+
g && v && /* @__PURE__ */ m(
|
|
92
99
|
r.Header,
|
|
93
100
|
{
|
|
94
101
|
className: d(
|
|
@@ -98,43 +105,43 @@ const _e = ({
|
|
|
98
105
|
j
|
|
99
106
|
),
|
|
100
107
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ m(r.HeaderContent, { children: [
|
|
102
109
|
h && h,
|
|
103
|
-
|
|
110
|
+
a && /* @__PURE__ */ t(
|
|
104
111
|
r.Search,
|
|
105
112
|
{
|
|
106
113
|
search: {
|
|
107
|
-
value:
|
|
108
|
-
onChange:
|
|
114
|
+
value: a.value || "",
|
|
115
|
+
onChange: a.onChange || (() => {
|
|
109
116
|
}),
|
|
110
|
-
placeholder:
|
|
117
|
+
placeholder: a.placeholder
|
|
111
118
|
},
|
|
112
|
-
className:
|
|
119
|
+
className: a.className
|
|
113
120
|
}
|
|
114
121
|
),
|
|
115
|
-
|
|
122
|
+
e && /* @__PURE__ */ m(
|
|
116
123
|
x,
|
|
117
124
|
{
|
|
118
|
-
filterSchema:
|
|
125
|
+
filterSchema: e.filterSchema,
|
|
119
126
|
filter: {
|
|
120
|
-
value:
|
|
121
|
-
onChange:
|
|
127
|
+
value: e.value || [],
|
|
128
|
+
onChange: e.onChange || (() => {
|
|
122
129
|
}),
|
|
123
|
-
onFilterClick:
|
|
124
|
-
loading:
|
|
130
|
+
onFilterClick: e.onFilterClick,
|
|
131
|
+
loading: e.loading
|
|
125
132
|
},
|
|
126
133
|
children: [
|
|
127
|
-
R && /* @__PURE__ */
|
|
128
|
-
(F =
|
|
134
|
+
R && /* @__PURE__ */ t(x.FilterButton, {}),
|
|
135
|
+
(F = e == null ? void 0 : e.quickFilters) == null ? void 0 : F.map((f) => /* @__PURE__ */ t(x.FilterColumnButton, { filterName: f }, f))
|
|
129
136
|
]
|
|
130
137
|
}
|
|
131
138
|
)
|
|
132
139
|
] }),
|
|
133
|
-
p && /* @__PURE__ */
|
|
140
|
+
p && /* @__PURE__ */ t(r.HeaderContent, { children: p })
|
|
134
141
|
]
|
|
135
142
|
}
|
|
136
143
|
),
|
|
137
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ t(
|
|
138
145
|
r.Body,
|
|
139
146
|
{
|
|
140
147
|
dataSourceError: _,
|
|
@@ -152,7 +159,7 @@ const _e = ({
|
|
|
152
159
|
stickyHeader: l == null ? void 0 : l.stickyHeader
|
|
153
160
|
}
|
|
154
161
|
),
|
|
155
|
-
P && N && /* @__PURE__ */
|
|
162
|
+
P && N && /* @__PURE__ */ m(
|
|
156
163
|
r.Footer,
|
|
157
164
|
{
|
|
158
165
|
className: d(
|
|
@@ -162,7 +169,7 @@ const _e = ({
|
|
|
162
169
|
T
|
|
163
170
|
),
|
|
164
171
|
children: [
|
|
165
|
-
i ? /* @__PURE__ */
|
|
172
|
+
i ? /* @__PURE__ */ t(r.FooterContent, { children: /* @__PURE__ */ t(
|
|
166
173
|
r.PaginationInfo,
|
|
167
174
|
{
|
|
168
175
|
showTotal: i.showTotal,
|
|
@@ -170,19 +177,19 @@ const _e = ({
|
|
|
170
177
|
currentPage: i.currentPage,
|
|
171
178
|
itemsPerPage: i.itemsPerPage
|
|
172
179
|
}
|
|
173
|
-
) }) :
|
|
174
|
-
(
|
|
175
|
-
C && /* @__PURE__ */
|
|
180
|
+
) }) : s || o ? /* @__PURE__ */ t(r.FooterContent, { children: null }) : null,
|
|
181
|
+
(s || o) && /* @__PURE__ */ m(r.FooterContent, { children: [
|
|
182
|
+
C && /* @__PURE__ */ t(
|
|
176
183
|
r.PaginationQuickJumper,
|
|
177
184
|
{
|
|
178
|
-
currentPage:
|
|
179
|
-
totalPage:
|
|
180
|
-
onChange:
|
|
185
|
+
currentPage: s.currentPage,
|
|
186
|
+
totalPage: s.totalPage,
|
|
187
|
+
onChange: s.onChange || (() => {
|
|
181
188
|
}),
|
|
182
|
-
disabled:
|
|
189
|
+
disabled: s.disabled
|
|
183
190
|
}
|
|
184
191
|
),
|
|
185
|
-
o && /* @__PURE__ */
|
|
192
|
+
o && /* @__PURE__ */ t(
|
|
186
193
|
r.Pagination,
|
|
187
194
|
{
|
|
188
195
|
currentPage: o.currentPage,
|
|
@@ -197,12 +204,12 @@ const _e = ({
|
|
|
197
204
|
}
|
|
198
205
|
)
|
|
199
206
|
] }),
|
|
200
|
-
b && /* @__PURE__ */
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */
|
|
207
|
+
b && /* @__PURE__ */ t("div", { className: "absolute top-0 inset-0 w-full h-full bg-white/80 flex items-center justify-center", children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-3", children: [
|
|
208
|
+
/* @__PURE__ */ t("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-text-brand-secondary" }),
|
|
209
|
+
/* @__PURE__ */ t("p", { className: "text-text-neutral-primary font-medium", children: "Loading..." })
|
|
203
210
|
] }) })
|
|
204
211
|
] });
|
|
205
212
|
};
|
|
206
213
|
export {
|
|
207
|
-
|
|
214
|
+
zt as default
|
|
208
215
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MapVariant } from '../map.constants';
|
|
3
|
+
export interface MapControlsProps {
|
|
4
|
+
showZoomControls?: boolean;
|
|
5
|
+
onZoomIn?: () => void;
|
|
6
|
+
onZoomOut?: () => void;
|
|
7
|
+
showStyleSwitcher?: boolean;
|
|
8
|
+
activeStyle?: MapVariant;
|
|
9
|
+
onStyleChange?: (style: MapVariant) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const MapControls: FC<MapControlsProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs as m, Fragment as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { MapZoomControl as d } from "./map-zoom-control.js";
|
|
3
|
+
import { MapStyleControl as c } from "./map-style-control.js";
|
|
4
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
5
|
+
const f = ({
|
|
6
|
+
showZoomControls: n = !0,
|
|
7
|
+
onZoomIn: o,
|
|
8
|
+
onZoomOut: t,
|
|
9
|
+
showStyleSwitcher: e = !1,
|
|
10
|
+
activeStyle: a,
|
|
11
|
+
onStyleChange: i,
|
|
12
|
+
className: l
|
|
13
|
+
}) => /* @__PURE__ */ m(p, { children: [
|
|
14
|
+
n && o && t && /* @__PURE__ */ r(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: s(
|
|
18
|
+
"absolute bottom-6 right-6 z-10 transition-all duration-300 hover:scale-105",
|
|
19
|
+
l
|
|
20
|
+
),
|
|
21
|
+
children: /* @__PURE__ */ r(d, { onZoomIn: o, onZoomOut: t })
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
e && a && i && /* @__PURE__ */ r("div", { className: s("absolute top-6 right-6 z-10 transition-all duration-300", l), children: /* @__PURE__ */ r(c, { activeStyle: a, onStyleChange: i }) })
|
|
25
|
+
] });
|
|
26
|
+
f.displayName = "MapControls";
|
|
27
|
+
export {
|
|
28
|
+
f as MapControls
|
|
29
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { MapPinOff as a } from "lucide-react";
|
|
3
|
+
const s = () => /* @__PURE__ */ e("div", { className: "absolute inset-0 pointer-events-none flex items-center justify-center z-20", children: /* @__PURE__ */ e("div", { className: "bg-white/95 backdrop-blur-sm rounded-2xl shadow-[0_8px_32px_rgba(0,0,0,0.12)] border border-stroke-solid-light p-8 max-w-sm mx-4 pointer-events-auto", children: /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-4 text-center", children: [
|
|
4
|
+
/* @__PURE__ */ e("div", { className: "relative", children: /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-surface-neutral-default flex items-center justify-center", children: /* @__PURE__ */ e(a, { className: "w-8 h-8 text-neutral-secondary" }) }) }),
|
|
5
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e("h3", { className: "leading-none-medium-base text-neutral-primary font-semibold", children: "No locations to display" }) })
|
|
6
|
+
] }) }) });
|
|
7
|
+
s.displayName = "MapEmptyState";
|
|
8
|
+
export {
|
|
9
|
+
s as MapEmptyState
|
|
10
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Loader2 as i } from "lucide-react";
|
|
3
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
4
|
+
const c = ({ width: r, height: t, className: l }) => {
|
|
5
|
+
const n = {
|
|
6
|
+
width: typeof r == "number" ? `${r}px` : r,
|
|
7
|
+
height: typeof t == "number" ? `${t}px` : t
|
|
8
|
+
};
|
|
9
|
+
return /* @__PURE__ */ a(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
style: n,
|
|
13
|
+
className: s(
|
|
14
|
+
"relative bg-gradient-to-br from-surface-neutral-default to-surface-neutral-hover rounded-xl border border-stroke-solid-light flex flex-col items-center justify-center gap-4 overflow-hidden",
|
|
15
|
+
l
|
|
16
|
+
),
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 opacity-[0.03]", children: /* @__PURE__ */ e(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: "absolute inset-0",
|
|
22
|
+
style: {
|
|
23
|
+
backgroundImage: "radial-gradient(circle at 20px 20px, currentColor 1px, transparent 1px)",
|
|
24
|
+
backgroundSize: "40px 40px"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
) }),
|
|
28
|
+
/* @__PURE__ */ a("div", { className: "relative z-10 flex flex-col items-center gap-3", children: [
|
|
29
|
+
/* @__PURE__ */ a("div", { className: "relative", children: [
|
|
30
|
+
/* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-surface-accent-default/10 flex items-center justify-center", children: /* @__PURE__ */ e(i, { className: "w-8 h-8 text-accent-primary animate-spin" }) }),
|
|
31
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 rounded-full bg-accent-primary/20 animate-ping" })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-1", children: [
|
|
34
|
+
/* @__PURE__ */ e("div", { className: "leading-none-medium-sm text-neutral-primary font-medium", children: "Loading map..." }),
|
|
35
|
+
/* @__PURE__ */ e("div", { className: "leading-none-regular-xs text-neutral-secondary", children: "Please wait" })
|
|
36
|
+
] })
|
|
37
|
+
] })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
c.displayName = "MapLoadingState";
|
|
43
|
+
export {
|
|
44
|
+
c as MapLoadingState
|
|
45
|
+
};
|