x4js 2.0.20 → 2.0.22

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.
Files changed (173) hide show
  1. package/lib/cjs/x4.css +1 -1
  2. package/lib/cjs/x4.js +2 -2
  3. package/lib/esm/x4.css +1 -1
  4. package/lib/esm/x4.mjs +2 -2
  5. package/lib/styles/x4.css +1 -1
  6. package/lib/types/x4js.d.ts +93 -77
  7. package/package.json +1 -1
  8. package/src/components/boxes/boxes.ts +33 -1
  9. package/src/components/canvas/canvas.ts +9 -3
  10. package/src/components/combobox/combobox.module.scss +13 -0
  11. package/src/components/combobox/combobox.ts +7 -0
  12. package/src/components/form/form.ts +4 -4
  13. package/src/components/gridview/gridview.ts +12 -9
  14. package/src/components/header/header.module.scss +2 -1
  15. package/src/components/header/header.ts +17 -5
  16. package/src/components/icon/icon.module.scss +1 -0
  17. package/src/components/label/label.module.scss +6 -1
  18. package/src/components/listbox/listbox.module.scss +35 -31
  19. package/src/components/listbox/listbox.ts +50 -12
  20. package/src/components/messages/messages.ts +14 -0
  21. package/src/components/notification/notification.ts +1 -1
  22. package/src/components/popup/popup.ts +13 -2
  23. package/src/components/propgrid/propgrid.ts +4 -2
  24. package/src/components/sizers/sizer.ts +4 -4
  25. package/src/components/tabs/tabs.module.scss +2 -2
  26. package/src/components/tabs/tabs.ts +28 -4
  27. package/src/components/textedit/textedit.ts +1 -1
  28. package/src/components/treeview/treeview.module.scss +9 -1
  29. package/src/components/treeview/treeview.ts +52 -13
  30. package/src/core/component.ts +46 -9
  31. package/src/core/core_data.ts +8 -8
  32. package/src/core/core_state.ts +1 -1
  33. package/src/core/core_tools.ts +2 -0
  34. package/lib/src/components/base.scss +0 -25
  35. package/lib/src/components/boxes/boxes.module.scss +0 -54
  36. package/lib/src/components/boxes/boxes.ts +0 -370
  37. package/lib/src/components/breadcrumb/breadcrumb.scss +0 -56
  38. package/lib/src/components/breadcrumb/breadcrumb.ts +0 -93
  39. package/lib/src/components/breadcrumb/chevron-right.svg +0 -1
  40. package/lib/src/components/btngroup/btngroup.module.scss +0 -41
  41. package/lib/src/components/btngroup/btngroup.ts +0 -153
  42. package/lib/src/components/button/button.module.scss +0 -173
  43. package/lib/src/components/button/button.ts +0 -185
  44. package/lib/src/components/calendar/calendar-check-sharp-light.svg +0 -1
  45. package/lib/src/components/calendar/calendar.module.scss +0 -163
  46. package/lib/src/components/calendar/calendar.ts +0 -327
  47. package/lib/src/components/calendar/chevron-left-sharp-light.svg +0 -1
  48. package/lib/src/components/calendar/chevron-right-sharp-light.svg +0 -1
  49. package/lib/src/components/canvas/canvas.module.scss +0 -25
  50. package/lib/src/components/canvas/canvas.ts +0 -189
  51. package/lib/src/components/canvas/canvas_ex.ts +0 -276
  52. package/lib/src/components/checkbox/check.svg +0 -4
  53. package/lib/src/components/checkbox/checkbox.module.scss +0 -142
  54. package/lib/src/components/checkbox/checkbox.ts +0 -140
  55. package/lib/src/components/colorinput/colorinput.module.scss +0 -65
  56. package/lib/src/components/colorinput/colorinput.ts +0 -91
  57. package/lib/src/components/colorinput/crosshairs-simple-sharp-light.svg +0 -1
  58. package/lib/src/components/colorpicker/colorpicker.module.scss +0 -133
  59. package/lib/src/components/colorpicker/colorpicker.ts +0 -482
  60. package/lib/src/components/combobox/combobox.module.scss +0 -133
  61. package/lib/src/components/combobox/combobox.ts +0 -275
  62. package/lib/src/components/combobox/updown.svg +0 -4
  63. package/lib/src/components/components.ts +0 -42
  64. package/lib/src/components/dialog/dialog.module.scss +0 -104
  65. package/lib/src/components/dialog/dialog.ts +0 -229
  66. package/lib/src/components/dialog/xmark-sharp-light.svg +0 -1
  67. package/lib/src/components/filedrop/cloud-arrow-up.svg +0 -1
  68. package/lib/src/components/filedrop/filedrop.module.scss +0 -70
  69. package/lib/src/components/filedrop/filedrop.ts +0 -131
  70. package/lib/src/components/form/form.module.scss +0 -38
  71. package/lib/src/components/form/form.ts +0 -172
  72. package/lib/src/components/gridview/arrow-down-light.svg +0 -1
  73. package/lib/src/components/gridview/arrow-up-light.svg +0 -1
  74. package/lib/src/components/gridview/gridview.module.scss +0 -324
  75. package/lib/src/components/gridview/gridview.ts +0 -1175
  76. package/lib/src/components/header/header.module.scss +0 -40
  77. package/lib/src/components/header/header.ts +0 -130
  78. package/lib/src/components/icon/icon.module.scss +0 -31
  79. package/lib/src/components/icon/icon.ts +0 -137
  80. package/lib/src/components/image/image.module.scss +0 -28
  81. package/lib/src/components/image/image.ts +0 -168
  82. package/lib/src/components/input/input.module.scss +0 -74
  83. package/lib/src/components/input/input.ts +0 -422
  84. package/lib/src/components/keyboard/arrow-up.svg +0 -1
  85. package/lib/src/components/keyboard/delete-left.svg +0 -1
  86. package/lib/src/components/keyboard/eye-slash.svg +0 -1
  87. package/lib/src/components/keyboard/keyboard.module.scss +0 -134
  88. package/lib/src/components/keyboard/keyboard.ts +0 -526
  89. package/lib/src/components/label/label.module.scss +0 -76
  90. package/lib/src/components/label/label.ts +0 -97
  91. package/lib/src/components/link/link.ts +0 -81
  92. package/lib/src/components/listbox/listbox.module.scss +0 -161
  93. package/lib/src/components/listbox/listbox.ts +0 -539
  94. package/lib/src/components/menu/caret-right-solid.svg +0 -1
  95. package/lib/src/components/menu/menu.module.scss +0 -117
  96. package/lib/src/components/menu/menu.ts +0 -174
  97. package/lib/src/components/messages/circle-exclamation.svg +0 -1
  98. package/lib/src/components/messages/messages.module.scss +0 -92
  99. package/lib/src/components/messages/messages.ts +0 -215
  100. package/lib/src/components/messages/pen-field.svg +0 -1
  101. package/lib/src/components/normalize.scss +0 -391
  102. package/lib/src/components/notification/circle-check-solid.svg +0 -1
  103. package/lib/src/components/notification/circle-exclamation-solid.svg +0 -1
  104. package/lib/src/components/notification/circle-notch-light.svg +0 -1
  105. package/lib/src/components/notification/notification.module.scss +0 -84
  106. package/lib/src/components/notification/notification.ts +0 -107
  107. package/lib/src/components/notification/xmark-sharp-light.svg +0 -1
  108. package/lib/src/components/panel/panel.module.scss +0 -60
  109. package/lib/src/components/panel/panel.ts +0 -58
  110. package/lib/src/components/popup/popup.module.scss +0 -51
  111. package/lib/src/components/popup/popup.ts +0 -442
  112. package/lib/src/components/progress/progress.module.scss +0 -57
  113. package/lib/src/components/progress/progress.ts +0 -44
  114. package/lib/src/components/propgrid/folder-closed.svg +0 -1
  115. package/lib/src/components/propgrid/folder-open.svg +0 -1
  116. package/lib/src/components/propgrid/progrid.module.scss +0 -112
  117. package/lib/src/components/propgrid/propgrid.ts +0 -288
  118. package/lib/src/components/propgrid/updown.svg +0 -4
  119. package/lib/src/components/radio/radio.module.scss +0 -147
  120. package/lib/src/components/radio/radio.svg +0 -4
  121. package/lib/src/components/radio/radio.ts +0 -142
  122. package/lib/src/components/rating/rating.module.scss +0 -23
  123. package/lib/src/components/rating/rating.ts +0 -131
  124. package/lib/src/components/rating/star-sharp-light.svg +0 -1
  125. package/lib/src/components/rating/star-sharp-solid.svg +0 -1
  126. package/lib/src/components/select/select.module.scss +0 -9
  127. package/lib/src/components/select/select.ts +0 -134
  128. package/lib/src/components/shared.scss +0 -137
  129. package/lib/src/components/sizers/sizer.module.scss +0 -90
  130. package/lib/src/components/sizers/sizer.ts +0 -132
  131. package/lib/src/components/slider/slider.module.scss +0 -118
  132. package/lib/src/components/slider/slider.ts +0 -198
  133. package/lib/src/components/switch/switch.module.scss +0 -127
  134. package/lib/src/components/switch/switch.ts +0 -62
  135. package/lib/src/components/tabs/tabs.module.scss +0 -45
  136. package/lib/src/components/tabs/tabs.ts +0 -205
  137. package/lib/src/components/textarea/textarea.module.scss +0 -63
  138. package/lib/src/components/textarea/textarea.ts +0 -125
  139. package/lib/src/components/textedit/textedit.module.scss +0 -116
  140. package/lib/src/components/textedit/textedit.ts +0 -115
  141. package/lib/src/components/themes.scss +0 -88
  142. package/lib/src/components/tickline/tickline.module.scss +0 -26
  143. package/lib/src/components/tickline/tickline.ts +0 -82
  144. package/lib/src/components/tooltips/circle-info-sharp-light.svg +0 -1
  145. package/lib/src/components/tooltips/comments-question.svg +0 -1
  146. package/lib/src/components/tooltips/tooltips.scss +0 -72
  147. package/lib/src/components/tooltips/tooltips.ts +0 -109
  148. package/lib/src/components/treeview/chevron-down-light.svg +0 -1
  149. package/lib/src/components/treeview/treeview.module.scss +0 -185
  150. package/lib/src/components/treeview/treeview.ts +0 -445
  151. package/lib/src/components/viewport/viewport.module.scss +0 -32
  152. package/lib/src/components/viewport/viewport.ts +0 -41
  153. package/lib/src/core/component.ts +0 -1066
  154. package/lib/src/core/core_application.ts +0 -265
  155. package/lib/src/core/core_colors.ts +0 -250
  156. package/lib/src/core/core_data.ts +0 -1310
  157. package/lib/src/core/core_dom.ts +0 -471
  158. package/lib/src/core/core_dragdrop.ts +0 -201
  159. package/lib/src/core/core_element.ts +0 -115
  160. package/lib/src/core/core_events.ts +0 -177
  161. package/lib/src/core/core_i18n.ts +0 -393
  162. package/lib/src/core/core_react.ts +0 -79
  163. package/lib/src/core/core_router.ts +0 -237
  164. package/lib/src/core/core_state.ts +0 -62
  165. package/lib/src/core/core_styles.ts +0 -214
  166. package/lib/src/core/core_svg.ts +0 -712
  167. package/lib/src/core/core_tools.ts +0 -906
  168. package/lib/src/types/scss.d.ts +0 -4
  169. package/lib/src/types/svg.d.ts +0 -1
  170. package/lib/src/types/x4react.d.ts +0 -9
  171. package/lib/src/x4.scss +0 -19
  172. package/lib/src/x4.ts +0 -35
  173. package/lib/src/x4tsx.d.ts +0 -25
