@everymatrix/user-actions 0.0.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/dist/cjs/index-46c0a1de.js +791 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/user-actions.cjs.entry.js +61 -0
- package/dist/cjs/user-actions.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/user-actions/user-actions.css +3 -0
- package/dist/collection/components/user-actions/user-actions.js +90 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/utils.js +14 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/user-actions.d.ts +11 -0
- package/dist/components/user-actions.js +79 -0
- package/dist/esm/index-6c13c021.js +767 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/user-actions.entry.js +57 -0
- package/dist/esm/user-actions.js +17 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.js +22 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/user-actions/.stencil/packages/user-actions/stencil.config.d.ts +2 -0
- package/dist/types/components/user-actions/user-actions.d.ts +11 -0
- package/dist/types/components.d.ts +41 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/utils/utils.d.ts +14 -0
- package/dist/user-actions/index.esm.js +0 -0
- package/dist/user-actions/p-02573b9e.entry.js +1 -0
- package/dist/user-actions/p-d8d5dc61.js +1 -0
- package/dist/user-actions/user-actions.esm.js +1 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +19 -0
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t}from"./p-d8d5dc61.js";const s={"verification-popup":{emit:"openKycVerificationModal",listen:"closeKycVerificationModal"},"get-temporary-account-consents":{emit:"openTemporaryConsentsModal",listen:"closeTemporaryConsentsModal"},"limits-popup":{emit:"openLugasPopup",listen:"closeLugasPopup"}},i=class{constructor(i){t(this,i),this.actionStack=[],this.emitCurrentActionEvent=()=>{window.postMessage({type:s[this.actionStack[0].action].emit})},this.shiftActionStack=()=>{this.actionStack=this.actionStack.slice(1)}}handleEvent(t){s[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(){}};i.style=":host{display:block}";export{i as user_actions}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=!1;const t="undefined"!=typeof window?window:{},n=t.document||{head:{}},s={t:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,s)=>e.addEventListener(t,n,s),rel:(e,t,n,s)=>e.removeEventListener(t,n,s),ce:(e,t)=>new CustomEvent(e,t)},o=e=>Promise.resolve(e),r=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),c=(e,t,n)=>{n&&n.map((([n,o,r])=>{const c=a(e,n),u=i(t,r),f=l(n);s.ael(c,o,u,f),(t.i=t.i||[]).push((()=>s.rel(c,o,u,f)))}))},i=(e,t)=>n=>{try{256&e.t?e.l[t](n):(e.u=e.u||[]).push([t,n])}catch(e){P(e)}},a=(e,n)=>8&n?t:e,l=e=>0!=(2&e),u=new WeakMap,f=e=>"sc-"+e.h,h=(e,t)=>{t&&!e.m&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.m=t)))},d=(e,t)=>{if(e.t|=16,!(4&e.t))return h(e,e.p),A((()=>m(e,t)));e.t|=512},m=(e,t)=>{const n=e.l;let s;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>b(n,e,t))),e.u=null),s=b(n,"componentWillLoad")),S(s,(()=>y(e,n,t)))},y=async(e,t,s)=>{const o=e.$,r=o["s-rc"];s&&(e=>{const t=e.S,s=e.$,o=t.t,r=((e,t)=>{let s=f(t),o=N.get(s);if(e=11===e.nodeType?e:n,o)if("string"==typeof o){let t,r=u.get(e=e.head||e);r||u.set(e,r=new Set),r.has(s)||(t=n.createElement("style"),t.innerHTML=o,e.insertBefore(t,e.querySelector("link")),r&&r.add(s))}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return s})(s.shadowRoot?s.shadowRoot:s.getRootNode(),t);10&o&&(s["s-sc"]=r,s.classList.add(r+"-h"))})(e);p(e,t,o),r&&(r.map((e=>e())),o["s-rc"]=void 0);{const t=o["s-p"],n=()=>$(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},p=(e,t,n)=>{try{t=t.render(),e.t&=-17,e.t|=2,n.textContent=t}catch(t){P(t,e.$)}return null},$=e=>{const t=e.$,n=e.p;64&e.t||(e.t|=64,g(t),e.g(t),n||w()),e.m&&(e.m(),e.m=void 0),512&e.t&&q((()=>d(e,!1))),e.t&=-517},w=()=>{g(n.documentElement),q((()=>(e=>{const t=s.ce("appload",{detail:{namespace:"user-actions"}});return e.dispatchEvent(t),t})(t)))},b=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){P(e)}},S=(e,t)=>e&&e.then?e.then(t):t(),g=e=>e.classList.add("hydrated"),M=(e,t,n)=>{if(t.M){const o=Object.entries(t.M),r=e.prototype;if(o.map((([e,[s]])=>{(31&s||2&n&&32&s)&&Object.defineProperty(r,e,{get(){return((e,t)=>k(this).j.get(t))(0,e)},set(n){((e,t,n,s)=>{const o=k(this),r=o.j.get(t),c=o.t,i=o.l;n=((e,t)=>null==e||(e=>"object"==(e=typeof e)||"function"===e)(e)?e:1&t?e+"":e)(n,s.M[t][0]),8&c&&void 0!==r||n===r||Number.isNaN(r)&&Number.isNaN(n)||(o.j.set(t,n),i&&2==(18&c)&&d(o,!1))})(0,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const t=new Map;r.attributeChangedCallback=function(e,n,o){s.jmp((()=>{const n=t.get(e);if(this.hasOwnProperty(n))o=this[n],delete this[n];else if(r.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==o)return;this[n]=(null!==o||"boolean"!=typeof this[n])&&o}))},e.observedAttributes=o.filter((([e,t])=>15&t[0])).map((([e,n])=>{const s=n[1]||e;return t.set(s,e),s}))}}return e},j=(e,o={})=>{const i=[],a=o.exclude||[],l=t.customElements,u=n.head,m=u.querySelector("meta[charset]"),y=n.createElement("style"),p=[];let $,b=!0;Object.assign(s,o),s.o=new URL(o.resourcesUrl||"./",n.baseURI).href,e.map((e=>{e[1].map((t=>{const n={t:t[0],h:t[1],M:t[2],v:t[3]};n.M=t[2],n.v=t[3];const o=n.h,u=class extends HTMLElement{constructor(e){super(e),O(e=this,n),1&n.t&&e.attachShadow({mode:"open"})}connectedCallback(){$&&(clearTimeout($),$=null),b?p.push(this):s.jmp((()=>(e=>{if(0==(1&s.t)){const t=k(e),n=t.S,s=()=>{};if(1&t.t)c(e,t,n.v);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){h(t,t.p=n);break}}n.M&&Object.entries(n.M).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,s,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=L(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(M(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){P(e)}t.t&=-9,e()}if(o.style){let e=o.style;const t=f(n);if(!N.has(t)){const s=()=>{};((e,t,n)=>{let s=N.get(e);r&&n?(s=s||new CSSStyleSheet,s.replace(t)):s=t,N.set(e,s)})(t,e,!!(1&n.t)),s()}}}const c=t.p,i=()=>d(t,!0);c&&c["s-rc"]?c["s-rc"].push(i):i()})(0,t,n)}s()}})(this)))}disconnectedCallback(){s.jmp((()=>(()=>{if(0==(1&s.t)){const e=k(this);e.i&&(e.i.map((e=>e())),e.i=void 0)}})()))}componentOnReady(){return k(this).k}};n.C=e[0],a.includes(o)||l.get(o)||(i.push(o),l.define(o,M(u,n,1)))}))})),y.innerHTML=i+"{visibility:hidden}.hydrated{visibility:inherit}",y.setAttribute("data-styles",""),u.insertBefore(y,m?m.nextSibling:u.firstChild),b=!1,p.length?p.map((e=>e.connectedCallback())):s.jmp((()=>$=setTimeout(w,30)))},v=new WeakMap,k=e=>v.get(e),C=(e,t)=>v.set(t.l=e,t),O=(e,t)=>{const n={t:0,$:e,S:t,j:new Map};return n.k=new Promise((e=>n.g=e)),e["s-p"]=[],e["s-rc"]=[],c(e,n,t.v),v.set(e,n)},P=(e,t)=>(0,console.error)(e,t),E=new Map,L=e=>{const t=e.h.replace(/-/g,"_"),n=e.C,s=E.get(n);return s?s[t]:import(`./${n}.entry.js`).then((e=>(E.set(n,e),e[t])),P)},N=new Map,T=[],W=[],x=(t,n)=>o=>{t.push(o),e||(e=!0,n&&4&s.t?q(U):s.raf(U))},R=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){P(e)}e.length=0},U=()=>{R(T),R(W),(e=T.length>0)&&s.raf(U)},q=e=>o().then(e),A=x(W,!0);export{j as b,o as p,C as r}
|
|
@@ -0,0 +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-02573b9e",[[1,"user-actions",{endpoint:[1],userid:[1],actionStack:[32]},[[8,"message","handleEvent"]]]]]],e)));
|
package/loader/cdn.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from '../dist/types/components';
|
|
2
|
+
export interface CustomElementsDefineOptions {
|
|
3
|
+
exclude?: string[];
|
|
4
|
+
resourcesUrl?: string;
|
|
5
|
+
syncQueue?: boolean;
|
|
6
|
+
jmp?: (c: Function) => any;
|
|
7
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
8
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
|
|
12
|
+
export declare function applyPolyfills(): Promise<void>;
|
package/loader/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
|
|
2
|
+
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
3
|
+
export * from '../dist/esm/polyfills/index.js';
|
|
4
|
+
export * from '../dist/esm/loader.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@everymatrix/user-actions",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "./dist/index.cjs.js",
|
|
5
|
+
"module": "./dist/index.js",
|
|
6
|
+
"es2015": "./dist/esm/index.mjs",
|
|
7
|
+
"es2017": "./dist/esm/index.mjs",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"collection": "./dist/collection/collection-manifest.json",
|
|
10
|
+
"collection:main": "./dist/collection/index.js",
|
|
11
|
+
"unpkg": "./dist/user-actions/user-actions.esm.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/",
|
|
14
|
+
"loader/"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
}
|
|
19
|
+
}
|