@everymatrix/user-actions 1.29.8 → 1.30.0

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.
@@ -21,6 +21,10 @@ const actionsMapping = {
21
21
  "emit": "openKycVerificationModal",
22
22
  "listen": "closeKycVerificationModal"
23
23
  },
24
+ "unverified-phone-number": {
25
+ "emit": "openSmsVerificationModal",
26
+ "listen": "closeSmsVerificationModal"
27
+ }
24
28
  };
25
29
 
26
30
  const userActionsCss = ":host{display:block}";
@@ -15,4 +15,8 @@ export const actionsMapping = {
15
15
  "emit": "openKycVerificationModal",
16
16
  "listen": "closeKycVerificationModal"
17
17
  },
18
+ "unverified-phone-number": {
19
+ "emit": "openSmsVerificationModal",
20
+ "listen": "closeSmsVerificationModal"
21
+ }
18
22
  };
@@ -17,6 +17,10 @@ const actionsMapping = {
17
17
  "emit": "openKycVerificationModal",
18
18
  "listen": "closeKycVerificationModal"
19
19
  },
20
+ "unverified-phone-number": {
21
+ "emit": "openSmsVerificationModal",
22
+ "listen": "closeSmsVerificationModal"
23
+ }
20
24
  };
21
25
 
22
26
  const userActionsCss = ":host{display:block}";
@@ -17,6 +17,10 @@ const actionsMapping = {
17
17
  "emit": "openKycVerificationModal",
18
18
  "listen": "closeKycVerificationModal"
19
19
  },
20
+ "unverified-phone-number": {
21
+ "emit": "openSmsVerificationModal",
22
+ "listen": "closeSmsVerificationModal"
23
+ }
20
24
  };
21
25
 
22
26
  const userActionsCss = ":host{display:block}";
@@ -15,4 +15,8 @@ export declare const actionsMapping: {
15
15
  emit: string;
16
16
  listen: string;
17
17
  };
18
+ "unverified-phone-number": {
19
+ emit: string;
20
+ listen: string;
21
+ };
18
22
  };
@@ -0,0 +1 @@
1
+ import{r as i}from"./p-d8d5dc61.js";const t={"verification-popup":{emit:"openKycVerificationModal",listen:"closeKycVerificationModal"},"get-temporary-account-consents":{emit:"openTemporaryConsentsModal",listen:"closeTemporaryConsentsModal"},"limits-popup":{emit:"openLugasPopup",listen:"closeLugasPopup"},"video-verification-popup":{emit:"openKycVerificationModal",listen:"closeKycVerificationModal"},"unverified-phone-number":{emit:"openSmsVerificationModal",listen:"closeSmsVerificationModal"}},o=class{constructor(o){i(this,o),this.actionStack=[],this.emitCurrentActionEvent=()=>{window.postMessage({type:t[this.actionStack[0].action].emit})},this.shiftActionStack=()=>{this.actionStack=this.actionStack.slice(1)}}handleEvent(i){t[this.actionStack[0].action].listen===i.data&&(this.shiftActionStack(),this.actionStack.length>0&&this.emitCurrentActionEvent())}fetchUserActions(){const i=new URL(`${this.endpoint}/v1/player/${this.userid}/legislation/actions`);return fetch(i.href).then((i=>i.json())).then((i=>{this.actionStack=i.actions,this.actionStack.length>0&&this.emitCurrentActionEvent()}))}componentWillLoad(){return this.fetchUserActions()}render(){}};o.style=":host{display:block}";export{o as user_actions}
@@ -1 +1 @@
1
- import{p as e,b as n}from"./p-d8d5dc61.js";(()=>{const n=import.meta.url,s={};return""!==n&&(s.resourcesUrl=new URL(".",n).href),e(s)})().then((e=>n([["p-45814dce",[[1,"user-actions",{endpoint:[1],userid:[1],actionStack:[32]},[[8,"message","handleEvent"]]]]]],e)));
1
+ import{p as e,b as n}from"./p-d8d5dc61.js";(()=>{const n=import.meta.url,s={};return""!==n&&(s.resourcesUrl=new URL(".",n).href),e(s)})().then((e=>n([["p-04130d8e",[[1,"user-actions",{endpoint:[1],userid:[1],actionStack:[32]},[[8,"message","handleEvent"]]]]]],e)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-actions",
3
- "version": "1.29.8",
3
+ "version": "1.30.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t}from"./p-d8d5dc61.js";const i={"verification-popup":{emit:"openKycVerificationModal",listen:"closeKycVerificationModal"},"get-temporary-account-consents":{emit:"openTemporaryConsentsModal",listen:"closeTemporaryConsentsModal"},"limits-popup":{emit:"openLugasPopup",listen:"closeLugasPopup"},"video-verification-popup":{emit:"openKycVerificationModal",listen:"closeKycVerificationModal"}},o=class{constructor(o){t(this,o),this.actionStack=[],this.emitCurrentActionEvent=()=>{window.postMessage({type:i[this.actionStack[0].action].emit})},this.shiftActionStack=()=>{this.actionStack=this.actionStack.slice(1)}}handleEvent(t){i[this.actionStack[0].action].listen===t.data&&(this.shiftActionStack(),this.actionStack.length>0&&this.emitCurrentActionEvent())}fetchUserActions(){const t=new URL(`${this.endpoint}/v1/player/${this.userid}/legislation/actions`);return fetch(t.href).then((t=>t.json())).then((t=>{this.actionStack=t.actions,this.actionStack.length>0&&this.emitCurrentActionEvent()}))}componentWillLoad(){return this.fetchUserActions()}render(){}};o.style=":host{display:block}";export{o as user_actions}