This commit is contained in:
2022-07-21 03:28:35 +00:00
parent d7c883d6df
commit 51b34b0e1d
30103 changed files with 4152204 additions and 23 deletions
+43
View File
@@ -0,0 +1,43 @@
// Extensions
import { Service } from '../service';
export class Application extends Service {
constructor() {
super(...arguments);
this.bar = 0;
this.top = 0;
this.left = 0;
this.insetFooter = 0;
this.right = 0;
this.bottom = 0;
this.footer = 0;
this.application = {
bar: {},
top: {},
left: {},
insetFooter: {},
right: {},
bottom: {},
footer: {}
};
}
register(uid, location, size) {
this.application[location] = {
[uid]: size
};
this.update(location);
}
unregister(uid, location) {
if (this.application[location][uid] == null) return;
delete this.application[location][uid];
this.update(location);
}
update(location) {
this[location] = Object.values(this.application[location]).reduce((acc, cur) => acc + cur, 0);
}
}
Application.property = 'application';
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/services/application/index.ts"],"names":[],"mappings":"AAAA;AACA,SAAS,OAAT,QAAwB,YAAxB;AAKA,OAAM,MAAO,WAAP,SAA2B,OAA3B,CAAkC;AAAxC,EAAA,WAAA,GAAA;;AAGE,SAAA,GAAA,GAAM,CAAN;AAEA,SAAA,GAAA,GAAM,CAAN;AAEA,SAAA,IAAA,GAAO,CAAP;AAEA,SAAA,WAAA,GAAc,CAAd;AAEA,SAAA,KAAA,GAAQ,CAAR;AAEA,SAAA,MAAA,GAAS,CAAT;AAEA,SAAA,MAAA,GAAS,CAAT;AAEA,SAAA,WAAA,GAA4C;AAC1C,MAAA,GAAG,EAAE,EADqC;AAE1C,MAAA,GAAG,EAAE,EAFqC;AAG1C,MAAA,IAAI,EAAE,EAHoC;AAI1C,MAAA,WAAW,EAAE,EAJ6B;AAK1C,MAAA,KAAK,EAAE,EALmC;AAM1C,MAAA,MAAM,EAAE,EANkC;AAO1C,MAAA,MAAM,EAAE;AAPkC,KAA5C;AA+BD;;AArBC,EAAA,QAAQ,CACN,GADM,EAEN,QAFM,EAGN,IAHM,EAGM;AAEZ,SAAK,WAAL,CAAiB,QAAjB,IAA6B;AAAE,OAAC,GAAD,GAAO;AAAT,KAA7B;AAEA,SAAK,MAAL,CAAY,QAAZ;AACD;;AAED,EAAA,UAAU,CAAE,GAAF,EAAe,QAAf,EAAmC;AAC3C,QAAI,KAAK,WAAL,CAAiB,QAAjB,EAA2B,GAA3B,KAAmC,IAAvC,EAA6C;AAE7C,WAAO,KAAK,WAAL,CAAiB,QAAjB,EAA2B,GAA3B,CAAP;AACA,SAAK,MAAL,CAAY,QAAZ;AACD;;AAED,EAAA,MAAM,CAAE,QAAF,EAAsB;AAC1B,SAAK,QAAL,IAAiB,MAAM,CAAC,MAAP,CAAc,KAAK,WAAL,CAAiB,QAAjB,CAAd,EACd,MADc,CACP,CAAC,GAAD,EAAc,GAAd,KAAuC,GAAG,GAAG,GADtC,EAC4C,CAD5C,CAAjB;AAED;;AA/CqC;AAC/B,WAAA,CAAA,QAAA,GAA0B,aAA1B","sourcesContent":["// Extensions\nimport { Service } from '../service'\n\n// Types\nimport { TargetPropValues, TargetProp, Application as IApplication } from 'vuetify/types/services/application'\n\nexport class Application extends Service implements IApplication {\n static property: 'application' = 'application'\n\n bar = 0\n\n top = 0\n\n left = 0\n\n insetFooter = 0\n\n right = 0\n\n bottom = 0\n\n footer = 0\n\n application: Dictionary<TargetPropValues> = {\n bar: {},\n top: {},\n left: {},\n insetFooter: {},\n right: {},\n bottom: {},\n footer: {},\n }\n\n register (\n uid: number,\n location: TargetProp,\n size: number\n ) {\n this.application[location] = { [uid]: size }\n\n this.update(location)\n }\n\n unregister (uid: number, location: TargetProp) {\n if (this.application[location][uid] == null) return\n\n delete this.application[location][uid]\n this.update(location)\n }\n\n update (location: TargetProp) {\n this[location] = Object.values(this.application[location])\n .reduce((acc: number, cur: number): number => (acc + cur), 0)\n }\n}\n"],"sourceRoot":"","file":"index.js"}