From d4820927645d68f4398bcf13bb3e31fa46bc1f54 Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Tue, 30 Apr 2024 00:58:25 +0200 Subject: [PATCH] Changed module name --- ex1/app.go | 2 +- ex1/frontend/dist/assets/index.0f93eccd.js | 1 + ex1/frontend/dist/assets/index.b19f2494.js | 1 - ex1/frontend/dist/index.html | 2 +- ex1/go.mod | 2 +- ex1/main.go | 4 ++-- ex1/parsing/parsing.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 ex1/frontend/dist/assets/index.0f93eccd.js delete mode 100644 ex1/frontend/dist/assets/index.b19f2494.js diff --git a/ex1/app.go b/ex1/app.go index 67ded09..e2c1584 100644 --- a/ex1/app.go +++ b/ex1/app.go @@ -3,7 +3,7 @@ package main import ( "context" - "git.cems.dev/cdricms/bdooc/proto" + "git.cems.dev/cdricms/bdooc/ex1/proto" "github.com/wailsapp/wails/v2/pkg/runtime" ) diff --git a/ex1/frontend/dist/assets/index.0f93eccd.js b/ex1/frontend/dist/assets/index.0f93eccd.js new file mode 100644 index 0000000..106f25d --- /dev/null +++ b/ex1/frontend/dist/assets/index.0f93eccd.js @@ -0,0 +1 @@ +var Xe=Object.defineProperty;var Ye=(t,e,l)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l;var j=(t,e,l)=>(Ye(t,typeof e!="symbol"?e+"":e,l),l);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function l(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=l(i);fetch(i.href,o)}})();function X(){}function Ze(t,e){for(const l in e)t[l]=e[l];return t}function $e(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function Ke(t){return t()}function we(){return Object.create(null)}function D(t){t.forEach(Ke)}function Qe(t){return typeof t=="function"}function ue(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function xe(t){return Object.keys(t).length===0}function et(t,e,l,n){if(t){const i=Ve(t,e,l,n);return t[0](i)}}function Ve(t,e,l,n){return t[1]&&n?Ze(l.ctx.slice(),t[1](n(e))):l.ctx}function tt(t,e,l,n){if(t[2]&&n){const i=t[2](n(l));if(e.dirty===void 0)return i;if(typeof i=="object"){const o=[],r=Math.max(e.dirty.length,i.length);for(let s=0;s32){const e=[],l=t.ctx.length/32;for(let n=0;nt.removeEventListener(e,l,n)}function R(t,e,l){l==null?t.removeAttribute(e):t.getAttribute(e)!==l&&t.setAttribute(e,l)}function it(t){return Array.from(t.childNodes)}function T(t,e){e=""+e,t.data!==e&&(t.data=e)}function Oe(t,e){t.value=e==null?"":e}function Y(t,e,l){for(let n=0;nt.indexOf(n)===-1?e.push(n):l.push(n)),l.forEach(n=>n()),x=e}const ie=new Set;let H;function ye(){H={r:0,c:[],p:H}}function je(){H.r||D(H.c),H=H.p}function U(t,e){t&&t.i&&(ie.delete(t),t.i(e))}function V(t,e,l,n){if(t&&t.o){if(ie.has(t))return;ie.add(t),H.c.push(()=>{ie.delete(t),n&&(l&&t.d(1),n())}),t.o(e)}else n&&n()}function oe(t,e){const l=e.token={};function n(i,o,r,s){if(e.token!==l)return;e.resolved=s;let h=e.ctx;r!==void 0&&(h=h.slice(),h[r]=s);const u=i&&(e.current=i)(h);let a=!1;e.block&&(e.blocks?e.blocks.forEach((p,b)=>{b!==o&&p&&(ye(),V(p,1,1,()=>{e.blocks[b]===p&&(e.blocks[b]=null)}),je())}):e.block.d(1),u.c(),U(u,1),u.m(e.mount(),e.anchor),a=!0),e.block=u,e.blocks&&(e.blocks[o]=u),a&&ke()}if($e(t)){const i=He();if(t.then(o=>{Q(i),n(e.then,1,e.value,o),Q(null)},o=>{if(Q(i),n(e.catch,2,e.error,o),Q(null),!e.hasCatch)throw o}),e.current!==e.pending)return n(e.pending,0),!0}else{if(e.current!==e.then)return n(e.then,1,e.value,t),!0;e.resolved=t}}function We(t,e,l){const n=e.slice(),{resolved:i}=t;t.current===t.then&&(n[t.value]=i),t.current===t.catch&&(n[t.error]=i),t.block.p(n,l)}function de(t,e,l){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=l,l(t.$$.ctx[n]))}function be(t){t&&t.c()}function re(t,e,l,n){const{fragment:i,after_update:o}=t.$$;i&&i.m(e,l),n||ee(()=>{const r=t.$$.on_mount.map(Ke).filter(Qe);t.$$.on_destroy?t.$$.on_destroy.push(...r):D(r),t.$$.on_mount=[]}),o.forEach(ee)}function se(t,e){const l=t.$$;l.fragment!==null&&(ct(l.after_update),D(l.on_destroy),l.fragment&&l.fragment.d(e),l.on_destroy=l.fragment=null,l.ctx=[])}function ft(t,e){t.$$.dirty[0]===-1&&($.push(t),st(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const N=g.length?g[0]:b;return u.ctx&&i(u.ctx[p],u.ctx[p]=N)&&(!u.skip_bound&&u.bound[p]&&u.bound[p](N),a&&ft(t,p)),b}):[],u.update(),a=!0,D(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){const p=it(e.target);u.fragment&&u.fragment.l(p),p.forEach(C)}else u.fragment&&u.fragment.c();e.intro&&U(t.$$.fragment),re(t,e.target,e.anchor,e.customElement),ke()}Q(h)}class fe{$destroy(){se(this,1),this.$destroy=X}$on(e,l){if(!Qe(l))return X;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!xe(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function at(t,e,l){return window.runtime.EventsOnMultiple(t,e,l)}function ge(t,e){return at(t,e,-1)}function _t(t,e,l){return window.go.main.App.AggregateByColumn(t,e,l)}function ht(t,e,l,n,i){return window.go.main.App.GetEmployees(t,e,l,n,i)}function Ce(t,e,l){const n=t.slice();return n[13]=e[l],n}function Ee(t,e,l){const n=t.slice();return n[16]=e[l],n}function Ae(t,e,l){const n=t.slice();return n[19]=e[l],n}function Re(t,e,l){const n=t.slice();return n[19]=e[l],n}function dt(t){let e,l=t[24]+"",n;return{c(){e=v("p"),n=B(l)},m(i,o){E(i,e,o),f(e,n)},p(i,o){o&51&&l!==(l=i[24]+"")&&T(n,l)},d(i){i&&C(e)}}}function gt(t){let e,l,n,i,o,r,s,h,u,a,p,b,g,N,m=Object.keys(t[12][0]),k=[];for(let d=0;de,n.anchor=null},p(i,[o]){t=i,n.ctx=t,o&51&&l!==(l=t[6](t[1],qe,t[0],t[4],t[5]))&&oe(l,n)||We(n,t,o)},i:X,o:X,d(i){i&&C(e),n.block.d(),n.token=null,n=null}}}let qe=10;function bt(t,e,l){let{path:n}=e,{page:i}=e,{limitReached:o}=e,r=null,s=null,h=null,u=null;async function a(m,k,q,O,P){try{const A=await ht(m,k,q,O,P);return l(7,o=A.lengthl(2,r=m.value);function b(){s=this.value,l(3,s)}const g=()=>{l(0,i=0),l(4,h=r),l(5,u=s)},N=()=>{l(5,u=""),l(4,h=null),l(0,i=0)};return t.$$set=m=>{"path"in m&&l(1,n=m.path),"page"in m&&l(0,i=m.page),"limitReached"in m&&l(7,o=m.limitReached)},[i,n,r,s,h,u,a,o,p,b,g,N]}class vt extends fe{constructor(e){super(),ce(this,e,bt,pt,ue,{path:1,page:0,limitReached:7})}}var ve;(t=>{class e{constructor(n={}){j(this,"emp_id");j(this,"name_prefix");j(this,"first_name");j(this,"middle_initial");j(this,"last_name");j(this,"gender");j(this,"email");j(this,"fathers_name");j(this,"mothers_name");j(this,"mothers_maiden_name");j(this,"birthdate");j(this,"birth_time");j(this,"weight_kg");j(this,"joining_date");j(this,"joining_quarter");j(this,"joining_half");j(this,"joining_year");j(this,"joining_month");j(this,"joining_month_name");j(this,"joining_month_name_short");j(this,"joining_month_day");j(this,"joining_week_day");j(this,"joining_week_day_short");j(this,"years_of_service");j(this,"salary");j(this,"latest_hike_percentage");j(this,"ssn");j(this,"phone_number");j(this,"place_name");j(this,"county");j(this,"city");j(this,"state");j(this,"zip");j(this,"region");j(this,"username");j(this,"password");typeof n=="string"&&(n=JSON.parse(n)),this.emp_id=n.emp_id,this.name_prefix=n.name_prefix,this.first_name=n.first_name,this.middle_initial=n.middle_initial,this.last_name=n.last_name,this.gender=n.gender,this.email=n.email,this.fathers_name=n.fathers_name,this.mothers_name=n.mothers_name,this.mothers_maiden_name=n.mothers_maiden_name,this.birthdate=n.birthdate,this.birth_time=n.birth_time,this.weight_kg=n.weight_kg,this.joining_date=n.joining_date,this.joining_quarter=n.joining_quarter,this.joining_half=n.joining_half,this.joining_year=n.joining_year,this.joining_month=n.joining_month,this.joining_month_name=n.joining_month_name,this.joining_month_name_short=n.joining_month_name_short,this.joining_month_day=n.joining_month_day,this.joining_week_day=n.joining_week_day,this.joining_week_day_short=n.joining_week_day_short,this.years_of_service=n.years_of_service,this.salary=n.salary,this.latest_hike_percentage=n.latest_hike_percentage,this.ssn=n.ssn,this.phone_number=n.phone_number,this.place_name=n.place_name,this.county=n.county,this.city=n.city,this.state=n.state,this.zip=n.zip,this.region=n.region,this.username=n.username,this.password=n.password}static createFrom(n={}){return new e(n)}}t.Employee=e})(ve||(ve={}));function ze(t){let e,l,n,i,o,r,s;const h=t[3].default,u=et(h,t,t[2],null);return{c(){e=v("dialog"),l=v("div"),u&&u.c(),n=L(),i=v("button"),i.textContent="Close",R(l,"class","dialog svelte-rr3arx"),R(e,"class","backdrop svelte-rr3arx"),e.open=t[0]},m(a,p){E(a,e,p),f(e,l),u&&u.m(l,null),f(l,n),f(l,i),o=!0,r||(s=J(i,"click",t[4]),r=!0)},p(a,p){u&&u.p&&(!o||p&4)&&nt(u,h,a,a[2],o?tt(h,a[2],p,null):lt(a[2]),null),(!o||p&1)&&(e.open=a[0])},i(a){o||(U(u,a),o=!0)},o(a){V(u,a),o=!1},d(a){a&&C(e),u&&u.d(a),r=!1,s()}}}function kt(t){let e,l,n=t[0]&&ze(t);return{c(){n&&n.c(),e=De()},m(i,o){n&&n.m(i,o),E(i,e,o),l=!0},p(i,[o]){i[0]?n?(n.p(i,o),o&1&&U(n,1)):(n=ze(i),n.c(),U(n,1),n.m(e.parentNode,e)):n&&(ye(),V(n,1,1,()=>{n=null}),je())},i(i){l||(U(n),l=!0)},o(i){V(n),l=!1},d(i){n&&n.d(i),i&&C(e)}}}function yt(t,e,l){let{$$slots:n={},$$scope:i}=e,{isOpen:o}=e,{onClose:r}=e;const s=()=>r();return t.$$set=h=>{"isOpen"in h&&l(0,o=h.isOpen),"onClose"in h&&l(1,r=h.onClose),"$$scope"in h&&l(2,i=h.$$scope)},[o,r,i,n,s]}class jt extends fe{constructor(e){super(),ce(this,e,yt,kt,ue,{isOpen:0,onClose:1})}}function Be(t,e,l){const n=t.slice();return n[13]=e[l][0],n[14]=e[l][1],n}function Ge(t,e,l){const n=t.slice();return n[13]=e[l],n}function Pe(t,e,l){const n=t.slice();return n[13]=e[l],n}function Fe(t){let e,l=t[13]+"",n,i;return{c(){e=v("option"),n=B(l),e.__value=i=t[13],e.value=e.__value},m(o,r){E(o,e,r),f(e,n)},p(o,r){r&2&&l!==(l=o[13]+"")&&T(n,l),r&2&&i!==(i=o[13])&&(e.__value=i,e.value=e.__value)},d(o){o&&C(e)}}}function Ie(t){let e,l=t[13]+"",n,i;return{c(){e=v("option"),n=B(l),e.__value=i=t[13],e.value=e.__value},m(o,r){E(o,e,r),f(e,n)},p(o,r){r&2&&l!==(l=o[13]+"")&&T(n,l),r&2&&i!==(i=o[13])&&(e.__value=i,e.value=e.__value)},d(o){o&&C(e)}}}function Te(t){let e,l,n={ctx:t,current:null,token:null,hasCatch:!0,pending:Ct,then:Ot,catch:wt,value:12,error:17};return oe(l=t[5],n),{c(){e=v("section"),n.block.c()},m(i,o){E(i,e,o),n.block.m(e,n.anchor=null),n.mount=()=>e,n.anchor=null},p(i,o){t=i,n.ctx=t,o&32&&l!==(l=t[5])&&oe(l,n)||We(n,t,o)},d(i){i&&C(e),n.block.d(),n.token=null,n=null}}}function wt(t){let e,l=t[17]+"",n;return{c(){e=v("p"),n=B(l)},m(i,o){E(i,e,o),f(e,n)},p(i,o){o&32&&l!==(l=i[17]+"")&&T(n,l)},d(i){i&&C(e)}}}function Ot(t){let e,l,n,i,o,r,s,h,u,a,p=Object.entries(t[12]),b=[];for(let g=0;gt[7].call(s)),R(a,"for","on-column"),R(b,"name","on-column"),R(b,"id",""),t[3]===void 0&&ee(()=>t[8].call(b)),R(N,"for","function"),q.__value="AVG",q.value=q.__value,O.__value="SUM",O.value=O.__value,R(k,"name","function"),R(k,"id",""),t[4]===void 0&&ee(()=>t[9].call(k)),R(A,"type","button")},m(y,I){E(y,e,I),f(e,l),f(e,n),f(e,i),f(i,o),f(i,r),f(i,s);for(let w=0;w<_.length;w+=1)_[w]&&_[w].m(s,null);Y(s,t[2],!0),f(e,h),f(e,u),f(u,a),f(u,p),f(u,b);for(let w=0;wl(5,h=u()),N=()=>{l(0,n=!1)};return t.$$set=m=>{"isOpen"in m&&l(0,n=m.isOpen),"keys"in m&&l(1,i=m.keys)},[n,i,o,r,s,h,u,a,p,b,g,N]}class Nt extends fe{constructor(e){super(),ce(this,e,Rt,At,ue,{isOpen:0,keys:1})}}function Je(t){let e,l,n,i,o,r,s,h,u,a=t[2]+1+"",p,b,g,N,m,k,q,O,P,A;function d(_){t[5](_)}function z(_){t[6](_)}let c={path:t[1]};t[2]!==void 0&&(c.page=t[2]),t[0]!==void 0&&(c.limitReached=t[0]),e=new vt({props:c}),ne.push(()=>de(e,"page",d)),ne.push(()=>de(e,"limitReached",z));function F(_){t[9](_)}let K={keys:t[4]};return t[3]!==void 0&&(K.isOpen=t[3]),k=new Nt({props:K}),ne.push(()=>de(k,"isOpen",F)),{c(){be(e.$$.fragment),i=L(),o=v("button"),r=B("Prev"),h=L(),u=v("span"),p=B(a),b=L(),g=v("button"),N=B("Next"),m=L(),be(k.$$.fragment),o.disabled=s=t[2]<1,g.disabled=t[0]},m(_,M){re(e,_,M),E(_,i,M),E(_,o,M),f(o,r),E(_,h,M),E(_,u,M),f(u,p),E(_,b,M),E(_,g,M),f(g,N),E(_,m,M),re(k,_,M),O=!0,P||(A=[J(o,"click",t[7]),J(g,"click",t[8])],P=!0)},p(_,M){const S={};M&2&&(S.path=_[1]),!l&&M&4&&(l=!0,S.page=_[2],_e(()=>l=!1)),!n&&M&1&&(n=!0,S.limitReached=_[0],_e(()=>n=!1)),e.$set(S),(!O||M&4&&s!==(s=_[2]<1))&&(o.disabled=s),(!O||M&4)&&a!==(a=_[2]+1+"")&&T(p,a),(!O||M&1)&&(g.disabled=_[0]);const G={};!q&&M&8&&(q=!0,G.isOpen=_[3],_e(()=>q=!1)),k.$set(G)},i(_){O||(U(e.$$.fragment,_),U(k.$$.fragment,_),O=!0)},o(_){V(e.$$.fragment,_),V(k.$$.fragment,_),O=!1},d(_){se(e,_),_&&C(i),_&&C(o),_&&C(h),_&&C(u),_&&C(b),_&&C(g),_&&C(m),se(k,_),P=!1,D(A)}}}function Mt(t){let e,l,n=t[1]&&Je(t);return{c(){e=v("main"),n&&n.c()},m(i,o){E(i,e,o),n&&n.m(e,null),l=!0},p(i,[o]){i[1]?n?(n.p(i,o),o&2&&U(n,1)):(n=Je(i),n.c(),U(n,1),n.m(e,null)):n&&(ye(),V(n,1,1,()=>{n=null}),je())},i(i){l||(U(n),l=!0)},o(i){V(n),l=!1},d(i){i&&C(e),n&&n.d()}}}function Lt(t,e,l){let n,i=0,o=!1,r;const s=Object.keys(new ve.Employee);ot(async()=>{ge("proto-opened",g=>{l(1,n=g)}),ge("csv-converted",g=>{console.log(g)}),ge("aggregation",()=>{l(3,o=!0)})});function h(g){i=g,l(2,i)}function u(g){r=g,l(0,r)}const a=()=>l(2,i--,i),p=()=>l(2,i++,i);function b(g){o=g,l(3,o)}return t.$$.update=()=>{t.$$.dirty&1&&console.log(r)},[r,n,i,o,s,h,u,a,p,b]}class St extends fe{constructor(e){super(),ce(this,e,Lt,Mt,ue,{})}}new St({target:document.getElementById("app")}); diff --git a/ex1/frontend/dist/assets/index.b19f2494.js b/ex1/frontend/dist/assets/index.b19f2494.js deleted file mode 100644 index c6eb498..0000000 --- a/ex1/frontend/dist/assets/index.b19f2494.js +++ /dev/null @@ -1 +0,0 @@ -var We=Object.defineProperty;var Xe=(t,e,l)=>e in t?We(t,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):t[e]=l;var y=(t,e,l)=>(Xe(t,typeof e!="symbol"?e+"":e,l),l);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function l(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=l(i);fetch(i.href,o)}})();function V(){}function Ye(t,e){for(const l in e)t[l]=e[l];return t}function Ze(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function Je(t){return t()}function we(){return Object.create(null)}function J(t){t.forEach(Je)}function Ke(t){return typeof t=="function"}function oe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function xe(t){return Object.keys(t).length===0}function et(t,e,l,n){if(t){const i=Qe(t,e,l,n);return t[0](i)}}function Qe(t,e,l,n){return t[1]&&n?Ye(l.ctx.slice(),t[1](n(e))):l.ctx}function tt(t,e,l,n){if(t[2]&&n){const i=t[2](n(l));if(e.dirty===void 0)return i;if(typeof i=="object"){const o=[],r=Math.max(e.dirty.length,i.length);for(let c=0;c32){const e=[],l=t.ctx.length/32;for(let n=0;nt.removeEventListener(e,l,n)}function A(t,e,l){l==null?t.removeAttribute(e):t.getAttribute(e)!==l&&t.setAttribute(e,l)}function it(t){return Array.from(t.childNodes)}function P(t,e){e=""+e,t.data!==e&&(t.data=e)}function Oe(t,e){t.value=e==null?"":e}function W(t,e,l){for(let n=0;nt.indexOf(n)===-1?e.push(n):l.push(n)),l.forEach(n=>n()),Z=e}const le=new Set;let K;function ve(){K={r:0,c:[],p:K}}function ke(){K.r||J(K.c),K=K.p}function $(t,e){t&&t.i&&(le.delete(t),t.i(e))}function T(t,e,l,n){if(t&&t.o){if(le.has(t))return;le.add(t),K.c.push(()=>{le.delete(t),n&&(l&&t.d(1),n())}),t.o(e)}else n&&n()}function ie(t,e){const l=e.token={};function n(i,o,r,c){if(e.token!==l)return;e.resolved=c;let a=e.ctx;r!==void 0&&(a=a.slice(),a[r]=c);const u=i&&(e.current=i)(a);let h=!1;e.block&&(e.blocks?e.blocks.forEach((g,p)=>{p!==o&&g&&(ve(),T(g,1,1,()=>{e.blocks[p]===g&&(e.blocks[p]=null)}),ke())}):e.block.d(1),u.c(),$(u,1),u.m(e.mount(),e.anchor),h=!0),e.block=u,e.blocks&&(e.blocks[o]=u),h&&be()}if(Ze(t)){const i=De();if(t.then(o=>{I(i),n(e.then,1,e.value,o),I(null)},o=>{if(I(i),n(e.catch,2,e.error,o),I(null),!e.hasCatch)throw o}),e.current!==e.pending)return n(e.pending,0),!0}else{if(e.current!==e.then)return n(e.then,1,e.value,t),!0;e.resolved=t}}function He(t,e,l){const n=e.slice(),{resolved:i}=t;t.current===t.then&&(n[t.value]=i),t.current===t.catch&&(n[t.error]=i),t.block.p(n,l)}function me(t,e,l){const n=t.$$.props[e];n!==void 0&&(t.$$.bound[n]=l,l(t.$$.ctx[n]))}function ye(t){t&&t.c()}function re(t,e,l,n){const{fragment:i,after_update:o}=t.$$;i&&i.m(e,l),n||x(()=>{const r=t.$$.on_mount.map(Je).filter(Ke);t.$$.on_destroy?t.$$.on_destroy.push(...r):J(r),t.$$.on_mount=[]}),o.forEach(x)}function se(t,e){const l=t.$$;l.fragment!==null&&(ct(l.after_update),J(l.on_destroy),l.fragment&&l.fragment.d(e),l.on_destroy=l.fragment=null,l.ctx=[])}function at(t,e){t.$$.dirty[0]===-1&&(Y.push(t),st(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const m=d.length?d[0]:p;return u.ctx&&i(u.ctx[g],u.ctx[g]=m)&&(!u.skip_bound&&u.bound[g]&&u.bound[g](m),h&&at(t,g)),p}):[],u.update(),h=!0,J(u.before_update),u.fragment=n?n(u.ctx):!1,e.target){if(e.hydrate){const g=it(e.target);u.fragment&&u.fragment.l(g),g.forEach(O)}else u.fragment&&u.fragment.c();e.intro&&$(t.$$.fragment),re(t,e.target,e.anchor,e.customElement),be()}I(a)}class ce{$destroy(){se(this,1),this.$destroy=V}$on(e,l){if(!Ke(l))return V;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(l),()=>{const i=n.indexOf(l);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!xe(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function ft(t,e,l){return window.runtime.EventsOnMultiple(t,e,l)}function _e(t,e){return ft(t,e,-1)}function _t(t,e,l){return window.go.main.App.AggregateByColumn(t,e,l)}function ht(t,e,l,n,i){return window.go.main.App.GetEmployees(t,e,l,n,i)}function Ce(t,e,l){const n=t.slice();return n[12]=e[l],n}function Ee(t,e,l){const n=t.slice();return n[15]=e[l],n}function Ae(t,e,l){const n=t.slice();return n[18]=e[l],n}function Ne(t,e,l){const n=t.slice();return n[18]=e[l],n}function dt(t){let e,l=t[23]+"",n;return{c(){e=v("p"),n=S(l)},m(i,o){E(i,e,o),_(e,n)},p(i,o){o&51&&l!==(l=i[23]+"")&&P(n,l)},d(i){i&&O(e)}}}function gt(t){let e,l,n,i,o,r,c,a,u,h,g,p,d=Object.keys(t[11][0]),m=[];for(let f=0;fe,n.anchor=null},p(i,[o]){t=i,n.ctx=t,o&51&&l!==(l=t[6](t[1],qe,t[0],t[4],t[5]))&&ie(l,n)||He(n,t,o)},i:V,o:V,d(i){i&&O(e),n.block.d(),n.token=null,n=null}}}let qe=10;function bt(t,e,l){let{path:n}=e,{page:i}=e,{limitReached:o}=e,r=null,c=null,a=null,u=null;async function h(m,b,j,L,N){try{const f=await ht(m,b,j,L,N);return l(7,o=f.lengthl(2,r=m.value);function p(){c=this.value,l(3,c)}const d=()=>{l(0,i=0),l(4,a=r),l(5,u=c)};return t.$$set=m=>{"path"in m&&l(1,n=m.path),"page"in m&&l(0,i=m.page),"limitReached"in m&&l(7,o=m.limitReached)},[i,n,r,c,a,u,h,o,g,p,d]}class vt extends ce{constructor(e){super(),ue(this,e,bt,pt,oe,{path:1,page:0,limitReached:7})}}function ze(t){let e,l,n,i,o,r,c;const a=t[3].default,u=et(a,t,t[2],null);return{c(){e=v("dialog"),l=v("div"),u&&u.c(),n=R(),i=v("button"),i.textContent="Close",A(l,"class","dialog svelte-rr3arx"),A(e,"class","backdrop svelte-rr3arx"),e.open=t[0]},m(h,g){E(h,e,g),_(e,l),u&&u.m(l,null),_(l,n),_(l,i),o=!0,r||(c=F(i,"click",t[4]),r=!0)},p(h,g){u&&u.p&&(!o||g&4)&&nt(u,a,h,h[2],o?tt(a,h[2],g,null):lt(h[2]),null),(!o||g&1)&&(e.open=h[0])},i(h){o||($(u,h),o=!0)},o(h){T(u,h),o=!1},d(h){h&&O(e),u&&u.d(h),r=!1,c()}}}function kt(t){let e,l,n=t[0]&&ze(t);return{c(){n&&n.c(),e=Ve()},m(i,o){n&&n.m(i,o),E(i,e,o),l=!0},p(i,[o]){i[0]?n?(n.p(i,o),o&1&&$(n,1)):(n=ze(i),n.c(),$(n,1),n.m(e.parentNode,e)):n&&(ve(),T(n,1,1,()=>{n=null}),ke())},i(i){l||($(n),l=!0)},o(i){T(n),l=!1},d(i){n&&n.d(i),i&&O(e)}}}function yt(t,e,l){let{$$slots:n={},$$scope:i}=e,{isOpen:o}=e,{onClose:r}=e;const c=()=>r();return t.$$set=a=>{"isOpen"in a&&l(0,o=a.isOpen),"onClose"in a&&l(1,r=a.onClose),"$$scope"in a&&l(2,i=a.$$scope)},[o,r,i,n,c]}class jt extends ce{constructor(e){super(),ue(this,e,yt,kt,oe,{isOpen:0,onClose:1})}}var pe;(t=>{class e{constructor(n={}){y(this,"emp_id");y(this,"name_prefix");y(this,"first_name");y(this,"middle_initial");y(this,"last_name");y(this,"gender");y(this,"email");y(this,"fathers_name");y(this,"mothers_name");y(this,"mothers_maiden_name");y(this,"birthdate");y(this,"birth_time");y(this,"weight_kg");y(this,"joining_date");y(this,"joining_quarter");y(this,"joining_half");y(this,"joining_year");y(this,"joining_month");y(this,"joining_month_name");y(this,"joining_month_name_short");y(this,"joining_month_day");y(this,"joining_week_day");y(this,"joining_week_day_short");y(this,"years_of_service");y(this,"salary");y(this,"latest_hike_percentage");y(this,"ssn");y(this,"phone_number");y(this,"place_name");y(this,"county");y(this,"city");y(this,"state");y(this,"zip");y(this,"region");y(this,"username");y(this,"password");typeof n=="string"&&(n=JSON.parse(n)),this.emp_id=n.emp_id,this.name_prefix=n.name_prefix,this.first_name=n.first_name,this.middle_initial=n.middle_initial,this.last_name=n.last_name,this.gender=n.gender,this.email=n.email,this.fathers_name=n.fathers_name,this.mothers_name=n.mothers_name,this.mothers_maiden_name=n.mothers_maiden_name,this.birthdate=n.birthdate,this.birth_time=n.birth_time,this.weight_kg=n.weight_kg,this.joining_date=n.joining_date,this.joining_quarter=n.joining_quarter,this.joining_half=n.joining_half,this.joining_year=n.joining_year,this.joining_month=n.joining_month,this.joining_month_name=n.joining_month_name,this.joining_month_name_short=n.joining_month_name_short,this.joining_month_day=n.joining_month_day,this.joining_week_day=n.joining_week_day,this.joining_week_day_short=n.joining_week_day_short,this.years_of_service=n.years_of_service,this.salary=n.salary,this.latest_hike_percentage=n.latest_hike_percentage,this.ssn=n.ssn,this.phone_number=n.phone_number,this.place_name=n.place_name,this.county=n.county,this.city=n.city,this.state=n.state,this.zip=n.zip,this.region=n.region,this.username=n.username,this.password=n.password}static createFrom(n={}){return new e(n)}}t.Employee=e})(pe||(pe={}));function Be(t,e,l){const n=t.slice();return n[13]=e[l][0],n[14]=e[l][1],n}function Ge(t,e,l){const n=t.slice();return n[13]=e[l],n}function Pe(t,e,l){const n=t.slice();return n[13]=e[l],n}function $e(t){let e,l=t[13]+"",n,i;return{c(){e=v("option"),n=S(l),e.__value=i=t[13],e.value=e.__value},m(o,r){E(o,e,r),_(e,n)},p(o,r){r&2&&l!==(l=o[13]+"")&&P(n,l),r&2&&i!==(i=o[13])&&(e.__value=i,e.value=e.__value)},d(o){o&&O(e)}}}function Fe(t){let e,l=t[13]+"",n,i;return{c(){e=v("option"),n=S(l),e.__value=i=t[13],e.value=e.__value},m(o,r){E(o,e,r),_(e,n)},p(o,r){r&2&&l!==(l=o[13]+"")&&P(n,l),r&2&&i!==(i=o[13])&&(e.__value=i,e.value=e.__value)},d(o){o&&O(e)}}}function Ie(t){let e,l,n={ctx:t,current:null,token:null,hasCatch:!0,pending:Ct,then:Ot,catch:wt,value:12,error:17};return ie(l=t[5],n),{c(){e=v("section"),n.block.c()},m(i,o){E(i,e,o),n.block.m(e,n.anchor=null),n.mount=()=>e,n.anchor=null},p(i,o){t=i,n.ctx=t,o&32&&l!==(l=t[5])&&ie(l,n)||He(n,t,o)},d(i){i&&O(e),n.block.d(),n.token=null,n=null}}}function wt(t){let e,l=t[17]+"",n;return{c(){e=v("p"),n=S(l)},m(i,o){E(i,e,o),_(e,n)},p(i,o){o&32&&l!==(l=i[17]+"")&&P(n,l)},d(i){i&&O(e)}}}function Ot(t){let e,l,n,i,o,r,c,a,u,h,g=Object.entries(t[12]),p=[];for(let d=0;dt[7].call(c)),A(h,"for","on-column"),A(p,"name","on-column"),A(p,"id",""),t[3]===void 0&&x(()=>t[8].call(p)),A(m,"for","function"),L.__value="AVG",L.value=L.__value,N.__value="SUM",N.value=N.__value,A(j,"name","function"),A(j,"id",""),t[4]===void 0&&x(()=>t[9].call(j)),A(M,"type","button")},m(k,G){E(k,e,G),_(e,l),_(e,n),_(e,i),_(i,o),_(i,r),_(i,c);for(let w=0;wl(5,a=u()),m=()=>{l(0,n=!1)};return t.$$set=b=>{"isOpen"in b&&l(0,n=b.isOpen),"keys"in b&&l(1,i=b.keys)},[n,i,o,r,c,a,u,h,g,p,d,m]}class Rt extends ce{constructor(e){super(),ue(this,e,Nt,At,oe,{isOpen:0,keys:1})}}function Ue(t){let e,l,n,i,o,r,c,a,u,h=t[2]+1+"",g,p,d,m,b,j,L;function N(s){t[5](s)}function f(s){t[6](s)}let M={path:t[1]};return t[2]!==void 0&&(M.page=t[2]),t[0]!==void 0&&(M.limitReached=t[0]),e=new vt({props:M}),ne.push(()=>me(e,"page",N)),ne.push(()=>me(e,"limitReached",f)),{c(){ye(e.$$.fragment),i=R(),o=v("button"),r=S("Prev"),a=R(),u=v("span"),g=S(h),p=R(),d=v("button"),m=S("Next"),o.disabled=c=t[2]<1,d.disabled=t[0]},m(s,C){re(e,s,C),E(s,i,C),E(s,o,C),_(o,r),E(s,a,C),E(s,u,C),_(u,g),E(s,p,C),E(s,d,C),_(d,m),b=!0,j||(L=[F(o,"click",t[7]),F(d,"click",t[8])],j=!0)},p(s,C){const U={};C&2&&(U.path=s[1]),!l&&C&4&&(l=!0,U.page=s[2],ge(()=>l=!1)),!n&&C&1&&(n=!0,U.limitReached=s[0],ge(()=>n=!1)),e.$set(U),(!b||C&4&&c!==(c=s[2]<1))&&(o.disabled=c),(!b||C&4)&&h!==(h=s[2]+1+"")&&P(g,h),(!b||C&1)&&(d.disabled=s[0])},i(s){b||($(e.$$.fragment,s),b=!0)},o(s){T(e.$$.fragment,s),b=!1},d(s){se(e,s),s&&O(i),s&&O(o),s&&O(a),s&&O(u),s&&O(p),s&&O(d),j=!1,J(L)}}}function Mt(t){let e,l,n,i,o,r=t[1]&&Ue(t);function c(u){t[9](u)}let a={keys:t[4]};return t[3]!==void 0&&(a.isOpen=t[3]),n=new Rt({props:a}),ne.push(()=>me(n,"isOpen",c)),{c(){e=v("main"),r&&r.c(),l=R(),ye(n.$$.fragment)},m(u,h){E(u,e,h),r&&r.m(e,null),_(e,l),re(n,e,null),o=!0},p(u,[h]){u[1]?r?(r.p(u,h),h&2&&$(r,1)):(r=Ue(u),r.c(),$(r,1),r.m(e,l)):r&&(ve(),T(r,1,1,()=>{r=null}),ke());const g={};!i&&h&8&&(i=!0,g.isOpen=u[3],ge(()=>i=!1)),n.$set(g)},i(u){o||($(r),$(n.$$.fragment,u),o=!0)},o(u){T(r),T(n.$$.fragment,u),o=!1},d(u){u&&O(e),r&&r.d(),se(n)}}}function Lt(t,e,l){let n,i=0,o=!1,r;const c=Object.keys(new pe.Employee);ot(async()=>{_e("proto-opened",d=>{l(1,n=d)}),_e("csv-converted",d=>{console.log(d)}),_e("aggregation",()=>{l(3,o=!0)})});function a(d){i=d,l(2,i)}function u(d){r=d,l(0,r)}const h=()=>l(2,i--,i),g=()=>l(2,i++,i);function p(d){o=d,l(3,o)}return t.$$.update=()=>{t.$$.dirty&1&&console.log(r)},[r,n,i,o,c,a,u,h,g,p]}class St extends ce{constructor(e){super(),ue(this,e,Lt,Mt,oe,{})}}new St({target:document.getElementById("app")}); diff --git a/ex1/frontend/dist/index.html b/ex1/frontend/dist/index.html index ab7edf2..3ad089b 100644 --- a/ex1/frontend/dist/index.html +++ b/ex1/frontend/dist/index.html @@ -4,7 +4,7 @@ bdooc - + diff --git a/ex1/go.mod b/ex1/go.mod index 4f9a1c4..c3c7cc7 100644 --- a/ex1/go.mod +++ b/ex1/go.mod @@ -1,4 +1,4 @@ -module git.cems.dev/cdricms/bdooc +module git.cems.dev/cdricms/bdooc/ex1 go 1.22.2 diff --git a/ex1/main.go b/ex1/main.go index 4bef19a..ade839a 100644 --- a/ex1/main.go +++ b/ex1/main.go @@ -5,8 +5,8 @@ import ( "encoding/csv" "os" - "git.cems.dev/cdricms/bdooc/parsing" - p "git.cems.dev/cdricms/bdooc/proto" + "git.cems.dev/cdricms/bdooc/ex1/parsing" + p "git.cems.dev/cdricms/bdooc/ex1/proto" "github.com/wailsapp/wails/v2" "github.com/wailsapp/wails/v2/pkg/menu" "github.com/wailsapp/wails/v2/pkg/menu/keys" diff --git a/ex1/parsing/parsing.go b/ex1/parsing/parsing.go index 6987d76..ce95508 100644 --- a/ex1/parsing/parsing.go +++ b/ex1/parsing/parsing.go @@ -5,7 +5,7 @@ import ( "errors" "reflect" "strconv" - "git.cems.dev/cdricms/bdooc/proto" + "git.cems.dev/cdricms/bdooc/ex1/proto" ) func UnmarshalEmployees(reader *csv.Reader) ([]Employee, error) {