ag-common 0.0.167 → 0.0.170
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/api/helpers/openApiHelpers.d.ts +3 -0
- package/dist/ui/components/Modal/index.js +3 -0
- package/dist/ui/components/TextEdit/TextEdit.js +3 -3
- package/dist/ui/helpers/index.d.ts +1 -0
- package/dist/ui/helpers/index.js +1 -0
- package/dist/ui/helpers/serviceWorker.d.ts +1 -0
- package/dist/ui/helpers/serviceWorker.js +24 -0
- package/package.json +1 -1
|
@@ -8,6 +8,9 @@ export declare const openApiImpl: (p: {
|
|
|
8
8
|
NODE_ENV: string;
|
|
9
9
|
baseUrl: string;
|
|
10
10
|
endpointsBase: string;
|
|
11
|
+
/**
|
|
12
|
+
* 'default' will be applied to all functions
|
|
13
|
+
*/
|
|
11
14
|
lambdaConfig: ILambdaConfigs;
|
|
12
15
|
certificate: certmgr.ICertificate;
|
|
13
16
|
hostedZone: route53.IHostedZone;
|
|
@@ -40,12 +40,15 @@ const FixedBackground = styled_components_1.default.div `
|
|
|
40
40
|
align-items: center;
|
|
41
41
|
`;
|
|
42
42
|
const ModalBase = styled_components_1.default.div `
|
|
43
|
+
display: flex;
|
|
43
44
|
position: absolute;
|
|
44
45
|
z-index: 1;
|
|
45
46
|
background-color: white;
|
|
46
47
|
border: solid 1px transparent;
|
|
47
48
|
border-radius: 0.5rem;
|
|
48
49
|
box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.6), 0 2px 15px 0 rgba(0, 0, 0, 0.05);
|
|
50
|
+
max-width: 95vw;
|
|
51
|
+
max-height: 95vh;
|
|
49
52
|
&[data-position='left'] {
|
|
50
53
|
left: 0;
|
|
51
54
|
}
|
|
@@ -80,12 +80,12 @@ const TextEdit = ({ defaultValue = '', defaultEditing, disableEdit = false, plac
|
|
|
80
80
|
onSubmit(value, false);
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
|
+
if (!disableEdit && onClickOutsideWithNoValue) {
|
|
84
|
+
onClickOutsideWithNoValue();
|
|
85
|
+
}
|
|
83
86
|
if (!disableEdit && editing && defaultEditing) {
|
|
84
87
|
return;
|
|
85
88
|
}
|
|
86
|
-
if (onClickOutsideWithNoValue) {
|
|
87
|
-
onClickOutsideWithNoValue();
|
|
88
|
-
}
|
|
89
89
|
setEditingRaw(false);
|
|
90
90
|
}
|
|
91
91
|
});
|
package/dist/ui/helpers/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./jwt"), exports);
|
|
|
23
23
|
__exportStar(require("./lang"), exports);
|
|
24
24
|
__exportStar(require("./plural"), exports);
|
|
25
25
|
__exportStar(require("./routes"), exports);
|
|
26
|
+
__exportStar(require("./serviceWorker"), exports);
|
|
26
27
|
__exportStar(require("./useContextMenu"), exports);
|
|
27
28
|
__exportStar(require("./useLocalStorage"), exports);
|
|
28
29
|
__exportStar(require("./useLockBodyScroll"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uninstallServiceWorkers(): Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.uninstallServiceWorkers = void 0;
|
|
13
|
+
const async_1 = require("../../common/helpers/async");
|
|
14
|
+
function uninstallServiceWorkers() {
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
if (typeof navigator === 'undefined') {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
yield navigator.serviceWorker
|
|
20
|
+
.getRegistrations()
|
|
21
|
+
.then((registrations) => __awaiter(this, void 0, void 0, function* () { return (0, async_1.asyncForEach)([...registrations], (r) => r.unregister()); }));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.uninstallServiceWorkers = uninstallServiceWorkers;
|