@opengis/widgets 0.0.58 → 0.0.59
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/README.md +91 -91
- package/dist/index.css +1 -1
- package/dist/index.js +10 -10
- package/dist/index.umd.cjs +2 -2
- package/package.json +58 -58
package/README.md
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
# OpenGIS Widgets Library
|
|
2
|
-
|
|
3
|
-
Library of independent widgets for OpenGIS systems with a universal Card wrapper. All widgets can be used separately or as part of a single interface through the Card component.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
### Card Widget - Universal wrapper
|
|
8
|
-
|
|
9
|
-
- **Two display modes**: Tab (tabs) and Plain (panels)
|
|
10
|
-
- **Flexible size control** through `col` and `width` parameters
|
|
11
|
-
- **Support for HTML content**, dynamic components and slots
|
|
12
|
-
- **Adaptive grid** with support for 12-column system
|
|
13
|
-
|
|
14
|
-
### Available widgets
|
|
15
|
-
|
|
16
|
-
- **CommentsWidget** - system comments with replies and likes
|
|
17
|
-
- **HistoryWidget** - display of changes history
|
|
18
|
-
- **FilesWidget** - file management with upload
|
|
19
|
-
- **GalleryWidget** - gallery with adaptive grid
|
|
20
|
-
- **DescriptionListWidget** - description lists with different data types
|
|
21
|
-
|
|
22
|
-
## Documentation
|
|
23
|
-
|
|
24
|
-
Check out the documentation and live demo here: [Live Demo & Docs](https://widget.opengis.info)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## Install & Usage
|
|
28
|
-
|
|
29
|
-
### Install
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npm install @opengis/widgets
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Register the components
|
|
36
|
-
|
|
37
|
-
```ts
|
|
38
|
-
import { createApp } from 'vue'
|
|
39
|
-
import App from './App.vue'
|
|
40
|
-
import { DescriptionList, DescriptionItem } from '@opengis/widgets'
|
|
41
|
-
|
|
42
|
-
createApp(App).component('DescriptionList', DescriptionList).mount('#app')
|
|
43
|
-
createApp(App).component('DescriptionItem', DescriptionItem).mount('#app')
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Usage
|
|
47
|
-
|
|
48
|
-
```vue
|
|
49
|
-
<template>
|
|
50
|
-
<Card :data="tabsData" view="tab">
|
|
51
|
-
<template #tab-0>
|
|
52
|
-
<CommentsWidget :comments="comments" @add-comment="handleAddComment" />
|
|
53
|
-
</template>
|
|
54
|
-
<template #tab-1>
|
|
55
|
-
<HistoryWidget :items="historyItems" />
|
|
56
|
-
</template>
|
|
57
|
-
</Card>
|
|
58
|
-
</template>
|
|
59
|
-
|
|
60
|
-
<script setup>
|
|
61
|
-
import { Card, CommentsWidget, HistoryWidget, FilesWidget, GalleryWidget } from '@opengis/widgets'
|
|
62
|
-
|
|
63
|
-
const tabsData = [
|
|
64
|
-
{
|
|
65
|
-
"type": "tabs",
|
|
66
|
-
"col": 12,
|
|
67
|
-
"items": [
|
|
68
|
-
{ "name": "comments", "title": "Comments" },
|
|
69
|
-
{ "name": "history", "title": "History" }
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
|
|
74
|
-
const panelsData = [
|
|
75
|
-
{ name: "files", title: "Files", col: 6, width: 6 },
|
|
76
|
-
{ name: "gallery", title: "Gallery", col: 6, width: 6 }
|
|
77
|
-
]
|
|
78
|
-
</script>
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Contributions
|
|
82
|
-
|
|
83
|
-
1. Fork project
|
|
84
|
-
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
85
|
-
3. Commit changes (`git commit -m 'Add amazing feature'`)
|
|
86
|
-
4. Push to branch (`git push origin feature/amazing-feature`)
|
|
87
|
-
5. Open Pull Request
|
|
88
|
-
|
|
89
|
-
## License
|
|
90
|
-
|
|
91
|
-
This project is licensed under MIT License.
|
|
1
|
+
# OpenGIS Widgets Library
|
|
2
|
+
|
|
3
|
+
Library of independent widgets for OpenGIS systems with a universal Card wrapper. All widgets can be used separately or as part of a single interface through the Card component.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### Card Widget - Universal wrapper
|
|
8
|
+
|
|
9
|
+
- **Two display modes**: Tab (tabs) and Plain (panels)
|
|
10
|
+
- **Flexible size control** through `col` and `width` parameters
|
|
11
|
+
- **Support for HTML content**, dynamic components and slots
|
|
12
|
+
- **Adaptive grid** with support for 12-column system
|
|
13
|
+
|
|
14
|
+
### Available widgets
|
|
15
|
+
|
|
16
|
+
- **CommentsWidget** - system comments with replies and likes
|
|
17
|
+
- **HistoryWidget** - display of changes history
|
|
18
|
+
- **FilesWidget** - file management with upload
|
|
19
|
+
- **GalleryWidget** - gallery with adaptive grid
|
|
20
|
+
- **DescriptionListWidget** - description lists with different data types
|
|
21
|
+
|
|
22
|
+
## Documentation
|
|
23
|
+
|
|
24
|
+
Check out the documentation and live demo here: [Live Demo & Docs](https://widget.opengis.info)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Install & Usage
|
|
28
|
+
|
|
29
|
+
### Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install @opengis/widgets
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Register the components
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { createApp } from 'vue'
|
|
39
|
+
import App from './App.vue'
|
|
40
|
+
import { DescriptionList, DescriptionItem } from '@opengis/widgets'
|
|
41
|
+
|
|
42
|
+
createApp(App).component('DescriptionList', DescriptionList).mount('#app')
|
|
43
|
+
createApp(App).component('DescriptionItem', DescriptionItem).mount('#app')
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Usage
|
|
47
|
+
|
|
48
|
+
```vue
|
|
49
|
+
<template>
|
|
50
|
+
<Card :data="tabsData" view="tab">
|
|
51
|
+
<template #tab-0>
|
|
52
|
+
<CommentsWidget :comments="comments" @add-comment="handleAddComment" />
|
|
53
|
+
</template>
|
|
54
|
+
<template #tab-1>
|
|
55
|
+
<HistoryWidget :items="historyItems" />
|
|
56
|
+
</template>
|
|
57
|
+
</Card>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup>
|
|
61
|
+
import { Card, CommentsWidget, HistoryWidget, FilesWidget, GalleryWidget } from '@opengis/widgets'
|
|
62
|
+
|
|
63
|
+
const tabsData = [
|
|
64
|
+
{
|
|
65
|
+
"type": "tabs",
|
|
66
|
+
"col": 12,
|
|
67
|
+
"items": [
|
|
68
|
+
{ "name": "comments", "title": "Comments" },
|
|
69
|
+
{ "name": "history", "title": "History" }
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
const panelsData = [
|
|
75
|
+
{ name: "files", title: "Files", col: 6, width: 6 },
|
|
76
|
+
{ name: "gallery", title: "Gallery", col: 6, width: 6 }
|
|
77
|
+
]
|
|
78
|
+
</script>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Contributions
|
|
82
|
+
|
|
83
|
+
1. Fork project
|
|
84
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
85
|
+
3. Commit changes (`git commit -m 'Add amazing feature'`)
|
|
86
|
+
4. Push to branch (`git push origin feature/amazing-feature`)
|
|
87
|
+
5. Open Pull Request
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
|
|
91
|
+
This project is licensed under MIT License.
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.image-wrapper{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:1fr 1fr 1fr 1fr;grid-column-gap:5px;grid-row-gap:3px;height:100%}.image0{height:100%;width:100%;grid-row-start:1;grid-column-start:1;grid-row-end:3;grid-column-end:3}.image1{grid-row-start:1;grid-column-start:3;grid-row-end:2;grid-column-end:4}.image2{grid-row-start:1;grid-column-start:4;grid-row-end:2;grid-column-end:5}.image3{grid-row-start:2;grid-column-start:3;grid-row-end:3;grid-column-end:4}.image4{grid-row-start:2;grid-column-start:4;grid-row-end:3;grid-column-end:5}.thumb-cover{position:absolute;inset:0;z-index:5;background-color:#00000080;color:#fff;display:flex;align-items:center;justify-content:center;font-size:36px}.text-value[data-v-
|
|
1
|
+
.image-wrapper{display:grid;grid-template-rows:1fr 1fr;grid-template-columns:1fr 1fr 1fr 1fr;grid-column-gap:5px;grid-row-gap:3px;height:100%}.image0{height:100%;width:100%;grid-row-start:1;grid-column-start:1;grid-row-end:3;grid-column-end:3}.image1{grid-row-start:1;grid-column-start:3;grid-row-end:2;grid-column-end:4}.image2{grid-row-start:1;grid-column-start:4;grid-row-end:2;grid-column-end:5}.image3{grid-row-start:2;grid-column-start:3;grid-row-end:3;grid-column-end:4}.image4{grid-row-start:2;grid-column-start:4;grid-row-end:3;grid-column-end:5}.thumb-cover{position:absolute;inset:0;z-index:5;background-color:#00000080;color:#fff;display:flex;align-items:center;justify-content:center;font-size:36px}.text-value[data-v-c14550b7]{word-break:break-word}.link-value[data-v-e6eb07a6]{word-break:break-all}.date-value[data-v-b9600618],.status-value[data-v-c72e0b01],.custom-value[data-v-11a73810]{word-break:break-word}.description-list-widget[data-v-36d43e50]{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.map-center-control[data-v-73fcd71f]{display:flex;gap:.5rem}.notification-enter-active[data-v-55903525],.notification-leave-active[data-v-55903525]{transition:all .3s ease}.notification-enter-from[data-v-55903525],.notification-leave-to[data-v-55903525]{opacity:0;transform:translate(100%)}.notification-move[data-v-55903525]{transition:transform .3s ease}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as dr from "vue";
|
|
2
|
-
import { h as xs, defineComponent as he, useModel as Fs, ref as R,
|
|
2
|
+
import { h as xs, defineComponent as he, mergeModels as zn, useModel as Fs, ref as R, createElementBlock as g, openBlock as p, createElementVNode as u, createVNode as ce, unref as ae, withDirectives as tt, vModelText as Kt, createCommentVNode as X, createTextVNode as je, onMounted as ht, onUnmounted as ni, resolveComponent as Hn, normalizeClass as ne, createBlock as ye, toDisplayString as Q, Fragment as re, renderList as le, normalizeStyle as nt, resolveDynamicComponent as qe, withModifiers as Ye, computed as Y, renderSlot as wt, inject as fr, onBeforeUnmount as Ot, provide as si, getCurrentInstance as Bs, watch as ge, reactive as pr, nextTick as rn, Teleport as es, resolveDirective as hr, useAttrs as mr, createStaticVNode as gr, mergeProps as Nt, vShow as ko, defineAsyncComponent as yr, TransitionGroup as vr, withCtx as br } from "vue";
|
|
3
3
|
import { notify as pt, TooltipDirective as wr, emitter as mn } from "@opengis/core";
|
|
4
4
|
const Eo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), xr = (e) => e.replace(
|
|
5
5
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
@@ -875,7 +875,7 @@ const Oa = { class: "space-y-0.5" }, Ma = ["onClick"], Da = ["onClick"], Va = {
|
|
|
875
875
|
}, q = (S) => {
|
|
876
876
|
const y = document.createElement("a");
|
|
877
877
|
y.setAttribute("download", S?.uploaded_name || S?.name), y.href = S?.file_path || S?.path, y.click();
|
|
878
|
-
}, O = R("list");
|
|
878
|
+
}, O = R(n.view === "grid" ? "grid" : "list");
|
|
879
879
|
async function I() {
|
|
880
880
|
if (!n.id)
|
|
881
881
|
return;
|
|
@@ -1234,7 +1234,7 @@ const Oa = { class: "space-y-0.5" }, Ma = ["onClick"], Da = ["onClick"], Va = {
|
|
|
1234
1234
|
for (const [s, o] of t)
|
|
1235
1235
|
n[s] = o;
|
|
1236
1236
|
return n;
|
|
1237
|
-
}, wl = /* @__PURE__ */ Mt(bl, [["__scopeId", "data-v-
|
|
1237
|
+
}, wl = /* @__PURE__ */ Mt(bl, [["__scopeId", "data-v-c14550b7"]]), xl = { class: "link-value" }, kl = ["href"], El = /* @__PURE__ */ he({
|
|
1238
1238
|
__name: "LinkValue",
|
|
1239
1239
|
props: {
|
|
1240
1240
|
item: {}
|
|
@@ -1261,7 +1261,7 @@ const Oa = { class: "space-y-0.5" }, Ma = ["onClick"], Da = ["onClick"], Va = {
|
|
|
1261
1261
|
], 8, kl)
|
|
1262
1262
|
]));
|
|
1263
1263
|
}
|
|
1264
|
-
}), _l = /* @__PURE__ */ Mt(El, [["__scopeId", "data-v-
|
|
1264
|
+
}), _l = /* @__PURE__ */ Mt(El, [["__scopeId", "data-v-e6eb07a6"]]), Sl = { class: "date-value" }, Cl = { class: "text-sm text-gray-900" }, Nl = /* @__PURE__ */ he({
|
|
1265
1265
|
__name: "DateValue",
|
|
1266
1266
|
props: {
|
|
1267
1267
|
item: {}
|
|
@@ -1294,7 +1294,7 @@ const Oa = { class: "space-y-0.5" }, Ma = ["onClick"], Da = ["onClick"], Va = {
|
|
|
1294
1294
|
u("span", Cl, Q(n.value), 1)
|
|
1295
1295
|
]));
|
|
1296
1296
|
}
|
|
1297
|
-
}), $l = /* @__PURE__ */ Mt(Nl, [["__scopeId", "data-v-
|
|
1297
|
+
}), $l = /* @__PURE__ */ Mt(Nl, [["__scopeId", "data-v-b9600618"]]), Tl = { class: "status-value" }, Al = {
|
|
1298
1298
|
key: 0,
|
|
1299
1299
|
class: "mr-1"
|
|
1300
1300
|
}, Il = /* @__PURE__ */ he({
|
|
@@ -1363,7 +1363,7 @@ const Oa = { class: "space-y-0.5" }, Ma = ["onClick"], Da = ["onClick"], Va = {
|
|
|
1363
1363
|
], 2)
|
|
1364
1364
|
]));
|
|
1365
1365
|
}
|
|
1366
|
-
}), Ll = /* @__PURE__ */ Mt(Il, [["__scopeId", "data-v-
|
|
1366
|
+
}), Ll = /* @__PURE__ */ Mt(Il, [["__scopeId", "data-v-c72e0b01"]]), Ol = { class: "custom-value" }, Ml = { class: "text-sm text-gray-900" }, Dl = /* @__PURE__ */ he({
|
|
1367
1367
|
__name: "CustomValue",
|
|
1368
1368
|
props: {
|
|
1369
1369
|
item: {}
|
|
@@ -1378,7 +1378,7 @@ const Oa = { class: "space-y-0.5" }, Ma = ["onClick"], Da = ["onClick"], Va = {
|
|
|
1378
1378
|
], !0)
|
|
1379
1379
|
]));
|
|
1380
1380
|
}
|
|
1381
|
-
}), Vl = /* @__PURE__ */ Mt(Dl, [["__scopeId", "data-v-
|
|
1381
|
+
}), Vl = /* @__PURE__ */ Mt(Dl, [["__scopeId", "data-v-11a73810"]]), Rl = ["id"], Pl = {
|
|
1382
1382
|
key: 0,
|
|
1383
1383
|
class: "text-xl font-semibold text-gray-900 mb-4"
|
|
1384
1384
|
}, Fl = {
|
|
@@ -1509,7 +1509,7 @@ const Oa = { class: "space-y-0.5" }, Ma = ["onClick"], Da = ["onClick"], Va = {
|
|
|
1509
1509
|
]))
|
|
1510
1510
|
], 14, Rl));
|
|
1511
1511
|
}
|
|
1512
|
-
}), ui = /* @__PURE__ */ Mt(rc, [["__scopeId", "data-v-
|
|
1512
|
+
}), ui = /* @__PURE__ */ Mt(rc, [["__scopeId", "data-v-36d43e50"]]);
|
|
1513
1513
|
function di(e) {
|
|
1514
1514
|
return new Promise((t, n) => {
|
|
1515
1515
|
if (typeof document > "u") {
|
|
@@ -2609,7 +2609,7 @@ const xc = { class: "map-base-layer-menu" }, kc = {
|
|
|
2609
2609
|
]);
|
|
2610
2610
|
};
|
|
2611
2611
|
}
|
|
2612
|
-
}), To = /* @__PURE__ */ Mt(su, [["__scopeId", "data-v-
|
|
2612
|
+
}), To = /* @__PURE__ */ Mt(su, [["__scopeId", "data-v-73fcd71f"]]), ou = {
|
|
2613
2613
|
key: 1,
|
|
2614
2614
|
class: "absolute bottom-[50px] right-[10px] flex flex-col items-center gap-2 pointer-events-none z-[520]"
|
|
2615
2615
|
}, iu = {
|
|
@@ -8968,7 +8968,7 @@ const Yp = { class: "text-lg font-semibold text-gray-900" }, Xp = ["innerHTML"],
|
|
|
8968
8968
|
})
|
|
8969
8969
|
]));
|
|
8970
8970
|
}
|
|
8971
|
-
}), vh = /* @__PURE__ */ Mt(yh, [["__scopeId", "data-v-
|
|
8971
|
+
}), vh = /* @__PURE__ */ Mt(yh, [["__scopeId", "data-v-55903525"]]);
|
|
8972
8972
|
Ps.install = function(e) {
|
|
8973
8973
|
e.component("vs-widget-file", _s), e.component("vs-widget-comments", ks), e.component("vs-widget-history", Es), e.component("vs-widget-gallery", Ss), e.component("vs-widget-map", Cs), e.component("vs-group-interface", Rs), e.component("CommentsWidget", ks), e.component("HistoryWidget", Es), e.component("GalleryWidget", Ss), e.component("FilesWidget", _s), e.component("MapWidget", Cs), e.component("Card", Ps), e.component("CardItem", jn), e.component("DescriptionListWidget", ui), e.component("CopyNotification", vh), e.component("GroupInterfaceWidget", Rs);
|
|
8974
8974
|
};
|