@contember/interface 2.1.0-alpha.3 → 2.1.0-alpha.35
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/package.json +14 -14
- package/src/bootstrap/ApplicationEntrypoint.tsx +0 -1
- package/src/components/binding/DisconnectEntityTrigger.tsx +11 -3
- package/src/components/binding/EntityBeforePersist.tsx +1 -1
- package/src/hooks/useIsApplicationOutdated.ts +0 -1
- package/src/index.ts +1 -3
- package/dist/development/index.cjs +0 -43
- package/dist/development/index.cjs.map +0 -1
- package/dist/development/index.js +0 -22
- package/dist/development/index.js.map +0 -1
- package/dist/development/src/bootstrap/ApplicationEntrypoint.cjs +0 -67
- package/dist/development/src/bootstrap/ApplicationEntrypoint.cjs.map +0 -1
- package/dist/development/src/bootstrap/ApplicationEntrypoint.js +0 -67
- package/dist/development/src/bootstrap/ApplicationEntrypoint.js.map +0 -1
- package/dist/development/src/bootstrap/DataViewPageNameKeyProvider.cjs +0 -15
- package/dist/development/src/bootstrap/DataViewPageNameKeyProvider.cjs.map +0 -1
- package/dist/development/src/bootstrap/DataViewPageNameKeyProvider.js +0 -15
- package/dist/development/src/bootstrap/DataViewPageNameKeyProvider.js.map +0 -1
- package/dist/development/src/components/binding/ClearFieldTrigger.cjs +0 -25
- package/dist/development/src/components/binding/ClearFieldTrigger.cjs.map +0 -1
- package/dist/development/src/components/binding/ClearFieldTrigger.js +0 -25
- package/dist/development/src/components/binding/ClearFieldTrigger.js.map +0 -1
- package/dist/development/src/components/binding/DisconnectEntityTrigger.cjs +0 -52
- package/dist/development/src/components/binding/DisconnectEntityTrigger.cjs.map +0 -1
- package/dist/development/src/components/binding/DisconnectEntityTrigger.js +0 -52
- package/dist/development/src/components/binding/DisconnectEntityTrigger.js.map +0 -1
- package/dist/development/src/components/binding/EntityBeforePersist.cjs +0 -9
- package/dist/development/src/components/binding/EntityBeforePersist.cjs.map +0 -1
- package/dist/development/src/components/binding/EntityBeforePersist.js +0 -9
- package/dist/development/src/components/binding/EntityBeforePersist.js.map +0 -1
- package/dist/development/src/components/binding/RedirectOnPersist.cjs +0 -16
- package/dist/development/src/components/binding/RedirectOnPersist.cjs.map +0 -1
- package/dist/development/src/components/binding/RedirectOnPersist.js +0 -16
- package/dist/development/src/components/binding/RedirectOnPersist.js.map +0 -1
- package/dist/development/src/hooks/useBlockNavigationOnDirtyState.cjs +0 -36
- package/dist/development/src/hooks/useBlockNavigationOnDirtyState.cjs.map +0 -1
- package/dist/development/src/hooks/useBlockNavigationOnDirtyState.js +0 -36
- package/dist/development/src/hooks/useBlockNavigationOnDirtyState.js.map +0 -1
- package/dist/development/src/hooks/useIsApplicationOutdated.cjs +0 -55
- package/dist/development/src/hooks/useIsApplicationOutdated.cjs.map +0 -1
- package/dist/development/src/hooks/useIsApplicationOutdated.js +0 -55
- package/dist/development/src/hooks/useIsApplicationOutdated.js.map +0 -1
- package/dist/production/index.cjs +0 -43
- package/dist/production/index.cjs.map +0 -1
- package/dist/production/index.js +0 -22
- package/dist/production/index.js.map +0 -1
- package/dist/production/src/bootstrap/ApplicationEntrypoint.cjs +0 -35
- package/dist/production/src/bootstrap/ApplicationEntrypoint.cjs.map +0 -1
- package/dist/production/src/bootstrap/ApplicationEntrypoint.js +0 -35
- package/dist/production/src/bootstrap/ApplicationEntrypoint.js.map +0 -1
- package/dist/production/src/bootstrap/DataViewPageNameKeyProvider.cjs +0 -11
- package/dist/production/src/bootstrap/DataViewPageNameKeyProvider.cjs.map +0 -1
- package/dist/production/src/bootstrap/DataViewPageNameKeyProvider.js +0 -11
- package/dist/production/src/bootstrap/DataViewPageNameKeyProvider.js.map +0 -1
- package/dist/production/src/components/binding/ClearFieldTrigger.cjs +0 -17
- package/dist/production/src/components/binding/ClearFieldTrigger.cjs.map +0 -1
- package/dist/production/src/components/binding/ClearFieldTrigger.js +0 -17
- package/dist/production/src/components/binding/ClearFieldTrigger.js.map +0 -1
- package/dist/production/src/components/binding/DisconnectEntityTrigger.cjs +0 -44
- package/dist/production/src/components/binding/DisconnectEntityTrigger.cjs.map +0 -1
- package/dist/production/src/components/binding/DisconnectEntityTrigger.js +0 -44
- package/dist/production/src/components/binding/DisconnectEntityTrigger.js.map +0 -1
- package/dist/production/src/components/binding/EntityBeforePersist.cjs +0 -9
- package/dist/production/src/components/binding/EntityBeforePersist.cjs.map +0 -1
- package/dist/production/src/components/binding/EntityBeforePersist.js +0 -9
- package/dist/production/src/components/binding/EntityBeforePersist.js.map +0 -1
- package/dist/production/src/components/binding/RedirectOnPersist.cjs +0 -16
- package/dist/production/src/components/binding/RedirectOnPersist.cjs.map +0 -1
- package/dist/production/src/components/binding/RedirectOnPersist.js +0 -16
- package/dist/production/src/components/binding/RedirectOnPersist.js.map +0 -1
- package/dist/production/src/hooks/useBlockNavigationOnDirtyState.cjs +0 -36
- package/dist/production/src/hooks/useBlockNavigationOnDirtyState.cjs.map +0 -1
- package/dist/production/src/hooks/useBlockNavigationOnDirtyState.js +0 -36
- package/dist/production/src/hooks/useBlockNavigationOnDirtyState.js.map +0 -1
- package/dist/production/src/hooks/useIsApplicationOutdated.cjs +0 -55
- package/dist/production/src/hooks/useIsApplicationOutdated.cjs.map +0 -1
- package/dist/production/src/hooks/useIsApplicationOutdated.js +0 -55
- package/dist/production/src/hooks/useIsApplicationOutdated.js.map +0 -1
- package/dist/types/bootstrap/ApplicationEntrypoint.d.ts +0 -16
- package/dist/types/bootstrap/ApplicationEntrypoint.d.ts.map +0 -1
- package/dist/types/bootstrap/DataViewPageNameKeyProvider.d.ts +0 -5
- package/dist/types/bootstrap/DataViewPageNameKeyProvider.d.ts.map +0 -1
- package/dist/types/bootstrap/index.d.ts +0 -2
- package/dist/types/bootstrap/index.d.ts.map +0 -1
- package/dist/types/components/binding/ClearFieldTrigger.d.ts +0 -8
- package/dist/types/components/binding/ClearFieldTrigger.d.ts.map +0 -1
- package/dist/types/components/binding/DisconnectEntityTrigger.d.ts +0 -11
- package/dist/types/components/binding/DisconnectEntityTrigger.d.ts.map +0 -1
- package/dist/types/components/binding/EntityBeforePersist.d.ts +0 -5
- package/dist/types/components/binding/EntityBeforePersist.d.ts.map +0 -1
- package/dist/types/components/binding/RedirectOnPersist.d.ts +0 -7
- package/dist/types/components/binding/RedirectOnPersist.d.ts.map +0 -1
- package/dist/types/components/binding/index.d.ts +0 -5
- package/dist/types/components/binding/index.d.ts.map +0 -1
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/components/index.d.ts.map +0 -1
- package/dist/types/hooks/index.d.ts +0 -3
- package/dist/types/hooks/index.d.ts.map +0 -1
- package/dist/types/hooks/useBlockNavigationOnDirtyState.d.ts +0 -7
- package/dist/types/hooks/useBlockNavigationOnDirtyState.d.ts.map +0 -1
- package/dist/types/hooks/useIsApplicationOutdated.d.ts +0 -4
- package/dist/types/hooks/useIsApplicationOutdated.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -8
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/tsconfig.tsbuildinfo +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntityBeforePersist.js","sources":["../../../../../../packages/interface/src/components/binding/EntityBeforePersist.tsx"],"sourcesContent":["import { EntityAccessor, useEntityBeforePersist } from '@contember/react-binding'\n\nexport const EntityBeforePersist = ({ listener }: { listener: EntityAccessor.EntityEventListenerMap['beforePersist']}) => {\n\tuseEntityBeforePersist(listener)\n\treturn null\n}\n"],"names":[],"mappings":";AAEO,MAAM,sBAAsB,CAAC,EAAE,eAAoF;AACzH,yBAAuB,QAAQ;AACxB,SAAA;AACR;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const reactBinding = require("@contember/react-binding");
|
|
4
|
-
const reactRouting = require("@contember/react-routing");
|
|
5
|
-
const RedirectOnPersist = ({ to, parameters }) => {
|
|
6
|
-
const redirect = reactRouting.useRedirect();
|
|
7
|
-
reactBinding.useEntityPersistSuccess((getEntity, options) => {
|
|
8
|
-
if (options.successType !== "justSuccess") {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
redirect(to, parameters);
|
|
12
|
-
});
|
|
13
|
-
return null;
|
|
14
|
-
};
|
|
15
|
-
exports.RedirectOnPersist = RedirectOnPersist;
|
|
16
|
-
//# sourceMappingURL=RedirectOnPersist.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectOnPersist.cjs","sources":["../../../../../../packages/interface/src/components/binding/RedirectOnPersist.tsx"],"sourcesContent":["import { useEntityPersistSuccess } from '@contember/react-binding'\nimport { RequestParameters, useRedirect } from '@contember/react-routing'\nimport { RoutingLinkTarget } from '@contember/react-routing'\n\nexport const RedirectOnPersist = ({ to, parameters }: { to: RoutingLinkTarget; parameters?: RequestParameters }) => {\n\tconst redirect = useRedirect()\n\tuseEntityPersistSuccess((getEntity, options) => {\n\t\tif (options.successType !== 'justSuccess') {\n\t\t\treturn\n\t\t}\n\t\tredirect(to, parameters)\n\t})\n\treturn null\n}\n"],"names":["useRedirect","useEntityPersistSuccess"],"mappings":";;;;AAIO,MAAM,oBAAoB,CAAC,EAAE,IAAI,iBAA4E;AACnH,QAAM,WAAWA,aAAAA,YAAY;AACLC,uCAAA,CAAC,WAAW,YAAY;AAC3C,QAAA,QAAQ,gBAAgB,eAAe;AAC1C;AAAA,IAAA;AAED,aAAS,IAAI,UAAU;AAAA,EAAA,CACvB;AACM,SAAA;AACR;;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { useEntityPersistSuccess } from "@contember/react-binding";
|
|
2
|
-
import { useRedirect } from "@contember/react-routing";
|
|
3
|
-
const RedirectOnPersist = ({ to, parameters }) => {
|
|
4
|
-
const redirect = useRedirect();
|
|
5
|
-
useEntityPersistSuccess((getEntity, options) => {
|
|
6
|
-
if (options.successType !== "justSuccess") {
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
redirect(to, parameters);
|
|
10
|
-
});
|
|
11
|
-
return null;
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
RedirectOnPersist
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=RedirectOnPersist.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectOnPersist.js","sources":["../../../../../../packages/interface/src/components/binding/RedirectOnPersist.tsx"],"sourcesContent":["import { useEntityPersistSuccess } from '@contember/react-binding'\nimport { RequestParameters, useRedirect } from '@contember/react-routing'\nimport { RoutingLinkTarget } from '@contember/react-routing'\n\nexport const RedirectOnPersist = ({ to, parameters }: { to: RoutingLinkTarget; parameters?: RequestParameters }) => {\n\tconst redirect = useRedirect()\n\tuseEntityPersistSuccess((getEntity, options) => {\n\t\tif (options.successType !== 'justSuccess') {\n\t\t\treturn\n\t\t}\n\t\tredirect(to, parameters)\n\t})\n\treturn null\n}\n"],"names":[],"mappings":";;AAIO,MAAM,oBAAoB,CAAC,EAAE,IAAI,iBAA4E;AACnH,QAAM,WAAW,YAAY;AACL,0BAAA,CAAC,WAAW,YAAY;AAC3C,QAAA,QAAQ,gBAAgB,eAAe;AAC1C;AAAA,IAAA;AAED,aAAS,IAAI,UAAU;AAAA,EAAA,CACvB;AACM,SAAA;AACR;"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const reactBinding = require("@contember/react-binding");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const reactRouting = require("@contember/react-routing");
|
|
6
|
-
const useBlockNavigationOnDirtyState = (handler, options) => {
|
|
7
|
-
const isDirty = reactBinding.useDirtinessState();
|
|
8
|
-
const isDirtyRef = React.useRef(isDirty);
|
|
9
|
-
isDirtyRef.current = isDirty;
|
|
10
|
-
const isMutating = reactBinding.useMutationState();
|
|
11
|
-
const isMutatingRef = React.useRef(isMutating);
|
|
12
|
-
isMutatingRef.current = isMutating;
|
|
13
|
-
const persist = reactBinding.usePersist();
|
|
14
|
-
reactRouting.useRegisterRequestChangeListener(React.useCallback(async (event) => {
|
|
15
|
-
if (!isDirtyRef.current || isMutatingRef.current) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const result = await handler();
|
|
19
|
-
if (result === "cancel") {
|
|
20
|
-
event.abortNavigation();
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (result === "save") {
|
|
24
|
-
try {
|
|
25
|
-
const result2 = await persist();
|
|
26
|
-
options?.onPersistSuccess?.(result2);
|
|
27
|
-
} catch (e) {
|
|
28
|
-
options?.onPersistError?.(e);
|
|
29
|
-
event.abortNavigation();
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}, [handler, options, persist]));
|
|
34
|
-
};
|
|
35
|
-
exports.useBlockNavigationOnDirtyState = useBlockNavigationOnDirtyState;
|
|
36
|
-
//# sourceMappingURL=useBlockNavigationOnDirtyState.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBlockNavigationOnDirtyState.cjs","sources":["../../../../../packages/interface/src/hooks/useBlockNavigationOnDirtyState.ts"],"sourcesContent":["import { ErrorPersistResult, SuccessfulPersistResult, useDirtinessState, useMutationState, usePersist } from '@contember/react-binding'\nimport { useCallback, useRef } from 'react'\nimport { useRegisterRequestChangeListener } from '@contember/react-routing'\n\nexport type BlockNavigationOnDirtyStateResult = 'save' | 'discard' | 'cancel'\n\nexport const useBlockNavigationOnDirtyState = (handler: () => Promise<BlockNavigationOnDirtyStateResult>, options?: {\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\tonPersistError?: (result: ErrorPersistResult) => void\n}) => {\n\tconst isDirty = useDirtinessState()\n\tconst isDirtyRef = useRef(isDirty)\n\tisDirtyRef.current = isDirty\n\tconst isMutating = useMutationState()\n\tconst isMutatingRef = useRef(isMutating)\n\tisMutatingRef.current = isMutating\n\tconst persist = usePersist()\n\n\tuseRegisterRequestChangeListener(useCallback(async event => {\n\t\tif (!isDirtyRef.current || isMutatingRef.current) {\n\t\t\treturn\n\t\t}\n\t\tconst result = await handler()\n\t\tif (result === 'cancel') {\n\t\t\tevent.abortNavigation()\n\t\t\treturn\n\t\t}\n\n\t\tif (result === 'save') {\n\t\t\ttry {\n\t\t\t\tconst result = await persist()\n\t\t\t\toptions?.onPersistSuccess?.(result)\n\t\t\t} catch (e: any) {\n\t\t\t\toptions?.onPersistError?.(e)\n\t\t\t\tevent.abortNavigation()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}, [handler, options, persist]))\n}\n"],"names":["useDirtinessState","useRef","useMutationState","usePersist","useRegisterRequestChangeListener","useCallback","result"],"mappings":";;;;;AAMa,MAAA,iCAAiC,CAAC,SAA2D,YAGpG;AACL,QAAM,UAAUA,aAAAA,kBAAkB;AAC5B,QAAA,aAAaC,aAAO,OAAO;AACjC,aAAW,UAAU;AACrB,QAAM,aAAaC,aAAAA,iBAAiB;AAC9B,QAAA,gBAAgBD,aAAO,UAAU;AACvC,gBAAc,UAAU;AACxB,QAAM,UAAUE,aAAAA,WAAW;AAEMC,gDAAAC,MAAAA,YAAY,OAAM,UAAS;AAC3D,QAAI,CAAC,WAAW,WAAW,cAAc,SAAS;AACjD;AAAA,IAAA;AAEK,UAAA,SAAS,MAAM,QAAQ;AAC7B,QAAI,WAAW,UAAU;AACxB,YAAM,gBAAgB;AACtB;AAAA,IAAA;AAGD,QAAI,WAAW,QAAQ;AAClB,UAAA;AACGC,cAAAA,UAAS,MAAM,QAAQ;AAC7B,iBAAS,mBAAmBA,OAAM;AAAA,eAC1B,GAAQ;AAChB,iBAAS,iBAAiB,CAAC;AAC3B,cAAM,gBAAgB;AACtB;AAAA,MAAA;AAAA,IACD;AAAA,KAEC,CAAC,SAAS,SAAS,OAAO,CAAC,CAAC;AAChC;;"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { useDirtinessState, useMutationState, usePersist } from "@contember/react-binding";
|
|
2
|
-
import { useRef, useCallback } from "react";
|
|
3
|
-
import { useRegisterRequestChangeListener } from "@contember/react-routing";
|
|
4
|
-
const useBlockNavigationOnDirtyState = (handler, options) => {
|
|
5
|
-
const isDirty = useDirtinessState();
|
|
6
|
-
const isDirtyRef = useRef(isDirty);
|
|
7
|
-
isDirtyRef.current = isDirty;
|
|
8
|
-
const isMutating = useMutationState();
|
|
9
|
-
const isMutatingRef = useRef(isMutating);
|
|
10
|
-
isMutatingRef.current = isMutating;
|
|
11
|
-
const persist = usePersist();
|
|
12
|
-
useRegisterRequestChangeListener(useCallback(async (event) => {
|
|
13
|
-
if (!isDirtyRef.current || isMutatingRef.current) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const result = await handler();
|
|
17
|
-
if (result === "cancel") {
|
|
18
|
-
event.abortNavigation();
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (result === "save") {
|
|
22
|
-
try {
|
|
23
|
-
const result2 = await persist();
|
|
24
|
-
options?.onPersistSuccess?.(result2);
|
|
25
|
-
} catch (e) {
|
|
26
|
-
options?.onPersistError?.(e);
|
|
27
|
-
event.abortNavigation();
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}, [handler, options, persist]));
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
useBlockNavigationOnDirtyState
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=useBlockNavigationOnDirtyState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBlockNavigationOnDirtyState.js","sources":["../../../../../packages/interface/src/hooks/useBlockNavigationOnDirtyState.ts"],"sourcesContent":["import { ErrorPersistResult, SuccessfulPersistResult, useDirtinessState, useMutationState, usePersist } from '@contember/react-binding'\nimport { useCallback, useRef } from 'react'\nimport { useRegisterRequestChangeListener } from '@contember/react-routing'\n\nexport type BlockNavigationOnDirtyStateResult = 'save' | 'discard' | 'cancel'\n\nexport const useBlockNavigationOnDirtyState = (handler: () => Promise<BlockNavigationOnDirtyStateResult>, options?: {\n\tonPersistSuccess?: (result: SuccessfulPersistResult) => void\n\tonPersistError?: (result: ErrorPersistResult) => void\n}) => {\n\tconst isDirty = useDirtinessState()\n\tconst isDirtyRef = useRef(isDirty)\n\tisDirtyRef.current = isDirty\n\tconst isMutating = useMutationState()\n\tconst isMutatingRef = useRef(isMutating)\n\tisMutatingRef.current = isMutating\n\tconst persist = usePersist()\n\n\tuseRegisterRequestChangeListener(useCallback(async event => {\n\t\tif (!isDirtyRef.current || isMutatingRef.current) {\n\t\t\treturn\n\t\t}\n\t\tconst result = await handler()\n\t\tif (result === 'cancel') {\n\t\t\tevent.abortNavigation()\n\t\t\treturn\n\t\t}\n\n\t\tif (result === 'save') {\n\t\t\ttry {\n\t\t\t\tconst result = await persist()\n\t\t\t\toptions?.onPersistSuccess?.(result)\n\t\t\t} catch (e: any) {\n\t\t\t\toptions?.onPersistError?.(e)\n\t\t\t\tevent.abortNavigation()\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t}, [handler, options, persist]))\n}\n"],"names":["result"],"mappings":";;;AAMa,MAAA,iCAAiC,CAAC,SAA2D,YAGpG;AACL,QAAM,UAAU,kBAAkB;AAC5B,QAAA,aAAa,OAAO,OAAO;AACjC,aAAW,UAAU;AACrB,QAAM,aAAa,iBAAiB;AAC9B,QAAA,gBAAgB,OAAO,UAAU;AACvC,gBAAc,UAAU;AACxB,QAAM,UAAU,WAAW;AAEM,mCAAA,YAAY,OAAM,UAAS;AAC3D,QAAI,CAAC,WAAW,WAAW,cAAc,SAAS;AACjD;AAAA,IAAA;AAEK,UAAA,SAAS,MAAM,QAAQ;AAC7B,QAAI,WAAW,UAAU;AACxB,YAAM,gBAAgB;AACtB;AAAA,IAAA;AAGD,QAAI,WAAW,QAAQ;AAClB,UAAA;AACGA,cAAAA,UAAS,MAAM,QAAQ;AAC7B,iBAAS,mBAAmBA,OAAM;AAAA,eAC1B,GAAQ;AAChB,iBAAS,iBAAiB,CAAC;AAC3B,cAAM,gBAAgB;AACtB;AAAA,MAAA;AAAA,IACD;AAAA,KAEC,CAAC,SAAS,SAAS,OAAO,CAAC,CAAC;AAChC;"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const React = require("react");
|
|
4
|
-
const defaultCheckIntervalMs = 3e4;
|
|
5
|
-
const useIsApplicationOutdated = ({ checkIntervalMs = defaultCheckIntervalMs } = {}) => {
|
|
6
|
-
const [initialVersion] = React.useState(() => {
|
|
7
|
-
return getVersionFromDocument(document.head);
|
|
8
|
-
});
|
|
9
|
-
const [isOutdated, setIsOutdated] = React.useState(false);
|
|
10
|
-
const fetchVersion = useFetchVersion();
|
|
11
|
-
const checkVersion = React.useCallback(async () => {
|
|
12
|
-
if (document.hidden) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const version = await fetchVersion();
|
|
16
|
-
if (version && version !== initialVersion) {
|
|
17
|
-
setIsOutdated(true);
|
|
18
|
-
}
|
|
19
|
-
}, [fetchVersion, initialVersion]);
|
|
20
|
-
const shouldCheck = !!initialVersion && !isOutdated;
|
|
21
|
-
React.useEffect(() => {
|
|
22
|
-
if (!shouldCheck) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
const handle = setInterval(checkVersion, checkIntervalMs);
|
|
26
|
-
return () => clearInterval(handle);
|
|
27
|
-
}, [checkIntervalMs, checkVersion, shouldCheck]);
|
|
28
|
-
React.useEffect(() => {
|
|
29
|
-
if (!shouldCheck) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
document.addEventListener("visibilitychange", checkVersion);
|
|
33
|
-
return () => document.removeEventListener("visibilitychange", checkVersion);
|
|
34
|
-
}, [checkVersion, shouldCheck]);
|
|
35
|
-
return isOutdated;
|
|
36
|
-
};
|
|
37
|
-
const getVersionFromDocument = (node) => {
|
|
38
|
-
const meta = node.querySelector("meta[name=contember-build-version]");
|
|
39
|
-
return meta?.content;
|
|
40
|
-
};
|
|
41
|
-
const useFetchVersion = () => {
|
|
42
|
-
return React.useCallback(async () => {
|
|
43
|
-
try {
|
|
44
|
-
const result = await (await fetch(window.location.href)).text();
|
|
45
|
-
const html = document.createElement("html");
|
|
46
|
-
html.innerHTML = result;
|
|
47
|
-
return getVersionFromDocument(html);
|
|
48
|
-
} catch (e) {
|
|
49
|
-
console.error(e);
|
|
50
|
-
return void 0;
|
|
51
|
-
}
|
|
52
|
-
}, []);
|
|
53
|
-
};
|
|
54
|
-
exports.useIsApplicationOutdated = useIsApplicationOutdated;
|
|
55
|
-
//# sourceMappingURL=useIsApplicationOutdated.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsApplicationOutdated.cjs","sources":["../../../../../packages/interface/src/hooks/useIsApplicationOutdated.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\n\nconst defaultCheckIntervalMs = 30_000\n\n\nexport const useIsApplicationOutdated = ({ checkIntervalMs = defaultCheckIntervalMs }: {\n\tcheckIntervalMs?: number\n} = {}) => {\n\tconst [initialVersion] = useState(() => {\n\t\treturn getVersionFromDocument(document.head)\n\t})\n\tconst [isOutdated, setIsOutdated] = useState(false)\n\tconst fetchVersion = useFetchVersion()\n\n\tconst checkVersion = useCallback(async () => {\n\t\tif (document.hidden) {\n\t\t\treturn\n\t\t}\n\t\tconst version = await fetchVersion()\n\t\tif (version && version !== initialVersion) {\n\t\t\tsetIsOutdated(true)\n\t\t}\n\t}, [fetchVersion, initialVersion])\n\tconst shouldCheck = !!initialVersion && !isOutdated\n\n\tuseEffect(() => {\n\t\tif (!shouldCheck) {\n\t\t\treturn\n\t\t}\n\t\tconst handle = setInterval(checkVersion, checkIntervalMs)\n\t\treturn () => clearInterval(handle)\n\t}, [checkIntervalMs, checkVersion, shouldCheck])\n\n\tuseEffect(() => {\n\t\tif (!shouldCheck) {\n\t\t\treturn\n\t\t}\n\t\tdocument.addEventListener('visibilitychange', checkVersion)\n\t\treturn () => document.removeEventListener('visibilitychange', checkVersion)\n\t}, [checkVersion, shouldCheck])\n\n\treturn isOutdated\n}\n\nconst getVersionFromDocument = (node: ParentNode) => {\n\tconst meta = node.querySelector<HTMLMetaElement>('meta[name=contember-build-version]')\n\treturn meta?.content\n}\n\nconst useFetchVersion = () => {\n\treturn useCallback(async () => {\n\t\ttry {\n\t\t\tconst result = await (await fetch(window.location.href)).text()\n\t\t\tconst html = document.createElement('html')\n\t\t\thtml.innerHTML = result\n\t\t\treturn getVersionFromDocument(html)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn undefined\n\t\t}\n\t}, [])\n}\n"],"names":["useState","useCallback","useEffect"],"mappings":";;;AAEA,MAAM,yBAAyB;AAGxB,MAAM,2BAA2B,CAAC,EAAE,kBAAkB,uBAAuB,IAEhF,CAAA,MAAO;AACV,QAAM,CAAC,cAAc,IAAIA,MAAAA,SAAS,MAAM;AAChC,WAAA,uBAAuB,SAAS,IAAI;AAAA,EAAA,CAC3C;AACD,QAAM,CAAC,YAAY,aAAa,IAAIA,MAAAA,SAAS,KAAK;AAClD,QAAM,eAAe,gBAAgB;AAE/B,QAAA,eAAeC,MAAAA,YAAY,YAAY;AAC5C,QAAI,SAAS,QAAQ;AACpB;AAAA,IAAA;AAEK,UAAA,UAAU,MAAM,aAAa;AAC/B,QAAA,WAAW,YAAY,gBAAgB;AAC1C,oBAAc,IAAI;AAAA,IAAA;AAAA,EACnB,GACE,CAAC,cAAc,cAAc,CAAC;AACjC,QAAM,cAAc,CAAC,CAAC,kBAAkB,CAAC;AAEzCC,QAAAA,UAAU,MAAM;AACf,QAAI,CAAC,aAAa;AACjB;AAAA,IAAA;AAEK,UAAA,SAAS,YAAY,cAAc,eAAe;AACjD,WAAA,MAAM,cAAc,MAAM;AAAA,EAC/B,GAAA,CAAC,iBAAiB,cAAc,WAAW,CAAC;AAE/CA,QAAAA,UAAU,MAAM;AACf,QAAI,CAAC,aAAa;AACjB;AAAA,IAAA;AAEQ,aAAA,iBAAiB,oBAAoB,YAAY;AAC1D,WAAO,MAAM,SAAS,oBAAoB,oBAAoB,YAAY;AAAA,EAAA,GACxE,CAAC,cAAc,WAAW,CAAC;AAEvB,SAAA;AACR;AAEA,MAAM,yBAAyB,CAAC,SAAqB;AAC9C,QAAA,OAAO,KAAK,cAA+B,oCAAoC;AACrF,SAAO,MAAM;AACd;AAEA,MAAM,kBAAkB,MAAM;AAC7B,SAAOD,kBAAY,YAAY;AAC1B,QAAA;AACG,YAAA,SAAS,OAAO,MAAM,MAAM,OAAO,SAAS,IAAI,GAAG,KAAK;AACxD,YAAA,OAAO,SAAS,cAAc,MAAM;AAC1C,WAAK,YAAY;AACjB,aAAO,uBAAuB,IAAI;AAAA,aAC1B,GAAG;AACX,cAAQ,MAAM,CAAC;AACR,aAAA;AAAA,IAAA;AAAA,EAET,GAAG,EAAE;AACN;;"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { useState, useCallback, useEffect } from "react";
|
|
2
|
-
const defaultCheckIntervalMs = 3e4;
|
|
3
|
-
const useIsApplicationOutdated = ({ checkIntervalMs = defaultCheckIntervalMs } = {}) => {
|
|
4
|
-
const [initialVersion] = useState(() => {
|
|
5
|
-
return getVersionFromDocument(document.head);
|
|
6
|
-
});
|
|
7
|
-
const [isOutdated, setIsOutdated] = useState(false);
|
|
8
|
-
const fetchVersion = useFetchVersion();
|
|
9
|
-
const checkVersion = useCallback(async () => {
|
|
10
|
-
if (document.hidden) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const version = await fetchVersion();
|
|
14
|
-
if (version && version !== initialVersion) {
|
|
15
|
-
setIsOutdated(true);
|
|
16
|
-
}
|
|
17
|
-
}, [fetchVersion, initialVersion]);
|
|
18
|
-
const shouldCheck = !!initialVersion && !isOutdated;
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (!shouldCheck) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const handle = setInterval(checkVersion, checkIntervalMs);
|
|
24
|
-
return () => clearInterval(handle);
|
|
25
|
-
}, [checkIntervalMs, checkVersion, shouldCheck]);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (!shouldCheck) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
document.addEventListener("visibilitychange", checkVersion);
|
|
31
|
-
return () => document.removeEventListener("visibilitychange", checkVersion);
|
|
32
|
-
}, [checkVersion, shouldCheck]);
|
|
33
|
-
return isOutdated;
|
|
34
|
-
};
|
|
35
|
-
const getVersionFromDocument = (node) => {
|
|
36
|
-
const meta = node.querySelector("meta[name=contember-build-version]");
|
|
37
|
-
return meta?.content;
|
|
38
|
-
};
|
|
39
|
-
const useFetchVersion = () => {
|
|
40
|
-
return useCallback(async () => {
|
|
41
|
-
try {
|
|
42
|
-
const result = await (await fetch(window.location.href)).text();
|
|
43
|
-
const html = document.createElement("html");
|
|
44
|
-
html.innerHTML = result;
|
|
45
|
-
return getVersionFromDocument(html);
|
|
46
|
-
} catch (e) {
|
|
47
|
-
console.error(e);
|
|
48
|
-
return void 0;
|
|
49
|
-
}
|
|
50
|
-
}, []);
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
useIsApplicationOutdated
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=useIsApplicationOutdated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsApplicationOutdated.js","sources":["../../../../../packages/interface/src/hooks/useIsApplicationOutdated.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react'\n\nconst defaultCheckIntervalMs = 30_000\n\n\nexport const useIsApplicationOutdated = ({ checkIntervalMs = defaultCheckIntervalMs }: {\n\tcheckIntervalMs?: number\n} = {}) => {\n\tconst [initialVersion] = useState(() => {\n\t\treturn getVersionFromDocument(document.head)\n\t})\n\tconst [isOutdated, setIsOutdated] = useState(false)\n\tconst fetchVersion = useFetchVersion()\n\n\tconst checkVersion = useCallback(async () => {\n\t\tif (document.hidden) {\n\t\t\treturn\n\t\t}\n\t\tconst version = await fetchVersion()\n\t\tif (version && version !== initialVersion) {\n\t\t\tsetIsOutdated(true)\n\t\t}\n\t}, [fetchVersion, initialVersion])\n\tconst shouldCheck = !!initialVersion && !isOutdated\n\n\tuseEffect(() => {\n\t\tif (!shouldCheck) {\n\t\t\treturn\n\t\t}\n\t\tconst handle = setInterval(checkVersion, checkIntervalMs)\n\t\treturn () => clearInterval(handle)\n\t}, [checkIntervalMs, checkVersion, shouldCheck])\n\n\tuseEffect(() => {\n\t\tif (!shouldCheck) {\n\t\t\treturn\n\t\t}\n\t\tdocument.addEventListener('visibilitychange', checkVersion)\n\t\treturn () => document.removeEventListener('visibilitychange', checkVersion)\n\t}, [checkVersion, shouldCheck])\n\n\treturn isOutdated\n}\n\nconst getVersionFromDocument = (node: ParentNode) => {\n\tconst meta = node.querySelector<HTMLMetaElement>('meta[name=contember-build-version]')\n\treturn meta?.content\n}\n\nconst useFetchVersion = () => {\n\treturn useCallback(async () => {\n\t\ttry {\n\t\t\tconst result = await (await fetch(window.location.href)).text()\n\t\t\tconst html = document.createElement('html')\n\t\t\thtml.innerHTML = result\n\t\t\treturn getVersionFromDocument(html)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn undefined\n\t\t}\n\t}, [])\n}\n"],"names":[],"mappings":";AAEA,MAAM,yBAAyB;AAGxB,MAAM,2BAA2B,CAAC,EAAE,kBAAkB,uBAAuB,IAEhF,CAAA,MAAO;AACV,QAAM,CAAC,cAAc,IAAI,SAAS,MAAM;AAChC,WAAA,uBAAuB,SAAS,IAAI;AAAA,EAAA,CAC3C;AACD,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,eAAe,gBAAgB;AAE/B,QAAA,eAAe,YAAY,YAAY;AAC5C,QAAI,SAAS,QAAQ;AACpB;AAAA,IAAA;AAEK,UAAA,UAAU,MAAM,aAAa;AAC/B,QAAA,WAAW,YAAY,gBAAgB;AAC1C,oBAAc,IAAI;AAAA,IAAA;AAAA,EACnB,GACE,CAAC,cAAc,cAAc,CAAC;AACjC,QAAM,cAAc,CAAC,CAAC,kBAAkB,CAAC;AAEzC,YAAU,MAAM;AACf,QAAI,CAAC,aAAa;AACjB;AAAA,IAAA;AAEK,UAAA,SAAS,YAAY,cAAc,eAAe;AACjD,WAAA,MAAM,cAAc,MAAM;AAAA,EAC/B,GAAA,CAAC,iBAAiB,cAAc,WAAW,CAAC;AAE/C,YAAU,MAAM;AACf,QAAI,CAAC,aAAa;AACjB;AAAA,IAAA;AAEQ,aAAA,iBAAiB,oBAAoB,YAAY;AAC1D,WAAO,MAAM,SAAS,oBAAoB,oBAAoB,YAAY;AAAA,EAAA,GACxE,CAAC,cAAc,WAAW,CAAC;AAEvB,SAAA;AACR;AAEA,MAAM,yBAAyB,CAAC,SAAqB;AAC9C,QAAA,OAAO,KAAK,cAA+B,oCAAoC;AACrF,SAAO,MAAM;AACd;AAEA,MAAM,kBAAkB,MAAM;AAC7B,SAAO,YAAY,YAAY;AAC1B,QAAA;AACG,YAAA,SAAS,OAAO,MAAM,MAAM,OAAO,SAAS,IAAI,GAAG,KAAK;AACxD,YAAA,OAAO,SAAS,cAAc,MAAM;AAC1C,WAAK,YAAY;AACjB,aAAO,uBAAuB,IAAI;AAAA,aAC1B,GAAG;AACX,cAAQ,MAAM,CAAC;AACR,aAAA;AAAA,IAAA;AAAA,EAET,GAAG,EAAE;AACN;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Environment } from '@contember/react-binding';
|
|
2
|
-
import { ContemberClientProps } from '@contember/react-client';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
import { RouteMap } from '@contember/react-routing';
|
|
5
|
-
export interface ApplicationEntrypointProps extends ContemberClientProps {
|
|
6
|
-
basePath: string;
|
|
7
|
-
sessionToken?: string;
|
|
8
|
-
routes?: RouteMap;
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
environment?: Environment;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @group Entrypoints
|
|
14
|
-
*/
|
|
15
|
-
export declare const ApplicationEntrypoint: (props: ApplicationEntrypointProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
//# sourceMappingURL=ApplicationEntrypoint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationEntrypoint.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/ApplicationEntrypoint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoD,MAAM,0BAA0B,CAAA;AACxG,OAAO,EAAmB,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAwC,MAAM,0BAA0B,CAAA;AAIzF,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACvE,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,CAAC,EAAE,QAAQ,CAAA;IACjB,QAAQ,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;CACzB;AAQD;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,0BAA0B,4CAmCtE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewPageNameKeyProvider.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/DataViewPageNameKeyProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,eAAO,MAAM,2BAA2B,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAQhF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { SugaredRelativeSingleField } from '@contember/react-binding';
|
|
3
|
-
export interface ClearFieldTriggerProps {
|
|
4
|
-
field: SugaredRelativeSingleField['field'];
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
export declare const ClearFieldTrigger: import("react").NamedExoticComponent<ClearFieldTriggerProps>;
|
|
8
|
-
//# sourceMappingURL=ClearFieldTrigger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClearFieldTrigger.d.ts","sourceRoot":"","sources":["../../../../src/components/binding/ClearFieldTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAA;AAE9C,OAAO,EAAoB,0BAA0B,EAAY,MAAM,0BAA0B,CAAA;AAEjG,MAAM,WAAW,sBAAsB;IACtC,KAAK,EAAE,0BAA0B,CAAC,OAAO,CAAC,CAAA;IAC1C,QAAQ,EAAE,SAAS,CAAA;CACnB;AAED,eAAO,MAAM,iBAAiB,8DAQ5B,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ErrorPersistResult, SuccessfulPersistResult, SugaredRelativeSingleEntity } from '@contember/react-binding';
|
|
3
|
-
export interface DisconnectEntityTriggerProps {
|
|
4
|
-
immediatePersist?: true;
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
onPersistSuccess?: (result: SuccessfulPersistResult) => void;
|
|
7
|
-
onPersistError?: (result: ErrorPersistResult) => void;
|
|
8
|
-
field?: SugaredRelativeSingleEntity['field'];
|
|
9
|
-
}
|
|
10
|
-
export declare const DisconnectEntityTrigger: ({ immediatePersist, onPersistError, onPersistSuccess, field, ...props }: DisconnectEntityTriggerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
//# sourceMappingURL=DisconnectEntityTrigger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DisconnectEntityTrigger.d.ts","sourceRoot":"","sources":["../../../../src/components/binding/DisconnectEntityTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAe,MAAM,OAAO,CAAA;AAE7D,OAAO,EAAoC,kBAAkB,EACtC,uBAAuB,EAAE,2BAA2B,EAA2C,MAAM,0BAA0B,CAAA;AAKtJ,MAAM,WAAW,4BAA4B;IAC5C,gBAAgB,CAAC,EAAE,IAAI,CAAA;IACvB,QAAQ,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAA;IAC5D,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;IACrD,KAAK,CAAC,EAAE,2BAA2B,CAAC,OAAO,CAAC,CAAA;CAC5C;AAED,eAAO,MAAM,uBAAuB,GAAI,yEAAyE,4BAA4B,4CAqC5I,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EntityBeforePersist.d.ts","sourceRoot":"","sources":["../../../../src/components/binding/EntityBeforePersist.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA0B,MAAM,0BAA0B,CAAA;AAEjF,eAAO,MAAM,mBAAmB,GAAI,cAAc;IAAE,QAAQ,EAAE,cAAc,CAAC,sBAAsB,CAAC,eAAe,CAAC,CAAA;CAAC,SAGpH,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RequestParameters } from '@contember/react-routing';
|
|
2
|
-
import { RoutingLinkTarget } from '@contember/react-routing';
|
|
3
|
-
export declare const RedirectOnPersist: ({ to, parameters }: {
|
|
4
|
-
to: RoutingLinkTarget;
|
|
5
|
-
parameters?: RequestParameters;
|
|
6
|
-
}) => null;
|
|
7
|
-
//# sourceMappingURL=RedirectOnPersist.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RedirectOnPersist.d.ts","sourceRoot":"","sources":["../../../../src/components/binding/RedirectOnPersist.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAe,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,eAAO,MAAM,iBAAiB,GAAI,oBAAoB;IAAE,EAAE,EAAE,iBAAiB,CAAC;IAAC,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAAE,SAS9G,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/binding/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,cAAc,uBAAuB,CAAA;AACrC,cAAc,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kCAAkC,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ErrorPersistResult, SuccessfulPersistResult } from '@contember/react-binding';
|
|
2
|
-
export type BlockNavigationOnDirtyStateResult = 'save' | 'discard' | 'cancel';
|
|
3
|
-
export declare const useBlockNavigationOnDirtyState: (handler: () => Promise<BlockNavigationOnDirtyStateResult>, options?: {
|
|
4
|
-
onPersistSuccess?: (result: SuccessfulPersistResult) => void;
|
|
5
|
-
onPersistError?: (result: ErrorPersistResult) => void;
|
|
6
|
-
}) => void;
|
|
7
|
-
//# sourceMappingURL=useBlockNavigationOnDirtyState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBlockNavigationOnDirtyState.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBlockNavigationOnDirtyState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAmD,MAAM,0BAA0B,CAAA;AAIvI,MAAM,MAAM,iCAAiC,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE7E,eAAO,MAAM,8BAA8B,GAAI,SAAS,MAAM,OAAO,CAAC,iCAAiC,CAAC,EAAE,UAAU;IACnH,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAA;IAC5D,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;CACrD,SA8BA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsApplicationOutdated.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsApplicationOutdated.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB,GAAI,sBAA8C;IACtF,eAAe,CAAC,EAAE,MAAM,CAAA;CACnB,YAmCL,CAAA"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './bootstrap';
|
|
2
|
-
export * from './components';
|
|
3
|
-
export * from './hooks';
|
|
4
|
-
export * from '@contember/react-routing';
|
|
5
|
-
export * from '@contember/react-binding';
|
|
6
|
-
export * from '@contember/react-identity';
|
|
7
|
-
export { createErrorHandler, } from '@contember/react-devbar';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA;AACvB,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,OAAO,EACN,kBAAkB,GAClB,MAAM,yBAAyB,CAAA"}
|