primevue
Version:
PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc
1 lines • 6.94 kB
Source Map (JSON)
{"version":3,"file":"index.mjs","sources":["../../src/inplace/BaseInplace.vue","../../src/inplace/Inplace.vue","../../src/inplace/Inplace.vue?vue&type=template&id=6e283a4b&lang.js"],"sourcesContent":["<script>\nimport BaseComponent from '@primevue/core/basecomponent';\nimport InplaceStyle from 'primevue/inplace/style';\n\nexport default {\n name: 'BaseInplace',\n extends: BaseComponent,\n props: {\n active: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n displayProps: {\n type: null,\n default: null\n }\n },\n style: InplaceStyle,\n provide() {\n return {\n $pcInplace: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" aria-live=\"polite\" v-bind=\"ptmi('root')\">\n <div v-if=\"!d_active\" ref=\"display\" :class=\"cx('display')\" :tabindex=\"$attrs.tabindex || '0'\" role=\"button\" @click=\"open\" @keydown.enter=\"open\" :data-p-disabled=\"disabled\" v-bind=\"{ ...displayProps, ...ptm('display') }\">\n <slot name=\"display\"></slot>\n </div>\n <div v-else :class=\"cx('content')\" v-bind=\"ptm('content')\">\n <slot name=\"content\" :closeCallback=\"close\" />\n </div>\n </div>\n</template>\n\n<script>\nimport BaseInplace from './BaseInplace.vue';\n\nexport default {\n name: 'Inplace',\n extends: BaseInplace,\n inheritAttrs: false,\n emits: ['open', 'close', 'update:active'],\n data() {\n return {\n d_active: this.active\n };\n },\n watch: {\n active(newValue) {\n this.d_active = newValue;\n }\n },\n methods: {\n open(event) {\n if (this.disabled) {\n return;\n }\n\n this.d_active = true;\n\n this.$emit('open', event);\n this.$emit('update:active', true);\n },\n close(event) {\n this.d_active = false;\n\n this.$emit('close', event);\n this.$emit('update:active', false);\n\n setTimeout(() => {\n this.$refs.display.focus();\n }, 0);\n }\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" aria-live=\"polite\" v-bind=\"ptmi('root')\">\n <div v-if=\"!d_active\" ref=\"display\" :class=\"cx('display')\" :tabindex=\"$attrs.tabindex || '0'\" role=\"button\" @click=\"open\" @keydown.enter=\"open\" :data-p-disabled=\"disabled\" v-bind=\"{ ...displayProps, ...ptm('display') }\">\n <slot name=\"display\"></slot>\n </div>\n <div v-else :class=\"cx('content')\" v-bind=\"ptm('content')\">\n <slot name=\"content\" :closeCallback=\"close\" />\n </div>\n </div>\n</template>\n\n<script>\nimport BaseInplace from './BaseInplace.vue';\n\nexport default {\n name: 'Inplace',\n extends: BaseInplace,\n inheritAttrs: false,\n emits: ['open', 'close', 'update:active'],\n data() {\n return {\n d_active: this.active\n };\n },\n watch: {\n active(newValue) {\n this.d_active = newValue;\n }\n },\n methods: {\n open(event) {\n if (this.disabled) {\n return;\n }\n\n this.d_active = true;\n\n this.$emit('open', event);\n this.$emit('update:active', true);\n },\n close(event) {\n this.d_active = false;\n\n this.$emit('close', event);\n this.$emit('update:active', false);\n\n setTimeout(() => {\n this.$refs.display.focus();\n }, 0);\n }\n }\n};\n</script>\n"],"names":["name","BaseComponent","props","active","type","Boolean","disabled","displayProps","style","InplaceStyle","provide","$pcInplace","$parentInstance","BaseInplace","inheritAttrs","emits","data","d_active","watch","newValue","methods","open","event","$emit","close","_this","setTimeout","$refs","display","focus","_openBlock","_createElementBlock","_mergeProps","_ctx","cx","ptmi","$data","ref","tabindex","$attrs","role","onClick","$options","apply","arguments","onKeydown","_objectSpread","ptm","_renderSlot","$slots","closeCallback"],"mappings":";;;;AAIA,eAAe;AACXA,EAAAA,IAAI,EAAE,aAAa;AACnB,EAAA,SAAA,EAASC,aAAa;AACtBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,MAAM,EAAE;AACJC,MAAAA,IAAI,EAAEC,OAAO;MACb,SAAS,EAAA;KACZ;AACDC,IAAAA,QAAQ,EAAE;AACNF,MAAAA,IAAI,EAAEC,OA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