Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

times.js.map 3.3KB

1
  1. {"version":3,"sources":["../../../../src/components/VCalendar/mixins/times.ts"],"names":[],"mappings":";;;;;;;;;;AAEA;;;;kBAOe,cAAI,MAAJ,CAAW;AACxB,UAAM,OADkB;AAGxB,WAAO;AACL,aAAK;AACH,kBAAM,MADH;AAEH,uBAAW;AAFR;AADA,KAHiB;AAUxB,UAAM;AAAA,eAAO;AACX,mBAAO;AACL,qBAAK,+BAAe,kBAAf,CADA;AAEL,uBAAO,+BAAe,YAAf;AAFF;AADI,SAAP;AAAA,KAVkB;AAiBxB,cAAU;AACR,iBADQ,uBACC;AACP,mBAAO,KAAK,GAAL,GAAW,+BAAe,KAAK,GAApB,CAAX,GAAsC,IAA7C;AACD;AAHO,KAjBc;AAuBxB,WAAO;AACL,mBAAW;AADN,KAvBiB;AA2BxB,WA3BwB,qBA2BjB;AACL,aAAK,WAAL;AACA,aAAK,UAAL;AACD,KA9BuB;;AAgCxB,aAAS;AACP,kBADO,wBACG;AACR,iBAAK,KAAL,CAAW,GAAX,CAAe,OAAf,GAAyB,KAAK,KAAL,CAAW,KAAX,CAAiB,OAAjB,GAA2B,IAApD;AACA,iBAAK,KAAL,CAAW,GAAX,CAAe,IAAf,GAAsB,KAAK,KAAL,CAAW,KAAX,CAAiB,IAAjB,GAAwB,KAA9C;AACA,iBAAK,KAAL,CAAW,GAAX,CAAe,MAAf,GAAwB,KAAK,KAAL,CAAW,KAAX,CAAiB,MAAjB,GAA0B,KAAlD;AACD,SALM;AAMP,mBANO,yBAMI;AACT,gBAAM,MAAkB,KAAK,SAAL,IAAkB,KAAK,MAAL,EAA1C;AACA,iBAAK,SAAL,CAAe,GAAf,EAAoB,KAAK,KAAL,CAAW,GAA/B;AACA,iBAAK,UAAL,CAAgB,GAAhB,EAAqB,KAAK,KAAL,CAAW,GAAhC;AACA,iBAAK,SAAL,CAAe,GAAf,EAAoB,KAAK,KAAL,CAAW,KAA/B;AACD,SAXM;AAYP,cAZO,oBAYD;AACJ,mBAAO,0BAAU,IAAI,IAAJ,EAAV,CAAP;AACD,SAdM;AAeP,iBAfO,qBAeI,GAfJ,EAeqB,MAfrB,EAeuC;AAC5C,gBAAI,IAAI,IAAJ,KAAa,OAAO,IAAxB,EAA8B;AAC5B,uBAAO,IAAP,GAAc,IAAI,IAAlB;AACA,uBAAO,KAAP,GAAe,IAAI,KAAnB;AACA,uBAAO,GAAP,GAAa,IAAI,GAAjB;AACA,uBAAO,OAAP,GAAiB,IAAI,OAArB;AACA,uBAAO,IAAP,GAAc,IAAI,IAAlB;AACD;AACF,SAvBM;AAwBP,kBAxBO,sBAwBK,GAxBL,EAwBsB,MAxBtB,EAwBwC;AAC7C,gBAAI,IAAI,IAAJ,KAAa,OAAO,IAAxB,EAA8B;AAC5B,uBAAO,IAAP,GAAc,IAAI,IAAlB;AACA,uBAAO,MAAP,GAAgB,IAAI,MAApB;AACA,uBAAO,IAAP,GAAc,IAAI,IAAlB;AACD;AACF;AA9BM;AAhCe,CAAX,C","sourcesContent":["import Vue from 'vue'\n\nimport {\n VTimestamp,\n validateTimestamp,\n parseTimestamp,\n parseDate\n} from '../util/timestamp'\n\nexport default Vue.extend({\n name: 'times',\n\n props: {\n now: {\n type: String,\n validator: validateTimestamp\n }\n },\n\n data: () => ({\n times: {\n now: parseTimestamp('0000-00-00 00:00') as VTimestamp,\n today: parseTimestamp('0000-00-00') as VTimestamp\n }\n }),\n\n computed: {\n parsedNow (): VTimestamp | null {\n return this.now ? parseTimestamp(this.now) : null\n }\n },\n\n watch: {\n parsedNow: 'updateTimes'\n },\n\n created () {\n this.updateTimes()\n this.setPresent()\n },\n\n methods: {\n setPresent (): void {\n this.times.now.present = this.times.today.present = true\n this.times.now.past = this.times.today.past = false\n this.times.now.future = this.times.today.future = false\n },\n updateTimes (): void {\n const now: VTimestamp = this.parsedNow || this.getNow()\n this.updateDay(now, this.times.now)\n this.updateTime(now, this.times.now)\n this.updateDay(now, this.times.today)\n },\n getNow (): VTimestamp {\n return parseDate(new Date())\n },\n updateDay (now: VTimestamp, target: VTimestamp): void {\n if (now.date !== target.date) {\n target.year = now.year\n target.month = now.month\n target.day = now.day\n target.weekday = now.weekday\n target.date = now.date\n }\n },\n updateTime (now: VTimestamp, target: VTimestamp): void {\n if (now.time !== target.time) {\n target.hour = now.hour\n target.minute = now.minute\n target.time = now.time\n }\n }\n }\n})\n"],"sourceRoot":""}