@ctx-core/auth0-ui 12.2.103 → 12.2.107

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/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # @ctx-core/auth0-ui
2
2
 
3
+ ## 12.2.107
4
+
5
+ ### Patch Changes
6
+
7
+ - update dependencies
8
+ - Updated dependencies
9
+ - @ctx-core/auth0@35.0.5
10
+ - @ctx-core/dialog@20.1.12
11
+
12
+ ## 12.2.106
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+ - @ctx-core/svelte@13.0.0
18
+ - @ctx-core/auth0@35.0.4
19
+ - @ctx-core/dialog@20.1.11
20
+
21
+ ## 12.2.105
22
+
23
+ ### Patch Changes
24
+
25
+ - 5e7050a9f: svelte2tsx: ^0.5.15 -> ^0.5.16
26
+ - Updated dependencies [5e7050a9f]
27
+ - @ctx-core/dialog-ui-svelte@1.0.22
28
+
29
+ ## 12.2.104
30
+
31
+ ### Patch Changes
32
+
33
+ - svelte-check: ^2.8.1 -> ^2.9.0
34
+ - svelte2tsx: ^0.5.14 -> ^0.5.15
35
+ - Updated dependencies
36
+ - Updated dependencies
37
+ - @ctx-core/auth0@35.0.3
38
+ - @ctx-core/auth0-management@9.0.71
39
+ - @ctx-core/dialog@20.1.10
40
+ - @ctx-core/dom@11.1.27
41
+ - @ctx-core/error@11.5.1
42
+ - @ctx-core/fetch-undici@2.3.5
43
+ - @ctx-core/function@21.0.1
44
+ - @ctx-core/jwt@10.1.19
45
+ - @ctx-core/object@22.2.7
46
+ - @ctx-core/svelte@12.0.5
47
+ - @ctx-core/dialog-ui-svelte@1.0.21
48
+
3
49
  ## 12.2.103
4
50
 