@@ -1,51 +0,0 @@
1
- /**
2
- * ___ ___ __
3
- * \ \/ / / _
4
- * \ / /_| |_
5
- * / \____ _|
6
- * /__/\__\ |_|
7
- *
8
- * @file popup.module.scss
9
- * @author Etienne Cochard
10
- *
11
- * @copyright (c) 2024 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
- :root {
18
- --modal-mask-background: rgb(0 0 0 / 60% );
19
- }
20
-
21
- .x4popup {
22
- position: absolute !important;
23
- background-color: var(--fill-color);
24
- border: 1px solid var(--border-color);
25
- overflow: hidden;
26
- z-index: 1000;
27
- border-radius: var(--bradius);
28
-
29
- &.popup-caption,
30
- .popup-caption {
31
- cursor: move;
32
- }
33
- }
34
-
35
- .x4popup.center {
36
- left: 50%;
37
- top: 50%;
38
- transform: translate(-50%, -50%);
39
- }
40
-
41
- ::backdrop,
42
- .x4modal-mask {
43
- background-color: var( --modal-mask-background );
44
- backdrop-filter: blur(8px);
45
- position: absolute;
46
- left: 0;
47
- top: 0;
48
- right: 0;
49
- bottom: 0;
50
- z-index: 1000;
51
- }
@@ -1,442 +0,0 @@
1
- /**
2
- * ___ ___ __
3
- * \ \/ / / _
4
- * \ / /_| |_
5
- * / \____ _|
6
- * /__/\__\ |_|
7
- *
8
- * @file popup.ts
9
- * @author Etienne Cochard
10
- *
11
- * @copyright (c) 2024 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
- import { Component, ComponentEvent, ComponentEvents, ComponentProps, componentFromDOM, makeUniqueComponentId } from "../../core/component"
18
-
19
- import { CSizer } from '../sizers/sizer';
20
- import { Rect, Point, class_ns, asap } from '../../core/core_tools';
21
- import { Box } from '../boxes/boxes'
22
-
23
- import "./popup.module.scss"
24
-
25
- export interface PopupEvents extends ComponentEvents {
26
- closed: ComponentEvent;
27
- opened: ComponentEvent;
28
- }
29
-
30
- export interface PopupProps extends ComponentProps {
31
- autoClose?: boolean | string;
32
- sizable?: boolean;
33
- movable?: boolean;
34
- }
35
-
36
- let autoclose_list: Popup[] = [];
37
- let popup_list: Popup[] = [];
38
-
39
- let modal_stack: Popup[] = [];
40
- let modal_mask: Component;
41
-
42
-
43
- function getRoot( ) {
44
- return document.body;
45
- }
46
-
47
- /**
48
- *
49
- */
50
-
51
- @class_ns( "x4" )
52
- export class Popup<P extends PopupProps = PopupProps, E extends PopupEvents = PopupEvents> extends Box<P,E> {
53
-
54
- private _isshown = false;
55
- protected _ismodal = false;
56
-
57
- constructor( props: P ) {
58
- super( props );
59
-
60
- if( this.props.sizable ) {
61
- this._createSizers( );
62
- }
63
-
64
- // wait for element to create it's childs
65
- asap( ( ) => {
66
- if( this.props.movable===true || (this.props.sizable && this.props.movable===undefined) ) {
67
- const movers = this.queryAll( ".caption-element" );
68
- movers.forEach( m => new CMover(m,this) );
69
-
70
- if( this.hasClass("popup-caption") ) {
71
- new CMover(this,this);
72
- }
73
- }
74
- } );
75
- }
76
-
77
- /**
78
- *
79
- */
80
-
81
- displayNear( rc: Rect, dst = "top left", src = "top left", offset = {x:0,y:0} ) {
82
-
83
- this.setStyle( { left: "0px", top: "0px" } ); // avoid scrollbar
84
- this._do_show( ); // to compute size
85
-
86
- let rm = this.getBoundingRect();
87
-
88
- let xref = rc.left;
89
- let yref = rc.top;
90
-
91
- if( src.indexOf('right')>=0 ) {
92
- xref = (rc.left+rc.width);
93
- }
94
- else if( src.indexOf('center')>=0 ) {
95
- xref = rc.left + rc.width/2;
96
- }
97
-
98
- if( src.indexOf('bottom')>=0 ) {
99
- yref = rc.bottom;
100
- }
101
- else if( src.indexOf('middle')>=0 ) {
102
- yref = rc.top + rc.height/2;
103
- }
104
-
105
- if (dst.indexOf('right') >= 0) {
106
- xref -= rm.width;
107
- }
108
- else if( dst.indexOf('center')>=0 ) {
109
- xref -= rm.width/2;
110
- }
111
-
112
- if (dst.indexOf('bottom') >= 0) {
113
- yref -= rm.height;
114
- }
115
- else if( dst.indexOf('middle')>=0 ) {
116
- yref -= rm.height/2;
117
- }
118
-
119
- if (offset) {
120
- xref += offset.x;
121
- yref += offset.y;
122
- }
123
-
124
- // our parent is body, so take care of the scroll position
125
- xref += document.scrollingElement.scrollLeft;
126
- yref += document.scrollingElement.scrollTop;
127
-
128
- this.displayAt( xref, yref );
129
- }
130
-
131
- /**
132
- * s
133
- */
134
-
135
- displayCenter( center = true ) {
136
- //this.displayNear( new Rect( window.innerWidth/2, window.innerHeight/2, 0, 0 ), "center middle" );
137
- this.setClass( 'center', center );
138
- this._do_show( ); // to compute size
139
- }
140
-
141
- /**
142
- *
143
- */
144
-
145
- displayAt( x: number, y: number ) {
146
- //TODO: check is already visible
147
- this.setStyle( {
148
- left: x+"px",
149
- top: y+"px",
150
- })
151
-
152
- this._do_show( ); // to compute size
153
-
154
- const rc = this.getBoundingRect( );
155
- const width = window.innerWidth - 16;
156
- const height = window.innerHeight - 16;
157
-
158
- if( rc.right>width ) {
159
- this.setStyleValue( "left", width-rc.width );
160
- }
161
-
162
- if( rc.bottom>height ) {
163
- this.setStyleValue( "top", height-rc.height );
164
- }
165
- }
166
-
167
- isOpen( ) {
168
- return this._isshown;
169
- }
170
-
171
- protected _do_hide( ) {
172
-
173
- if( !this._isshown ) {
174
- return;
175
- }
176
-
177
- this.__hide( );
178
- this.__remove( );
179
-
180
- if( this._ismodal ) {
181
- modal_stack.pop( );
182
- this._hideModalMask( );
183
- }
184
-
185
- // remove from popup list
186
- const idx = popup_list.indexOf( this );
187
- console.assert( idx>=0 );
188
- popup_list.splice( idx, 1 );
189
-
190
- // remove from auto close list
191
- if( this.props.autoClose ) {
192
- const idx = autoclose_list.indexOf( this );
193
- if( idx>=0 ) {
194
- autoclose_list.splice( idx, 1 );
195
- if( autoclose_list.length==0 ) {
196
- document.removeEventListener( "pointerdown", this._dismiss );
197
- }
198
- }
199
- }
200
-
201
- this._isshown = false;
202
- this.fire( "closed", {} );
203
- }
204
-
205
- /**
206
- *
207
- */
208
-
209
- protected _do_show( ) {
210
- if( this._isshown ) {
211
- return;
212
- }
213
-
214
- this._isshown = true;
215
- this.__append( );
216
-
217
- if( this._ismodal ) {
218
- modal_stack.push( this );
219
- this._showModalMask( );
220
- }
221
-
222
- this.__show( );
223
-
224
- if( this.props.autoClose ) {
225
- if( autoclose_list.length==0 ) {
226
- document.addEventListener( "pointerdown", this._dismiss );
227
- }
228
-
229
- autoclose_list.push( this );
230
- this.setData( "close", this.props.autoClose===true ? makeUniqueComponentId() : this.props.autoClose );
231
- }
232
-
233
- popup_list.push( this );
234
-
235
- this.fire( "opened", {} );
236
- }
237
-
238
- /**
239
- *
240
- */
241
-
242
- protected __show( ) {
243
- super.show( true );
244
- }
245
-
246
- protected __hide( ) {
247
- super.show( false );
248
- }
249
-
250
- protected __append( ) {
251
- const root = getRoot( );
252
- root.appendChild( this.dom );
253
- }
254
-
255
- protected __remove( ) {
256
- const root = getRoot( );
257
- root.removeChild( this.dom );
258
- }
259
-
260
- /**
261
- *
262
- */
263
-
264
- override show( show = true ) : this {
265
- if( show ) {
266
- this.displayCenter( );
267
- }
268
- else {
269
- this._do_hide( );
270
- }
271
-
272
- return this;
273
- }
274
-
275
- /**
276
- *
277
- */
278
-
279
- close( ) {
280
- this._do_hide( );
281
- }
282
-
283
- /**
284
- * binded
285
- */
286
-
287
- private _dismiss = ( e: UIEvent ) => {
288
- const onac = autoclose_list.some( x=> x.dom.contains(e.target as Node) )
289
- if( onac ) {
290
- return;
291
- }
292
-
293
- e.preventDefault( );
294
- e.stopPropagation( );
295
-
296
- this.dismiss( );
297
- }
298
-
299
- /**
300
- * dismiss all popup belonging to the same group as 'this'
301
- */
302
-
303
- dismiss( after = false ) {
304
-
305
- if( autoclose_list.length==0 ) {
306
- return;
307
- }
308
-
309
- const cgroup = this.getData( "close" );
310
- const inc_group: Popup[] = [];
311
- const excl_group: Popup[] = [];
312
-
313
- let aidx = -1;
314
- if( after ) {
315
- aidx = autoclose_list.indexOf( this );
316
- }
317
-
318
- autoclose_list.forEach( (x,idx) => {
319
- const group = x.getData( "close" );
320
- if( group==cgroup && idx>aidx) {
321
- inc_group.push( x );
322
- }
323
- else {
324
- excl_group.push( x );
325
- }
326
- })
327
-
328
- const list = inc_group.reverse( );
329
- autoclose_list = excl_group;
330
- if( autoclose_list.length==0 ) {
331
- document.removeEventListener( "pointerdown", this._dismiss );
332
- }
333
-
334
- list.forEach( x => x.close() );
335
- }
336
-
337
- /**
338
- *
339
- */
340
-
341
- private _createSizers( ) {
342
- this.appendContent( [
343
- new CSizer( "top" ),
344
- new CSizer( "bottom" ),
345
- new CSizer( "left" ),
346
- new CSizer( "right" ),
347
- new CSizer( "top-left" ),
348
- new CSizer( "bottom-left" ),
349
- new CSizer( "top-right" ),
350
- new CSizer( "bottom-right" ),
351
- ])
352
- }
353
-
354
- private _showModalMask( ) {
355
- if( !modal_mask ) {
356
- modal_mask = new Component( { cls: 'x4modal-mask' } )
357
- //document.body.appendChild( modal_mask.dom );
358
- }
359
-
360
- const root = getRoot( );
361
- root.insertBefore( modal_mask.dom, this.dom );
362
- }
363
-
364
- private _hideModalMask( ) {
365
- if( modal_mask ) {
366
- const root = getRoot( );
367
- if( modal_stack.length ) {
368
- const top = modal_stack[ modal_stack.length-1 ];
369
- root.insertBefore( modal_mask.dom, top.dom );
370
- }
371
- else {
372
- root.removeChild( modal_mask.dom );
373
- }
374
- }
375
- }
376
- }
377
-
378
-
379
- /**
380
- *
381
- */
382
-
383
- export
384
- class CMover {
385
- private ref: Component;
386
- private delta: Point;
387
- private self: boolean;
388
-
389
- constructor( x: Component, ref?: Component ) {
390
-
391
- this.self = ref ? true : false;
392
-
393
- x.addDOMEvent( "pointerdown", ( e: PointerEvent ) => {
394
- if( this.self && e.target!=x.dom ) {
395
- return;
396
- }
397
-
398
- x.setCapture( e.pointerId );
399
-
400
- this.ref = ref ?? componentFromDOM( x.dom.parentElement );
401
-
402
- this.delta = {x:0,y:0};
403
- const rc = this.ref.getBoundingRect();
404
-
405
- this.delta.x = e.pageX-rc.left;
406
- this.delta.y = e.pageY-rc.top;
407
- });
408
-
409
- x.addDOMEvent( "pointerup", ( e: PointerEvent ) => {
410
- x.releaseCapture( e.pointerId );
411
- this.ref = null;
412
- });
413
-
414
- x.addDOMEvent( "pointermove", ( e: PointerEvent ) => {
415
- this._onMouseMove( e );
416
- });
417
- }
418
-
419
- private _onMouseMove( e: PointerEvent ) {
420
- if( !this.ref ) {
421
- return;
422
- }
423
-
424
- const pt = { x: e.pageX-this.delta.x, y: e.pageY-this.delta.y };
425
- const rc = this.ref.getBoundingRect( );
426
-
427
- let nr: any = {
428
- };
429
-
430
- this.ref.setStyle( {
431
- top: pt.y+"",
432
- left: pt.x+"",
433
- } );
434
-
435
- e.preventDefault( );
436
- e.stopPropagation( );
437
- }
438
- }
439
-
440
-
441
-
442
-
@@ -1,57 +0,0 @@
1
- /**
2
- * ___ ___ __
3
- * \ \/ / / _
4
- * \ / /_| |_
5
- * / \____ _|
6
- * /__/\__\ |_|
7
- *
8
- * @file progress.module.scss
9
- * @author Etienne Cochard
10
- *
11
- * @copyright (c) 2024 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
- :root {
18
- --progress-background: var( --border );
19
- --progress-color: var( --accent-background );
20
- }
21
-
22
- .x4progress {
23
- background-color: var( --progress-background );
24
- position: relative;
25
- height: 6px;
26
- margin: 0 5px;
27
- border-radius: 3px;
28
-
29
- .bar {
30
- position: absolute;
31
- left: 0;
32
- top: 0;
33
- bottom: 0;
34
- width: 0;
35
-
36
- background-color: var( --progress-color );
37
- border-radius: 3px;
38
-
39
- transition: width ease 0.2s;
40
- }
41
-
42
- &.indeterm .bar {
43
- background-image: linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);
44
- background-size: 20px 20px;
45
- animation: slide 1s linear infinite;
46
- }
47
- }
48
-
49
- @keyframes slide {
50
- 0% {
51
- background-position: 0 0
52
- }
53
-
54
- to {
55
- background-position: 2.5rem 0
56
- }
57
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * ___ ___ __
3
- * \ \/ / / _
4
- * \ / /_| |_
5
- * / \____ _|
6
- * /__/\__\ |_|
7
- *
8
- * @file progress.ts
9
- * @author Etienne Cochard
10
- *
11
- * @copyright (c) 2024 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
- import { class_ns } from '../../core/core_tools';
18
- import { Component, ComponentProps } from '../../core/component';
19
-
20
- import "./progress.module.scss";
21
-
22
- interface ProgressProps extends ComponentProps {
23
- value: number;
24
- min: number;
25
- max: number;
26
- }
27
-
28
- @class_ns( "x4" )
29
- export class Progress extends Component<ProgressProps> {
30
-
31
- private _bar: Component;
32
-
33
- constructor( props: ProgressProps ) {
34
- super( props );
35
-
36
- this.setContent( this._bar=new Component( { cls: "bar" } ) );
37
- this.setValue( props.value );
38
- }
39
-
40
- setValue( value: number ) {
41
- const perc = value / (this.props.max-this.props.min) * 100;
42
- this._bar.setStyleValue( "width", perc+"%" );
43
- }
44
- }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path class="fa-secondary" opacity=".4" d="M32 224l448 0 0 224L32 448l0-224z"/><path class="fa-primary" d="M32 32l192 0 48 64 208 0 32 0 0 32 0 320 0 32-32 0L32 480 0 480l0-32L0 64 0 32l32 0zm240 96l-16 0-9.6-12.8L208 64 32 64l0 128 448 0 0-64-208 0zM32 224l0 224 448 0 0-224L32 224z"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--><path class="fa-secondary" opacity=".4" d="M32 64l0 280.4L108.2 192 448 192l0-64-176 0-13.3 0-9.4-9.4L194.7 64 32 64zM51.8 448L384 448l44.2 0 96-192-376.4 0-96 192z"/><path class="fa-primary" d="M272 96L208 32 32 32 0 32 0 64 0 448l0 32 32 0 3.8 0L384 480l64 0L560 256l16-32-35.8 0L128 224 32 416 32 64l162.7 0 54.6 54.6 9.4 9.4 13.3 0 176 0 0 64 32 0 0-64 0-32-32 0L272 96zM51.8 448l96-192 376.4 0-96 192L384 448 51.8 448z"/></svg>
@@ -1,112 +0,0 @@
1
- /**
2
- * @file progrid.module.scss
3
- * @author Etienne Cochard
4
- * @copyright (c) 2025 InCare
5
- **/
6
-
7
- :root {
8
- --propertygrid-background: white;
9
- }
10
-
11
- .x4propertygrid {
12
- background: var( --propertygrid-background );
13
- border: 1px solid var(--color-primary-a50);
14
- overflow-y: auto;
15
- flex-basis: 0;
16
-
17
- .root {
18
- display: grid;
19
- grid-template-columns: 1fr;
20
- grid-template-rows: auto;
21
- }
22
-
23
- .group {
24
- padding: 6px 4px 4px 4px;
25
- min-height: 2em;
26
- font-weight: bold;
27
- background-color: white;
28
- color: var(--color-primary-a50);
29
-
30
- .x4box > .desc {
31
- font-style: italic;
32
- font-weight: normal;
33
- font-size: 90%;
34
- color: var( --text-ternary );
35
- }
36
-
37
- &:not(:first-child ) {
38
- border-top: 1px solid var(--color-primary-a50);
39
- }
40
-
41
- &:not( :last-child ) {
42
- border-bottom: 1px solid var(--color-primary-a50);
43
- box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
44
- }
45
-
46
- display: flex;
47
- align-items: center;
48
- padding-left: 8px;
49
- gap: 8px;
50
-
51
- &>.x4box {
52
- flex-grow: 1;
53
- }
54
-
55
- &>.x4icon {
56
- .fa-secondary,
57
- .fa-primary {
58
- fill: var( --color-primary-a50 );
59
- }
60
-
61
- width: 1em;
62
- height: 1em;
63
- }
64
-
65
- &>.x4button {
66
- background-color: transparent;
67
- color: var(--color-primary-a50);
68
- }
69
- }
70
-
71
- .row {
72
- border-bottom: 1px solid var( --border-light );
73
- //border-top: none;
74
- //border-left: 1px solid var(--color-primary-a50);
75
- //border-right: 1px solid var(--color-primary-a50);
76
-
77
- &:has(:focus) {
78
- background-color: var(--color-primary-a20);
79
- }
80
-
81
- &:hover {
82
- background-color: var(--color-primary-a10);
83
- }
84
-
85
- .cell {
86
- flex-grow: 1;
87
- flex-basis: 10px;
88
- padding: 4px;
89
-
90
- &>* {
91
- width: 100%;
92
- }
93
-
94
- input {
95
- background: rgba(255,255,255,0.6);
96
- }
97
- }
98
-
99
- .cell:first-child {
100
- border-right: 1px solid var( --border );
101
- }
102
-
103
- .hdr {
104
- padding: 8px;
105
- padding-left: 34px;
106
- }
107
-
108
- .cell:has(.x4button) {
109
- padding: 4px 40px;
110
- }
111
- }
112
- }