From 5c2070e1d722ac930e915f93d1be28d3a9db0143 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 28 Dec 2021 14:16:38 +0100 Subject: [PATCH] chore(label-select): add frontend util stub --- .../src/utils/label-select/label-select.js | 32 +++++++++++++++++++ .../src/utils/label-select/label-select.sass | 0 frontend/src/utils/utils.js | 2 ++ 3 files changed, 34 insertions(+) create mode 100644 frontend/src/utils/label-select/label-select.js create mode 100644 frontend/src/utils/label-select/label-select.sass diff --git a/frontend/src/utils/label-select/label-select.js b/frontend/src/utils/label-select/label-select.js new file mode 100644 index 000000000..3002a379d --- /dev/null +++ b/frontend/src/utils/label-select/label-select.js @@ -0,0 +1,32 @@ +import { Utility } from '../../core/utility'; + +import './label-select.sass'; + + +@Utility({ + selector: '.uw-label-select', +}) +export class LabelSelect { + + _element; + _app; + + constructor(element, app) { + if (!element) { + throw new Error('LabelSelect utility cannot be setup without an element!'); + } + + if (!app) { + throw new Error('LabelSelect utility cannot be setup without an app!'); + } + + this._element = element; + this._app = app; + } + + // TODO cleanUp event manager etc. + destroy() { + console.log('TODO LabelSelect destroy'); + } + +} diff --git a/frontend/src/utils/label-select/label-select.sass b/frontend/src/utils/label-select/label-select.sass new file mode 100644 index 000000000..e69de29bb diff --git a/frontend/src/utils/utils.js b/frontend/src/utils/utils.js index 8727b1844..86c2d7e05 100644 --- a/frontend/src/utils/utils.js +++ b/frontend/src/utils/utils.js @@ -15,6 +15,7 @@ import { PageActionsUtils } from './pageactions/pageactions'; import { HideColumns } from './hide-columns/hide-columns'; import { ExamCorrect } from './exam-correct/exam-correct'; import { SortTable } from './sort-table/sort-table'; +import { LabelSelect } from './label-select/label-select'; export const Utils = [ Alerts, @@ -35,4 +36,5 @@ export const Utils = [ HideColumns, ExamCorrect, SortTable, + LabelSelect, ];