@wcardinal/wcardinal-ui 0.366.0 → 0.367.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-dialog-select-search-function.d.ts +1 -13
- package/dist/wcardinal/ui/d-dialog-select-search-function.js +1 -18
- package/dist/wcardinal/ui/d-dialog-select-search-function.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-select-search-impl.js +4 -4
- package/dist/wcardinal/ui/d-dialog-select-search-impl.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +5 -27
- package/dist/wcardinal-ui.js +5 -27
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* {@link DDialogSelect} uncategorized search function.
|
|
3
|
-
*/
|
|
4
|
-
export declare type DDialogSelectSearchFunctionUncategorized<VALUE> = (word: string) => Promise<VALUE[]>;
|
|
5
|
-
/**
|
|
6
|
-
* {@link DDialogSelect} categorized search function.
|
|
7
|
-
*/
|
|
8
|
-
export declare type DDialogSelectSearchFunctionCategorized<VALUE, CATEGORY_ID> = (word: string, categoryId: CATEGORY_ID | null) => Promise<VALUE[]>;
|
|
9
1
|
/**
|
|
10
2
|
* {@link DDialogSelect} search function.
|
|
11
3
|
*/
|
|
12
|
-
export declare type DDialogSelectSearchFunction<VALUE, CATEGORY_ID> =
|
|
13
|
-
export declare const DDialogSelectSearchFunctions: {
|
|
14
|
-
isUncategorized<VALUE, CATEGORY_ID>(search: DDialogSelectSearchFunction<VALUE, CATEGORY_ID>): search is DDialogSelectSearchFunctionUncategorized<VALUE>;
|
|
15
|
-
toCategorized<VALUE_1, CATEGORY_ID_1>(search?: DDialogSelectSearchFunction<VALUE_1, CATEGORY_ID_1> | undefined): DDialogSelectSearchFunctionCategorized<VALUE_1, CATEGORY_ID_1>;
|
|
16
|
-
};
|
|
4
|
+
export declare type DDialogSelectSearchFunction<VALUE, CATEGORY_ID> = (word: string, categoryId?: CATEGORY_ID | null) => Promise<VALUE[]>;
|
|
@@ -2,22 +2,5 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
isUncategorized: function (search) {
|
|
7
|
-
return search.length <= 1;
|
|
8
|
-
},
|
|
9
|
-
toCategorized: function (search) {
|
|
10
|
-
if (search == null) {
|
|
11
|
-
return function (word, categoryId) { return Promise.resolve([]); };
|
|
12
|
-
}
|
|
13
|
-
else if (this.isUncategorized(search)) {
|
|
14
|
-
return function (word, categoryId) {
|
|
15
|
-
return search(word);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return search;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
5
|
+
export {};
|
|
23
6
|
//# sourceMappingURL=d-dialog-select-search-function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-dialog-select-search-function.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog-select-search-function.ts"],"names":[],"mappings":"AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"d-dialog-select-search-function.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog-select-search-function.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * {@link DDialogSelect} search function.\n */\nexport type DDialogSelectSearchFunction<VALUE, CATEGORY_ID> = (\n\tword: string,\n\tcategoryId?: CATEGORY_ID | null\n) => Promise<VALUE[]>;\n"]}
|
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
6
|
import { utils } from "pixi.js";
|
|
7
|
-
import { DDialogSelectSearchFunctions } from "./d-dialog-select-search-function";
|
|
8
7
|
var DDialogSelectSearhImpl = /** @class */ (function (_super) {
|
|
9
8
|
__extends(DDialogSelectSearhImpl, _super);
|
|
10
9
|
function DDialogSelectSearhImpl(search) {
|
|
11
10
|
var _this = _super.call(this) || this;
|
|
12
|
-
_this._search =
|
|
11
|
+
_this._search =
|
|
12
|
+
search !== null && search !== void 0 ? search : (function (word, categoryId) { return Promise.resolve([]); });
|
|
13
13
|
_this._id = 0;
|
|
14
14
|
_this._idCompleted = 0;
|
|
15
15
|
return _this;
|
|
16
16
|
}
|
|
17
17
|
DDialogSelectSearhImpl.prototype.create = function (args) {
|
|
18
18
|
var _this = this;
|
|
19
|
-
var _a;
|
|
20
19
|
var id = ++this._id;
|
|
21
|
-
|
|
20
|
+
var search = this._search;
|
|
21
|
+
(args.length <= 1 ? search(args[0]) : search(args[0], args[1])).then(function (searchResult) {
|
|
22
22
|
if (_this._id === id) {
|
|
23
23
|
_this._idCompleted = id;
|
|
24
24
|
_this.emit("success", _this, searchResult);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-dialog-select-search-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog-select-search-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"d-dialog-select-search-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-dialog-select-search-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC;IACS,0CAAkB;IAO1B,gCAAY,MAAwD;QAApE,YACC,iBAAO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,GAAN;QACC,OAAO,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,YAAY,CAAC;IACvC,CAAC;IACF,6BAAC;AAAD,CAAC,AA1CD,CACS,KAAK,CAAC,YAAY,GAyC1B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { utils } from \"pixi.js\";\nimport { DDialogSelectSearchFunction } from \"./d-dialog-select-search-function\";\nimport { DDialogSelectSearch } from \"./d-dialog-select-search\";\n\nexport class DDialogSelectSearhImpl<VALUE, CATEGORY_ID>\n\textends utils.EventEmitter\n\timplements DDialogSelectSearch<VALUE, CATEGORY_ID>\n{\n\tprotected _search: DDialogSelectSearchFunction<VALUE, CATEGORY_ID>;\n\tprotected _id: number;\n\tprotected _idCompleted: number;\n\n\tconstructor(search?: DDialogSelectSearchFunction<VALUE, CATEGORY_ID>) {\n\t\tsuper();\n\n\t\tthis._search =\n\t\t\tsearch ?? ((word: string, categoryId?: CATEGORY_ID | null) => Promise.resolve([]));\n\t\tthis._id = 0;\n\t\tthis._idCompleted = 0;\n\t}\n\n\tcreate(args: [string] | [string, CATEGORY_ID | null]): void {\n\t\tconst id = ++this._id;\n\t\tconst search = this._search;\n\t\t(args.length <= 1 ? search(args[0]) : search(args[0], args[1])).then(\n\t\t\t(searchResult: VALUE[]) => {\n\t\t\t\tif (this._id === id) {\n\t\t\t\t\tthis._idCompleted = id;\n\t\t\t\t\tthis.emit(\"success\", this, searchResult);\n\t\t\t\t\tthis.emit(\"change\", this);\n\t\t\t\t}\n\t\t\t},\n\t\t\t() => {\n\t\t\t\tif (this._id === id) {\n\t\t\t\t\tthis._idCompleted = id;\n\t\t\t\t\tthis.emit(\"fail\", this);\n\t\t\t\t\tthis.emit(\"change\", this);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tisDone(): boolean {\n\t\treturn this._id === this._idCompleted;\n\t}\n}\n"]}
|
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.367.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -73949,29 +73949,6 @@ var DDialogSelectList = /** @class */ (function (_super) {
|
|
|
73949
73949
|
return DDialogSelectList;
|
|
73950
73950
|
}(DList));
|
|
73951
73951
|
|
|
73952
|
-
/*
|
|
73953
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
73954
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
73955
|
-
*/
|
|
73956
|
-
var DDialogSelectSearchFunctions = {
|
|
73957
|
-
isUncategorized: function (search) {
|
|
73958
|
-
return search.length <= 1;
|
|
73959
|
-
},
|
|
73960
|
-
toCategorized: function (search) {
|
|
73961
|
-
if (search == null) {
|
|
73962
|
-
return function (word, categoryId) { return Promise.resolve([]); };
|
|
73963
|
-
}
|
|
73964
|
-
else if (this.isUncategorized(search)) {
|
|
73965
|
-
return function (word, categoryId) {
|
|
73966
|
-
return search(word);
|
|
73967
|
-
};
|
|
73968
|
-
}
|
|
73969
|
-
else {
|
|
73970
|
-
return search;
|
|
73971
|
-
}
|
|
73972
|
-
}
|
|
73973
|
-
};
|
|
73974
|
-
|
|
73975
73952
|
/*
|
|
73976
73953
|
* Copyright (C) 2019 Toshiba Corporation
|
|
73977
73954
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -73980,16 +73957,17 @@ var DDialogSelectSearhImpl = /** @class */ (function (_super) {
|
|
|
73980
73957
|
__extends(DDialogSelectSearhImpl, _super);
|
|
73981
73958
|
function DDialogSelectSearhImpl(search) {
|
|
73982
73959
|
var _this = _super.call(this) || this;
|
|
73983
|
-
_this._search =
|
|
73960
|
+
_this._search =
|
|
73961
|
+
search !== null && search !== void 0 ? search : (function (word, categoryId) { return Promise.resolve([]); });
|
|
73984
73962
|
_this._id = 0;
|
|
73985
73963
|
_this._idCompleted = 0;
|
|
73986
73964
|
return _this;
|
|
73987
73965
|
}
|
|
73988
73966
|
DDialogSelectSearhImpl.prototype.create = function (args) {
|
|
73989
73967
|
var _this = this;
|
|
73990
|
-
var _a;
|
|
73991
73968
|
var id = ++this._id;
|
|
73992
|
-
|
|
73969
|
+
var search = this._search;
|
|
73970
|
+
(args.length <= 1 ? search(args[0]) : search(args[0], args[1])).then(function (searchResult) {
|
|
73993
73971
|
if (_this._id === id) {
|
|
73994
73972
|
_this._idCompleted = id;
|
|
73995
73973
|
_this.emit("success", _this, searchResult);
|
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.367.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -55367,29 +55367,6 @@
|
|
|
55367
55367
|
return DDialogSelectList;
|
|
55368
55368
|
}(DList));
|
|
55369
55369
|
|
|
55370
|
-
/*
|
|
55371
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
55372
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
55373
|
-
*/
|
|
55374
|
-
var DDialogSelectSearchFunctions = {
|
|
55375
|
-
isUncategorized: function (search) {
|
|
55376
|
-
return search.length <= 1;
|
|
55377
|
-
},
|
|
55378
|
-
toCategorized: function (search) {
|
|
55379
|
-
if (search == null) {
|
|
55380
|
-
return function (word, categoryId) { return Promise.resolve([]); };
|
|
55381
|
-
}
|
|
55382
|
-
else if (this.isUncategorized(search)) {
|
|
55383
|
-
return function (word, categoryId) {
|
|
55384
|
-
return search(word);
|
|
55385
|
-
};
|
|
55386
|
-
}
|
|
55387
|
-
else {
|
|
55388
|
-
return search;
|
|
55389
|
-
}
|
|
55390
|
-
}
|
|
55391
|
-
};
|
|
55392
|
-
|
|
55393
55370
|
/*
|
|
55394
55371
|
* Copyright (C) 2019 Toshiba Corporation
|
|
55395
55372
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -55398,16 +55375,17 @@
|
|
|
55398
55375
|
__extends(DDialogSelectSearhImpl, _super);
|
|
55399
55376
|
function DDialogSelectSearhImpl(search) {
|
|
55400
55377
|
var _this = _super.call(this) || this;
|
|
55401
|
-
_this._search =
|
|
55378
|
+
_this._search =
|
|
55379
|
+
search !== null && search !== void 0 ? search : (function (word, categoryId) { return Promise.resolve([]); });
|
|
55402
55380
|
_this._id = 0;
|
|
55403
55381
|
_this._idCompleted = 0;
|
|
55404
55382
|
return _this;
|
|
55405
55383
|
}
|
|
55406
55384
|
DDialogSelectSearhImpl.prototype.create = function (args) {
|
|
55407
55385
|
var _this = this;
|
|
55408
|
-
var _a;
|
|
55409
55386
|
var id = ++this._id;
|
|
55410
|
-
|
|
55387
|
+
var search = this._search;
|
|
55388
|
+
(args.length <= 1 ? search(args[0]) : search(args[0], args[1])).then(function (searchResult) {
|
|
55411
55389
|
if (_this._id === id) {
|
|
55412
55390
|
_this._idCompleted = id;
|
|
55413
55391
|
_this.emit("success", _this, searchResult);
|