1 | /* |
2 | Copyright - 2017 2023 - wwwouaiebe - Contact: https://www.ouaie.be/ |
3 | |
4 | This program is free software; |
5 | you can redistribute it and/or modify it under the terms of the |
6 | GNU General Public License as published by the Free Software Foundation; |
7 | either version 3 of the License, or any later version. |
8 | |
9 | This program is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. |
13 | |
14 | You should have received a copy of the GNU General Public License |
15 | along with this program; if not, write to the Free Software |
16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 | */ |
18 | |
19 | /* |
20 | Changes: |
21 | - v4.0.0: |
22 | - created |
23 | Doc reviewed 20220828 |
24 | Tests ... |
25 | */ |
26 | |
27 | import theHTMLElementsFactory from '../../core/uiLib/HTMLElementsFactory.js'; |
28 | |
29 | /* ------------------------------------------------------------------------------------------------------------------------- */ |
30 | /** |
31 | This class is a base class for dialog controls |
32 | */ |
33 | /* ------------------------------------------------------------------------------------------------------------------------- */ |
34 | |
35 | class BaseControl { |
36 | |
37 | /** |
38 | The control container |
39 | @type {HTMLElement} |
40 | */ |
41 | |
42 | #controlHTMLElement; |
43 | |
44 | /** |
45 | The constructor |
46 | */ |
47 | |
48 | constructor ( ) { |
49 | |
50 | Object.freeze ( this ); |
51 | |
52 | // HTMLElement creation |
53 | this.#controlHTMLElement = theHTMLElementsFactory.create ( |
54 | 'div', |
55 | { |
56 | className : 'TravelNotes-BaseDialog-DataDiv' |
57 | } |
58 | ); |
59 | } |
60 | |
61 | /** |
62 | get the main HTMLElement of the control |
63 | @type {HTMLElement} |
64 | */ |
65 | |
66 | get controlHTMLElement ( ) { |
67 | return this.#controlHTMLElement; |
68 | } |
69 | |
70 | } |
71 | |
72 | export default BaseControl; |
73 | |
74 | /* --- End of file --------------------------------------------------------------------------------------------------------- */ |
75 |