@everymatrix/lottery-ticket-controller 0.0.3

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.
Files changed (45) hide show
  1. package/dist/cjs/index-498fdd8e.js +1134 -0
  2. package/dist/cjs/index.cjs.js +2 -0
  3. package/dist/cjs/loader.cjs.js +21 -0
  4. package/dist/cjs/lottery-ticket-controller.cjs.entry.js +71 -0
  5. package/dist/cjs/lottery-ticket-controller.cjs.js +19 -0
  6. package/dist/collection/collection-manifest.json +12 -0
  7. package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.css +3 -0
  8. package/dist/collection/components/lottery-ticket-controller/lottery-ticket-controller.js +309 -0
  9. package/dist/collection/index.js +1 -0
  10. package/dist/collection/utils/utils.js +3 -0
  11. package/dist/components/index.d.ts +22 -0
  12. package/dist/components/index.js +2 -0
  13. package/dist/components/lottery-ticket-controller.d.ts +11 -0
  14. package/dist/components/lottery-ticket-controller.js +98 -0
  15. package/dist/esm/index-4b81518c.js +1108 -0
  16. package/dist/esm/index.js +1 -0
  17. package/dist/esm/loader.js +17 -0
  18. package/dist/esm/lottery-ticket-controller.entry.js +67 -0
  19. package/dist/esm/lottery-ticket-controller.js +17 -0
  20. package/dist/esm/polyfills/core-js.js +11 -0
  21. package/dist/esm/polyfills/css-shim.js +1 -0
  22. package/dist/esm/polyfills/dom.js +79 -0
  23. package/dist/esm/polyfills/es5-html-element.js +1 -0
  24. package/dist/esm/polyfills/index.js +34 -0
  25. package/dist/esm/polyfills/system.js +6 -0
  26. package/dist/index.cjs.js +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/lottery-ticket-controller/index.esm.js +0 -0
  29. package/dist/lottery-ticket-controller/lottery-ticket-controller.esm.js +1 -0
  30. package/dist/lottery-ticket-controller/p-5186fd30.entry.js +1 -0
  31. package/dist/lottery-ticket-controller/p-fe83d21a.js +2 -0
  32. package/dist/stencil.config.js +22 -0
  33. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/lottery-ticket-controller/.stencil/packages/lottery-ticket-controller/stencil.config.d.ts +2 -0
  34. package/dist/types/components/lottery-ticket-controller/lottery-ticket-controller.d.ts +56 -0
  35. package/dist/types/components.d.ts +138 -0
  36. package/dist/types/index.d.ts +1 -0
  37. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  38. package/dist/types/utils/utils.d.ts +1 -0
  39. package/loader/cdn.js +3 -0
  40. package/loader/index.cjs.js +3 -0
  41. package/loader/index.d.ts +12 -0
  42. package/loader/index.es2017.js +3 -0
  43. package/loader/index.js +4 -0
  44. package/loader/package.json +10 -0
  45. package/package.json +19 -0
