x4js 1.5.6 → 1.5.7
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 +8 -1
- package/lib/README.md +8 -1
- package/lib/changelog.txt +4 -0
- package/lib/cjs/calendar.js +7 -2
- package/lib/cjs/popup.js +2 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/calendar.js +7 -2
- package/lib/esm/popup.js +2 -2
- package/lib/esm/version.js +1 -1
- package/lib/src/calendar.ts +8 -2
- package/lib/src/popup.ts +2 -2
- package/lib/src/version.ts +1 -1
- package/lib/types/calendar.d.ts +2 -1
- package/lib/types/popup.d.ts +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,14 @@ see [home](https://x4js.org)
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## Documentation
|
|
14
|
-
|
|
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
|
-
|
|
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
|
package/lib/cjs/calendar.js
CHANGED
|
@@ -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
|
-
|
|
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';
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/calendar.js
CHANGED
|
@@ -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
|
-
|
|
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';
|
package/lib/esm/version.js
CHANGED
package/lib/src/calendar.ts
CHANGED
|
@@ -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
|
-
|
|
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';
|
package/lib/src/version.ts
CHANGED
package/lib/types/calendar.d.ts
CHANGED
|
@@ -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
|
}
|
package/lib/types/popup.d.ts
CHANGED
package/lib/types/version.d.ts
CHANGED