From fa0b31f4e5b8cbccf0d33f66342bd6d28bab1275 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 20 Apr 2023 14:14:19 -0400 Subject: [PATCH] update plugin meta --- build/block.json | 29 ----------------------------- build/index.asset.php | 1 - build/index.css | 1 - build/index.js | 1 - build/style-index.css | 1 - matchplay.php | 5 +++-- 6 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 build/block.json delete mode 100644 build/index.asset.php delete mode 100644 build/index.css delete mode 100644 build/index.js delete mode 100644 build/style-index.css diff --git a/build/block.json b/build/block.json deleted file mode 100644 index 065cae1..0000000 --- a/build/block.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://schemas.wp.org/trunk/block.json", - "apiVersion": 2, - "name": "tcpinball/matchplay-results", - "version": "0.1.0", - "title": "Matchplay Results", - "category": "widgets", - "icon": "embed-generic", - "description": "Show results from a matchplay tournament.", - "supports": { - "html": false - }, - "textdomain": "matchplay", - "editorScript": "file:./index.js", - "editorStyle": "file:./index.css", - "style": "file:./style-index.css", - "attributes": { - "tournament_id": { - "type": "string", - "source": "attribute", - "selector": "div", - "attribute": "data-tournament-id", - "default": "" - }, - "data": { - "type": "object" - } - } -} \ No newline at end of file diff --git a/build/index.asset.php b/build/index.asset.php deleted file mode 100644 index f9253ed..0000000 --- a/build/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '388c433128d11a09e6ca'); diff --git a/build/index.css b/build/index.css deleted file mode 100644 index ca7b122..0000000 --- a/build/index.css +++ /dev/null @@ -1 +0,0 @@ -.wp-block-tcpinball-matchplay-results{border:1px dotted red} diff --git a/build/index.js b/build/index.js deleted file mode 100644 index d0759a9..0000000 --- a/build/index.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";var e,t={165:function(){var e=window.wp.blocks,t=window.wp.element,n=(window.wp.i18n,window.wp.blockEditor),l=window.wp.components;function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;ta({tournament_id:e})}))),(0,t.createElement)("div",(0,n.useBlockProps)(),(0,t.createElement)("p",null,"Results for tournament id ",r.tournament_id),(0,t.createElement)("button",{onClick:()=>function(){let e=`https://matchplay.events/data/tournaments/${r.tournament_id}/standings`;fetch(e).then((e=>e.json())).then((e=>{let t={...e};a({data:t}),u(t),console.log(t)})).catch((e=>console.error(e)))}()},"Fetch Results"),o&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("table",{id:"tournament-results-table"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Place"),(0,t.createElement)("th",null,"Player"),(0,t.createElement)("th",null,"Points"))),(0,t.createElement)("tbody",null,Object.keys(o).map(((e,n)=>(0,t.createElement)("tr",{key:e},(0,t.createElement)("td",null,o[n].position),(0,t.createElement)("td",null,o[n].name),(0,t.createElement)("td",null,o[n].points)))))))))},save:function(e){let{attributes:l}=e;const a=n.useBlockProps.save();return(0,t.createElement)("div",r({},a,{"data-tournament-id":l.tournament_id}),(0,t.createElement)("table",{id:"tournament-results-table"},(0,t.createElement)("thead",null,(0,t.createElement)("tr",null,(0,t.createElement)("th",null,"Place"),(0,t.createElement)("th",null,"Player"),(0,t.createElement)("th",null,"Points"))),(0,t.createElement)("tbody",null,Object.keys(l.data).map(((e,n)=>(0,t.createElement)("tr",{key:e},(0,t.createElement)("td",null,l.data[n].position),(0,t.createElement)("td",null,l.data[n].name),(0,t.createElement)("td",null,l.data[n].points)))))))}})}},n={};function l(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,l),a.exports}l.m=t,e=[],l.O=function(t,n,r,a){if(!n){var o=1/0;for(s=0;s=a)&&Object.keys(l.O).every((function(e){return l.O[e](n[c])}))?n.splice(c--,1):(u=!1,a0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[n,r,a]},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};l.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,a,o=n[0],u=n[1],c=n[2],i=0;if(o.some((function(t){return 0!==e[t]}))){for(r in u)l.o(u,r)&&(l.m[r]=u[r]);if(c)var s=c(l)}for(t&&t(n);i