@luomus/laji-form 15.1.15 → 15.1.17
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.
|
@@ -88,11 +88,9 @@ export class OverlayTrigger extends React.Component<any, any, any> {
|
|
|
88
88
|
static contextType: React.Context<import("../ReactContext").ContextProps>;
|
|
89
89
|
constructor(props: any);
|
|
90
90
|
overlayTriggerMouseOver: () => void;
|
|
91
|
-
overlayTriggerMouseIn: boolean | undefined;
|
|
92
91
|
overlayTriggerMouseOut: () => void;
|
|
93
92
|
overlayTimeout: any;
|
|
94
93
|
overlayMouseOver: () => void;
|
|
95
|
-
overlayMouseIn: boolean | undefined;
|
|
96
94
|
overlayMouseOut: () => void;
|
|
97
95
|
}
|
|
98
96
|
export class Fullscreen extends React.Component<any, any, any> {
|
|
@@ -473,35 +473,25 @@ class OverlayTrigger extends React.Component {
|
|
|
473
473
|
constructor(props) {
|
|
474
474
|
super(props);
|
|
475
475
|
this.overlayTriggerMouseOver = () => {
|
|
476
|
-
this.
|
|
477
|
-
this.setState({ show: true });
|
|
476
|
+
this.setState({ hoveringElem: true });
|
|
478
477
|
};
|
|
479
478
|
this.overlayTriggerMouseOut = () => {
|
|
480
|
-
this.overlayTriggerMouseIn = false;
|
|
481
479
|
if (this.overlayTimeout) {
|
|
482
480
|
clearTimeout(this.overlayTimeout);
|
|
483
481
|
}
|
|
484
482
|
this.overlayTimeout = this.props.formContext.setTimeout(() => {
|
|
485
483
|
if (!this.popoverMouseIn && !this.overlayTriggerMouseIn) {
|
|
486
|
-
this.setState({
|
|
484
|
+
this.setState({ hoveringElem: false });
|
|
487
485
|
}
|
|
488
486
|
}, 200);
|
|
489
487
|
};
|
|
490
488
|
this.overlayMouseOver = () => {
|
|
491
|
-
this.
|
|
489
|
+
this.setState({ hoveringOverlay: true });
|
|
492
490
|
};
|
|
493
491
|
this.overlayMouseOut = () => {
|
|
494
|
-
this.
|
|
495
|
-
if (this.overlayTimeout) {
|
|
496
|
-
clearTimeout(this.overlayTimeout);
|
|
497
|
-
}
|
|
498
|
-
this.overlayTimeout = this.props.formContext.setTimeout(() => {
|
|
499
|
-
if (!this.overlayMouseIn && !this.overlayTriggerMouseIn) {
|
|
500
|
-
this.setState({ show: false });
|
|
501
|
-
}
|
|
502
|
-
}, 200);
|
|
492
|
+
this.setState({ hoveringOverlay: false, hoveringElem: false });
|
|
503
493
|
};
|
|
504
|
-
this.state = {
|
|
494
|
+
this.state = {};
|
|
505
495
|
}
|
|
506
496
|
componentWillUnmount() {
|
|
507
497
|
if (this.overlayTimeout) {
|
|
@@ -515,8 +505,9 @@ class OverlayTrigger extends React.Component {
|
|
|
515
505
|
if (!this.props.hoverable)
|
|
516
506
|
return (React.createElement(OverlayTrigger, Object.assign({}, props, { overlay: overlay }), children));
|
|
517
507
|
let _overlay = React.cloneElement(overlay, { onMouseOver: this.overlayMouseOver, onMouseOut: this.overlayMouseOut });
|
|
508
|
+
const show = this.state.hoveringElem || this.state.hoveringOverlay;
|
|
518
509
|
return (React.createElement("div", { onMouseOver: this.overlayTriggerMouseOver, onMouseOut: this.overlayTriggerMouseOut },
|
|
519
|
-
React.createElement(OverlayTrigger, Object.assign({}, props, { delay: 1, trigger: [], placement: this.props.placement || "top", overlay: _overlay, show:
|
|
510
|
+
React.createElement(OverlayTrigger, Object.assign({}, props, { delay: 1, trigger: [], placement: this.props.placement || "top", overlay: _overlay, show: show }), children)));
|
|
520
511
|
}
|
|
521
512
|
}
|
|
522
513
|
exports.OverlayTrigger = OverlayTrigger;
|
|
@@ -303,7 +303,7 @@ class ScopeField extends React.Component {
|
|
|
303
303
|
}, this.state.additionalFields);
|
|
304
304
|
if (this._globals) {
|
|
305
305
|
const additionalsPersistenceVal = this.getAdditionalPersistenceValue(this.props, !"don't include undefined");
|
|
306
|
-
let globalsEntry = this._globals
|
|
306
|
+
let globalsEntry = this._globals ? Object.assign({}, this._globals) : {};
|
|
307
307
|
if (additionalsPersistenceField) {
|
|
308
308
|
let additionalsKeys = this.props.schema.properties[additionalsPersistenceField].type === "array"
|
|
309
309
|
? additionalsPersistenceVal
|
package/package.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luomus/laji-form",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.17",
|
|
4
4
|
"description": "React module capable of building dynamic forms from Laji form json schemas",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib",
|
|
9
|
+
"dist",
|
|
10
|
+
"test-export",
|
|
11
|
+
"README.md",
|
|
12
|
+
"CHANGELOG.md"
|
|
13
|
+
],
|
|
7
14
|
"scripts": {
|
|
8
15
|
"start": "npx webpack serve",
|
|
9
16
|
"staging": "webpack-dev-server --content-base playground playground/app.js --host 0.0.0.0 --port 4010",
|
package/protractor.conf.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// Firefox isn't run default since it has a bug with mousemove (See https://github.com/angular/protractor/issues/4715 )
|
|
2
|
-
|
|
3
|
-
const [width, height] = [800, 1000];
|
|
4
|
-
const common = {
|
|
5
|
-
shardTestFiles: parseInt(process.env.THREADS) !== 1,
|
|
6
|
-
maxInstances: process.env.THREADS ? parseInt(process.env.THREADS) : 4
|
|
7
|
-
};
|
|
8
|
-
const chrome = {
|
|
9
|
-
...common,
|
|
10
|
-
browserName: "chrome",
|
|
11
|
-
chromeOptions: {
|
|
12
|
-
args: ["--headless", "--disable-gpu", `window-size=${width}x${height}`, "--no-sandbox", "--disable-dev-shm-usage"]
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const firefox = {
|
|
17
|
-
...common,
|
|
18
|
-
browserName: "firefox",
|
|
19
|
-
"firefoxOptions": {
|
|
20
|
-
args: ["--headless", `--width=${width}', '--height=${height}`]
|
|
21
|
-
},
|
|
22
|
-
"moz:firefoxOptions": {
|
|
23
|
-
args: ["--headless", `--width=${width}', '--height=${height}`]
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
let multiCapabilities = [chrome];
|
|
28
|
-
if (process.env.TEST_BROWSER === "firefox") {
|
|
29
|
-
multiCapabilities = [firefox];
|
|
30
|
-
} else if (process.env.TEST_BROWSER === "multi") {
|
|
31
|
-
multiCapabilities = [chrome, firefox];
|
|
32
|
-
}
|
|
33
|
-
if (process.env.HEADLESS && process.env.HEADLESS !== "true") multiCapabilities.forEach(capabilities => {
|
|
34
|
-
const options = [capabilities["chromeOptions"], capabilities["firefoxOptions"], capabilities["moz:firefoxOptions"]];
|
|
35
|
-
options.filter(o => o).forEach(_options => {
|
|
36
|
-
_options.args = _options.args.filter(a => a !== "--headless");
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
exports.config = {
|
|
41
|
-
specs: ["test/*-spec.ts"],
|
|
42
|
-
multiCapabilities,
|
|
43
|
-
maxSessions: 4,
|
|
44
|
-
SELENIUM_PROMISE_MANAGER: false,
|
|
45
|
-
onPrepare: async () => {
|
|
46
|
-
require("ts-node").register({
|
|
47
|
-
project: require("path").join(__dirname, "./tsconfig.json")
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
browser.waitForAngularEnabled(false);
|
|
51
|
-
|
|
52
|
-
// Set manually since Firefox cli size options don't work.
|
|
53
|
-
await browser.driver.manage().window().setSize(width, height);
|
|
54
|
-
},
|
|
55
|
-
plugins: multiCapabilities.length === 1 && multiCapabilities[0] === chrome && [{
|
|
56
|
-
package: "protractor-console-plugin",
|
|
57
|
-
exclude: [/Uncaught \(in promise\)/]
|
|
58
|
-
}]
|
|
59
|
-
};
|