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Ad,CAA0B,IAA1B,CACE,KAAK,IADP,EAEE,KAAK,mBAFP,EAGE,KAAK,iBAAL,EAHF;AAKD,aATM;AAUP,6BAVO,+BAUyB;AAAA,oBAAb,KAAa,uEAAL,KAAK;;AAC9B,oBAAI,CAAC,KAAD,IAAU,CAAC,KAAK,GAApB,EAAyB;AAEzB,qBAAK,QAAL,CAAc,WAAd,CAA0B,MAA1B,CACE,KAAK,IADP,EAEE,KAAK,mBAFP;AAID,aAjBM;;AAkBP,+BAAmB;AAAA,uBAAM,CAAN;AAAA;AAlBZ;AAjDsD,KAA1D,CAAP;AAsED;AA3ED","sourcesContent":["import { factory as PositionableFactory } from './positionable'\nimport { TargetProp } from '../components/Vuetify/mixins/application'\n\n// Util\nimport mixins from '../util/mixins'\n\nexport default function applicationable (value: TargetProp, events: string[] = []) {\n /* @vue/component */\n return mixins(PositionableFactory(['absolute', 'fixed'])).extend({\n name: 'applicationable',\n\n props: {\n app: Boolean\n },\n\n computed: {\n applicationProperty (): TargetProp {\n return value\n }\n },\n\n watch: {\n // If previous value was app\n // reset the provided prop\n app (x: boolean, prev: boolean) {\n prev\n ? this.removeApplication(true)\n : this.callUpdate()\n },\n applicationProperty (newVal, oldVal) {\n this.$vuetify.application.unbind(this._uid, oldVal)\n }\n },\n\n activated () {\n this.callUpdate()\n },\n\n created () {\n for (let i = 0, length = events.length; i < length; i++) {\n this.$watch(events[i], this.callUpdate)\n }\n this.callUpdate()\n },\n\n mounted () {\n this.callUpdate()\n },\n\n deactivated () {\n this.removeApplication()\n },\n\n destroyed () {\n this.removeApplication()\n },\n\n methods: {\n callUpdate () {\n if (!this.app) return\n\n this.$vuetify.application.bind(\n this._uid,\n this.applicationProperty,\n this.updateApplication()\n )\n },\n removeApplication (force = false) {\n if (!force && !this.app) return\n\n this.$vuetify.application.unbind(\n this._uid,\n this.applicationProperty\n )\n },\n updateApplication: () => 0\n }\n })\n}\n"],"sourceRoot":""}
|