ranui 0.1.8 → 0.1.10-alpha-24
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.zh-CN.md +192 -0
- package/dist/assets/image/failImage.d.ts +2 -0
- package/dist/button.js +7 -0
- package/dist/checkbox.js +7 -0
- package/dist/colorpicker.js +11 -0
- package/dist/components/button/index.d.ts +37 -1
- package/dist/components/checkbox/index.d.ts +30 -0
- package/dist/components/colorpicker/index.d.ts +120 -0
- package/dist/components/dropdown/index.d.ts +34 -0
- package/dist/components/input/index.d.ts +209 -1
- package/dist/components/loading/index.d.ts +76 -0
- package/dist/components/math/index.d.ts +16 -0
- package/dist/components/message/index.d.ts +10 -7
- package/dist/components/player/index.d.ts +218 -492
- package/dist/components/popover/content/index.d.ts +16 -0
- package/dist/components/popover/index.d.ts +91 -0
- package/dist/components/preview/constant.d.ts +5 -0
- package/dist/components/preview/index.d.ts +1 -4
- package/dist/components/preview/pdf.d.ts +51 -1
- package/dist/components/preview/types.d.ts +11 -0
- package/dist/components/progress/index.d.ts +12 -7
- package/dist/components/radar/index.d.ts +1 -1
- package/dist/components/scratch/index.d.ts +21 -0
- package/dist/components/select/dropdown-item/index.d.ts +23 -0
- package/dist/components/select/index.d.ts +25 -12
- package/dist/components/select/option/index.d.ts +2 -0
- package/dist/components/tab/index.d.ts +80 -59
- package/dist/components/tabpane/index.d.ts +73 -52
- package/dist/icon.js +6 -0
- package/dist/iconShadowless.js +6 -0
- package/dist/image.js +4 -0
- package/dist/{index-aea75a9f.js → index-BEm1a2pr.js} +3 -6
- package/dist/{index-b2be6bef.js → index-BSyn-jmY.js} +5492 -3716
- package/dist/index-BVD0qcjJ.js +656 -0
- package/dist/{index-b90299ca.js → index-Bb55l8nf.js} +2 -11
- package/dist/{index-48653b79.js → index-BbW0dxzy.js} +12 -16
- package/dist/index-BgUpm4LA.js +103 -0
- package/dist/{index-a1a53af6.js → index-C841uRgZ.js} +16 -51
- package/dist/{index-a43b144f.js → index-CUZna268.js} +41 -69
- package/dist/index-CiA5qRK3.js +381 -0
- package/dist/index-CoJMn8Jm.js +511 -0
- package/dist/{index-5975bbc0.js → index-DAxs7Dd2.js} +6 -13
- package/dist/index-D_cD4u43.js +70 -0
- package/dist/index-DgVgxN1s.js +309 -0
- package/dist/index-DghvN1MU.js +710 -0
- package/dist/index-DvSe_Ms7.js +494 -0
- package/dist/{index-7f513a14.js → index-W52VzrXL.js} +20 -49
- package/dist/index-gBy2cXLV.js +140 -0
- package/dist/index-hdtEL8P_.js +101 -0
- package/dist/index-jVKJoKXA.js +490 -0
- package/dist/index-ltt3w4zP.js +187 -0
- package/dist/index-n4X6wdwJ.js +156 -0
- package/dist/{index-0e7229ea.js → index-s0ioL3L2.js} +23 -43
- package/dist/index.d.ts +276 -14
- package/dist/index.js +24 -24
- package/dist/input.js +7 -0
- package/dist/inputShadowless.js +6 -0
- package/dist/katex-es-CGqSCDjs.js +14634 -0
- package/dist/loading-scene-BMc2wqKm.js +4 -0
- package/dist/loading.js +8 -0
- package/dist/math.js +7 -0
- package/dist/message.js +6 -0
- package/dist/modal.js +4 -0
- package/dist/more-2vsTDpcc.js +31 -0
- package/dist/pdf-Bis_tkvj.js +134 -0
- package/dist/player.js +8 -0
- package/dist/plus-DgJxWGlo.js +56799 -0
- package/dist/popover.js +9 -0
- package/dist/preview.js +7 -0
- package/dist/progress.js +7 -0
- package/dist/radar.js +6 -0
- package/dist/ranui.css +1 -0
- package/dist/search-BWdfjyP8.js +4 -0
- package/dist/select.js +10 -0
- package/dist/{index-f6d6982d.js → selectShadowless.js} +203 -159
- package/dist/{umd/components/form → shadowless/icon}/index.d.ts +1 -0
- package/dist/shadowless/input/index.d.ts +210 -0
- package/dist/{umd/components → shadowless}/select/index.d.ts +22 -15
- package/dist/shadowless/select/option/index.d.ts +2 -0
- package/dist/shadowless.d.ts +3 -0
- package/dist/shadowless.js +8 -0
- package/dist/skeleton.js +4 -0
- package/dist/sort-DWqiUONr.js +4 -0
- package/dist/sprite-CH2zLtZy.js +141 -0
- package/dist/tab.js +6 -0
- package/dist/tabpane.js +4 -0
- package/dist/tsconfig.json +31 -0
- package/dist/typings.d.ts +257 -0
- package/dist/umd/index.css +1 -0
- package/dist/umd/index.umd.cjs +1 -71
- package/dist/umd/shadowless/shadowless.css +1 -0
- package/dist/umd/shadowless/shadowless.umd.cjs +1 -0
- package/dist/utils/color.d.ts +52 -0
- package/dist/utils/image.d.ts +8 -1
- package/dist/utils/index.d.ts +20 -5
- package/dist/utils/math.d.ts +3 -3
- package/dist/vite.config.d.ts +1 -0
- package/dist/without-content-CdJw7vHM.js +4 -0
- package/package.json +115 -67
- package/readme.md +41 -57
- package/typings.d.ts +257 -0
- package/dist/colz-746223ab.js +0 -241
- package/dist/components/button/index.js +0 -7
- package/dist/components/icon/index.js +0 -6
- package/dist/components/image/index.js +0 -4
- package/dist/components/input/index.js +0 -5
- package/dist/components/message/index.js +0 -4
- package/dist/components/modal/index.js +0 -4
- package/dist/components/option/index.d.ts +0 -2
- package/dist/components/option/index.js +0 -95
- package/dist/components/player/index.js +0 -11
- package/dist/components/preview/colz.d.ts +0 -72
- package/dist/components/preview/docx.d.ts +0 -8
- package/dist/components/preview/excel/excel.d.ts +0 -2
- package/dist/components/preview/excel/index.d.ts +0 -1
- package/dist/components/preview/excel/media.d.ts +0 -37
- package/dist/components/preview/index.js +0 -8
- package/dist/components/preview/pptx/index.d.ts +0 -16
- package/dist/components/preview/pptx/process_pptx.d.ts +0 -23
- package/dist/components/preview/pptx/t_xml.d.ts +0 -1
- package/dist/components/preview/pptx/worker.d.ts +0 -1
- package/dist/components/progress/index.js +0 -8
- package/dist/components/radar/index.js +0 -7
- package/dist/components/select/index.js +0 -11
- package/dist/components/skeleton/index.js +0 -4
- package/dist/components/tab/index.js +0 -7
- package/dist/components/tabpane/index.js +0 -4
- package/dist/docx-c5d02d8c.js +0 -21
- package/dist/index-183517e7.js +0 -265
- package/dist/index-4d873a42.js +0 -195
- package/dist/index-57492b9b.js +0 -48
- package/dist/index-7b8840f9.js +0 -18690
- package/dist/index-a216f328.js +0 -662
- package/dist/index-d2d69b06.js +0 -225
- package/dist/index-ecaed5cc.js +0 -439
- package/dist/pdf-bdb7818a.js +0 -113
- package/dist/style.css +0 -1
- package/dist/umd/build/config.d.ts +0 -3
- package/dist/umd/build/config.umd.d.ts +0 -2
- package/dist/umd/components/button/index.d.ts +0 -2
- package/dist/umd/components/icon/index.d.ts +0 -2
- package/dist/umd/components/image/index.d.ts +0 -2
- package/dist/umd/components/input/index.d.ts +0 -2
- package/dist/umd/components/message/index.d.ts +0 -14
- package/dist/umd/components/modal/index.d.ts +0 -2
- package/dist/umd/components/option/index.d.ts +0 -2
- package/dist/umd/components/player/index.d.ts +0 -524
- package/dist/umd/components/preview/colz.d.ts +0 -72
- package/dist/umd/components/preview/docx.d.ts +0 -8
- package/dist/umd/components/preview/excel/excel.d.ts +0 -2
- package/dist/umd/components/preview/excel/index.d.ts +0 -1
- package/dist/umd/components/preview/excel/media.d.ts +0 -37
- package/dist/umd/components/preview/index.d.ts +0 -6
- package/dist/umd/components/preview/pdf.d.ts +0 -1
- package/dist/umd/components/preview/pptx/index.d.ts +0 -16
- package/dist/umd/components/preview/pptx/process_pptx.d.ts +0 -23
- package/dist/umd/components/preview/pptx/t_xml.d.ts +0 -1
- package/dist/umd/components/preview/pptx/worker.d.ts +0 -1
- package/dist/umd/components/progress/index.d.ts +0 -36
- package/dist/umd/components/radar/index.d.ts +0 -2
- package/dist/umd/components/skeleton/index.d.ts +0 -2
- package/dist/umd/components/tab/index.d.ts +0 -403
- package/dist/umd/components/tabpane/index.d.ts +0 -347
- package/dist/umd/index.d.ts +0 -14
- package/dist/umd/playwright.config.d.ts +0 -9
- package/dist/umd/plugins/auto-import-file.d.ts +0 -0
- package/dist/umd/plugins/load-style.d.ts +0 -6
- package/dist/umd/plugins/load-svg.d.ts +0 -9
- package/dist/umd/style.css +0 -1
- package/dist/umd/tests/button.spec.d.ts +0 -1
- package/dist/umd/utils/image.d.ts +0 -32
- package/dist/umd/utils/index.d.ts +0 -64
- package/dist/umd/utils/math.d.ts +0 -26
- package/dist/umd/utils/tween.d.ts +0 -21
- package/dist/umd/vite.config.d.ts +0 -6
- package/dist/vendor-f71e6f68.js +0 -92126
- /package/dist/{add-user-b2bed3e7.js → add-user-BN1JlY7e.js} +0 -0
- /package/dist/{book-b11a68eb.js → book-nTEFXU2x.js} +0 -0
- /package/dist/{umd/build/config.es.d.ts → build/config.sha.d.ts} +0 -0
- /package/dist/{check-circle-fill-dc284144.js → check-circle-fill-B_pd8ZSs.js} +0 -0
- /package/dist/{check-circle-74bd09c3.js → check-circle-szyAJiap.js} +0 -0
- /package/dist/{close-20925345.js → close-CFnkhudp.js} +0 -0
- /package/dist/{close-circle-720c18be.js → close-circle-CwmuN2C6.js} +0 -0
- /package/dist/{close-circle-fill-238a66b1.js → close-circle-fill-jSqPPw9i.js} +0 -0
- /package/dist/{eye-5e742329.js → eye-D_mEt17f.js} +0 -0
- /package/dist/{eye-close-3874f1ae.js → eye-close-BVr3NJtg.js} +0 -0
- /package/dist/{home-c4a05e8b.js → home-BUQ4USMk.js} +0 -0
- /package/dist/{index-8e1e2573.js → index-CQTJoWhb.js} +0 -0
- /package/dist/{info-circle-5826decc.js → info-circle-COnL5bTJ.js} +0 -0
- /package/dist/{info-circle-fill-90ec9aa9.js → info-circle-fill-DjI8gXS3.js} +0 -0
- /package/dist/{loading-09ca52df.js → loading-Dcc5RApI.js} +0 -0
- /package/dist/{lock-1d2487c9.js → lock-Cr7BnmWN.js} +0 -0
- /package/dist/{message-b2bfdea7.js → message-D36_Zo2l.js} +0 -0
- /package/dist/{power-off-6ade5a91.js → power-off-lQRbiBak.js} +0 -0
- /package/dist/{preview-b291aea8.js → preview-CJbz9GjO.js} +0 -0
- /package/dist/{setting-1e5ccb6d.js → setting-DemlgzVC.js} +0 -0
- /package/dist/{team-ca6a12e1.js → team-tl4NJXPC.js} +0 -0
- /package/dist/{unlock-f56086fd.js → unlock-CeU74z9n.js} +0 -0
- /package/dist/{user-5c01e665.js → user-B-eVXwuk.js} +0 -0
- /package/dist/{warning-circle-035e025c.js → warning-circle-DDUgEDIv.js} +0 -0
- /package/dist/{warning-circle-fill-d17c37c9.js → warning-circle-fill-lODUKz0i.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const Content_base: {
|
|
2
|
+
new (): HTMLElement;
|
|
3
|
+
prototype: HTMLElement;
|
|
4
|
+
};
|
|
5
|
+
export declare class Content extends Content_base {
|
|
6
|
+
observer: MutationObserver;
|
|
7
|
+
_shadowDom: ShadowRoot;
|
|
8
|
+
_slot: HTMLElement;
|
|
9
|
+
constructor();
|
|
10
|
+
callback: (mutations: MutationRecord[]) => void;
|
|
11
|
+
onChange: (mutation: MutationRecord) => void;
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
disconnectCallback(): void;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import '@/components/popover/content';
|
|
2
|
+
import '@/components/dropdown';
|
|
3
|
+
export type PlacementDirection = Record<string, Record<string, string>>;
|
|
4
|
+
export declare enum PLACEMENT_TYPE {
|
|
5
|
+
TOP = "top",
|
|
6
|
+
BOTTOM = "bottom",
|
|
7
|
+
LEFT = "left",
|
|
8
|
+
RIGHT = "right"
|
|
9
|
+
}
|
|
10
|
+
declare const Popover_base: {
|
|
11
|
+
new (): HTMLElement;
|
|
12
|
+
prototype: HTMLElement;
|
|
13
|
+
};
|
|
14
|
+
export declare class Popover extends Popover_base {
|
|
15
|
+
_slot: HTMLSlotElement;
|
|
16
|
+
popoverBlock: HTMLDivElement;
|
|
17
|
+
popoverContent?: HTMLElement;
|
|
18
|
+
popoverInner?: HTMLDivElement;
|
|
19
|
+
popoverInnerBlock?: HTMLDivElement;
|
|
20
|
+
_shadowDom: ShadowRoot;
|
|
21
|
+
dropDownInTimeId?: NodeJS.Timeout;
|
|
22
|
+
dropDownOutTimeId?: NodeJS.Timeout;
|
|
23
|
+
removeTimeId?: NodeJS.Timeout;
|
|
24
|
+
static get observedAttributes(): string[];
|
|
25
|
+
readonly closePopover: () => void;
|
|
26
|
+
constructor();
|
|
27
|
+
get placement(): string;
|
|
28
|
+
set placement(value: string);
|
|
29
|
+
get arrow(): string;
|
|
30
|
+
set arrow(value: string);
|
|
31
|
+
get trigger(): string;
|
|
32
|
+
set trigger(value: string);
|
|
33
|
+
get getPopupContainerId(): string;
|
|
34
|
+
set getPopupContainerId(value: string);
|
|
35
|
+
stopPropagation: (e: Event) => void;
|
|
36
|
+
/**
|
|
37
|
+
* @description: 创建下拉框
|
|
38
|
+
* @param {HTMLCollection} content
|
|
39
|
+
* @return {*}
|
|
40
|
+
*/
|
|
41
|
+
createContent: (content: HTMLCollection) => void;
|
|
42
|
+
/**
|
|
43
|
+
* @description: 观察内容变化
|
|
44
|
+
* @param {Event} e
|
|
45
|
+
* @return {*}
|
|
46
|
+
*/
|
|
47
|
+
watchContent: (e: Event) => void;
|
|
48
|
+
/**
|
|
49
|
+
* @description: 焦点移除的情况,需要移除下拉框
|
|
50
|
+
* @return {*}
|
|
51
|
+
*/
|
|
52
|
+
blur: any;
|
|
53
|
+
/**
|
|
54
|
+
* @description: 移除下拉框
|
|
55
|
+
* @return {*}
|
|
56
|
+
*/
|
|
57
|
+
removeDropDownTimeId: any;
|
|
58
|
+
/**
|
|
59
|
+
* @description: 添加 dropdown
|
|
60
|
+
* @return {*}
|
|
61
|
+
*/
|
|
62
|
+
setDropdownDisplayBlock: any;
|
|
63
|
+
/**
|
|
64
|
+
* @description: 移除 select dropdown
|
|
65
|
+
* @return {*}
|
|
66
|
+
*/
|
|
67
|
+
setDropdownDisplayNone: any;
|
|
68
|
+
/**
|
|
69
|
+
* @description: 设置 popover 位置
|
|
70
|
+
* @param {*} void
|
|
71
|
+
* @return {*}
|
|
72
|
+
*/
|
|
73
|
+
placementPosition: () => void;
|
|
74
|
+
/**
|
|
75
|
+
* @description: 鼠标移入
|
|
76
|
+
* @param {Event} e
|
|
77
|
+
* @return {*}
|
|
78
|
+
*/
|
|
79
|
+
hoverPopover: (e: Event) => void;
|
|
80
|
+
clickContent: (e: Event) => void;
|
|
81
|
+
clickPopover: (e: Event) => void;
|
|
82
|
+
clickRemovePopover: (e: Event) => void;
|
|
83
|
+
popoverTrigger: () => void;
|
|
84
|
+
hoverRemovePopover: (e: Event) => void;
|
|
85
|
+
changePlacement: any;
|
|
86
|
+
connectedCallback(): void;
|
|
87
|
+
disconnectCallback(): void;
|
|
88
|
+
attributeChangedCallback(n: string, o: string, v: string): void;
|
|
89
|
+
}
|
|
90
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
91
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PPTX = "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
2
|
+
export declare const PDF = "application/pdf";
|
|
3
|
+
export declare const DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
4
|
+
export declare const XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
5
|
+
export declare const XLS = "application/vnd.ms-excel";
|
|
@@ -1 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BaseReturn, RenderOptions } from '@/components/preview/types';
|
|
2
|
+
export interface Viewport {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
viewBox: Array<number>;
|
|
6
|
+
}
|
|
7
|
+
export interface RenderContext {
|
|
8
|
+
canvasContext: CanvasRenderingContext2D | null;
|
|
9
|
+
transform: Array<number>;
|
|
10
|
+
viewport: Viewport;
|
|
11
|
+
}
|
|
12
|
+
export interface PDFPageProxy {
|
|
13
|
+
pageNumber: number;
|
|
14
|
+
getViewport: ({ scale }: {
|
|
15
|
+
scale: number;
|
|
16
|
+
}) => Viewport;
|
|
17
|
+
render: (options: RenderContext) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface PDFDocumentProxy {
|
|
20
|
+
numPages: number;
|
|
21
|
+
getPage: (x: number) => Promise<PDFPageProxy>;
|
|
22
|
+
}
|
|
23
|
+
declare global {
|
|
24
|
+
interface Window {
|
|
25
|
+
pdfjsLib: {
|
|
26
|
+
GlobalWorkerOptions: {
|
|
27
|
+
workerSrc: string;
|
|
28
|
+
};
|
|
29
|
+
getDocument: (x: string | ArrayBuffer) => {
|
|
30
|
+
promise: Promise<PDFDocumentProxy>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export declare class PdfPreview {
|
|
36
|
+
private pdfDoc;
|
|
37
|
+
pageNumber: number;
|
|
38
|
+
total: number;
|
|
39
|
+
dom: HTMLElement;
|
|
40
|
+
pdf: string | ArrayBuffer;
|
|
41
|
+
onError: ((msg: BaseReturn) => void) | undefined;
|
|
42
|
+
onLoad: ((msg: BaseReturn) => void) | undefined;
|
|
43
|
+
constructor(pdf: string | ArrayBuffer, options: RenderOptions);
|
|
44
|
+
private getPdfPage;
|
|
45
|
+
pdfPreview: () => Promise<BaseReturn>;
|
|
46
|
+
showTotalPage: () => Promise<void>;
|
|
47
|
+
changePage: (num: number) => number;
|
|
48
|
+
prevPage: () => Promise<number>;
|
|
49
|
+
nextPage: () => Promise<number>;
|
|
50
|
+
}
|
|
51
|
+
export declare const renderPdf: (file: File, options: RenderOptions) => Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface BaseReturn<T = unknown> {
|
|
2
|
+
success: boolean;
|
|
3
|
+
data?: T;
|
|
4
|
+
message?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RenderOptions {
|
|
7
|
+
dom?: HTMLElement;
|
|
8
|
+
onError?: (msg?: BaseReturn) => void;
|
|
9
|
+
onLoad?: (msg?: BaseReturn) => void;
|
|
10
|
+
iframe?: HTMLIFrameElement;
|
|
11
|
+
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
declare const Progress_base: {
|
|
2
|
+
new (): HTMLElement;
|
|
3
|
+
prototype: HTMLElement;
|
|
4
|
+
};
|
|
5
|
+
declare class Progress extends Progress_base {
|
|
2
6
|
_progress: HTMLDivElement;
|
|
3
7
|
_progressWrap: HTMLDivElement;
|
|
4
8
|
_progressWrapValue: HTMLDivElement;
|
|
@@ -6,11 +10,12 @@ export declare class Progress extends HTMLElement {
|
|
|
6
10
|
moveProgress: {
|
|
7
11
|
mouseDown: boolean;
|
|
8
12
|
};
|
|
13
|
+
_shadowDom: ShadowRoot;
|
|
9
14
|
constructor();
|
|
10
15
|
static get observedAttributes(): string[];
|
|
11
|
-
get percent():
|
|
12
|
-
set percent(value:
|
|
13
|
-
get total():
|
|
16
|
+
get percent(): string;
|
|
17
|
+
set percent(value: string);
|
|
18
|
+
get total(): string;
|
|
14
19
|
set total(value: string);
|
|
15
20
|
get type(): string;
|
|
16
21
|
set type(value: string);
|
|
@@ -21,16 +26,16 @@ export declare class Progress extends HTMLElement {
|
|
|
21
26
|
progressClick: (e: MouseEvent) => void;
|
|
22
27
|
progressDotMouseDown: () => void;
|
|
23
28
|
progressDotMouseMove: (e: MouseEvent) => void;
|
|
24
|
-
progressDotMouseUp: (
|
|
29
|
+
progressDotMouseUp: () => void;
|
|
25
30
|
change: () => void;
|
|
26
31
|
appendProgressDot: () => void;
|
|
27
32
|
updateCurrentProgress: () => void;
|
|
28
33
|
dragEvent: () => void;
|
|
29
|
-
createProgress: () => void;
|
|
30
34
|
private resize;
|
|
31
35
|
connectedCallback(): void;
|
|
32
36
|
disconnectCallback(): void;
|
|
33
37
|
attributeChangedCallback(k: string, o: string, n: string): void;
|
|
34
38
|
}
|
|
35
|
-
declare const _default: import(
|
|
39
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
36
40
|
export default _default;
|
|
41
|
+
export { Progress };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import(
|
|
1
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
2
2
|
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const ScratchTicket_base: {
|
|
2
|
+
new (): HTMLElement;
|
|
3
|
+
prototype: HTMLElement;
|
|
4
|
+
};
|
|
5
|
+
declare class ScratchTicket extends ScratchTicket_base {
|
|
6
|
+
scratchTicketContainer: HTMLDivElement;
|
|
7
|
+
scratchTicket: HTMLCanvasElement;
|
|
8
|
+
state: {
|
|
9
|
+
touchStart: boolean;
|
|
10
|
+
scratchArea: number;
|
|
11
|
+
};
|
|
12
|
+
scratchAward: HTMLDivElement;
|
|
13
|
+
static get observedAttributes(): string[];
|
|
14
|
+
constructor();
|
|
15
|
+
touchStartScratch: (e: TouchEvent) => void;
|
|
16
|
+
touchMoveScratch: () => void;
|
|
17
|
+
touchEndScratch: () => void;
|
|
18
|
+
drawScratchTicket: () => void;
|
|
19
|
+
attributeChangedCallback(): void;
|
|
20
|
+
}
|
|
21
|
+
export default ScratchTicket;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Chain } from 'ranuts/utils';
|
|
2
|
+
declare const DropdownItem_base: {
|
|
3
|
+
new (): HTMLElement;
|
|
4
|
+
prototype: HTMLElement;
|
|
5
|
+
};
|
|
6
|
+
export declare class DropdownItem extends DropdownItem_base {
|
|
7
|
+
ionDropdownItem: Chain;
|
|
8
|
+
_slot: Chain;
|
|
9
|
+
_shadowDom: ShadowRoot;
|
|
10
|
+
ionDropdownItemContent: Chain;
|
|
11
|
+
static get observedAttributes(): string[];
|
|
12
|
+
constructor();
|
|
13
|
+
get value(): string;
|
|
14
|
+
set value(value: string);
|
|
15
|
+
get active(): string;
|
|
16
|
+
set active(value: string);
|
|
17
|
+
get title(): string;
|
|
18
|
+
set title(value: string);
|
|
19
|
+
connectedCallback(): void;
|
|
20
|
+
attributeChangedCallback(name: string, _: string, newValue: string): void;
|
|
21
|
+
}
|
|
22
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
23
|
+
export default _default;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
import '@/components/select/option';
|
|
2
|
+
import '@/components/dropdown';
|
|
3
|
+
import '@/components/select/dropdown-item';
|
|
4
|
+
import '@/components/icon';
|
|
5
|
+
import '@/components/input';
|
|
6
|
+
import type { Input } from '@/components/input';
|
|
2
7
|
interface Option {
|
|
3
8
|
label: string | number;
|
|
4
9
|
value: string | number;
|
|
5
10
|
}
|
|
6
|
-
|
|
11
|
+
declare const Select_base: {
|
|
12
|
+
new (): HTMLElement;
|
|
13
|
+
prototype: HTMLElement;
|
|
14
|
+
};
|
|
15
|
+
export declare class Select extends Select_base {
|
|
7
16
|
removeTimeId?: NodeJS.Timeout;
|
|
8
17
|
_slot: HTMLSlotElement;
|
|
9
18
|
_shadowDom: ShadowRoot;
|
|
10
19
|
_select: HTMLDivElement;
|
|
11
20
|
_selection: HTMLDivElement;
|
|
12
|
-
_search:
|
|
21
|
+
_search: Input;
|
|
13
22
|
_icon: HTMLElement;
|
|
14
23
|
_selectDropdown?: HTMLDivElement;
|
|
15
|
-
_selectionDropdown?:
|
|
24
|
+
_selectionDropdown?: HTMLElement;
|
|
16
25
|
_selectDropDownInTimeId?: NodeJS.Timeout;
|
|
17
26
|
_selectDropDownOutTimeId?: NodeJS.Timeout;
|
|
18
27
|
_optionList: Option[];
|
|
@@ -21,6 +30,7 @@ export declare class Select extends HTMLElement {
|
|
|
21
30
|
_activeOption?: HTMLElement;
|
|
22
31
|
_text: HTMLSpanElement;
|
|
23
32
|
_selector: HTMLDivElement;
|
|
33
|
+
onSearch?: (this: HTMLElement, ev: Event) => unknown;
|
|
24
34
|
static get observedAttributes(): string[];
|
|
25
35
|
constructor();
|
|
26
36
|
get value(): string;
|
|
@@ -39,8 +49,8 @@ export declare class Select extends HTMLElement {
|
|
|
39
49
|
set getPopupContainerId(value: string);
|
|
40
50
|
get dropdownclass(): string;
|
|
41
51
|
set dropdownclass(value: string);
|
|
42
|
-
get
|
|
43
|
-
set
|
|
52
|
+
get trigger(): string;
|
|
53
|
+
set trigger(value: string);
|
|
44
54
|
get disabled(): boolean;
|
|
45
55
|
set disabled(value: boolean | string | undefined | null);
|
|
46
56
|
handlerExternalCss(): void;
|
|
@@ -59,13 +69,13 @@ export declare class Select extends HTMLElement {
|
|
|
59
69
|
* @description: 设置下拉框
|
|
60
70
|
* @return {*}
|
|
61
71
|
*/
|
|
62
|
-
selectMouseDown: () => void;
|
|
63
|
-
removeDropDownTimeId: () => void;
|
|
72
|
+
selectMouseDown: (e: Event) => void;
|
|
73
|
+
removeDropDownTimeId: (e: Event) => void;
|
|
64
74
|
/**
|
|
65
|
-
* @description: 焦点移除的情况,需要移除select 下拉框
|
|
75
|
+
* @description: 焦点移除的情况,需要移除 select 下拉框
|
|
66
76
|
* @return {*}
|
|
67
77
|
*/
|
|
68
|
-
selectBlur: () => void;
|
|
78
|
+
selectBlur: (e: Event) => void;
|
|
69
79
|
/**
|
|
70
80
|
* @description: 选中一个选项的情况
|
|
71
81
|
* @param {MouseEvent} e
|
|
@@ -83,19 +93,22 @@ export declare class Select extends HTMLElement {
|
|
|
83
93
|
*/
|
|
84
94
|
removeSelectDropdown: () => void;
|
|
85
95
|
/**
|
|
86
|
-
* @description: 当select中有option元素的时候,给dropdown添加元素
|
|
96
|
+
* @description: 当 select 中有 option 元素的时候,给 dropdown 添加元素
|
|
87
97
|
* @return {*}
|
|
88
98
|
*/
|
|
89
99
|
addOptionToSlot: () => void;
|
|
100
|
+
createSelectDropdownContent: (options?: Option[]) => void;
|
|
90
101
|
setDefaultValue: () => void;
|
|
91
102
|
changeSearch: (e: Event) => void;
|
|
92
103
|
setShowSearch: () => void;
|
|
104
|
+
removeShowSearch: () => void;
|
|
93
105
|
listenSlotChange: () => void;
|
|
94
106
|
removeListenSlotChange: () => void;
|
|
95
107
|
listenActionEvent: () => void;
|
|
108
|
+
clickRemoveSelect: (e: Event) => void;
|
|
96
109
|
connectedCallback(): void;
|
|
97
110
|
disconnectCallback(): void;
|
|
98
111
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
99
112
|
}
|
|
100
|
-
declare const _default: import(
|
|
113
|
+
declare const _default: import("@/utils/index").CustomErrorType;
|
|
101
114
|
export default _default;
|