x4js 2.2.7 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/base.scss +1 -1
- package/src/components/boxes/boxes.module.scss +1 -1
- package/src/components/boxes/boxes.ts +1 -1
- package/src/components/breadcrumb/breadcrumb.ts +1 -1
- package/src/components/btngroup/btngroup.module.scss +1 -1
- package/src/components/btngroup/btngroup.ts +1 -1
- package/src/components/button/button.module.scss +1 -1
- package/src/components/button/button.ts +1 -1
- package/src/components/calendar/calendar.module.scss +1 -1
- package/src/components/calendar/calendar.ts +1 -1
- package/src/components/checkbox/checkbox.module.scss +1 -1
- package/src/components/colorinput/colorinput.module.scss +1 -1
- package/src/components/colorinput/colorinput.ts +1 -1
- package/src/components/colorpicker/colorpicker.module.scss +1 -1
- package/src/components/colorpicker/colorpicker.ts +1 -1
- package/src/components/combobox/combobox.module.scss +1 -1
- package/src/components/combobox/combobox.ts +1 -1
- package/src/components/dialog/dialog.module.scss +1 -1
- package/src/components/dialog/dialog.ts +1 -1
- package/src/components/filedrop/filedrop.module.scss +1 -1
- package/src/components/filedrop/filedrop.ts +1 -1
- package/src/components/form/form.module.scss +1 -1
- package/src/components/form/form.ts +1 -1
- package/src/components/gridview/gridview.module.scss +1 -1
- package/src/components/gridview/gridview.ts +1 -1
- package/src/components/icon/icon.module.scss +1 -1
- package/src/components/icon/icon.ts +4 -1
- package/src/components/image/image.module.scss +1 -1
- package/src/components/image/image.ts +1 -1
- package/src/components/input/input.module.scss +1 -1
- package/src/components/input/input.ts +1 -1
- package/src/components/keyboard/keyboard.module.scss +1 -1
- package/src/components/keyboard/keyboard.ts +1 -1
- package/src/components/label/label.module.scss +1 -1
- package/src/components/label/label.ts +1 -1
- package/src/components/link/link.ts +1 -1
- package/src/components/listbox/listbox.module.scss +1 -1
- package/src/components/listbox/listbox.ts +1 -1
- package/src/components/menu/menu.module.scss +1 -1
- package/src/components/menu/menu.ts +1 -1
- package/src/components/messages/messages.module.scss +1 -1
- package/src/components/monaco/monaco.module.scss +22 -0
- package/src/components/monaco/monaco.ts +95 -9
- package/src/components/normalize.scss +1 -1
- package/src/components/notification/notification.module.scss +1 -1
- package/src/components/notification/notification.ts +1 -1
- package/src/components/panel/panel.module.scss +1 -1
- package/src/components/panel/panel.ts +1 -1
- package/src/components/popup/popup.module.scss +1 -1
- package/src/components/popup/popup.ts +1 -1
- package/src/components/progress/progress.module.scss +1 -1
- package/src/components/progress/progress.ts +1 -1
- package/src/components/propgrid/propgrid.ts +1 -1
- package/src/components/radio/radio.module.scss +1 -1
- package/src/components/radio/radio.ts +1 -1
- package/src/components/rating/rating.ts +1 -1
- package/src/components/shared.scss +1 -1
- package/src/components/sizers/sizer.module.scss +9 -5
- package/src/components/sizers/sizer.ts +20 -14
- package/src/components/slider/slider.module.scss +1 -1
- package/src/components/slider/slider.ts +1 -1
- package/src/components/spreadsheet/spreadsheet.module.scss +1 -1
- package/src/components/spreadsheet/spreadsheet.ts +1 -1
- package/src/components/switch/switch.module.scss +1 -1
- package/src/components/switch/switch.ts +1 -1
- package/src/components/tabs/tabs.ts +1 -1
- package/src/components/textarea/textarea.module.scss +1 -1
- package/src/components/textarea/textarea.ts +1 -1
- package/src/components/textedit/textedit.module.scss +1 -1
- package/src/components/textedit/textedit.ts +1 -1
- package/src/components/themes.scss +1 -1
- package/src/components/tickline/tickline.module.scss +1 -1
- package/src/components/tooltips/tooltips.scss +1 -1
- package/src/components/tooltips/tooltips.ts +1 -1
- package/src/components/treeview/treeview.module.scss +6 -2
- package/src/components/treeview/treeview.ts +1 -1
- package/src/components/viewport/viewport.module.scss +1 -1
- package/src/components/viewport/viewport.ts +1 -1
- package/src/core/component.ts +1 -1
- package/src/core/core_application.ts +2 -1
- package/src/core/core_colors.ts +1 -1
- package/src/core/core_data.ts +1 -1
- package/src/core/core_dom.ts +1 -1
- package/src/core/core_dragdrop.ts +1 -1
- package/src/core/core_element.ts +1 -1
- package/src/core/core_events.ts +1 -1
- package/src/core/core_i18n.ts +1 -1
- package/src/core/core_router.ts +1 -1
- package/src/core/core_styles.ts +1 -1
- package/src/core/core_svg.ts +1 -1
- package/src/core/core_tools.ts +1 -1
- package/src/x4.scss +1 -1
- package/src/x4.ts +1 -1
package/package.json
CHANGED
package/src/components/base.scss
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file base.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file boxes.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file boxes.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file breadcrumb.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file btngroup.model.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file btngroup.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file button.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file button.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file calendar.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file calendar.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file checkbox.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file colorinput.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file colorinput.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file colorpicker.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file colorpicker.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file combobox.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file combobox.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file dialog.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file dialog.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file filedrop.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file filedrop.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file form.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file form.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file gridview.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file gridview.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file icon.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file icon.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -142,6 +142,9 @@ export class Icon extends Component<IconProps> {
|
|
|
142
142
|
if( iconId.startsWith("data:image/svg+xml,<svg") ) {
|
|
143
143
|
this.dom.insertAdjacentHTML('beforeend', iconId.substring(19) );
|
|
144
144
|
}
|
|
145
|
+
else if( iconId.startsWith("<svg") ) { // raw
|
|
146
|
+
this.dom.insertAdjacentHTML('beforeend', iconId );
|
|
147
|
+
}
|
|
145
148
|
else if( iconId.endsWith(".svg") ) {
|
|
146
149
|
svgLoader.load( iconId ).then( svg => {
|
|
147
150
|
this.clearContent( );
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file image.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file image.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file input.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file input.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file keyboard.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file keyboard.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file label.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file label.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file link.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file listbox.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file listbox.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file menu.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file menu.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file messages.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ___ ___ __
|
|
3
|
+
* \ \/ / / _
|
|
4
|
+
* \ / /_| |_
|
|
5
|
+
* / \____ _|
|
|
6
|
+
* /__/\__\ |_|
|
|
7
|
+
*
|
|
8
|
+
* @file monacoeditor.module.scss
|
|
9
|
+
* @author Etienne Cochard
|
|
10
|
+
*
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
|
+
*
|
|
13
|
+
* Use of this source code is governed by an MIT-style license
|
|
14
|
+
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
15
|
+
**/
|
|
16
|
+
|
|
17
|
+
.x4monacoeditor {
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-rows: 1fr;
|
|
20
|
+
grid-template-columns: 1fr;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
@@ -1,25 +1,111 @@
|
|
|
1
|
-
import { Component, ComponentProps } from '../../x4.js';
|
|
1
|
+
import { class_ns, Component, ComponentProps } from '../../x4.js';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import "./
|
|
3
|
+
import Monaco from './bin/monaco';
|
|
4
|
+
import "./monaco.module.scss"
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
interface MonacoEditorProps extends ComponentProps {
|
|
8
8
|
language: "typescript" | "javascript" | "json" | "css" | "html";
|
|
9
9
|
theme?: string;
|
|
10
10
|
content?: string;
|
|
11
|
+
options?: Monaco.editor.IEditorOptions & Monaco.editor.IGlobalEditorOptions;
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
@class_ns( "x4" )
|
|
13
15
|
export class MonacoEditor extends Component<MonacoEditorProps> {
|
|
14
16
|
|
|
17
|
+
static initCount = 0;
|
|
18
|
+
static basePath: string = "./bin";
|
|
19
|
+
static monaco: typeof Monaco;
|
|
20
|
+
static initCbs: Function[] = [];
|
|
21
|
+
|
|
22
|
+
private _editor: Monaco.editor.IStandaloneCodeEditor;
|
|
23
|
+
|
|
24
|
+
static async start( ) {
|
|
25
|
+
if( this.initCount ) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
this.monaco = (await import( "./bin/monaco.js" )).default;
|
|
30
|
+
this.initCount++;
|
|
31
|
+
|
|
32
|
+
globalThis.MonacoEnvironment = {
|
|
33
|
+
getWorkerUrl: function (_moduleId, label) {
|
|
34
|
+
let workerPath: string;
|
|
35
|
+
|
|
36
|
+
if (label == 'json') {
|
|
37
|
+
workerPath = 'json.worker.js';
|
|
38
|
+
}
|
|
39
|
+
else if (label == 'css' || label == 'scss' || label == 'less') {
|
|
40
|
+
workerPath = 'css.worker.js';
|
|
41
|
+
}
|
|
42
|
+
else if (label == 'html' ) {
|
|
43
|
+
workerPath = 'html.worker.js';
|
|
44
|
+
}
|
|
45
|
+
else if (label === 'typescript' || label === 'javascript') {
|
|
46
|
+
workerPath = 'ts.worker.js';
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
workerPath = "editor.worker.js";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const fullpath = MonacoEditor.basePath+'/workers/'+workerPath;
|
|
53
|
+
console.log( `getting "${label} path: ${fullpath}` );
|
|
54
|
+
return fullpath;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const link = document.createElement('link');
|
|
59
|
+
link.rel = 'stylesheet';
|
|
60
|
+
link.href = MonacoEditor.basePath+'/monaco.css';
|
|
61
|
+
link.type = 'text/css';
|
|
62
|
+
document.head.appendChild(link);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static addTypelib( name: string, code: string ) {
|
|
66
|
+
const register = ( ) => {
|
|
67
|
+
///@ts-ignore
|
|
68
|
+
const ts = MonacoEditor.monaco.languages.typescript;
|
|
69
|
+
///@ts-ignore
|
|
70
|
+
ts.typescriptDefaults.addExtraLib( code, `ts:filename/${name}`);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if( MonacoEditor.monaco ) {
|
|
74
|
+
register( );
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.initCbs.push( register );
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
15
81
|
constructor( props: MonacoEditorProps ) {
|
|
82
|
+
const content = props.content;
|
|
83
|
+
delete props.content;
|
|
84
|
+
|
|
16
85
|
super( props );
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
86
|
+
|
|
87
|
+
MonacoEditor.start( )
|
|
88
|
+
.then( ( ) => {
|
|
89
|
+
MonacoEditor.initCbs.forEach( x => x() );
|
|
90
|
+
|
|
91
|
+
this._editor = MonacoEditor.monaco.editor.create( this.dom as HTMLElement, {
|
|
92
|
+
value: content,
|
|
93
|
+
language: props.language,
|
|
94
|
+
theme: props.theme,
|
|
95
|
+
//automaticLayout: true,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
if( props.options ) {
|
|
99
|
+
this._editor.updateOptions( props.options );
|
|
100
|
+
}
|
|
101
|
+
} );
|
|
102
|
+
|
|
103
|
+
this.addDOMEvent( "resized", ( ) => {
|
|
104
|
+
//const rc = this.getBoundingRect( );
|
|
105
|
+
if( this._editor ) {
|
|
106
|
+
this._editor.layout();
|
|
107
|
+
}
|
|
108
|
+
})
|
|
23
109
|
}
|
|
24
110
|
}
|
|
25
111
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file normalize.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file notification.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file notification.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file panel.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file panel.ts
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @file popup.module.scss
|
|
9
9
|
* @author Etienne Cochard
|
|
10
10
|
*
|
|
11
|
-
* @copyright (c)
|
|
11
|
+
* @copyright (c) 2026 R-libre ingenierie
|
|
12
12
|
*
|
|
13
13
|
* Use of this source code is governed by an MIT-style license
|
|
14
14
|
* that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
|