x4js 1.5.27 → 1.5.31

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.
@@ -27,4 +27,4 @@
27
27
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
28
  **/
29
29
 
30
- export const x4js_version = "1.5.27";
30
+ export const x4js_version = "1.5.31";
package/lib/src/x4.less CHANGED
@@ -665,11 +665,9 @@ textarea {
665
665
  padding-right: 2px;
666
666
  }
667
667
 
668
- &.x-error {
669
- input {
670
- border-bottom: none;
671
- border-left: 4px solid var( --x4-error-color );
672
- }
668
+ input.x-error {
669
+ border-bottom: none;
670
+ border-left: 4px solid var( --x4-error-color );
673
671
  }
674
672
  }
675
673
 
package/lib/styles/x4.css CHANGED
@@ -552,8 +552,8 @@ textarea::selection {
552
552
  content: '*';
553
553
  padding-right: 2px;
554
554
  }
555
- .x-text-edit.x-error input,
556
- .x-combo-box.x-error input {
555
+ .x-text-edit input.x-error,
556
+ .x-combo-box input.x-error {
557
557
  border-bottom: none;
558
558
  border-left: 4px solid var(--x4-error-color);
559
559
  }
@@ -665,11 +665,9 @@ textarea {
665
665
  padding-right: 2px;
666
666
  }
667
667
 
668
- &.x-error {
669
- input {
670
- border-bottom: none;
671
- border-left: 4px solid var( --x4-error-color );
672
- }
668
+ input.x-error {
669
+ border-bottom: none;
670
+ border-left: 4px solid var( --x4-error-color );
673
671
  }
674
672
  }
675
673
 
@@ -26,6 +26,7 @@
26
26
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
27
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
28
  **/
29
+ import { RenderListItem } from "./listview";
29
30
  import { TextEdit, TextEditProps } from './textedit';
30
31
  /**
31
32
  *
@@ -33,6 +34,7 @@ import { TextEdit, TextEditProps } from './textedit';
33
34
  interface AutoCompleteProps extends TextEditProps {
34
35
  enumValues: (filter: string) => string[] | Promise<string[]>;
35
36
  selectValue?: (text: string) => string;
37
+ renderItem?: RenderListItem;
36
38
  }
37
39
  /**
38
40
  *
@@ -46,14 +48,16 @@ export declare class AutoComplete extends TextEdit<AutoCompleteProps> {
46
48
  _onKey(e: KeyboardEvent): void;
47
49
  private _onChange;
48
50
  componentDisposed(): void;
51
+ showPopup(show?: boolean): void;
49
52
  /**
50
53
  * display the popup
51
54
  */
52
- showPopup(items: string[]): void;
55
+ private _showPopup;
53
56
  protected _validate(value: string): boolean;
54
57
  validate(): boolean;
55
58
  private _checkFocus;
56
59
  private _hidePopup;
57
60
  private _onFocus;
61
+ isPopupVisible(): boolean;
58
62
  }
59
63
  export {};
@@ -26,9 +26,6 @@
26
26
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
27
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
28
  **/
29
- /**
30
- * TODO: replace custom combo list by listview or gridview
31
- */
32
29
  import { Component, CProps, ContainerEventMap } from './component';
33
30
  import { EvChange, EvSelectionChange, EventCallback } from './x4events';
34
31
  import { Input } from './input';