5
51
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth_script_html_.ts"],"sourcesContent":["export function auth_script_html_():string {\n\treturn `\n<script>\n\t(function() {\n\t\tvar location = window.location\n\t\tvar search = location.search\n\t\tvar search_values = _values(search.substr(1))\n\t\tvar hash = location.hash\n\t\tvar auth0_token = _values(hash.substr(1))\n\t\tvar auth0_token_json = JSON.stringify(auth0_token)\n\t\tvar redirect_url =\n\t\t\t\t\tsearch_values\n\t\t\t\t\t&& search_values.redirect_url\n\t\tlocalStorage.setItem('auth0_token_json', auth0_token_json)\n\t\tif (redirect_url) {\n\t\t\tlocation.href = redirect_url\n\t\t}\n\t\tfunction _values(string) {\n\t\t\tvar segments = string.split('&')\n\t\t\tvar values = {}\n\t\t\tfor (var i=0; i < segments.length; i++) {\n\t\t\t\tvar pair = segments[i].split('=')\n\t\t\t\tvar key = decodeURIComponent(pair[0])\n\t\t\t\tvar value = decodeURIComponent(pair[1])\n\t\t\t\tvalues[key] = value\n\t\t\t}\n\t\t\treturn values\n\t\t}\n\t})()\n</script>\n\t`.trim()\n}\nexport {\n\tauth_script_html_ as _auth_script_html,\n\tauth_script_html_ as _html__script__auth,\n}\n"],"names":["auth_script_html_","trim","_auth_script_html","_html__script__auth"],"mappings":"AAAA,OAAO,SAASA,iBAAiB,GAAU;IAC1C,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BR,CAAC,CAACC,IAAI,EAAE,CAAA;CACR;AACD,SACCD,iBAAiB,IAAIE,iBAAiB,EACtCF,iBAAiB,IAAIG,mBAAmB,KACxC"}
1
+ {"version":3,"sources":["../src/auth_script_html_.ts"],"sourcesContent":["export function auth_script_html_():string {\n\treturn `\n<script>\n\t(function() {\n\t\tvar location = window.location\n\t\tvar search = location.search\n\t\tvar search_values = _values(search.substr(1))\n\t\tvar hash = location.hash\n\t\tvar auth0_token = _values(hash.substr(1))\n\t\tvar auth0_token_json = JSON.stringify(auth0_token)\n\t\tvar redirect_url =\n\t\t\t\t\tsearch_values\n\t\t\t\t\t&& search_values.redirect_url\n\t\tlocalStorage.setItem('auth0_token_json', auth0_token_json)\n\t\tif (redirect_url) {\n\t\t\tlocation.href = redirect_url\n\t\t}\n\t\tfunction _values(string) {\n\t\t\tvar segments = string.split('&')\n\t\t\tvar values = {}\n\t\t\tfor (var i=0; i < segments.length; i++) {\n\t\t\t\tvar pair = segments[i].split('=')\n\t\t\t\tvar key = decodeURIComponent(pair[0])\n\t\t\t\tvar value = decodeURIComponent(pair[1])\n\t\t\t\tvalues[key] = value\n\t\t\t}\n\t\t\treturn values\n\t\t}\n\t})()\n</script>\n\t`.trim()\n}\nexport {\n\tauth_script_html_ as _auth_script_html,\n\tauth_script_html_ as _html__script__auth,\n}\n"],"names":["auth_script_html_","trim","_auth_script_html","_html__script__auth"],"mappings":"AAAA,OAAO,SAASA,iBAAiB,GAAU;IAC1C,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BR,CAAC,CAACC,IAAI,EAAE,CAAA;AACT,CAAC;AACD,SACCD,iBAAiB,IAAIE,iBAAiB,EACtCF,iBAAiB,IAAIG,mBAAmB,KACxC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/getContext_auth0_ui_ctx.ts"],"sourcesContent":["import { getContext } from 'svelte'\nimport type { Ctx } from '@ctx-core/object'\nimport { auth0_ui_ctx_key } from './auth0_ui_ctx_key.js'\nexport function getContext_auth0_ui_ctx() {\n return getContext(auth0_ui_ctx_key) as Ctx\n}\n"],"names":["getContext","auth0_ui_ctx_key","getContext_auth0_ui_ctx"],"mappings":"AAAA,SAASA,UAAU,QAAQ,QAAQ,CAAA;AAEnC,SAASC,gBAAgB,QAAQ,uBAAuB,CAAA;AACxD,OAAO,SAASC,uBAAuB,GAAG;IACxC,OAAOF,UAAU,CAACC,gBAAgB,CAAC,CAAO;CAC3C"}
1
+ {"version":3,"sources":["../src/getContext_auth0_ui_ctx.ts"],"sourcesContent":["import { getContext } from 'svelte'\nimport type { Ctx } from '@ctx-core/object'\nimport { auth0_ui_ctx_key } from './auth0_ui_ctx_key.js'\nexport function getContext_auth0_ui_ctx() {\n return getContext(auth0_ui_ctx_key) as Ctx\n}\n"],"names":["getContext","auth0_ui_ctx_key","getContext_auth0_ui_ctx"],"mappings":"AAAA,SAASA,UAAU,QAAQ,QAAQ,CAAA;AAEnC,SAASC,gBAAgB,QAAQ,uBAAuB,CAAA;AACxD,OAAO,SAASC,uBAAuB,GAAG;IACxC,OAAOF,UAAU,CAACC,gBAAgB,CAAC,CAAO;AAC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ui/Auth0_c.ts"],"sourcesContent":["import type {\n\tauth0_client_id_body_I,\n\tauth0_grant_type_body_I,\n\tlogin_data_I,\n\tpassword_realm_body_T,\n\tpost_auth0_oauth_token_body_I,\n\tpost_auth0_passwordless_start_body_T,\n\tpost_auth0_passwordless_start_optional_body_T,\n\tsignup_data_I\n} from '@ctx-core/auth0'\nimport {\n\tauth0_body_,\n\tauth0_opened_class__,\n\tauth0_token_error__,\n\tauth0_token_json__,\n\tclear_auth0_token_error,\n\tclose_auth0,\n\tlogout_auth0_token_error,\n\topen_auth0_forgot_password_check_email,\n\topen_auth0_login,\n\tpassword_realm_body_,\n\tpost_auth0_auth_change_password,\n\tpost_auth0_dbconnections_signup,\n\tpost_auth0_oauth_token,\n\tpost_auth0_passwordless_start,\n\tvalidate_auth0_change_password,\n\tvalidate_auth0_forgot_password,\n\tvalidate_auth0_signup\n} from '@ctx-core/auth0'\nimport { dom_a_, has_dom } from '@ctx-core/dom'\nimport { noop } from '@ctx-core/function'\nimport type { Ctx } from '@ctx-core/object'\nimport type { Auth0Error } from 'auth0-js'\nimport { onDestroy } from 'svelte'\nexport class Auth0_c {\n\tconstructor(protected ctx:Ctx) {}\n\treadonly login_auth0_body_ = (data:any)=>\n\t\tauth0_body_<login_data_password_realm_body_I>(\n\t\t\tthis.ctx, data\n\t\t)\n\treadonly login_password_realm_body_ = (data:any)=>\n\t\tpassword_realm_body_<login_data_password_realm_body_I>(\n\t\t\tthis.ctx,\n\t\t\tthis.login_auth0_body_(data)\n\t\t)\n\treadonly signup_auth0_body_ = (data:any)=>\n\t\tauth0_body_<signup_data_password_realm_body_I>(this.ctx, data) as signup_data_password_realm_body_I\n\treadonly signup_password_realm_body_ = (data:any)=>\n\t\tpassword_realm_body_<signup_data_password_realm_body_I>(this.ctx, this.signup_auth0_body_(data))\n\treadonly auth0_opened_class = auth0_opened_class__(this.ctx)\n\treadonly auth0_token_json_ = auth0_token_json__(this.ctx)\n\treadonly auth0_token_error_ = auth0_token_error__(this.ctx)\n\treadonly close_auth0 = ()=>close_auth0(this.ctx)\n\treadonly onMount = async (root:HTMLElement)=>{\n\t\tif (has_dom) {\n\t\t\tconst unsubscribe =\n\t\t\t\tthis.auth0_opened_class.subscribe(()=>this.schedule_forms_clear(root))\n\t\t\tonDestroy(unsubscribe)\n\t\t}\n\t}\n\treadonly login = async (data:login_data_I, schedule_forms_clear = ()=>{})=>{\n\t\tconst [auth0_token, response] = await post_auth0_oauth_token(\n\t\t\tthis.ctx, this.login_password_realm_body_(data)\n\t\t)\n\t\tif (response.ok) {\n\t\t\tconst auth0_token_json = JSON.stringify(auth0_token)\n\t\t\tthis.auth0_token_json_.$ = auth0_token_json\n\t\t\tschedule_forms_clear()\n\t\t\tthis.close_auth0()\n\t\t} else {\n\t\t\tconst auth_token_error = auth0_token as Auth0Error\n\t\t\tthis.auth0_token_error_.$ = auth_token_error\n\t\t\tlogout_auth0_token_error(this.ctx, auth_token_error)\n\t\t}\n\t}\n\treadonly signup = async (data:signup_data_I, schedule_forms_clear = ()=>{})=>{\n\t\tconst [auth0_userinfo] = await post_auth0_dbconnections_signup(\n\t\t\tthis.ctx,\n\t\t\tthis.signup_password_realm_body_(data))\n\t\tconst auth0_userinfo_Auth0Error = auth0_userinfo as Auth0Error\n\t\tconst { statusCode } = auth0_userinfo_Auth0Error\n\t\tif (statusCode) {\n\t\t\tconst {\n\t\t\t\tcode,\n\t\t\t\tdescription\n\t\t\t} = auth0_userinfo_Auth0Error\n\t\t\tconst email =\n\t\t\t\tcode === 'user_exists'\n\t\t\t\t? 'This Email is already signed up'\n\t\t\t\t: description || ''\n\t\t\tconst auth0_token_error = { email }\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tschedule_forms_clear()\n\t\tawait this.login({\n\t\t\tusername: data.email,\n\t\t\tpassword: data.password,\n\t\t}, schedule_forms_clear)\n\t}\n\treadonly change_password = async (form:{ password:string }, schedule_forms_clear = ()=>{})=>{\n\t\tconst { password } = form\n\t\tlet error\n\t\ttry {\n\t\t\tconst [response_json, response] = await post_auth0_auth_change_password(this.ctx, password)\n\t\t\tif (!response.ok) {\n\t\t\t\tif (response.status == 401) {\n\t\t\t\t\topen_auth0_login(this.ctx)\n\t\t\t\t\tconst auth0_token_error = { username: 'Authentication Error - Log in' }\n\t\t\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\terror = response_json.error || 'Error changing Password'\n\t\t\t}\n\t\t} catch (e:any) {\n\t\t\tconsole.warn(e)\n\t\t\terror = e.message\n\t\t}\n\t\tif (error) {\n\t\t\tconst auth0_token_error = { password: error }\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tschedule_forms_clear()\n\t\tthis.close_auth0()\n\t}\n\treadonly schedule_forms_clear_:(root:HTMLElement)=>void = (root:HTMLElement)=>{\n\t\treturn ()=>this.schedule_forms_clear(root)\n\t}\n\treadonly schedule_forms_clear = (root:HTMLElement)=>{\n\t\tsetTimeout(()=>{\n\t\t\tclear_auth0_token_error(this.ctx)\n\t\t\tclear_inputs(dom_a_('input[type=text]', root))\n\t\t\tclear_inputs(dom_a_('input[type=password]', root))\n\t\t}, 100)\n\t}\n\treadonly onsubmit_signup = async (event:Event, ctx:onsubmit_signup_Ctx, schedule_forms_clear = ()=>{})=>{\n\t\tevent.preventDefault()\n\t\tconst {\n\t\t\temail_input,\n\t\t\tpassword_input,\n\t\t\tpassword_confirmation_input,\n\t\t} = ctx\n\t\tconst email = email_input.value\n\t\tconst password = password_input.value\n\t\tconst password_confirmation = password_confirmation_input.value\n\t\tconst auth0_token_error =\n\t\t\tvalidate_auth0_signup({\n\t\t\t\temail,\n\t\t\t\tpassword,\n\t\t\t\tpassword_confirmation\n\t\t\t})\n\t\tif (auth0_token_error) {\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\treturn false\n\t\t}\n\t\tawait this.signup({\n\t\t\temail,\n\t\t\tpassword\n\t\t}, schedule_forms_clear)\n\t\treturn\n\t}\n\treadonly onsubmit_login = async (event:Event, ctx:onsubmit_login_Ctx, schedule_forms_clear = ()=>{})=>{\n\t\tevent.preventDefault()\n\t\tconst { username_login_input, password_login_input } = ctx\n\t\tconst username = username_login_input.value\n\t\tconst password = password_login_input.value\n\t\tawait this.login({ username, password }, schedule_forms_clear)\n\t}\n\treadonly onsubmit_forgot_password = async (event:Event, ctx:onsubmit_forgot_password_Ctx)=>{\n\t\tevent.preventDefault()\n\t\tconst { email_input } = ctx\n\t\tconst email = email_input.value\n\t\tconst data:post_auth0_passwordless_start_optional_body_T = {\n\t\t\tconnection: 'email',\n\t\t\tsend: 'link',\n\t\t\temail\n\t\t}\n\t\tconst auth0_token_error = validate_auth0_forgot_password(data)\n\t\tif (auth0_token_error) {\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tawait post_auth0_passwordless_start(\n\t\t\tthis.ctx, this.login_auth0_body_(data) as post_auth0_passwordless_start_body_T\n\t\t)\n\t\topen_auth0_forgot_password_check_email(this.ctx)\n\t}\n\treadonly onsubmit_change_password = async (\n\t\tevent:Event, ctx:onsubmit_change_password_Ctx, schedule_forms_clear = noop\n\t)=>{\n\t\tevent.preventDefault()\n\t\tconst {\n\t\t\tpassword_input,\n\t\t\tpassword_confirmation_input,\n\t\t} = ctx\n\t\tconst password = password_input.value\n\t\tconst password_confirmation = password_confirmation_input.value\n\t\tconst auth0_token_error =\n\t\t\tvalidate_auth0_change_password(\n\t\t\t\t{\n\t\t\t\t\tpassword,\n\t\t\t\t\tpassword_confirmation\n\t\t\t\t})\n\t\tif (auth0_token_error) {\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\tthrow auth0_token_error\n\t\t}\n\t\treturn await this.change_password({ password }, schedule_forms_clear)\n\t}\n\treadonly onclose = async (event:MouseEvent)=>{\n\t\tevent.preventDefault()\n\t\tthis.close_auth0()\n\t}\n}\nfunction clear_inputs(inputs:NodeList) {\n\tfor (let i = 0; i < inputs.length; i++) {\n\t\tconst input = inputs[i] as HTMLInputElement\n\t\tinput.value = ''\n\t}\n}\nexport interface signup_data_password_realm_body_I\n\textends signup_data_I,\n\t\tauth0_client_id_body_I,\n\t\tpost_auth0_passwordless_start_body_T,\n\t\tpassword_realm_body_T,\n\t\tauth0_grant_type_body_I,\n\t\tpost_auth0_oauth_token_body_I {}\nexport interface login_data_password_realm_body_I\n\textends login_data_I,\n\t\tauth0_client_id_body_I,\n\t\tpost_auth0_passwordless_start_body_T,\n\t\tpassword_realm_body_T,\n\t\tauth0_grant_type_body_I,\n\t\tpost_auth0_oauth_token_body_I {}\nexport interface onsubmit_change_password_Ctx {\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\nexport interface onsubmit_forgot_password_Ctx {\n\temail_input:HTMLInputElement\n}\nexport interface onsubmit_login_Ctx {\n\tusername_login_input:HTMLInputElement\n\tpassword_login_input:HTMLInputElement\n}\nexport interface onsubmit_signup_Ctx {\n\temail_input:HTMLInputElement\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\n"],"names":["auth0_body_","auth0_opened_class__","auth0_token_error__","auth0_token_json__","clear_auth0_token_error","close_auth0","logout_auth0_token_error","open_auth0_forgot_password_check_email","open_auth0_login","password_realm_body_","post_auth0_auth_change_password","post_auth0_dbconnections_signup","post_auth0_oauth_token","post_auth0_passwordless_start","validate_auth0_change_password","validate_auth0_forgot_password","validate_auth0_signup","dom_a_","has_dom","noop","onDestroy","Auth0_c","constructor","ctx","login_auth0_body_","data","login_password_realm_body_","signup_auth0_body_","signup_password_realm_body_","auth0_opened_class","auth0_token_json_","auth0_token_error_","onMount","root","unsubscribe","subscribe","schedule_forms_clear","login","auth0_token","response","ok","auth0_token_json","JSON","stringify","$","auth_token_error","signup","auth0_userinfo","auth0_userinfo_Auth0Error","statusCode","code","description","email","auth0_token_error","username","password","change_password","form","error","response_json","status","e","console","warn","message","schedule_forms_clear_","setTimeout","clear_inputs","onsubmit_signup","event","preventDefault","email_input","password_input","password_confirmation_input","value","password_confirmation","onsubmit_login","username_login_input","password_login_input","onsubmit_forgot_password","connection","send","onsubmit_change_password","onclose","inputs","i","length","input"],"mappings":"AAUA,SACCA,WAAW,EACXC,oBAAoB,EACpBC,mBAAmB,EACnBC,kBAAkB,EAClBC,uBAAuB,EACvBC,WAAW,EACXC,wBAAwB,EACxBC,sCAAsC,EACtCC,gBAAgB,EAChBC,oBAAoB,EACpBC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,sBAAsB,EACtBC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,8BAA8B,EAC9BC,qBAAqB,QACf,iBAAiB,CAAA;AACxB,SAASC,MAAM,EAAEC,OAAO,QAAQ,eAAe,CAAA;AAC/C,SAASC,IAAI,QAAQ,oBAAoB,CAAA;AAGzC,SAASC,SAAS,QAAQ,QAAQ,CAAA;AAClC,OAAO,MAAMC,OAAO;IACnBC,YAAsBC,GAAO,CAAE;aAATA,GAAO,GAAPA,GAAO;aACpBC,iBAAiB,GAAG,CAACC,IAAQ,GACrCzB,WAAW,CACV,IAAI,CAACuB,GAAG,EAAEE,IAAI,CACd;aACOC,0BAA0B,GAAG,CAACD,IAAQ,GAC9ChB,oBAAoB,CACnB,IAAI,CAACc,GAAG,EACR,IAAI,CAACC,iBAAiB,CAACC,IAAI,CAAC,CAC5B;aACOE,kBAAkB,GAAG,CAACF,IAAQ,GACtCzB,WAAW,CAAoC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 {"version":3,"sources":["../../src/ui/Auth0_c.ts"],"sourcesContent":["import type {\n\tauth0_client_id_body_I,\n\tauth0_grant_type_body_I,\n\tlogin_data_I,\n\tpassword_realm_body_T,\n\tpost_auth0_oauth_token_body_I,\n\tpost_auth0_passwordless_start_body_T,\n\tpost_auth0_passwordless_start_optional_body_T,\n\tsignup_data_I\n} from '@ctx-core/auth0'\nimport {\n\tauth0_body_,\n\tauth0_opened_class__,\n\tauth0_token_error__,\n\tauth0_token_json__,\n\tclear_auth0_token_error,\n\tclose_auth0,\n\tlogout_auth0_token_error,\n\topen_auth0_forgot_password_check_email,\n\topen_auth0_login,\n\tpassword_realm_body_,\n\tpost_auth0_auth_change_password,\n\tpost_auth0_dbconnections_signup,\n\tpost_auth0_oauth_token,\n\tpost_auth0_passwordless_start,\n\tvalidate_auth0_change_password,\n\tvalidate_auth0_forgot_password,\n\tvalidate_auth0_signup\n} from '@ctx-core/auth0'\nimport { dom_a_, has_dom } from '@ctx-core/dom'\nimport { noop } from '@ctx-core/function'\nimport type { Ctx } from '@ctx-core/object'\nimport type { Auth0Error } from 'auth0-js'\nimport { onDestroy } from 'svelte'\nexport class Auth0_c {\n\tconstructor(protected ctx:Ctx) {}\n\treadonly login_auth0_body_ = (data:any)=>\n\t\tauth0_body_<login_data_password_realm_body_I>(\n\t\t\tthis.ctx, data\n\t\t)\n\treadonly login_password_realm_body_ = (data:any)=>\n\t\tpassword_realm_body_<login_data_password_realm_body_I>(\n\t\t\tthis.ctx,\n\t\t\tthis.login_auth0_body_(data)\n\t\t)\n\treadonly signup_auth0_body_ = (data:any)=>\n\t\tauth0_body_<signup_data_password_realm_body_I>(this.ctx, data) as signup_data_password_realm_body_I\n\treadonly signup_password_realm_body_ = (data:any)=>\n\t\tpassword_realm_body_<signup_data_password_realm_body_I>(this.ctx, this.signup_auth0_body_(data))\n\treadonly auth0_opened_class = auth0_opened_class__(this.ctx)\n\treadonly auth0_token_json_ = auth0_token_json__(this.ctx)\n\treadonly auth0_token_error_ = auth0_token_error__(this.ctx)\n\treadonly close_auth0 = ()=>close_auth0(this.ctx)\n\treadonly onMount = async (root:HTMLElement)=>{\n\t\tif (has_dom) {\n\t\t\tconst unsubscribe =\n\t\t\t\tthis.auth0_opened_class.subscribe(()=>this.schedule_forms_clear(root))\n\t\t\tonDestroy(unsubscribe)\n\t\t}\n\t}\n\treadonly login = async (data:login_data_I, schedule_forms_clear = ()=>{})=>{\n\t\tconst [auth0_token, response] = await post_auth0_oauth_token(\n\t\t\tthis.ctx, this.login_password_realm_body_(data)\n\t\t)\n\t\tif (response.ok) {\n\t\t\tconst auth0_token_json = JSON.stringify(auth0_token)\n\t\t\tthis.auth0_token_json_.$ = auth0_token_json\n\t\t\tschedule_forms_clear()\n\t\t\tthis.close_auth0()\n\t\t} else {\n\t\t\tconst auth_token_error = auth0_token as Auth0Error\n\t\t\tthis.auth0_token_error_.$ = auth_token_error\n\t\t\tlogout_auth0_token_error(this.ctx, auth_token_error)\n\t\t}\n\t}\n\treadonly signup = async (data:signup_data_I, schedule_forms_clear = ()=>{})=>{\n\t\tconst [auth0_userinfo] = await post_auth0_dbconnections_signup(\n\t\t\tthis.ctx,\n\t\t\tthis.signup_password_realm_body_(data))\n\t\tconst auth0_userinfo_Auth0Error = auth0_userinfo as Auth0Error\n\t\tconst { statusCode } = auth0_userinfo_Auth0Error\n\t\tif (statusCode) {\n\t\t\tconst {\n\t\t\t\tcode,\n\t\t\t\tdescription\n\t\t\t} = auth0_userinfo_Auth0Error\n\t\t\tconst email =\n\t\t\t\tcode === 'user_exists'\n\t\t\t\t? 'This Email is already signed up'\n\t\t\t\t: description || ''\n\t\t\tconst auth0_token_error = { email }\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tschedule_forms_clear()\n\t\tawait this.login({\n\t\t\tusername: data.email,\n\t\t\tpassword: data.password,\n\t\t}, schedule_forms_clear)\n\t}\n\treadonly change_password = async (form:{ password:string }, schedule_forms_clear = ()=>{})=>{\n\t\tconst { password } = form\n\t\tlet error\n\t\ttry {\n\t\t\tconst [response_json, response] = await post_auth0_auth_change_password(this.ctx, password)\n\t\t\tif (!response.ok) {\n\t\t\t\tif (response.status == 401) {\n\t\t\t\t\topen_auth0_login(this.ctx)\n\t\t\t\t\tconst auth0_token_error = { username: 'Authentication Error - Log in' }\n\t\t\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\terror = response_json.error || 'Error changing Password'\n\t\t\t}\n\t\t} catch (e:any) {\n\t\t\tconsole.warn(e)\n\t\t\terror = e.message\n\t\t}\n\t\tif (error) {\n\t\t\tconst auth0_token_error = { password: error }\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tschedule_forms_clear()\n\t\tthis.close_auth0()\n\t}\n\treadonly schedule_forms_clear_:(root:HTMLElement)=>void = (root:HTMLElement)=>{\n\t\treturn ()=>this.schedule_forms_clear(root)\n\t}\n\treadonly schedule_forms_clear = (root:HTMLElement)=>{\n\t\tsetTimeout(()=>{\n\t\t\tclear_auth0_token_error(this.ctx)\n\t\t\tclear_inputs(dom_a_('input[type=text]', root))\n\t\t\tclear_inputs(dom_a_('input[type=password]', root))\n\t\t}, 100)\n\t}\n\treadonly onsubmit_signup = async (event:Event, ctx:onsubmit_signup_Ctx, schedule_forms_clear = ()=>{})=>{\n\t\tevent.preventDefault()\n\t\tconst {\n\t\t\temail_input,\n\t\t\tpassword_input,\n\t\t\tpassword_confirmation_input,\n\t\t} = ctx\n\t\tconst email = email_input.value\n\t\tconst password = password_input.value\n\t\tconst password_confirmation = password_confirmation_input.value\n\t\tconst auth0_token_error =\n\t\t\tvalidate_auth0_signup({\n\t\t\t\temail,\n\t\t\t\tpassword,\n\t\t\t\tpassword_confirmation\n\t\t\t})\n\t\tif (auth0_token_error) {\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\treturn false\n\t\t}\n\t\tawait this.signup({\n\t\t\temail,\n\t\t\tpassword\n\t\t}, schedule_forms_clear)\n\t\treturn\n\t}\n\treadonly onsubmit_login = async (event:Event, ctx:onsubmit_login_Ctx, schedule_forms_clear = ()=>{})=>{\n\t\tevent.preventDefault()\n\t\tconst { username_login_input, password_login_input } = ctx\n\t\tconst username = username_login_input.value\n\t\tconst password = password_login_input.value\n\t\tawait this.login({ username, password }, schedule_forms_clear)\n\t}\n\treadonly onsubmit_forgot_password = async (event:Event, ctx:onsubmit_forgot_password_Ctx)=>{\n\t\tevent.preventDefault()\n\t\tconst { email_input } = ctx\n\t\tconst email = email_input.value\n\t\tconst data:post_auth0_passwordless_start_optional_body_T = {\n\t\t\tconnection: 'email',\n\t\t\tsend: 'link',\n\t\t\temail\n\t\t}\n\t\tconst auth0_token_error = validate_auth0_forgot_password(data)\n\t\tif (auth0_token_error) {\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\treturn\n\t\t}\n\t\tawait post_auth0_passwordless_start(\n\t\t\tthis.ctx, this.login_auth0_body_(data) as post_auth0_passwordless_start_body_T\n\t\t)\n\t\topen_auth0_forgot_password_check_email(this.ctx)\n\t}\n\treadonly onsubmit_change_password = async (\n\t\tevent:Event, ctx:onsubmit_change_password_Ctx, schedule_forms_clear = noop\n\t)=>{\n\t\tevent.preventDefault()\n\t\tconst {\n\t\t\tpassword_input,\n\t\t\tpassword_confirmation_input,\n\t\t} = ctx\n\t\tconst password = password_input.value\n\t\tconst password_confirmation = password_confirmation_input.value\n\t\tconst auth0_token_error =\n\t\t\tvalidate_auth0_change_password(\n\t\t\t\t{\n\t\t\t\t\tpassword,\n\t\t\t\t\tpassword_confirmation\n\t\t\t\t})\n\t\tif (auth0_token_error) {\n\t\t\tlogout_auth0_token_error(this.ctx, auth0_token_error)\n\t\t\tthrow auth0_token_error\n\t\t}\n\t\treturn await this.change_password({ password }, schedule_forms_clear)\n\t}\n\treadonly onclose = async (event:MouseEvent)=>{\n\t\tevent.preventDefault()\n\t\tthis.close_auth0()\n\t}\n}\nfunction clear_inputs(inputs:NodeList) {\n\tfor (let i = 0; i < inputs.length; i++) {\n\t\tconst input = inputs[i] as HTMLInputElement\n\t\tinput.value = ''\n\t}\n}\nexport interface signup_data_password_realm_body_I\n\textends signup_data_I,\n\t\tauth0_client_id_body_I,\n\t\tpost_auth0_passwordless_start_body_T,\n\t\tpassword_realm_body_T,\n\t\tauth0_grant_type_body_I,\n\t\tpost_auth0_oauth_token_body_I {}\nexport interface login_data_password_realm_body_I\n\textends login_data_I,\n\t\tauth0_client_id_body_I,\n\t\tpost_auth0_passwordless_start_body_T,\n\t\tpassword_realm_body_T,\n\t\tauth0_grant_type_body_I,\n\t\tpost_auth0_oauth_token_body_I {}\nexport interface onsubmit_change_password_Ctx {\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\nexport interface onsubmit_forgot_password_Ctx {\n\temail_input:HTMLInputElement\n}\nexport interface onsubmit_login_Ctx {\n\tusername_login_input:HTMLInputElement\n\tpassword_login_input:HTMLInputElement\n}\nexport interface onsubmit_signup_Ctx {\n\temail_input:HTMLInputElement\n\tpassword_input:HTMLInputElement\n\tpassword_confirmation_input:HTMLInputElement\n}\n"],"names":["auth0_body_","auth0_opened_class__","auth0_token_error__","auth0_token_json__","clear_auth0_token_error","close_auth0","logout_auth0_token_error","open_auth0_forgot_password_check_email","open_auth0_login","password_realm_body_","post_auth0_auth_change_password","post_auth0_dbconnections_signup","post_auth0_oauth_token","post_auth0_passwordless_start","validate_auth0_change_password","validate_auth0_forgot_password","validate_auth0_signup","dom_a_","has_dom","noop","onDestroy","Auth0_c","constructor","ctx","login_auth0_body_","data","login_password_realm_body_","signup_auth0_body_","signup_password_realm_body_","auth0_opened_class","auth0_token_json_","auth0_token_error_","onMount","root","unsubscribe","subscribe","schedule_forms_clear","login","auth0_token","response","ok","auth0_token_json","JSON","stringify","$","auth_token_error","signup","auth0_userinfo","auth0_userinfo_Auth0Error","statusCode","code","description","email","auth0_token_error","username","password","change_password","form","error","response_json","status","e","console","warn","message","schedule_forms_clear_","setTimeout","clear_inputs","onsubmit_signup","event","preventDefault","email_input","password_input","password_confirmation_input","value","password_confirmation","onsubmit_login","username_login_input","password_login_input","onsubmit_forgot_password","connection","send","onsubmit_change_password","onclose","inputs","i","length","input"],"mappings":"AAUA,SACCA,WAAW,EACXC,oBAAoB,EACpBC,mBAAmB,EACnBC,kBAAkB,EAClBC,uBAAuB,EACvBC,WAAW,EACXC,wBAAwB,EACxBC,sCAAsC,EACtCC,gBAAgB,EAChBC,oBAAoB,EACpBC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,sBAAsB,EACtBC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,8BAA8B,EAC9BC,qBAAqB,QACf,iBAAiB,CAAA;AACxB,SAASC,MAAM,EAAEC,OAAO,QAAQ,eAAe,CAAA;AAC/C,SAASC,IAAI,QAAQ,oBAAoB,CAAA;AAGzC,SAASC,SAAS,QAAQ,QAAQ,CAAA;AAClC,OAAO,MAAMC,OAAO;IACnBC,YAAsBC,GAAO,CAAE;QAATA,WAAAA,GAAO,CAAA;aACpBC,iBAAiB,GAAG,CAACC,IAAQ,GACrCzB,WAAW,CACV,IAAI,CAACuB,GAAG,EAAEE,IAAI,CACd;aACOC,0BAA0B,GAAG,CAACD,IAAQ,GAC9ChB,oBAAoB,CACnB,IAAI,CAACc,GAAG,EACR,IAAI,CAACC,iBAAiB,CAACC,IAAI,CAAC,CAC5B;aACOE,kBAAkB,GAAG,CAACF,IAAQ,GACtCzB,WAAW,CAAoC,IAAI,CAACuB,GAAG,EAAEE,IAAI,CAAC,AAAqC;aAC3FG,2BAA2B,GAAG,CAACH,IAAQ,GAC/ChB,oBAAoB,CAAoC,IAAI,CAACc,GAAG,EAAE,IAAI,CAACI,kBAAkB,CAACF,IAAI,CAAC,CAAC;aACxFI,kBAAkB,GAAG5B,oBAAoB,CAAC,IAAI,CAACsB,GAA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0-ui",
3
- "version": "12.2.103",
3
+ "version": "12.2.107",
4
4
  "description": "ctx-core auth0 ui component & express endpoints",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -24,21 +24,21 @@
24
24
  "./package.json": "./package.json"
25
25
  },
26
26
  "dependencies": {
27
- "@ctx-core/auth0": "^35.0.2",
28
- "@ctx-core/auth0-management": "^9.0.70",
29
- "@ctx-core/dialog": "^20.1.9",
30
- "@ctx-core/dialog-ui-svelte": "^1.0.20",
31
- "@ctx-core/dom": "^11.1.26",
32
- "@ctx-core/error": "^11.5.0",
33
- "@ctx-core/fetch-undici": "^2.3.1",
34
- "@ctx-core/function": "^21.0.0",
27
+ "@ctx-core/auth0": "^35.0.5",
28
+ "@ctx-core/auth0-management": "^9.0.71",
29
+ "@ctx-core/dialog": "^20.1.12",
30
+ "@ctx-core/dialog-ui-svelte": "^1.0.22",
31
+ "@ctx-core/dom": "^11.1.27",
32
+ "@ctx-core/error": "^11.5.1",
33
+ "@ctx-core/fetch-undici": "^2.3.5",
34
+ "@ctx-core/function": "^21.0.1",
35
35
  "@ctx-core/http": "^9.0.31",
36
- "@ctx-core/jwt": "^10.1.18",
36
+ "@ctx-core/jwt": "^10.1.19",
37
37
  "@ctx-core/logger": "^9.0.45",
38
- "@ctx-core/object": "^22.2.6",
39
- "@ctx-core/svelte": "^12.0.3",
38
+ "@ctx-core/object": "^22.2.7",
39
+ "@ctx-core/svelte": "^13.0.0",
40
40
  "@swc/cli": "^0.1.57",
41
- "@swc/core": "^1.2.224",
41
+ "@swc/core": "^1.2.245",
42
42
  "auth0-js": "^9.19.0",
43
43
  "jsonwebtoken": "^8.5.1",
44
44
  "polka": "next"
@@ -47,13 +47,13 @@
47
47
  "@sveltejs/adapter-auto": "next",
48
48
  "@sveltejs/kit": "next",
49
49
  "@types/auth0-js": "^9.14.6",
50
- "@types/jsonwebtoken": "^8.5.8",
50
+ "@types/jsonwebtoken": "^8.5.9",
51
51
  "@types/trouter": "^3.1.1",
52
52
  "rimraf": "^3.0.2",
53
53
  "svelte": "^3.49.0",
54
- "svelte-check": "^2.8.0",
54
+ "svelte-check": "^2.9.0",
55
55
  "svelte-preprocess": "^4.10.7",
56
- "svelte2tsx": "^0.5.13",
56
+ "svelte2tsx": "^0.5.16",
57
57
  "tslib": "^2.4.0",
58
58
  "typescript": "next"
59
59
  },