@wcardinal/wcardinal-ui 0.145.0 → 0.149.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/dist/types/wcardinal/ui/d-note-small-error.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-note-small-no-items-found.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-note-small-searching.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-note-small.d.ts +8 -0
- package/dist/types/wcardinal/ui/index.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-bodies.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body-impl.d.ts +24 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body.d.ts +14 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-container.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/index.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-connector-line.d.ts +9 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-error.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-no-items-found.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-searching.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-small-error.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-small-no-items-found.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-small-searching.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-small.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-slider-thumb.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-slider-track.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.d.ts +4 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/dark/index.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-error.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-no-items-found.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-searching.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-small-error.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-small-no-items-found.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-small-searching.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-small.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-slider-thumb.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-slider-track.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-table-body-cells.d.ts +4 -2
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-table-header-cell.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/index.d.ts +4 -0
- package/dist/types/wcardinal/ui/util/util-svg-atlas-builder.d.ts +1 -0
- package/dist/wcardinal/ui/d-dialog-select.js +6 -6
- package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/d-note-small-error.js +18 -0
- package/dist/wcardinal/ui/d-note-small-error.js.map +1 -0
- package/dist/wcardinal/ui/d-note-small-no-items-found.js +18 -0
- package/dist/wcardinal/ui/d-note-small-no-items-found.js.map +1 -0
- package/dist/wcardinal/ui/d-note-small-searching.js +18 -0
- package/dist/wcardinal/ui/d-note-small-searching.js.map +1 -0
- package/dist/wcardinal/ui/d-note-small.js +18 -0
- package/dist/wcardinal/ui/d-note-small.js.map +1 -0
- package/dist/wcardinal/ui/d-view-gesture-impl.js +12 -4
- package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
- package/dist/wcardinal/ui/index.js +4 -0
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js +36 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body-impl.js +88 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body-impl.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body.js +6 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-runtime.js +6 -4
- package/dist/wcardinal/ui/shape/e-shape-runtime.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +3 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +19 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +104 -81
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-error.js +0 -9
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-error.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-no-items-found.js +0 -10
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-no-items-found.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-searching.js +0 -11
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-searching.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-error.js +18 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-error.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-no-items-found.js +18 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-no-items-found.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-searching.js +18 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-searching.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small.js +18 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note.js +9 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-thumb.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-thumb.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-track.js +10 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-track.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-value.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-value.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.js +13 -5
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.js +7 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/index.js +4 -0
- package/dist/wcardinal/ui/theme/dark/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-note.js +6 -0
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-note.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-error.js +0 -9
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-error.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-no-items-found.js +0 -10
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-no-items-found.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-searching.js +0 -11
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-searching.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-error.js +18 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-error.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-no-items-found.js +18 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-no-items-found.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-searching.js +18 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-searching.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small.js +18 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note.js +9 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-note.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-thumb.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-thumb.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-track.js +10 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-track.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-value.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-value.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cells.js +16 -5
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cells.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-header-cell.js +7 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-header-cell.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/index.js +4 -0
- package/dist/wcardinal/ui/theme/white/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-note.js +6 -0
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-note.js.map +1 -1
- package/dist/wcardinal/ui/util/util-svg-atlas-builder.js +3 -0
- package/dist/wcardinal/ui/util/util-svg-atlas-builder.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +111 -38
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +114 -38
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +577 -188
- package/dist/wcardinal-ui.js +354 -114
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DNoteSmall, DNoteSmallOptions, DThemeNoteSmall } from "./d-note-small";
|
|
2
|
+
export interface DNoteSmallErrorOptions<THEME extends DThemeNoteSmallError = DThemeNoteSmallError> extends DNoteSmallOptions<THEME> {
|
|
3
|
+
}
|
|
4
|
+
export interface DThemeNoteSmallError extends DThemeNoteSmall {
|
|
5
|
+
}
|
|
6
|
+
export declare class DNoteSmallError<THEME extends DThemeNoteSmallError = DThemeNoteSmallError, OPTIONS extends DNoteSmallErrorOptions<THEME> = DNoteSmallErrorOptions<THEME>> extends DNoteSmall<THEME, OPTIONS> {
|
|
7
|
+
protected getType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DNoteSmall, DNoteSmallOptions, DThemeNoteSmall } from "./d-note-small";
|
|
2
|
+
export interface DNoteSmallNoItemsFoundOptions<THEME extends DThemeNoteSmallNoItemsFound = DThemeNoteSmallNoItemsFound> extends DNoteSmallOptions<THEME> {
|
|
3
|
+
}
|
|
4
|
+
export interface DThemeNoteSmallNoItemsFound extends DThemeNoteSmall {
|
|
5
|
+
}
|
|
6
|
+
export declare class DNoteSmallNoItemsFound<THEME extends DThemeNoteSmallNoItemsFound = DThemeNoteSmallNoItemsFound, OPTIONS extends DNoteSmallNoItemsFoundOptions<THEME> = DNoteSmallNoItemsFoundOptions<THEME>> extends DNoteSmall<THEME, OPTIONS> {
|
|
7
|
+
protected getType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DNoteSmall, DNoteSmallOptions, DThemeNoteSmall } from "./d-note-small";
|
|
2
|
+
export interface DNoteSmallSearchingOptions<THEME extends DThemeNoteSmallSearching = DThemeNoteSmallSearching> extends DNoteSmallOptions<THEME> {
|
|
3
|
+
}
|
|
4
|
+
export interface DThemeNoteSmallSearching extends DThemeNoteSmall {
|
|
5
|
+
}
|
|
6
|
+
export declare class DNoteSmallSearching<THEME extends DThemeNoteSmallSearching = DThemeNoteSmallSearching, OPTIONS extends DNoteSmallSearchingOptions<THEME> = DNoteSmallSearchingOptions<THEME>> extends DNoteSmall<THEME, OPTIONS> {
|
|
7
|
+
protected getType(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DNote, DNoteOptions, DThemeNote } from "./d-note";
|
|
2
|
+
export interface DNoteSmallOptions<THEME extends DThemeNoteSmall = DThemeNoteSmall> extends DNoteOptions<THEME> {
|
|
3
|
+
}
|
|
4
|
+
export interface DThemeNoteSmall extends DThemeNote {
|
|
5
|
+
}
|
|
6
|
+
export declare class DNoteSmall<THEME extends DThemeNoteSmall = DThemeNoteSmall, OPTIONS extends DNoteSmallOptions<THEME> = DNoteSmallOptions<THEME>> extends DNote<THEME, OPTIONS> {
|
|
7
|
+
protected getType(): string;
|
|
8
|
+
}
|
|
@@ -364,6 +364,10 @@ export * from "./d-menus";
|
|
|
364
364
|
export * from "./d-note-error";
|
|
365
365
|
export * from "./d-note-no-items-found";
|
|
366
366
|
export * from "./d-note-searching";
|
|
367
|
+
export * from "./d-note-small-error";
|
|
368
|
+
export * from "./d-note-small-no-items-found";
|
|
369
|
+
export * from "./d-note-small-searching";
|
|
370
|
+
export * from "./d-note-small";
|
|
367
371
|
export * from "./d-note";
|
|
368
372
|
export * from "./d-notification";
|
|
369
373
|
export * from "./d-outline";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EShapeConnector } from "./e-shape-connector";
|
|
2
|
+
import { EShapeConnectorBody } from "./e-shape-connector-body";
|
|
3
|
+
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
4
|
+
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
5
|
+
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
6
|
+
export declare class EShapeConnectorBodyImpl implements EShapeConnectorBody {
|
|
7
|
+
protected _parent: EShapeConnector;
|
|
8
|
+
protected _id: number;
|
|
9
|
+
protected _values: number[];
|
|
10
|
+
protected _lockCount: number;
|
|
11
|
+
protected _isChanged: boolean;
|
|
12
|
+
protected _onChange: () => void;
|
|
13
|
+
constructor(parent: EShapeConnector, onChange: () => void);
|
|
14
|
+
lock(): void;
|
|
15
|
+
unlock(): void;
|
|
16
|
+
get id(): number;
|
|
17
|
+
get values(): number[];
|
|
18
|
+
set values(newValues: number[]);
|
|
19
|
+
set(newValues?: number[]): this;
|
|
20
|
+
copy(source: EShapeConnectorBody): this;
|
|
21
|
+
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
22
|
+
deserialize(resourceId: number, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization): void;
|
|
23
|
+
protected onChange(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
2
|
+
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
3
|
+
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
4
|
+
export declare type EShapeConnectorBodySerialized = number[];
|
|
5
|
+
export interface EShapeConnectorBody {
|
|
6
|
+
readonly id: number;
|
|
7
|
+
values: number[];
|
|
8
|
+
lock(): void;
|
|
9
|
+
unlock(): void;
|
|
10
|
+
set(values?: number[]): this;
|
|
11
|
+
copy(source: EShapeConnectorBody): this;
|
|
12
|
+
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
13
|
+
deserialize(resourceId: number, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization): void;
|
|
14
|
+
}
|
|
@@ -2,9 +2,12 @@ import { EShapeConnectorEdge } from "./e-shape-connector-edge";
|
|
|
2
2
|
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
3
3
|
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
4
4
|
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
5
|
+
export declare type EShapeConnectorEdgeContainerSerialized = [number, number];
|
|
5
6
|
export interface EShapeConnectorEdgeContainer {
|
|
6
7
|
tail: EShapeConnectorEdge;
|
|
7
8
|
head: EShapeConnectorEdge;
|
|
9
|
+
lock(): void;
|
|
10
|
+
unlock(): void;
|
|
8
11
|
copy(source: EShapeConnectorEdgeContainer): this;
|
|
9
12
|
fit(forcibly?: boolean): this;
|
|
10
13
|
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
@@ -10,6 +10,9 @@ export * from "./e-shape-buffer-unit";
|
|
|
10
10
|
export * from "./e-shape-buffer";
|
|
11
11
|
export * from "./e-shape-capabilities";
|
|
12
12
|
export * from "./e-shape-capability";
|
|
13
|
+
export * from "./e-shape-connector-bodies";
|
|
14
|
+
export * from "./e-shape-connector-body-impl";
|
|
15
|
+
export * from "./e-shape-connector-body";
|
|
13
16
|
export * from "./e-shape-connector-container-impl";
|
|
14
17
|
export * from "./e-shape-connector-container";
|
|
15
18
|
export * from "./e-shape-connector-edge-acceptor-impl";
|
|
@@ -7,21 +7,28 @@ import { EShapeCopyPart } from "../e-shape-copy-part";
|
|
|
7
7
|
import { DDiagramSerializedItem } from "../../d-diagram-serialized";
|
|
8
8
|
import { EShapeResourceManagerSerialization } from "../e-shape-resource-manager-serialization";
|
|
9
9
|
import { EShape } from "../e-shape";
|
|
10
|
+
import { EShapeConnectorBody } from "../e-shape-connector-body";
|
|
10
11
|
export declare class EShapeConnectorLine extends EShapeLineBase implements EShapeConnector {
|
|
11
12
|
protected static WORK_BOUNDARY: [number, number, number, number];
|
|
12
13
|
protected _edge: EShapeConnectorEdgeContainer;
|
|
14
|
+
protected _body: EShapeConnectorBody;
|
|
13
15
|
protected _points: EShapeLinePoints;
|
|
14
16
|
protected _tailLocalId: number;
|
|
15
17
|
protected _tailMargin: number;
|
|
16
18
|
protected _headLocalId: number;
|
|
17
19
|
protected _headMargin: number;
|
|
20
|
+
protected _bodyId: number;
|
|
21
|
+
protected _lockCount: number;
|
|
22
|
+
protected _isChanged: boolean;
|
|
18
23
|
constructor(type?: EShapeType);
|
|
24
|
+
lock(): void;
|
|
25
|
+
unlock(): void;
|
|
19
26
|
get points(): EShapeLinePoints;
|
|
20
27
|
get edge(): EShapeConnectorEdgeContainer;
|
|
28
|
+
get body(): EShapeConnectorBody;
|
|
21
29
|
onAttach(): void;
|
|
22
30
|
onDetach(): void;
|
|
23
|
-
protected
|
|
24
|
-
protected toValues(x0: number, y0: number, x1: number, y1: number, margin0: number, margin1: number, result: number[]): number[];
|
|
31
|
+
protected onChange(): void;
|
|
25
32
|
copy(source: EShape, part?: EShapeCopyPart): this;
|
|
26
33
|
clone(): EShapeConnectorLine;
|
|
27
34
|
serialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { DisplayObject, Texture } from "pixi.js";
|
|
2
|
-
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
1
|
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
4
2
|
import { DThemeDarkNote } from "./d-theme-dark-note";
|
|
5
3
|
export declare class DThemeDarkNoteError extends DThemeDarkNote {
|
|
6
4
|
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
7
|
-
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
8
5
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { DisplayObject, Texture } from "pixi.js";
|
|
2
|
-
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
1
|
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
4
2
|
import { DThemeDarkNote } from "./d-theme-dark-note";
|
|
5
3
|
export declare class DThemeDarkNoteNoItemsFound extends DThemeDarkNote {
|
|
6
4
|
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
7
|
-
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
8
5
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { DisplayObject, Texture } from "pixi.js";
|
|
2
|
-
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
1
|
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
4
2
|
import { DThemeDarkNote } from "./d-theme-dark-note";
|
|
5
3
|
export declare class DThemeDarkNoteSearching extends DThemeDarkNote {
|
|
6
4
|
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
7
|
-
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
8
5
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
2
|
+
import { DThemeDarkNoteSmall } from "./d-theme-dark-note-small";
|
|
3
|
+
export declare class DThemeDarkNoteSmallNoItemsFound extends DThemeDarkNoteSmall {
|
|
4
|
+
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
5
|
+
}
|
|
@@ -4,6 +4,7 @@ import { DAlignWith } from "../../d-align-with";
|
|
|
4
4
|
import { DBaseInteractive } from "../../d-base-interactive";
|
|
5
5
|
import { DBaseStateSet } from "../../d-base-state-set";
|
|
6
6
|
import { DCoordinateSize } from "../../d-coordinate";
|
|
7
|
+
import { DFontWeight } from "../../d-font";
|
|
7
8
|
import { DThemeNote } from "../../d-note";
|
|
8
9
|
import { DThemeDarkImageBase } from "./d-theme-dark-image-base";
|
|
9
10
|
export declare class DThemeDarkNote extends DThemeDarkImageBase<string> implements DThemeNote {
|
|
@@ -13,8 +14,10 @@ export declare class DThemeDarkNote extends DThemeDarkImageBase<string> implemen
|
|
|
13
14
|
getInteractive(): DBaseInteractive;
|
|
14
15
|
getAlpha(): number;
|
|
15
16
|
getFontSize(): number;
|
|
17
|
+
getFontWeight(): DFontWeight;
|
|
16
18
|
getImageTintAlpha(state: DBaseStateSet): number;
|
|
17
19
|
getImageAlignWith(): DAlignWith;
|
|
18
20
|
getImageAlignHorizontal(): DAlignHorizontal;
|
|
19
21
|
getImageAlignVertical(): DAlignVertical;
|
|
22
|
+
newState(state: DBaseStateSet): void;
|
|
20
23
|
}
|
|
@@ -15,4 +15,5 @@ export declare class DThemeDarkSliderThumb<VALUE = unknown> extends DThemeDarkBu
|
|
|
15
15
|
getImageTintColor(state: DBaseStateSet): number | null;
|
|
16
16
|
getImageTintAlpha(state: DBaseStateSet): number;
|
|
17
17
|
getImageAlignHorizontal(): DAlignHorizontal;
|
|
18
|
+
getOutlineOffset(state: DBaseStateSet): number;
|
|
18
19
|
}
|
|
@@ -4,4 +4,7 @@ import { DThemeDarkButton } from "./d-theme-dark-button";
|
|
|
4
4
|
export declare class DThemeDarkSliderTrack<VALUE = unknown> extends DThemeDarkButton<VALUE> implements DThemeSliderTrack<VALUE> {
|
|
5
5
|
getBackgroundColor(state: DBaseStateSet): number | null;
|
|
6
6
|
getBorderColor(state: DBaseStateSet): number | null;
|
|
7
|
+
getOutlineColor(state: DBaseStateSet): number | null;
|
|
8
|
+
getOutlineOffset(state: DBaseStateSet): number;
|
|
9
|
+
newState(state: DBaseStateSet): void;
|
|
7
10
|
}
|
|
@@ -3,9 +3,11 @@ import { DBorderMask } from "../../d-border-mask";
|
|
|
3
3
|
import { DCoordinateSize } from "../../d-coordinate";
|
|
4
4
|
import { DCornerMask } from "../../d-corner-mask";
|
|
5
5
|
export declare class DThemeDarkTableBodyCells {
|
|
6
|
-
protected static readonly
|
|
7
|
-
protected static readonly
|
|
6
|
+
protected static readonly BACKGROUND_COLOR: number;
|
|
7
|
+
protected static readonly BACKGROUND_COLOR_FROZEN_EVEN: number;
|
|
8
|
+
protected static readonly BACKGROUND_COLOR_FROZEN_ODD: number;
|
|
8
9
|
protected static readonly BORDER_COLOR: number;
|
|
10
|
+
protected static readonly BORDER_COLOR_FROZEN: number;
|
|
9
11
|
static getBackgroundColor(state: DBaseStateSet): number | null;
|
|
10
12
|
static getBackgroundAlpha(state: DBaseStateSet): number;
|
|
11
13
|
static getBorderColor(state: DBaseStateSet): number | null;
|
|
@@ -13,7 +13,9 @@ export declare class DThemeDarkTableHeaderCell extends DThemeDarkImage<string |
|
|
|
13
13
|
protected readonly BACKGROUND_COLOR: number;
|
|
14
14
|
protected readonly BACKGROUND_COLOR_HOVERED: number;
|
|
15
15
|
protected readonly BACKGROUND_COLOR_PRESSED: number;
|
|
16
|
+
protected readonly BACKGROUND_COLOR_FROZEN: number;
|
|
16
17
|
protected readonly BORDER_COLOR: number;
|
|
18
|
+
protected readonly BORDER_COLOR_FROZEN: number;
|
|
17
19
|
getBackgroundColor(state: DBaseStateSet): number | null;
|
|
18
20
|
getBackgroundAlpha(state: DBaseStateSet): number;
|
|
19
21
|
getBorderColor(state: DBaseStateSet): number | null;
|
|
@@ -130,6 +130,10 @@ export * from "./d-theme-dark-menu-sided-item-text";
|
|
|
130
130
|
export * from "./d-theme-dark-note-error";
|
|
131
131
|
export * from "./d-theme-dark-note-no-items-found";
|
|
132
132
|
export * from "./d-theme-dark-note-searching";
|
|
133
|
+
export * from "./d-theme-dark-note-small-error";
|
|
134
|
+
export * from "./d-theme-dark-note-small-no-items-found";
|
|
135
|
+
export * from "./d-theme-dark-note-small-searching";
|
|
136
|
+
export * from "./d-theme-dark-note-small";
|
|
133
137
|
export * from "./d-theme-dark-note";
|
|
134
138
|
export * from "./d-theme-dark-pagination";
|
|
135
139
|
export * from "./d-theme-dark-pagination-navigation-button";
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { DisplayObject, Texture } from "pixi.js";
|
|
2
|
-
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
1
|
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
4
2
|
import { DThemeWhiteNote } from "./d-theme-white-note";
|
|
5
3
|
export declare class DThemeWhiteNoteError extends DThemeWhiteNote {
|
|
6
4
|
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
7
|
-
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
8
5
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { DisplayObject, Texture } from "pixi.js";
|
|
2
|
-
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
1
|
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
4
2
|
import { DThemeWhiteNote } from "./d-theme-white-note";
|
|
5
3
|
export declare class DThemeWhiteNoteNoItemsFound extends DThemeWhiteNote {
|
|
6
4
|
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
7
|
-
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
8
5
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { DisplayObject, Texture } from "pixi.js";
|
|
2
|
-
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
1
|
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
4
2
|
import { DThemeWhiteNote } from "./d-theme-white-note";
|
|
5
3
|
export declare class DThemeWhiteNoteSearching extends DThemeWhiteNote {
|
|
6
4
|
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
7
|
-
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
8
5
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
2
|
+
import { DThemeWhiteNoteSmall } from "./d-theme-white-note-small";
|
|
3
|
+
export declare class DThemeWhiteNoteSmallNoItemsFound extends DThemeWhiteNoteSmall {
|
|
4
|
+
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DStateAwareOrValueMightBe } from "../../d-state-aware";
|
|
2
|
+
import { DThemeWhiteNoteSmall } from "./d-theme-white-note-small";
|
|
3
|
+
export declare class DThemeWhiteNoteSmallSearching extends DThemeWhiteNoteSmall {
|
|
4
|
+
newTextValue(): DStateAwareOrValueMightBe<string>;
|
|
5
|
+
}
|
|
@@ -4,6 +4,7 @@ import { DAlignWith } from "../../d-align-with";
|
|
|
4
4
|
import { DBaseInteractive } from "../../d-base-interactive";
|
|
5
5
|
import { DBaseStateSet } from "../../d-base-state-set";
|
|
6
6
|
import { DCoordinateSize } from "../../d-coordinate";
|
|
7
|
+
import { DFontWeight } from "../../d-font";
|
|
7
8
|
import { DThemeNote } from "../../d-note";
|
|
8
9
|
import { DThemeWhiteImageBase } from "./d-theme-white-image-base";
|
|
9
10
|
export declare class DThemeWhiteNote extends DThemeWhiteImageBase<string> implements DThemeNote {
|
|
@@ -13,8 +14,10 @@ export declare class DThemeWhiteNote extends DThemeWhiteImageBase<string> implem
|
|
|
13
14
|
getInteractive(): DBaseInteractive;
|
|
14
15
|
getAlpha(): number;
|
|
15
16
|
getFontSize(): number;
|
|
17
|
+
getFontWeight(): DFontWeight;
|
|
16
18
|
getImageTintAlpha(state: DBaseStateSet): number;
|
|
17
19
|
getImageAlignWith(): DAlignWith;
|
|
18
20
|
getImageAlignHorizontal(): DAlignHorizontal;
|
|
19
21
|
getImageAlignVertical(): DAlignVertical;
|
|
22
|
+
newState(state: DBaseStateSet): void;
|
|
20
23
|
}
|
|
@@ -15,4 +15,5 @@ export declare class DThemeWhiteSliderThumb<VALUE = unknown> extends DThemeWhite
|
|
|
15
15
|
getImageTintColor(state: DBaseStateSet): number | null;
|
|
16
16
|
getImageTintAlpha(state: DBaseStateSet): number;
|
|
17
17
|
getImageAlignHorizontal(): DAlignHorizontal;
|
|
18
|
+
getOutlineOffset(state: DBaseStateSet): number;
|
|
18
19
|
}
|
|
@@ -4,4 +4,7 @@ import { DThemeWhiteButton } from "./d-theme-white-button";
|
|
|
4
4
|
export declare class DThemeWhiteSliderTrack<VALUE = unknown> extends DThemeWhiteButton<VALUE> implements DThemeSliderTrack<VALUE> {
|
|
5
5
|
getBackgroundColor(state: DBaseStateSet): number | null;
|
|
6
6
|
getBorderColor(state: DBaseStateSet): number | null;
|
|
7
|
+
getOutlineColor(state: DBaseStateSet): number | null;
|
|
8
|
+
getOutlineOffset(state: DBaseStateSet): number;
|
|
9
|
+
newState(state: DBaseStateSet): void;
|
|
7
10
|
}
|
|
@@ -3,9 +3,11 @@ import { DBorderMask } from "../../d-border-mask";
|
|
|
3
3
|
import { DCoordinateSize } from "../../d-coordinate";
|
|
4
4
|
import { DCornerMask } from "../../d-corner-mask";
|
|
5
5
|
export declare class DThemeWhiteTableBodyCells {
|
|
6
|
-
protected static readonly
|
|
7
|
-
protected static readonly
|
|
6
|
+
protected static readonly BACKGROUND_COLOR: number;
|
|
7
|
+
protected static readonly BACKGROUND_COLOR_FROZEN_EVEN: number;
|
|
8
|
+
protected static readonly BACKGROUND_COLOR_FROZEN_ODD: number;
|
|
8
9
|
protected static readonly BORDER_COLOR: number;
|
|
10
|
+
protected static readonly BORDER_COLOR_FROZEN: number;
|
|
9
11
|
static getBackgroundColor(state: DBaseStateSet): number | null;
|
|
10
12
|
static getBackgroundAlpha(state: DBaseStateSet): number;
|
|
11
13
|
static getBorderColor(state: DBaseStateSet): number | null;
|
|
@@ -13,7 +13,9 @@ export declare class DThemeWhiteTableHeaderCell extends DThemeWhiteImage<string
|
|
|
13
13
|
protected readonly BACKGROUND_COLOR: number;
|
|
14
14
|
protected readonly BACKGROUND_COLOR_HOVERED: number;
|
|
15
15
|
protected readonly BACKGROUND_COLOR_PRESSED: number;
|
|
16
|
+
protected readonly BACKGROUND_COLOR_FROZEN: number;
|
|
16
17
|
protected readonly BORDER_COLOR: number;
|
|
18
|
+
protected readonly BORDER_COLOR_FROZEN: number;
|
|
17
19
|
getBackgroundColor(state: DBaseStateSet): number | null;
|
|
18
20
|
getBackgroundAlpha(state: DBaseStateSet): number;
|
|
19
21
|
getBorderColor(state: DBaseStateSet): number | null;
|
|
@@ -130,6 +130,10 @@ export * from "./d-theme-white-menu";
|
|
|
130
130
|
export * from "./d-theme-white-note-error";
|
|
131
131
|
export * from "./d-theme-white-note-no-items-found";
|
|
132
132
|
export * from "./d-theme-white-note-searching";
|
|
133
|
+
export * from "./d-theme-white-note-small-error";
|
|
134
|
+
export * from "./d-theme-white-note-small-no-items-found";
|
|
135
|
+
export * from "./d-theme-white-note-small-searching";
|
|
136
|
+
export * from "./d-theme-white-note-small";
|
|
133
137
|
export * from "./d-theme-white-note";
|
|
134
138
|
export * from "./d-theme-white-pagination";
|
|
135
139
|
export * from "./d-theme-white-pagination-navigation-button";
|
|
@@ -9,9 +9,9 @@ import { DDialogSelectSearh } from "./d-dialog-select-search";
|
|
|
9
9
|
import { DInputSearch } from "./d-input-search";
|
|
10
10
|
import { DLayoutHorizontal } from "./d-layout-horizontal";
|
|
11
11
|
import { DLayoutSpace } from "./d-layout-space";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { DNoteSmallError } from "./d-note-small-error";
|
|
13
|
+
import { DNoteSmallNoItemsFound } from "./d-note-small-no-items-found";
|
|
14
|
+
import { DNoteSmallSearching } from "./d-note-small-searching";
|
|
15
15
|
import { isNumber } from "./util/is-number";
|
|
16
16
|
import { UtilTransition } from "./util/util-transition";
|
|
17
17
|
var DDialogSelect = /** @class */ (function (_super) {
|
|
@@ -168,14 +168,14 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
168
168
|
DDialogSelect.prototype.newNoteError = function (list, options) {
|
|
169
169
|
var error = options === null || options === void 0 ? void 0 : options.error;
|
|
170
170
|
if (error !== null) {
|
|
171
|
-
return new
|
|
171
|
+
return new DNoteSmallError(this.toNoteOptions(list, error));
|
|
172
172
|
}
|
|
173
173
|
return null;
|
|
174
174
|
};
|
|
175
175
|
DDialogSelect.prototype.newNoteNoItemsFound = function (list, options) {
|
|
176
176
|
var noItemsFound = options === null || options === void 0 ? void 0 : options.noItemsFound;
|
|
177
177
|
if (noItemsFound !== null) {
|
|
178
|
-
return new
|
|
178
|
+
return new DNoteSmallNoItemsFound(this.toNoteOptions(list, noItemsFound));
|
|
179
179
|
}
|
|
180
180
|
return null;
|
|
181
181
|
};
|
|
@@ -185,7 +185,7 @@ var DDialogSelect = /** @class */ (function (_super) {
|
|
|
185
185
|
// if options.searching is missing, i.e., if its value is undefined,
|
|
186
186
|
// this method returns null. This is why `!=` is used here instead of `!==`.
|
|
187
187
|
if (searching != null) {
|
|
188
|
-
return new
|
|
188
|
+
return new DNoteSmallSearching(this.toNoteOptions(list, searching));
|
|
189
189
|
}
|
|
190
190
|
return null;
|
|
191
191
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-dialog-select.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog-select.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EACN,cAAc,EAId,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAA4B,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAuB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAA4B,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAKhD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB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BAAM,MAAM,WAAE,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAC7B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,CAAC;IAES,4BAAI,GAAd,UAAe,KAA+C;QAC7D,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACjC,iBAAM,IAAI,YAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,+BAAO,GAAP;;QACC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACtB,MAAA,IAAI,CAAC,UAAU,0CAAE,OAAO,EAAE,CAAC;QAC3B,MAAA,IAAI,CAAC,iBAAiB,0CAAE,OAAO,EAAE,CAAC;QAClC,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACrB,iBAAM,OAAO,WAAE,CAAC;IACjB,CAAC;IACF,oBAAC;AAAD,CAAC,AA/QD,CAIU,cAAc,GA2QvB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport {\n\tDDialogCommand,\n\tDDialogCommandEvents,\n\tDDialogCommandOptions,\n\tDThemeDialogCommand\n} from \"./d-dialog-command\";\nimport { DDialogSelectList, DDialogSelectListOptions } from \"./d-dialog-select-list\";\nimport { DDialogSelectSearh } from \"./d-dialog-select-search\";\nimport { DInputSearch, DInputSearchOptions } from \"./d-input-search\";\nimport { DLayoutHorizontal, DLayoutHorizontalOptions } from \"./d-layout-horizontal\";\nimport { DLayoutSpace } from \"./d-layout-space\";\nimport { DLayoutVertical } from \"./d-layout-vertical\";\nimport { DListOptions } from \"./d-list\";\nimport { DListDataSelection } from \"./d-list-data-selection\";\nimport { DNote, DNoteOptions } from \"./d-note\";\nimport { DNoteError } from \"./d-note-error\";\nimport { DNoteNoItemsFound } from \"./d-note-no-items-found\";\nimport { DNoteSearching } from \"./d-note-searching\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { isNumber } from \"./util/is-number\";\nimport { UtilTransition } from \"./util/util-transition\";\n\nexport interface DDialogSelectInputMargin {\n\thorizontal: number;\n\tvertical: number;\n}\n\nexport interface DDialogSelectInputMarginOptions extends Partial<DDialogSelectInputMargin> {}\n\nexport interface DDialogSelectInputOpitons extends DInputSearchOptions {\n\tmargin?: DDialogSelectInputMarginOptions;\n}\n\n/**\n * {@link DDialogSelect} search object.\n */\nexport interface DDialogSelectSearch<VALUE> {\n\tcreate(args: [string]): void;\n\ton(event: \"success\", handler: (e: unknown, searchResults: VALUE[]) => void): void;\n\ton(event: \"fail\", handler: () => void): void;\n\ton(event: \"change\", handler: () => void): void;\n\tisDone(): boolean;\n\tgetResult(): VALUE[] | null;\n}\n\n/**\n * {@link DDialogSelect} search function.\n */\nexport type DDialogSelectSearchFunction<VALUE> = (word: string) => Promise<VALUE[]>;\n\n/**\n * {@link DDialogSelect} controller.\n */\nexport interface DDialogSelectController<VALUE> {\n\tsearch: DDialogSelectSearch<VALUE> | DDialogSelectSearchFunction<VALUE>;\n}\n\n/**\n * {@link DDialogSelect} note options.\n */\nexport interface DDialogSelectNoteOptions {\n\terror?: DNoteOptions | null;\n\tnoItemsFound?: DNoteOptions | null;\n\tsearching?: DNoteOptions | null;\n}\n\nexport type DDialogSelectItemToLabel<VALUE> = (result: VALUE, caller: any) => string;\n\nexport type DDialogSelectItemIsEqual<VALUE> = (a: VALUE, b: VALUE, caller: any) => boolean;\n\n/**\n * {@link DDialogSelect} events.\n */\nexport interface DDialogSelectEvents<VALUE, EMITTER> extends DDialogCommandEvents<VALUE, EMITTER> {\n\tselect(value: VALUE, self: EMITTER): void;\n}\n\n/**\n * {@link DDialogSelect} \"on\" options.\n */\nexport interface DDialogSelectOnOptions<VALUE, EMITTER>\n\textends Partial<DDialogSelectEvents<VALUE, EMITTER>>,\n\t\tDOnOptions {}\n\n/**\n * {@link DDialogSelect} options.\n */\nexport interface DDialogSelectOptions<\n\tVALUE,\n\tTHEME extends DThemeDialogSelect<VALUE> = DThemeDialogSelect<VALUE>,\n\tEMITTER = any\n> extends DDialogCommandOptions<VALUE, THEME> {\n\tcontroller?: DDialogSelectController<VALUE>;\n\tinput?: DDialogSelectInputOpitons;\n\tlist?: DListOptions<VALUE>;\n\tnote?: DDialogSelectNoteOptions;\n\ton?: DDialogSelectOnOptions<VALUE, EMITTER>;\n}\n\n/**\n * {@link DDialogSelect} theme.\n */\nexport interface DThemeDialogSelect<VALUE = unknown> extends DThemeDialogCommand {\n\tgetInputMarginVertical(): number;\n\tgetInputMarginHorizontal(): number;\n}\n\nexport class DDialogSelect<\n\tVALUE = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE> = DThemeDialogSelect<VALUE>,\n\tOPTIONS extends DDialogSelectOptions<VALUE, THEME> = DDialogSelectOptions<VALUE, THEME>\n> extends DDialogCommand<VALUE | null, THEME, OPTIONS> {\n\tprotected _value!: VALUE | null;\n\tprotected _input!: DInputSearch;\n\tprotected _list!: DDialogSelectList<VALUE>;\n\tprotected _search!: DDialogSelectSearch<VALUE>;\n\tprotected _noteError?: DNote | null;\n\tprotected _noteNoItemsFound?: DNote | null;\n\tprotected _noteSearching?: DNote | null;\n\n\tprotected onInit(layout: DLayoutVertical, options?: OPTIONS): void {\n\t\tthis._value = null;\n\t\tconst theme = this.theme;\n\n\t\t// Search box\n\t\tconst input = this.newInput(theme, options);\n\t\tthis._input = input;\n\t\tlayout.addChild(this.newInputLayout(layout, input, theme, options));\n\n\t\t// List\n\t\tconst list = this.newList(theme, options);\n\t\tthis._list = list;\n\t\tlayout.addChild(list);\n\n\t\t// Error note\n\t\tconst noteOptions = options?.note;\n\t\tconst noteError = this.newNoteError(list, noteOptions);\n\t\tthis._noteError = noteError;\n\n\t\t// No items found note\n\t\tconst noteNoItemsFound = this.newNoteNoItemsFound(list, noteOptions);\n\t\tthis._noteNoItemsFound = noteNoItemsFound;\n\n\t\t// Searching note\n\t\tconst noteSearching = this.newNoteSearching(list, noteOptions);\n\t\tthis._noteSearching = noteSearching;\n\n\t\t// Controller binding\n\t\tconst search = this.toSearch(options?.controller);\n\t\tthis._search = search;\n\t\tinput.on(\"input\", (value: string): void => {\n\t\t\tsearch.create([value]);\n\t\t});\n\n\t\tsearch.on(\"success\", (e: unknown, results: VALUE[]): void => {\n\t\t\tthis.onSearched(results);\n\t\t});\n\t\tsearch.on(\"fail\", (): void => {\n\t\t\tthis.onSearched([]);\n\t\t});\n\n\t\t// Visibility\n\t\tconst transition = new UtilTransition();\n\t\tsearch.on(\"change\", (): void => {\n\t\t\tif (search.isDone()) {\n\t\t\t\tconst result = search.getResult();\n\t\t\t\tif (result != null) {\n\t\t\t\t\tif (0 < result.length) {\n\t\t\t\t\t\ttransition.hide();\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttransition.show(noteNoItemsFound);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttransition.show(noteError);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (noteSearching) {\n\t\t\t\t\ttransition.show(noteSearching);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected newInput(theme: THEME, options?: OPTIONS): DInputSearch {\n\t\treturn new DInputSearch(this.toInputOptions(theme, options));\n\t}\n\n\tprotected toInputOptions(theme: THEME, options?: OPTIONS): DInputSearchOptions {\n\t\tconst result = options?.input || {};\n\t\tif (result.width === undefined && result.weight === undefined) {\n\t\t\tresult.weight = 1;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newInputLayout(\n\t\tlayout: DLayoutHorizontal | DLayoutVertical,\n\t\tinput: DInputSearch,\n\t\ttheme: THEME,\n\t\toptions: OPTIONS | undefined\n\t): DLayoutHorizontal {\n\t\treturn new DLayoutHorizontal(this.toInputLayoutOptions(layout, input, theme, options));\n\t}\n\n\tprotected toInputLayoutOptions(\n\t\tlayout: DLayoutHorizontal | DLayoutVertical,\n\t\tinput: DInputSearch,\n\t\ttheme: THEME,\n\t\toptions: OPTIONS | undefined\n\t): DLayoutHorizontalOptions {\n\t\tconst margin = this.toInputMargin(theme, options);\n\t\tconst marginHorizontal = margin.horizontal;\n\t\tconst marginVertical = margin.vertical + this.padding.getTop() - layout.margin.vertical;\n\t\treturn {\n\t\t\twidth: \"padding\",\n\t\t\theight: \"auto\",\n\t\t\tpadding: {\n\t\t\t\tbottom: Math.max(0, marginVertical)\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tnew DLayoutSpace({ width: marginHorizontal }),\n\t\t\t\tinput,\n\t\t\t\tnew DLayoutSpace({ width: marginHorizontal })\n\t\t\t]\n\t\t};\n\t}\n\n\tprotected toInputMargin(theme: THEME, options?: OPTIONS): DDialogSelectInputMargin {\n\t\tconst margin = options?.input?.margin;\n\t\tif (margin != null) {\n\t\t\tif (isNumber(margin)) {\n\t\t\t\treturn {\n\t\t\t\t\thorizontal: margin,\n\t\t\t\t\tvertical: margin\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst horizontal = margin.horizontal;\n\t\t\t\tconst vertical = margin.vertical;\n\t\t\t\treturn {\n\t\t\t\t\thorizontal: horizontal ?? theme.getInputMarginHorizontal(),\n\t\t\t\t\tvertical: vertical ?? theme.getInputMarginVertical()\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\thorizontal: theme.getInputMarginHorizontal(),\n\t\t\tvertical: theme.getInputMarginVertical()\n\t\t};\n\t}\n\n\tprotected toListOptions(theme: THEME, options?: OPTIONS): DDialogSelectListOptions<VALUE> {\n\t\tconst result = options?.list || {};\n\t\tif (result.width === undefined) {\n\t\t\tresult.width = \"padding\";\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newList(theme: THEME, options?: OPTIONS): DDialogSelectList<VALUE> {\n\t\tconst result = new DDialogSelectList<VALUE>(this.toListOptions(theme, options));\n\t\tresult.selection.on(\"change\", (selection: DListDataSelection<VALUE>): void => {\n\t\t\tconst first = selection.first;\n\t\t\tif (first != null) {\n\t\t\t\tthis._value = first;\n\t\t\t\tthis.onOk(first);\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected toNoteOptions(parent: DBase, options?: DNoteOptions): DNoteOptions {\n\t\tif (options != null) {\n\t\t\tif (options.parent == null) {\n\t\t\t\toptions.parent = parent;\n\t\t\t}\n\t\t\tif (options.visible == null) {\n\t\t\t\toptions.visible = false;\n\t\t\t}\n\t\t\treturn options;\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tvisible: false\n\t\t};\n\t}\n\n\tprotected newNoteError(\n\t\tlist: DDialogSelectList<VALUE>,\n\t\toptions?: DDialogSelectNoteOptions\n\t): DNote | null | undefined {\n\t\tconst error = options?.error;\n\t\tif (error !== null) {\n\t\t\treturn new DNoteError(this.toNoteOptions(list, error));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected newNoteNoItemsFound(\n\t\tlist: DDialogSelectList<VALUE>,\n\t\toptions?: DDialogSelectNoteOptions\n\t): DNote | null | undefined {\n\t\tconst noItemsFound = options?.noItemsFound;\n\t\tif (noItemsFound !== null) {\n\t\t\treturn new DNoteNoItemsFound(this.toNoteOptions(list, noItemsFound));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected newNoteSearching(\n\t\tlist: DDialogSelectList<VALUE>,\n\t\toptions?: DDialogSelectNoteOptions\n\t): DNote | null | undefined {\n\t\tconst searching = options?.searching;\n\t\t// Because the `searcing` note is disabled by default,\n\t\t// if options.searching is missing, i.e., if its value is undefined,\n\t\t// this method returns null. This is why `!=` is used here instead of `!==`.\n\t\tif (searching != null) {\n\t\t\treturn new DNoteSearching(this.toNoteOptions(list, searching));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected toSearch(controller?: DDialogSelectController<VALUE>): DDialogSelectSearch<VALUE> {\n\t\tif (controller) {\n\t\t\tconst search = controller.search;\n\t\t\tif (\"create\" in search) {\n\t\t\t\treturn search;\n\t\t\t} else {\n\t\t\t\treturn new DDialogSelectSearh(search);\n\t\t\t}\n\t\t} else {\n\t\t\treturn new DDialogSelectSearh();\n\t\t}\n\t}\n\n\tget input(): DInputSearch {\n\t\treturn this._input;\n\t}\n\n\tget list(): DDialogSelectList<VALUE> {\n\t\treturn this._list;\n\t}\n\n\tget value(): VALUE | null {\n\t\treturn this._value;\n\t}\n\n\tprotected onSearched(results: VALUE[]): void {\n\t\tthis._list.data.items = results;\n\t}\n\n\tprotected getResolvedValue(): VALUE | null | PromiseLike<VALUE | null> {\n\t\treturn this._value;\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDialogSelect\";\n\t}\n\n\tprotected onOpen(): void {\n\t\tsuper.onOpen();\n\t\tthis._list.selection.clear();\n\t\tthis._search.create([this._input.value]);\n\t}\n\n\tprotected onOk(value: VALUE | null | PromiseLike<VALUE | null>): void {\n\t\tthis.emit(\"select\", value, this);\n\t\tsuper.onOk(value);\n\t}\n\n\tdestroy(): void {\n\t\tthis._input.destroy();\n\t\tthis._noteError?.destroy();\n\t\tthis._noteNoItemsFound?.destroy();\n\t\tthis._noteSearching?.destroy();\n\t\tthis._list.destroy();\n\t\tsuper.destroy();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-dialog-select.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog-select.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EACN,cAAc,EAId,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAA4B,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAuB,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAA4B,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,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;IAES,+BAAO,GAAjB;QACC,OAAO,eAAe,CAAC;IACxB,CAAC;IAES,8BAAM,GAAhB;QACC,iBAAM,MAAM,WAAE,CAAC;QACf,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAC7B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1C,CAAC;IAES,4BAAI,GAAd,UAAe,KAA+C;QAC7D,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QACjC,iBAAM,IAAI,YAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,+BAAO,GAAP;;QACC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACtB,MAAA,IAAI,CAAC,UAAU,0CAAE,OAAO,EAAE,CAAC;QAC3B,MAAA,IAAI,CAAC,iBAAiB,0CAAE,OAAO,EAAE,CAAC;QAClC,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACrB,iBAAM,OAAO,WAAE,CAAC;IACjB,CAAC;IACF,oBAAC;AAAD,CAAC,AA/QD,CAIU,cAAc,GA2QvB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport {\n\tDDialogCommand,\n\tDDialogCommandEvents,\n\tDDialogCommandOptions,\n\tDThemeDialogCommand\n} from \"./d-dialog-command\";\nimport { DDialogSelectList, DDialogSelectListOptions } from \"./d-dialog-select-list\";\nimport { DDialogSelectSearh } from \"./d-dialog-select-search\";\nimport { DInputSearch, DInputSearchOptions } from \"./d-input-search\";\nimport { DLayoutHorizontal, DLayoutHorizontalOptions } from \"./d-layout-horizontal\";\nimport { DLayoutSpace } from \"./d-layout-space\";\nimport { DLayoutVertical } from \"./d-layout-vertical\";\nimport { DListOptions } from \"./d-list\";\nimport { DListDataSelection } from \"./d-list-data-selection\";\nimport { DNote, DNoteOptions } from \"./d-note\";\nimport { DNoteSmallError } from \"./d-note-small-error\";\nimport { DNoteSmallNoItemsFound } from \"./d-note-small-no-items-found\";\nimport { DNoteSmallSearching } from \"./d-note-small-searching\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { isNumber } from \"./util/is-number\";\nimport { UtilTransition } from \"./util/util-transition\";\n\nexport interface DDialogSelectInputMargin {\n\thorizontal: number;\n\tvertical: number;\n}\n\nexport interface DDialogSelectInputMarginOptions extends Partial<DDialogSelectInputMargin> {}\n\nexport interface DDialogSelectInputOpitons extends DInputSearchOptions {\n\tmargin?: DDialogSelectInputMarginOptions;\n}\n\n/**\n * {@link DDialogSelect} search object.\n */\nexport interface DDialogSelectSearch<VALUE> {\n\tcreate(args: [string]): void;\n\ton(event: \"success\", handler: (e: unknown, searchResults: VALUE[]) => void): void;\n\ton(event: \"fail\", handler: () => void): void;\n\ton(event: \"change\", handler: () => void): void;\n\tisDone(): boolean;\n\tgetResult(): VALUE[] | null;\n}\n\n/**\n * {@link DDialogSelect} search function.\n */\nexport type DDialogSelectSearchFunction<VALUE> = (word: string) => Promise<VALUE[]>;\n\n/**\n * {@link DDialogSelect} controller.\n */\nexport interface DDialogSelectController<VALUE> {\n\tsearch: DDialogSelectSearch<VALUE> | DDialogSelectSearchFunction<VALUE>;\n}\n\n/**\n * {@link DDialogSelect} note options.\n */\nexport interface DDialogSelectNoteOptions {\n\terror?: DNoteOptions | null;\n\tnoItemsFound?: DNoteOptions | null;\n\tsearching?: DNoteOptions | null;\n}\n\nexport type DDialogSelectItemToLabel<VALUE> = (result: VALUE, caller: any) => string;\n\nexport type DDialogSelectItemIsEqual<VALUE> = (a: VALUE, b: VALUE, caller: any) => boolean;\n\n/**\n * {@link DDialogSelect} events.\n */\nexport interface DDialogSelectEvents<VALUE, EMITTER> extends DDialogCommandEvents<VALUE, EMITTER> {\n\tselect(value: VALUE, self: EMITTER): void;\n}\n\n/**\n * {@link DDialogSelect} \"on\" options.\n */\nexport interface DDialogSelectOnOptions<VALUE, EMITTER>\n\textends Partial<DDialogSelectEvents<VALUE, EMITTER>>,\n\t\tDOnOptions {}\n\n/**\n * {@link DDialogSelect} options.\n */\nexport interface DDialogSelectOptions<\n\tVALUE,\n\tTHEME extends DThemeDialogSelect<VALUE> = DThemeDialogSelect<VALUE>,\n\tEMITTER = any\n> extends DDialogCommandOptions<VALUE, THEME> {\n\tcontroller?: DDialogSelectController<VALUE>;\n\tinput?: DDialogSelectInputOpitons;\n\tlist?: DListOptions<VALUE>;\n\tnote?: DDialogSelectNoteOptions;\n\ton?: DDialogSelectOnOptions<VALUE, EMITTER>;\n}\n\n/**\n * {@link DDialogSelect} theme.\n */\nexport interface DThemeDialogSelect<VALUE = unknown> extends DThemeDialogCommand {\n\tgetInputMarginVertical(): number;\n\tgetInputMarginHorizontal(): number;\n}\n\nexport class DDialogSelect<\n\tVALUE = unknown,\n\tTHEME extends DThemeDialogSelect<VALUE> = DThemeDialogSelect<VALUE>,\n\tOPTIONS extends DDialogSelectOptions<VALUE, THEME> = DDialogSelectOptions<VALUE, THEME>\n> extends DDialogCommand<VALUE | null, THEME, OPTIONS> {\n\tprotected _value!: VALUE | null;\n\tprotected _input!: DInputSearch;\n\tprotected _list!: DDialogSelectList<VALUE>;\n\tprotected _search!: DDialogSelectSearch<VALUE>;\n\tprotected _noteError?: DNote | null;\n\tprotected _noteNoItemsFound?: DNote | null;\n\tprotected _noteSearching?: DNote | null;\n\n\tprotected onInit(layout: DLayoutVertical, options?: OPTIONS): void {\n\t\tthis._value = null;\n\t\tconst theme = this.theme;\n\n\t\t// Search box\n\t\tconst input = this.newInput(theme, options);\n\t\tthis._input = input;\n\t\tlayout.addChild(this.newInputLayout(layout, input, theme, options));\n\n\t\t// List\n\t\tconst list = this.newList(theme, options);\n\t\tthis._list = list;\n\t\tlayout.addChild(list);\n\n\t\t// Error note\n\t\tconst noteOptions = options?.note;\n\t\tconst noteError = this.newNoteError(list, noteOptions);\n\t\tthis._noteError = noteError;\n\n\t\t// No items found note\n\t\tconst noteNoItemsFound = this.newNoteNoItemsFound(list, noteOptions);\n\t\tthis._noteNoItemsFound = noteNoItemsFound;\n\n\t\t// Searching note\n\t\tconst noteSearching = this.newNoteSearching(list, noteOptions);\n\t\tthis._noteSearching = noteSearching;\n\n\t\t// Controller binding\n\t\tconst search = this.toSearch(options?.controller);\n\t\tthis._search = search;\n\t\tinput.on(\"input\", (value: string): void => {\n\t\t\tsearch.create([value]);\n\t\t});\n\n\t\tsearch.on(\"success\", (e: unknown, results: VALUE[]): void => {\n\t\t\tthis.onSearched(results);\n\t\t});\n\t\tsearch.on(\"fail\", (): void => {\n\t\t\tthis.onSearched([]);\n\t\t});\n\n\t\t// Visibility\n\t\tconst transition = new UtilTransition();\n\t\tsearch.on(\"change\", (): void => {\n\t\t\tif (search.isDone()) {\n\t\t\t\tconst result = search.getResult();\n\t\t\t\tif (result != null) {\n\t\t\t\t\tif (0 < result.length) {\n\t\t\t\t\t\ttransition.hide();\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttransition.show(noteNoItemsFound);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttransition.show(noteError);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (noteSearching) {\n\t\t\t\t\ttransition.show(noteSearching);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected newInput(theme: THEME, options?: OPTIONS): DInputSearch {\n\t\treturn new DInputSearch(this.toInputOptions(theme, options));\n\t}\n\n\tprotected toInputOptions(theme: THEME, options?: OPTIONS): DInputSearchOptions {\n\t\tconst result = options?.input || {};\n\t\tif (result.width === undefined && result.weight === undefined) {\n\t\t\tresult.weight = 1;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newInputLayout(\n\t\tlayout: DLayoutHorizontal | DLayoutVertical,\n\t\tinput: DInputSearch,\n\t\ttheme: THEME,\n\t\toptions: OPTIONS | undefined\n\t): DLayoutHorizontal {\n\t\treturn new DLayoutHorizontal(this.toInputLayoutOptions(layout, input, theme, options));\n\t}\n\n\tprotected toInputLayoutOptions(\n\t\tlayout: DLayoutHorizontal | DLayoutVertical,\n\t\tinput: DInputSearch,\n\t\ttheme: THEME,\n\t\toptions: OPTIONS | undefined\n\t): DLayoutHorizontalOptions {\n\t\tconst margin = this.toInputMargin(theme, options);\n\t\tconst marginHorizontal = margin.horizontal;\n\t\tconst marginVertical = margin.vertical + this.padding.getTop() - layout.margin.vertical;\n\t\treturn {\n\t\t\twidth: \"padding\",\n\t\t\theight: \"auto\",\n\t\t\tpadding: {\n\t\t\t\tbottom: Math.max(0, marginVertical)\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\tnew DLayoutSpace({ width: marginHorizontal }),\n\t\t\t\tinput,\n\t\t\t\tnew DLayoutSpace({ width: marginHorizontal })\n\t\t\t]\n\t\t};\n\t}\n\n\tprotected toInputMargin(theme: THEME, options?: OPTIONS): DDialogSelectInputMargin {\n\t\tconst margin = options?.input?.margin;\n\t\tif (margin != null) {\n\t\t\tif (isNumber(margin)) {\n\t\t\t\treturn {\n\t\t\t\t\thorizontal: margin,\n\t\t\t\t\tvertical: margin\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst horizontal = margin.horizontal;\n\t\t\t\tconst vertical = margin.vertical;\n\t\t\t\treturn {\n\t\t\t\t\thorizontal: horizontal ?? theme.getInputMarginHorizontal(),\n\t\t\t\t\tvertical: vertical ?? theme.getInputMarginVertical()\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\thorizontal: theme.getInputMarginHorizontal(),\n\t\t\tvertical: theme.getInputMarginVertical()\n\t\t};\n\t}\n\n\tprotected toListOptions(theme: THEME, options?: OPTIONS): DDialogSelectListOptions<VALUE> {\n\t\tconst result = options?.list || {};\n\t\tif (result.width === undefined) {\n\t\t\tresult.width = \"padding\";\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newList(theme: THEME, options?: OPTIONS): DDialogSelectList<VALUE> {\n\t\tconst result = new DDialogSelectList<VALUE>(this.toListOptions(theme, options));\n\t\tresult.selection.on(\"change\", (selection: DListDataSelection<VALUE>): void => {\n\t\t\tconst first = selection.first;\n\t\t\tif (first != null) {\n\t\t\t\tthis._value = first;\n\t\t\t\tthis.onOk(first);\n\t\t\t}\n\t\t});\n\t\treturn result;\n\t}\n\n\tprotected toNoteOptions(parent: DBase, options?: DNoteOptions): DNoteOptions {\n\t\tif (options != null) {\n\t\t\tif (options.parent == null) {\n\t\t\t\toptions.parent = parent;\n\t\t\t}\n\t\t\tif (options.visible == null) {\n\t\t\t\toptions.visible = false;\n\t\t\t}\n\t\t\treturn options;\n\t\t}\n\t\treturn {\n\t\t\tparent,\n\t\t\tvisible: false\n\t\t};\n\t}\n\n\tprotected newNoteError(\n\t\tlist: DDialogSelectList<VALUE>,\n\t\toptions?: DDialogSelectNoteOptions\n\t): DNote | null | undefined {\n\t\tconst error = options?.error;\n\t\tif (error !== null) {\n\t\t\treturn new DNoteSmallError(this.toNoteOptions(list, error));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected newNoteNoItemsFound(\n\t\tlist: DDialogSelectList<VALUE>,\n\t\toptions?: DDialogSelectNoteOptions\n\t): DNote | null | undefined {\n\t\tconst noItemsFound = options?.noItemsFound;\n\t\tif (noItemsFound !== null) {\n\t\t\treturn new DNoteSmallNoItemsFound(this.toNoteOptions(list, noItemsFound));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected newNoteSearching(\n\t\tlist: DDialogSelectList<VALUE>,\n\t\toptions?: DDialogSelectNoteOptions\n\t): DNote | null | undefined {\n\t\tconst searching = options?.searching;\n\t\t// Because the `searcing` note is disabled by default,\n\t\t// if options.searching is missing, i.e., if its value is undefined,\n\t\t// this method returns null. This is why `!=` is used here instead of `!==`.\n\t\tif (searching != null) {\n\t\t\treturn new DNoteSmallSearching(this.toNoteOptions(list, searching));\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected toSearch(controller?: DDialogSelectController<VALUE>): DDialogSelectSearch<VALUE> {\n\t\tif (controller) {\n\t\t\tconst search = controller.search;\n\t\t\tif (\"create\" in search) {\n\t\t\t\treturn search;\n\t\t\t} else {\n\t\t\t\treturn new DDialogSelectSearh(search);\n\t\t\t}\n\t\t} else {\n\t\t\treturn new DDialogSelectSearh();\n\t\t}\n\t}\n\n\tget input(): DInputSearch {\n\t\treturn this._input;\n\t}\n\n\tget list(): DDialogSelectList<VALUE> {\n\t\treturn this._list;\n\t}\n\n\tget value(): VALUE | null {\n\t\treturn this._value;\n\t}\n\n\tprotected onSearched(results: VALUE[]): void {\n\t\tthis._list.data.items = results;\n\t}\n\n\tprotected getResolvedValue(): VALUE | null | PromiseLike<VALUE | null> {\n\t\treturn this._value;\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDialogSelect\";\n\t}\n\n\tprotected onOpen(): void {\n\t\tsuper.onOpen();\n\t\tthis._list.selection.clear();\n\t\tthis._search.create([this._input.value]);\n\t}\n\n\tprotected onOk(value: VALUE | null | PromiseLike<VALUE | null>): void {\n\t\tthis.emit(\"select\", value, this);\n\t\tsuper.onOk(value);\n\t}\n\n\tdestroy(): void {\n\t\tthis._input.destroy();\n\t\tthis._noteError?.destroy();\n\t\tthis._noteNoItemsFound?.destroy();\n\t\tthis._noteSearching?.destroy();\n\t\tthis._list.destroy();\n\t\tsuper.destroy();\n\t}\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { DNoteSmall } from "./d-note-small";
|
|
7
|
+
var DNoteSmallError = /** @class */ (function (_super) {
|
|
8
|
+
__extends(DNoteSmallError, _super);
|
|
9
|
+
function DNoteSmallError() {
|
|
10
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
DNoteSmallError.prototype.getType = function () {
|
|
13
|
+
return "DNoteSmallError";
|
|
14
|
+
};
|
|
15
|
+
return DNoteSmallError;
|
|
16
|
+
}(DNoteSmall));
|
|
17
|
+
export { DNoteSmallError };
|
|
18
|
+
//# sourceMappingURL=d-note-small-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-note-small-error.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-note-small-error.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,UAAU,EAAsC,MAAM,gBAAgB,CAAC;AAOhF;IAGU,mCAA0B;IAHpC;;IAOA,CAAC;IAHU,iCAAO,GAAjB;QACC,OAAO,iBAAiB,CAAC;IAC1B,CAAC;IACF,sBAAC;AAAD,CAAC,AAPD,CAGU,UAAU,GAInB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DNoteSmall, DNoteSmallOptions, DThemeNoteSmall } from \"./d-note-small\";\n\nexport interface DNoteSmallErrorOptions<THEME extends DThemeNoteSmallError = DThemeNoteSmallError>\n\textends DNoteSmallOptions<THEME> {}\n\nexport interface DThemeNoteSmallError extends DThemeNoteSmall {}\n\nexport class DNoteSmallError<\n\tTHEME extends DThemeNoteSmallError = DThemeNoteSmallError,\n\tOPTIONS extends DNoteSmallErrorOptions<THEME> = DNoteSmallErrorOptions<THEME>\n> extends DNoteSmall<THEME, OPTIONS> {\n\tprotected getType(): string {\n\t\treturn \"DNoteSmallError\";\n\t}\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { DNoteSmall } from "./d-note-small";
|
|
7
|
+
var DNoteSmallNoItemsFound = /** @class */ (function (_super) {
|
|
8
|
+
__extends(DNoteSmallNoItemsFound, _super);
|
|
9
|
+
function DNoteSmallNoItemsFound() {
|
|
10
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
DNoteSmallNoItemsFound.prototype.getType = function () {
|
|
13
|
+
return "DNoteSmallNoItemsFound";
|
|
14
|
+
};
|
|
15
|
+
return DNoteSmallNoItemsFound;
|
|
16
|
+
}(DNoteSmall));
|
|
17
|
+
export { DNoteSmallNoItemsFound };
|
|
18
|
+
//# sourceMappingURL=d-note-small-no-items-found.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-note-small-no-items-found.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-note-small-no-items-found.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,UAAU,EAAsC,MAAM,gBAAgB,CAAC;AAQhF;IAGU,0CAA0B;IAHpC;;IAOA,CAAC;IAHU,wCAAO,GAAjB;QACC,OAAO,wBAAwB,CAAC;IACjC,CAAC;IACF,6BAAC;AAAD,CAAC,AAPD,CAGU,UAAU,GAInB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DNoteSmall, DNoteSmallOptions, DThemeNoteSmall } from \"./d-note-small\";\n\nexport interface DNoteSmallNoItemsFoundOptions<\n\tTHEME extends DThemeNoteSmallNoItemsFound = DThemeNoteSmallNoItemsFound\n> extends DNoteSmallOptions<THEME> {}\n\nexport interface DThemeNoteSmallNoItemsFound extends DThemeNoteSmall {}\n\nexport class DNoteSmallNoItemsFound<\n\tTHEME extends DThemeNoteSmallNoItemsFound = DThemeNoteSmallNoItemsFound,\n\tOPTIONS extends DNoteSmallNoItemsFoundOptions<THEME> = DNoteSmallNoItemsFoundOptions<THEME>\n> extends DNoteSmall<THEME, OPTIONS> {\n\tprotected getType(): string {\n\t\treturn \"DNoteSmallNoItemsFound\";\n\t}\n}\n"]}
|