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ypush/./src/components/panels/Entities/Index.vue","webpack://platypush/./src/components/panels/Entities/Index.vue?4523","webpack://platypush/./src/components/panels/Entities/Selector.vue","webpack://platypush/./src/components/panels/Entities/Selector.vue?bf8b","webpack://platypush/./src/components/panels/Entities/VariableModal.vue","webpack://platypush/./src/components/panels/Entities/VariableModal.vue?db72"],"sourcesContent":["<template>\n <div class=\"row plugin entities-container\">\n <Loading v-if=\"loading\" />\n\n <header>\n <Selector\n :entity-groups=\"entityGroups\"\n :value=\"selector\"\n @input=\"selector = $event\"\n @refresh=\"refresh\"\n @show-variable-modal=\"variableModalVisible = true\"\n />\n </header>\n\n <div class=\"groups-canvas\">\n <EntityModal\n :entity=\"entities[modalEntityId]\"\n :parent=\"entities[entities[modalEntityId].parent_id]\"\n :children=\"childrenByParentId(modalEntityId)\"\n :visible=\"modalVisible\"\n :config-values=\"configValuesByParentId(modalEntityId)\"\n @close=\"onEntityModal\"\n @entity-update=\"modalEntityId = $event\"\n v-if=\"modalEntityId && entities[modalEntityId]\"\n />\n\n <VariableModal :visible=\"variableModalVisible\" @close=\"variableModalVisible = false\" />\n <NoItems v-if=\"!Object.keys(displayGroups || {})?.length\">No entities found</NoItems>\n\n <div class=\"groups-container\" v-else>\n <div class=\"group fade-in\" v-for=\"group in displayGroups\" :key=\"group.name\">\n <div class=\"frame\">\n <div class=\"header\">\n <span class=\"section left\">\n <Icon v-bind=\"entitiesMeta[typesByCategory[group.name]].icon || {}\"\n v-if=\"selector.grouping === 'category' && entitiesMeta[typesByCategory[group.name]]\" />\n <Icon :class=\"pluginIcons[group.name]?.class\" :url=\"pluginIcons[group.name]?.imgUrl\"\n v-else-if=\"selector.grouping === 'plugin' && pluginIcons[group.name]\" />\n </span>\n\n <span class=\"section center\">\n <div class=\"title\" v-text=\"group.name\" />\n </span>\n\n <span class=\"section right\">\n <Dropdown title=\"Actions\" icon-class=\"fa fa-ellipsis-h\">\n <DropdownItem text=\"Refresh\" icon-class=\"fa fa-sync-alt\" @click=\"refresh(group)\" />\n <DropdownItem text=\"Hide\" icon-class=\"fa fa-eye-slash\" @click=\"hideGroup(group)\" />\n <DropdownItem text=\"Collapse\" icon-class=\"fa fa-caret-up\"\n @click=\"collapsedGroups[group.name] = true\" v-if=\"!collapsedGroups[group.name]\" />\n <DropdownItem text=\"Expand\" icon-class=\"fa fa-caret-down\"\n @click=\"collapsedGroups[group.name] = false\" v-else />\n </Dropdown>\n </span>\n </div>\n\n <div class=\"body\" v-if=\"!collapsedGroups[group.name]\">\n <div class=\"entity-frame\"\n v-for=\"entity in Object.values(group.entities).sort((a, b) => a.name.localeCompare(b.name))\"\n :key=\"entity.id\">\n <Entity\n :value=\"entity\"\n :children=\"childrenByParentId(entity.id)\"\n :all-entities=\"entities\"\n @show-modal=\"onEntityModal($event)\"\n @input=\"onEntityInput(entity)\"\n :error=\"!!errorEntities[entity.id]\"\n :key=\"entity.id\"\n :loading=\"!!loadingEntities[entity.id]\"\n @loading=\"loadingEntities[entity.id] = $event\"\n v-if=\"!entity.parent_id\"\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport Utils from \"@/Utils\"\nimport Dropdown from \"@/components/elements/Dropdown\";\nimport DropdownItem from \"@/components/elements/DropdownItem\";\nimport Loading from \"@/components/Loading\";\nimport Icon from \"@/components/elements/Icon\";\nimport NoItems from \"@/components/elements/NoItems\";\nimport Entity from \"./Entity.vue\";\nimport Selector from \"./Selector.vue\";\nimport EntityModal from \"./Modal\"\nimport VariableModal from \"./VariableModal\"\nimport { bus } from \"@/bus\";\nimport icons from '@/assets/icons.json'\nimport meta from './meta.json'\n\nexport default {\n name: \"Entities\",\n mixins: [Utils],\n components: {\n Dropdown,\n DropdownItem,\n Entity,\n EntityModal,\n Icon,\n Loading,\n NoItems,\n Selector,\n VariableModal,\n },\n\n props: {\n // Entity scan timeout in seconds\n entityScanTimeout: {\n type: Number,\n default: 30,\n },\n },\n\n data() {\n return {\n loading: false,\n loadingEntities: {},\n errorEntities: {},\n entityTimeouts: {},\n entities: {},\n entityGroups: {\n id: {},\n category: {},\n plugin: {},\n type: {},\n },\n modalEntityId: null,\n modalVisible: false,\n variableModalVisible: false,\n selector: {\n grouping: 'plugin',\n selectedEntities: {},\n selectedGroups: {},\n },\n collapsedGroups: {},\n }\n },\n\n computed: {\n entitiesMeta() {\n return meta\n },\n\n pluginIcons() {\n return icons\n },\n\n typesByCategory() {\n return Object.entries(meta).reduce((obj, [type, meta]) => {\n obj[meta.name_plural] = type\n return obj\n }, {})\n },\n\n displayGroups() {\n return Object.entries(this.entityGroups[this.selector.grouping])\n .filter((entry) => this.selector.selectedGroups[entry[0]])\n .map(\n ([grouping, entities]) => {\n return {\n name: grouping,\n entities: Object.values(entities).filter(\n (e) => e.id in this.selector.selectedEntities\n ),\n }\n }\n )\n .filter((group) => group.entities?.length > 0)\n .sort((a, b) => a.name.localeCompare(b.name))\n },\n },\n\n methods: {\n addEntity(entity) {\n this.entities[entity.id] = entity\n\n if (entity.parent_id != null)\n return // Only group entities that have no parent\n\n ['id', 'type', 'category', 'plugin'].forEach((attr) => {\n if (entity[attr] == null)\n return\n\n if (attr == 'id')\n this.entityGroups[attr][entity[attr]] = entity\n else {\n if (!this.entityGroups[attr][entity[attr]])\n this.entityGroups[attr][entity[attr]] = {}\n this.entityGroups[attr][entity[attr]][entity.id] = entity\n }\n })\n },\n\n removeEntity(entity) {\n if (entity.parent_id != null)\n return // Only group entities that have no parent\n\n ['id', 'type', 'category', 'plugin'].forEach((attr) => {\n if (this.entityGroups[attr][entity[attr]][entity.id])\n delete this.entityGroups[attr][entity[attr]][entity.id]\n })\n\n if (this.entities[entity.id])\n delete this.entities[entity.id]\n },\n\n _shouldSkipLoading(entity) {\n const children = Object.values(this.childrenByParentId(entity.id))\n const hasReadableChildren = children.filter((child) => {\n return (\n !child.is_configuration &&\n !child.is_write_only &&\n !child.is_query_disabled\n )\n }).length > 0\n\n return (\n entity.is_query_disabled ||\n entity.is_write_only ||\n (children.length && !hasReadableChildren)\n )\n },\n\n hideGroup(group) {\n Object.keys(group.entities).forEach((id) => {\n if (this.selector.selectedEntities[id])\n delete this.selector.selectedEntities[id]\n })\n delete this.selector.selectedGroups[group.name]\n },\n\n async refresh(group, setLoading=true) {\n const entities = (group ? group.entities : this.entities) || {}\n const args = {}\n if (group)\n args.plugins = Object.values(entities).reduce((obj, entity) => {\n obj[entity.plugin] = true\n return obj\n }, {})\n\n if (setLoading)\n this.loadingEntities = Object.values(entities).reduce((obj, entity) => {\n if (this._shouldSkipLoading(entity))\n return obj\n\n const self = this\n const id = entity.id\n if (this.entityTimeouts[id])\n clearTimeout(this.entityTimeouts[id])\n\n this.addEntity(entity)\n this.entityTimeouts[id] = setTimeout(() => {\n if (self.loadingEntities[id])\n delete self.loadingEntities[id]\n if (self.entityTimeouts[id])\n delete self.entityTimeouts[id]\n\n self.errorEntities[id] = entity\n console.warn(`Scan timeout for ${entity.name}`)\n }, this.entityScanTimeout * 1000)\n\n obj[id] = true\n return obj\n }, {})\n\n this.request('entities.scan', args)\n },\n\n async sync(setLoading=true) {\n if (setLoading)\n this.loading = true\n\n try {\n this.entities = (await this.request('entities.get')).reduce((obj, entity) => {\n entity.name = entity?.meta?.name_override || entity.name\n entity.category = meta[entity.type].name_plural\n entity.meta = {\n ...(meta[entity.type] || {}),\n ...(entity.meta || {}),\n }\n\n obj[entity.id] = entity\n this.addEntity(entity)\n return obj\n }, {})\n\n this.selector.selectedEntities = this.entityGroups.id\n this.refreshEntitiesCache()\n } finally {\n if (setLoading)\n this.loading = false\n }\n },\n\n childrenByParentId(parentId, selectConfig) {\n const entity = this.entities?.[parentId]\n if (!entity?.children_ids?.length)\n return {}\n\n return entity.children_ids.reduce((obj, id) => {\n const child = this.entities[id]\n if (\n child && (\n (!selectConfig && !child.is_configuration) ||\n (selectConfig && child.is_configuration)\n )\n )\n obj[id] = this.entities[id]\n return obj\n }, {})\n },\n\n configValuesByParentId(parentId) {\n return this.childrenByParentId(parentId, true)\n },\n\n clearEntityTimeouts(entityId) {\n if (this.errorEntities[entityId])\n delete this.errorEntities[entityId]\n if (this.loadingEntities[entityId])\n delete this.loadingEntities[entityId]\n if (this.entityTimeouts[entityId]) {\n clearTimeout(this.entityTimeouts[entityId])\n delete this.entityTimeouts[entityId]\n }\n },\n\n onEntityInput(entity) {\n entity.category = meta[entity.type].name_plural\n this.entities[entity.id] = entity\n this.clearEntityTimeouts(entity.id)\n if (this.loadingEntities[entity.id])\n delete this.loadingEntities[entity.id]\n },\n\n onEntityUpdate(event) {\n const entityId = event.entity.id\n if (entityId == null)\n return\n\n this.clearEntityTimeouts(entityId)\n const entity = {...event.entity}\n if (event.entity?.state == null)\n entity.state = this.entities[entityId]?.state\n if (entity.meta?.name_override?.length)\n entity.name = entity.meta.name_override\n else if (this.entities[entityId]?.meta?.name_override?.length)\n entity.name = this.entities[entityId].meta.name_override\n else\n entity.name = event.entity?.name || this.entities[entityId]?.name\n\n entity.category = meta[entity.type].name_plural\n entity.meta = {\n ...(meta[event.entity.type] || {}),\n ...(this.entities[entityId]?.meta || {}),\n ...(event.entity?.meta || {}),\n }\n\n this.addEntity(entity)\n bus.publishEntity(entity)\n },\n\n onEntityDelete(event) {\n const entityId = event.entity?.id\n if (entityId == null)\n return\n if (entityId === this.modalEntityId)\n this.modalEntityId = null\n if (this.entities[entityId])\n this.removeEntity(this.entities[entityId])\n },\n\n onEntityModal(entityId) {\n if (entityId) {\n this.modalEntityId = entityId\n this.modalVisible = true\n } else {\n this.modalEntityId = null\n this.modalVisible = false\n }\n },\n\n loadCachedEntities() {\n const cachedEntities = window.localStorage.getItem('entities')\n if (cachedEntities) {\n try {\n this.entities = JSON.parse(cachedEntities)\n if (!this.entities)\n throw Error('The list of cached entities is null')\n } catch (e) {\n console.warning('Could not parse cached entities', e)\n return false\n }\n\n Object.values(this.entities).forEach((entity) => this.onEntityUpdate({entity: entity}))\n this.selector.selectedEntities = this.entityGroups.id\n return true\n }\n\n return false\n },\n\n refreshEntitiesCache() {\n if (this.loading)\n return\n\n window.localStorage.setItem('entities', JSON.stringify(this.entities))\n },\n },\n\n async mounted() {\n this.subscribe(\n this.onEntityUpdate,\n 'on-entity-update',\n 'platypush.message.event.entities.EntityUpdateEvent'\n )\n\n this.subscribe(\n this.onEntityDelete,\n 'on-entity-delete',\n 'platypush.message.event.entities.EntityDeleteEvent'\n )\n\n const hasCachedEntities = this.loadCachedEntities()\n await this.sync(!hasCachedEntities)\n await this.refresh(null, !hasCachedEntities)\n setInterval(() => this.refreshEntitiesCache(), 10000)\n },\n\n unmounted() {\n this.unsubscribe('on-entity-update')\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"vars\";\n@import \"~@/style/items\";\n\n.entities-container {\n --groups-per-row: 1;\n\n @include from($desktop) {\n --groups-per-row: 2;\n }\n\n @include from($fullhd) {\n --groups-per-row: 3;\n }\n\n width: 100%;\n height: 100%;\n overflow: auto;\n color: $default-fg-2;\n font-weight: 400;\n\n button {\n background: transparent;\n border: 0;\n\n &:hover {\n color: $default-hover-fg;\n }\n }\n\n header {\n width: calc(100% - 2px);\n height: $selector-height;\n display: flex;\n background: $default-bg-2;\n margin-left: 2px;\n box-shadow: $border-shadow-bottom;\n position: relative;\n\n .right {\n position: absolute;\n right: 0;\n text-align: right;\n margin-right: 0.5em;\n padding-right: 0;\n\n button {\n padding: 0.5em 0;\n }\n }\n }\n\n .groups-canvas {\n width: 100%;\n height: calc(100% - #{$selector-height});\n overflow: auto;\n }\n\n .groups-container {\n @include until(#{$tablet - 1}) {\n background: $default-bg-2;\n }\n\n @include until(#{$desktop - 1}) {\n display: flex;\n flex-direction: column;\n align-items: center;\n }\n\n @include from($desktop) {\n column-count: var(--groups-per-row);\n }\n }\n\n .group {\n width: 100%;\n max-width: 600px;\n max-height: 100%;\n position: relative;\n display: flex;\n break-inside: avoid;\n\n @include until(#{$tablet - 1}) {\n padding: 0;\n margin-bottom: $main-margin;\n }\n\n @include from($tablet) {\n padding: $main-margin;\n }\n\n .frame {\n @include from($desktop) {\n max-height: calc(100vh - #{$header-height} - #{$main-margin});\n }\n\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n position: relative;\n border-radius: 1em;\n box-shadow: $group-shadow;\n }\n\n .header {\n width: 100%;\n height: $header-height;\n display: table;\n background: $header-bg;\n box-shadow: $header-shadow;\n\n @include until(#{$tablet - 1}) {\n border-bottom: 1px solid $border-color-2;\n }\n\n @include from($tablet) {\n border-radius: 1em 1em 0 0;\n }\n\n .section {\n height: 100%;\n display: table-cell;\n vertical-align: middle;\n\n &.left, &.right {\n width: 10%;\n }\n\n &.right {\n text-align: right;\n }\n\n &.center {\n width: 80%;\n text-align: center;\n }\n }\n\n .title {\n text-transform: capitalize;\n\n @include until(#{$tablet - 1}) {\n font-weight: bold;\n }\n }\n }\n\n .body {\n max-height: calc(100% - #{$header-height});\n overflow: auto;\n flex-grow: 1;\n\n @include from($tablet) {\n background: $default-bg-2;\n }\n\n .entity-frame {\n background: $background-color;\n\n &:last-child {\n border-radius: 0 0 1em 1em;\n }\n }\n }\n }\n\n :deep(.dropdown-container) {\n .dropdown {\n min-width: 10em;\n margin-left: 0;\n\n .item {\n box-shadow: none;\n }\n }\n\n button {\n background: none;\n }\n }\n}\n</style>\n","import { render } from \"./Index.vue?vue&type=template&id=59321353&scoped=true\"\nimport script from \"./Index.vue?vue&type=script&lang=js\"\nexport * from \"./Index.vue?vue&type=script&lang=js\"\n\nimport \"./Index.vue?vue&type=style&index=0&id=59321353&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-59321353\"]])\n\nexport default __exports__","<template>\n <div class=\"entities-selectors-container\">\n <div class=\"selector search-container col-11\"\n v-if=\"Object.keys(entityGroups.id || {}).length\">\n <input ref=\"search\" type=\"text\" class=\"search-bar\"\n title=\"Filter by name, plugin or ID\" placeholder=\"🔎\"\n v-model=\"searchTerm\">\n </div>\n\n <div class=\"selector actions-container col-1 pull-right\">\n <Dropdown title=\"Actions\" icon-class=\"fas fa-ellipsis\">\n <DropdownItem icon-class=\"fas fa-sync-alt\" text=\"Refresh\"\n @click=\"$emit('refresh')\" />\n <DropdownItem icon-class=\"fas fa-square-root-variable\"\n text=\"Set Variable\" @click=\"$emit('show-variable-modal')\" />\n\n <Dropdown title=\"Group by\" text=\"Group by\"\n icon-class=\"fas fa-object-ungroup\" ref=\"groupingSelector\">\n <DropdownItem v-for=\"g in visibleGroupings\" :key=\"g\" :text=\"prettifyGroupingName(g)\"\n :item-class=\"{selected: value?.grouping === g}\"\n @click=\"onGroupingChanged(g)\" />\n </Dropdown>\n\n <Dropdown title=\"Filter groups\" text=\"Filter groups\"\n :icon-class=\"{fas: true, 'fa-filter': true, active: hasActiveFilter}\"\n ref=\"groupSelector\" keep-open-on-item-click>\n <DropdownItem v-for=\"g in sortedGroups\" :key=\"g\" :text=\"g\"\n v-bind=\"iconForGroup(g)\" :item-class=\"{selected: !!selectedGroups[g]}\"\n @click.stop=\"toggleGroup(g)\" />\n </Dropdown>\n </Dropdown>\n </div>\n </div>\n</template>\n\n<script>\nimport Utils from '@/Utils'\nimport Dropdown from \"@/components/elements/Dropdown\";\nimport DropdownItem from \"@/components/elements/DropdownItem\";\nimport meta from './meta.json'\nimport pluginIcons from '@/assets/icons.json'\nimport { bus } from \"@/bus\";\n\nexport default {\n name: \"Selector\",\n emits: ['input', 'refresh', 'show-variable-modal'],\n mixins: [Utils],\n components: {Dropdown, DropdownItem},\n props: {\n entityGroups: {\n type: Object,\n required: true,\n },\n\n value: {\n type: Object,\n required: true,\n },\n },\n\n data() {\n return {\n selectedGroups: {},\n searchTerm: '',\n }\n },\n\n computed: {\n visibleGroupings() {\n return Object.keys(this.entityGroups).filter(\n (grouping) => grouping !== 'id'\n )\n },\n\n hasActiveFilter() {\n return Object.values(this.selectedGroups).filter((val) => val === false).length > 0\n },\n\n sortedGroups() {\n return Object.keys(this.entityGroups[this.value?.grouping] || {}).sort()\n },\n\n typesMeta() {\n return meta\n },\n\n isGroupFilterActive() {\n return Object.keys(this.selectedGroups).length !== this.sortedGroups.length\n },\n\n selectedEntities() {\n if (!this.searchTerm?.length)\n return this.entityGroups.id\n\n const searchTerm = this.searchTerm.toLowerCase().trim()\n return Object.values(this.entityGroups.id).filter((entity) => {\n if (!this.selectedGroups[entity[this.value?.grouping]])\n return false\n\n if (!searchTerm?.length)\n return true\n\n for (const attr of ['id', 'external_id', 'name', 'plugin']) {\n if (!entity[attr])\n continue\n\n const entityValue = entity[attr].toString().toLowerCase()\n if (entityValue.indexOf(searchTerm) >= 0)\n return true\n }\n\n return false\n }).reduce((obj, entity) => {\n obj[entity.id] = entity\n return obj\n }, {})\n },\n },\n\n methods: {\n prettifyGroupingName(name) {\n if (!name)\n return ''\n\n name = this.prettify(name)\n if (name.endsWith('y'))\n name = name.slice(0, name.length-1) + 'ie'\n\n name += 's'\n return name\n },\n\n iconForGroup(group) {\n if (this.value.grouping === 'plugin' && pluginIcons[group]) {\n const icon = pluginIcons[group]\n return {\n 'icon-class': icon['class']?.length || !icon.imgUrl?.length ?\n icon['class'] : 'fas fa-gears',\n 'icon-url': icon.imgUrl,\n }\n }\n\n return {}\n },\n\n sync() {\n const value = {...this.value}\n value.searchTerm = this.searchTerm\n value.selectedEntities = this.selectedEntities\n value.selectedGroups = this.selectedGroups\n this.$emit('input', value)\n },\n\n refreshGroupFilter() {\n this.selectedGroups = Object.keys(\n this.entityGroups[this.value?.grouping] || {}\n ).reduce(\n (obj, group) => {\n obj[group] = true\n return obj\n }, {}\n )\n\n this.sync()\n },\n\n toggleGroup(group) {\n this.selectedGroups[group] = !this.selectedGroups[group]\n this.sync()\n },\n\n processEntityUpdate(entity) {\n const group = entity[this.value?.grouping]\n if (group && this.selectedGroups[group] == null) {\n this.selectedGroups[group] = true\n }\n },\n\n onGroupingChanged(grouping) {\n if (!this.entityGroups[grouping] || grouping === this.value?.grouping)\n return false\n\n const value = {...this.value}\n value.grouping = grouping\n this.$emit('input', value)\n },\n },\n\n mounted() {\n this.refreshGroupFilter()\n this.$watch(() => this.value?.grouping, () => { this.refreshGroupFilter() })\n this.$watch(() => this.searchTerm, this.sync)\n bus.onEntity(this.processEntityUpdate)\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.entities-selectors-container {\n width: 100%;\n display: flex;\n align-items: center;\n\n .selector {\n height: 100%;\n display: inline-flex;\n }\n\n @media (max-width: 330px) {\n .search-bar {\n display: none;\n }\n }\n\n .search-bar {\n margin: 0.25em 0;\n }\n\n @include until(#{$tablet - 1 }) {\n .search-bar {\n width: 100%;\n margin-right: 2em;\n }\n }\n\n @include from($tablet) {\n .search-bar {\n min-width: 400px;\n margin-left: 0.5em;\n }\n }\n\n :deep(.dropdown-container) {\n height: 100%;\n display: flex;\n\n .dropdown {\n min-width: 11em;\n }\n\n .icon.active {\n color: $selected-fg;\n }\n\n button {\n height: 100%;\n }\n }\n}\n</style>\n","import { render } from \"./Selector.vue?vue&type=template&id=334516c0&scoped=true\"\nimport script from \"./Selector.vue?vue&type=script&lang=js\"\nexport * from \"./Selector.vue?vue&type=script&lang=js\"\n\nimport \"./Selector.vue?vue&type=style&index=0&id=334516c0&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-334516c0\"]])\n\nexport default __exports__","<template>\n <Modal :visible=\"visible\" title=\"Set Variable\" ref=\"modal\"\n @open=\"onOpen\" @close=\"$emit('close', $event)\">\n <div class=\"variable-modal-container\">\n <form @submit.prevent=\"setValue\">\n <div class=\"row\">\n <div class=\"col-s-12 col-m-4 label\">\n <label for=\"name\">Variable Name</label>\n </div>\n <div class=\"col-s-12 col-m-8 value\">\n <input type=\"text\" id=\"variable-name\" v-model=\"varName\"\n placeholder=\"Variable Name\" :disabled=\"loading\" ref=\"varName\" />\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-s-12 col-m-4 label\">\n <label for=\"name\">Variable Value</label>\n </div>\n <div class=\"col-s-12 col-m-8 value\">\n <input type=\"text\" id=\"variable-value\" v-model=\"varValue\" ref=\"varValue\"\n placeholder=\"Variable Value\" :disabled=\"loading\" />\n </div>\n </div>\n\n <div class=\"row button-container\">\n <button type=\"submit\" title=\"Set\" :disabled=\"loading\">\n <i class=\"fas fa-check\" />\n </button>\n </div>\n </form>\n </div>\n </Modal>\n</template>\n\n<script>\nimport Modal from \"@/components/Modal\";\nimport Utils from \"@/Utils\";\n\nexport default {\n name: \"VariableModal\",\n components: {Modal},\n mixins: [Utils],\n emits: ['close'],\n props: {\n visible: {\n type: Boolean,\n default: false,\n },\n },\n data() {\n return {\n loading: false,\n varName: null,\n varValue: null,\n };\n },\n\n methods: {\n async clearValue() {\n this.loading = true\n try {\n await this.request('variable.unset', {name: this.varName.trim()})\n } finally {\n this.loading = false\n }\n },\n\n async setValue() {\n const varName = this.varName.trim()\n if (!varName?.length) {\n this.notifyWarning('No variable name has been specified')\n }\n\n const value = this.varValue\n if (!value?.length) {\n await this.clearValue()\n } else {\n this.loading = true\n try {\n const args = {}\n args[varName] = value\n await this.request('variable.set', args)\n } finally {\n this.loading = false\n }\n }\n\n this.$refs.varName.value = ''\n this.$refs.varValue.value = ''\n this.$refs.modal.close()\n },\n\n onOpen() {\n this.$nextTick(() => {\n this.$refs.varName.focus()\n })\n },\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import \"common\";\n\n.variable-modal-container {\n form {\n padding: 1em 0;\n\n label {\n font-weight: bold;\n }\n\n .row {\n padding: 0.25em 1em;\n display: flex;\n align-items: center;\n\n @include until($tablet) {\n flex-direction: column;\n }\n\n input[type=text] {\n width: 100%;\n }\n }\n\n .button-container {\n display: flex;\n justify-content: center;\n margin-top: 0.5em;\n margin-bottom: -0.75em;\n padding-top: 0.5em;\n border-top: 1px solid $border-color-1;\n\n button {\n min-width: 10em;\n background: none;\n border-radius: 1.5em;\n\n &:hover {\n background: $hover-bg;\n }\n }\n }\n\n @include from($tablet) {\n .value {\n text-align: right;\n }\n }\n }\n}\n</style>\n","import { render } from \"./VariableModal.vue?vue&type=template&id=4e3d4a40&scoped=true\"\nimport script from \"./VariableModal.vue?vue&type=script&lang=js\"\nexport * from \"./VariableModal.vue?vue&type=script&lang=js\"\n\nimport \"./VariableModal.vue?vue&type=style&index=0&id=4e3d4a40&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-4e3d4a40\"]])\n\nexport default __exports__"],"names":["class","_createElementBlock","_hoisted_1","$data","loading","_createBlock","_component_Loading","key","_createElementVNode","_createVNode","_component_Selector","entityGroups","value","selector","onInput","_cache","$event","onRefresh","$options","refresh","onShowVariableModal","variableModalVisible","_hoisted_2","modalEntityId","entities","_component_EntityModal","entity","parent","parent_id","children","childrenByParentId","visible","modalVisible","configValuesByParentId","onClose","onEntityModal","onEntityUpdate","_component_VariableModal","Object","keys","displayGroups","length","_hoisted_3","_Fragment","_renderList","group","name","_hoisted_4","_hoisted_5","_hoisted_6","grouping","entitiesMeta","typesByCategory","_component_Icon","_normalizeProps","_mergeProps","icon","pluginIcons","_normalizeClass","url","imgUrl","_hoisted_7","_toDisplayString","_hoisted_9","_component_Dropdown","title","_component_DropdownItem","text","onClick","hideGroup","collapsedGroups","_hoisted_10","values","sort","a","b","localeCompare","id","_component_Entity","onShowModal","onEntityInput","error","errorEntities","loadingEntities","onLoading","_component_NoItems","mixins","Utils","components","Dropdown","DropdownItem","Entity","EntityModal","Icon","Loading","NoItems","Selector","VariableModal","props","entityScanTimeout","type","Number","default","data","entityTimeouts","category","plugin","selectedEntities","selectedGroups","computed","meta","icons","entries","reduce","obj","name_plural","this","filter","entry","map","e","methods","addEntity","forEach","attr","removeEntity","_shouldSkipLoading","hasReadableChildren","child","is_configuration","is_write_only","is_query_disabled","setLoading","args","plugins","self","clearTimeout","setTimeout","console","warn","request","sync","name_override","refreshEntitiesCache","parentId","selectConfig","children_ids","clearEntityTimeouts","entityId","event","state","bus","publishEntity","onEntityDelete","loadCachedEntities","cachedEntities","window","localStorage","getItem","JSON","parse","Error","warning","setItem","stringify","mounted","subscribe","hasCachedEntities","setInterval","unmounted","unsubscribe","__exports__","render","$props","ref","placeholder","searchTerm","_ctx","$emit","visibleGroupings","g","prettifyGroupingName","selected","onGroupingChanged","fas","active","hasActiveFilter","sortedGroups","iconForGroup","_withModifiers","toggleGroup","emits","required","val","typesMeta","isGroupFilterActive","toLowerCase","trim","entityValue","toString","indexOf","prettify","endsWith","slice","refreshGroupFilter","processEntityUpdate","$watch","onEntity","for","_hoisted_12","_component_Modal","onOpen","onSubmit","setValue","varName","disabled","_hoisted_8","varValue","Modal","Boolean","clearValue","notifyWarning","$refs","modal","close","$nextTick","focus"],"sourceRoot":""}