reflekt 0.9.2 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Accessor.rb +37 -0
- data/lib/Aggregator.rb +193 -0
- data/lib/Control.rb +18 -8
- data/lib/Execution.rb +39 -7
- data/lib/Meta.rb +27 -0
- data/lib/MetaBuilder.rb +56 -0
- data/lib/Reflection.rb +104 -104
- data/lib/Reflekt.rb +205 -0
- data/lib/Renderer.rb +39 -0
- data/lib/Rule.rb +24 -26
- data/lib/RuleSet.rb +105 -0
- data/lib/ShadowStack.rb +8 -22
- data/lib/meta/IntegerMeta.rb +27 -0
- data/lib/meta/StringMeta.rb +27 -0
- data/lib/rules/IntegerRule.rb +51 -0
- data/lib/rules/StringRule.rb +57 -0
- data/lib/web/README.md +11 -0
- data/lib/web/bundle.js +30 -0
- data/lib/web/gitignore.txt +7 -0
- data/lib/web/index.html +26 -0
- data/lib/web/package-lock.json +1347 -0
- data/lib/web/package.json +26 -0
- data/lib/web/server.js +122 -0
- metadata +21 -8
- data/lib/Ruler.rb +0 -112
- data/lib/reflekt.rb +0 -244
- data/lib/web/script.js +0 -8
- data/lib/web/style.css +0 -151
- data/lib/web/template.html.erb +0 -266
data/lib/web/script.js
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Minified by jsDelivr using Terser v3.14.1.
|
3
|
-
* Original file: /gh/alpinejs/alpine@2.6.0/dist/alpine.js
|
4
|
-
*
|
5
|
-
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
6
|
-
*/
|
7
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Alpine=t()}(this,function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function n(n){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?t(Object(r),!0).forEach(function(t){e(n,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})}return n}function i(e){return Array.from(new Set(e))}function r(){return navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")}function s(e,t){"template"!==e.tagName.toLowerCase()?console.warn(`Alpine: [${t}] directive should only be added to <template> tags. See https://github.com/alpinejs/alpine#${t}`):1!==e.content.childElementCount&&console.warn(`Alpine: <template> tag with [${t}] encountered with multiple element roots. Make sure <template> only has a single child node.`)}function o(e){return e.toLowerCase().replace(/-(\w)/g,(e,t)=>t.toUpperCase())}function a(e,t){var n;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout(function(){n=null,e.apply(i,r)},t)}}function l(e,t,n={}){return"function"==typeof e?e.call(t):new Function(["$data",...Object.keys(n)],`var __alpine_result; with($data) { __alpine_result = ${e} }; return __alpine_result`)(t,...Object.values(n))}const c=/^x-(on|bind|data|text|html|model|if|for|show|cloak|transition|ref|spread)\b/;function u(e){const t=m(e.name);return c.test(t)}function d(e,t,n){let i=Array.from(e.attributes).filter(u).map(f),r=i.filter(e=>"spread"===e.type)[0];if(r){let e=l(r.expression,t.$data);i=i.concat(Object.entries(e).map(([e,t])=>f({name:e,value:t})))}return n?i.filter(e=>e.type===n):function(e){let t=["bind","model","show","catch-all"];return e.sort((e,n)=>{let i=-1===t.indexOf(e.type)?"catch-all":e.type,r=-1===t.indexOf(n.type)?"catch-all":n.type;return t.indexOf(i)-t.indexOf(r)})}(i)}function f({name:e,value:t}){const n=m(e),i=n.match(c),r=n.match(/:([a-zA-Z0-9\-:]+)/),s=n.match(/\.[^.\]]+(?=[^\]]*$)/g)||[];return{type:i?i[1]:null,value:r?r[1]:null,modifiers:s.map(e=>e.replace(".","")),expression:t}}function m(e){return e.startsWith("@")?e.replace("@","x-on:"):e.startsWith(":")?e.replace(":","x-bind:"):e}function p(e,t=Boolean){return e.split(" ").filter(t)}const h="in",v="out";function b(e,t,n,i=!1){if(i)return t();if(e.__x_transition&&e.__x_transition.type===h)return;const r=d(e,n,"transition"),s=d(e,n,"show")[0];if(s&&s.modifiers.includes("transition")){let n=s.modifiers;if(n.includes("out")&&!n.includes("in"))return t();const i=n.includes("in")&&n.includes("out");(function(e,t,n){const i={duration:g(t,"duration",150),origin:g(t,"origin","center"),first:{opacity:0,scale:g(t,"scale",95)},second:{opacity:1,scale:100}};x(e,t,n,()=>{},i,h)})(e,n=i?n.filter((e,t)=>t<n.indexOf("out")):n,t)}else r.some(e=>["enter","enter-start","enter-end"].includes(e.value))?function(e,t,n,i){let r=n=>"function"==typeof n?t.evaluateReturnExpression(e,n):n;const s=p(r((n.find(e=>"enter"===e.value)||{expression:""}).expression)),o=p(r((n.find(e=>"enter-start"===e.value)||{expression:""}).expression)),a=p(r((n.find(e=>"enter-end"===e.value)||{expression:""}).expression));_(e,s,o,a,i,()=>{},h)}(e,n,r,t):t()}function y(e,t,n,i=!1){if(i)return t();if(e.__x_transition&&e.__x_transition.type===v)return;const r=d(e,n,"transition"),s=d(e,n,"show")[0];if(s&&s.modifiers.includes("transition")){let n=s.modifiers;if(n.includes("in")&&!n.includes("out"))return t();const i=n.includes("in")&&n.includes("out");(function(e,t,n,i){const r={duration:n?g(t,"duration",150):g(t,"duration",150)/2,origin:g(t,"origin","center"),first:{opacity:1,scale:100},second:{opacity:0,scale:g(t,"scale",95)}};x(e,t,()=>{},i,r,v)})(e,n=i?n.filter((e,t)=>t>n.indexOf("out")):n,i,t)}else r.some(e=>["leave","leave-start","leave-end"].includes(e.value))?function(e,t,n,i){const r=p((n.find(e=>"leave"===e.value)||{expression:""}).expression),s=p((n.find(e=>"leave-start"===e.value)||{expression:""}).expression),o=p((n.find(e=>"leave-end"===e.value)||{expression:""}).expression);_(e,r,s,o,()=>{},i,v)}(e,0,r,t):t()}function g(e,t,n){if(-1===e.indexOf(t))return n;const i=e[e.indexOf(t)+1];if(!i)return n;if("scale"===t&&!E(i))return n;if("duration"===t){let e=i.match(/([0-9]+)ms/);if(e)return e[1]}return"origin"===t&&["top","right","left","center","bottom"].includes(e[e.indexOf(t)+2])?[i,e[e.indexOf(t)+2]].join(" "):i}function x(e,t,n,i,r,s){e.__x_transition&&(cancelAnimationFrame(e.__x_transition.nextFrame),e.__x_transition.callback&&e.__x_transition.callback());const o=e.style.opacity,a=e.style.transform,l=e.style.transformOrigin,c=!t.includes("opacity")&&!t.includes("scale"),u=c||t.includes("opacity"),d=c||t.includes("scale"),f={start(){u&&(e.style.opacity=r.first.opacity),d&&(e.style.transform=`scale(${r.first.scale/100})`)},during(){d&&(e.style.transformOrigin=r.origin),e.style.transitionProperty=[u?"opacity":"",d?"transform":""].join(" ").trim(),e.style.transitionDuration=`${r.duration/1e3}s`,e.style.transitionTimingFunction="cubic-bezier(0.4, 0.0, 0.2, 1)"},show(){n()},end(){u&&(e.style.opacity=r.second.opacity),d&&(e.style.transform=`scale(${r.second.scale/100})`)},hide(){i()},cleanup(){u&&(e.style.opacity=o),d&&(e.style.transform=a),d&&(e.style.transformOrigin=l),e.style.transitionProperty=null,e.style.transitionDuration=null,e.style.transitionTimingFunction=null}};w(e,f,s)}function _(e,t,n,i,r,s,o){e.__x_transition&&(cancelAnimationFrame(e.__x_transition.nextFrame),e.__x_transition.callback&&e.__x_transition.callback());const a=e.__x_original_classes||[],l={start(){e.classList.add(...n)},during(){e.classList.add(...t)},show(){r()},end(){e.classList.remove(...n.filter(e=>!a.includes(e))),e.classList.add(...i)},hide(){s()},cleanup(){e.classList.remove(...t.filter(e=>!a.includes(e))),e.classList.remove(...i.filter(e=>!a.includes(e)))}};w(e,l,o)}function w(e,t,n){e.__x_transition={type:n,callback:O(()=>{t.hide(),e.isConnected&&t.cleanup(),delete e.__x_transition}),nextFrame:null},t.start(),t.during(),e.__x_transition.nextFrame=requestAnimationFrame(()=>{let n=1e3*Number(getComputedStyle(e).transitionDuration.replace(/,.*/,"").replace("s",""));0===n&&(n=1e3*Number(getComputedStyle(e).animationDuration.replace("s",""))),t.show(),e.__x_transition.nextFrame=requestAnimationFrame(()=>{t.end(),setTimeout(e.__x_transition.callback,n)})})}function E(e){return!isNaN(e)}function O(e){let t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function k(e,t,i,r,o){s(t,"x-for");let a=A("function"==typeof i?e.evaluateReturnExpression(t,i):i),l=function(e,t,n,i){let r=d(t,e,"if")[0];if(r&&!e.evaluateReturnExpression(t,r.expression))return[];return e.evaluateReturnExpression(t,n.items,i)}(e,t,a,o),c=t;l.forEach((i,s)=>{let u=function(e,t,i,r,s){let o=s?n({},s):{};o[e.item]=t,e.index&&(o[e.index]=i);e.collection&&(o[e.collection]=r);return o}(a,i,s,l,o()),f=function(e,t,n,i){let r=d(t,e,"bind").filter(e=>"key"===e.value)[0];return r?e.evaluateReturnExpression(t,r.expression,()=>i):n}(e,t,s,u),m=function(e,t){if(!e)return;if(e.__x_for_key===t)return e;let n=e;for(;n;){if(n.__x_for_key===t)return n.parentElement.insertBefore(n,e);n=!(!n.nextElementSibling||void 0===n.nextElementSibling.__x_for_key)&&n.nextElementSibling}}(c.nextElementSibling,f);m?(delete m.__x_for_key,m.__x_for=u,e.updateElements(m,()=>m.__x_for)):(b(m=function(e,t){let n=document.importNode(e.content,!0);return t.parentElement.insertBefore(n,t.nextElementSibling),t.nextElementSibling}(t,c),()=>{},e,r),m.__x_for=u,e.initializeElements(m,()=>m.__x_for)),(c=m).__x_for_key=f}),function(e,t){var n=!(!e.nextElementSibling||void 0===e.nextElementSibling.__x_for_key)&&e.nextElementSibling;for(;n;){let e=n,i=n.nextElementSibling;y(n,()=>{e.remove()},t),n=!(!i||void 0===i.__x_for_key)&&i}}(c,e)}function A(e){let t=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,n=e.match(/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/);if(!n)return;let i={};i.items=n[2].trim();let r=n[1].trim().replace(/^\(|\)$/g,""),s=r.match(t);return s?(i.item=r.replace(t,"").trim(),i.index=s[1].trim(),s[2]&&(i.collection=s[2].trim())):i.item=r,i}function S(e,t,n,r,s,a,l){var c=e.evaluateReturnExpression(t,r,s);if("value"===n){if(me.ignoreFocusedForValueBinding&&document.activeElement.isSameNode(t))return;if(void 0===c&&r.match(/\./)&&(c=""),"radio"===t.type)void 0===t.attributes.value&&"bind"===a?t.value=c:"bind"!==a&&(t.checked=t.value==c);else if("checkbox"===t.type)"string"==typeof c&&"bind"===a?t.value=c:"bind"!==a&&(Array.isArray(c)?t.checked=c.some(e=>e==t.value):t.checked=!!c);else if("SELECT"===t.tagName)!function(e,t){const n=[].concat(t).map(e=>e+"");Array.from(e.options).forEach(e=>{e.selected=n.includes(e.value||e.text)})}(t,c);else{if(t.value===c)return;t.value=c}}else if("class"===n)if(Array.isArray(c)){const e=t.__x_original_classes||[];t.setAttribute("class",i(e.concat(c)).join(" "))}else if("object"==typeof c){Object.keys(c).sort((e,t)=>c[e]-c[t]).forEach(e=>{c[e]?p(e).forEach(e=>t.classList.add(e)):p(e).forEach(e=>t.classList.remove(e))})}else{const e=t.__x_original_classes||[],n=p(c);t.setAttribute("class",i(e.concat(n)).join(" "))}else n=l.includes("camel")?o(n):n,[null,void 0,!1].includes(c)?t.removeAttribute(n):!function(e){return["disabled","checked","required","readonly","hidden","open","selected","autofocus","itemscope","multiple","novalidate","allowfullscreen","allowpaymentrequest","formnovalidate","autoplay","controls","loop","muted","playsinline","default","ismap","reversed","async","defer","nomodule"].includes(e)}(n)?$(t,n,c):$(t,n,n)}function $(e,t,n){e.getAttribute(t)!=n&&e.setAttribute(t,n)}function P(e,t,n,i,r,s={}){const l={passive:i.includes("passive")};if(i.includes("camel")&&(n=o(n)),i.includes("away")){let o=a=>{t.contains(a.target)||t.offsetWidth<1&&t.offsetHeight<1||(C(e,r,a,s),i.includes("once")&&document.removeEventListener(n,o,l))};document.addEventListener(n,o,l)}else{let o=i.includes("window")?window:i.includes("document")?document:t,c=a=>{if(o!==window&&o!==document||document.body.contains(t)){if(!(function(e){return["keydown","keyup"].includes(e)}(n)&&function(e,t){let n=t.filter(e=>!["window","document","prevent","stop"].includes(e));if(n.includes("debounce")){let e=n.indexOf("debounce");n.splice(e,E((n[e+1]||"invalid-wait").split("ms")[0])?2:1)}if(0===n.length)return!1;if(1===n.length&&n[0]===D(e.key))return!1;const i=["ctrl","shift","alt","meta","cmd","super"].filter(e=>n.includes(e));if(n=n.filter(e=>!i.includes(e)),i.length>0){const t=i.filter(t=>("cmd"!==t&&"super"!==t||(t="meta"),e[`${t}Key`]));if(t.length===i.length&&n[0]===D(e.key))return!1}return!0}(a,i)||(i.includes("prevent")&&a.preventDefault(),i.includes("stop")&&a.stopPropagation(),i.includes("self")&&a.target!==t))){C(e,r,a,s).then(e=>{!1===e?a.preventDefault():i.includes("once")&&o.removeEventListener(n,c,l)})}}else o.removeEventListener(n,c,l)};if(i.includes("debounce")){let e=i[i.indexOf("debounce")+1]||"invalid-wait",t=E(e.split("ms")[0])?Number(e.split("ms")[0]):250;c=a(c,t)}o.addEventListener(n,c,l)}}function C(e,t,i,r){return e.evaluateCommandExpression(i.target,t,()=>n(n({},r()),{},{$event:i}))}function D(e){switch(e){case"/":return"slash";case" ":case"Spacebar":return"space";default:return e&&e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}}function j(e,t,n){return"radio"===e.type&&(e.hasAttribute("name")||e.setAttribute("name",n)),(n,i)=>{if(n instanceof CustomEvent&&n.detail)return n.detail;if("checkbox"===e.type){if(Array.isArray(i)){const e=t.includes("number")?T(n.target.value):n.target.value;return n.target.checked?i.concat([e]):i.filter(t=>t!==e)}return n.target.checked}if("select"===e.tagName.toLowerCase()&&e.multiple)return t.includes("number")?Array.from(n.target.selectedOptions).map(e=>{return T(e.value||e.text)}):Array.from(n.target.selectedOptions).map(e=>e.value||e.text);{const e=n.target.value;return t.includes("number")?T(e):t.includes("trim")?e.trim():e}}}function T(e){const t=e?parseFloat(e):null;return E(t)?t:e}const{isArray:L}=Array,{getPrototypeOf:N,create:z,defineProperty:R,defineProperties:F,isExtensible:I,getOwnPropertyDescriptor:M,getOwnPropertyNames:B,getOwnPropertySymbols:U,preventExtensions:q,hasOwnProperty:W}=Object,{push:K,concat:G,map:H}=Array.prototype;function V(e){return void 0===e}function Z(e){return"function"==typeof e}const J=new WeakMap;function Q(e,t){J.set(e,t)}const X=e=>J.get(e)||e;function Y(e,t){return e.valueIsObservable(t)?e.getProxy(t):t}function ee(e,t,n){G.call(B(n),U(n)).forEach(i=>{let r=M(n,i);r.configurable||(r=ue(e,r,Y)),R(t,i,r)}),q(t)}class te{constructor(e,t){this.originalTarget=t,this.membrane=e}get(e,t){const{originalTarget:n,membrane:i}=this,r=n[t],{valueObserved:s}=i;return s(n,t),i.getProxy(r)}set(e,t,n){const{originalTarget:i,membrane:{valueMutated:r}}=this;return i[t]!==n?(i[t]=n,r(i,t)):"length"===t&&L(i)&&r(i,t),!0}deleteProperty(e,t){const{originalTarget:n,membrane:{valueMutated:i}}=this;return delete n[t],i(n,t),!0}apply(e,t,n){}construct(e,t,n){}has(e,t){const{originalTarget:n,membrane:{valueObserved:i}}=this;return i(n,t),t in n}ownKeys(e){const{originalTarget:t}=this;return G.call(B(t),U(t))}isExtensible(e){const t=I(e);if(!t)return t;const{originalTarget:n,membrane:i}=this,r=I(n);return r||ee(i,e,n),r}setPrototypeOf(e,t){}getPrototypeOf(e){const{originalTarget:t}=this;return N(t)}getOwnPropertyDescriptor(e,t){const{originalTarget:n,membrane:i}=this,{valueObserved:r}=this.membrane;r(n,t);let s=M(n,t);if(V(s))return s;const o=M(e,t);return V(o)?((s=ue(i,s,Y)).configurable||R(e,t,s),s):o}preventExtensions(e){const{originalTarget:t,membrane:n}=this;return ee(n,e,t),q(t),!0}defineProperty(e,t,n){const{originalTarget:i,membrane:r}=this,{valueMutated:s}=r,{configurable:o}=n;if(W.call(n,"writable")&&!W.call(n,"value")){const e=M(i,t);n.value=e.value}return R(i,t,function(e){return W.call(e,"value")&&(e.value=X(e.value)),e}(n)),!1===o&&R(e,t,ue(r,n,Y)),s(i,t),!0}}function ne(e,t){return e.valueIsObservable(t)?e.getReadOnlyProxy(t):t}class ie{constructor(e,t){this.originalTarget=t,this.membrane=e}get(e,t){const{membrane:n,originalTarget:i}=this,r=i[t],{valueObserved:s}=n;return s(i,t),n.getReadOnlyProxy(r)}set(e,t,n){return!1}deleteProperty(e,t){return!1}apply(e,t,n){}construct(e,t,n){}has(e,t){const{originalTarget:n,membrane:{valueObserved:i}}=this;return i(n,t),t in n}ownKeys(e){const{originalTarget:t}=this;return G.call(B(t),U(t))}setPrototypeOf(e,t){}getOwnPropertyDescriptor(e,t){const{originalTarget:n,membrane:i}=this,{valueObserved:r}=i;r(n,t);let s=M(n,t);if(V(s))return s;const o=M(e,t);return V(o)?(s=ue(i,s,ne),W.call(s,"set")&&(s.set=void 0),s.configurable||R(e,t,s),s):o}preventExtensions(e){return!1}defineProperty(e,t,n){return!1}}function re(e){let t=void 0;return L(e)?t=[]:"object"==typeof e&&(t={}),t}const se=Object.prototype;function oe(e){if(null===e)return!1;if("object"!=typeof e)return!1;if(L(e))return!0;const t=N(e);return t===se||null===t||null===N(t)}const ae=(e,t)=>{},le=(e,t)=>{},ce=e=>e;function ue(e,t,n){const{set:i,get:r}=t;return W.call(t,"value")?t.value=n(e,t.value):(V(r)||(t.get=function(){return n(e,r.call(X(this)))}),V(i)||(t.set=function(t){i.call(X(this),e.unwrapProxy(t))})),t}class de{constructor(e){if(this.valueDistortion=ce,this.valueMutated=le,this.valueObserved=ae,this.valueIsObservable=oe,this.objectGraph=new WeakMap,!V(e)){const{valueDistortion:t,valueMutated:n,valueObserved:i,valueIsObservable:r}=e;this.valueDistortion=Z(t)?t:ce,this.valueMutated=Z(n)?n:le,this.valueObserved=Z(i)?i:ae,this.valueIsObservable=Z(r)?r:oe}}getProxy(e){const t=X(e),n=this.valueDistortion(t);if(this.valueIsObservable(n)){const i=this.getReactiveState(t,n);return i.readOnly===e?e:i.reactive}return n}getReadOnlyProxy(e){e=X(e);const t=this.valueDistortion(e);return this.valueIsObservable(t)?this.getReactiveState(e,t).readOnly:t}unwrapProxy(e){return X(e)}getReactiveState(e,t){const{objectGraph:n}=this;let i=n.get(t);if(i)return i;const r=this;return i={get reactive(){const n=new te(r,t),i=new Proxy(re(t),n);return Q(i,e),R(this,"reactive",{value:i}),i},get readOnly(){const n=new ie(r,t),i=new Proxy(re(t),n);return Q(i,e),R(this,"readOnly",{value:i}),i}},n.set(t,i),i}}class fe{constructor(e,t=null){this.$el=e;const n=this.$el.getAttribute("x-data"),i=""===n?"{}":n,r=this.$el.getAttribute("x-init");let s={$el:this.$el},o=t?t.$el:this.$el;Object.entries(me.magicProperties).forEach(([e,t])=>{Object.defineProperty(s,`$${e}`,{get:function(){return t(o)}})}),this.unobservedData=t?t.getUnobservedData():l(i,s);let{membrane:a,data:c}=this.wrapDataInObservable(this.unobservedData);var u;this.$data=c,this.membrane=a,this.unobservedData.$el=this.$el,this.unobservedData.$refs=this.getRefsProxy(),this.nextTickStack=[],this.unobservedData.$nextTick=(e=>{this.nextTickStack.push(e)}),this.watchers={},this.unobservedData.$watch=((e,t)=>{this.watchers[e]||(this.watchers[e]=[]),this.watchers[e].push(t)}),Object.entries(me.magicProperties).forEach(([e,t])=>{Object.defineProperty(this.unobservedData,`$${e}`,{get:function(){return t(o)}})}),this.showDirectiveStack=[],this.showDirectiveLastElement,t||me.onBeforeComponentInitializeds.forEach(e=>e(this)),r&&!t&&(this.pauseReactivity=!0,u=this.evaluateReturnExpression(this.$el,r),this.pauseReactivity=!1),this.initializeElements(this.$el),this.listenForNewElementsToInitialize(),"function"==typeof u&&u.call(this.$data),t||setTimeout(()=>{me.onComponentInitializeds.forEach(e=>e(this))},0)}getUnobservedData(){return function(e,t){let n=e.unwrapProxy(t),i={};return Object.keys(n).forEach(e=>{["$el","$refs","$nextTick","$watch"].includes(e)||(i[e]=n[e])}),i}(this.membrane,this.$data)}wrapDataInObservable(e){var t=this;let n=a(function(){t.updateElements(t.$el)},0);return function(e,t){let n=new de({valueMutated(e,n){t(e,n)}});return{data:n.getProxy(e),membrane:n}}(e,(e,i)=>{t.watchers[i]?t.watchers[i].forEach(t=>t(e[i])):Object.keys(t.watchers).filter(e=>e.includes(".")).forEach(n=>{let r=n.split(".");i===r[r.length-1]&&r.reduce((r,s)=>(Object.is(e,r)&&t.watchers[n].forEach(t=>t(e[i])),r[s]),t.getUnobservedData())}),t.pauseReactivity||n()})}walkAndSkipNestedComponents(e,t,n=(()=>{})){!function e(t,n){if(!1===n(t))return;let i=t.firstElementChild;for(;i;)e(i,n),i=i.nextElementSibling}(e,e=>e.hasAttribute("x-data")&&!e.isSameNode(this.$el)?(e.__x||n(e),!1):t(e))}initializeElements(e,t=(()=>{})){this.walkAndSkipNestedComponents(e,e=>void 0===e.__x_for_key&&(void 0===e.__x_inserted_me&&void this.initializeElement(e,t)),e=>{e.__x=new fe(e)}),this.executeAndClearRemainingShowDirectiveStack(),this.executeAndClearNextTickStack(e)}initializeElement(e,t){e.hasAttribute("class")&&d(e,this).length>0&&(e.__x_original_classes=p(e.getAttribute("class"))),this.registerListeners(e,t),this.resolveBoundAttributes(e,!0,t)}updateElements(e,t=(()=>{})){this.walkAndSkipNestedComponents(e,e=>{if(void 0!==e.__x_for_key&&!e.isSameNode(this.$el))return!1;this.updateElement(e,t)},e=>{e.__x=new fe(e)}),this.executeAndClearRemainingShowDirectiveStack(),this.executeAndClearNextTickStack(e)}executeAndClearNextTickStack(e){e===this.$el&&this.nextTickStack.length>0&&requestAnimationFrame(()=>{for(;this.nextTickStack.length>0;)this.nextTickStack.shift()()})}executeAndClearRemainingShowDirectiveStack(){this.showDirectiveStack.reverse().map(e=>new Promise(t=>{e(e=>{t(e)})})).reduce((e,t)=>e.then(()=>t.then(e=>e())),Promise.resolve(()=>{})),this.showDirectiveStack=[],this.showDirectiveLastElement=void 0}updateElement(e,t){this.resolveBoundAttributes(e,!1,t)}registerListeners(e,t){d(e,this).forEach(({type:i,value:r,modifiers:s,expression:o})=>{switch(i){case"on":P(this,e,r,s,o,t);break;case"model":!function(e,t,i,r,s){var o="select"===t.tagName.toLowerCase()||["checkbox","radio"].includes(t.type)||i.includes("lazy")?"change":"input";P(e,t,o,i,`${r} = rightSideOfExpression($event, ${r})`,()=>n(n({},s()),{},{rightSideOfExpression:j(t,i,r)}))}(this,e,s,o,t)}})}resolveBoundAttributes(e,t=!1,n){let i=d(e,this);i.forEach(({type:r,value:o,modifiers:a,expression:l})=>{switch(r){case"model":S(this,e,"value",l,n,r,a);break;case"bind":if("template"===e.tagName.toLowerCase()&&"key"===o)return;S(this,e,o,l,n,r,a);break;case"text":var c=this.evaluateReturnExpression(e,l,n);!function(e,t,n){void 0===t&&n.match(/\./)&&(t=""),e.innerText=t}(e,c,l);break;case"html":!function(e,t,n,i){t.innerHTML=e.evaluateReturnExpression(t,n,i)}(this,e,l,n);break;case"show":c=this.evaluateReturnExpression(e,l,n);!function(e,t,n,i,r=!1){const s=()=>{t.style.display="none"},o=()=>{1===t.style.length&&"none"===t.style.display?t.removeAttribute("style"):t.style.removeProperty("display")};if(!0===r)return void(n?o():s());const a=i=>{n?(("none"===t.style.display||t.__x_transition)&&b(t,()=>{o()},e),i(()=>{})):"none"!==t.style.display?y(t,()=>{i(()=>{s()})},e):i(()=>{})};i.includes("immediate")?a(e=>e()):(e.showDirectiveLastElement&&!e.showDirectiveLastElement.contains(t)&&e.executeAndClearRemainingShowDirectiveStack(),e.showDirectiveStack.push(a),e.showDirectiveLastElement=t)}(this,e,c,a,t);break;case"if":if(i.some(e=>"for"===e.type))return;c=this.evaluateReturnExpression(e,l,n);!function(e,t,n,i,r){s(t,"x-if");const o=t.nextElementSibling&&!0===t.nextElementSibling.__x_inserted_me;if(!n||o&&!t.__x_transition)!n&&o&&y(t.nextElementSibling,()=>{t.nextElementSibling.remove()},e,i);else{const n=document.importNode(t.content,!0);t.parentElement.insertBefore(n,t.nextElementSibling),b(t.nextElementSibling,()=>{},e,i),e.initializeElements(t.nextElementSibling,r),t.nextElementSibling.__x_inserted_me=!0}}(this,e,c,t,n);break;case"for":k(this,e,l,t,n);break;case"cloak":e.removeAttribute("x-cloak")}})}evaluateReturnExpression(e,t,i=(()=>{})){return l(t,this.$data,n(n({},i()),{},{$dispatch:this.getDispatchFunction(e)}))}evaluateCommandExpression(e,t,i=(()=>{})){return function(e,t,n={}){if("function"==typeof e)return Promise.resolve(e.call(t,n.$event));let i=Function;if(i=Object.getPrototypeOf(async function(){}).constructor,Object.keys(t).includes(e)){let i=new Function(["dataContext",...Object.keys(n)],`with(dataContext) { return ${e} }`)(t,...Object.values(n));return"function"==typeof i?Promise.resolve(i.call(t,n.$event)):Promise.resolve()}return Promise.resolve(new i(["dataContext",...Object.keys(n)],`with(dataContext) { ${e} }`)(t,...Object.values(n)))}(t,this.$data,n(n({},i()),{},{$dispatch:this.getDispatchFunction(e)}))}getDispatchFunction(e){return(t,n={})=>{e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0}))}}listenForNewElementsToInitialize(){const e=this.$el;new MutationObserver(e=>{for(let t=0;t<e.length;t++){const n=e[t].target.closest("[x-data]");if(n&&n.isSameNode(this.$el)){if("attributes"===e[t].type&&"x-data"===e[t].attributeName){const n=l(e[t].target.getAttribute("x-data")||"{}",{$el:this.$el});Object.keys(n).forEach(e=>{this.$data[e]!==n[e]&&(this.$data[e]=n[e])})}e[t].addedNodes.length>0&&e[t].addedNodes.forEach(e=>{1!==e.nodeType||e.__x_inserted_me||(!e.matches("[x-data]")||e.__x?this.initializeElements(e):e.__x=new fe(e))})}}}).observe(e,{childList:!0,attributes:!0,subtree:!0})}getRefsProxy(){var e=this;return new Proxy({},{get(t,n){return"$isAlpineProxy"===n||(e.walkAndSkipNestedComponents(e.$el,e=>{e.hasAttribute("x-ref")&&e.getAttribute("x-ref")===n&&(i=e)}),i);var i}})}}const me={version:"2.6.0",pauseMutationObserver:!1,magicProperties:{},onComponentInitializeds:[],onBeforeComponentInitializeds:[],ignoreFocusedForValueBinding:!1,start:async function(){r()||await new Promise(e=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",e):e()}),this.discoverComponents(e=>{this.initializeComponent(e)}),document.addEventListener("turbolinks:load",()=>{this.discoverUninitializedComponents(e=>{this.initializeComponent(e)})}),this.listenForNewUninitializedComponentsAtRunTime(e=>{this.initializeComponent(e)})},discoverComponents:function(e){document.querySelectorAll("[x-data]").forEach(t=>{e(t)})},discoverUninitializedComponents:function(e,t=null){const n=(t||document).querySelectorAll("[x-data]");Array.from(n).filter(e=>void 0===e.__x).forEach(t=>{e(t)})},listenForNewUninitializedComponentsAtRunTime:function(e){const t=document.querySelector("body");new MutationObserver(e=>{if(!this.pauseMutationObserver)for(let t=0;t<e.length;t++)e[t].addedNodes.length>0&&e[t].addedNodes.forEach(e=>{1===e.nodeType&&(e.parentElement&&e.parentElement.closest("[x-data]")||this.discoverUninitializedComponents(e=>{this.initializeComponent(e)},e.parentElement))})}).observe(t,{childList:!0,attributes:!0,subtree:!0})},initializeComponent:function(e){if(!e.__x)try{e.__x=new fe(e)}catch(e){setTimeout(()=>{throw e},0)}},clone:function(e,t){t.__x||(t.__x=new fe(t,e))},addMagicProperty:function(e,t){this.magicProperties[e]=t},onComponentInitialized:function(e){this.onComponentInitializeds.push(e)},onBeforeComponentInitialized:function(e){this.onBeforeComponentInitializeds.push(e)}};return r()||(window.Alpine=me,window.deferLoadingAlpine?window.deferLoadingAlpine(function(){window.Alpine.start()}):window.Alpine.start()),me});
|
8
|
-
//# sourceMappingURL=/sm/54d8acf4bec59c2ac38179fad55c741f03c418f9ea483b114454c0827631f4ba.map
|
data/lib/web/style.css
DELETED
@@ -1,151 +0,0 @@
|
|
1
|
-
/* Layout. */
|
2
|
-
body {
|
3
|
-
padding: 0.5rem;
|
4
|
-
background: #C9D2E6;
|
5
|
-
font-family: 'Roboto', sans-serif;
|
6
|
-
}
|
7
|
-
|
8
|
-
.container {
|
9
|
-
margin: 0 auto;
|
10
|
-
max-width: 1000px;
|
11
|
-
padding: 2rem;
|
12
|
-
background: white;
|
13
|
-
}
|
14
|
-
|
15
|
-
/* Header. */
|
16
|
-
#logo {
|
17
|
-
display: block;
|
18
|
-
margin: 0 auto;
|
19
|
-
max-width: 100px;
|
20
|
-
}
|
21
|
-
|
22
|
-
/* Structure */
|
23
|
-
ul.classes,
|
24
|
-
ul.methods,
|
25
|
-
ul.controls,
|
26
|
-
ul.reflections {
|
27
|
-
padding-left: 0;
|
28
|
-
}
|
29
|
-
|
30
|
-
li.class-container,
|
31
|
-
li.method-container {
|
32
|
-
list-style: none;
|
33
|
-
padding: 1rem;
|
34
|
-
border: 5px solid #dadcdc;
|
35
|
-
}
|
36
|
-
|
37
|
-
/* State. */
|
38
|
-
.status-row {
|
39
|
-
width: 100%;
|
40
|
-
display: flex;
|
41
|
-
align-items: center;
|
42
|
-
flex-direction: row;
|
43
|
-
color: white;
|
44
|
-
background: #A9B6D2;
|
45
|
-
}
|
46
|
-
.status-row.pass {
|
47
|
-
background: #008C32;
|
48
|
-
}
|
49
|
-
.status-row.fail {
|
50
|
-
background: #D04700;
|
51
|
-
}
|
52
|
-
|
53
|
-
/* Buttons. */
|
54
|
-
.method .buttons {
|
55
|
-
margin-left: auto;
|
56
|
-
margin-right: 1rem;
|
57
|
-
}
|
58
|
-
.buttons button {
|
59
|
-
padding: 1rem 2rem;
|
60
|
-
}
|
61
|
-
|
62
|
-
/* Stats. */
|
63
|
-
.class .stats {
|
64
|
-
margin-left: auto;
|
65
|
-
}
|
66
|
-
.stat {
|
67
|
-
color: #efefef;
|
68
|
-
font-size: 3.5rem;
|
69
|
-
font-family: 'Merriweather', serif;
|
70
|
-
}
|
71
|
-
|
72
|
-
/* Class. */
|
73
|
-
.class {
|
74
|
-
padding: 2rem;
|
75
|
-
margin-bottom: 1rem;
|
76
|
-
}
|
77
|
-
.class:hover {
|
78
|
-
cursor: pointer;
|
79
|
-
}
|
80
|
-
.class h2 {
|
81
|
-
margin: 0;
|
82
|
-
}
|
83
|
-
|
84
|
-
/* Method. */
|
85
|
-
.method {
|
86
|
-
padding: 2rem;
|
87
|
-
margin-left: 1rem;
|
88
|
-
margin-bottom: 1rem;
|
89
|
-
}
|
90
|
-
.method:hover {
|
91
|
-
cursor: pointer;
|
92
|
-
}
|
93
|
-
.method .stat {
|
94
|
-
font-size: 2.5rem;
|
95
|
-
}
|
96
|
-
|
97
|
-
/* Reflection. */
|
98
|
-
.control,
|
99
|
-
.reflection {
|
100
|
-
list-style: none;
|
101
|
-
margin-left: 2rem;
|
102
|
-
display: flex;
|
103
|
-
flex-direction: row;
|
104
|
-
align-items: center;
|
105
|
-
background: #EFEFEF;
|
106
|
-
padding: 0.5rem 1.5rem;
|
107
|
-
margin-bottom: 0.3rem;
|
108
|
-
}
|
109
|
-
.control .time,
|
110
|
-
.reflection .time {
|
111
|
-
color: #777777;
|
112
|
-
margin-right: 2rem;
|
113
|
-
}
|
114
|
-
|
115
|
-
.info {
|
116
|
-
display: flex;
|
117
|
-
flex-direction: row;
|
118
|
-
align-items: center;
|
119
|
-
padding: 0.5rem 1rem;
|
120
|
-
border: 1px solid #aaa;
|
121
|
-
border-radius: 5px;
|
122
|
-
}
|
123
|
-
.info:not(:last-child) {
|
124
|
-
margin-right: 0.5rem;
|
125
|
-
}
|
126
|
-
.info h4 {
|
127
|
-
margin: 0;
|
128
|
-
color: #777777;
|
129
|
-
font-size: 1.2rem;
|
130
|
-
font-weight: normal;
|
131
|
-
}
|
132
|
-
|
133
|
-
.info-items {
|
134
|
-
display: flex;
|
135
|
-
flex-direction: row;
|
136
|
-
}
|
137
|
-
.info-item {
|
138
|
-
padding-left: 1rem;
|
139
|
-
padding-right: 1rem;
|
140
|
-
border-right: 1px solid #ccc;
|
141
|
-
}
|
142
|
-
.info-item:last-of-type {
|
143
|
-
padding-right: 0;
|
144
|
-
border-right: 0;
|
145
|
-
}
|
146
|
-
.info-item strong {
|
147
|
-
padding-bottom: 0.1rem;
|
148
|
-
}
|
149
|
-
.info-item pre {
|
150
|
-
margin: 0;
|
151
|
-
}
|
data/lib/web/template.html.erb
DELETED
@@ -1,266 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
|
4
|
-
<head>
|
5
|
-
<meta charset="utf-8">
|
6
|
-
<title>Reflekt</title>
|
7
|
-
<meta name="description" content="Reflective testing results.">
|
8
|
-
<meta name="author" content="Maedi Prichard">
|
9
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
10
|
-
<link rel="stylesheet" href="style.css">
|
11
|
-
<link rel="shortcut icon" href="">
|
12
|
-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap" rel="stylesheet">
|
13
|
-
<link href="https://fonts.googleapis.com/css2?family=Merriweather&display=swap" rel="stylesheet">
|
14
|
-
</head>
|
15
|
-
|
16
|
-
<body>
|
17
|
-
|
18
|
-
<script>
|
19
|
-
|
20
|
-
// Reflection keys.
|
21
|
-
const TIME = "t";
|
22
|
-
const INPUT = "i";
|
23
|
-
const OUTPUT = "o";
|
24
|
-
const TYPE = "T";
|
25
|
-
const COUNT = "C";
|
26
|
-
const VALUE = "V";
|
27
|
-
const STATUS = "s";
|
28
|
-
const MESSAGE = "m";
|
29
|
-
// Reflection values.
|
30
|
-
const PASS = "p";
|
31
|
-
const FAIL = "f";
|
32
|
-
|
33
|
-
function getData() {
|
34
|
-
|
35
|
-
var data = JSON.parse(<%= @@reflekt_json %>);
|
36
|
-
var results = {};
|
37
|
-
|
38
|
-
console.log("DATA:");
|
39
|
-
console.log(data);
|
40
|
-
|
41
|
-
if ('reflekt' in data) {
|
42
|
-
delete(data.reflekt);
|
43
|
-
}
|
44
|
-
|
45
|
-
// Classes.
|
46
|
-
for ([class_id, class_value] of Object.entries(data)) {
|
47
|
-
|
48
|
-
// Class pass rate.
|
49
|
-
results[class_id] = {
|
50
|
-
'stats': {
|
51
|
-
'pass_rate': undefined,
|
52
|
-
'test_count': 0,
|
53
|
-
'pass_count': 0
|
54
|
-
},
|
55
|
-
'methods': {}
|
56
|
-
};
|
57
|
-
|
58
|
-
// Methods.
|
59
|
-
for ([method_id, method] of Object.entries(class_value)) {
|
60
|
-
|
61
|
-
// Reflection pass rate.
|
62
|
-
var pass_count = method.reflections.reduce(function(obj, v) {
|
63
|
-
obj[v[STATUS]] = (obj[v[STATUS]] || 0) + 1;
|
64
|
-
return obj;
|
65
|
-
}, {});
|
66
|
-
|
67
|
-
var pass_rate = (pass_count[PASS] / method.reflections.length) * 100;
|
68
|
-
results[class_id]['methods'][method_id] = {
|
69
|
-
'stats': {
|
70
|
-
'pass_rate': pass_rate,
|
71
|
-
'test_count': method.reflections.length,
|
72
|
-
'pass_count': pass_count[PASS]
|
73
|
-
}
|
74
|
-
};
|
75
|
-
if (pass_rate == 100) {
|
76
|
-
results[class_id]['methods'][method_id]['status'] = 'pass';
|
77
|
-
}
|
78
|
-
else if (pass_rate < 100) {
|
79
|
-
results[class_id]['methods'][method_id]['status'] = 'fail';
|
80
|
-
}
|
81
|
-
|
82
|
-
// Class pass rate.
|
83
|
-
results[class_id]['stats']['test_count'] += method.reflections.length;
|
84
|
-
results[class_id]['stats']['pass_count'] += pass_count[PASS];
|
85
|
-
|
86
|
-
}
|
87
|
-
|
88
|
-
// Class pass rate.
|
89
|
-
var class_stats = results[class_id]['stats'];
|
90
|
-
var pass_rate = (class_stats['pass_count'] / class_stats['test_count']) * 100;
|
91
|
-
class_stats['pass_rate'] = pass_rate;
|
92
|
-
if (pass_rate == 100) {
|
93
|
-
results[class_id]['status'] = 'pass';
|
94
|
-
}
|
95
|
-
else if (pass_rate < 100) {
|
96
|
-
results[class_id]['status'] = 'fail';
|
97
|
-
}
|
98
|
-
}
|
99
|
-
|
100
|
-
return {
|
101
|
-
data: data,
|
102
|
-
results: results
|
103
|
-
};
|
104
|
-
}
|
105
|
-
|
106
|
-
</script>
|
107
|
-
|
108
|
-
<div class="container" x-data="getData()">
|
109
|
-
|
110
|
-
<div id="header">
|
111
|
-
<svg id="logo" enable-background="new 0 0 500 500" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
|
112
|
-
<path d="m307.5 80.5h-115l-57.5 205h230z" fill="#0047d0"/>
|
113
|
-
<path d="m178 76.5-53.1-44-117.9 139 116 112z" fill="#d04800"/>
|
114
|
-
<path d="m190.4 467.5h115l57.5-168h-229z" fill="#0047d0" opacity=".7"/>
|
115
|
-
<path d="m177 467.5-81-85-92-197 115 113z" fill="#d04800" opacity=".7"/>
|
116
|
-
<g fill="#008c33"><path d="m322 76.5 53.1-44 118 139-116 112z"/>
|
117
|
-
<path d="m320 467.5 84-85 92-197-117 113z" opacity=".7"/>
|
118
|
-
</g>
|
119
|
-
</svg>
|
120
|
-
</div>
|
121
|
-
|
122
|
-
<ul class="classes">
|
123
|
-
<template x-for="[class_id, klass] in Object.entries(results)" :key="class_id">
|
124
|
-
|
125
|
-
<li class="class-container">
|
126
|
-
|
127
|
-
<div class="status-row class" x-bind:class="`${klass.status}`" @click="klass['show'] = !klass['show']" :aria-expanded="klass['show'] ? 'true' : 'false'" :class="{ 'active': klass['show'] }">
|
128
|
-
<h2 x-text="`${class_id}()`"></h2>
|
129
|
-
<div class="stats">
|
130
|
-
<div class="stat" x-text="`${klass.stats.pass_rate.toFixed(2)}%`"></div>
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
|
134
|
-
<ul class="methods" x-show="klass['show']">
|
135
|
-
<template x-for="[method_id, method] in Object.entries(klass['methods'])" :key="method_id">
|
136
|
-
<li class="method-container">
|
137
|
-
|
138
|
-
<div class="status-row method" x-bind:class="`${method.status}`" :class="{ 'active': method['show_reflections'] }" :class="{ 'active': method['show_controls'] }">
|
139
|
-
<h3 x-text="`${method_id}()`"></h3>
|
140
|
-
<div class="buttons">
|
141
|
-
<button @click="method['show_controls'] = !method['show_controls']">Controls</button>
|
142
|
-
<button @click="method['show_reflections'] = !method['show_reflections']">Reflections</button>
|
143
|
-
</div>
|
144
|
-
<div class="stats">
|
145
|
-
<div class="stat" x-text="`${method.stats.pass_rate.toFixed(2)}%`"></div>
|
146
|
-
</div>
|
147
|
-
</div>
|
148
|
-
|
149
|
-
<ul class="reflections" x-show="method['show_reflections']">
|
150
|
-
<template x-for="[reflection_id, reflection] in Object.entries(data[class_id][method_id].reflections)">
|
151
|
-
|
152
|
-
<li class="reflection">
|
153
|
-
|
154
|
-
<div class="time" x-text="`${new Date(reflection.t * 1000).getFullYear()}/${new Date(reflection.t * 1000).getMonth() + 1}/${new Date(reflection.t * 1000).getDate()} ${new Date(reflection.t * 1000).getHours()}:${new Date(reflection.t * 1000).getMinutes()}:${new Date(reflection.t * 1000).getSeconds()}`"></div>
|
155
|
-
|
156
|
-
<template x-for="[input_id, input] in Object.entries(reflection.i)">
|
157
|
-
|
158
|
-
<div class="info">
|
159
|
-
<h4>Input</h4>
|
160
|
-
<div class="info-items">
|
161
|
-
<div class="info-item">
|
162
|
-
<strong>Type:</strong><div class="input" x-text="input.T"></div>
|
163
|
-
</div>
|
164
|
-
<template x-if="input.V != undefined">
|
165
|
-
<div class="info-item">
|
166
|
-
<strong>Value:</strong><pre><div class="output" x-text="input.V"></div></pre>
|
167
|
-
</div>
|
168
|
-
</template>
|
169
|
-
<template x-if="input.C != undefined">
|
170
|
-
<div class="info-item">
|
171
|
-
<strong>Count:</strong><div class="input" x-text="input.C"></div>
|
172
|
-
</div>
|
173
|
-
</template>
|
174
|
-
</div>
|
175
|
-
</div>
|
176
|
-
|
177
|
-
</template>
|
178
|
-
|
179
|
-
<div class="info">
|
180
|
-
<h4>Output</h4>
|
181
|
-
<div class="info-items">
|
182
|
-
<div class="info-item">
|
183
|
-
<strong>Type:</strong><div class="output" x-text="reflection.o.T"></div>
|
184
|
-
</div>
|
185
|
-
<template x-if="reflection.o.C != undefined">
|
186
|
-
<div class="info-item">
|
187
|
-
<strong>Count:</strong><div class="output" x-text="reflection.o.C"></div>
|
188
|
-
</div>
|
189
|
-
</template>
|
190
|
-
<div class="info-item">
|
191
|
-
<strong>Value:</strong><pre><div class="output" x-text="reflection.o.V"></div></pre>
|
192
|
-
</div>
|
193
|
-
</div>
|
194
|
-
</div>
|
195
|
-
</li>
|
196
|
-
|
197
|
-
</template>
|
198
|
-
</ul>
|
199
|
-
|
200
|
-
<ul class="controls" x-show="method['show_controls']">
|
201
|
-
<template x-for="[control_id, control] in Object.entries(data[class_id][method_id].controls)">
|
202
|
-
|
203
|
-
<li class="control">
|
204
|
-
|
205
|
-
<div class="time" x-text="`${new Date(control.t * 1000).getFullYear()}/${new Date(control.t * 1000).getMonth() + 1}/${new Date(control.t * 1000).getDate()} ${new Date(control.t * 1000).getHours()}:${new Date(control.t * 1000).getMinutes()}:${new Date(control.t * 1000).getSeconds()}`"></div>
|
206
|
-
|
207
|
-
<template x-for="[input_id, input] in Object.entries(control.i)">
|
208
|
-
|
209
|
-
<div class="info">
|
210
|
-
<h4>Input</h4>
|
211
|
-
<div class="info-items">
|
212
|
-
<div class="info-item">
|
213
|
-
<strong>Type:</strong><div class="input" x-text="input.T"></div>
|
214
|
-
</div>
|
215
|
-
<template x-if="input.V != undefined">
|
216
|
-
<div class="info-item">
|
217
|
-
<strong>Value:</strong><pre><div class="output" x-text="input.V"></div></pre>
|
218
|
-
</div>
|
219
|
-
</template>
|
220
|
-
<template x-if="input.C != undefined">
|
221
|
-
<div class="info-item">
|
222
|
-
<strong>Count:</strong><div class="input" x-text="input.C"></div>
|
223
|
-
</div>
|
224
|
-
</template>
|
225
|
-
</div>
|
226
|
-
</div>
|
227
|
-
|
228
|
-
</template>
|
229
|
-
|
230
|
-
<div class="info">
|
231
|
-
<h4>Output</h4>
|
232
|
-
<div class="info-items">
|
233
|
-
<div class="info-item">
|
234
|
-
<strong>Type:</strong><div class="output" x-text="control.o.T"></div>
|
235
|
-
</div>
|
236
|
-
<template x-if="control.o.C != undefined">
|
237
|
-
<div class="info-item">
|
238
|
-
<strong>Count:</strong><div class="output" x-text="control.o.C"></div>
|
239
|
-
</div>
|
240
|
-
</template>
|
241
|
-
<div class="info-item">
|
242
|
-
<strong>Value:</strong><pre><div class="output" x-text="control.o.V"></div></pre>
|
243
|
-
</div>
|
244
|
-
</div>
|
245
|
-
</div>
|
246
|
-
</li>
|
247
|
-
|
248
|
-
</template>
|
249
|
-
</ul>
|
250
|
-
|
251
|
-
</li>
|
252
|
-
</template>
|
253
|
-
</ul>
|
254
|
-
|
255
|
-
</li>
|
256
|
-
</template>
|
257
|
-
|
258
|
-
</ul>
|
259
|
-
|
260
|
-
</div>
|
261
|
-
|
262
|
-
<script src="script.js"></script>
|
263
|
-
|
264
|
-
</body>
|
265
|
-
|
266
|
-
</html>
|