@@ -0,0 +1,2 @@
1
+ let t,e,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},r=t=>Promise.resolve(t),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(t){}return!1})(),i=(t,e,n)=>{n&&n.map((([n,l,s])=>{const r=t,c=u(e,s),i=a(n);o.ael(r,l,c,i),(e.o=e.o||[]).push((()=>o.rel(r,l,c,i)))}))},u=(t,e)=>n=>{try{256&t.t?t.i[e](n):(t.u=t.u||[]).push([e,n])}catch(t){B(t)}},a=t=>0!=(2&t),f=new WeakMap,h=t=>"sc-"+t.h,$={},d=t=>"object"==(t=typeof t)||"function"===t,y=(t,e,...n)=>{let l=null,s=!1,o=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!d(l))&&(l+=""),s&&o?r[r.length-1].$+=l:r.push(s?m(null,l):l),o=s)};c(n);const i=m(t,null);return i.m=e,r.length>0&&(i.p=r),i},m=(t,e)=>({t:0,S:t,$:e,g:null,p:null,m:null}),p={},b=(t,e,n,l,s,o)=>{if(n!==l){let r=z(t,e);e.toLowerCase();{const c=d(l);if((r||c&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{const s=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&o||s)&&!c&&t.setAttribute(e,l=!0===l?"":l)}}},w=(t,e,n,l)=>{const s=11===e.g.nodeType&&e.g.host?e.g.host:e.g,o=t&&t.m||$,r=e.m||$;for(l in o)l in r||b(s,l,o[l],void 0,n,e.t);for(l in r)b(s,l,o[l],r[l],n,e.t)},S=(e,n,l)=>{const o=n.p[l];let r,c,i=0;if(r=o.g=s.createElement(o.S),w(null,o,!1),null!=t&&r["s-si"]!==t&&r.classList.add(r["s-si"]=t),o.p)for(i=0;i<o.p.length;++i)c=S(e,o,i),c&&r.appendChild(c);return r},g=(t,n,l,s,o,r)=>{let c,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=S(null,l,o),c&&(s[o].g=c,i.insertBefore(c,n)))},v=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.g.remove()},M=(t,e)=>t.S===e.S,j=(t,e)=>{const n=e.g=t.g,l=t.p,s=e.p;w(t,e,!1),null!==l&&null!==s?((t,e,n,l)=>{let s,o=0,r=0,c=e.length-1,i=e[0],u=e[c],a=l.length-1,f=l[0],h=l[a];for(;o<=c&&r<=a;)null==i?i=e[++o]:null==u?u=e[--c]:null==f?f=l[++r]:null==h?h=l[--a]:M(i,f)?(j(i,f),i=e[++o],f=l[++r]):M(u,h)?(j(u,h),u=e[--c],h=l[--a]):M(i,h)?(j(i,h),t.insertBefore(i.g,u.g.nextSibling),i=e[++o],h=l[--a]):M(u,f)?(j(u,f),t.insertBefore(u.g,i.g),u=e[--c],f=l[++r]):(s=S(e&&e[r],n,r),f=l[++r],s&&i.g.parentNode.insertBefore(s,i.g));o>c?g(t,null==l[a+1]?null:l[a+1].g,n,l,r,a):r>a&&v(e,o,c)})(n,l,e,s):null!==s?g(n,null,e,s,0,s.length-1):null!==l&&v(l,0,l.length-1)},k=(t,e,n)=>{const l=(t=>H(t).v)(t);return{emit:t=>C(l,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},C=(t,e,n)=>{const l=o.ce(e,n);return t.dispatchEvent(l),l},O=(t,e)=>{e&&!t.M&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.M=e)))},P=(t,e)=>{if(t.t|=16,!(4&t.t))return O(t,t.j),tt((()=>x(t,e)));t.t|=512},x=(t,e)=>{const n=t.i;return e&&(t.t|=256,t.u&&(t.u.map((([t,e])=>F(n,t,e))),t.u=null)),L(void 0,(()=>E(t,n,e)))},E=async(t,e,n)=>{const l=t.v,o=l["s-rc"];n&&(t=>{const e=t.k,n=t.v,l=e.t,o=((t,e)=>{let n=h(e);const l=I.get(n);if(t=11===t.nodeType?t:s,l)if("string"==typeof l){let e,o=f.get(t=t.head||t);o||f.set(t,o=new Set),o.has(n)||(e=s.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),o&&o.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);N(t,e),o&&(o.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>T(t);0===e.length?n():(Promise.all(e).then(n),t.t|=4,e.length=0)}},N=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.v,o=n.C||m(null,null),r=(t=>t&&t.S===p)(l)?l:y(null,null,l);e=s.tagName,r.S=null,r.t|=4,n.C=r,r.g=o.g=s.shadowRoot||s,t=s["s-sc"],j(o,r)})(n,l)}catch(t){B(t,n.v)}return null},T=t=>{const e=t.v,n=t.j;64&t.t||(t.t|=64,R(e),t.O(e),n||A()),t.M&&(t.M(),t.M=void 0),512&t.t&&Z((()=>P(t,!1))),t.t&=-517},A=()=>{R(s.documentElement),Z((()=>C(l,"appload",{detail:{namespace:"lottery-ticket-controller"}})))},F=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){B(t)}},L=(t,e)=>t&&t.then?t.then(e):e(),R=t=>t.classList.add("hydrated"),U=(t,e,n)=>{if(e.P){const l=Object.entries(e.P),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>H(this).N.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=H(t),o=s.N.get(e),r=s.t,c=s.i;n=((t,e)=>null==t||d(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,l.P[e][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.N.set(e,n),c&&2==(18&r)&&P(s,!1))})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const e=new Map;s.attributeChangedCallback=function(t,n,l){o.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},W=(t,e={})=>{const n=[],r=e.exclude||[],u=l.customElements,a=s.head,f=a.querySelector("meta[charset]"),$=s.createElement("style"),d=[];let y,m=!0;Object.assign(o,e),o.l=new URL(e.resourcesUrl||"./",s.baseURI).href,t.map((t=>{t[1].map((e=>{const l={t:e[0],h:e[1],P:e[2],T:e[3]};l.P=e[2],l.T=e[3];const s=l.h,a=class extends HTMLElement{constructor(t){super(t),_(t=this,l),1&l.t&&t.attachShadow({mode:"open"})}connectedCallback(){y&&(clearTimeout(y),y=null),m?d.push(this):o.jmp((()=>(t=>{if(0==(1&o.t)){const e=H(t),n=e.k,l=()=>{};if(1&e.t)i(t,e,n.T);else{e.t|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){O(e,e.j=n);break}}n.P&&Object.entries(n.P).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.t)){{if(e.t|=32,(s=G(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(U(s,n,2),s.isProxied=!0);const t=()=>{};e.t|=8;try{new s(e)}catch(t){B(t)}e.t&=-9,t()}if(s.style){let t=s.style;const e=h(n);if(!I.has(e)){const l=()=>{};((t,e,n)=>{let l=I.get(t);c&&n?(l=l||new CSSStyleSheet,l.replace(e)):l=e,I.set(t,l)})(e,t,!!(1&n.t)),l()}}}const o=e.j,r=()=>P(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>(()=>{if(0==(1&o.t)){const t=H(this);t.o&&(t.o.map((t=>t())),t.o=void 0)}})()))}componentOnReady(){return H(this).A}};l.F=t[0],r.includes(s)||u.get(s)||(n.push(s),u.define(s,U(a,l,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),a.insertBefore($,f?f.nextSibling:a.firstChild),m=!1,d.length?d.map((t=>t.connectedCallback())):o.jmp((()=>y=setTimeout(A,30)))},q=new WeakMap,H=t=>q.get(t),V=(t,e)=>q.set(e.i=t,e),_=(t,e)=>{const n={t:0,v:t,k:e,N:new Map};return n.A=new Promise((t=>n.O=t)),t["s-p"]=[],t["s-rc"]=[],i(t,n,e.T),q.set(t,n)},z=(t,e)=>e in t,B=(t,e)=>(0,console.error)(t,e),D=new Map,G=t=>{const e=t.h.replace(/-/g,"_"),n=t.F,l=D.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(D.set(n,t),t[e])),B)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},I=new Map,J=[],K=[],Q=(t,e)=>l=>{t.push(l),n||(n=!0,e&&4&o.t?Z(Y):o.raf(Y))},X=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){B(t)}t.length=0},Y=()=>{X(J),X(K),(n=J.length>0)&&o.raf(Y)},Z=t=>r().then(t),tt=Q(K,!0);export{W as b,k as c,y as h,r as p,V as r}
@@ -0,0 +1,22 @@
1
+ import { sass } from '@stencil/sass';
2
+ export const config = {
3
+ namespace: 'lottery-ticket-controller',
4
+ taskQueue: 'async',
5
+ plugins: [sass()],
6
+ outputTargets: [
7
+ {
8
+ type: 'dist',
9
+ esmLoaderPath: '../loader',
10
+ },
11
+ {
12
+ type: 'dist-custom-elements',
13
+ },
14
+ {
15
+ type: 'docs-readme',
16
+ },
17
+ {
18
+ type: 'www',
19
+ serviceWorker: null, // disable service workers
20
+ },
21
+ ],
22
+ };
@@ -0,0 +1,2 @@
1
+ import { Config } from '../../../../../../../../../../stencil-public-runtime';
2
+ export declare const config: Config;
@@ -0,0 +1,56 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import '@everymatrix/helper-accordion';
3
+ import '@everymatrix/lottery-ticket';
4
+ export declare class LotteryTicketController {
5
+ /**
6
+ * Endpoint URL for the source of data (NorWAy standard)
7
+ */
8
+ endpoint: string;
9
+ /**
10
+ * Ticket number
11
+ */
12
+ ticketId: number;
13
+ /**
14
+ * Ticket header description
15
+ */
16
+ ticketDescription: string;
17
+ /**
18
+ * ID of the lottery game
19
+ */
20
+ gameId: string;
21
+ /**
22
+ * Activates postMessages as events for actions from the widget
23
+ */
24
+ postMessage: boolean;
25
+ /**
26
+ * Name of the event emitter by the action button
27
+ */
28
+ eventName: string;
29
+ /**
30
+ * Collapsed
31
+ */
32
+ collapsed: boolean;
33
+ /**
34
+ * Number of grids?
35
+ */
36
+ numberOfGrids: number;
37
+ /**
38
+ * This toggles if the last ticket added should be expanded or not
39
+ */
40
+ last: boolean;
41
+ /**
42
+ * Language
43
+ */
44
+ language: string;
45
+ /**
46
+ * Shows the auto-pick button
47
+ */
48
+ autoPick: boolean;
49
+ /**
50
+ * Shows the reset button
51
+ */
52
+ resetButton: boolean;
53
+ deleteTicketEvent: EventEmitter<any>;
54
+ helperAccordionActionHandler(): void;
55
+ render(): any;
56
+ }
@@ -0,0 +1,138 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ export namespace Components {
9
+ interface LotteryTicketController {
10
+ /**
11
+ * Shows the auto-pick button
12
+ */
13
+ "autoPick": boolean;
14
+ /**
15
+ * Collapsed
16
+ */
17
+ "collapsed": boolean;
18
+ /**
19
+ * Endpoint URL for the source of data (NorWAy standard)
20
+ */
21
+ "endpoint": string;
22
+ /**
23
+ * Name of the event emitter by the action button
24
+ */
25
+ "eventName": string;
26
+ /**
27
+ * ID of the lottery game
28
+ */
29
+ "gameId": string;
30
+ /**
31
+ * Language
32
+ */
33
+ "language": string;
34
+ /**
35
+ * This toggles if the last ticket added should be expanded or not
36
+ */
37
+ "last": boolean;
38
+ /**
39
+ * Number of grids?
40
+ */
41
+ "numberOfGrids": number;
42
+ /**
43
+ * Activates postMessages as events for actions from the widget
44
+ */
45
+ "postMessage": boolean;
46
+ /**
47
+ * Shows the reset button
48
+ */
49
+ "resetButton": boolean;
50
+ /**
51
+ * Ticket header description
52
+ */
53
+ "ticketDescription": string;
54
+ /**
55
+ * Ticket number
56
+ */
57
+ "ticketId": number;
58
+ }
59
+ }
60
+ export interface LotteryTicketControllerCustomEvent<T> extends CustomEvent<T> {
61
+ detail: T;
62
+ target: HTMLLotteryTicketControllerElement;
63
+ }
64
+ declare global {
65
+ interface HTMLLotteryTicketControllerElement extends Components.LotteryTicketController, HTMLStencilElement {
66
+ }
67
+ var HTMLLotteryTicketControllerElement: {
68
+ prototype: HTMLLotteryTicketControllerElement;
69
+ new (): HTMLLotteryTicketControllerElement;
70
+ };
71
+ interface HTMLElementTagNameMap {
72
+ "lottery-ticket-controller": HTMLLotteryTicketControllerElement;
73
+ }
74
+ }
75
+ declare namespace LocalJSX {
76
+ interface LotteryTicketController {
77
+ /**
78
+ * Shows the auto-pick button
79
+ */
80
+ "autoPick"?: boolean;
81
+ /**
82
+ * Collapsed
83
+ */
84
+ "collapsed"?: boolean;
85
+ /**
86
+ * Endpoint URL for the source of data (NorWAy standard)
87
+ */
88
+ "endpoint"?: string;
89
+ /**
90
+ * Name of the event emitter by the action button
91
+ */
92
+ "eventName"?: string;
93
+ /**
94
+ * ID of the lottery game
95
+ */
96
+ "gameId"?: string;
97
+ /**
98
+ * Language
99
+ */
100
+ "language"?: string;
101
+ /**
102
+ * This toggles if the last ticket added should be expanded or not
103
+ */
104
+ "last"?: boolean;
105
+ /**
106
+ * Number of grids?
107
+ */
108
+ "numberOfGrids"?: number;
109
+ "onDeleteTicket"?: (event: LotteryTicketControllerCustomEvent<any>) => void;
110
+ /**
111
+ * Activates postMessages as events for actions from the widget
112
+ */
113
+ "postMessage"?: boolean;
114
+ /**
115
+ * Shows the reset button
116
+ */
117
+ "resetButton"?: boolean;
118
+ /**
119
+ * Ticket header description
120
+ */
121
+ "ticketDescription"?: string;
122
+ /**
123
+ * Ticket number
124
+ */
125
+ "ticketId"?: number;
126
+ }
127
+ interface IntrinsicElements {
128
+ "lottery-ticket-controller": LotteryTicketController;
129
+ }
130
+ }
131
+ export { LocalJSX as JSX };
132
+ declare module "@stencil/core" {
133
+ export namespace JSX {
134
+ interface IntrinsicElements {
135
+ "lottery-ticket-controller": LocalJSX.LotteryTicketController & JSXBase.HTMLAttributes<HTMLLotteryTicketControllerElement>;
136
+ }
137
+ }
138
+ }
@@ -0,0 +1 @@
1
+ export * from './components';