@wcardinal/wcardinal-ui 0.446.0 → 0.447.0
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 +24 -28
- package/dist/types/wcardinal/ui/d-dialog.d.ts +9 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-dialog.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-dialog.d.ts +1 -0
- package/dist/wcardinal/ui/d-dialog.js +48 -2
- package/dist/wcardinal/ui/d-dialog.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-dialog.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-dialog.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +4 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +4 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +4 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +4 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +4 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +4 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +55 -3
- package/dist/wcardinal-ui.js +49 -3
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
###
|
|
1
|
+
### WinterCardinal UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
WebGL-based UI library
|
|
4
4
|
|
|
5
5
|
### Installation
|
|
6
6
|
|
|
@@ -13,12 +13,12 @@ npm i @wcardinal/wcardinal-ui
|
|
|
13
13
|
Please note that this package has no default exports.
|
|
14
14
|
|
|
15
15
|
```javascript
|
|
16
|
-
import { loadAll,
|
|
16
|
+
import { loadAll, loadThemeWhiteEnUsAll, DApplication, DButtonCheck } from "@wcardinal/wcardinal-ui";
|
|
17
17
|
|
|
18
18
|
// Loads all the optional modules and the white theme.
|
|
19
|
-
// This is required for the tree shaking
|
|
19
|
+
// This is required for the tree shaking.
|
|
20
20
|
loadAll();
|
|
21
|
-
|
|
21
|
+
loadThemeWhiteEnUsAll();
|
|
22
22
|
|
|
23
23
|
// Make a new application
|
|
24
24
|
const application = new DApplication();
|
|
@@ -35,30 +35,30 @@ new DButtonCheck({
|
|
|
35
35
|
#### CDN
|
|
36
36
|
|
|
37
37
|
```html
|
|
38
|
-
<script src="https://cdn.jsdelivr.net/npm/pixi.js/dist/pixi.min.js"></script>
|
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/pixi.js@5.3.12/dist/pixi.min.js"></script>
|
|
39
39
|
<script src="https://cdn.jsdelivr.net/npm/@wcardinal/wcardinal-ui/dist/wcardinal-ui.min.js"></script>
|
|
40
40
|
<script src="https://cdn.jsdelivr.net/npm/@wcardinal/wcardinal-ui/dist/wcardinal-ui-theme-white.min.js"></script>
|
|
41
41
|
<script>
|
|
42
|
-
(
|
|
43
|
-
|
|
42
|
+
(() => {
|
|
43
|
+
"use strict";
|
|
44
44
|
|
|
45
45
|
// Make a new application
|
|
46
|
-
|
|
46
|
+
const application = new wcardinal.ui.DApplication();
|
|
47
47
|
|
|
48
48
|
// Make a new check button
|
|
49
49
|
new wcardinal.ui.DButtonCheck({
|
|
50
50
|
parent: application.stage,
|
|
51
51
|
text: {
|
|
52
|
-
value:
|
|
52
|
+
value: "Check"
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
}()
|
|
55
|
+
})();
|
|
56
56
|
</script>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
All the classes are in `wcardinal.ui`.
|
|
60
|
-
Please note that `loadAll` and `
|
|
61
|
-
Prebuild files `wcardinal-ui.min.js` and `wcardinal-ui-theme-white.min.js` call `loadAll` and `
|
|
60
|
+
Please note that `loadAll` and `loadThemeWhiteEnUsAll` is not required in this case.
|
|
61
|
+
Prebuild files `wcardinal-ui.min.js` and `wcardinal-ui-theme-white.min.js` call `loadAll` and `loadThemeWhiteEnUsAll` for you.
|
|
62
62
|
|
|
63
63
|
See [sample/cdn](https://winter-cardinal.github.io/winter-cardinal-ui/sample/white/other/cdn.html) for a complete example.
|
|
64
64
|
|
|
@@ -69,15 +69,15 @@ because all the UI classes and their themes are included.
|
|
|
69
69
|
This is why the tree shaking is important for this library.
|
|
70
70
|
|
|
71
71
|
`loadAll` loads all the optional modules (e.g., `DMenuItemCheck`).
|
|
72
|
-
And `
|
|
72
|
+
And `loadThemeWhiteEnUsAll` loads the white theme (e.g., `DThemeWhite`).
|
|
73
73
|
To remove unnecessary modules from your build, pick `load*` functions you need.
|
|
74
74
|
|
|
75
75
|
```javascript
|
|
76
|
-
import {
|
|
76
|
+
import { loadThemeWhiteEnUsAll } from "@wcardinal/wcardinal-ui";
|
|
77
77
|
|
|
78
78
|
// Loads the white theme only.
|
|
79
79
|
// `DMenuItemCheck` will not be in your compiled package, for instance.
|
|
80
|
-
|
|
80
|
+
loadThemeWhiteEnUsAll();
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
### Documentation
|
|
@@ -86,6 +86,7 @@ loadThemeWhiteAll();
|
|
|
86
86
|
* Samples
|
|
87
87
|
* [White theme](https://winter-cardinal.github.io/winter-cardinal-ui/sample/white/)
|
|
88
88
|
* [Dark theme](https://winter-cardinal.github.io/winter-cardinal-ui/sample/dark/)
|
|
89
|
+
* [Starter](https://github.com/winter-cardinal/winter-cardinal-starter)
|
|
89
90
|
|
|
90
91
|
### Requirements
|
|
91
92
|
|
|
@@ -96,17 +97,17 @@ loadThemeWhiteAll();
|
|
|
96
97
|
* Not required if your theme doesn't use it
|
|
97
98
|
* Stencil support
|
|
98
99
|
|
|
99
|
-
### How to
|
|
100
|
+
### How to Build
|
|
100
101
|
|
|
101
102
|
The following commands are for building `@wcardinal/wcardinal-ui` itself.
|
|
102
103
|
|
|
103
|
-
#### JS for
|
|
104
|
+
#### JS for Release
|
|
104
105
|
|
|
105
106
|
```shell
|
|
106
107
|
npm run build
|
|
107
108
|
```
|
|
108
109
|
|
|
109
|
-
#### JS for
|
|
110
|
+
#### JS for Development
|
|
110
111
|
|
|
111
112
|
```shell
|
|
112
113
|
npm run watch:ts
|
|
@@ -118,13 +119,13 @@ and then in an another terminal
|
|
|
118
119
|
npm run watch:rollup
|
|
119
120
|
```
|
|
120
121
|
|
|
121
|
-
#### Development
|
|
122
|
+
#### Development Server
|
|
122
123
|
|
|
123
124
|
```shell
|
|
124
125
|
npm start
|
|
125
126
|
```
|
|
126
127
|
|
|
127
|
-
#### API
|
|
128
|
+
#### API Document
|
|
128
129
|
|
|
129
130
|
Update `gitRevision` in `typedoc.json` and then do
|
|
130
131
|
|
|
@@ -132,7 +133,7 @@ Update `gitRevision` in `typedoc.json` and then do
|
|
|
132
133
|
npm run build:api
|
|
133
134
|
```
|
|
134
135
|
|
|
135
|
-
#### Sample
|
|
136
|
+
#### Sample Index Page
|
|
136
137
|
|
|
137
138
|
```shell
|
|
138
139
|
npm run build:sample:index
|
|
@@ -145,7 +146,7 @@ npm run build:sample:index
|
|
|
145
146
|
npm run build:sample:dark
|
|
146
147
|
```
|
|
147
148
|
|
|
148
|
-
#### Samples for GitHub
|
|
149
|
+
#### Samples for GitHub Pages
|
|
149
150
|
|
|
150
151
|
```shell
|
|
151
152
|
npm run build
|
|
@@ -165,11 +166,6 @@ To fix all the auto-fixable lint errors, do the following:
|
|
|
165
166
|
npm run lint:fix
|
|
166
167
|
```
|
|
167
168
|
|
|
168
|
-
### TODO
|
|
169
|
-
|
|
170
|
-
* DTable select / action arguments.
|
|
171
|
-
* Provides DText text style accessors.
|
|
172
|
-
|
|
173
169
|
### License
|
|
174
170
|
|
|
175
171
|
Apache License Version 2.0.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Point, Rectangle } from "pixi.js";
|
|
1
|
+
import { DisplayObject, Point, Rectangle } from "pixi.js";
|
|
2
2
|
import { DAnimation } from "./d-animation";
|
|
3
3
|
import { DApplicationLayerLike } from "./d-application-layer-like";
|
|
4
4
|
import { DBase, DBaseEvents, DBaseOptions, DThemeBase } from "./d-base";
|
|
@@ -44,6 +44,7 @@ export interface DDialogOptions<THEME extends DThemeDialog = DThemeDialog, EMITT
|
|
|
44
44
|
* A dialog mode.
|
|
45
45
|
*/
|
|
46
46
|
mode?: DDialogMode | keyof typeof DDialogMode;
|
|
47
|
+
alwaysOnTop?: boolean;
|
|
47
48
|
sticky?: boolean;
|
|
48
49
|
gesture?: boolean | DDialogGestureOptions;
|
|
49
50
|
align?: DDialogAlign | null | keyof typeof DDialogAlign;
|
|
@@ -59,6 +60,7 @@ export interface DThemeDialog extends DThemeBase {
|
|
|
59
60
|
getMode(): DDialogMode;
|
|
60
61
|
closeOn(mode: DDialogMode): DDialogCloseOn;
|
|
61
62
|
isSticky(mode: DDialogMode): boolean;
|
|
63
|
+
isAlwaysOnTop(): boolean;
|
|
62
64
|
isGestureEnabled(mode: DDialogMode): boolean;
|
|
63
65
|
getGestureMode(mode: DDialogMode): DDialogGestureMode;
|
|
64
66
|
getOffsetX(mode: DDialogMode): number;
|
|
@@ -90,6 +92,8 @@ export declare class DDialog<VALUE = void, THEME extends DThemeDialog = DThemeDi
|
|
|
90
92
|
protected _focused?: DFocusable | null;
|
|
91
93
|
protected _overlay: UtilOverlay;
|
|
92
94
|
protected _mode: DDialogMode;
|
|
95
|
+
protected _alwaysOnTop: boolean;
|
|
96
|
+
protected _onParentChildAddedBound?: () => void;
|
|
93
97
|
protected _sticky: boolean;
|
|
94
98
|
protected _onPrerenderBound: () => void;
|
|
95
99
|
protected _align: DDialogAlign | null;
|
|
@@ -102,6 +106,8 @@ export declare class DDialog<VALUE = void, THEME extends DThemeDialog = DThemeDi
|
|
|
102
106
|
get mode(): DDialogMode;
|
|
103
107
|
get align(): DDialogAlign | null;
|
|
104
108
|
set algin(align: DDialogAlign | null);
|
|
109
|
+
get alwaysOnTop(): boolean;
|
|
110
|
+
set alwaysOnTop(alwaysOnTop: boolean);
|
|
105
111
|
get gesture(): DDialogGesture<this>;
|
|
106
112
|
get layer(): DApplicationLayerLike | null;
|
|
107
113
|
protected toGestureOptions(mode: DDialogMode, theme: THEME, options?: OPTIONS): DDialogGestureOptions;
|
|
@@ -119,6 +125,8 @@ export declare class DDialog<VALUE = void, THEME extends DThemeDialog = DThemeDi
|
|
|
119
125
|
* @returns a value of this dialog
|
|
120
126
|
*/
|
|
121
127
|
open(opener?: DDialogOpener): Promise<VALUE>;
|
|
128
|
+
protected onParentChildAdded(): void;
|
|
129
|
+
protected compareAlwaysOnTop(this: unknown, a: DisplayObject, b: DisplayObject): number;
|
|
122
130
|
protected onPrerender(): void;
|
|
123
131
|
protected onOpen(): void;
|
|
124
132
|
isOpened(): boolean;
|
|
@@ -14,6 +14,7 @@ export declare class DThemeDarkDialog extends DThemeDarkBase implements DThemeDi
|
|
|
14
14
|
getMode(): DDialogMode;
|
|
15
15
|
closeOn(mode: DDialogMode): DDialogCloseOn;
|
|
16
16
|
isSticky(mode: DDialogMode): boolean;
|
|
17
|
+
isAlwaysOnTop(): boolean;
|
|
17
18
|
isGestureEnabled(mode: DDialogMode): boolean;
|
|
18
19
|
getGestureMode(mode: DDialogMode): DDialogGestureMode;
|
|
19
20
|
getOffsetX(mode: DDialogMode): number;
|
|
@@ -14,6 +14,7 @@ export declare class DThemeWhiteDialog extends DThemeWhiteBase implements DTheme
|
|
|
14
14
|
getMode(): DDialogMode;
|
|
15
15
|
closeOn(mode: DDialogMode): DDialogCloseOn;
|
|
16
16
|
isSticky(mode: DDialogMode): boolean;
|
|
17
|
+
isAlwaysOnTop(): boolean;
|
|
17
18
|
isGestureEnabled(mode: DDialogMode): boolean;
|
|
18
19
|
getGestureMode(mode: DDialogMode): DDialogGestureMode;
|
|
19
20
|
getOffsetX(mode: DDialogMode): number;
|
|
@@ -38,7 +38,7 @@ var DDialog = /** @class */ (function (_super) {
|
|
|
38
38
|
}
|
|
39
39
|
DDialog.prototype.init = function (options) {
|
|
40
40
|
var _this = this;
|
|
41
|
-
var _a, _b;
|
|
41
|
+
var _a, _b, _c;
|
|
42
42
|
_super.prototype.init.call(this, options);
|
|
43
43
|
this._onPrerenderBound = function () {
|
|
44
44
|
_this.onPrerender();
|
|
@@ -48,8 +48,10 @@ var DDialog = /** @class */ (function (_super) {
|
|
|
48
48
|
var theme = this.theme;
|
|
49
49
|
var mode = toEnum((_a = options === null || options === void 0 ? void 0 : options.mode) !== null && _a !== void 0 ? _a : theme.getMode(), DDialogMode);
|
|
50
50
|
this._mode = mode;
|
|
51
|
+
// Always On Top
|
|
52
|
+
this._alwaysOnTop = (_b = options === null || options === void 0 ? void 0 : options.alwaysOnTop) !== null && _b !== void 0 ? _b : theme.isAlwaysOnTop();
|
|
51
53
|
// Sticky
|
|
52
|
-
this._sticky = (
|
|
54
|
+
this._sticky = (_c = options === null || options === void 0 ? void 0 : options.sticky) !== null && _c !== void 0 ? _c : theme.isSticky(mode);
|
|
53
55
|
// Close On
|
|
54
56
|
var closeOn = this.toCloseOn(mode, theme, options);
|
|
55
57
|
this._closeOn = closeOn;
|
|
@@ -130,6 +132,16 @@ var DDialog = /** @class */ (function (_super) {
|
|
|
130
132
|
enumerable: false,
|
|
131
133
|
configurable: true
|
|
132
134
|
});
|
|
135
|
+
Object.defineProperty(DDialog.prototype, "alwaysOnTop", {
|
|
136
|
+
get: function () {
|
|
137
|
+
return this._alwaysOnTop;
|
|
138
|
+
},
|
|
139
|
+
set: function (alwaysOnTop) {
|
|
140
|
+
this._alwaysOnTop = alwaysOnTop;
|
|
141
|
+
},
|
|
142
|
+
enumerable: false,
|
|
143
|
+
configurable: true
|
|
144
|
+
});
|
|
133
145
|
Object.defineProperty(DDialog.prototype, "gesture", {
|
|
134
146
|
get: function () {
|
|
135
147
|
return this._gesture;
|
|
@@ -236,6 +248,7 @@ var DDialog = /** @class */ (function (_super) {
|
|
|
236
248
|
*/
|
|
237
249
|
DDialog.prototype.open = function (opener) {
|
|
238
250
|
var _this = this;
|
|
251
|
+
var _a;
|
|
239
252
|
var result = this._promise;
|
|
240
253
|
if (result == null) {
|
|
241
254
|
result = new Promise(function (resolve, reject) {
|
|
@@ -279,11 +292,37 @@ var DDialog = /** @class */ (function (_super) {
|
|
|
279
292
|
gesture.constraint(this, layer, position.x, position.y);
|
|
280
293
|
}
|
|
281
294
|
}
|
|
295
|
+
// Always On Top
|
|
296
|
+
if (this._alwaysOnTop) {
|
|
297
|
+
var parent_2 = this.parent;
|
|
298
|
+
if (parent_2 != null) {
|
|
299
|
+
parent_2.on("childAdded", ((_a = this._onParentChildAddedBound) !== null && _a !== void 0 ? _a : (this._onParentChildAddedBound = function () {
|
|
300
|
+
_this.onParentChildAdded();
|
|
301
|
+
})));
|
|
302
|
+
this.onParentChildAdded();
|
|
303
|
+
}
|
|
304
|
+
}
|
|
282
305
|
// Done
|
|
283
306
|
this.onOpen();
|
|
284
307
|
}
|
|
285
308
|
return result;
|
|
286
309
|
};
|
|
310
|
+
DDialog.prototype.onParentChildAdded = function () {
|
|
311
|
+
var parent = this.parent;
|
|
312
|
+
if (parent != null) {
|
|
313
|
+
parent.children.sort(this.compareAlwaysOnTop);
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
DDialog.prototype.compareAlwaysOnTop = function (a, b) {
|
|
317
|
+
var at = a instanceof DDialog && a.alwaysOnTop;
|
|
318
|
+
var bt = b instanceof DDialog && b.alwaysOnTop;
|
|
319
|
+
if (at) {
|
|
320
|
+
return bt ? 0 : +1;
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
return bt ? -1 : 0;
|
|
324
|
+
}
|
|
325
|
+
};
|
|
287
326
|
DDialog.prototype.onPrerender = function () {
|
|
288
327
|
var _a;
|
|
289
328
|
var layer = this._layer;
|
|
@@ -379,6 +418,13 @@ var DDialog = /** @class */ (function (_super) {
|
|
|
379
418
|
this.visible = false;
|
|
380
419
|
this.onAnimationEnd(true);
|
|
381
420
|
}
|
|
421
|
+
// Always On Top
|
|
422
|
+
if (this._alwaysOnTop) {
|
|
423
|
+
var parent_3 = this.parent;
|
|
424
|
+
if (parent_3 != null) {
|
|
425
|
+
parent_3.off("childAdded", this._onParentChildAddedBound);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
382
428
|
this.emit("close", this);
|
|
383
429
|
};
|
|
384
430
|
DDialog.prototype.onKeyDown = function (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-dialog.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAS,SAAS,EAAE,MAAM,SAAS,CAAC;AAG3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAyC,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB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AsZd","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Point, Rectangle } from \"pixi.js\";\nimport { DAnimation } from \"./d-animation\";\nimport { DApplicationLayerLike } from \"./d-application-layer-like\";\nimport { DApplications } from \"./d-applications\";\nimport { DBase, DBaseEvents, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseState } from \"./d-base-state\";\nimport { DControllerFocus, DFocusable } from \"./d-controller-focus\";\nimport { DDialogAlign } from \"./d-dialog-align\";\nimport { DDialogCloseOn } from \"./d-dialog-close-on\";\nimport { DDialogGesture, DDialogGestureOptions } from \"./d-dialog-gesture\";\nimport { DDialogGestureImpl } from \"./d-dialog-gesture-impl\";\nimport { DDialogGestureMode } from \"./d-dialog-gesture-mode\";\nimport { DDialogMode } from \"./d-dialog-mode\";\nimport { DDialogState } from \"./d-dialog-state\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { DPadding } from \"./d-padding\";\nimport { isArray } from \"./util/is-array\";\nimport { isString } from \"./util/is-string\";\nimport { toEnum } from \"./util/to-enum\";\nimport { UtilAttach } from \"./util/util-attach\";\nimport { UtilClickOutside } from \"./util/util-click-outside\";\nimport { UtilKeyboardEvent } from \"./util/util-keyboard-event\";\nimport { UtilOverlay } from \"./util/util-overlay\";\nimport { DApplicationTarget } from \"./d-application-like\";\n\n/**\n * {@link DDialog} events.\n */\nexport interface DDialogEvents<EMITTER> extends DBaseEvents<EMITTER> {\n\t/**\n\t * Triggered when a dialog is opened.\n\t *\n\t * @param emitter this\n\t */\n\topen(emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a dialog is closed.\n\t *\n\t * @param emitter this\n\t */\n\tclose(emitter: EMITTER): void;\n}\n\n/**\n * {@link DDialog} `on` options.\n */\nexport interface DDialogOnOptions<EMITTER> extends Partial<DDialogEvents<EMITTER>>, DOnOptions {}\n\n/**\n * {@link DDialog} options.\n */\nexport interface DDialogOptions<THEME extends DThemeDialog = DThemeDialog, EMITTER = any>\n\textends DBaseOptions<THEME> {\n\tcloseOn?: DDialogCloseOn | Array<keyof typeof DDialogCloseOn> | keyof typeof DDialogCloseOn;\n\n\tanimation?: DAnimation<DBase>;\n\n\t/**\n\t * A dialog mode.\n\t */\n\tmode?: DDialogMode | keyof typeof DDialogMode;\n\n\tsticky?: boolean;\n\n\tgesture?: boolean | DDialogGestureOptions;\n\n\talign?: DDialogAlign | null | keyof typeof DDialogAlign;\n\n\t/**\n\t * Mappings of event names and handlers.\n\t */\n\ton?: DDialogOnOptions<EMITTER>;\n}\n\n/**\n * {@link DDialog} theme.\n */\nexport interface DThemeDialog extends DThemeBase {\n\tgetMode(): DDialogMode;\n\tcloseOn(mode: DDialogMode): DDialogCloseOn;\n\tisSticky(mode: DDialogMode): boolean;\n\tisGestureEnabled(mode: DDialogMode): boolean;\n\tgetGestureMode(mode: DDialogMode): DDialogGestureMode;\n\tgetOffsetX(mode: DDialogMode): number;\n\tgetOffsetY(mode: DDialogMode): number;\n\tgetAlign(mode: DDialogMode): DDialogAlign | null;\n\tnewAnimation(mode: DDialogMode): DAnimation<DBase> | null;\n}\n\nexport interface DDialogOpener extends DApplicationTarget {\n\tgetBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle;\n}\n\n/**\n * A dialog class.\n *\n * If multiple application instances are there, better to set the constructor\n * option `parent` to an `application.stage` so that the dialog picks a right\n * application. `DDialog` searches applications in a following order:\n *\n * * To begin, `DDialog` tries to find applications which it belongs to.\n * * If `DDialog` can't find applications, then `DDialog` tries to find applications which openers belong to.\n * * If openers are not given, `DDialog` assumes the last created application at the very moment `DDialog` is instantiated is the one it belongs to.\n */\nexport class DDialog<\n\tVALUE = void,\n\tTHEME extends DThemeDialog = DThemeDialog,\n\tOPTIONS extends DDialogOptions<THEME> = DDialogOptions<THEME>\n> extends DBase<THEME, OPTIONS> {\n\tprotected static WORK_BOUNDS?: Rectangle;\n\n\tprotected _promise?: Promise<VALUE>;\n\tprotected _resolve?: (value: VALUE | PromiseLike<VALUE>) => void;\n\tprotected _reject?: (reason?: any) => void;\n\n\tprotected _animation?: DAnimation<DBase> | null;\n\tprotected _closeOn!: DDialogCloseOn;\n\tprotected _focused?: DFocusable | null;\n\tprotected _overlay!: UtilOverlay;\n\tprotected _mode!: DDialogMode;\n\tprotected _sticky!: boolean;\n\tprotected _onPrerenderBound!: () => void;\n\tprotected _align!: DDialogAlign | null;\n\tprotected _opener?: DDialogOpener | null;\n\n\tprotected _gesture!: DDialogGesture<this>;\n\tprotected _layer!: DApplicationLayerLike | null;\n\n\tprotected init(options?: OPTIONS): void {\n\t\tsuper.init(options);\n\n\t\tthis._onPrerenderBound = (): void => {\n\t\t\tthis.onPrerender();\n\t\t};\n\t\tthis._layer = null;\n\n\t\t// Mode\n\t\tconst theme = this.theme;\n\t\tconst mode = toEnum(options?.mode ?? theme.getMode(), DDialogMode);\n\t\tthis._mode = mode;\n\n\t\t// Sticky\n\t\tthis._sticky = options?.sticky ?? theme.isSticky(mode);\n\n\t\t// Close On\n\t\tconst closeOn = this.toCloseOn(mode, theme, options);\n\t\tthis._closeOn = closeOn;\n\n\t\t// Align\n\t\tthis._align = this.toAlign(mode, theme, options);\n\n\t\t// Overlay\n\t\tthis._overlay = new UtilOverlay();\n\n\t\t// Gesture\n\t\tthis._gesture = new DDialogGestureImpl(this, this.toGestureOptions(mode, theme, options));\n\n\t\t// Visibility\n\t\tthis.visible = false;\n\n\t\t// State\n\t\tswitch (mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\t\tthis.state.addAll(DBaseState.FOCUS_ROOT, DDialogState.MODAL);\n\t\t\t\tbreak;\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\tthis.state.add(DDialogState.MODELESS);\n\t\t\t\tbreak;\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\tthis.state.addAll(DBaseState.FOCUS_ROOT, DDialogState.MENU);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Outside-click handling\n\t\tif (closeOn & DDialogCloseOn.CLICK_OUTSIDE) {\n\t\t\tUtilClickOutside.apply(this, (): void => {\n\t\t\t\tthis.onCloseOn();\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected toCloseOn(mode: DDialogMode, theme: THEME, options?: OPTIONS): DDialogCloseOn {\n\t\tconst closeOn = options?.closeOn;\n\t\tif (closeOn == null) {\n\t\t\treturn theme.closeOn(mode);\n\t\t} else if (isArray(closeOn)) {\n\t\t\tlet result = DDialogCloseOn.NONE;\n\t\t\tfor (let i = 0, imax = closeOn.length; i < imax; ++i) {\n\t\t\t\tresult |= DDialogCloseOn[closeOn[i]];\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if (isString(closeOn)) {\n\t\t\treturn DDialogCloseOn[closeOn];\n\t\t}\n\t\treturn closeOn;\n\t}\n\n\tprotected toAlign(mode: DDialogMode, theme: THEME, options?: OPTIONS): DDialogAlign | null {\n\t\tconst align = options?.align;\n\t\tif (align === null) {\n\t\t\treturn null;\n\t\t} else if (align === undefined) {\n\t\t\treturn theme.getAlign(mode);\n\t\t} else {\n\t\t\treturn toEnum(align, DDialogAlign);\n\t\t}\n\t}\n\n\tget mode(): DDialogMode {\n\t\treturn this._mode;\n\t}\n\n\tget align(): DDialogAlign | null {\n\t\treturn this._align;\n\t}\n\n\tset algin(align: DDialogAlign | null) {\n\t\tthis._align = align;\n\t}\n\n\tget gesture(): DDialogGesture<this> {\n\t\treturn this._gesture;\n\t}\n\n\tget layer(): DApplicationLayerLike | null {\n\t\treturn this._layer;\n\t}\n\n\tprotected toGestureOptions(\n\t\tmode: DDialogMode,\n\t\ttheme: THEME,\n\t\toptions?: OPTIONS\n\t): DDialogGestureOptions {\n\t\tconst gesture = options?.gesture;\n\t\tif (gesture === true) {\n\t\t\treturn {\n\t\t\t\tenable: true,\n\t\t\t\tmode: theme.getGestureMode(mode)\n\t\t\t};\n\t\t} else if (gesture === false) {\n\t\t\treturn {\n\t\t\t\tenable: false,\n\t\t\t\tmode: theme.getGestureMode(mode)\n\t\t\t};\n\t\t} else if (gesture != null) {\n\t\t\tif (gesture.enable === undefined) {\n\t\t\t\tgesture.enable = theme.isGestureEnabled(mode);\n\t\t\t}\n\t\t\tif (gesture.mode === undefined) {\n\t\t\t\tgesture.mode = theme.getGestureMode(mode);\n\t\t\t}\n\t\t\treturn gesture;\n\t\t}\n\t\treturn {\n\t\t\tenable: theme.isGestureEnabled(mode),\n\t\t\tmode: theme.getGestureMode(mode)\n\t\t};\n\t}\n\n\tonParentResize(parentWidth: number, parentHeight: number, parentPadding: DPadding): void {\n\t\tif (this.isOpened()) {\n\t\t\tconst layer = this._layer;\n\t\t\tif (layer != null) {\n\t\t\t\tconst gesture = this._gesture;\n\t\t\t\tif (gesture.isDirty()) {\n\t\t\t\t\tconst position = this.position;\n\t\t\t\t\tgesture.constraint(this, layer, position.x, position.y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsuper.onParentResize(parentWidth, parentHeight, parentPadding);\n\t}\n\n\tprotected getAnimation(): DAnimation | null {\n\t\tlet result = this._animation;\n\t\tif (result === undefined) {\n\t\t\tresult = this._options?.animation ?? this.theme.newAnimation(this._mode);\n\t\t\tif (result) {\n\t\t\t\tresult.target = this;\n\t\t\t\tresult.on(\"end\", (isReverse: boolean): void => {\n\t\t\t\t\tthis.onAnimationEnd(isReverse);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._animation = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onAnimationEnd(isReverse: boolean): void {\n\t\tif (isReverse) {\n\t\t\tif (this._mode === DDialogMode.MODELESS) {\n\t\t\t\tthis.hide();\n\t\t\t} else {\n\t\t\t\tconst parent = this.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tparent.removeChild(this);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst layer = DApplications.getLayer(this);\n\t\t\tif (layer) {\n\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\tthis._focused = focusController.get();\n\t\t\t\tfocusController.focus(this.findFirstFocusable(focusController) || this);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected findFirstFocusable(focusController: DControllerFocus): DFocusable | null {\n\t\treturn focusController.find(this, false, true, true);\n\t}\n\n\t/**\n\t * Opens a dialog.\n\t *\n\t * @param opener An opener of a dialog.\n\t * The dialog position is determined based on a position and a size of the opener.\n\t * If the opener is undefined, the dialog is placed at the center of the screen.\n\t *\n\t * @returns a value of this dialog\n\t */\n\topen(opener?: DDialogOpener): Promise<VALUE> {\n\t\tlet result = this._promise;\n\t\tif (result == null) {\n\t\t\tresult = new Promise<VALUE>((resolve, reject): void => {\n\t\t\t\tthis._resolve = resolve;\n\t\t\t\tthis._reject = reject;\n\t\t\t});\n\t\t\tthis._promise = result;\n\n\t\t\tthis._opener = opener;\n\n\t\t\t// Attach to a layer\n\t\t\tlet layer: DApplicationLayerLike | null = null;\n\t\t\tswitch (this._mode) {\n\t\t\t\tcase DDialogMode.MODAL:\n\t\t\t\tcase DDialogMode.MENU:\n\t\t\t\t\tlayer = this._overlay.pick(this, opener);\n\t\t\t\t\tlayer.stage.addChild(this);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\t\tlayer = DApplications.getLayer(this);\n\t\t\t\t\tthis.show();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis._layer = layer;\n\n\t\t\t// Position & size\n\t\t\tconst gesture = this._gesture;\n\t\t\tif (gesture.mode === DDialogGestureMode.CLEAN) {\n\t\t\t\tgesture.toClean();\n\t\t\t}\n\t\t\tif (layer != null) {\n\t\t\t\tif (gesture.isClean()) {\n\t\t\t\t\tconst renderer = layer.renderer;\n\t\t\t\t\tconst onPrerenderBound = this._onPrerenderBound;\n\t\t\t\t\tif (this._sticky) {\n\t\t\t\t\t\trenderer.on(\"prerender\", onPrerenderBound);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trenderer.once(\"prerender\", onPrerenderBound);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst position = this.position;\n\t\t\t\t\tgesture.constraint(this, layer, position.x, position.y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Done\n\t\t\tthis.onOpen();\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onPrerender(): void {\n\t\tconst layer = this._layer;\n\t\tif (layer == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst align = this._align;\n\t\tif (align === DDialogAlign.NONE) {\n\t\t\treturn;\n\t\t}\n\t\tconst opener = this._opener;\n\t\tif (align != null && opener != null) {\n\t\t\tconst mode = this._mode;\n\t\t\tconst bounds = opener.getBounds(false, (DDialog.WORK_BOUNDS ??= new Rectangle()));\n\t\t\tconst theme = this.theme;\n\t\t\tUtilAttach.attach(\n\t\t\t\tthis,\n\t\t\t\tbounds,\n\t\t\t\ttheme.getOffsetX(mode),\n\t\t\t\ttheme.getOffsetY(mode),\n\t\t\t\tlayer.width,\n\t\t\t\tlayer.height,\n\t\t\t\talign\n\t\t\t);\n\t\t} else {\n\t\t\tthis.position.set((layer.width - this.width) * 0.5, (layer.height - this.height) * 0.5);\n\t\t}\n\t}\n\n\tprotected onOpen(): void {\n\t\tthis.emit(\"open\", this);\n\n\t\t// Animation\n\t\tconst animation = this.getAnimation();\n\t\tif (animation) {\n\t\t\tanimation.start();\n\t\t} else if (this._mode === DDialogMode.MENU) {\n\t\t\tthis.visible = true;\n\t\t\tthis.onAnimationEnd(false);\n\t\t}\n\t}\n\n\tisOpened(): boolean {\n\t\treturn this._promise != null;\n\t}\n\n\tclose(): void {\n\t\tthis.doReject();\n\t}\n\n\tprotected doResolve(value: VALUE | PromiseLike<VALUE>): void {\n\t\tconst resolve = this._resolve;\n\t\tif (resolve) {\n\t\t\tthis._promise = undefined;\n\t\t\tthis._resolve = undefined;\n\t\t\tthis._reject = undefined;\n\n\t\t\tthis.onClose();\n\n\t\t\tresolve(value);\n\t\t}\n\t}\n\n\tprotected doReject(reason?: any): void {\n\t\tconst reject = this._reject;\n\t\tif (reject) {\n\t\t\tthis._promise = undefined;\n\t\t\tthis._resolve = undefined;\n\t\t\tthis._reject = undefined;\n\n\t\t\tthis.onClose();\n\n\t\t\treject(reason);\n\t\t}\n\t}\n\n\tprotected onClose(): void {\n\t\t// Focus\n\t\tconst layer = this._layer;\n\t\tconst focused = this._focused;\n\t\tif (focused != null) {\n\t\t\tthis._focused = null;\n\t\t\tif (layer) {\n\t\t\t\tconst focusedLayer = DApplications.getLayer(focused);\n\t\t\t\tif (focusedLayer != null && layer !== focusedLayer) {\n\t\t\t\t\tfocusedLayer.view.focus();\n\t\t\t\t}\n\t\t\t\tlayer.getFocusController().focus(focused);\n\t\t\t} else {\n\t\t\t\tthis.blur(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.blur(true);\n\t\t}\n\n\t\t// Remove the prerender event handler and forget the layer\n\t\tif (layer) {\n\t\t\tlayer.renderer.off(\"prerender\", this._onPrerenderBound);\n\t\t\tthis._layer = null;\n\t\t}\n\n\t\t// Forget the opener\n\t\tthis._opener = null;\n\n\t\t// Animation\n\t\tconst animation = this.getAnimation();\n\t\tif (animation) {\n\t\t\tanimation.start(true);\n\t\t} else {\n\t\t\tthis.visible = false;\n\t\t\tthis.onAnimationEnd(true);\n\t\t}\n\n\t\tthis.emit(\"close\", this);\n\t}\n\n\tprotected onKeyDown(e: KeyboardEvent): boolean {\n\t\tif (this._closeOn & DDialogCloseOn.ESC) {\n\t\t\tif (UtilKeyboardEvent.isCancelKey(e)) {\n\t\t\t\tthis.onCloseOn();\n\t\t\t}\n\t\t}\n\t\treturn super.onKeyDown(e);\n\t}\n\n\tprotected onCloseOn(): void {\n\t\tthis.close();\n\t}\n\n\tprotected containsGlobalPoint(point: Point): boolean {\n\t\tswitch (this._mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\treturn true;\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\treturn super.containsGlobalPoint(point);\n\t\t}\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDialog\";\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-dialog.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAwB,SAAS,EAAE,MAAM,SAAS,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAyC,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA2ElD;;;;;;;;;;GAUG;AACH;IAIU,2BAAqB;IAJ/B;;IA8cA,CAAC;IApbU,sBAAI,GAAd,UAAe,OAAiB;QAAhC,iBAsDC;;QArDA,iBAAM,IAAI,YAAC,OAAO,CAAC,CAAC;QAEpB,IAAI,CAAC,iBAA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,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC;aACxD;SACD;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC1B,CAAC;IAES,2BAAS,GAAnB,UAAoB,CAAgB;QACnC,IAAI,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,GAAG,EAAE;YACvC,IAAI,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;gBACrC,IAAI,CAAC,SAAS,EAAE,CAAC;aACjB;SACD;QACD,OAAO,iBAAM,SAAS,YAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAES,2BAAS,GAAnB;QACC,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC;IAES,qCAAmB,GAA7B,UAA8B,KAAY;QACzC,QAAQ,IAAI,CAAC,KAAK,EAAE;YACnB,KAAK,WAAW,CAAC,KAAK,CAAC;YACvB,KAAK,WAAW,CAAC,IAAI;gBACpB,OAAO,IAAI,CAAC;YACb,KAAK,WAAW,CAAC,QAAQ;gBACxB,OAAO,iBAAM,mBAAmB,YAAC,KAAK,CAAC,CAAC;SACzC;IACF,CAAC;IAES,yBAAO,GAAjB;QACC,OAAO,SAAS,CAAC;IAClB,CAAC;IACF,cAAC;AAAD,CAAC,AA9cD,CAIU,KAAK,GA0cd","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject, Point, Rectangle } from \"pixi.js\";\nimport { DAnimation } from \"./d-animation\";\nimport { DApplicationLayerLike } from \"./d-application-layer-like\";\nimport { DApplications } from \"./d-applications\";\nimport { DBase, DBaseEvents, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseState } from \"./d-base-state\";\nimport { DControllerFocus, DFocusable } from \"./d-controller-focus\";\nimport { DDialogAlign } from \"./d-dialog-align\";\nimport { DDialogCloseOn } from \"./d-dialog-close-on\";\nimport { DDialogGesture, DDialogGestureOptions } from \"./d-dialog-gesture\";\nimport { DDialogGestureImpl } from \"./d-dialog-gesture-impl\";\nimport { DDialogGestureMode } from \"./d-dialog-gesture-mode\";\nimport { DDialogMode } from \"./d-dialog-mode\";\nimport { DDialogState } from \"./d-dialog-state\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { DPadding } from \"./d-padding\";\nimport { isArray } from \"./util/is-array\";\nimport { isString } from \"./util/is-string\";\nimport { toEnum } from \"./util/to-enum\";\nimport { UtilAttach } from \"./util/util-attach\";\nimport { UtilClickOutside } from \"./util/util-click-outside\";\nimport { UtilKeyboardEvent } from \"./util/util-keyboard-event\";\nimport { UtilOverlay } from \"./util/util-overlay\";\nimport { DApplicationTarget } from \"./d-application-like\";\n\n/**\n * {@link DDialog} events.\n */\nexport interface DDialogEvents<EMITTER> extends DBaseEvents<EMITTER> {\n\t/**\n\t * Triggered when a dialog is opened.\n\t *\n\t * @param emitter this\n\t */\n\topen(emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a dialog is closed.\n\t *\n\t * @param emitter this\n\t */\n\tclose(emitter: EMITTER): void;\n}\n\n/**\n * {@link DDialog} `on` options.\n */\nexport interface DDialogOnOptions<EMITTER> extends Partial<DDialogEvents<EMITTER>>, DOnOptions {}\n\n/**\n * {@link DDialog} options.\n */\nexport interface DDialogOptions<THEME extends DThemeDialog = DThemeDialog, EMITTER = any>\n\textends DBaseOptions<THEME> {\n\tcloseOn?: DDialogCloseOn | Array<keyof typeof DDialogCloseOn> | keyof typeof DDialogCloseOn;\n\n\tanimation?: DAnimation<DBase>;\n\n\t/**\n\t * A dialog mode.\n\t */\n\tmode?: DDialogMode | keyof typeof DDialogMode;\n\n\talwaysOnTop?: boolean;\n\n\tsticky?: boolean;\n\n\tgesture?: boolean | DDialogGestureOptions;\n\n\talign?: DDialogAlign | null | keyof typeof DDialogAlign;\n\n\t/**\n\t * Mappings of event names and handlers.\n\t */\n\ton?: DDialogOnOptions<EMITTER>;\n}\n\n/**\n * {@link DDialog} theme.\n */\nexport interface DThemeDialog extends DThemeBase {\n\tgetMode(): DDialogMode;\n\tcloseOn(mode: DDialogMode): DDialogCloseOn;\n\tisSticky(mode: DDialogMode): boolean;\n\tisAlwaysOnTop(): boolean;\n\tisGestureEnabled(mode: DDialogMode): boolean;\n\tgetGestureMode(mode: DDialogMode): DDialogGestureMode;\n\tgetOffsetX(mode: DDialogMode): number;\n\tgetOffsetY(mode: DDialogMode): number;\n\tgetAlign(mode: DDialogMode): DDialogAlign | null;\n\tnewAnimation(mode: DDialogMode): DAnimation<DBase> | null;\n}\n\nexport interface DDialogOpener extends DApplicationTarget {\n\tgetBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle;\n}\n\n/**\n * A dialog class.\n *\n * If multiple application instances are there, better to set the constructor\n * option `parent` to an `application.stage` so that the dialog picks a right\n * application. `DDialog` searches applications in a following order:\n *\n * * To begin, `DDialog` tries to find applications which it belongs to.\n * * If `DDialog` can't find applications, then `DDialog` tries to find applications which openers belong to.\n * * If openers are not given, `DDialog` assumes the last created application at the very moment `DDialog` is instantiated is the one it belongs to.\n */\nexport class DDialog<\n\tVALUE = void,\n\tTHEME extends DThemeDialog = DThemeDialog,\n\tOPTIONS extends DDialogOptions<THEME> = DDialogOptions<THEME>\n> extends DBase<THEME, OPTIONS> {\n\tprotected static WORK_BOUNDS?: Rectangle;\n\n\tprotected _promise?: Promise<VALUE>;\n\tprotected _resolve?: (value: VALUE | PromiseLike<VALUE>) => void;\n\tprotected _reject?: (reason?: any) => void;\n\n\tprotected _animation?: DAnimation<DBase> | null;\n\tprotected _closeOn!: DDialogCloseOn;\n\tprotected _focused?: DFocusable | null;\n\tprotected _overlay!: UtilOverlay;\n\tprotected _mode!: DDialogMode;\n\tprotected _alwaysOnTop!: boolean;\n\tprotected _onParentChildAddedBound?: () => void;\n\tprotected _sticky!: boolean;\n\tprotected _onPrerenderBound!: () => void;\n\tprotected _align!: DDialogAlign | null;\n\tprotected _opener?: DDialogOpener | null;\n\n\tprotected _gesture!: DDialogGesture<this>;\n\tprotected _layer!: DApplicationLayerLike | null;\n\n\tprotected init(options?: OPTIONS): void {\n\t\tsuper.init(options);\n\n\t\tthis._onPrerenderBound = (): void => {\n\t\t\tthis.onPrerender();\n\t\t};\n\t\tthis._layer = null;\n\n\t\t// Mode\n\t\tconst theme = this.theme;\n\t\tconst mode = toEnum(options?.mode ?? theme.getMode(), DDialogMode);\n\t\tthis._mode = mode;\n\n\t\t// Always On Top\n\t\tthis._alwaysOnTop = options?.alwaysOnTop ?? theme.isAlwaysOnTop();\n\n\t\t// Sticky\n\t\tthis._sticky = options?.sticky ?? theme.isSticky(mode);\n\n\t\t// Close On\n\t\tconst closeOn = this.toCloseOn(mode, theme, options);\n\t\tthis._closeOn = closeOn;\n\n\t\t// Align\n\t\tthis._align = this.toAlign(mode, theme, options);\n\n\t\t// Overlay\n\t\tthis._overlay = new UtilOverlay();\n\n\t\t// Gesture\n\t\tthis._gesture = new DDialogGestureImpl(this, this.toGestureOptions(mode, theme, options));\n\n\t\t// Visibility\n\t\tthis.visible = false;\n\n\t\t// State\n\t\tswitch (mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\t\tthis.state.addAll(DBaseState.FOCUS_ROOT, DDialogState.MODAL);\n\t\t\t\tbreak;\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\tthis.state.add(DDialogState.MODELESS);\n\t\t\t\tbreak;\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\tthis.state.addAll(DBaseState.FOCUS_ROOT, DDialogState.MENU);\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Outside-click handling\n\t\tif (closeOn & DDialogCloseOn.CLICK_OUTSIDE) {\n\t\t\tUtilClickOutside.apply(this, (): void => {\n\t\t\t\tthis.onCloseOn();\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected toCloseOn(mode: DDialogMode, theme: THEME, options?: OPTIONS): DDialogCloseOn {\n\t\tconst closeOn = options?.closeOn;\n\t\tif (closeOn == null) {\n\t\t\treturn theme.closeOn(mode);\n\t\t} else if (isArray(closeOn)) {\n\t\t\tlet result = DDialogCloseOn.NONE;\n\t\t\tfor (let i = 0, imax = closeOn.length; i < imax; ++i) {\n\t\t\t\tresult |= DDialogCloseOn[closeOn[i]];\n\t\t\t}\n\t\t\treturn result;\n\t\t} else if (isString(closeOn)) {\n\t\t\treturn DDialogCloseOn[closeOn];\n\t\t}\n\t\treturn closeOn;\n\t}\n\n\tprotected toAlign(mode: DDialogMode, theme: THEME, options?: OPTIONS): DDialogAlign | null {\n\t\tconst align = options?.align;\n\t\tif (align === null) {\n\t\t\treturn null;\n\t\t} else if (align === undefined) {\n\t\t\treturn theme.getAlign(mode);\n\t\t} else {\n\t\t\treturn toEnum(align, DDialogAlign);\n\t\t}\n\t}\n\n\tget mode(): DDialogMode {\n\t\treturn this._mode;\n\t}\n\n\tget align(): DDialogAlign | null {\n\t\treturn this._align;\n\t}\n\n\tset algin(align: DDialogAlign | null) {\n\t\tthis._align = align;\n\t}\n\n\tget alwaysOnTop(): boolean {\n\t\treturn this._alwaysOnTop;\n\t}\n\n\tset alwaysOnTop(alwaysOnTop: boolean) {\n\t\tthis._alwaysOnTop = alwaysOnTop;\n\t}\n\n\tget gesture(): DDialogGesture<this> {\n\t\treturn this._gesture;\n\t}\n\n\tget layer(): DApplicationLayerLike | null {\n\t\treturn this._layer;\n\t}\n\n\tprotected toGestureOptions(\n\t\tmode: DDialogMode,\n\t\ttheme: THEME,\n\t\toptions?: OPTIONS\n\t): DDialogGestureOptions {\n\t\tconst gesture = options?.gesture;\n\t\tif (gesture === true) {\n\t\t\treturn {\n\t\t\t\tenable: true,\n\t\t\t\tmode: theme.getGestureMode(mode)\n\t\t\t};\n\t\t} else if (gesture === false) {\n\t\t\treturn {\n\t\t\t\tenable: false,\n\t\t\t\tmode: theme.getGestureMode(mode)\n\t\t\t};\n\t\t} else if (gesture != null) {\n\t\t\tif (gesture.enable === undefined) {\n\t\t\t\tgesture.enable = theme.isGestureEnabled(mode);\n\t\t\t}\n\t\t\tif (gesture.mode === undefined) {\n\t\t\t\tgesture.mode = theme.getGestureMode(mode);\n\t\t\t}\n\t\t\treturn gesture;\n\t\t}\n\t\treturn {\n\t\t\tenable: theme.isGestureEnabled(mode),\n\t\t\tmode: theme.getGestureMode(mode)\n\t\t};\n\t}\n\n\tonParentResize(parentWidth: number, parentHeight: number, parentPadding: DPadding): void {\n\t\tif (this.isOpened()) {\n\t\t\tconst layer = this._layer;\n\t\t\tif (layer != null) {\n\t\t\t\tconst gesture = this._gesture;\n\t\t\t\tif (gesture.isDirty()) {\n\t\t\t\t\tconst position = this.position;\n\t\t\t\t\tgesture.constraint(this, layer, position.x, position.y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsuper.onParentResize(parentWidth, parentHeight, parentPadding);\n\t}\n\n\tprotected getAnimation(): DAnimation | null {\n\t\tlet result = this._animation;\n\t\tif (result === undefined) {\n\t\t\tresult = this._options?.animation ?? this.theme.newAnimation(this._mode);\n\t\t\tif (result) {\n\t\t\t\tresult.target = this;\n\t\t\t\tresult.on(\"end\", (isReverse: boolean): void => {\n\t\t\t\t\tthis.onAnimationEnd(isReverse);\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis._animation = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onAnimationEnd(isReverse: boolean): void {\n\t\tif (isReverse) {\n\t\t\tif (this._mode === DDialogMode.MODELESS) {\n\t\t\t\tthis.hide();\n\t\t\t} else {\n\t\t\t\tconst parent = this.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tparent.removeChild(this);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconst layer = DApplications.getLayer(this);\n\t\t\tif (layer) {\n\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\tthis._focused = focusController.get();\n\t\t\t\tfocusController.focus(this.findFirstFocusable(focusController) || this);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected findFirstFocusable(focusController: DControllerFocus): DFocusable | null {\n\t\treturn focusController.find(this, false, true, true);\n\t}\n\n\t/**\n\t * Opens a dialog.\n\t *\n\t * @param opener An opener of a dialog.\n\t * The dialog position is determined based on a position and a size of the opener.\n\t * If the opener is undefined, the dialog is placed at the center of the screen.\n\t *\n\t * @returns a value of this dialog\n\t */\n\topen(opener?: DDialogOpener): Promise<VALUE> {\n\t\tlet result = this._promise;\n\t\tif (result == null) {\n\t\t\tresult = new Promise<VALUE>((resolve, reject): void => {\n\t\t\t\tthis._resolve = resolve;\n\t\t\t\tthis._reject = reject;\n\t\t\t});\n\t\t\tthis._promise = result;\n\n\t\t\tthis._opener = opener;\n\n\t\t\t// Attach to a layer\n\t\t\tlet layer: DApplicationLayerLike | null = null;\n\t\t\tswitch (this._mode) {\n\t\t\t\tcase DDialogMode.MODAL:\n\t\t\t\tcase DDialogMode.MENU:\n\t\t\t\t\tlayer = this._overlay.pick(this, opener);\n\t\t\t\t\tlayer.stage.addChild(this);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\t\tlayer = DApplications.getLayer(this);\n\t\t\t\t\tthis.show();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis._layer = layer;\n\n\t\t\t// Position & size\n\t\t\tconst gesture = this._gesture;\n\t\t\tif (gesture.mode === DDialogGestureMode.CLEAN) {\n\t\t\t\tgesture.toClean();\n\t\t\t}\n\t\t\tif (layer != null) {\n\t\t\t\tif (gesture.isClean()) {\n\t\t\t\t\tconst renderer = layer.renderer;\n\t\t\t\t\tconst onPrerenderBound = this._onPrerenderBound;\n\t\t\t\t\tif (this._sticky) {\n\t\t\t\t\t\trenderer.on(\"prerender\", onPrerenderBound);\n\t\t\t\t\t} else {\n\t\t\t\t\t\trenderer.once(\"prerender\", onPrerenderBound);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconst position = this.position;\n\t\t\t\t\tgesture.constraint(this, layer, position.x, position.y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Always On Top\n\t\t\tif (this._alwaysOnTop) {\n\t\t\t\tconst parent = this.parent;\n\t\t\t\tif (parent != null) {\n\t\t\t\t\tparent.on(\n\t\t\t\t\t\t\"childAdded\",\n\t\t\t\t\t\t(this._onParentChildAddedBound ??= (): void => {\n\t\t\t\t\t\t\tthis.onParentChildAdded();\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t\tthis.onParentChildAdded();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Done\n\t\t\tthis.onOpen();\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onParentChildAdded(): void {\n\t\tconst parent = this.parent;\n\t\tif (parent != null) {\n\t\t\tparent.children.sort(this.compareAlwaysOnTop);\n\t\t}\n\t}\n\n\tprotected compareAlwaysOnTop(this: unknown, a: DisplayObject, b: DisplayObject): number {\n\t\tconst at = a instanceof DDialog && a.alwaysOnTop;\n\t\tconst bt = b instanceof DDialog && b.alwaysOnTop;\n\t\tif (at) {\n\t\t\treturn bt ? 0 : +1;\n\t\t} else {\n\t\t\treturn bt ? -1 : 0;\n\t\t}\n\t}\n\n\tprotected onPrerender(): void {\n\t\tconst layer = this._layer;\n\t\tif (layer == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst align = this._align;\n\t\tif (align === DDialogAlign.NONE) {\n\t\t\treturn;\n\t\t}\n\t\tconst opener = this._opener;\n\t\tif (align != null && opener != null) {\n\t\t\tconst mode = this._mode;\n\t\t\tconst bounds = opener.getBounds(false, (DDialog.WORK_BOUNDS ??= new Rectangle()));\n\t\t\tconst theme = this.theme;\n\t\t\tUtilAttach.attach(\n\t\t\t\tthis,\n\t\t\t\tbounds,\n\t\t\t\ttheme.getOffsetX(mode),\n\t\t\t\ttheme.getOffsetY(mode),\n\t\t\t\tlayer.width,\n\t\t\t\tlayer.height,\n\t\t\t\talign\n\t\t\t);\n\t\t} else {\n\t\t\tthis.position.set((layer.width - this.width) * 0.5, (layer.height - this.height) * 0.5);\n\t\t}\n\t}\n\n\tprotected onOpen(): void {\n\t\tthis.emit(\"open\", this);\n\n\t\t// Animation\n\t\tconst animation = this.getAnimation();\n\t\tif (animation) {\n\t\t\tanimation.start();\n\t\t} else if (this._mode === DDialogMode.MENU) {\n\t\t\tthis.visible = true;\n\t\t\tthis.onAnimationEnd(false);\n\t\t}\n\t}\n\n\tisOpened(): boolean {\n\t\treturn this._promise != null;\n\t}\n\n\tclose(): void {\n\t\tthis.doReject();\n\t}\n\n\tprotected doResolve(value: VALUE | PromiseLike<VALUE>): void {\n\t\tconst resolve = this._resolve;\n\t\tif (resolve) {\n\t\t\tthis._promise = undefined;\n\t\t\tthis._resolve = undefined;\n\t\t\tthis._reject = undefined;\n\n\t\t\tthis.onClose();\n\n\t\t\tresolve(value);\n\t\t}\n\t}\n\n\tprotected doReject(reason?: any): void {\n\t\tconst reject = this._reject;\n\t\tif (reject) {\n\t\t\tthis._promise = undefined;\n\t\t\tthis._resolve = undefined;\n\t\t\tthis._reject = undefined;\n\n\t\t\tthis.onClose();\n\n\t\t\treject(reason);\n\t\t}\n\t}\n\n\tprotected onClose(): void {\n\t\t// Focus\n\t\tconst layer = this._layer;\n\t\tconst focused = this._focused;\n\t\tif (focused != null) {\n\t\t\tthis._focused = null;\n\t\t\tif (layer) {\n\t\t\t\tconst focusedLayer = DApplications.getLayer(focused);\n\t\t\t\tif (focusedLayer != null && layer !== focusedLayer) {\n\t\t\t\t\tfocusedLayer.view.focus();\n\t\t\t\t}\n\t\t\t\tlayer.getFocusController().focus(focused);\n\t\t\t} else {\n\t\t\t\tthis.blur(true);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.blur(true);\n\t\t}\n\n\t\t// Remove the prerender event handler and forget the layer\n\t\tif (layer) {\n\t\t\tlayer.renderer.off(\"prerender\", this._onPrerenderBound);\n\t\t\tthis._layer = null;\n\t\t}\n\n\t\t// Forget the opener\n\t\tthis._opener = null;\n\n\t\t// Animation\n\t\tconst animation = this.getAnimation();\n\t\tif (animation) {\n\t\t\tanimation.start(true);\n\t\t} else {\n\t\t\tthis.visible = false;\n\t\t\tthis.onAnimationEnd(true);\n\t\t}\n\n\t\t// Always On Top\n\t\tif (this._alwaysOnTop) {\n\t\t\tconst parent = this.parent;\n\t\t\tif (parent != null) {\n\t\t\t\tparent.off(\"childAdded\", this._onParentChildAddedBound);\n\t\t\t}\n\t\t}\n\n\t\tthis.emit(\"close\", this);\n\t}\n\n\tprotected onKeyDown(e: KeyboardEvent): boolean {\n\t\tif (this._closeOn & DDialogCloseOn.ESC) {\n\t\t\tif (UtilKeyboardEvent.isCancelKey(e)) {\n\t\t\t\tthis.onCloseOn();\n\t\t\t}\n\t\t}\n\t\treturn super.onKeyDown(e);\n\t}\n\n\tprotected onCloseOn(): void {\n\t\tthis.close();\n\t}\n\n\tprotected containsGlobalPoint(point: Point): boolean {\n\t\tswitch (this._mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\treturn true;\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\treturn super.containsGlobalPoint(point);\n\t\t}\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDialog\";\n\t}\n}\n"]}
|
|
@@ -33,6 +33,9 @@ var DThemeDarkDialog = /** @class */ (function (_super) {
|
|
|
33
33
|
DThemeDarkDialog.prototype.isSticky = function (mode) {
|
|
34
34
|
return false;
|
|
35
35
|
};
|
|
36
|
+
DThemeDarkDialog.prototype.isAlwaysOnTop = function () {
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
36
39
|
DThemeDarkDialog.prototype.isGestureEnabled = function (mode) {
|
|
37
40
|
switch (mode) {
|
|
38
41
|
case DDialogMode.MODAL:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-theme-dark-dialog.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/dark/d-theme-dark-dialog.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,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AAO,mBAAmB,CAAC,yBAAyB,CAAC;SACrD;aAAM;YACN,OAAO,mBAAmB,CAAC,gBAAgB,CAAC;SAC5C;IACF,CAAC;IAED,yCAAc,GAAd,UAAe,KAAoB;QAClC,IAAI,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;YAChC,OAAO,IAAI,CAAC;SACZ;aAAM;YACN,OAAO,QAAQ,CAAC;SAChB;IACF,CAAC;IAED,0CAAe,GAAf,UAAgB,KAAoB;QACnC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,yCAAc,GAAd;QACC,OAAO,CAAC,CAAC;IACV,CAAC;IAED,wCAAa,GAAb;QACC,OAAO,CAAC,CAAC;IACV,CAAC;IAED,0CAAe,GAAf;QACC,OAAO,CAAC,CAAC;IACV,CAAC;IAED,2CAAgB,GAAhB;QACC,OAAO,CAAC,CAAC;IACV,CAAC;IAED,+BAAI,GAAJ;QACC,OAAO,CAAC,CAAC;IACV,CAAC;IAED,+BAAI,GAAJ;QACC,OAAO,CAAC,CAAC;IACV,CAAC;IAED,mCAAQ,GAAR;QACC,OAAO,GAAG,CAAC;IACZ,CAAC;IAED,oCAAS,GAAT;QACC,OAAO,MAAM,CAAC;IACf,CAAC;IAED,oCAAS,GAAT;QACC,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IACzB,CAAC;IAED,yCAAc,GAAd;QACC,OAAO,gBAAgB,CAAC,IAAI,CAAC;IAC9B,CAAC;IACF,uBAAC;AAAD,CAAC,AAxHD,CAAsC,cAAc,GAwHnD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DAnimation } from \"../../d-animation\";\nimport { DAnimationFadeIn } from \"../../d-animation-fade-in\";\nimport { DBase } from \"../../d-base\";\nimport { DBaseInteractive } from \"../../d-base-interactive\";\nimport { DBaseStateSet } from \"../../d-base-state-set\";\nimport { DCoordinatePosition, DCoordinateSize } from \"../../d-coordinate\";\nimport { DThemeDialog } from \"../../d-dialog\";\nimport { DDialogAlign } from \"../../d-dialog-align\";\nimport { DDialogCloseOn } from \"../../d-dialog-close-on\";\nimport { DDialogGestureMode } from \"../../d-dialog-gesture-mode\";\nimport { DDialogMode } from \"../../d-dialog-mode\";\nimport { DDialogState } from \"../../d-dialog-state\";\nimport { DShadow } from \"../../d-shadow\";\nimport { DThemeDarkBase } from \"./d-theme-dark-base\";\nimport { DThemeDarkConstants } from \"./d-theme-dark-constants\";\n\nexport class DThemeDarkDialog extends DThemeDarkBase implements DThemeDialog {\n\tgetMode(): DDialogMode {\n\t\treturn DDialogMode.MODAL;\n\t}\n\n\tcloseOn(mode: DDialogMode): DDialogCloseOn {\n\t\tswitch (mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\treturn DDialogCloseOn.ESC | DDialogCloseOn.CLICK_OUTSIDE;\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\treturn DDialogCloseOn.NONE;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tisSticky(mode: DDialogMode): boolean {\n\t\treturn false;\n\t}\n\n\tisAlwaysOnTop(): boolean {\n\t\treturn false;\n\t}\n\n\tisGestureEnabled(mode: DDialogMode): boolean {\n\t\tswitch (mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\treturn true;\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\tgetGestureMode(mode: DDialogMode): DDialogGestureMode {\n\t\treturn DDialogGestureMode.DIRTY;\n\t}\n\n\tgetOffsetX(mode: DDialogMode): number {\n\t\treturn 5;\n\t}\n\n\tgetOffsetY(mode: DDialogMode): number {\n\t\treturn 5;\n\t}\n\n\tgetAlign(mode: DDialogMode): DDialogAlign {\n\t\treturn DDialogAlign.BOTTOM;\n\t}\n\n\tnewAnimation(mode: DDialogMode): DAnimation<DBase> | null {\n\t\tswitch (mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\t\treturn new DAnimationFadeIn();\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\treturn null;\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\tgetBackgroundColor(state: DBaseStateSet): number {\n\t\tif (state.is(DDialogState.MENU)) {\n\t\t\treturn DThemeDarkConstants.BACKGROUND_COLOR_ON_BOARD;\n\t\t} else {\n\t\t\treturn DThemeDarkConstants.BACKGROUND_COLOR;\n\t\t}\n\t}\n\n\tgetBorderColor(state: DBaseStateSet): number | null {\n\t\tif (state.is(DDialogState.MENU)) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn 0x393939;\n\t\t}\n\t}\n\n\tgetOutlineColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetPaddingLeft(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingTop(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingRight(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingBottom(): number {\n\t\treturn 0;\n\t}\n\n\tgetX(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetY(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetWidth(): DCoordinateSize {\n\t\treturn 400;\n\t}\n\n\tgetHeight(): DCoordinateSize {\n\t\treturn \"auto\";\n\t}\n\n\tgetShadow(): DShadow | null {\n\t\treturn this.newShadow();\n\t}\n\n\tgetInteractive(): DBaseInteractive {\n\t\treturn DBaseInteractive.BOTH;\n\t}\n}\n"]}
|
|
@@ -33,6 +33,9 @@ var DThemeWhiteDialog = /** @class */ (function (_super) {
|
|
|
33
33
|
DThemeWhiteDialog.prototype.isSticky = function (mode) {
|
|
34
34
|
return false;
|
|
35
35
|
};
|
|
36
|
+
DThemeWhiteDialog.prototype.isAlwaysOnTop = function () {
|
|
37
|
+
return false;
|
|
38
|
+
};
|
|
36
39
|
DThemeWhiteDialog.prototype.isGestureEnabled = function (mode) {
|
|
37
40
|
switch (mode) {
|
|
38
41
|
case DDialogMode.MODAL:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-theme-white-dialog.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/white/d-theme-white-dialog.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;IAAuC,qCAAe;IAAtD;;
|
|
1
|
+
{"version":3,"file":"d-theme-white-dialog.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/white/d-theme-white-dialog.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,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["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DAnimation } from \"../../d-animation\";\nimport { DAnimationFadeIn } from \"../../d-animation-fade-in\";\nimport { DBase } from \"../../d-base\";\nimport { DBaseInteractive } from \"../../d-base-interactive\";\nimport { DBaseStateSet } from \"../../d-base-state-set\";\nimport { DCoordinatePosition, DCoordinateSize } from \"../../d-coordinate\";\nimport { DThemeDialog } from \"../../d-dialog\";\nimport { DDialogAlign } from \"../../d-dialog-align\";\nimport { DDialogCloseOn } from \"../../d-dialog-close-on\";\nimport { DDialogGestureMode } from \"../../d-dialog-gesture-mode\";\nimport { DDialogMode } from \"../../d-dialog-mode\";\nimport { DDialogState } from \"../../d-dialog-state\";\nimport { DShadow } from \"../../d-shadow\";\nimport { DThemeWhiteBase } from \"./d-theme-white-base\";\nimport { DThemeWhiteConstants } from \"./d-theme-white-constants\";\n\nexport class DThemeWhiteDialog extends DThemeWhiteBase implements DThemeDialog {\n\tgetMode(): DDialogMode {\n\t\treturn DDialogMode.MODAL;\n\t}\n\n\tcloseOn(mode: DDialogMode): DDialogCloseOn {\n\t\tswitch (mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\treturn DDialogCloseOn.ESC | DDialogCloseOn.CLICK_OUTSIDE;\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\treturn DDialogCloseOn.NONE;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tisSticky(mode: DDialogMode): boolean {\n\t\treturn false;\n\t}\n\n\tisAlwaysOnTop(): boolean {\n\t\treturn false;\n\t}\n\n\tisGestureEnabled(mode: DDialogMode): boolean {\n\t\tswitch (mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\treturn true;\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\treturn false;\n\t\t}\n\t}\n\n\tgetGestureMode(mode: DDialogMode): DDialogGestureMode {\n\t\treturn DDialogGestureMode.DIRTY;\n\t}\n\n\tgetOffsetX(mode: DDialogMode): number {\n\t\treturn 5;\n\t}\n\n\tgetOffsetY(mode: DDialogMode): number {\n\t\treturn 5;\n\t}\n\n\tgetAlign(mode: DDialogMode): DDialogAlign {\n\t\treturn DDialogAlign.BOTTOM;\n\t}\n\n\tnewAnimation(mode: DDialogMode): DAnimation<DBase> | null {\n\t\tswitch (mode) {\n\t\t\tcase DDialogMode.MODAL:\n\t\t\t\treturn new DAnimationFadeIn();\n\t\t\tcase DDialogMode.MODELESS:\n\t\t\t\treturn null;\n\t\t\tcase DDialogMode.MENU:\n\t\t\t\treturn null;\n\t\t}\n\t}\n\n\tgetBackgroundColor(state: DBaseStateSet): number {\n\t\tif (state.is(DDialogState.MENU)) {\n\t\t\treturn DThemeWhiteConstants.BACKGROUND_COLOR_ON_BOARD;\n\t\t} else {\n\t\t\treturn DThemeWhiteConstants.BACKGROUND_COLOR;\n\t\t}\n\t}\n\n\tgetBorderColor(state: DBaseStateSet): number | null {\n\t\tif (state.is(DDialogState.MENU)) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn 0xfafafa;\n\t\t}\n\t}\n\n\tgetOutlineColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetPaddingLeft(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingTop(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingRight(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingBottom(): number {\n\t\treturn 0;\n\t}\n\n\tgetX(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetY(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetWidth(): DCoordinateSize {\n\t\treturn 400;\n\t}\n\n\tgetHeight(): DCoordinateSize {\n\t\treturn \"auto\";\n\t}\n\n\tgetShadow(): DShadow | null {\n\t\treturn this.newShadow();\n\t}\n\n\tgetInteractive(): DBaseInteractive {\n\t\treturn DBaseInteractive.BOTH;\n\t}\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.447.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -1998,6 +1998,9 @@
|
|
|
1998
1998
|
DThemeDarkDialog.prototype.isSticky = function (mode) {
|
|
1999
1999
|
return false;
|
|
2000
2000
|
};
|
|
2001
|
+
DThemeDarkDialog.prototype.isAlwaysOnTop = function () {
|
|
2002
|
+
return false;
|
|
2003
|
+
};
|
|
2001
2004
|
DThemeDarkDialog.prototype.isGestureEnabled = function (mode) {
|
|
2002
2005
|
switch (mode) {
|
|
2003
2006
|
case DDialogMode.MODAL:
|