@vuu-ui/vuu-data-react 0.10.10 → 0.11.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/cjs/datasource-provider/useAutoLoginToVuuServer.js +1 -1
- package/cjs/datasource-provider/useAutoLoginToVuuServer.js.map +1 -1
- package/esm/datasource-provider/useAutoLoginToVuuServer.js +1 -1
- package/esm/datasource-provider/useAutoLoginToVuuServer.js.map +1 -1
- package/package.json +13 -13
- package/types/datasource-provider/useAutoLoginToVuuServer.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutoLoginToVuuServer.js","sources":["../../src/datasource-provider/useAutoLoginToVuuServer.tsx"],"sourcesContent":["import {\n authenticate as vuuAuthenticate,\n ConnectionManager,\n} from \"@vuu-ui/vuu-data-remote\";\nimport { useEffect, useState } from \"react\";\n\nexport const useAutoLoginToVuuServer = ({\n authenticate = true,\n autoConnect = true,\n autoLogin = true,\n secure = true,\n websocketUrl,\n}: {\n authenticate?: boolean;\n autoConnect?: boolean;\n autoLogin?: boolean;\n secure?: boolean;\n websocketUrl?: string;\n} = {}) => {\n const [errorMessage, setErrorMessage] = useState(\"\");\n useEffect(() => {\n const connect = async () => {\n try {\n let token = \"no-token\";\n if (authenticate) {\n token = (await vuuAuthenticate(\n \"steve\",\n \"xyz\",\n \"/api/authn\",\n )) as string;\n }\n\n const url =\n websocketUrl ?? `${secure ? \"wss\" : \"ws\"}://localhost/8090/websocket`;\n\n ConnectionManager.connect({\n url,\n token,\n username: \"steve\",\n });\n } catch (e: unknown) {\n if (e instanceof Error) {\n console.error(e.message);\n setErrorMessage(e.message);\n }\n }\n };\n if (autoConnect) {\n connect();\n }\n\n return () => {\n if (autoConnect) {\n ConnectionManager.disconnect();\n }\n };\n }, [authenticate, autoConnect, secure, websocketUrl]);\n\n if (errorMessage) {\n return (\n <p>\n Unable to authenticate against Vuu Server A Vuu Server instance must be\n running to show this example.\n </p>\n );\n }\n};\n"],"names":["useState","useEffect","vuuAuthenticate","ConnectionManager","jsx"],"mappings":";;;;;;AAMO,MAAM,0BAA0B,CAAC;AAAA,EACtC,YAAe,GAAA,IAAA;AAAA,EACf,WAAc,GAAA,IAAA;AAAA
|
|
1
|
+
{"version":3,"file":"useAutoLoginToVuuServer.js","sources":["../../src/datasource-provider/useAutoLoginToVuuServer.tsx"],"sourcesContent":["import {\n authenticate as vuuAuthenticate,\n ConnectionManager,\n} from \"@vuu-ui/vuu-data-remote\";\nimport { useEffect, useState } from \"react\";\n\nexport const useAutoLoginToVuuServer = ({\n authenticate = true,\n autoConnect = true,\n // autoLogin = true,\n secure = true,\n websocketUrl,\n}: {\n authenticate?: boolean;\n autoConnect?: boolean;\n autoLogin?: boolean;\n secure?: boolean;\n websocketUrl?: string;\n} = {}) => {\n const [errorMessage, setErrorMessage] = useState(\"\");\n useEffect(() => {\n const connect = async () => {\n try {\n let token = \"no-token\";\n if (authenticate) {\n token = (await vuuAuthenticate(\n \"steve\",\n \"xyz\",\n \"/api/authn\",\n )) as string;\n }\n\n const url =\n websocketUrl ?? `${secure ? \"wss\" : \"ws\"}://localhost/8090/websocket`;\n\n ConnectionManager.connect({\n url,\n token,\n username: \"steve\",\n });\n } catch (e: unknown) {\n if (e instanceof Error) {\n console.error(e.message);\n setErrorMessage(e.message);\n }\n }\n };\n if (autoConnect) {\n connect();\n }\n\n return () => {\n if (autoConnect) {\n ConnectionManager.disconnect();\n }\n };\n }, [authenticate, autoConnect, secure, websocketUrl]);\n\n if (errorMessage) {\n return (\n <p>\n Unable to authenticate against Vuu Server A Vuu Server instance must be\n running to show this example.\n </p>\n );\n }\n};\n"],"names":["useState","useEffect","vuuAuthenticate","ConnectionManager","jsx"],"mappings":";;;;;;AAMO,MAAM,0BAA0B,CAAC;AAAA,EACtC,YAAe,GAAA,IAAA;AAAA,EACf,WAAc,GAAA,IAAA;AAAA;AAAA,EAEd,MAAS,GAAA,IAAA;AAAA,EACT;AACF,CAAA,GAMI,EAAO,KAAA;AACT,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAIA,eAAS,EAAE,CAAA;AACnD,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,MAAM,UAAU,YAAY;AAC1B,MAAI,IAAA;AACF,QAAA,IAAI,KAAQ,GAAA,UAAA;AACZ,QAAA,IAAI,YAAc,EAAA;AAChB,UAAA,KAAA,GAAS,MAAMC,0BAAA;AAAA,YACb,OAAA;AAAA,YACA,KAAA;AAAA,YACA;AAAA,WACF;AAAA;AAGF,QAAA,MAAM,GACJ,GAAA,YAAA,IAAgB,CAAG,EAAA,MAAA,GAAS,QAAQ,IAAI,CAAA,2BAAA,CAAA;AAE1C,QAAAC,+BAAA,CAAkB,OAAQ,CAAA;AAAA,UACxB,GAAA;AAAA,UACA,KAAA;AAAA,UACA,QAAU,EAAA;AAAA,SACX,CAAA;AAAA,eACM,CAAY,EAAA;AACnB,QAAA,IAAI,aAAa,KAAO,EAAA;AACtB,UAAQ,OAAA,CAAA,KAAA,CAAM,EAAE,OAAO,CAAA;AACvB,UAAA,eAAA,CAAgB,EAAE,OAAO,CAAA;AAAA;AAC3B;AACF,KACF;AACA,IAAA,IAAI,WAAa,EAAA;AACf,MAAQ,OAAA,EAAA;AAAA;AAGV,IAAA,OAAO,MAAM;AACX,MAAA,IAAI,WAAa,EAAA;AACf,QAAAA,+BAAA,CAAkB,UAAW,EAAA;AAAA;AAC/B,KACF;AAAA,KACC,CAAC,YAAA,EAAc,WAAa,EAAA,MAAA,EAAQ,YAAY,CAAC,CAAA;AAEpD,EAAA,IAAI,YAAc,EAAA;AAChB,IACE,uBAAAC,cAAA,CAAC,OAAE,QAGH,EAAA,uGAAA,EAAA,CAAA;AAAA;AAGN;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAutoLoginToVuuServer.js","sources":["../../src/datasource-provider/useAutoLoginToVuuServer.tsx"],"sourcesContent":["import {\n authenticate as vuuAuthenticate,\n ConnectionManager,\n} from \"@vuu-ui/vuu-data-remote\";\nimport { useEffect, useState } from \"react\";\n\nexport const useAutoLoginToVuuServer = ({\n authenticate = true,\n autoConnect = true,\n autoLogin = true,\n secure = true,\n websocketUrl,\n}: {\n authenticate?: boolean;\n autoConnect?: boolean;\n autoLogin?: boolean;\n secure?: boolean;\n websocketUrl?: string;\n} = {}) => {\n const [errorMessage, setErrorMessage] = useState(\"\");\n useEffect(() => {\n const connect = async () => {\n try {\n let token = \"no-token\";\n if (authenticate) {\n token = (await vuuAuthenticate(\n \"steve\",\n \"xyz\",\n \"/api/authn\",\n )) as string;\n }\n\n const url =\n websocketUrl ?? `${secure ? \"wss\" : \"ws\"}://localhost/8090/websocket`;\n\n ConnectionManager.connect({\n url,\n token,\n username: \"steve\",\n });\n } catch (e: unknown) {\n if (e instanceof Error) {\n console.error(e.message);\n setErrorMessage(e.message);\n }\n }\n };\n if (autoConnect) {\n connect();\n }\n\n return () => {\n if (autoConnect) {\n ConnectionManager.disconnect();\n }\n };\n }, [authenticate, autoConnect, secure, websocketUrl]);\n\n if (errorMessage) {\n return (\n <p>\n Unable to authenticate against Vuu Server A Vuu Server instance must be\n running to show this example.\n </p>\n );\n }\n};\n"],"names":["authenticate","vuuAuthenticate"],"mappings":";;;;AAMO,MAAM,0BAA0B,CAAC;AAAA,gBACtCA,cAAe,GAAA,IAAA;AAAA,EACf,WAAc,GAAA,IAAA;AAAA
|
|
1
|
+
{"version":3,"file":"useAutoLoginToVuuServer.js","sources":["../../src/datasource-provider/useAutoLoginToVuuServer.tsx"],"sourcesContent":["import {\n authenticate as vuuAuthenticate,\n ConnectionManager,\n} from \"@vuu-ui/vuu-data-remote\";\nimport { useEffect, useState } from \"react\";\n\nexport const useAutoLoginToVuuServer = ({\n authenticate = true,\n autoConnect = true,\n // autoLogin = true,\n secure = true,\n websocketUrl,\n}: {\n authenticate?: boolean;\n autoConnect?: boolean;\n autoLogin?: boolean;\n secure?: boolean;\n websocketUrl?: string;\n} = {}) => {\n const [errorMessage, setErrorMessage] = useState(\"\");\n useEffect(() => {\n const connect = async () => {\n try {\n let token = \"no-token\";\n if (authenticate) {\n token = (await vuuAuthenticate(\n \"steve\",\n \"xyz\",\n \"/api/authn\",\n )) as string;\n }\n\n const url =\n websocketUrl ?? `${secure ? \"wss\" : \"ws\"}://localhost/8090/websocket`;\n\n ConnectionManager.connect({\n url,\n token,\n username: \"steve\",\n });\n } catch (e: unknown) {\n if (e instanceof Error) {\n console.error(e.message);\n setErrorMessage(e.message);\n }\n }\n };\n if (autoConnect) {\n connect();\n }\n\n return () => {\n if (autoConnect) {\n ConnectionManager.disconnect();\n }\n };\n }, [authenticate, autoConnect, secure, websocketUrl]);\n\n if (errorMessage) {\n return (\n <p>\n Unable to authenticate against Vuu Server A Vuu Server instance must be\n running to show this example.\n </p>\n );\n }\n};\n"],"names":["authenticate","vuuAuthenticate"],"mappings":";;;;AAMO,MAAM,0BAA0B,CAAC;AAAA,gBACtCA,cAAe,GAAA,IAAA;AAAA,EACf,WAAc,GAAA,IAAA;AAAA;AAAA,EAEd,MAAS,GAAA,IAAA;AAAA,EACT;AACF,CAAA,GAMI,EAAO,KAAA;AACT,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,SAAS,EAAE,CAAA;AACnD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,MAAM,UAAU,YAAY;AAC1B,MAAI,IAAA;AACF,QAAA,IAAI,KAAQ,GAAA,UAAA;AACZ,QAAA,IAAIA,cAAc,EAAA;AAChB,UAAA,KAAA,GAAS,MAAMC,YAAA;AAAA,YACb,OAAA;AAAA,YACA,KAAA;AAAA,YACA;AAAA,WACF;AAAA;AAGF,QAAA,MAAM,GACJ,GAAA,YAAA,IAAgB,CAAG,EAAA,MAAA,GAAS,QAAQ,IAAI,CAAA,2BAAA,CAAA;AAE1C,QAAA,iBAAA,CAAkB,OAAQ,CAAA;AAAA,UACxB,GAAA;AAAA,UACA,KAAA;AAAA,UACA,QAAU,EAAA;AAAA,SACX,CAAA;AAAA,eACM,CAAY,EAAA;AACnB,QAAA,IAAI,aAAa,KAAO,EAAA;AACtB,UAAQ,OAAA,CAAA,KAAA,CAAM,EAAE,OAAO,CAAA;AACvB,UAAA,eAAA,CAAgB,EAAE,OAAO,CAAA;AAAA;AAC3B;AACF,KACF;AACA,IAAA,IAAI,WAAa,EAAA;AACf,MAAQ,OAAA,EAAA;AAAA;AAGV,IAAA,OAAO,MAAM;AACX,MAAA,IAAI,WAAa,EAAA;AACf,QAAA,iBAAA,CAAkB,UAAW,EAAA;AAAA;AAC/B,KACF;AAAA,KACC,CAACD,cAAA,EAAc,WAAa,EAAA,MAAA,EAAQ,YAAY,CAAC,CAAA;AAEpD,EAAA,IAAI,YAAc,EAAA;AAChB,IACE,uBAAA,GAAA,CAAC,OAAE,QAGH,EAAA,uGAAA,EAAA,CAAA;AAAA;AAGN;;;;"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.11.1",
|
|
3
3
|
"author": "heswell",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@vuu-ui/vuu-data-types": "0.
|
|
7
|
-
"@vuu-ui/vuu-filter-types": "0.
|
|
8
|
-
"@vuu-ui/vuu-popups": "0.
|
|
9
|
-
"@vuu-ui/vuu-protocol-types": "0.
|
|
10
|
-
"@vuu-ui/vuu-table-types": "0.
|
|
6
|
+
"@vuu-ui/vuu-data-types": "0.11.1",
|
|
7
|
+
"@vuu-ui/vuu-filter-types": "0.11.1",
|
|
8
|
+
"@vuu-ui/vuu-popups": "0.11.1",
|
|
9
|
+
"@vuu-ui/vuu-protocol-types": "0.11.1",
|
|
10
|
+
"@vuu-ui/vuu-table-types": "0.11.1"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@vuu-ui/vuu-data-remote": "0.
|
|
14
|
-
"@vuu-ui/vuu-filter-parser": "0.
|
|
15
|
-
"@vuu-ui/vuu-layout": "0.
|
|
16
|
-
"@vuu-ui/vuu-popups": "0.
|
|
17
|
-
"@vuu-ui/vuu-ui-controls": "0.
|
|
18
|
-
"@vuu-ui/vuu-utils": "0.
|
|
19
|
-
"@vuu-ui/vuu-table": "0.
|
|
13
|
+
"@vuu-ui/vuu-data-remote": "0.11.1",
|
|
14
|
+
"@vuu-ui/vuu-filter-parser": "0.11.1",
|
|
15
|
+
"@vuu-ui/vuu-layout": "0.11.1",
|
|
16
|
+
"@vuu-ui/vuu-popups": "0.11.1",
|
|
17
|
+
"@vuu-ui/vuu-ui-controls": "0.11.1",
|
|
18
|
+
"@vuu-ui/vuu-utils": "0.11.1",
|
|
19
|
+
"@vuu-ui/vuu-table": "0.11.1",
|
|
20
20
|
"@salt-ds/core": "1.43.0",
|
|
21
21
|
"@salt-ds/styles": "0.2.1",
|
|
22
22
|
"@salt-ds/window": "0.1.1"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useAutoLoginToVuuServer: ({ authenticate, autoConnect,
|
|
1
|
+
export declare const useAutoLoginToVuuServer: ({ authenticate, autoConnect, secure, websocketUrl, }?: {
|
|
2
2
|
authenticate?: boolean;
|
|
3
3
|
autoConnect?: boolean;
|
|
4
4
|
autoLogin?: boolean;
|