ublo-lib 1.41.0 → 1.41.1
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/es/common/components/editable-map/color-picker.d.ts +6 -0
- package/es/common/components/editable-map/color-picker.d.ts.map +1 -0
- package/es/common/components/editable-map/color-picker.js +27 -0
- package/es/common/components/editable-map/color-picker.module.css +66 -0
- package/es/common/components/editable-map/edit-form.d.ts.map +1 -1
- package/es/common/components/editable-map/edit-form.js +16 -11
- package/es/common/components/editable-map/edit-form.module.css +38 -2
- package/es/common/components/editable-map/editable-map.d.ts.map +1 -1
- package/es/common/components/editable-map/editable-map.js +133 -14
- package/es/common/components/editable-map/editable-map.module.css +65 -20
- package/es/common/components/editable-map/full-screen-button.d.ts +2 -1
- package/es/common/components/editable-map/full-screen-button.d.ts.map +1 -1
- package/es/common/components/editable-map/full-screen-button.js +6 -2
- package/es/common/components/editable-map/full-screen-button.module.css +6 -2
- package/es/common/components/editable-map/geoman.d.ts +8 -0
- package/es/common/components/editable-map/geoman.d.ts.map +1 -0
- package/es/common/components/editable-map/geoman.js +181 -0
- package/es/common/components/editable-map/icon-picker.d.ts.map +1 -1
- package/es/common/components/editable-map/icon-picker.js +2 -2
- package/es/common/components/editable-map/icon-picker.module.css +6 -1
- package/es/common/components/editable-map/icons/ui.d.ts +2 -0
- package/es/common/components/editable-map/icons/ui.d.ts.map +1 -0
- package/es/common/components/editable-map/icons/ui.js +7 -0
- package/es/common/components/editable-map/initial-marker-form.d.ts +4 -0
- package/es/common/components/editable-map/initial-marker-form.d.ts.map +1 -0
- package/es/common/components/editable-map/initial-marker-form.js +17 -0
- package/es/common/components/editable-map/initial-marker-form.module.css +25 -0
- package/es/common/components/editable-map/map-events.d.ts +1 -14
- package/es/common/components/editable-map/map-events.d.ts.map +1 -1
- package/es/common/components/editable-map/map-events.js +1 -24
- package/es/common/components/editable-map/marker-list.d.ts +7 -1
- package/es/common/components/editable-map/marker-list.d.ts.map +1 -1
- package/es/common/components/editable-map/marker-list.js +33 -11
- package/es/common/components/editable-map/marker-list.module.css +29 -21
- package/es/common/components/editable-map/markers.js +2 -19
- package/es/common/components/editable-map/popup-data.d.ts.map +1 -1
- package/es/common/components/editable-map/popup-data.js +2 -2
- package/es/common/components/editable-map/popup-data.module.css +15 -0
- package/es/common/components/editable-map/slopes-toggle.module.css +1 -0
- package/es/common/components/editable-map/utils/file-manager.d.ts +2 -0
- package/es/common/components/editable-map/utils/file-manager.d.ts.map +1 -0
- package/es/common/components/editable-map/utils/file-manager.js +29 -0
- package/es/common/utils/file-manager.d.ts +1 -0
- package/es/common/utils/file-manager.d.ts.map +1 -1
- package/package.json +1 -1
- package/es/common/components/editable-map/helper.d.ts +0 -2
- package/es/common/components/editable-map/helper.d.ts.map +0 -1
- package/es/common/components/editable-map/helper.js +0 -7
- package/es/common/components/editable-map/helper.module.css +0 -62
- package/es/common/components/editable-map/input-marker.d.ts +0 -4
- package/es/common/components/editable-map/input-marker.d.ts.map +0 -1
- package/es/common/components/editable-map/input-marker.js +0 -16
- package/es/common/components/editable-map/input-marker.module.css +0 -17
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import loadJS from "../../../utils/load-js";
|
|
2
|
+
export async function load(changed, width, height) {
|
|
3
|
+
const config = getConfig();
|
|
4
|
+
await loadJS(config.fileManagerURL, "file-picker");
|
|
5
|
+
window.openFileManager({
|
|
6
|
+
fileChanged: (result) => {
|
|
7
|
+
return changed(fileChanged(result.path));
|
|
8
|
+
},
|
|
9
|
+
fileManagerAPIURL: config.fileManagerAPIURL,
|
|
10
|
+
token: config.fileManagerToken,
|
|
11
|
+
width,
|
|
12
|
+
height,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function fileChanged(path) {
|
|
16
|
+
const config = getConfig();
|
|
17
|
+
return config.fileManagerAssets.concat(path);
|
|
18
|
+
}
|
|
19
|
+
function getConfig() {
|
|
20
|
+
const { cdn, filemanager } = window.CmsConfig;
|
|
21
|
+
const { token, url } = filemanager;
|
|
22
|
+
const urlPrefix = cdn !== undefined ? cdn : "/assets";
|
|
23
|
+
return {
|
|
24
|
+
fileManagerToken: token,
|
|
25
|
+
fileManagerURL: `${url}/static/js/file-manager.js`,
|
|
26
|
+
fileManagerAPIURL: `${url}`,
|
|
27
|
+
fileManagerAssets: urlPrefix,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-manager.d.ts","sourceRoot":"","sources":["../../../src/common/utils/file-manager.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,EAAE;YACT,WAAW,EAAE;gBACX,GAAG,EAAE,MAAM,CAAC;gBACZ,KAAK,EAAE,MAAM,CAAC;aACf,CAAC;SACH,CAAC;QACF,eAAe,EAAE,GAAG,CAAC;KACtB;CACF;AAED,eAAO,MAAM,eAAe,gBAAsB,OAAO,kBASxD,CAAC"}
|
|
1
|
+
{"version":3,"file":"file-manager.d.ts","sourceRoot":"","sources":["../../../src/common/utils/file-manager.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,SAAS,EAAE;YACT,GAAG,EAAE,MAAM,CAAC;YACZ,WAAW,EAAE;gBACX,GAAG,EAAE,MAAM,CAAC;gBACZ,KAAK,EAAE,MAAM,CAAC;aACf,CAAC;SACH,CAAC;QACF,eAAe,EAAE,GAAG,CAAC;KACtB;CACF;AAED,eAAO,MAAM,eAAe,gBAAsB,OAAO,kBASxD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/helper.js"],"names":[],"mappings":"AAIA,0EAwBC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import * as Icons from "dt-design-system/es/icons";
|
|
4
|
-
import css from "./helper.module.css";
|
|
5
|
-
export default function Helper() {
|
|
6
|
-
return (_jsxs("div", { className: css.helper, children: [_jsx("div", { className: css.helperButton, children: _jsx(Icons.Question, { className: css.helperIcon }) }), _jsxs("div", { className: css.helperMessage, children: [_jsx("div", { children: "Cliquez n'importe o\u00F9 sur la carte pour ajouter un point d'int\u00E9r\u00EAt. Vous pouvez d\u00E9placer ces derniers gr\u00E2ce au \"glisser-d\u00E9poser\". Cliquez sur un point d'int\u00E9r\u00EAt existant pour modifier ses informations." }), _jsxs("div", { children: [_jsx("b", { children: "Attention" }), ", la carte sera affich\u00E9e \u00E0 vos client exactement dans l'\u00E9tat dans laquelle vous l'enregistrez (niveau de zoom, points d'int\u00E9r\u00EAts, centrage)."] }), _jsx("div", { children: "En mode consultation, les points tr\u00E8s proches sont automatiquement regroup\u00E9s afin d'am\u00E9liorer la lisibilit\u00E9 de la carte." })] })] }));
|
|
7
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
.helper {
|
|
2
|
-
position: absolute;
|
|
3
|
-
bottom: 10px;
|
|
4
|
-
left: 10px;
|
|
5
|
-
z-index: 1;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.helperButton {
|
|
9
|
-
width: 50px;
|
|
10
|
-
height: 50px;
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
background: var(
|
|
15
|
-
--ublo-blue-gradient,
|
|
16
|
-
linear-gradient(
|
|
17
|
-
175deg,
|
|
18
|
-
var(--ublo-blue-400, #4177f6),
|
|
19
|
-
var(--ublo-blue-500, #073ff8)
|
|
20
|
-
)
|
|
21
|
-
);
|
|
22
|
-
border-radius: 50%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.helperIcon {
|
|
26
|
-
width: 42px;
|
|
27
|
-
height: 42px;
|
|
28
|
-
fill: var(--ds-grey-000, #ffffff);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.helperMessage {
|
|
32
|
-
position: absolute;
|
|
33
|
-
bottom: 0;
|
|
34
|
-
left: 0;
|
|
35
|
-
width: 350px;
|
|
36
|
-
max-width: 65vw;
|
|
37
|
-
padding: 14px;
|
|
38
|
-
color: var(--ds-grey-000, #ffffff);
|
|
39
|
-
text-align: justify;
|
|
40
|
-
font-size: 13px;
|
|
41
|
-
font-family: var(--ublo-content-font);
|
|
42
|
-
background: var(
|
|
43
|
-
--ublo-blue-gradient,
|
|
44
|
-
linear-gradient(
|
|
45
|
-
175deg,
|
|
46
|
-
var(--ublo-blue-400, #4177f6),
|
|
47
|
-
var(--ublo-blue-500, #073ff8)
|
|
48
|
-
)
|
|
49
|
-
);
|
|
50
|
-
border-radius: var(--ds-radius-200, 10px);
|
|
51
|
-
opacity: 0;
|
|
52
|
-
pointer-events: none;
|
|
53
|
-
touch-action: none;
|
|
54
|
-
transition: opacity 160ms
|
|
55
|
-
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.helperButton:hover + .helperMessage,
|
|
59
|
-
.helperMessage:hover {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
pointer-events: auto;
|
|
62
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-marker.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-map/input-marker.js"],"names":[],"mappings":"AAIA;;4CAqBC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Input from "dt-design-system/es/input";
|
|
3
|
-
import Button from "dt-design-system/es/button";
|
|
4
|
-
import styles from "./input-marker.module.css";
|
|
5
|
-
export default function InputMarker({ callback }) {
|
|
6
|
-
const addMarker = (event) => {
|
|
7
|
-
event.preventDefault();
|
|
8
|
-
const form = event.target;
|
|
9
|
-
const lat = form[0].value;
|
|
10
|
-
const lng = form[1].value;
|
|
11
|
-
if (lat && lng) {
|
|
12
|
-
callback({ lat, lng });
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
return (_jsxs("form", { className: styles.form, onSubmit: addMarker, children: [_jsx("div", { children: "Ajouter un point d'int\u00E9r\u00EAt" }), _jsx(Input, { label: "Latitude", placeholder: "48.132", type: "number", step: "any" }), _jsx(Input, { label: "Longitude", placeholder: "3.524", type: "number", step: "any" }), _jsx(Button, { className: styles.button, type: "submit", children: "OK" })] }));
|
|
16
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.form {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 10px;
|
|
4
|
-
left: 50px;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: 5px;
|
|
8
|
-
width: 210px;
|
|
9
|
-
background-color: var(--ds-grey-000, #fff);
|
|
10
|
-
padding: 20px 10px;
|
|
11
|
-
border-radius: var(--ds-radius-100, 4px);
|
|
12
|
-
box-shadow: var(--ds-shadow-100, 0px 3px 6px rgba(0, 0, 0, 0.12));
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.form button.button {
|
|
16
|
-
margin-left: auto;
|
|
17
|
-
}
|