@cashub/ui 0.24.4 → 0.25.0
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/map/GoogleMap.js +21 -0
- package/modal/StateModal.js +1 -9
- package/package.json +1 -1
package/map/GoogleMap.js
CHANGED
|
@@ -341,6 +341,27 @@ const Map = _ref2 => {
|
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
+
if (geoFenceOptions.enabledReposition) {
|
|
345
|
+
const repositionButton = document.createElement('button');
|
|
346
|
+
repositionButton.style.margin = 'var(--spacing-s)';
|
|
347
|
+
repositionButton.style.padding = 'var(--spacing-xs)';
|
|
348
|
+
repositionButton.style.boxShadow = 'rgba(0, 0, 0, 0.3) 0px 1px 4px -1px';
|
|
349
|
+
repositionButton.style.border = 'none';
|
|
350
|
+
repositionButton.style.borderRadius = '2px';
|
|
351
|
+
repositionButton.style.cursor = 'pointer';
|
|
352
|
+
repositionButton.style.backgroundColor = 'rgb(255, 255, 255)';
|
|
353
|
+
repositionButton.style.fontSize = '1rem';
|
|
354
|
+
repositionButton.textContent = 'Reposition';
|
|
355
|
+
repositionButton.title = 'Click to reposition the map to geofence';
|
|
356
|
+
repositionButton.type = 'button';
|
|
357
|
+
repositionButton.addEventListener('click', () => {
|
|
358
|
+
map.setCenter({
|
|
359
|
+
lat: geoFenceOptions.latitude,
|
|
360
|
+
lng: geoFenceOptions.longitude
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(repositionButton);
|
|
364
|
+
}
|
|
344
365
|
return () => {
|
|
345
366
|
circle.setMap(null);
|
|
346
367
|
window.google.maps.event.clearListeners(circle, 'click');
|
package/modal/StateModal.js
CHANGED
|
@@ -15,7 +15,7 @@ var _ButtonGroup = _interopRequireDefault(require("../button/ButtonGroup"));
|
|
|
15
15
|
var _Button = _interopRequireDefault(require("../button/Button"));
|
|
16
16
|
var _ModalBackdrop = _interopRequireDefault(require("../backdrop/ModalBackdrop"));
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5
|
|
18
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
19
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -44,7 +44,6 @@ const ModalContent = _ref2 => {
|
|
|
44
44
|
type,
|
|
45
45
|
title,
|
|
46
46
|
text,
|
|
47
|
-
list,
|
|
48
47
|
confirmButtonText,
|
|
49
48
|
cancelButtonText,
|
|
50
49
|
showCancelButton,
|
|
@@ -86,12 +85,6 @@ const ModalContent = _ref2 => {
|
|
|
86
85
|
children: title
|
|
87
86
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Message, {
|
|
88
87
|
children: text
|
|
89
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Detail, {
|
|
90
|
-
children: list.length > 0 && list.map(item => {
|
|
91
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
|
|
92
|
-
children: [item.app_name, ", ", item.app_version, ",", item.package_name]
|
|
93
|
-
});
|
|
94
|
-
})
|
|
95
88
|
})]
|
|
96
89
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ButtonGroup.default, {
|
|
97
90
|
alignRight: true,
|
|
@@ -126,5 +119,4 @@ const Body = _styledComponents.default.div(_templateObject3 || (_templateObject3
|
|
|
126
119
|
});
|
|
127
120
|
const Title = _styledComponents.default.h2(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: var(--font-body1);\n font-weight: var(--font-bold);\n margin-bottom: var(--spacing-s);\n"])));
|
|
128
121
|
const Message = _styledComponents.default.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: var(--font-body1);\n"])));
|
|
129
|
-
const Detail = _styledComponents.default.ul(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-top: 30px;\n color: var(--font-on-background);\n padding: 0 50px;\n > li {\n list-style-type: disc;\n }\n"])));
|
|
130
122
|
var _default = exports.default = StateModal;
|