ranui 0.1.6 → 0.1.7
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/add-user-b2bed3e7.js +4 -0
- package/dist/book-b11a68eb.js +4 -0
- package/dist/build/config.d.ts +3 -0
- package/dist/check-circle-74bd09c3.js +4 -0
- package/dist/check-circle-fill-dc284144.js +4 -0
- package/dist/close-20925345.js +4 -0
- package/dist/close-circle-720c18be.js +4 -0
- package/dist/close-circle-fill-238a66b1.js +4 -0
- package/dist/components/button/index.js +4 -2
- package/dist/components/icon/index.js +3 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/index.js +2 -2
- package/dist/components/message/index.d.ts +12 -6
- package/dist/components/message/index.js +1 -2
- package/dist/components/modal/index.js +4 -0
- package/dist/components/option/index.d.ts +2 -0
- package/dist/components/option/index.js +95 -0
- package/dist/components/{video → player}/index.d.ts +198 -87
- package/dist/components/player/index.js +11 -0
- package/dist/components/preview/excel/excel.d.ts +0 -9
- package/dist/components/preview/index.d.ts +4 -0
- package/dist/components/preview/index.js +5 -4
- package/dist/components/progress/index.d.ts +36 -0
- package/dist/components/progress/index.js +8 -0
- package/dist/components/radar/index.js +4 -2
- package/dist/components/select/index.d.ts +101 -0
- package/dist/components/select/index.js +11 -0
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/tab/index.js +4 -2
- package/dist/components/tabpane/index.js +1 -1
- package/dist/docx-c5d02d8c.js +21 -0
- package/dist/eye-5e742329.js +4 -0
- package/dist/eye-close-3874f1ae.js +4 -0
- package/dist/hls/5_1700986031916/5.key +1 -0
- package/dist/hls/5_1700986031916/5.m3u8 +12 -0
- package/dist/hls/5_1700986031916/5_00000.ts +0 -0
- package/dist/hls/5_1700986031916/5_00001.ts +0 -0
- package/dist/hls/5_1700986031916/5_00002.ts +0 -0
- package/dist/hls/5_1700986110178/5.key +1 -0
- package/dist/hls/5_1700986110178/5.m3u8 +12 -0
- package/dist/hls/5_1700986110178/5_00000.ts +0 -0
- package/dist/hls/5_1700986110178/5_00001.ts +0 -0
- package/dist/hls/5_1700986110178/5_00002.ts +0 -0
- package/dist/hls/example.m3u8 +5 -0
- package/dist/home-c4a05e8b.js +4 -0
- package/dist/index-0e7229ea.js +328 -0
- package/dist/index-183517e7.js +265 -0
- package/dist/index-48653b79.js +162 -0
- package/dist/index-4d873a42.js +195 -0
- package/dist/index-57492b9b.js +48 -0
- package/dist/index-5975bbc0.js +126 -0
- package/dist/{index-64d03ac1.js → index-7b8840f9.js} +1 -4
- package/dist/index-7f513a14.js +175 -0
- package/dist/index-8e1e2573.js +19 -0
- package/dist/index-a1a53af6.js +354 -0
- package/dist/index-a216f328.js +662 -0
- package/dist/index-a43b144f.js +232 -0
- package/dist/index-aea75a9f.js +78 -0
- package/dist/index-b2be6bef.js +10423 -0
- package/dist/index-b90299ca.js +43 -0
- package/dist/index-d2d69b06.js +225 -0
- package/dist/index-ecaed5cc.js +439 -0
- package/dist/index-f6d6982d.js +516 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +23 -13
- package/dist/info-circle-5826decc.js +4 -0
- package/dist/info-circle-fill-90ec9aa9.js +14 -0
- package/dist/loading-09ca52df.js +4 -0
- package/dist/lock-1d2487c9.js +4 -0
- package/dist/message-b2bfdea7.js +4 -0
- package/dist/{pdf-6e38f826.js → pdf-bdb7818a.js} +1 -2
- package/dist/playwright.config.d.ts +0 -2
- package/dist/power-off-6ade5a91.js +4 -0
- package/dist/preview-b291aea8.js +4 -0
- package/dist/setting-1e5ccb6d.js +4 -0
- package/dist/style.css +1 -1
- package/dist/team-ca6a12e1.js +4 -0
- package/dist/umd/build/config.d.ts +3 -0
- package/dist/umd/components/message/index.d.ts +12 -6
- package/dist/umd/components/option/index.d.ts +2 -0
- package/dist/umd/components/{video → player}/index.d.ts +198 -87
- package/dist/umd/components/preview/excel/excel.d.ts +0 -9
- package/dist/umd/components/preview/index.d.ts +4 -0
- package/dist/umd/components/progress/index.d.ts +36 -0
- package/dist/umd/components/select/index.d.ts +101 -0
- package/dist/umd/hls/5_1700986031916/5.key +1 -0
- package/dist/umd/hls/5_1700986031916/5.m3u8 +12 -0
- package/dist/umd/hls/5_1700986031916/5_00000.ts +0 -0
- package/dist/umd/hls/5_1700986031916/5_00001.ts +0 -0
- package/dist/umd/hls/5_1700986031916/5_00002.ts +0 -0
- package/dist/umd/hls/5_1700986110178/5.key +1 -0
- package/dist/umd/hls/5_1700986110178/5.m3u8 +12 -0
- package/dist/umd/hls/5_1700986110178/5_00000.ts +0 -0
- package/dist/umd/hls/5_1700986110178/5_00001.ts +0 -0
- package/dist/umd/hls/5_1700986110178/5_00002.ts +0 -0
- package/dist/umd/hls/example.m3u8 +5 -0
- package/dist/umd/index.d.ts +4 -0
- package/dist/umd/index.umd.cjs +26 -8
- package/dist/umd/playwright.config.d.ts +0 -2
- package/dist/umd/style.css +1 -1
- package/dist/umd/utils/image.d.ts +32 -0
- package/dist/umd/utils/index.d.ts +41 -32
- package/dist/umd/utils/math.d.ts +26 -0
- package/dist/umd/utils/tween.d.ts +21 -0
- package/dist/unlock-f56086fd.js +4 -0
- package/dist/user-5c01e665.js +4 -0
- package/dist/utils/image.d.ts +32 -0
- package/dist/utils/index.d.ts +41 -32
- package/dist/utils/math.d.ts +26 -0
- package/dist/utils/tween.d.ts +21 -0
- package/dist/{index-a55c2dff.js → vendor-f71e6f68.js} +7771 -1268
- package/dist/warning-circle-035e025c.js +4 -0
- package/dist/warning-circle-fill-d17c37c9.js +4 -0
- package/package.json +38 -6
- package/readme.md +2 -3
- package/dist/_commonjs-dynamic-modules-2ceabb0b.js +0 -12
- package/dist/add-user-d07564bd.js +0 -4
- package/dist/assets/image/failImage.d.ts +0 -2
- package/dist/base-bcc748a2.js +0 -1
- package/dist/book-2a5a596c.js +0 -4
- package/dist/check-circle-2c986969.js +0 -4
- package/dist/check-circle-fill-62eaa796.js +0 -4
- package/dist/close-circle-2afb6e94.js +0 -4
- package/dist/close-circle-fill-b6906239.js +0 -4
- package/dist/close-ee3ba1d1.js +0 -4
- package/dist/docx-5262a8f1.js +0 -2635
- package/dist/eye-bd60afe1.js +0 -4
- package/dist/eye-close-bde3c1fc.js +0 -4
- package/dist/home-f824d8f4.js +0 -4
- package/dist/index-00913cab.js +0 -43
- package/dist/index-07c8e518.js +0 -327
- package/dist/index-105ed089.js +0 -127
- package/dist/index-2243317e.js +0 -155
- package/dist/index-441da303.js +0 -196
- package/dist/index-4459fbd0.js +0 -108
- package/dist/index-57d3be68.js +0 -450
- package/dist/index-a7db1b7b.js +0 -175
- package/dist/index-b580f377.js +0 -78
- package/dist/index-b99ac79f.js +0 -353
- package/dist/index-c558bde2.js +0 -218
- package/dist/info-circle-59333e1c.js +0 -4
- package/dist/info-circle-fill-3ab7660d.js +0 -4
- package/dist/jszip.min-97cf7c6a.js +0 -2655
- package/dist/loading-407d8249.js +0 -4
- package/dist/lock-6d20715b.js +0 -4
- package/dist/message-ee4fe153.js +0 -4
- package/dist/power-off-bbec6b5f.js +0 -4
- package/dist/preview-164a4944.js +0 -4
- package/dist/setting-735a1963.js +0 -4
- package/dist/team-42573142.js +0 -4
- package/dist/umd/assets/image/failImage.d.ts +0 -2
- package/dist/unlock-ae33c6f7.js +0 -4
- package/dist/user-b7098183.js +0 -4
- package/dist/warning-circle-536d4749.js +0 -4
- package/dist/warning-circle-fill-e4be98bc.js +0 -4
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { j as judgeDevice } from "./index-d2d69b06.js";
|
|
8
|
+
import { c as createCustomError, i as isDisabled, f as falseList } from "./index-57492b9b.js";
|
|
9
|
+
const f7170ee498e0dd32cbdcb63fba8f75cc = ':host{position:relative;display:inline-block;background-image:none;box-shadow:0 2px #00000004;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:manipulation;overflow:hidden;pointer-events:auto}:host .ran-btn{position:relative;display:inline-block;background-image:none;cursor:pointer;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:manipulation;background:#fff}:host,:host(:active),:host(:focus){outline:0}:host .ran-btn,:host(:active) .ran-btn,:host(:focus) .ran-btn{outline:0}:host(:not([disabled]):hover) .ran-btn-content{border-color:#1890ff;color:#1890ff}:host([type="primary"]) .ran-btn-content{border-color:#1890ff;background-color:#1890ff;color:#fff}:host([type="primary"]:not([disabled])) .ran-btn:after{background-image:radial-gradient(circle,#fff 10%,transparent 10.01%)}:host([type="primary"]:not([disabled]):hover) .ran-btn-content{background-color:#40a9ff;color:#fff}:host([type="warning"]) .ran-btn-content{border-color:#ff4d4f;background-color:#ff4d4f;color:#fff}:host([type="warning"]:not([disabled])) .ran-btn:after{background-image:radial-gradient(circle,#fff 10%,transparent 10.01%)}:host([type="warning"]:not([disabled]):hover) .ran-btn-content{border-color:#ff4d4f;background-color:#ff4d4f;color:#fff}:host([type="text"]) .ran-btn-content{border:none}:host([disabled]){cursor:not-allowed;pointer-events:all;opacity:.6}:host([disabled]) .ran-btn{cursor:not-allowed;pointer-events:all;opacity:.6}:host(:not([disabled]):active) .ran-btn:after{transform:translate(-50%,-50%) scale(0);opacity:.3;transition:0s}@media (min-width: 1024px){:host(:not([disabled],[effect])) .ran-btn:after{content:"";display:block;position:absolute;width:100%;height:100%;left:var(--ran-x, 0);top:var(--ran-y, 0);pointer-events:none;background-image:radial-gradient(circle,#1890ff 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:translate(-50%,-50%) scale(10);opacity:0;transition:transform .3s,opacity .8s}}:host .slot{display:block}.ran-btn-content{display:flex;justify-content:space-between;align-items:center;padding:4px 15px;border:1px solid transparent;border-radius:2px;border-color:#d9d9d9;color:#000000d9;line-height:22px;font-size:14px;font-weight:400;white-space:nowrap;text-align:center}.ran-btn-content .icon{margin-right:2px}\n';
|
|
10
|
+
function Custom() {
|
|
11
|
+
if (typeof document !== "undefined" && !customElements.get("r-button")) {
|
|
12
|
+
class Button extends HTMLElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
__publicField(this, "_btn");
|
|
16
|
+
__publicField(this, "_btnContent");
|
|
17
|
+
__publicField(this, "_iconElement");
|
|
18
|
+
__publicField(this, "_slot");
|
|
19
|
+
__publicField(this, "_shadowDom");
|
|
20
|
+
__publicField(this, "debounceTimeId");
|
|
21
|
+
/**
|
|
22
|
+
* @description: 设置button的icon
|
|
23
|
+
* @return {*}
|
|
24
|
+
*/
|
|
25
|
+
__publicField(this, "setIcon", () => {
|
|
26
|
+
if (this.icon) {
|
|
27
|
+
const { width, height } = this._slot.getBoundingClientRect();
|
|
28
|
+
const size = Math.min(width, height);
|
|
29
|
+
if (this._iconElement) {
|
|
30
|
+
this._iconElement.setAttribute("name", this.icon);
|
|
31
|
+
} else {
|
|
32
|
+
this._iconElement = document.createElement("r-icon");
|
|
33
|
+
this._iconElement.setAttribute("name", this.icon);
|
|
34
|
+
this._iconElement.setAttribute("color", "currentColor");
|
|
35
|
+
this._iconElement.setAttribute("class", "icon");
|
|
36
|
+
this._slot.insertAdjacentElement("beforebegin", this._iconElement);
|
|
37
|
+
}
|
|
38
|
+
if (this.iconSize) {
|
|
39
|
+
this._iconElement.setAttribute("size", this.iconSize);
|
|
40
|
+
} else {
|
|
41
|
+
this._iconElement.setAttribute("size", `${size - 5}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
__publicField(this, "mousedown", (event) => {
|
|
46
|
+
if (judgeDevice() !== "pc")
|
|
47
|
+
return;
|
|
48
|
+
if (!this.disabled || this.disabled === "false") {
|
|
49
|
+
this.debounceMouseEvent();
|
|
50
|
+
const { left, top } = this.getBoundingClientRect();
|
|
51
|
+
this._btn.style.setProperty("--ran-x", event.clientX - left + "px");
|
|
52
|
+
this._btn.style.setProperty("--ran-y", event.clientY - top + "px");
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
__publicField(this, "mouseup", (event) => {
|
|
56
|
+
if (judgeDevice() !== "pc")
|
|
57
|
+
return;
|
|
58
|
+
if (this.debounceTimeId)
|
|
59
|
+
return;
|
|
60
|
+
this.debounceTimeId = setTimeout(() => {
|
|
61
|
+
this._btn.style.removeProperty("--ran-x");
|
|
62
|
+
this._btn.style.removeProperty("--ran-y");
|
|
63
|
+
this.debounceMouseEvent();
|
|
64
|
+
}, 600);
|
|
65
|
+
});
|
|
66
|
+
__publicField(this, "debounceMouseEvent", () => {
|
|
67
|
+
clearTimeout(this.debounceTimeId);
|
|
68
|
+
this.debounceTimeId = void 0;
|
|
69
|
+
});
|
|
70
|
+
this._slot = document.createElement("slot");
|
|
71
|
+
this._btnContent = document.createElement("div");
|
|
72
|
+
this._btn = document.createElement("div");
|
|
73
|
+
this._btn.setAttribute("class", "ran-btn");
|
|
74
|
+
this._btn.setAttribute("part", "ran-btn");
|
|
75
|
+
this._btnContent.setAttribute("class", "ran-btn-content");
|
|
76
|
+
this._btnContent.setAttribute("part", "ran-btn-content");
|
|
77
|
+
this._btnContent.appendChild(this._slot);
|
|
78
|
+
this._slot.setAttribute("class", "slot");
|
|
79
|
+
const shadowRoot = this.attachShadow({ mode: "closed" });
|
|
80
|
+
const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
|
|
81
|
+
F7170EE498E0DD32CBDCB63FBA8F75CC.textContent = f7170ee498e0dd32cbdcb63fba8f75cc;
|
|
82
|
+
shadowRoot.appendChild(F7170EE498E0DD32CBDCB63FBA8F75CC);
|
|
83
|
+
this._shadowDom = shadowRoot;
|
|
84
|
+
this._btn.appendChild(this._btnContent);
|
|
85
|
+
shadowRoot.appendChild(this._btn);
|
|
86
|
+
}
|
|
87
|
+
static get observedAttributes() {
|
|
88
|
+
return ["disabled", "icon", "effect", "iconSize", "sheet"];
|
|
89
|
+
}
|
|
90
|
+
get sheet() {
|
|
91
|
+
return this.getAttribute("sheet");
|
|
92
|
+
}
|
|
93
|
+
set sheet(value) {
|
|
94
|
+
this.setAttribute("sheet", value || "");
|
|
95
|
+
}
|
|
96
|
+
get disabled() {
|
|
97
|
+
return isDisabled(this);
|
|
98
|
+
}
|
|
99
|
+
set disabled(value) {
|
|
100
|
+
if (!value || value === "false") {
|
|
101
|
+
this.removeAttribute("disabled");
|
|
102
|
+
this.removeAttribute("aria-disabled");
|
|
103
|
+
} else {
|
|
104
|
+
this.setAttribute("disabled", "");
|
|
105
|
+
this.setAttribute("aria-disabled", "true");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
get iconSize() {
|
|
109
|
+
return this.getAttribute("iconSize");
|
|
110
|
+
}
|
|
111
|
+
set iconSize(value) {
|
|
112
|
+
if (!value || value === "false") {
|
|
113
|
+
this.removeAttribute("iconSize");
|
|
114
|
+
} else {
|
|
115
|
+
this.setAttribute("iconSize", value);
|
|
116
|
+
this.setIcon();
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
get icon() {
|
|
120
|
+
return this.getAttribute("icon");
|
|
121
|
+
}
|
|
122
|
+
set icon(value) {
|
|
123
|
+
if (!value || value === "false") {
|
|
124
|
+
this.removeAttribute("icon");
|
|
125
|
+
} else {
|
|
126
|
+
this.setAttribute("icon", value);
|
|
127
|
+
this.setIcon();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
get effect() {
|
|
131
|
+
return this.getAttribute("effect");
|
|
132
|
+
}
|
|
133
|
+
set effect(value) {
|
|
134
|
+
if (falseList.includes(value) || !value) {
|
|
135
|
+
this.removeAttribute("effect");
|
|
136
|
+
} else {
|
|
137
|
+
this.setAttribute("effect", value);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
handlerExternalCss() {
|
|
141
|
+
if (this.sheet) {
|
|
142
|
+
try {
|
|
143
|
+
const sheet = new CSSStyleSheet();
|
|
144
|
+
sheet.insertRule(this.sheet);
|
|
145
|
+
this._shadowDom.adoptedStyleSheets = [sheet];
|
|
146
|
+
} catch (error) {
|
|
147
|
+
console.error(
|
|
148
|
+
`Failed to parse the rule in CSSStyleSheet: ${this.sheet}`
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
connectedCallback() {
|
|
154
|
+
this._btn.addEventListener("mousedown", this.mousedown);
|
|
155
|
+
this._btn.addEventListener("mouseup", this.mouseup);
|
|
156
|
+
this.handlerExternalCss();
|
|
157
|
+
this.setIcon();
|
|
158
|
+
this.setAttribute("role", "button");
|
|
159
|
+
this.setAttribute("tabindex", "0");
|
|
160
|
+
}
|
|
161
|
+
disconnectCallback() {
|
|
162
|
+
this._btn.removeEventListener("mousedown", this.mousedown);
|
|
163
|
+
this._btn.removeEventListener("mouseup", this.mouseup);
|
|
164
|
+
}
|
|
165
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
166
|
+
if (name === "disabled" && this._btnContent) {
|
|
167
|
+
if (!newValue || newValue === "false") {
|
|
168
|
+
this._btnContent.setAttribute("disabled", "");
|
|
169
|
+
} else {
|
|
170
|
+
this._btnContent.removeAttribute("disabled");
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (name === "icon" && this._btnContent && oldValue !== newValue)
|
|
174
|
+
this.setIcon();
|
|
175
|
+
if (name === "iconSize" && this._btnContent && oldValue !== newValue)
|
|
176
|
+
this._btnContent.setAttribute("iconSize", newValue);
|
|
177
|
+
if (name === "sheet" && this._shadowDom && oldValue !== newValue)
|
|
178
|
+
this.handlerExternalCss();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
customElements.define("r-button", Button);
|
|
182
|
+
return Button;
|
|
183
|
+
} else {
|
|
184
|
+
return createCustomError("document is undefined or r-button is exist");
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const index = Custom();
|
|
188
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
189
|
+
__proto__: null,
|
|
190
|
+
default: index
|
|
191
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
192
|
+
export {
|
|
193
|
+
index as a,
|
|
194
|
+
index$1 as i
|
|
195
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
const falseList = [false, "false", null, void 0];
|
|
8
|
+
const isDisabled = (element) => {
|
|
9
|
+
const status = element.hasAttribute("disabled");
|
|
10
|
+
const value = element.getAttribute("disabled");
|
|
11
|
+
if (status && !falseList.includes(value))
|
|
12
|
+
return true;
|
|
13
|
+
return false;
|
|
14
|
+
};
|
|
15
|
+
const removeClassToElementChild = (parent, deleteClass) => {
|
|
16
|
+
const pre = parent.querySelectorAll(`.${deleteClass}`);
|
|
17
|
+
if (pre.length > 0) {
|
|
18
|
+
pre.forEach((item) => item.classList.remove(deleteClass));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const loadScript = (src) => {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
const script = document.createElement("script");
|
|
24
|
+
script.src = src;
|
|
25
|
+
script.onload = function() {
|
|
26
|
+
resolve({ success: true });
|
|
27
|
+
};
|
|
28
|
+
script.onerror = function(error) {
|
|
29
|
+
reject({ success: false, error });
|
|
30
|
+
};
|
|
31
|
+
document.body.append(script);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
function createCustomError(msg) {
|
|
35
|
+
return class CustomError {
|
|
36
|
+
constructor(message = msg) {
|
|
37
|
+
__publicField(this, "message");
|
|
38
|
+
this.message = message;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
createCustomError as c,
|
|
44
|
+
falseList as f,
|
|
45
|
+
isDisabled as i,
|
|
46
|
+
loadScript as l,
|
|
47
|
+
removeClassToElementChild as r
|
|
48
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
const f7170ee498e0dd32cbdcb63fba8f75cc = "";
|
|
8
|
+
function CustomElement() {
|
|
9
|
+
if (typeof window !== "undefined" && !customElements.get("r-tab")) {
|
|
10
|
+
class TabPane extends HTMLElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
__publicField(this, "_div");
|
|
14
|
+
__publicField(this, "parent");
|
|
15
|
+
/**
|
|
16
|
+
* @description: 在页面元素都加载完毕后,设置 tab 上的图标
|
|
17
|
+
*/
|
|
18
|
+
__publicField(this, "initAttribute", () => {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
this.parent = this.parentNode;
|
|
21
|
+
this.key && ((_a = this.parent) == null ? void 0 : _a.updateAttribute(this.key, "icon", this.icon));
|
|
22
|
+
this.key && ((_b = this.parent) == null ? void 0 : _b.updateAttribute(this.key, "iconSize", this.iconSize));
|
|
23
|
+
this.key && ((_c = this.parent) == null ? void 0 : _c.updateAttribute(this.key, "effect", this.effect));
|
|
24
|
+
});
|
|
25
|
+
this._div = document.createElement("slot");
|
|
26
|
+
const shadowRoot = this.attachShadow({ mode: "closed" });
|
|
27
|
+
const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
|
|
28
|
+
F7170EE498E0DD32CBDCB63FBA8F75CC.textContent = f7170ee498e0dd32cbdcb63fba8f75cc;
|
|
29
|
+
shadowRoot.appendChild(F7170EE498E0DD32CBDCB63FBA8F75CC);
|
|
30
|
+
shadowRoot.appendChild(this._div);
|
|
31
|
+
}
|
|
32
|
+
static get observedAttributes() {
|
|
33
|
+
return ["label", "key", "disabled", "icon", "effect", "iconSize"];
|
|
34
|
+
}
|
|
35
|
+
get label() {
|
|
36
|
+
return this.getAttribute("label") || "";
|
|
37
|
+
}
|
|
38
|
+
set label(value) {
|
|
39
|
+
this.setAttribute("label", value);
|
|
40
|
+
}
|
|
41
|
+
get icon() {
|
|
42
|
+
return this.getAttribute("icon");
|
|
43
|
+
}
|
|
44
|
+
set icon(value) {
|
|
45
|
+
if (!value || value === "false") {
|
|
46
|
+
this.removeAttribute("icon");
|
|
47
|
+
} else {
|
|
48
|
+
this.setAttribute("icon", value);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
get iconSize() {
|
|
52
|
+
return this.getAttribute("iconSize");
|
|
53
|
+
}
|
|
54
|
+
set iconSize(value) {
|
|
55
|
+
if (!value || value === "false") {
|
|
56
|
+
this.removeAttribute("iconSize");
|
|
57
|
+
} else {
|
|
58
|
+
this.setAttribute("iconSize", value);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
get key() {
|
|
62
|
+
return this.getAttribute("r-key");
|
|
63
|
+
}
|
|
64
|
+
set key(value) {
|
|
65
|
+
if (value) {
|
|
66
|
+
this.setAttribute("r-key", value);
|
|
67
|
+
} else {
|
|
68
|
+
this.removeAttribute("r-key");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
get disabled() {
|
|
72
|
+
return this.getAttribute("disabled");
|
|
73
|
+
}
|
|
74
|
+
set disabled(value) {
|
|
75
|
+
if (!value || value === "false") {
|
|
76
|
+
this.removeAttribute("disabled");
|
|
77
|
+
} else {
|
|
78
|
+
this.setAttribute("disabled", value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
get effect() {
|
|
82
|
+
return this.getAttribute("effect");
|
|
83
|
+
}
|
|
84
|
+
set effect(value) {
|
|
85
|
+
if (!value || value === "false") {
|
|
86
|
+
this.removeAttribute("effect");
|
|
87
|
+
} else {
|
|
88
|
+
this.setAttribute("effect", value);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
onClick(e) {
|
|
92
|
+
}
|
|
93
|
+
connectedCallback() {
|
|
94
|
+
this._div.addEventListener("click", this.onClick);
|
|
95
|
+
document.addEventListener("DOMContentLoaded", this.initAttribute);
|
|
96
|
+
}
|
|
97
|
+
disconnectCallback() {
|
|
98
|
+
document.removeEventListener("DOMContentLoaded", this.initAttribute);
|
|
99
|
+
}
|
|
100
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
101
|
+
var _a, _b, _c, _d, _e;
|
|
102
|
+
if (oldValue !== newValue && this.key && ((_a = this.parent) == null ? void 0 : _a.updateAttribute)) {
|
|
103
|
+
if (name === "icon")
|
|
104
|
+
(_b = this.parent) == null ? void 0 : _b.updateAttribute(this.key, "icon", newValue);
|
|
105
|
+
if (name === "iconSize")
|
|
106
|
+
(_c = this.parent) == null ? void 0 : _c.updateAttribute(this.key, "iconSize", newValue);
|
|
107
|
+
if (name === "effect")
|
|
108
|
+
(_d = this.parent) == null ? void 0 : _d.updateAttribute(this.key, "effect", newValue);
|
|
109
|
+
if (name === "disabled")
|
|
110
|
+
(_e = this.parent) == null ? void 0 : _e.updateAttribute(this.key, "disabled", newValue);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
customElements.define("r-tab", TabPane);
|
|
115
|
+
return TabPane;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const index = CustomElement();
|
|
119
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
120
|
+
__proto__: null,
|
|
121
|
+
default: index
|
|
122
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
123
|
+
export {
|
|
124
|
+
index as a,
|
|
125
|
+
index$1 as i
|
|
126
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as requireJszip_min } from "./jszip.min-97cf7c6a.js";
|
|
1
|
+
import { J as JSZip } from "./vendor-f71e6f68.js";
|
|
3
2
|
import { C as Color } from "./colz-746223ab.js";
|
|
4
3
|
window.E0DD32CBDCB63F = function E0DD32CBDCB63F() {
|
|
5
4
|
var d32 = {
|
|
@@ -10383,8 +10382,6 @@ window.E0DD32CBDCB63F = function E0DD32CBDCB63F() {
|
|
|
10383
10382
|
return d32;
|
|
10384
10383
|
};
|
|
10385
10384
|
const d3 = window.E0DD32CBDCB63F();
|
|
10386
|
-
var jszip_minExports = requireJszip_min();
|
|
10387
|
-
const JSZip = /* @__PURE__ */ getDefaultExportFromCjs(jszip_minExports);
|
|
10388
10385
|
let _order = 1;
|
|
10389
10386
|
function t_xml(S) {
|
|
10390
10387
|
const openBracket = "<";
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import { s as str2Xml } from "./index-d2d69b06.js";
|
|
8
|
+
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
9
|
+
const v = glob[path];
|
|
10
|
+
if (v) {
|
|
11
|
+
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
12
|
+
}
|
|
13
|
+
return new Promise((_, reject) => {
|
|
14
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const f7170ee498e0dd32cbdcb63fba8f75cc = ":host{display:inline-flex}:host .ran-icon{display:flex}:host([spin]){animation-name:rotate;animation-duration:1.4s;animation-timing-function:linear;animation-iteration-count:infinite}@keyframes rotate{to{transform:rotate(360deg)}}\n";
|
|
18
|
+
const X_LINKS_NS = "http://www.w3.org/1999/xlink";
|
|
19
|
+
const X_LINK_HREF = "xlink:href";
|
|
20
|
+
function Custom() {
|
|
21
|
+
if (typeof window !== "undefined" && !customElements.get("r-icon")) {
|
|
22
|
+
class CustomElement extends HTMLElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
__publicField(this, "_icon");
|
|
26
|
+
__publicField(this, "_div");
|
|
27
|
+
/**
|
|
28
|
+
* @description: 本地加载icon
|
|
29
|
+
*/
|
|
30
|
+
__publicField(this, "loadLocal", () => {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
__variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../../assets/icons/add-user.svg": () => import("./add-user-b2bed3e7.js"), "../../assets/icons/arrow-down.svg": () => import("./info-circle-fill-90ec9aa9.js").then((n) => n.a), "../../assets/icons/book.svg": () => import("./book-b11a68eb.js"), "../../assets/icons/check-circle-fill.svg": () => import("./check-circle-fill-dc284144.js"), "../../assets/icons/check-circle.svg": () => import("./check-circle-74bd09c3.js"), "../../assets/icons/close-circle-fill.svg": () => import("./close-circle-fill-238a66b1.js"), "../../assets/icons/close-circle.svg": () => import("./close-circle-720c18be.js"), "../../assets/icons/close.svg": () => import("./close-20925345.js"), "../../assets/icons/eye-close.svg": () => import("./eye-close-3874f1ae.js"), "../../assets/icons/eye.svg": () => import("./eye-5e742329.js"), "../../assets/icons/home.svg": () => import("./home-c4a05e8b.js"), "../../assets/icons/info-circle-fill.svg": () => import("./info-circle-fill-90ec9aa9.js").then((n) => n.i), "../../assets/icons/info-circle.svg": () => import("./info-circle-5826decc.js"), "../../assets/icons/loading.svg": () => import("./loading-09ca52df.js"), "../../assets/icons/lock.svg": () => import("./lock-1d2487c9.js"), "../../assets/icons/message.svg": () => import("./message-b2bfdea7.js"), "../../assets/icons/power-off.svg": () => import("./power-off-6ade5a91.js"), "../../assets/icons/preview.svg": () => import("./preview-b291aea8.js"), "../../assets/icons/setting.svg": () => import("./setting-1e5ccb6d.js"), "../../assets/icons/team.svg": () => import("./team-ca6a12e1.js"), "../../assets/icons/unlock.svg": () => import("./unlock-f56086fd.js"), "../../assets/icons/user.svg": () => import("./user-5c01e665.js"), "../../assets/icons/warning-circle-fill.svg": () => import("./warning-circle-fill-d17c37c9.js"), "../../assets/icons/warning-circle.svg": () => import("./warning-circle-035e025c.js") }), `../../assets/icons/${this.name}.svg`).then((result) => {
|
|
33
|
+
if (result && result.default && result.default._identification) {
|
|
34
|
+
const { data } = result.default;
|
|
35
|
+
this._icon && this._div.removeChild(this._icon);
|
|
36
|
+
this._icon = str2Xml(data, "image/svg+xml");
|
|
37
|
+
if (this._icon) {
|
|
38
|
+
this._div.appendChild(this._icon);
|
|
39
|
+
this.setSize();
|
|
40
|
+
this.setColor();
|
|
41
|
+
resolve();
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
this.loadNs();
|
|
45
|
+
reject(
|
|
46
|
+
`
|
|
47
|
+
couldn't be loaded by r-icon, message: ${this.name} icon is undefined`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}).catch((error) => {
|
|
51
|
+
this.loadNs();
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* @description: NS加载icon
|
|
57
|
+
*/
|
|
58
|
+
__publicField(this, "loadNs", () => {
|
|
59
|
+
if (this._icon && this._div) {
|
|
60
|
+
this._div.removeChild(this._icon);
|
|
61
|
+
}
|
|
62
|
+
this._icon = document.createElement("svg");
|
|
63
|
+
this._icon.setAttribute("class", "icon");
|
|
64
|
+
this._icon.setAttribute("viewBox", "0 0 1024 1024");
|
|
65
|
+
this._icon.setAttribute("width", "100");
|
|
66
|
+
this._icon.setAttribute("height", "100");
|
|
67
|
+
const use = document.createElementNS(X_LINKS_NS, "use");
|
|
68
|
+
use.setAttributeNS(
|
|
69
|
+
X_LINKS_NS,
|
|
70
|
+
X_LINK_HREF,
|
|
71
|
+
`../../assets/iconfont/icon.svg#icon-${this.name}`
|
|
72
|
+
);
|
|
73
|
+
this._icon.appendChild(use);
|
|
74
|
+
this._div.appendChild(this._icon);
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* @description: 根据name属性加载对应的svg
|
|
78
|
+
*/
|
|
79
|
+
__publicField(this, "setIcon", async () => {
|
|
80
|
+
if (this.name) {
|
|
81
|
+
this.loadLocal();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
/**
|
|
85
|
+
* @description: 设置icon的大小
|
|
86
|
+
*/
|
|
87
|
+
__publicField(this, "setSize", () => {
|
|
88
|
+
if (this._icon && this.size) {
|
|
89
|
+
this._icon.setAttribute("width", this.size);
|
|
90
|
+
this._icon.setAttribute("height", this.size);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* @description: 设置icon的颜色
|
|
95
|
+
*/
|
|
96
|
+
__publicField(this, "setColor", () => {
|
|
97
|
+
if (this._icon) {
|
|
98
|
+
this.color ? this._icon.setAttribute("fill", this.color) : this._icon.setAttribute("fill", "currentColor");
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* @description: 设置是否旋转和旋转的速度
|
|
103
|
+
*/
|
|
104
|
+
__publicField(this, "setSpin", () => {
|
|
105
|
+
if (this.spin) {
|
|
106
|
+
this.style.setProperty("animation-duration", `${this.spin}s`);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
this._div = document.createElement("div");
|
|
110
|
+
this._div.setAttribute("class", "ran-icon");
|
|
111
|
+
const shadowRoot = this.attachShadow({ mode: "closed" });
|
|
112
|
+
const F7170EE498E0DD32CBDCB63FBA8F75CC = document.createElement("style");
|
|
113
|
+
F7170EE498E0DD32CBDCB63FBA8F75CC.textContent = f7170ee498e0dd32cbdcb63fba8f75cc;
|
|
114
|
+
shadowRoot.appendChild(F7170EE498E0DD32CBDCB63FBA8F75CC);
|
|
115
|
+
shadowRoot.appendChild(this._div);
|
|
116
|
+
}
|
|
117
|
+
static get observedAttributes() {
|
|
118
|
+
return ["name", "size", "color", "spin"];
|
|
119
|
+
}
|
|
120
|
+
get name() {
|
|
121
|
+
return this.getAttribute("name");
|
|
122
|
+
}
|
|
123
|
+
set name(value) {
|
|
124
|
+
if (value)
|
|
125
|
+
this.setAttribute("name", value);
|
|
126
|
+
}
|
|
127
|
+
get size() {
|
|
128
|
+
return this.getAttribute("size");
|
|
129
|
+
}
|
|
130
|
+
set size(value) {
|
|
131
|
+
if (value)
|
|
132
|
+
this.setAttribute("size", value);
|
|
133
|
+
}
|
|
134
|
+
get color() {
|
|
135
|
+
return this.getAttribute("color");
|
|
136
|
+
}
|
|
137
|
+
set color(value) {
|
|
138
|
+
if (value)
|
|
139
|
+
this.setAttribute("color", value);
|
|
140
|
+
}
|
|
141
|
+
get spin() {
|
|
142
|
+
return this.getAttribute("spin");
|
|
143
|
+
}
|
|
144
|
+
set spin(value) {
|
|
145
|
+
if (value != null)
|
|
146
|
+
this.setAttribute("spin", value);
|
|
147
|
+
}
|
|
148
|
+
connectedCallback() {
|
|
149
|
+
this.setIcon();
|
|
150
|
+
}
|
|
151
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
152
|
+
if (newValue !== oldValue) {
|
|
153
|
+
if (name === "name")
|
|
154
|
+
this.setIcon();
|
|
155
|
+
if (name === "size")
|
|
156
|
+
this.setSize();
|
|
157
|
+
if (name === "color")
|
|
158
|
+
this.setColor();
|
|
159
|
+
if (name === "spin")
|
|
160
|
+
this.setSpin();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
customElements.define("r-icon", CustomElement);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
const index = Custom();
|
|
168
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
169
|
+
__proto__: null,
|
|
170
|
+
default: index
|
|
171
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
172
|
+
export {
|
|
173
|
+
index as a,
|
|
174
|
+
index$1 as i
|
|
175
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function Custom() {
|
|
2
|
+
if (typeof window !== "undefined" && !customElements.get("r-modal")) {
|
|
3
|
+
class CustomModal extends HTMLElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
customElements.define("r-modal", CustomModal);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const index = Custom();
|
|
12
|
+
const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
13
|
+
__proto__: null,
|
|
14
|
+
default: index
|
|
15
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
16
|
+
export {
|
|
17
|
+
index as a,
|
|
18
|
+
index$1 as i
|
|
19
|
+
};
|