x4js 1.5.6 → 1.5.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/README.md CHANGED
@@ -11,7 +11,14 @@ see [home](https://x4js.org)
11
11
 
12
12
 
13
13
  ## Documentation
14
- see [documentation](https://x4js.org/doc/)
14
+
15
+ **12s**: it's the time needed to have a working project:
16
+
17
+ ```bash
18
+ npx x4build create name=demo model=html
19
+ ```
20
+
21
+ see [full documentation](https://x4js.org/doc/)
15
22
 
16
23
  ## API
17
24
  see [API](https://x4js.org/api/)
package/lib/README.md CHANGED
@@ -11,7 +11,14 @@ see [home](https://x4js.org)
11
11
 
12
12
 
13
13
  ## Documentation
14
- see [documentation](https://x4js.org/doc/)
14
+
15
+ **12s**: it's the time needed to have a working project:
16
+
17
+ ```bash
18
+ npx x4build create name=demo model=html
19
+ ```
20
+
21
+ see [full documentation](https://x4js.org/doc/)
15
22
 
16
23
  ## API
17
24
  see [API](https://x4js.org/api/)
package/lib/changelog.txt CHANGED
@@ -1,3 +1,7 @@
1
+ 2022/12/xx : 1.5.7 --------------------------------------------------------
2
+ package.json - removed erroneous dependency to typescript
3
+ calendar.ts - show now has a parameter named 'at'
4
+
1
5
  2022/12/08 : 1.5.6 --------------------------------------------------------
2
6
  combobox.ts - allow editable
3
7
  items can be a function
@@ -236,9 +236,14 @@ class PopupCalendar extends popup_1.Popup {
236
236
  this.setContent(this.m_cal);
237
237
  }
238
238
  /** @ignore */
239
- show(modal) {
239
+ show(modal, at) {
240
240
  x4dom_1.x4document.addEventListener('mousedown', this._handleClick);
241
- super.show(modal);
241
+ if (at) {
242
+ super.displayAt(at.x, at.y, 'top left', undefined, modal);
243
+ }
244
+ else {
245
+ super.show(modal);
246
+ }
242
247
  }
243
248
  /** @ignore */
244
249
  close() {
package/lib/cjs/popup.js CHANGED
@@ -136,8 +136,8 @@ class Popup extends component_1.Container {
136
136
  * @param x
137
137
  * @param y
138
138
  */
139
- displayAt(x, y, align = 'top left', offset) {
140
- this.show();
139
+ displayAt(x, y, align = 'top left', offset, modal = false) {
140
+ this.show(modal);
141
141
  let halign = 'l', valign = 't';
142
142
  if (align.indexOf('right') >= 0) {
143
143
  halign = 'r';
@@ -29,4 +29,4 @@
29
29
  **/
30
30
  Object.defineProperty(exports, "__esModule", { value: true });
31
31
  exports.x4js_version = void 0;
32
- exports.x4js_version = "1.5.6";
32
+ exports.x4js_version = "1.5.7";
@@ -232,9 +232,14 @@ export class PopupCalendar extends Popup {
232
232
  this.close();
233
233
  };
234
234
  /** @ignore */
235
- show(modal) {
235
+ show(modal, at) {
236
236
  x4document.addEventListener('mousedown', this._handleClick);
237
- super.show(modal);
237
+ if (at) {
238
+ super.displayAt(at.x, at.y, 'top left', undefined, modal);
239
+ }
240
+ else {
241
+ super.show(modal);
242
+ }
238
243
  }
239
244
  /** @ignore */
240
245
  close() {
package/lib/esm/popup.js CHANGED
@@ -134,8 +134,8 @@ export class Popup extends Container {
134
134
  * @param x
135
135
  * @param y
136
136
  */
137
- displayAt(x, y, align = 'top left', offset) {
138
- this.show();
137
+ displayAt(x, y, align = 'top left', offset, modal = false) {
138
+ this.show(modal);
139
139
  let halign = 'l', valign = 't';
140
140
  if (align.indexOf('right') >= 0) {
141
141
  halign = 'r';
@@ -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 const x4js_version = "1.5.6";
29
+ export const x4js_version = "1.5.7";
@@ -33,6 +33,7 @@ import { Button } from './button';
33
33
  import { Popup } from './popup';
34
34
  import { Component, CProps, ContainerEventMap, Flex } from './component'
35
35
  import { EvChange, EventCallback } from './x4events'
36
+ import { Point } from "./tools"
36
37
 
37
38
  import { _tr } from './i18n';
38
39
  import { Label } from './label';
@@ -308,9 +309,14 @@ export class PopupCalendar extends Popup {
308
309
  }
309
310
 
310
311
  /** @ignore */
311
- show(modal?: boolean) {
312
+ show(modal?: boolean, at?: Point ) {
312
313
  x4document.addEventListener('mousedown', this._handleClick);
313
- super.show(modal);
314
+ if( at ) {
315
+ super.displayAt( at.x, at.y, 'top left', undefined, modal );
316
+ }
317
+ else {
318
+ super.show(modal);
319
+ }
314
320
  }
315
321
 
316
322
  /** @ignore */
package/lib/src/popup.ts CHANGED
@@ -185,9 +185,9 @@ export class Popup<P extends PopupProps = PopupProps, E extends PopupEventMap =
185
185
  * @param y
186
186
  */
187
187
 
188
- public displayAt(x: number, y: number, align: string = 'top left', offset?: { x, y }) {
188
+ public displayAt(x: number, y: number, align: string = 'top left', offset?: { x, y }, modal = false ) {
189
189
 
190
- this.show();
190
+ this.show( modal );
191
191
 
192
192
  let halign = 'l',
193
193
  valign = 't';
@@ -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.6";
30
+ export const x4js_version = "1.5.7";
@@ -29,6 +29,7 @@
29
29
  import { Popup } from './popup';
30
30
  import { CProps, ContainerEventMap } from './component';
31
31
  import { EvChange, EventCallback } from './x4events';
32
+ import { Point } from "./tools";
32
33
  import { VLayout } from './layout';
33
34
  interface CalendarEventMap extends ContainerEventMap {
34
35
  change?: EvChange;
@@ -74,7 +75,7 @@ export declare class PopupCalendar extends Popup {
74
75
  constructor(props: CalendarProps);
75
76
  private _handleClick;
76
77
  /** @ignore */
77
- show(modal?: boolean): void;
78
+ show(modal?: boolean, at?: Point): void;
78
79
  /** @ignore */
79
80
  close(): void;
80
81
  }
@@ -62,7 +62,7 @@ export declare class Popup<P extends PopupProps = PopupProps, E extends PopupEve
62
62
  displayAt(x: number, y: number, align?: string, offset?: {
63
63
  x: any;
64
64
  y: any;
65
- }): void;
65
+ }, modal?: boolean): void;
66
66
  /**
67
67
  * close the popup
68
68
  */
@@ -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.6";
29
+ export declare const x4js_version = "1.5.7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x4js",
3
- "version": "1.5.6",
3
+ "version": "1.5.8",
4
4
  "description": "X4js core files",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",