@@ -52,6 +49,7 @@ export interface ComboBoxProps extends CProps<ComboBoxEventMap> {
52
49
  tabIndex?: number | boolean;
53
50
  name?: string;
54
51
  readOnly?: boolean;
52
+ required?: true;
55
53
  label?: string;
56
54
  labelWidth?: number;
57
55
  labelAlign?: 'left' | 'right';
@@ -82,6 +80,12 @@ export declare class ComboBox extends HLayout<ComboBoxProps, ComboBoxEventMap> {
82
80
  * display the popup
83
81
  */
84
82
  showPopup(filter_items?: boolean): ListViewItem[];
83
+ /**
84
+ *
85
+ */
86
+ validate(): boolean;
87
+ showError(text: string): void;
88
+ clearError(): void;
85
89
  /** @ignore
86
90
  */
87
91
  private _selectItem;
@@ -163,6 +163,7 @@ export declare class Component<P extends CProps<CEventMap> = CProps<CEventMap>,
163
163
  * @param content
164
164
  */
165
165
  appendChild(content: ComponentContent): void;
166
+ removeChild(item: Component): void;
166
167
  /**
167
168
  *
168
169
  */
@@ -26,21 +26,26 @@
26
26
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
27
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
28
  **/
29
- import { Component, Container, CProps, ContainerEventMap, ComponentContent } from './component';
29
+ import { Component, Container, CProps, ContainerEventMap, ComponentContent, EventHandler } from './component';
30
30
  import { HLayout, VLayout } from './layout';
31
31
  import { Button } from './button';
32
32
  import { RequestProps } from './request';
33
- import { EventCallback } from './x4events';
33
+ import { BasicEvent } from './x4events';
34
34
  import { EvBtnClick } from './dialog';
35
+ export interface EvDirty extends BasicEvent {
36
+ dirty: boolean;
37
+ }
35
38
  export type FormBtn = 'ok' | 'cancel' | 'ignore' | 'yes' | 'no' | 'close' | 'save' | 'dontsave';
36
39
  export type FormButtons = (FormBtn | Button | Component)[];
37
40
  export interface FormEventMap extends ContainerEventMap {
38
41
  btnClick?: EvBtnClick;
42
+ dirty?: EvDirty;
39
43
  }
40
44
  export interface FormProps extends CProps<FormEventMap> {
41
45
  disableSuggestions?: boolean;
42
46
  buttons?: FormButtons;
43
- btnClick?: EventCallback<EvBtnClick>;
47
+ btnClick?: EventHandler<EvBtnClick>;
48
+ dirty?: EventHandler<EvDirty>;
44
49
  }
45
50
  /**
46
51
  *
@@ -107,6 +112,10 @@ export declare class Form<T extends FormProps = FormProps, E extends FormEventMa
107
112
  *
108
113
  */
109
114
  setValues(values: any): void;
115
+ /**
116
+ *
117
+ */
118
+ clearValues(): void;
110
119
  /**
111
120
  * values are not escaped
112
121
  * checkbox set true when checked
@@ -27,11 +27,12 @@
27
27
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
28
  **/
29
29
  import { Component, CProps } from './component';
30
- interface ImageProps extends CProps {
30
+ export interface ImageProps extends CProps {
31
31
  src: string;
32
32
  alt?: string;
33
33
  lazy?: boolean;
34
34
  alignment?: 'fill' | 'contain' | 'cover' | 'scale-down' | 'none';
35
+ overlays?: Component[];
35
36
  }
36
37
  /**
37
38
  * Standard image class
@@ -39,6 +40,7 @@ interface ImageProps extends CProps {
39
40
  export declare class Image extends Component<ImageProps> {
40
41
  protected m_created: boolean;
41
42
  protected m_lazysrc: string;
43
+ private m_img;
42
44
  constructor(props: ImageProps);
43
45
  /** @ignore */
44
46
  render(): void;
@@ -52,4 +54,3 @@ export declare class Image extends Component<ImageProps> {
52
54
  private static lazy_image_timer;
53
55
  private static lazyWatch;
54
56
  }
55
- export {};
@@ -55,19 +55,25 @@ export interface InputProps<P extends InputEventMap = InputEventMap> extends CPr
55
55
  * CARE derived classes must set this.ui.input
56
56
  */
57
57
  export declare class Input extends Component<InputProps, InputEventMap> {
58
+ private m_error_tip;
58
59
  constructor(props: InputProps);
60
+ componentDisposed(): void;
59
61
  /** @ignore */
60
62
  render(props: InputProps): void;
63
+ showError(text: string): void;
64
+ clearError(): void;
61
65
  getType(): EditType;
62
66
  /**
63
67
  * return the current editor value
64
68
  */
65
69
  get value(): string;
70
+ getValue(): string;
66
71
  /**
67
72
  * Change the editor value
68
73
  * @param value - new value to set
69
74
  */
70
75
  set value(value: string);
76
+ setValue(value: string): void;
71
77
  getStoreValue(): any;
72
78
  setStoreValue(v: any): void;
73
79
  set readOnly(ro: boolean);
@@ -61,7 +61,7 @@ export declare class Router extends EventSource<RouterEventMap> {
61
61
  get(uri: string | RegExp, handler: RouteHandler): void;
62
62
  init(): void;
63
63
  private _getLocation;
64
- navigate(uri: string, notify?: boolean): void;
64
+ navigate(uri: string, notify?: boolean, replace?: boolean): void;
65
65
  private _find;
66
66
  }
67
67
  export {};
@@ -59,10 +59,8 @@ export interface TextEditProps extends InputProps<TextEditEventMap> {
59
59
  export declare class TextEdit<T extends TextEditProps = TextEditProps, E extends TextEditEventMap = TextEditEventMap> extends Component<T, E> {
60
60
  private m_cal_popup;
61
61
  protected m_ui_input: Input;
62
- private m_error_tip;
63
62
  constructor(props: T);
64
63
  componentCreated(): void;
65
- componentDisposed(): void;
66
64
  focus(): void;
67
65
  /** @ignore */
68
66
  render(props: TextEditProps): void;
@@ -82,7 +80,12 @@ export declare class TextEdit<T extends TextEditProps = TextEditProps, E extends
82
80
  showError(text: string): void;
83
81
  clearError(): void;
84
82
  get value(): string;
83
+ getValue(): string;
84
+ /**
85
+ *
86
+ */
85
87
  set value(value: string);
88
+ setValue(value: string): void;
86
89
  /**
87
90
  * select all the text
88
91
  */
@@ -26,4 +26,4 @@
26
26
  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
27
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
28
  **/
29
- export declare const x4js_version = "1.5.27";
29
+ export declare const x4js_version = "1.5.31";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x4js",
3
- "version": "1.5.27",
3
+ "version": "1.5.31",
4
4
  "description": "X4js core files",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",