x4js 2.2.58 → 2.2.59

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x4js",
3
- "version": "2.2.58",
3
+ "version": "2.2.59",
4
4
  "type": "module",
5
5
  "main": "src/x4.ts",
6
6
  "module": "src/x4.ts",
@@ -37,6 +37,7 @@ type predefined = `ok${ "" | `.${string}`}`
37
37
  | `no${ "" | `.${string}`}`
38
38
  | `retry${ "" | `.${string}`}`
39
39
  | `abort${ "" | `.${string}`}`
40
+ | `save${ "" | `.${string}`}`
40
41
  | "-" | ">>" // - = Flex
41
42
  | "~"; // space
42
43
 
@@ -120,6 +121,7 @@ export class BtnGroup extends Box<BtnGroupProps,BtnGroupEvents> {
120
121
  case "no": title = _tr.global.no; break;
121
122
  case "yes": title = _tr.global.yes; break;
122
123
  case "retry": title = _tr.global.retry; break;
124
+ case "save": title = _tr.global.save; break;
123
125
  }
124
126
 
125
127
  b = new Button( { cls, id: txt, label: title, click: ( ) => {
@@ -131,5 +131,13 @@ export class MonacoEditor extends Component<MonacoEditorProps> {
131
131
  await this._start( );
132
132
  return this._monaco;
133
133
  }
134
+
135
+ getText( ) : string {
136
+ return this._editor.getValue( );
137
+ }
138
+
139
+ setText( text: string ) {
140
+ return this._editor.setValue( text );
141
+ }
134
142
  }
135
143
 
@@ -145,15 +145,11 @@ export class Popup<P extends PopupProps = PopupProps, E extends PopupEvents = Po
145
145
  this._do_show( ); // to compute size
146
146
 
147
147
  const fixpos = ( ) => {
148
- console.log( "fixpos" );
149
-
150
148
  const orc = this.getBoundingRect( );
151
149
  this.setStyle( {
152
150
  left: ((window.innerWidth - orc.width) / 2) +'px',
153
151
  top: ((window.innerHeight - orc.height) / 2) +'px',
154
152
  } );
155
-
156
- console.log( orc );
157
153
  }
158
154
 
159
155
  asap( fixpos );
@@ -197,7 +197,7 @@ export class PropertyGrid extends VBox {
197
197
  editor = new Input({
198
198
  type: "checkbox",
199
199
  id: item.name,
200
- name: item.name,
200
+ //name: item.name,
201
201
  checked: value as boolean,
202
202
  dom_events: {
203
203
  change: ( e: Event ) => {
@@ -212,7 +212,7 @@ export class PropertyGrid extends VBox {
212
212
  value: value as ListboxID,
213
213
  id: item.name,
214
214
  items: item.options,
215
- name: item.name,
215
+ //name: item.name,
216
216
  change: ( e: EvChange ) => {
217
217
  item.callback?.( item.name, e.value );
218
218
  }
@@ -222,7 +222,7 @@ export class PropertyGrid extends VBox {
222
222
  editor = new Input({
223
223
  type: 'password',
224
224
  id: item.name,
225
- name: item.name,
225
+ //name: item.name,
226
226
  value: String(value),
227
227
  focus: ( e: EvFocus ) => {
228
228
  if( e.focus_out ) {
@@ -235,7 +235,7 @@ export class PropertyGrid extends VBox {
235
235
  editor = new Input({
236
236
  type: 'number',
237
237
  id: item.name,
238
- name: item.name,
238
+ //name: item.name,
239
239
  value: String(value),
240
240
  step: item.step,
241
241
  min: item.min,
@@ -273,7 +273,7 @@ export class PropertyGrid extends VBox {
273
273
  editor = new Input({
274
274
  type: 'text',
275
275
  id: item.name,
276
- name: item.name,
276
+ //name: item.name,
277
277
  value: value as string,
278
278
  focus: ( e: EvFocus ) => {
279
279
  if( e.focus_out ) {
@@ -209,6 +209,7 @@ export class Treeview extends Component<TreeviewProps,TreeviewEvents> {
209
209
 
210
210
  if( props.footer ) {
211
211
  props.footer.setAttribute( "id", "footer" );
212
+ props.footer.addClass( "packed" );
212
213
  }
213
214
 
214
215
  this.setAttribute( "tabindex", 0 );