@australiangreens/ag-internal-components 0.4.0 → 0.4.2
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/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/FetchAutocomplete/FetchAutocomplete.comp.test.d.ts +2 -0
- package/dist/components/FetchAutocomplete/FetchAutocomplete.comp.test.d.ts.map +1 -0
- package/dist/components/NavBarLink/NavBarLink.comp.test.d.ts +2 -0
- package/dist/components/NavBarLink/NavBarLink.comp.test.d.ts.map +1 -0
- package/dist/components/SingleAutocomplete/index.comp.test.d.ts +2 -0
- package/dist/components/SingleAutocomplete/index.comp.test.d.ts.map +1 -0
- package/dist/domainCode/DomainCodeDialog.d.ts +1 -14
- package/dist/domainCode/DomainCodeDialog.d.ts.map +1 -1
- package/dist/domainCode/hooks.d.ts +14 -0
- package/dist/domainCode/hooks.d.ts.map +1 -1
- package/dist/esm/index.js +15 -15
- package/dist/esm/index.js.map +1 -1
- package/package.json +5 -2
- package/dist/components/FetchAutocomplete/FetchAutocomplete.test.d.ts +0 -2
- package/dist/components/FetchAutocomplete/FetchAutocomplete.test.d.ts.map +0 -1
- package/dist/components/SingleAutocomplete/index.test.d.ts +0 -2
- package/dist/components/SingleAutocomplete/index.test.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FetchAutocomplete.comp.test.d.ts","sourceRoot":"","sources":["../../../src/components/FetchAutocomplete/FetchAutocomplete.comp.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavBarLink.comp.test.d.ts","sourceRoot":"","sources":["../../../src/components/NavBarLink/NavBarLink.comp.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.comp.test.d.ts","sourceRoot":"","sources":["../../../src/components/SingleAutocomplete/index.comp.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
|
|
3
|
-
readonly act: "ACT";
|
|
4
|
-
readonly nsw: "NSW";
|
|
5
|
-
readonly nt: "NT";
|
|
6
|
-
readonly qld: "QLD";
|
|
7
|
-
readonly sa: "SA";
|
|
8
|
-
readonly tas: "TAS";
|
|
9
|
-
readonly vic: "VIC";
|
|
10
|
-
readonly wa: "WA";
|
|
11
|
-
readonly ag: "AG";
|
|
12
|
-
readonly fedmps: "FedMPs";
|
|
13
|
-
readonly '': "";
|
|
14
|
-
};
|
|
15
|
-
export type DomainCode = keyof typeof DOMAIN_CODE_LABELS;
|
|
2
|
+
import { DomainCode } from './hooks';
|
|
16
3
|
export declare const getDomainOptionLabel: (domainCode: DomainCode | null) => "" | "N/A" | "ACT" | "NSW" | "NT" | "QLD" | "SA" | "TAS" | "VIC" | "WA" | "AG" | "FedMPs";
|
|
17
4
|
type Props = PropsWithChildren<{
|
|
18
5
|
isLoading: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DomainCodeDialog.d.ts","sourceRoot":"","sources":["../../src/domainCode/DomainCodeDialog.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DomainCodeDialog.d.ts","sourceRoot":"","sources":["../../src/domainCode/DomainCodeDialog.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAsB,UAAU,EAAkB,MAAM,SAAS,CAAC;AAEzE,eAAO,MAAM,oBAAoB,GAAI,YAAY,UAAU,GAAG,IAAI,8FAEjE,CAAC;AAEF,KAAK,KAAK,GAAG,iBAAiB,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,UAAU,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CACnD,CAAC,CAAC;AAEH,QAAA,MAAM,gBAAgB,GAAI,4GAQvB,KAAK,4CA4FP,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
export declare const DOMAIN_CODE_LABELS: {
|
|
2
|
+
readonly act: "ACT";
|
|
3
|
+
readonly nsw: "NSW";
|
|
4
|
+
readonly nt: "NT";
|
|
5
|
+
readonly qld: "QLD";
|
|
6
|
+
readonly sa: "SA";
|
|
7
|
+
readonly tas: "TAS";
|
|
8
|
+
readonly vic: "VIC";
|
|
9
|
+
readonly wa: "WA";
|
|
10
|
+
readonly ag: "AG";
|
|
11
|
+
readonly fedmps: "FedMPs";
|
|
12
|
+
readonly '': "";
|
|
13
|
+
};
|
|
14
|
+
export type DomainCode = keyof typeof DOMAIN_CODE_LABELS;
|
|
1
15
|
export declare const domainCodeAtom: import('jotai').WritableAtom<"" | "act" | "nsw" | "nt" | "qld" | "sa" | "tas" | "vic" | "wa" | "ag" | "fedmps", [newValue: "" | "act" | "nsw" | "nt" | "qld" | "sa" | "tas" | "vic" | "wa" | "ag" | "fedmps"], void>;
|
|
2
16
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/domainCode/hooks.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/domainCode/hooks.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;CAYrB,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAQzD,eAAO,MAAM,cAAc,sNAM1B,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -767,16 +767,7 @@ function co() {
|
|
|
767
767
|
}
|
|
768
768
|
const Zo = Ot(
|
|
769
769
|
(e = { autoHideDuration: 1 }, t = {}, o = {}) => ({ children: i }) => /* @__PURE__ */ n(lo, F(d({}, e), { overrideState: t, overrideActions: o, children: /* @__PURE__ */ n($, { children: i }) }))
|
|
770
|
-
),
|
|
771
|
-
var Oe;
|
|
772
|
-
const Ne = O(
|
|
773
|
-
JSON.parse((Oe = localStorage.getItem(ot)) != null ? Oe : '{"domainCode": ""}').domainCode
|
|
774
|
-
), uo = O(
|
|
775
|
-
(e) => e(Ne),
|
|
776
|
-
(e, t, o) => {
|
|
777
|
-
t(Ne, o), localStorage.setItem(ot, JSON.stringify({ domainCode: o }));
|
|
778
|
-
}
|
|
779
|
-
), po = {
|
|
770
|
+
), uo = {
|
|
780
771
|
act: "ACT",
|
|
781
772
|
nsw: "NSW",
|
|
782
773
|
nt: "NT",
|
|
@@ -788,9 +779,18 @@ const Ne = O(
|
|
|
788
779
|
ag: "AG",
|
|
789
780
|
fedmps: "FedMPs",
|
|
790
781
|
"": ""
|
|
791
|
-
},
|
|
782
|
+
}, ot = "domainCode";
|
|
783
|
+
var Oe;
|
|
784
|
+
const Ne = O(
|
|
785
|
+
JSON.parse((Oe = localStorage.getItem(ot)) != null ? Oe : '{"domainCode": ""}').domainCode
|
|
786
|
+
), po = O(
|
|
787
|
+
(e) => e(Ne),
|
|
788
|
+
(e, t, o) => {
|
|
789
|
+
t(Ne, o), localStorage.setItem(ot, JSON.stringify({ domainCode: o }));
|
|
790
|
+
}
|
|
791
|
+
), nt = (e) => {
|
|
792
792
|
var t;
|
|
793
|
-
return e === null ? "N/A" : (t =
|
|
793
|
+
return e === null ? "N/A" : (t = uo[e]) != null ? t : "";
|
|
794
794
|
}, jo = ({
|
|
795
795
|
isLoading: e,
|
|
796
796
|
isOpen: t,
|
|
@@ -800,7 +800,7 @@ const Ne = O(
|
|
|
800
800
|
applicationName: s,
|
|
801
801
|
handleLogout: u
|
|
802
802
|
}) => {
|
|
803
|
-
const [a, c] = U(
|
|
803
|
+
const [a, c] = U(po), [l, g] = H(a), { enqueueSuccessNotification: x } = co(), v = r.length === 0, m = !!a && !r.includes(a) && !r.includes(l), C = !a || v || m, S = () => L(null, null, function* () {
|
|
804
804
|
l ? (c(l), i == null || i(l), x(`Set organisation to ${l}`), o()) : (c(""), i == null || i(""));
|
|
805
805
|
}), h = () => L(null, null, function* () {
|
|
806
806
|
a && !v && !m ? (g(a), o()) : C && u();
|
|
@@ -1393,7 +1393,7 @@ export {
|
|
|
1393
1393
|
Qo as AuthGuard,
|
|
1394
1394
|
et as Context,
|
|
1395
1395
|
tt as ContextError,
|
|
1396
|
-
|
|
1396
|
+
uo as DOMAIN_CODE_LABELS,
|
|
1397
1397
|
jo as DomainCodeDialog,
|
|
1398
1398
|
Go as ExampleComponent,
|
|
1399
1399
|
Vo as FetchAutocomplete,
|
|
@@ -1404,7 +1404,7 @@ export {
|
|
|
1404
1404
|
Yo as SessionExpiryDialog,
|
|
1405
1405
|
Xo as SingleAutocomplete,
|
|
1406
1406
|
en as determineUserLevelFromClaims,
|
|
1407
|
-
|
|
1407
|
+
po as domainCodeAtom,
|
|
1408
1408
|
ln as fed21Theme,
|
|
1409
1409
|
Ht as getAuth0Expiry,
|
|
1410
1410
|
nt as getDomainOptionLabel,
|