diff --git a/aircox/forms.py b/aircox/forms.py
index adce028..2a6dbbe 100644
--- a/aircox/forms.py
+++ b/aircox/forms.py
@@ -1,12 +1,11 @@
from django import forms
+from django.forms.models import modelformset_factory
-from filer.models.filemodels import File
from aircox import models
-from aircox.controllers.sound_file import SoundFile
-__all__ = ("CommentForm", "PageForm", "ProgramForm", "EpisodeForm")
+__all__ = ("CommentForm", "PageForm", "ProgramForm", "EpisodeForm", "SoundForm", "TrackFormSet")
class CommentForm(forms.ModelForm):
@@ -40,18 +39,52 @@ class ProgramForm(PageForm):
class EpisodeForm(PageForm):
- new_podcast = forms.FileField(required=False)
-
class Meta:
model = models.Episode
fields = PageForm.Meta.fields
- def save(self, commit=True):
- file_obj = self.cleaned_data["new_podcast"]
- if file_obj:
- obj, _ = File.objects.get_or_create(original_filename=file_obj.name, file=file_obj)
- sound_file = SoundFile(obj.path)
- sound_file.sync(
- program=self.instance.program, episode=self.instance, type=0, is_public=True, is_downloadable=True
- )
- super().save(commit=commit)
+
+# def save(self, commit=True):
+# file_obj = self.cleaned_data["new_podcast"]
+# if file_obj:
+# obj, _ = File.objects.get_or_create(original_filename=file_obj.name, file=file_obj)
+# sound_file = SoundFile(obj.path)
+# sound_file.sync(
+# program=self.instance.program, episode=self.instance, type=0, is_public=True, is_downloadable=True
+# )
+# super().save(commit=commit)
+
+
+class SoundForm(forms.ModelForm):
+ """SoundForm used in EpisodeUpdateView."""
+
+ class Meta:
+ model = models.Sound
+ fields = ["name", "program", "episode", "type", "position", "duration", "is_public", "is_downloadable"]
+
+
+TrackFormSet = modelformset_factory(
+ models.Track,
+ fields=[
+ "position",
+ "artist",
+ "title",
+ "tags",
+ "album",
+ ],
+ extra=0,
+)
+"""Track formset used in EpisodeUpdateView."""
+
+SoundFormSet = modelformset_factory(
+ models.Sound,
+ fields=[
+ "position",
+ "name",
+ "type",
+ "is_public",
+ "is_downloadable",
+ ],
+ extra=0,
+)
+"""Sound formset used in EpisodeUpdateView."""
diff --git a/aircox/models/sound.py b/aircox/models/sound.py
index 18133cc..0ff7bfb 100644
--- a/aircox/models/sound.py
+++ b/aircox/models/sound.py
@@ -148,12 +148,12 @@ class Sound(models.Model):
)
is_public = models.BooleanField(
_("public"),
- help_text=_("whether it is publicly available as podcast"),
+ help_text=_("sound is available as podcast"),
default=False,
)
is_downloadable = models.BooleanField(
_("downloadable"),
- help_text=_("whether it can be publicly downloaded by visitors (sound must be " "public)"),
+ help_text=_("sound can be downloaded by visitors (sound must be public)"),
default=False,
)
diff --git a/aircox/static/aircox/js/admin.js b/aircox/static/aircox/js/admin.js
index c4f835b..bbac40f 100644
--- a/aircox/static/aircox/js/admin.js
+++ b/aircox/static/aircox/js/admin.js
@@ -16,7 +16,7 @@
\**********************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _styles_admin_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./styles/admin.scss */ \"./src/styles/admin.scss\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./src/index.js\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app */ \"./src/app.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components */ \"./src/components/index.js\");\n/* harmony import */ var _track__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./track */ \"./src/track.js\");\n\n\n\n\n\nconst AdminApp = {\n ..._app__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n components: {\n ..._app__WEBPACK_IMPORTED_MODULE_2__[\"default\"].components,\n ..._components__WEBPACK_IMPORTED_MODULE_3__.admin\n },\n data() {\n return {\n ...super.data,\n Track: _track__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n };\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (AdminApp);\nwindow.App = AdminApp;\n\n//# sourceURL=webpack://aircox-assets/./src/admin.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _styles_admin_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./styles/admin.scss */ \"./src/styles/admin.scss\");\n/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ \"./src/index.js\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app */ \"./src/app.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components */ \"./src/components/index.js\");\n\n\n\n\nconst AdminApp = {\n ..._app__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n components: {\n ..._app__WEBPACK_IMPORTED_MODULE_2__[\"default\"].components,\n ..._components__WEBPACK_IMPORTED_MODULE_3__.admin\n },\n data() {\n return {\n ...super.data\n };\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (AdminApp);\nwindow.App = AdminApp;\n\n//# sourceURL=webpack://aircox-assets/./src/admin.js?");
/***/ })
diff --git a/aircox/static/aircox/js/chunk-common.js b/aircox/static/aircox/js/chunk-common.js
index fe062a2..88e928f 100644
--- a/aircox/static/aircox/js/chunk-common.js
+++ b/aircox/static/aircox/js/chunk-common.js
@@ -75,7 +75,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
\****************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: {\n title: {\n type: String,\n default: \"\"\n }\n },\n data() {\n return {\n active: false\n };\n },\n methods: {\n open() {\n this.active = true;\n },\n close() {\n this.active = false;\n }\n }\n});\n\n//# sourceURL=webpack://aircox-assets/./src/components/AModal.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: {\n title: {\n type: String,\n default: \"\"\n }\n },\n data() {\n return {\n ///! If true, modal is open\n active: false,\n ///! Item or data passed down to slots.\n item: null\n };\n },\n methods: {\n ///! Open modal dialog. Set provided `item` to dialog's one.\n open(item = null) {\n this.active = true;\n this.item = item;\n },\n ///! Close modal and reset item to null.\n close() {\n this.active = false;\n this.item = null;\n }\n }\n});\n\n//# sourceURL=webpack://aircox-assets/./src/components/AModal.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
/***/ }),
@@ -109,6 +109,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ALi
/***/ }),
+/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/APlaylistEditor.vue?vue&type=script&lang=js":
+/*!*************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/APlaylistEditor.vue?vue&type=script&lang=js ***!
+ \*************************************************************************************************************************************************************************************************/
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model */ \"./src/model.js\");\n/* harmony import */ var _ARows__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ARows */ \"./src/components/ARows.vue\");\n\n// import {dropRightWhile, cloneDeep, isEqual} from 'lodash'\n\n\n\n// import AActionButton from './AActionButton'\n\n// import AModal from \"./AModal\"\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n components: {\n ARows: _ARows__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n },\n props: {\n initData: Object,\n dataPrefix: String,\n labels: Object,\n settingsUrl: String,\n columns: {\n type: Array,\n default: () => ['name', \"type\", 'is_public', 'is_downloadable']\n }\n },\n data() {\n return {\n set: new _model__WEBPACK_IMPORTED_MODULE_2__.Set(_model__WEBPACK_IMPORTED_MODULE_2__[\"default\"])\n };\n },\n computed: {\n items() {\n return this.set.items;\n },\n rowsSlots() {\n return Object.keys(this.$slots).filter(x => x.startsWith('row-') || x.startsWith('rows-')).map(x => [x, x.startsWith('rows-') ? x.slice(5) : x]);\n }\n },\n methods: {\n listItemMove({\n from,\n to,\n set\n }) {\n set.move(from, to);\n },\n /**\n * Load initial data\n */\n loadData({\n items = [] /*, settings=null*/\n }, reset = false) {\n if (reset) {\n this.set.items = [];\n }\n for (var index in items) this.set.push((0,lodash__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(items[index]));\n // if(settings)\n // this.settingsSaved(settings)\n }\n },\n\n watch: {\n initData(val) {\n this.loadData(val);\n }\n },\n mounted() {\n this.initData && this.loadData(this.initData);\n }\n});\n\n//# sourceURL=webpack://aircox-assets/./src/components/APlaylistEditor.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
+
+/***/ }),
+
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AProgress.vue?vue&type=script&lang=js":
/*!*******************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AProgress.vue?vue&type=script&lang=js ***!
@@ -195,7 +205,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony default export */
\**************************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Page: function() { return /* binding */ Page; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model */ \"./src/model.js\");\n/* harmony import */ var _track__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../track */ \"./src/track.js\");\n/* harmony import */ var _AActionButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AActionButton */ \"./src/components/AActionButton.vue\");\n/* harmony import */ var _ARow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ARow */ \"./src/components/ARow.vue\");\n/* harmony import */ var _ARows__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ARows */ \"./src/components/ARows.vue\");\n/* harmony import */ var _AModal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AModal */ \"./src/components/AModal.vue\");\n\n\n\n\n\n\n\n\n\n/// Page display\nconst Page = {\n Text: 0,\n List: 1,\n Settings: 2\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n components: {\n AActionButton: _AActionButton__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n ARow: _ARow__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n ARows: _ARows__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n AModal: _AModal__WEBPACK_IMPORTED_MODULE_7__[\"default\"]\n },\n props: {\n initData: Object,\n dataPrefix: String,\n labels: Object,\n settingsUrl: String,\n defaultColumns: {\n type: Array,\n default: () => ['artist', 'title', 'tags', 'album', 'year', 'timestamp']\n }\n },\n data() {\n const settings = {\n tracklist_editor_columns: this.defaultColumns,\n tracklist_editor_sep: ' -- '\n };\n return {\n Page: Page,\n page: Page.Text,\n set: new _model__WEBPACK_IMPORTED_MODULE_2__.Set(_track__WEBPACK_IMPORTED_MODULE_3__[\"default\"]),\n extraData: {},\n settings,\n savedSettings: (0,lodash__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(settings)\n };\n },\n computed: {\n settingsChanged() {\n var k = Object.keys(this.savedSettings).findIndex(k => !(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isEqual)(this.settings[k], this.savedSettings[k]));\n return k != -1;\n },\n separator: {\n set(value) {\n this.settings.tracklist_editor_sep = value;\n if (this.page == Page.List) this.updateInput();\n },\n get() {\n return this.settings.tracklist_editor_sep;\n }\n },\n columns: {\n set(value) {\n var cols = value.filter(x => x in this.defaultColumns);\n var left = this.defaultColumns.filter(x => !(x in cols));\n value = cols.concat(left);\n this.settings.tracklist_editor_columns = value;\n },\n get() {\n return this.settings.tracklist_editor_columns;\n }\n },\n items() {\n return this.set.items;\n },\n rowsSlots() {\n return Object.keys(this.$slots).filter(x => x.startsWith('row-') || x.startsWith('rows-')).map(x => [x, x.startsWith('rows-') ? x.slice(5) : x]);\n }\n },\n methods: {\n onCellEvent(event) {\n switch (event.name) {\n case 'change':\n this.updateInput();\n break;\n }\n },\n formatMove({\n from,\n to\n }) {\n const value = this.columns[from];\n this.settings.tracklist_editor_columns.splice(from, 1);\n this.settings.tracklist_editor_columns.splice(to, 0, value);\n if (this.page == Page.Text) this.updateList();else this.updateInput();\n },\n columnMove({\n from,\n to\n }) {\n const value = this.columns[from];\n this.columns.splice(from, 1);\n this.columns.splice(to, 0, value);\n this.updateInput();\n },\n listItemMove({\n from,\n to,\n set\n }) {\n set.move(from, to);\n this.updateInput();\n },\n updateList() {\n const items = this.toList(this.$refs.textarea.value);\n this.set.reset(items);\n },\n updateInput() {\n const input = this.toText(this.items);\n this.$refs.textarea.value = input;\n },\n /**\n * From input and separator, return list of items.\n */\n toList(input) {\n var lines = input.split('\\n');\n var items = [];\n for (let line of lines) {\n line = line.trimLeft();\n if (!line) continue;\n var lineBits = line.split(this.separator);\n var item = {};\n for (var col in this.columns) {\n if (col >= lineBits.length) break;\n const attr = this.columns[col];\n item[attr] = lineBits[col].trim();\n }\n item && items.push(item);\n }\n return items;\n },\n /**\n * From items and separator return a string\n */\n toText(items) {\n const sep = ` ${this.separator.trim()} `;\n const lines = [];\n for (let item of items) {\n if (!item) continue;\n var line = [];\n for (var col of this.columns) line.push(item.data[col] || '');\n line = (0,lodash__WEBPACK_IMPORTED_MODULE_1__.dropRightWhile)(line, x => !x || !('' + x).trim());\n line = line.join(sep).trimRight();\n lines.push(line);\n }\n return lines.join('\\n');\n },\n _data_key(key) {\n key = key.slice(this.dataPrefix.length);\n try {\n var [index, attr] = key.split('-', 1);\n return [Number(index), attr];\n } catch (err) {\n return [null, key];\n }\n },\n //! Update saved settings from this.settings\n settingsSaved(settings = null) {\n if (settings !== null) this.settings = settings;\n if (this.$refs.settings) this.$refs.settings.close();\n this.savedSettings = (0,lodash__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(this.settings);\n },\n /**\n * Load initial data\n */\n loadData({\n items = [],\n settings = null\n }, reset = false) {\n if (reset) {\n this.set.items = [];\n }\n for (var index in items) this.set.push((0,lodash__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(items[index]));\n if (settings) this.settingsSaved(settings);\n this.updateInput();\n }\n },\n watch: {\n initData(val) {\n this.loadData(val);\n }\n },\n mounted() {\n this.initData && this.loadData(this.initData);\n this.page = this.items.length ? Page.List : Page.Text;\n }\n});\n\n//# sourceURL=webpack://aircox-assets/./src/components/ATracklistEditor.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Page: function() { return /* binding */ Page; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\");\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../model */ \"./src/model.js\");\n/* harmony import */ var _AActionButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AActionButton */ \"./src/components/AActionButton.vue\");\n/* harmony import */ var _ARow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ARow */ \"./src/components/ARow.vue\");\n/* harmony import */ var _ARows__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ARows */ \"./src/components/ARows.vue\");\n/* harmony import */ var _AModal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./AModal */ \"./src/components/AModal.vue\");\n\n\n\n\n\n\n\n\n/// Page display\nconst Page = {\n Text: 0,\n List: 1,\n Settings: 2\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n components: {\n AActionButton: _AActionButton__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n ARow: _ARow__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n ARows: _ARows__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n AModal: _AModal__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n },\n props: {\n ///! initial data as: {items: [], fields: {column_name: label, settings: {}}\n initData: Object,\n dataPrefix: String,\n labels: Object,\n settingsUrl: String,\n defaultColumns: {\n type: Array,\n default: () => ['artist', 'title', 'tags', 'album', 'year', 'timestamp']\n }\n },\n data() {\n const settings = {\n tracklist_editor_columns: this.defaultColumns,\n tracklist_editor_sep: ' -- '\n };\n return {\n Page: Page,\n page: Page.Text,\n set: new _model__WEBPACK_IMPORTED_MODULE_2__.Set(_model__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n extraData: {},\n settings,\n savedSettings: (0,lodash__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(settings)\n };\n },\n computed: {\n settingsChanged() {\n var k = Object.keys(this.savedSettings).findIndex(k => !(0,lodash__WEBPACK_IMPORTED_MODULE_1__.isEqual)(this.settings[k], this.savedSettings[k]));\n return k != -1;\n },\n separator: {\n set(value) {\n this.settings.tracklist_editor_sep = value;\n if (this.page == Page.List) this.updateInput();\n },\n get() {\n return this.settings.tracklist_editor_sep;\n }\n },\n columns: {\n set(value) {\n var cols = value.filter(x => x in this.defaultColumns);\n var left = this.defaultColumns.filter(x => !(x in cols));\n value = cols.concat(left);\n this.settings.tracklist_editor_columns = value;\n },\n get() {\n return this.settings.tracklist_editor_columns;\n }\n },\n items() {\n return this.set.items;\n },\n rowsSlots() {\n return Object.keys(this.$slots).filter(x => x.startsWith('row-') || x.startsWith('rows-')).map(x => [x, x.startsWith('rows-') ? x.slice(5) : x]);\n }\n },\n methods: {\n onCellEvent(event) {\n switch (event.name) {\n case 'change':\n this.updateInput();\n break;\n }\n },\n formatMove({\n from,\n to\n }) {\n const value = this.columns[from];\n this.settings.tracklist_editor_columns.splice(from, 1);\n this.settings.tracklist_editor_columns.splice(to, 0, value);\n if (this.page == Page.Text) this.updateList();else this.updateInput();\n },\n columnMove({\n from,\n to\n }) {\n const value = this.columns[from];\n this.columns.splice(from, 1);\n this.columns.splice(to, 0, value);\n this.updateInput();\n },\n listItemMove({\n from,\n to,\n set\n }) {\n set.move(from, to);\n this.updateInput();\n },\n updateList() {\n const items = this.toList(this.$refs.textarea.value);\n this.set.reset(items);\n },\n updateInput() {\n const input = this.toText(this.items);\n this.$refs.textarea.value = input;\n },\n /**\n * From input and separator, return list of items.\n */\n toList(input) {\n var lines = input.split('\\n');\n var items = [];\n for (let line of lines) {\n line = line.trimLeft();\n if (!line) continue;\n var lineBits = line.split(this.separator);\n var item = {};\n for (var col in this.columns) {\n if (col >= lineBits.length) break;\n const attr = this.columns[col];\n item[attr] = lineBits[col].trim();\n }\n item && items.push(item);\n }\n return items;\n },\n /**\n * From items and separator return a string\n */\n toText(items) {\n const sep = ` ${this.separator.trim()} `;\n const lines = [];\n for (let item of items) {\n if (!item) continue;\n var line = [];\n for (var col of this.columns) line.push(item.data[col] || '');\n line = (0,lodash__WEBPACK_IMPORTED_MODULE_1__.dropRightWhile)(line, x => !x || !('' + x).trim());\n line = line.join(sep).trimRight();\n lines.push(line);\n }\n return lines.join('\\n');\n },\n _data_key(key) {\n key = key.slice(this.dataPrefix.length);\n try {\n var [index, attr] = key.split('-', 1);\n return [Number(index), attr];\n } catch (err) {\n return [null, key];\n }\n },\n //! Update saved settings from this.settings\n settingsSaved(settings = null) {\n if (settings !== null) this.settings = settings;\n if (this.$refs.settings) this.$refs.settings.close();\n this.savedSettings = (0,lodash__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(this.settings);\n },\n /**\n * Load initial data\n */\n loadData({\n items = [],\n settings = null\n }, reset = false) {\n if (reset) {\n this.set.items = [];\n }\n for (var index in items) this.set.push((0,lodash__WEBPACK_IMPORTED_MODULE_1__.cloneDeep)(items[index]));\n if (settings) this.settingsSaved(settings);\n this.updateInput();\n }\n },\n watch: {\n initData(val) {\n this.loadData(val);\n }\n },\n mounted() {\n this.initData && this.loadData(this.initData);\n this.page = this.items.length ? Page.List : Page.Text;\n }\n});\n\n//# sourceURL=webpack://aircox-assets/./src/components/ATracklistEditor.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
/***/ }),
@@ -265,7 +275,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
\********************************************************************************************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\nconst _hoisted_1 = {\n class: \"modal-card\"\n};\nconst _hoisted_2 = {\n class: \"modal-card-head\"\n};\nconst _hoisted_3 = {\n class: \"modal-card-title\"\n};\nconst _hoisted_4 = {\n class: \"modal-card-body\"\n};\nconst _hoisted_5 = {\n class: \"modal-card-foot align-right\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"section\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['modal', $data.active && 'is-active' || ''])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: \"modal-background\",\n onClick: _cache[0] || (_cache[0] = (...args) => $options.close && $options.close(...args))\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"header\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"title\", {}, () => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.title), 1 /* TEXT */)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"section\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"default\")]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"footer\", {\n close: $options.close\n })])])], 2 /* CLASS */);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/AModal.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\nconst _hoisted_1 = {\n class: \"modal-card\"\n};\nconst _hoisted_2 = {\n class: \"modal-card-head\"\n};\nconst _hoisted_3 = {\n class: \"modal-card-title\"\n};\nconst _hoisted_4 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: \"fa fa-close\"\n})], -1 /* HOISTED */);\nconst _hoisted_5 = [_hoisted_4];\nconst _hoisted_6 = {\n class: \"modal-card-body\"\n};\nconst _hoisted_7 = {\n class: \"modal-card-foot align-right\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"section\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['modal', $data.active && 'is-active' || ''])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: \"modal-background\",\n onClick: _cache[0] || (_cache[0] = (...args) => $options.close && $options.close(...args))\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"header\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"title\", {}, () => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.title), 1 /* TEXT */)])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"delete square\",\n \"aria-label\": \"close\",\n onClick: _cache[1] || (_cache[1] = (...args) => $options.close && $options.close(...args))\n }, _hoisted_5)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"section\", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"default\", {\n item: $data.item\n })]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"footer\", {\n item: $data.item,\n close: $options.close\n })])])], 2 /* CLASS */);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/AModal.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
/***/ }),
@@ -285,7 +295,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
\*********************************************************************************************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\nconst _hoisted_1 = {\n class: \"a-player\"\n};\nconst _hoisted_2 = {\n class: \"title is-flex-grow-1\"\n};\nconst _hoisted_3 = {\n class: \"icon\"\n};\nconst _hoisted_4 = {\n class: \"action button no-border\"\n};\nconst _hoisted_5 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: \"fa fa-close\"\n}, null, -1 /* HOISTED */);\nconst _hoisted_6 = [_hoisted_5];\nconst _hoisted_7 = {\n key: 0,\n class: \"a-player-progress\"\n};\nconst _hoisted_8 = {\n class: \"a-player-bar button-group\"\n};\nconst _hoisted_9 = [\"title\", \"aria-label\"];\nconst _hoisted_10 = {\n key: 0,\n class: \"fas fa-pause\"\n};\nconst _hoisted_11 = {\n key: 1,\n class: \"fas fa-play\"\n};\nconst _hoisted_12 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"icon is-size-6 has-text-danger\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"fa fa-circle\"\n})], -1 /* HOISTED */);\nconst _hoisted_13 = [_hoisted_12];\nconst _hoisted_14 = [\"onClick\"];\nconst _hoisted_15 = {\n class: \"is-size-6\"\n};\nconst _hoisted_16 = {\n class: \"icon\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_APlaylist = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)(\"APlaylist\");\n const _component_AProgress = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)(\"AProgress\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['a-player-panels', $data.panel ? 'is-open' : ''])\n }, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.playlists, (info, key) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_APlaylist, {\n key: key,\n ref_for: true,\n ref: key,\n class: \"a-player-panel a-playlist\",\n actions: ['page', key != 'pin' && 'pin' || ''],\n editable: true,\n player: $options.self,\n set: $data.sets[key],\n onSelect: $event => $options.togglePlay(key, $event.index),\n listClass: \"menu-list\",\n itemClass: \"menu-item\"\n }, {\n header: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(info[1])\n }, null, 2 /* CLASS */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(\" \" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(info[0]), 1 /* TEXT */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"button\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"icon\",\n onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $options.togglePanel(), [\"stop\"]))\n }, _hoisted_6)])]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"actions\", \"player\", \"set\", \"onSelect\"])), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, $data.panel == key && $data.sets[key].length]]);\n }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), $data.loaded && $data.duration ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_7, [$data.loaded && $data.duration ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_AProgress, {\n key: 0,\n value: $data.currentTime,\n max: this.duration,\n format: $options.displayTime,\n onSelect: _cache[1] || (_cache[1] = $event => $data.audio.currentTime = $event)\n }, null, 8 /* PROPS */, [\"value\", \"max\", \"format\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"button\", {\n class: \"button\",\n onClick: _cache[2] || (_cache[2] = $event => $options.togglePlay()),\n title: $props.buttonTitle,\n \"aria-label\": $props.buttonTitle\n }, [$options.playing ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"span\", _hoisted_10)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"span\", _hoisted_11))], 8 /* PROPS */, _hoisted_9), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"\\n
\"), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['a-player-bar-content', $data.loaded && $data.duration ? 'has-progress' : ''])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"content\", {\n loaded: $data.loaded,\n live: $data.live,\n current: $options.current\n })], 2 /* CLASS */), $data.loaded ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"button\", {\n key: 0,\n class: \"button has-text-weight-bold\",\n onClick: _cache[3] || (_cache[3] = $event => $options.play()),\n title: \"Live\"\n }, _hoisted_13)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), $data.sets ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n key: 1\n }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.playlists, (info, key) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"button\", {\n key: key,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($options.playlistButtonClass(key)),\n onClick: $event => $options.togglePanel(key)\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", _hoisted_15, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.sets[key] && $data.sets[key].length), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", _hoisted_16, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(info[1])\n }, null, 2 /* CLASS */)])], 10 /* CLASS, PROPS */, _hoisted_14)), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, $data.sets[key] && $data.sets[key].length]]);\n }), 128 /* KEYED_FRAGMENT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)])]);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/APlayer.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\nconst _hoisted_1 = {\n class: \"a-player\"\n};\nconst _hoisted_2 = {\n class: \"title is-flex-grow-1\"\n};\nconst _hoisted_3 = {\n class: \"icon\"\n};\nconst _hoisted_4 = {\n class: \"action button no-border\"\n};\nconst _hoisted_5 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: \"fa fa-close\"\n}, null, -1 /* HOISTED */);\nconst _hoisted_6 = [_hoisted_5];\nconst _hoisted_7 = {\n key: 0,\n class: \"a-player-progress\"\n};\nconst _hoisted_8 = {\n class: \"a-player-bar button-group\"\n};\nconst _hoisted_9 = [\"title\", \"aria-label\"];\nconst _hoisted_10 = {\n key: 0,\n class: \"fas fa-pause\"\n};\nconst _hoisted_11 = {\n key: 1,\n class: \"fas fa-play\"\n};\nconst _hoisted_12 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"icon is-size-6 has-text-danger\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"fa fa-circle\"\n})], -1 /* HOISTED */);\nconst _hoisted_13 = [_hoisted_12];\nconst _hoisted_14 = [\"onClick\"];\nconst _hoisted_15 = {\n class: \"is-size-6\"\n};\nconst _hoisted_16 = {\n class: \"icon\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_APlaylist = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)(\"APlaylist\");\n const _component_AProgress = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)(\"AProgress\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['a-player-panels', $data.panel ? 'is-open' : ''])\n }, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.playlists, (info, key) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_APlaylist, {\n key: key,\n ref_for: true,\n ref: key,\n class: \"a-player-panel a-playlist\",\n actions: ['page', key != 'pin' && 'pin' || ''],\n editable: true,\n player: $options.self,\n set: $data.sets[key],\n onSelect: $event => $options.togglePlay(key, $event.index),\n listClass: \"menu-list\",\n itemClass: \"menu-item\"\n }, {\n header: (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(info[1])\n }, null, 2 /* CLASS */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)(\" \" + (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(info[0]), 1 /* TEXT */)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"button\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"icon\",\n onClick: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)($event => $options.togglePanel(), [\"stop\"]))\n }, _hoisted_6)])]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"actions\", \"player\", \"set\", \"onSelect\"])), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, $data.panel == key && $data.sets[key].length]]);\n }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */), $data.loaded && $data.duration ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_7, [$data.loaded && $data.duration ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)(_component_AProgress, {\n key: 0,\n value: $data.currentTime,\n max: this.duration,\n format: $options.displayTime,\n onSelect: _cache[1] || (_cache[1] = $event => $data.audio.currentTime = $event)\n }, null, 8 /* PROPS */, [\"value\", \"max\", \"format\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"button\", {\n class: \"button\",\n onClick: _cache[2] || (_cache[2] = $event => $options.togglePlay()),\n title: $props.buttonTitle,\n \"aria-label\": $props.buttonTitle\n }, [$options.playing ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"span\", _hoisted_10)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"span\", _hoisted_11))], 8 /* PROPS */, _hoisted_9), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['a-player-bar-content', $data.loaded && $data.duration ? 'has-progress' : ''])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"content\", {\n loaded: $data.loaded,\n live: $data.live,\n current: $options.current\n })], 2 /* CLASS */), $data.loaded ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"button\", {\n key: 0,\n class: \"button has-text-weight-bold\",\n onClick: _cache[3] || (_cache[3] = $event => $options.play()),\n title: \"Live\"\n }, _hoisted_13)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), $data.sets ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, {\n key: 1\n }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.playlists, (info, key) => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"button\", {\n key: key,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)($options.playlistButtonClass(key)),\n onClick: $event => $options.togglePanel(key)\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", _hoisted_15, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($data.sets[key] && $data.sets[key].length), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", _hoisted_16, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(info[1])\n }, null, 2 /* CLASS */)])], 10 /* CLASS, PROPS */, _hoisted_14)), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, $data.sets[key] && $data.sets[key].length]]);\n }), 128 /* KEYED_FRAGMENT */)) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)])]);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/APlayer.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
/***/ }),
@@ -299,6 +309,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ }),
+/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/APlaylistEditor.vue?vue&type=template&id=6e4f72a0":
+/*!*****************************************************************************************************************************************************************************************************************************************************************************!*\
+ !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/APlaylistEditor.vue?vue&type=template&id=6e4f72a0 ***!
+ \*****************************************************************************************************************************************************************************************************************************************************************************/
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\n\nconst _hoisted_1 = {\n class: \"a-playlist-editor\"\n};\nconst _hoisted_2 = {\n class: \"flex-row\"\n};\nconst _hoisted_3 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", {\n class: \"flex-grow-1 flex-row\"\n}, null, -1 /* HOISTED */);\nconst _hoisted_4 = {\n class: \"flex-grow-1 align-right\"\n};\nconst _hoisted_5 = [\"title\", \"aria-label\"];\nconst _hoisted_6 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-rotate\"\n})], -1 /* HOISTED */);\nconst _hoisted_7 = [_hoisted_6];\nconst _hoisted_8 = [\"title\", \"aria-label\"];\nconst _hoisted_9 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-plus\"\n})], -1 /* HOISTED */);\nconst _hoisted_10 = [_hoisted_9];\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_a_rows = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-rows\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementBlock)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_a_rows, {\n set: $data.set,\n columns: $props.columns,\n labels: $props.initData.fields,\n \"allow-create\": true,\n orderable: true,\n onMove: $options.listItemMove\n }, (0,vue__WEBPACK_IMPORTED_MODULE_1__.createSlots)({\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.renderList)($options.rowsSlots, ([name, slot]) => {\n return {\n name: slot,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(data => [name != 'row-tail' ? (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, name, (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_1__.mergeProps)({\n key: 0\n }, data))) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"set\", \"columns\", \"labels\", \"onMove\"]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_2, [_hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button square is-warning p-2\",\n onClick: _cache[0] || (_cache[0] = $event => $options.loadData({\n items: this.initData.items\n }, true)),\n title: $props.labels.discard_changes,\n \"aria-label\": $props.labels.discard_changes\n }, _hoisted_7, 8 /* PROPS */, _hoisted_5), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button square is-primary p-2\",\n onClick: _cache[1] || (_cache[1] = $event => this.set.push(new this.set.model())),\n title: $props.labels.add_sound,\n \"aria-label\": $props.labels.add_sound\n }, _hoisted_10, 8 /* PROPS */, _hoisted_8)])])]);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/APlaylistEditor.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
+
+/***/ }),
+
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AProgress.vue?vue&type=template&id=6871a6ae":
/*!***********************************************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AProgress.vue?vue&type=template&id=6871a6ae ***!
@@ -335,7 +355,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
\*************************************************************************************************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\nconst _hoisted_1 = {\n class: \"a-select-file\"\n};\nconst _hoisted_2 = {\n key: 0,\n ref: \"uploadForm\",\n class: \"flex-column\"\n};\nconst _hoisted_3 = {\n key: 0,\n class: \"field flex-grow-1\"\n};\nconst _hoisted_4 = {\n class: \"label\"\n};\nconst _hoisted_5 = [\"name\"];\nconst _hoisted_6 = {\n class: \"flex-grow-1\"\n};\nconst _hoisted_7 = {\n key: 1,\n class: \"flex-column\"\n};\nconst _hoisted_8 = {\n class: \"flex-row\"\n};\nconst _hoisted_9 = [\"max\", \"value\"];\nconst _hoisted_10 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"icon small\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: \"fa fa-close\"\n})], -1 /* HOISTED */);\nconst _hoisted_11 = [_hoisted_10];\nconst _hoisted_12 = {\n key: 2\n};\nconst _hoisted_13 = [\"onClick\"];\nconst _hoisted_14 = {\n key: 3\n};\nconst _hoisted_15 = {\n class: \"a-select-footer\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n ref: \"list\",\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['a-select-file-list', $props.listClass])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" upload \"), $data.state == $data.STATE.DEFAULT ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"form\", _hoisted_2, [!_ctx.uploadFile ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"label\", _hoisted_4, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.uploadLabel), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"input\", {\n type: \"file\",\n ref: \"uploadFile\",\n name: $props.uploadFieldName,\n onChange: _cache[0] || (_cache[0] = (...args) => $options.onSubmit && $options.onSubmit(...args))\n }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"upload-form\")])], 512 /* NEED_PATCH */)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"upload-preview\", {\n upload: $data.upload\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"progress\", {\n max: $data.upload.total,\n value: $data.upload.loaded\n }, null, 8 /* PROPS */, _hoisted_9), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button small square ml-2\",\n onClick: _cache[1] || (_cache[1] = (...args) => $options.uploadAbort && $options.uploadAbort(...args))\n }, _hoisted_11)])])), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" tiles \"), $data.prevUrl ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"a\", {\n href: \"#\",\n onClick: _cache[2] || (_cache[2] = $event => $options.load($data.prevUrl))\n }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.prevLabel), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($data.items, item => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", {\n key: item.id,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['file-preview', this.item && item.id == this.item.id && 'active']),\n onClick: $event => $options.select(item)\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"default\", {\n item: item,\n load: $options.load,\n lastUrl: $data.lastUrl\n })], 10 /* CLASS, PROPS */, _hoisted_13);\n }), 128 /* KEYED_FRAGMENT */)), $data.nextUrl ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"a\", {\n href: \"#\",\n onClick: _cache[3] || (_cache[3] = $event => $options.load($data.nextUrl))\n }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.nextLabel), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)], 2 /* CLASS */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"footer\", {\n item: $data.item,\n items: $data.items\n })])]);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/ASelectFile.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\nconst _hoisted_1 = {\n class: \"a-select-file\"\n};\nconst _hoisted_2 = {\n key: 0,\n ref: \"uploadForm\",\n class: \"flex-column\"\n};\nconst _hoisted_3 = {\n class: \"field flex-grow-1\"\n};\nconst _hoisted_4 = {\n class: \"label\"\n};\nconst _hoisted_5 = [\"name\"];\nconst _hoisted_6 = {\n class: \"flex-grow-1\"\n};\nconst _hoisted_7 = {\n key: 1,\n class: \"flex-column\"\n};\nconst _hoisted_8 = {\n class: \"flex-row\"\n};\nconst _hoisted_9 = [\"max\", \"value\"];\nconst _hoisted_10 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"span\", {\n class: \"icon small\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"i\", {\n class: \"fa fa-close\"\n})], -1 /* HOISTED */);\nconst _hoisted_11 = [_hoisted_10];\nconst _hoisted_12 = {\n key: 2\n};\nconst _hoisted_13 = [\"onClick\"];\nconst _hoisted_14 = {\n key: 3\n};\nconst _hoisted_15 = {\n class: \"a-select-footer\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", {\n ref: \"list\",\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['a-select-file-list', $props.listClass])\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" upload \"), $data.state == $data.STATE.DEFAULT ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"form\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"label\", _hoisted_4, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.uploadLabel), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"input\", {\n type: \"file\",\n ref: \"uploadFile\",\n name: $props.uploadFieldName,\n onChange: _cache[0] || (_cache[0] = (...args) => $options.onSubmit && $options.onSubmit(...args))\n }, null, 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_5)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"upload-form\")])], 512 /* NEED_PATCH */)) : ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"upload-preview\", {\n upload: $data.upload\n }), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"progress\", {\n max: $data.upload.total,\n value: $data.upload.loaded\n }, null, 8 /* PROPS */, _hoisted_9), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button small square ml-2\",\n onClick: _cache[1] || (_cache[1] = (...args) => $options.uploadAbort && $options.uploadAbort(...args))\n }, _hoisted_11)])])), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\" tiles \"), $data.prevUrl ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"a\", {\n href: \"#\",\n onClick: _cache[2] || (_cache[2] = $event => $options.load($data.prevUrl))\n }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.prevLabel), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true), ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($data.items, item => {\n return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", {\n key: item.id,\n class: (0,vue__WEBPACK_IMPORTED_MODULE_0__.normalizeClass)(['file-preview', this.item && item.id == this.item.id && 'active']),\n onClick: $event => $options.select(item)\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"default\", {\n item: item,\n load: $options.load,\n lastUrl: $data.lastUrl\n })], 10 /* CLASS, PROPS */, _hoisted_13);\n }), 128 /* KEYED_FRAGMENT */)), $data.nextUrl ? ((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(\"div\", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"a\", {\n href: \"#\",\n onClick: _cache[3] || (_cache[3] = $event => $options.load($data.nextUrl))\n }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)($props.nextLabel), 1 /* TEXT */)])) : (0,vue__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode)(\"v-if\", true)], 2 /* CLASS */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)(\"div\", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.renderSlot)(_ctx.$slots, \"footer\", {\n item: $data.item,\n items: $data.items\n })])]);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/ASelectFile.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
/***/ }),
@@ -385,7 +405,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
\******************************************************************************************************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\n\nconst _hoisted_1 = {\n class: \"a-tracklist-editor\"\n};\nconst _hoisted_2 = {\n class: \"flex-row\"\n};\nconst _hoisted_3 = {\n class: \"flex-grow-1\"\n};\nconst _hoisted_4 = {\n class: \"flex-row align-right\"\n};\nconst _hoisted_5 = {\n class: \"field has-addons\"\n};\nconst _hoisted_6 = {\n class: \"control\"\n};\nconst _hoisted_7 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon is-small\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-pencil\"\n})], -1 /* HOISTED */);\nconst _hoisted_8 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", null, \"Texte\", -1 /* HOISTED */);\nconst _hoisted_9 = [_hoisted_7, _hoisted_8];\nconst _hoisted_10 = {\n class: \"control\"\n};\nconst _hoisted_11 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon is-small\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-list\"\n})], -1 /* HOISTED */);\nconst _hoisted_12 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", null, \"Liste\", -1 /* HOISTED */);\nconst _hoisted_13 = [_hoisted_11, _hoisted_12];\nconst _hoisted_14 = {\n class: \"panel\"\n};\nconst _hoisted_15 = {\n class: \"panel\"\n};\nconst _hoisted_16 = {\n class: \"align-right pr-0\"\n};\nconst _hoisted_17 = [\"onClick\", \"title\", \"aria-label\"];\nconst _hoisted_18 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-trash\"\n})], -1 /* HOISTED */);\nconst _hoisted_19 = [_hoisted_18];\nconst _hoisted_20 = {\n class: \"flex-row\"\n};\nconst _hoisted_21 = {\n class: \"flex-grow-1 flex-row\"\n};\nconst _hoisted_22 = {\n class: \"field\"\n};\nconst _hoisted_23 = {\n class: \"control\"\n};\nconst _hoisted_24 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon is-small\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-cog\"\n})], -1 /* HOISTED */);\nconst _hoisted_25 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", null, \"Options\", -1 /* HOISTED */);\nconst _hoisted_26 = [_hoisted_24, _hoisted_25];\nconst _hoisted_27 = {\n class: \"flex-grow-1 align-right\"\n};\nconst _hoisted_28 = [\"title\", \"aria-label\"];\nconst _hoisted_29 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-rotate\"\n})], -1 /* HOISTED */);\nconst _hoisted_30 = [_hoisted_29];\nconst _hoisted_31 = [\"title\", \"aria-label\"];\nconst _hoisted_32 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-plus\"\n})], -1 /* HOISTED */);\nconst _hoisted_33 = [_hoisted_32];\nconst _hoisted_34 = {\n class: \"field\"\n};\nconst _hoisted_35 = {\n class: \"label\",\n style: {\n \"vertical-align\": \"middle\"\n }\n};\nconst _hoisted_36 = {\n class: \"table is-bordered\",\n style: {\n \"vertical-align\": \"middle\"\n }\n};\nconst _hoisted_37 = {\n key: 0,\n style: {\n \"cursor\": \"pointer\"\n }\n};\nconst _hoisted_38 = [\"onClick\"];\nconst _hoisted_39 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-left-right\"\n}, null, -1 /* HOISTED */);\nconst _hoisted_40 = [_hoisted_39];\nconst _hoisted_41 = {\n class: \"flex-row\"\n};\nconst _hoisted_42 = {\n class: \"field is-inline-block is-vcentered flex-grow-1\"\n};\nconst _hoisted_43 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"label\", {\n class: \"label is-inline mr-2\",\n style: {\n \"vertical-align\": \"middle\"\n }\n}, \" Séparateur\", -1 /* HOISTED */);\nconst _hoisted_44 = {\n class: \"control is-inline-block\",\n style: {\n \"vertical-align\": \"middle\"\n }\n};\nconst _hoisted_45 = {\n class: \"flex-row align-right\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_a_rows = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-rows\");\n const _component_a_row = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-row\");\n const _component_a_action_button = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-action-button\");\n const _component_a_modal = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-modal\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementBlock)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, \"title\")]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"p\", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)(['button', 'p-2', $data.page == $data.Page.Text ? 'is-primary' : 'is-light']),\n onClick: _cache[0] || (_cache[0] = $event => $data.page = $data.Page.Text)\n }, _hoisted_9, 2 /* CLASS */)]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"p\", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)(['button', 'p-2', $data.page == $data.Page.List ? 'is-primary' : 'is-light']),\n onClick: _cache[1] || (_cache[1] = $event => $data.page = $data.Page.List)\n }, _hoisted_13, 2 /* CLASS */)])])])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, \"top\", {\n set: $data.set,\n columns: $options.columns,\n items: $options.items\n }), (0,vue__WEBPACK_IMPORTED_MODULE_1__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"section\", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"textarea\", {\n ref: \"textarea\",\n class: \"is-fullwidth is-size-6\",\n rows: \"20\",\n onChange: _cache[2] || (_cache[2] = (...args) => $options.updateList && $options.updateList(...args))\n }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)], 512 /* NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_1__.vShow, $data.page == $data.Page.Text]]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"section\", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_a_rows, {\n set: $data.set,\n columns: $options.columns,\n labels: $props.labels,\n \"allow-create\": true,\n orderable: true,\n onMove: $options.listItemMove,\n onColmove: $options.columnMove,\n onCell: $options.onCellEvent\n }, (0,vue__WEBPACK_IMPORTED_MODULE_1__.createSlots)({\n \"row-tail\": (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(data => [_ctx.$slots['row-tail'] ? (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, _ctx.row - _ctx.tail, (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_1__.mergeProps)({\n key: 0\n }, data))) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"td\", _hoisted_16, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button square\",\n onClick: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withModifiers)($event => $options.items.splice(data.row, 1), [\"stop\"]),\n title: $props.labels.remove_track,\n \"aria-label\": $props.labels.remove_track\n }, _hoisted_19, 8 /* PROPS */, _hoisted_17)])]),\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.renderList)($options.rowsSlots, ([name, slot]) => {\n return {\n name: slot,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(data => [name != 'row-tail' ? (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, name, (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_1__.mergeProps)({\n key: 0\n }, data))) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"set\", \"columns\", \"labels\", \"onMove\", \"onColmove\", \"onCell\"])], 512 /* NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_1__.vShow, $data.page == $data.Page.List]]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_20, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_21, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"p\", _hoisted_23, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button is-info\",\n onClick: _cache[3] || (_cache[3] = $event => _ctx.$refs.settings.open())\n }, _hoisted_26)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_27, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button square is-warning p-2\",\n onClick: _cache[4] || (_cache[4] = $event => $options.loadData({\n items: this.initData.items\n }, true)),\n title: $props.labels.discard_changes,\n \"aria-label\": $props.labels.discard_changes\n }, _hoisted_30, 8 /* PROPS */, _hoisted_28), $data.page == $data.Page.List ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementBlock)(\"button\", {\n key: 0,\n type: \"button\",\n class: \"button square is-primary p-2\",\n onClick: _cache[5] || (_cache[5] = $event => this.set.push(new this.set.model())),\n title: $props.labels.add_track,\n \"aria-label\": $props.labels.add_track\n }, _hoisted_33, 8 /* PROPS */, _hoisted_31)) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true)])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_a_modal, {\n ref: \"settings\",\n title: \"Options\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_34, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"label\", _hoisted_35, (0,vue__WEBPACK_IMPORTED_MODULE_1__.toDisplayString)($props.labels.columns), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"table\", _hoisted_36, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"tr\", null, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_a_row, {\n columns: $options.columns,\n item: $props.labels,\n onMove: $options.formatMove,\n orderable: true\n }, {\n \"cell-after\": (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(({\n cell\n }) => [cell.col < $options.columns.length - 1 ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementBlock)(\"td\", _hoisted_37, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\",\n onClick: $event => $options.formatMove({\n from: cell.col,\n to: cell.col + 1\n })\n }, _hoisted_40, 8 /* PROPS */, _hoisted_38)])) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true)]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"columns\", \"item\", \"onMove\"])])])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_41, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_42, [_hoisted_43, (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_44, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"input\", {\n type: \"text\",\n ref: \"sep\",\n class: \"input is-inline is-text-centered is-small\",\n style: {\n \"max-width\": \"5em\"\n },\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = $event => $options.separator = $event),\n onChange: _cache[7] || (_cache[7] = $event => $options.updateList())\n }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_1__.vModelText, $options.separator]])])])])]),\n footer: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_45, [$options.settingsChanged ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createBlock)(_component_a_action_button, {\n key: 0,\n icon: \"fa fa-floppy-disk\",\n class: \"button control p-2 mr-3 is-secondary\",\n \"run-class\": \"blink\",\n url: $props.settingsUrl,\n method: \"POST\",\n data: $data.settings,\n \"aria-label\": $props.labels.save_settings,\n onDone: _cache[8] || (_cache[8] = $event => $options.settingsSaved())\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_1__.toDisplayString)($props.labels.save_settings), 1 /* TEXT */)]),\n\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"url\", \"data\", \"aria-label\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n class: \"button\",\n type: \"button\",\n onClick: _cache[9] || (_cache[9] = $event => _ctx.$refs.settings.close())\n }, \" Fermer \")])]),\n _: 1 /* STABLE */\n }, 512 /* NEED_PATCH */), (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, \"bottom\", {\n set: $data.set,\n columns: $options.columns,\n items: $options.items\n })]);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/ATracklistEditor.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* binding */ render; }\n/* harmony export */ });\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm-bundler.js\");\n\n\nconst _hoisted_1 = {\n class: \"a-tracklist-editor\"\n};\nconst _hoisted_2 = {\n class: \"flex-row\"\n};\nconst _hoisted_3 = {\n class: \"flex-grow-1\"\n};\nconst _hoisted_4 = {\n class: \"flex-row align-right\"\n};\nconst _hoisted_5 = {\n class: \"field has-addons\"\n};\nconst _hoisted_6 = {\n class: \"control\"\n};\nconst _hoisted_7 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon is-small\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-pencil\"\n})], -1 /* HOISTED */);\nconst _hoisted_8 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", null, \"Texte\", -1 /* HOISTED */);\nconst _hoisted_9 = [_hoisted_7, _hoisted_8];\nconst _hoisted_10 = {\n class: \"control\"\n};\nconst _hoisted_11 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon is-small\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-list\"\n})], -1 /* HOISTED */);\nconst _hoisted_12 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", null, \"Liste\", -1 /* HOISTED */);\nconst _hoisted_13 = [_hoisted_11, _hoisted_12];\nconst _hoisted_14 = {\n class: \"panel\"\n};\nconst _hoisted_15 = {\n class: \"panel\"\n};\nconst _hoisted_16 = {\n class: \"align-right pr-0\"\n};\nconst _hoisted_17 = [\"onClick\", \"title\", \"aria-label\"];\nconst _hoisted_18 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-trash\"\n})], -1 /* HOISTED */);\nconst _hoisted_19 = [_hoisted_18];\nconst _hoisted_20 = {\n class: \"flex-row\"\n};\nconst _hoisted_21 = {\n class: \"flex-grow-1 flex-row\"\n};\nconst _hoisted_22 = {\n class: \"field\"\n};\nconst _hoisted_23 = {\n class: \"control\"\n};\nconst _hoisted_24 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon is-small\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-cog\"\n})], -1 /* HOISTED */);\nconst _hoisted_25 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", null, \"Options\", -1 /* HOISTED */);\nconst _hoisted_26 = [_hoisted_24, _hoisted_25];\nconst _hoisted_27 = {\n class: \"flex-grow-1 align-right\"\n};\nconst _hoisted_28 = [\"title\", \"aria-label\"];\nconst _hoisted_29 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-rotate\"\n})], -1 /* HOISTED */);\nconst _hoisted_30 = [_hoisted_29];\nconst _hoisted_31 = [\"title\", \"aria-label\"];\nconst _hoisted_32 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\"\n}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-plus\"\n})], -1 /* HOISTED */);\nconst _hoisted_33 = [_hoisted_32];\nconst _hoisted_34 = {\n class: \"field\"\n};\nconst _hoisted_35 = {\n class: \"label\",\n style: {\n \"vertical-align\": \"middle\"\n }\n};\nconst _hoisted_36 = {\n class: \"table is-bordered\",\n style: {\n \"vertical-align\": \"middle\"\n }\n};\nconst _hoisted_37 = {\n key: 0,\n style: {\n \"cursor\": \"pointer\"\n }\n};\nconst _hoisted_38 = [\"onClick\"];\nconst _hoisted_39 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"i\", {\n class: \"fa fa-left-right\"\n}, null, -1 /* HOISTED */);\nconst _hoisted_40 = [_hoisted_39];\nconst _hoisted_41 = {\n class: \"flex-row\"\n};\nconst _hoisted_42 = {\n class: \"field is-inline-block is-vcentered flex-grow-1\"\n};\nconst _hoisted_43 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"label\", {\n class: \"label is-inline mr-2\",\n style: {\n \"vertical-align\": \"middle\"\n }\n}, \" Séparateur\", -1 /* HOISTED */);\nconst _hoisted_44 = {\n class: \"control is-inline-block\",\n style: {\n \"vertical-align\": \"middle\"\n }\n};\nconst _hoisted_45 = {\n class: \"flex-row align-right\"\n};\nfunction render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_a_rows = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-rows\");\n const _component_a_row = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-row\");\n const _component_a_action_button = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-action-button\");\n const _component_a_modal = (0,vue__WEBPACK_IMPORTED_MODULE_1__.resolveComponent)(\"a-modal\");\n return (0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementBlock)(\"div\", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, \"title\")]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_5, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"p\", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)(['button', 'p-2', $data.page == $data.Page.Text ? 'is-primary' : 'is-light']),\n onClick: _cache[0] || (_cache[0] = $event => $data.page = $data.Page.Text)\n }, _hoisted_9, 2 /* CLASS */)]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"p\", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)(['button', 'p-2', $data.page == $data.Page.List ? 'is-primary' : 'is-light']),\n onClick: _cache[1] || (_cache[1] = $event => $data.page = $data.Page.List)\n }, _hoisted_13, 2 /* CLASS */)])])])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, \"top\", {\n set: $data.set,\n columns: $options.columns,\n items: $options.items\n }), (0,vue__WEBPACK_IMPORTED_MODULE_1__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"section\", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"textarea\", {\n ref: \"textarea\",\n class: \"is-fullwidth is-size-6\",\n rows: \"20\",\n onChange: _cache[2] || (_cache[2] = (...args) => $options.updateList && $options.updateList(...args))\n }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */)], 512 /* NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_1__.vShow, $data.page == $data.Page.Text]]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"section\", _hoisted_15, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_a_rows, {\n set: $data.set,\n columns: $options.columns,\n labels: $props.initData.fields,\n \"allow-create\": true,\n orderable: true,\n onMove: $options.listItemMove,\n onColmove: $options.columnMove,\n onCell: $options.onCellEvent\n }, (0,vue__WEBPACK_IMPORTED_MODULE_1__.createSlots)({\n \"row-tail\": (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(data => [_ctx.$slots['row-tail'] ? (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, _ctx.row - _ctx.tail, (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_1__.mergeProps)({\n key: 0\n }, data))) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"td\", _hoisted_16, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button square\",\n onClick: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withModifiers)($event => $options.items.splice(data.row, 1), [\"stop\"]),\n title: $props.labels.remove_item,\n \"aria-label\": $props.labels.remove_item\n }, _hoisted_19, 8 /* PROPS */, _hoisted_17)])]),\n _: 2 /* DYNAMIC */\n }, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.renderList)($options.rowsSlots, ([name, slot]) => {\n return {\n name: slot,\n fn: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(data => [name != 'row-tail' ? (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, name, (0,vue__WEBPACK_IMPORTED_MODULE_1__.normalizeProps)((0,vue__WEBPACK_IMPORTED_MODULE_1__.mergeProps)({\n key: 0\n }, data))) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true)])\n };\n })]), 1032 /* PROPS, DYNAMIC_SLOTS */, [\"set\", \"columns\", \"labels\", \"onMove\", \"onColmove\", \"onCell\"])], 512 /* NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_1__.vShow, $data.page == $data.Page.List]]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_20, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_21, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_22, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"p\", _hoisted_23, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button is-info\",\n onClick: _cache[3] || (_cache[3] = $event => _ctx.$refs.settings.open())\n }, _hoisted_26)])])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_27, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n type: \"button\",\n class: \"button square is-warning p-2\",\n onClick: _cache[4] || (_cache[4] = $event => $options.loadData({\n items: this.initData.items\n }, true)),\n title: $props.labels.discard_changes,\n \"aria-label\": $props.labels.discard_changes\n }, _hoisted_30, 8 /* PROPS */, _hoisted_28), $data.page == $data.Page.List ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementBlock)(\"button\", {\n key: 0,\n type: \"button\",\n class: \"button square is-primary p-2\",\n onClick: _cache[5] || (_cache[5] = $event => this.set.push(new this.set.model())),\n title: $props.labels.add_item,\n \"aria-label\": $props.labels.add_item\n }, _hoisted_33, 8 /* PROPS */, _hoisted_31)) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true)])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_a_modal, {\n ref: \"settings\",\n title: \"Options\"\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_34, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"label\", _hoisted_35, (0,vue__WEBPACK_IMPORTED_MODULE_1__.toDisplayString)($props.labels.columns), 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"table\", _hoisted_36, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"tr\", null, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createVNode)(_component_a_row, {\n columns: $options.columns,\n item: $props.initData.fields,\n onMove: $options.formatMove,\n orderable: true\n }, {\n \"cell-after\": (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(({\n cell\n }) => [cell.col < $options.columns.length - 1 ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementBlock)(\"td\", _hoisted_37, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"span\", {\n class: \"icon\",\n onClick: $event => $options.formatMove({\n from: cell.col,\n to: cell.col + 1\n })\n }, _hoisted_40, 8 /* PROPS */, _hoisted_38)])) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true)]),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"columns\", \"item\", \"onMove\"])])])]), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_41, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_42, [_hoisted_43, (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_44, [(0,vue__WEBPACK_IMPORTED_MODULE_1__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"input\", {\n type: \"text\",\n ref: \"sep\",\n class: \"input is-inline is-text-centered is-small\",\n style: {\n \"max-width\": \"5em\"\n },\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = $event => $options.separator = $event),\n onChange: _cache[7] || (_cache[7] = $event => $options.updateList())\n }, null, 544 /* HYDRATE_EVENTS, NEED_PATCH */), [[vue__WEBPACK_IMPORTED_MODULE_1__.vModelText, $options.separator]])])])])]),\n footer: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"div\", _hoisted_45, [$options.settingsChanged ? ((0,vue__WEBPACK_IMPORTED_MODULE_1__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createBlock)(_component_a_action_button, {\n key: 0,\n icon: \"fa fa-floppy-disk\",\n class: \"button control p-2 mr-3 is-secondary\",\n \"run-class\": \"blink\",\n url: $props.settingsUrl,\n method: \"POST\",\n data: $data.settings,\n \"aria-label\": $props.labels.save_settings,\n onDone: _cache[8] || (_cache[8] = $event => $options.settingsSaved())\n }, {\n default: (0,vue__WEBPACK_IMPORTED_MODULE_1__.withCtx)(() => [(0,vue__WEBPACK_IMPORTED_MODULE_1__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_1__.toDisplayString)($props.labels.save_settings), 1 /* TEXT */)]),\n\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"url\", \"data\", \"aria-label\"])) : (0,vue__WEBPACK_IMPORTED_MODULE_1__.createCommentVNode)(\"v-if\", true), (0,vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode)(\"button\", {\n class: \"button\",\n type: \"button\",\n onClick: _cache[9] || (_cache[9] = $event => _ctx.$refs.settings.close())\n }, \" Fermer \")])]),\n _: 1 /* STABLE */\n }, 512 /* NEED_PATCH */), (0,vue__WEBPACK_IMPORTED_MODULE_1__.renderSlot)(_ctx.$slots, \"bottom\", {\n set: $data.set,\n columns: $options.columns,\n items: $options.items\n })]);\n}\n\n//# sourceURL=webpack://aircox-assets/./src/components/ATracklistEditor.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use%5B0%5D!./node_modules/vue-loader/dist/templateLoader.js??ruleSet%5B1%5D.rules%5B3%5D!./node_modules/vue-loader/dist/index.js??ruleSet%5B0%5D.use%5B0%5D");
/***/ }),
@@ -405,7 +425,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
\*********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ admin: function() { return /* binding */ admin; },\n/* harmony export */ base: function() { return /* binding */ base; },\n/* harmony export */ dashboard: function() { return /* binding */ dashboard; }\n/* harmony export */ });\n/* harmony import */ var _AActionButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AActionButton */ \"./src/components/AActionButton.vue\");\n/* harmony import */ var _AAutocomplete__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AAutocomplete */ \"./src/components/AAutocomplete.vue\");\n/* harmony import */ var _ACarousel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ACarousel */ \"./src/components/ACarousel.vue\");\n/* harmony import */ var _ADropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ADropdown */ \"./src/components/ADropdown.vue\");\n/* harmony import */ var _AEpisode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AEpisode */ \"./src/components/AEpisode.vue\");\n/* harmony import */ var _AList__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./AList */ \"./src/components/AList.vue\");\n/* harmony import */ var _APage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./APage */ \"./src/components/APage.vue\");\n/* harmony import */ var _APlayer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./APlayer */ \"./src/components/APlayer.vue\");\n/* harmony import */ var _APlaylist__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./APlaylist */ \"./src/components/APlaylist.vue\");\n/* harmony import */ var _ATracklistEditor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ATracklistEditor */ \"./src/components/ATracklistEditor.vue\");\n/* harmony import */ var _AProgress__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./AProgress */ \"./src/components/AProgress.vue\");\n/* harmony import */ var _ASoundItem__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ASoundItem */ \"./src/components/ASoundItem.vue\");\n/* harmony import */ var _ASwitch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ASwitch */ \"./src/components/ASwitch.vue\");\n/* harmony import */ var _AStatistics__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./AStatistics */ \"./src/components/AStatistics.vue\");\n/* harmony import */ var _AStreamer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./AStreamer */ \"./src/components/AStreamer.vue\");\n/* harmony import */ var _AModal__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./AModal */ \"./src/components/AModal.vue\");\n/* harmony import */ var _ASelectFile__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ASelectFile */ \"./src/components/ASelectFile.vue\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Core components\n */\nconst base = {\n AAutocomplete: _AAutocomplete__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n ACarousel: _ACarousel__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n ADropdown: _ADropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n AEpisode: _AEpisode__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n AList: _AList__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n APage: _APage__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n APlayer: _APlayer__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n APlaylist: _APlaylist__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n AProgress: _AProgress__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n ASoundItem: _ASoundItem__WEBPACK_IMPORTED_MODULE_11__[\"default\"],\n ASwitch: _ASwitch__WEBPACK_IMPORTED_MODULE_12__[\"default\"]\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (base);\nconst admin = {\n ...base,\n AStatistics: _AStatistics__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n AStreamer: _AStreamer__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n ATracklistEditor: _ATracklistEditor__WEBPACK_IMPORTED_MODULE_9__[\"default\"]\n};\nconst dashboard = {\n ...base,\n AActionButton: _AActionButton__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n ASelectFile: _ASelectFile__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n AModal: _AModal__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n ATracklistEditor: _ATracklistEditor__WEBPACK_IMPORTED_MODULE_9__[\"default\"]\n};\n\n//# sourceURL=webpack://aircox-assets/./src/components/index.js?");
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ admin: function() { return /* binding */ admin; },\n/* harmony export */ base: function() { return /* binding */ base; },\n/* harmony export */ dashboard: function() { return /* binding */ dashboard; }\n/* harmony export */ });\n/* harmony import */ var _AActionButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AActionButton */ \"./src/components/AActionButton.vue\");\n/* harmony import */ var _AAutocomplete__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AAutocomplete */ \"./src/components/AAutocomplete.vue\");\n/* harmony import */ var _ACarousel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ACarousel */ \"./src/components/ACarousel.vue\");\n/* harmony import */ var _ADropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ADropdown */ \"./src/components/ADropdown.vue\");\n/* harmony import */ var _AEpisode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AEpisode */ \"./src/components/AEpisode.vue\");\n/* harmony import */ var _AList__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./AList */ \"./src/components/AList.vue\");\n/* harmony import */ var _APage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./APage */ \"./src/components/APage.vue\");\n/* harmony import */ var _APlayer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./APlayer */ \"./src/components/APlayer.vue\");\n/* harmony import */ var _APlaylist__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./APlaylist */ \"./src/components/APlaylist.vue\");\n/* harmony import */ var _AProgress__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AProgress */ \"./src/components/AProgress.vue\");\n/* harmony import */ var _ASoundItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ASoundItem */ \"./src/components/ASoundItem.vue\");\n/* harmony import */ var _ASwitch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ASwitch */ \"./src/components/ASwitch.vue\");\n/* harmony import */ var _AModal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./AModal */ \"./src/components/AModal.vue\");\n/* harmony import */ var _ASelectFile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ASelectFile */ \"./src/components/ASelectFile.vue\");\n/* harmony import */ var _AStatistics__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./AStatistics */ \"./src/components/AStatistics.vue\");\n/* harmony import */ var _AStreamer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./AStreamer */ \"./src/components/AStreamer.vue\");\n/* harmony import */ var _ATracklistEditor__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ATracklistEditor */ \"./src/components/ATracklistEditor.vue\");\n/* harmony import */ var _APlaylistEditor__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./APlaylistEditor */ \"./src/components/APlaylistEditor.vue\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Core components\n */\nconst base = {\n AAutocomplete: _AAutocomplete__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n ACarousel: _ACarousel__WEBPACK_IMPORTED_MODULE_2__[\"default\"],\n ADropdown: _ADropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n AEpisode: _AEpisode__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n AList: _AList__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n APage: _APage__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n APlayer: _APlayer__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n APlaylist: _APlaylist__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n AProgress: _AProgress__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n ASoundItem: _ASoundItem__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n ASwitch: _ASwitch__WEBPACK_IMPORTED_MODULE_11__[\"default\"]\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (base);\nconst admin = {\n ...base,\n AStatistics: _AStatistics__WEBPACK_IMPORTED_MODULE_14__[\"default\"],\n AStreamer: _AStreamer__WEBPACK_IMPORTED_MODULE_15__[\"default\"],\n ATracklistEditor: _ATracklistEditor__WEBPACK_IMPORTED_MODULE_16__[\"default\"]\n};\nconst dashboard = {\n ...base,\n AActionButton: _AActionButton__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n ASelectFile: _ASelectFile__WEBPACK_IMPORTED_MODULE_13__[\"default\"],\n AModal: _AModal__WEBPACK_IMPORTED_MODULE_12__[\"default\"],\n ATracklistEditor: _ATracklistEditor__WEBPACK_IMPORTED_MODULE_16__[\"default\"],\n APlaylistEditor: _APlaylistEditor__WEBPACK_IMPORTED_MODULE_17__[\"default\"]\n};\n\n//# sourceURL=webpack://aircox-assets/./src/components/index.js?");
/***/ }),
@@ -469,16 +489,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ }),
-/***/ "./src/track.js":
-/*!**********************!*\
- !*** ./src/track.js ***!
- \**********************/
-/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
-
-eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ Track; }\n/* harmony export */ });\n/* harmony import */ var _model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./model */ \"./src/model.js\");\n\nclass Track extends _model__WEBPACK_IMPORTED_MODULE_0__[\"default\"] {\n static getId(data) {\n return data.pk;\n }\n}\n\n//# sourceURL=webpack://aircox-assets/./src/track.js?");
-
-/***/ }),
-
/***/ "./src/utils.js":
/*!**********************!*\
!*** ./src/utils.js ***!
@@ -629,6 +639,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _APl
/***/ }),
+/***/ "./src/components/APlaylistEditor.vue":
+/*!********************************************!*\
+ !*** ./src/components/APlaylistEditor.vue ***!
+ \********************************************/
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _APlaylistEditor_vue_vue_type_template_id_6e4f72a0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./APlaylistEditor.vue?vue&type=template&id=6e4f72a0 */ \"./src/components/APlaylistEditor.vue?vue&type=template&id=6e4f72a0\");\n/* harmony import */ var _APlaylistEditor_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./APlaylistEditor.vue?vue&type=script&lang=js */ \"./src/components/APlaylistEditor.vue?vue&type=script&lang=js\");\n/* harmony import */ var _home_data_code_projets_aircox_assets_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/vue-loader/dist/exportHelper.js */ \"./node_modules/vue-loader/dist/exportHelper.js\");\n\n\n\n\n;\nconst __exports__ = /*#__PURE__*/(0,_home_data_code_projets_aircox_assets_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_APlaylistEditor_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"], [['render',_APlaylistEditor_vue_vue_type_template_id_6e4f72a0__WEBPACK_IMPORTED_MODULE_0__.render],['__file',\"src/components/APlaylistEditor.vue\"]])\n/* hot reload */\nif (false) {}\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (__exports__);\n\n//# sourceURL=webpack://aircox-assets/./src/components/APlaylistEditor.vue?");
+
+/***/ }),
+
/***/ "./src/components/AProgress.vue":
/*!**************************************!*\
!*** ./src/components/AProgress.vue ***!
@@ -819,6 +839,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ }),
+/***/ "./src/components/APlaylistEditor.vue?vue&type=script&lang=js":
+/*!********************************************************************!*\
+ !*** ./src/components/APlaylistEditor.vue?vue&type=script&lang=js ***!
+ \********************************************************************/
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_APlaylistEditor_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_APlaylistEditor_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./APlaylistEditor.vue?vue&type=script&lang=js */ \"./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/APlaylistEditor.vue?vue&type=script&lang=js\");\n \n\n//# sourceURL=webpack://aircox-assets/./src/components/APlaylistEditor.vue?");
+
+/***/ }),
+
/***/ "./src/components/AProgress.vue?vue&type=script&lang=js":
/*!**************************************************************!*\
!*** ./src/components/AProgress.vue?vue&type=script&lang=js ***!
@@ -1009,6 +1039,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
/***/ }),
+/***/ "./src/components/APlaylistEditor.vue?vue&type=template&id=6e4f72a0":
+/*!**************************************************************************!*\
+ !*** ./src/components/APlaylistEditor.vue?vue&type=template&id=6e4f72a0 ***!
+ \**************************************************************************/
+/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
+
+eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ render: function() { return /* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_APlaylistEditor_vue_vue_type_template_id_6e4f72a0__WEBPACK_IMPORTED_MODULE_0__.render; }\n/* harmony export */ });\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_40_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_APlaylistEditor_vue_vue_type_template_id_6e4f72a0__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./APlaylistEditor.vue?vue&type=template&id=6e4f72a0 */ \"./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/APlaylistEditor.vue?vue&type=template&id=6e4f72a0\");\n\n\n//# sourceURL=webpack://aircox-assets/./src/components/APlaylistEditor.vue?");
+
+/***/ }),
+
/***/ "./src/components/AProgress.vue?vue&type=template&id=6871a6ae":
/*!********************************************************************!*\
!*** ./src/components/AProgress.vue?vue&type=template&id=6871a6ae ***!
diff --git a/aircox/templates/aircox/episode_form.html b/aircox/templates/aircox/episode_form.html
index 931a87f..e38850f 100644
--- a/aircox/templates/aircox/episode_form.html
+++ b/aircox/templates/aircox/episode_form.html
@@ -2,8 +2,29 @@
{% load static i18n humanize honeypot aircox %}
{% block page_form %}
-
-
+
+
+ {% for field in sound_form %}
+ {% if field.name in "episode,program" %}
+
+ {% else %}
+
+ {% if field|is_checkbox %}
+
+
+ {{ field.label }}
+
+ {% else %}
+
{{ field.label }}
+
+
+
+ {% endif %}
+
+
{{ field.help_text }}
+
+ {% endif %}
+ {% endfor %}
@@ -11,37 +32,11 @@
{{ block.super }}
- {% include "./widgets/tracklist_editor.html" with formset=playlist_formset %}
+ {% include "./widgets/tracklist_editor.html" with formset=tracklist_formset %}
{% translate "Sound files" %}
-
-
-
- [[ item.data.type_display ]]
-
- /
- {% translate "public" %}
-
-
- /
- {% translate "downloadable" %}
-
-
-
-
-
-
-
-
-
-
-
+ {% include "./widgets/playlist_editor.html" with formset=playlist_formset %}
diff --git a/aircox/templates/aircox/page_form.html b/aircox/templates/aircox/page_form.html
index be22598..87d6280 100644
--- a/aircox/templates/aircox/page_form.html
+++ b/aircox/templates/aircox/page_form.html
@@ -75,6 +75,7 @@
{{ field }}
{% endif %}
+ {{ field.help_text }}
{% endif %}
{% if field.errors %}
diff --git a/aircox/templates/aircox/widgets/form_field.html b/aircox/templates/aircox/widgets/form_field.html
new file mode 100644
index 0000000..7ee7454
--- /dev/null
+++ b/aircox/templates/aircox/widgets/form_field.html
@@ -0,0 +1,21 @@
+{% comment %}
+Render a form field instance as field (to be used when no model instance is provided). Value is binded as vue, class to Bulma
+
+Context:
+- name: field name
+- field: form field
+- value: input ":value" attribute
+{% endcomment %}
+{% load aircox %}
+
+{% if field|is_checkbox %}
+
+{% elif field|is_select %}
+
+ {% for value, label in field.widget.choices %}
+ {{ label }}
+ {% endfor %}
+
+{% else %}
+
+{% endif %}
diff --git a/aircox/templates/aircox/widgets/playlist_editor.html b/aircox/templates/aircox/widgets/playlist_editor.html
new file mode 100644
index 0000000..392e6e8
--- /dev/null
+++ b/aircox/templates/aircox/widgets/playlist_editor.html
@@ -0,0 +1,74 @@
+{% comment %}
+Context:
+- formset: formset
+{% endcomment %}
+{% load aircox aircox_admin static i18n %}
+
+{% with formset.form.base_fields as fields %}
+
+ {{ formset.non_form_errors }}
+
+
+
+
+ {% trans "Playlist" %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [[ row+1 ]]
+
+
+
+ {% for name, field in fields.items %}
+ {% if name != 'position' and field.widget.is_hidden %}
+
+ {% endif %}
+ {% endfor %}
+
+
+ {% for name, field in fields.items %}
+ {% if not field.widget.is_hidden and not field.is_readonly %}
+
+
+
+ {% include "./form_field.html" with field=field name=name value="item.data."|add:name %}
+
+
+ [[ error ]] !
+
+
+
+ {% endif %}
+ {% endfor %}
+
+
+{% endwith %}
diff --git a/aircox/templates/aircox/widgets/tracklist_editor.html b/aircox/templates/aircox/widgets/tracklist_editor.html
index 503f0d4..14aa16f 100644
--- a/aircox/templates/aircox/widgets/tracklist_editor.html
+++ b/aircox/templates/aircox/widgets/tracklist_editor.html
@@ -5,15 +5,15 @@ Context:
{% endcomment %}
{% load aircox aircox_admin static i18n %}
-{% with formset.form.fields as fields %}
+{% with formset.form.base_fields as fields %}
{{ formset.non_form_errors }}
@@ -47,25 +47,26 @@ Context:
:name="'{{ formset.prefix }}-' + row + '-id'"
:value="item.data.id || item.id"/>
- {% for field in fields %}
- {% if field != 'position' and field.widget.is_hidden %}
+ {% for name, field in fields.items %}
+ {% if name != 'position' and field.widget.is_hidden %}
{% endif %}
{% endfor %}
- {% for field in fields %}
+ {% for name, field in fields.items %}
{% if not field.widget.is_hidden and not field.is_readonly %}
-
+ ---
+
[[ error ]] !
diff --git a/aircox/templatetags/aircox.py b/aircox/templatetags/aircox.py
index 5fbb9ba..60c76d7 100644
--- a/aircox/templatetags/aircox.py
+++ b/aircox/templatetags/aircox.py
@@ -1,7 +1,7 @@
import json
import random
-from django import template
+from django import template, forms
from django.contrib.admin.templatetags.admin_urls import admin_urlname
from django.template.loader import render_to_string
from django.urls import reverse
@@ -148,3 +148,15 @@ def do_edit_view(obj):
@register.filter(name="detail_view")
def do_detail_view(obj):
return "%s-detail" % obj.split("-")[0]
+
+
+@register.filter(name="is_checkbox")
+def is_checkbox(field):
+ """Return True if field is a checkbox."""
+ return isinstance(field.widget, forms.CheckboxInput)
+
+
+@register.filter(name="is_select")
+def is_select(field):
+ """Return True if field is a select."""
+ return isinstance(field.widget, forms.Select)
diff --git a/aircox/templatetags/aircox_admin.py b/aircox/templatetags/aircox_admin.py
index 32f08d0..d20f4c9 100644
--- a/aircox/templatetags/aircox_admin.py
+++ b/aircox/templatetags/aircox_admin.py
@@ -6,7 +6,7 @@ from django.utils.translation import gettext_lazy as _
from aircox.serializers.admin import UserSettingsSerializer
-__all__ = ("register", "do_get_admin_tools", "do_track_inline_data")
+__all__ = ("register", "do_get_admin_tools", "do_formset_inline_data", "do_inline_labels")
register = template.Library()
@@ -17,14 +17,24 @@ def do_get_admin_tools():
return admin.site.get_tools()
-@register.simple_tag(name="track_inline_data", takes_context=True)
-def do_track_inline_data(context, formset):
- """Return initial data for playlist editor as dict. Keys are:
+@register.simple_tag(name="formset_inline_data", takes_context=True)
+def do_formset_inline_data(context, formset):
+ """Return initial data of formset as dict (used by TrackListEditor and
+ PlaylistEditor). Keys are:
- ``items``: list of items. Extra keys:
- ``__error__``: dict of form fields errors
- ``settings``: user's settings
"""
+
+ # --- get fields labels
+ model = formset.form.Meta.model
+ fields = {}
+ for field_name in formset.form.Meta.fields:
+ field = model._meta.get_field(field_name)
+ fields[field_name] = str(field.verbose_name).capitalize()
+
+ # --- get items
items = []
for form in formset.forms:
item = {name: form[name].value() for name in form.fields.keys()}
@@ -36,7 +46,7 @@ def do_track_inline_data(context, formset):
item["tags"] = ", ".join(tag.name for tag in tags)
items.append(item)
- data = {"items": items}
+ data = {"items": items, "fields": fields}
user = context["request"].user
settings = getattr(user, "aircox_settings", None)
data["settings"] = settings and UserSettingsSerializer(settings).data
@@ -44,22 +54,19 @@ def do_track_inline_data(context, formset):
return source
-track_inline_labels_ = {
- "artist": _("Artist"),
- "album": _("Album"),
- "title": _("Title"),
- "tags": _("Tags"),
- "year": _("Year"),
+inline_labels_ = {
+ # list editor
+ "add_item": _("Add an item"),
+ "remove_item": _("Remove"),
"save_settings": _("Save Settings"),
"discard_changes": _("Discard changes"),
+ # track list
"columns": _("Columns"),
- "add_track": _("Add a track"),
- "remove_track": _("Remove"),
"timestamp": _("Timestamp"),
}
-@register.simple_tag(name="track_inline_labels")
-def do_track_inline_labels():
+@register.simple_tag(name="inline_labels")
+def do_inline_labels():
"""Return labels for columns in playlist editor as dict."""
- return json.dumps({k: str(v) for k, v in track_inline_labels_.items()})
+ return json.dumps({k: str(v) for k, v in inline_labels_.items()})
diff --git a/aircox/views/episode.py b/aircox/views/episode.py
index 21ee836..132053d 100644
--- a/aircox/views/episode.py
+++ b/aircox/views/episode.py
@@ -1,9 +1,8 @@
from django.contrib.auth.mixins import UserPassesTestMixin
-from django.forms.models import modelformset_factory
from django.urls import reverse
-from aircox.forms import EpisodeForm
from aircox.models import Episode, Program, StaticPage, Track
+from aircox import forms
from ..filters import EpisodeFilters
from .page import PageListView
from .program import ProgramPageDetailView, BaseProgramMixin
@@ -49,18 +48,9 @@ class PodcastListView(EpisodeListView):
class EpisodeUpdateView(UserPassesTestMixin, BaseProgramMixin, PageUpdateView):
model = Episode
- form_class = EpisodeForm
+ form_class = forms.EpisodeForm
template_name = "aircox/episode_form.html"
- playlist_fields = (
- "position",
- "artist",
- "title",
- "tags",
- "album",
- )
- """Playlist editor's ordered fields."""
-
def test_func(self):
program = self.get_object().program
return self.request.user.has_perm("aircox.%s" % program.change_permission_codename)
@@ -68,16 +58,42 @@ class EpisodeUpdateView(UserPassesTestMixin, BaseProgramMixin, PageUpdateView):
def get_success_url(self):
return reverse("episode-detail", kwargs={"slug": self.get_object().slug})
- def get_playlist_queryset(self, episode):
+ def get_tracklist_queryset(self, episode):
return Track.objects.filter(episode=episode)
+ def get_tracklist_formset(self, episode, **kwargs):
+ kwargs.update(
+ {
+ "queryset": self.get_tracklist_queryset(episode),
+ "initial": {
+ "episode": episode.id,
+ },
+ }
+ )
+ return forms.TrackFormSet(**kwargs)
+
+ def get_playlist_queryset(self, episode):
+ return episode.sound_set.all()
+
def get_playlist_formset(self, episode, **kwargs):
- kwargs["queryset"] = self.get_playlist_queryset(episode)
- TrackFormSet = modelformset_factory(Track, fields=self.playlist_fields, extra=0)
- return TrackFormSet(**kwargs)
+ kwargs.update(
+ {
+ "queryset": self.get_playlist_queryset(episode),
+ "initial": {
+ "program": episode.parent_id,
+ "episode": episode.id,
+ },
+ }
+ )
+ return forms.SoundFormSet(**kwargs)
def get_context_data(self, **kwargs):
- kwargs["playlist_formset"] = self.get_playlist_formset(self.object)
+ kwargs.update(
+ {
+ "playlist_formset": self.get_playlist_formset(self.object),
+ "tracklist_formset": self.get_tracklist_formset(self.object),
+ }
+ )
return super().get_context_data(**kwargs)
def post(self, request, *args, **kwargs):
diff --git a/assets/src/admin.js b/assets/src/admin.js
index 54725d7..70c9003 100644
--- a/assets/src/admin.js
+++ b/assets/src/admin.js
@@ -3,7 +3,6 @@ import './index.js'
import App from './app';
import {admin as components} from './components'
-import Track from './track'
const AdminApp = {
...App,
@@ -12,7 +11,6 @@ const AdminApp = {
data() {
return {
...super.data,
- Track,
}
}
}
diff --git a/assets/src/components/AModal.vue b/assets/src/components/AModal.vue
index b845346..5f841a1 100644
--- a/assets/src/components/AModal.vue
+++ b/assets/src/components/AModal.vue
@@ -6,12 +6,17 @@
{{ title }}
+
+
+
+
+
@@ -24,13 +29,24 @@ export default {
data() {
return {
+ ///! If true, modal is open
active: false,
+ ///! Item or data passed down to slots.
+ item: null,
}
},
methods: {
- open() { this.active = true; },
- close() { this.active = false; },
+ ///! Open modal dialog. Set provided `item` to dialog's one.
+ open(item=null) {
+ this.active = true
+ this.item = item
+ },
+ ///! Close modal and reset item to null.
+ close() {
+ this.active = false
+ this.item = null
+ },
}
}
diff --git a/assets/src/components/APlayer.vue b/assets/src/components/APlayer.vue
index 6c6ea8c..23269de 100644
--- a/assets/src/components/APlayer.vue
+++ b/assets/src/components/APlayer.vue
@@ -37,10 +37,6 @@
-
diff --git a/assets/src/components/APlaylistEditor.vue b/assets/src/components/APlaylistEditor.vue
new file mode 100644
index 0000000..1d8485b
--- /dev/null
+++ b/assets/src/components/APlaylistEditor.vue
@@ -0,0 +1,105 @@
+
+
+
+
diff --git a/assets/src/components/ASelectFile.vue b/assets/src/components/ASelectFile.vue
index ad9ca16..1ee4a4d 100644
--- a/assets/src/components/ASelectFile.vue
+++ b/assets/src/components/ASelectFile.vue
@@ -3,7 +3,7 @@