wini-web-components 2.6.9 → 2.7.1
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/{public → dist}/index.html +43 -43
- package/{public → dist}/manifest.json +25 -25
- package/{public → dist}/robots.txt +3 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/vite.svg +1 -0
- package/dist/wini-web-components.css +4 -0
- package/dist/wini-web-components.js +32 -0
- package/dist/wini-web-components.mjs +6753 -0
- package/package.json +44 -82
- package/.early.coverage/clover.xml +0 -6
- package/.early.coverage/coverage-final.json +0 -1
- package/.early.coverage/lcov-report/base.css +0 -224
- package/.early.coverage/lcov-report/block-navigation.js +0 -87
- package/.early.coverage/lcov-report/favicon.png +0 -0
- package/.early.coverage/lcov-report/index.html +0 -101
- package/.early.coverage/lcov-report/prettify.css +0 -1
- package/.early.coverage/lcov-report/prettify.js +0 -2
- package/.early.coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/.early.coverage/lcov-report/sorter.js +0 -196
- package/.early.coverage/lcov.info +0 -0
- package/.early.coverage/v8/coverage-final.json +0 -1
- package/README.md +0 -21
- package/coverage/early.sample.test.js +0 -1
- package/dist/component/button/button.d.ts +0 -21
- package/dist/component/button/button.js +0 -73
- package/dist/component/calendar/calendar.d.ts +0 -30
- package/dist/component/calendar/calendar.js +0 -357
- package/dist/component/card/card-info.d.ts +0 -15
- package/dist/component/card/card-info.js +0 -51
- package/dist/component/card/card.d.ts +0 -13
- package/dist/component/card/card.js +0 -33
- package/dist/component/checkbox/checkbox.d.ts +0 -24
- package/dist/component/checkbox/checkbox.js +0 -90
- package/dist/component/ck-editor/ckeditor.d.ts +0 -36
- package/dist/component/ck-editor/ckeditor.js +0 -392
- package/dist/component/component-status.d.ts +0 -8
- package/dist/component/component-status.js +0 -39
- package/dist/component/date-picker/date-picker.d.ts +0 -25
- package/dist/component/date-picker/date-picker.js +0 -329
- package/dist/component/date-time-picker/date-time-picker.d.ts +0 -36
- package/dist/component/date-time-picker/date-time-picker.js +0 -528
- package/dist/component/dialog/dialog.d.ts +0 -18
- package/dist/component/dialog/dialog.js +0 -113
- package/dist/component/import-file/import-file.d.ts +0 -33
- package/dist/component/import-file/import-file.js +0 -151
- package/dist/component/infinite-scroll/infinite-scroll.d.ts +0 -17
- package/dist/component/infinite-scroll/infinite-scroll.js +0 -37
- package/dist/component/input-multi-select/input-multi-select.d.ts +0 -21
- package/dist/component/input-multi-select/input-multi-select.js +0 -260
- package/dist/component/input-opt/input-opt.d.ts +0 -21
- package/dist/component/input-opt/input-opt.js +0 -157
- package/dist/component/input-otp/input-otp.d.ts +0 -21
- package/dist/component/input-otp/input-otp.js +0 -131
- package/dist/component/number-picker/number-picker.d.ts +0 -19
- package/dist/component/number-picker/number-picker.js +0 -125
- package/dist/component/pagination/pagination.d.ts +0 -13
- package/dist/component/pagination/pagination.js +0 -90
- package/dist/component/popup/popup.d.ts +0 -40
- package/dist/component/popup/popup.js +0 -125
- package/dist/component/progress-bar/progress-bar.d.ts +0 -16
- package/dist/component/progress-bar/progress-bar.js +0 -23
- package/dist/component/progress-circle/progress-circle.d.ts +0 -14
- package/dist/component/progress-circle/progress-circle.js +0 -19
- package/dist/component/radio-button/radio-button.d.ts +0 -20
- package/dist/component/radio-button/radio-button.js +0 -33
- package/dist/component/rating/rating.d.ts +0 -23
- package/dist/component/rating/rating.js +0 -54
- package/dist/component/select1/select1.d.ts +0 -31
- package/dist/component/select1/select1.js +0 -249
- package/dist/component/slider/slider.d.ts +0 -31
- package/dist/component/slider/slider.js +0 -64
- package/dist/component/switch/switch.d.ts +0 -23
- package/dist/component/switch/switch.js +0 -50
- package/dist/component/table/table.d.ts +0 -51
- package/dist/component/table/table.js +0 -66
- package/dist/component/tag/tag.d.ts +0 -21
- package/dist/component/tag/tag.js +0 -19
- package/dist/component/text/text.d.ts +0 -16
- package/dist/component/text/text.js +0 -20
- package/dist/component/text-area/text-area.d.ts +0 -28
- package/dist/component/text-area/text-area.js +0 -54
- package/dist/component/text-field/text-field.d.ts +0 -33
- package/dist/component/text-field/text-field.js +0 -77
- package/dist/component/toast-noti/toast-noti.d.ts +0 -5
- package/dist/component/toast-noti/toast-noti.js +0 -25
- package/dist/component/wini-icon/winicon.d.ts +0 -20
- package/dist/component/wini-icon/winicon.js +0 -176
- package/dist/form/login/view.d.ts +0 -40
- package/dist/form/login/view.js +0 -66
- package/dist/i18n.d.ts +0 -2
- package/dist/i18n.js +0 -125
- package/dist/index.d.ts +0 -33
- package/dist/index.js +0 -2
- package/dist/index.js.LICENSE.txt +0 -18
- package/dist/language/i18n.d.ts +0 -2
- package/dist/language/i18n.js +0 -146
- package/global.d.ts +0 -4
- /package/{public → dist}/favicon.ico +0 -0
- /package/{public → dist}/logo192.png +0 -0
- /package/{public → dist}/logo512.png +0 -0
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.Winicon = Winicon;
|
|
49
|
-
const react_dom_1 = __importDefault(require("react-dom"));
|
|
50
|
-
const react_1 = __importStar(require("react"));
|
|
51
|
-
const winicon_module_css_1 = __importDefault(require("./winicon.module.css"));
|
|
52
|
-
const text_1 = require("../text/text");
|
|
53
|
-
function Winicon({ id, src, link, className, style, size, color, alt, onClick, tooltip }) {
|
|
54
|
-
const ref = (0, react_1.useRef)(null);
|
|
55
|
-
const [svgData, setSvgData] = (0, react_1.useState)();
|
|
56
|
-
const [showTooltip, setShowTooltip] = (0, react_1.useState)(false);
|
|
57
|
-
const cdnSrc = "https://cdn.jsdelivr.net/gh/WiniGit/icon-library@latest/";
|
|
58
|
-
const extendAttribute = (0, react_1.useMemo)(() => {
|
|
59
|
-
if (tooltip)
|
|
60
|
-
return {
|
|
61
|
-
"tooltip-value": tooltip,
|
|
62
|
-
onMouseOver: () => { setShowTooltip(true); },
|
|
63
|
-
onMouseOut: () => { setShowTooltip(false); }
|
|
64
|
-
};
|
|
65
|
-
return {};
|
|
66
|
-
}, [tooltip]);
|
|
67
|
-
(0, react_1.useEffect)(() => {
|
|
68
|
-
if (src) {
|
|
69
|
-
fetch(cdnSrc + src + ".svg").then((res) => __awaiter(this, void 0, void 0, function* () { setSvgData(yield res.text()); })).catch(() => { setSvgData(alt !== null && alt !== void 0 ? alt : "error"); });
|
|
70
|
-
}
|
|
71
|
-
else if (link) {
|
|
72
|
-
fetch(link).then((res) => __awaiter(this, void 0, void 0, function* () { setSvgData(yield res.text()); }));
|
|
73
|
-
}
|
|
74
|
-
}, [src, link]);
|
|
75
|
-
return react_1.default.createElement(react_1.default.Fragment, null,
|
|
76
|
-
react_1.default.createElement("div", Object.assign({ ref: ref, id: id, onClick: onClick, className: `${winicon_module_css_1.default['wini-icon']} ${svgData ? "" : "skeleton-loading"} ${onClick ? winicon_module_css_1.default['clickable'] : ''} ${className !== null && className !== void 0 ? className : ''} ${src ? src.split("/").map((e, i) => i === 0 ? `${e}-icon` : e.replace(" ", "-")).join(" ") : ''}${link ? ' link-icon' : ""}`, style: (style ? Object.assign(Object.assign({}, style), { '--size': size, '--color': color }) : { '--size': size, '--color': color }), dangerouslySetInnerHTML: { __html: svgData !== null && svgData !== void 0 ? svgData : '' } }, extendAttribute)),
|
|
77
|
-
tooltip && showTooltip && react_dom_1.default.createPortal((() => {
|
|
78
|
-
var _a;
|
|
79
|
-
if (!ref.current)
|
|
80
|
-
return null;
|
|
81
|
-
const rect = ref.current.getBoundingClientRect();
|
|
82
|
-
let pos = (_a = tooltip.position) !== null && _a !== void 0 ? _a : "bottom";
|
|
83
|
-
if (document.body.offsetHeight - rect.bottom < 100 && pos === "bottom")
|
|
84
|
-
pos = "top";
|
|
85
|
-
else if (rect.top < 100 && pos === "top")
|
|
86
|
-
pos = "bottom";
|
|
87
|
-
if (document.body.offsetWidth - rect.right < 100 && pos === "right")
|
|
88
|
-
pos = "left";
|
|
89
|
-
else if (rect.left < 100 && pos === "left")
|
|
90
|
-
pos = "right";
|
|
91
|
-
switch (pos) {
|
|
92
|
-
case "top":
|
|
93
|
-
return react_1.default.createElement("div", { ref: r => {
|
|
94
|
-
if (r) {
|
|
95
|
-
const _r = r.getBoundingClientRect();
|
|
96
|
-
if (_r.x < 0) {
|
|
97
|
-
r.style.left = (rect.x + rect.width / 2) + "px";
|
|
98
|
-
r.style.transform = "translateX(-1.8rem)";
|
|
99
|
-
r.style.alignItems = "start";
|
|
100
|
-
}
|
|
101
|
-
else if (_r.right > document.body.offsetWidth) {
|
|
102
|
-
r.style.left = "unset";
|
|
103
|
-
r.style.right = (document.body.offsetWidth - rect.right - rect.width / 2) + "px";
|
|
104
|
-
r.style.transform = "translateX(-1.4rem)";
|
|
105
|
-
r.style.alignItems = "end";
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}, className: `col ${winicon_module_css_1.default['tooltip-container']}`, style: { alignItems: "center", bottom: document.body.offsetHeight - rect.top - 4, left: rect.left + (rect.width / 2), transform: "translateX(-50%)" } },
|
|
109
|
-
react_1.default.createElement(text_1.Text, { className: `body-3 ${winicon_module_css_1.default['tooltip-message']}`, maxLine: 2 }, tooltip.message),
|
|
110
|
-
react_1.default.createElement("div", { className: "row", style: { padding: "0 1.2rem", transform: "translateY(-0.2rem)" } },
|
|
111
|
-
react_1.default.createElement("div", { style: { borderLeft: "0.6rem solid transparent", borderRight: "0.6rem solid transparent", borderTop: "0.8rem solid var(--neutral-main-reverse-background-color)", borderRadius: 2 } })));
|
|
112
|
-
case "bottom":
|
|
113
|
-
return react_1.default.createElement("div", { ref: r => {
|
|
114
|
-
if (r) {
|
|
115
|
-
const _r = r.getBoundingClientRect();
|
|
116
|
-
if (_r.x < 0) {
|
|
117
|
-
r.style.left = (rect.x + rect.width / 2) + "px";
|
|
118
|
-
r.style.transform = "translateX(-1.8rem)";
|
|
119
|
-
r.style.alignItems = "start";
|
|
120
|
-
}
|
|
121
|
-
else if (_r.right > document.body.offsetWidth) {
|
|
122
|
-
r.style.left = "unset";
|
|
123
|
-
r.style.right = (document.body.offsetWidth - rect.right - rect.width / 2) + "px";
|
|
124
|
-
r.style.transform = "translateX(-1.4rem)";
|
|
125
|
-
r.style.alignItems = "end";
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}, className: `col ${winicon_module_css_1.default['tooltip-container']}`, style: { alignItems: "center", top: rect.bottom + 4, left: rect.left + (rect.width / 2), transform: "translateX(-50%)" } },
|
|
129
|
-
react_1.default.createElement("div", { className: "row", style: { padding: "0 1.2rem", transform: "translateY(0.2rem)" } },
|
|
130
|
-
react_1.default.createElement("div", { style: { borderLeft: "0.6rem solid transparent", borderRight: "0.6rem solid transparent", borderBottom: "0.8rem solid var(--neutral-main-reverse-background-color)", borderRadius: 2 } })),
|
|
131
|
-
react_1.default.createElement(text_1.Text, { className: `body-3 ${winicon_module_css_1.default['tooltip-message']}`, maxLine: 2 }, tooltip.message));
|
|
132
|
-
case "left":
|
|
133
|
-
return react_1.default.createElement("div", { ref: r => {
|
|
134
|
-
if (r) {
|
|
135
|
-
const _r = r.getBoundingClientRect();
|
|
136
|
-
if (_r.y < 0) {
|
|
137
|
-
r.style.top = (rect.y + rect.height / 2) + "px";
|
|
138
|
-
r.style.transform = "translateY(-1.8rem)";
|
|
139
|
-
r.style.alignItems = "start";
|
|
140
|
-
}
|
|
141
|
-
else if (_r.bottom > document.body.offsetHeight) {
|
|
142
|
-
r.style.top = "unset";
|
|
143
|
-
r.style.bottom = (document.body.offsetHeight - rect.bottom - rect.height / 2) + "px";
|
|
144
|
-
r.style.transform = "translateY(-1.4rem)";
|
|
145
|
-
r.style.alignItems = "end";
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}, className: `row ${winicon_module_css_1.default['tooltip-container']}`, style: { top: rect.top + (rect.height / 2), right: document.body.offsetWidth - rect.left - 4, transform: "translateY(-50%)" } },
|
|
149
|
-
react_1.default.createElement(text_1.Text, { className: `body-3 ${winicon_module_css_1.default['tooltip-message']}`, maxLine: 2 }, tooltip.message),
|
|
150
|
-
react_1.default.createElement("div", { className: "row", style: { padding: "1.2rem 0", transform: "translateX(-0.2rem)" } },
|
|
151
|
-
react_1.default.createElement("div", { style: { borderTop: "0.6rem solid transparent", borderBottom: "0.6rem solid transparent", borderLeft: "0.8rem solid var(--neutral-main-reverse-background-color)", borderRadius: 2 } })));
|
|
152
|
-
case "right":
|
|
153
|
-
return react_1.default.createElement("div", { ref: r => {
|
|
154
|
-
if (r) {
|
|
155
|
-
const _r = r.getBoundingClientRect();
|
|
156
|
-
if (_r.y < 0) {
|
|
157
|
-
r.style.top = (rect.y + rect.height / 2) + "px";
|
|
158
|
-
r.style.transform = "translateY(-1.8rem)";
|
|
159
|
-
r.style.alignItems = "start";
|
|
160
|
-
}
|
|
161
|
-
else if (_r.bottom > document.body.offsetHeight) {
|
|
162
|
-
r.style.top = "unset";
|
|
163
|
-
r.style.bottom = (document.body.offsetHeight - rect.bottom - rect.height / 2) + "px";
|
|
164
|
-
r.style.transform = "translateY(-1.4rem)";
|
|
165
|
-
r.style.alignItems = "end";
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}, className: `row ${winicon_module_css_1.default['tooltip-container']}`, style: { top: rect.top + (rect.height / 2), left: rect.right + 4, transform: "translateY(-50%)" } },
|
|
169
|
-
react_1.default.createElement("div", { className: "row", style: { padding: "1.2rem 0", transform: "translateX(0.2rem)" } },
|
|
170
|
-
react_1.default.createElement("div", { style: { borderTop: "0.6rem solid transparent", borderBottom: "0.6rem solid transparent", borderRight: "0.8rem solid var(--neutral-main-reverse-background-color)", borderRadius: 2 } })),
|
|
171
|
-
react_1.default.createElement(text_1.Text, { className: `body-3 ${winicon_module_css_1.default['tooltip-message']}`, maxLine: 2 }, tooltip.message));
|
|
172
|
-
default:
|
|
173
|
-
return react_1.default.createElement("div", null);
|
|
174
|
-
}
|
|
175
|
-
})(), document.body));
|
|
176
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
3
|
-
interface Props {
|
|
4
|
-
logo: React.ReactNode | string;
|
|
5
|
-
formData: {
|
|
6
|
-
"username": {
|
|
7
|
-
label: string;
|
|
8
|
-
name: string;
|
|
9
|
-
prefix?: React.ReactNode;
|
|
10
|
-
onValidate?: React.FocusEventHandler<HTMLInputElement>;
|
|
11
|
-
maxLength?: number;
|
|
12
|
-
};
|
|
13
|
-
"password": {
|
|
14
|
-
label: string;
|
|
15
|
-
name: string;
|
|
16
|
-
prefix?: React.ReactNode;
|
|
17
|
-
onValidate?: React.FocusEventHandler<HTMLInputElement>;
|
|
18
|
-
maxLength?: number;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
onSubmit?: (data: FieldValues, methods?: UseFormReturn<any>) => void;
|
|
22
|
-
title?: string;
|
|
23
|
-
orText?: string;
|
|
24
|
-
methods?: UseFormReturn<any>;
|
|
25
|
-
buttonLoginLabel?: string;
|
|
26
|
-
loginWithGoogle?: React.MouseEventHandler<HTMLButtonElement>;
|
|
27
|
-
loginWithFacebook?: React.MouseEventHandler<HTMLButtonElement>;
|
|
28
|
-
loginWithApple?: React.MouseEventHandler<HTMLButtonElement>;
|
|
29
|
-
loginWithMicrosoft?: React.MouseEventHandler<HTMLButtonElement>;
|
|
30
|
-
onRegister?: React.MouseEventHandler<HTMLDivElement>;
|
|
31
|
-
registerPrefixText?: string;
|
|
32
|
-
registerText?: string;
|
|
33
|
-
forgotPasswordText?: string;
|
|
34
|
-
onForgotPassword?: React.MouseEventHandler<HTMLDivElement>;
|
|
35
|
-
style?: CSSProperties;
|
|
36
|
-
className?: string;
|
|
37
|
-
id?: string;
|
|
38
|
-
}
|
|
39
|
-
export declare function WLoginView(props: Props): React.JSX.Element;
|
|
40
|
-
export {};
|
package/dist/form/login/view.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.WLoginView = WLoginView;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const index_1 = require("../../index");
|
|
9
|
-
const view_module_css_1 = __importDefault(require("./view.module.css"));
|
|
10
|
-
const react_hook_form_1 = require("react-hook-form");
|
|
11
|
-
const react_2 = require("react");
|
|
12
|
-
const react_i18next_1 = require("react-i18next");
|
|
13
|
-
function WLoginView(props) {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
15
|
-
const methods = (0, react_hook_form_1.useForm)({ shouldFocusError: false });
|
|
16
|
-
const [isShowPass, setShowPass] = (0, react_2.useState)(false);
|
|
17
|
-
const { t } = (0, react_i18next_1.useTranslation)();
|
|
18
|
-
const _onSubmit = (ev) => {
|
|
19
|
-
if (props.onSubmit)
|
|
20
|
-
props.onSubmit(ev, methods);
|
|
21
|
-
};
|
|
22
|
-
return react_1.default.createElement("form", { id: props.id, className: `col login-view-container ${view_module_css_1.default['login-view-container']} ${(_a = props.className) !== null && _a !== void 0 ? _a : ''}`, style: props.style },
|
|
23
|
-
typeof props.logo === "string" ? react_1.default.createElement("img", { alt: 'logo', src: props.logo, height: "36rem" }) : props.logo,
|
|
24
|
-
react_1.default.createElement("div", { className: `col login-view-form-container ${view_module_css_1.default['login-view-form-container']}` },
|
|
25
|
-
react_1.default.createElement(index_1.Text, { className: 'heading-4' }, (_b = props.title) !== null && _b !== void 0 ? _b : `${t("loginTo")} Wini`),
|
|
26
|
-
react_1.default.createElement("div", { className: 'col' },
|
|
27
|
-
react_1.default.createElement("div", { className: 'col', style: { gap: "0.8rem", overflow: "visible" } },
|
|
28
|
-
react_1.default.createElement(index_1.Text, { className: 'label-3' }, (_c = props.formData.username.label) !== null && _c !== void 0 ? _c : t("username")),
|
|
29
|
-
react_1.default.createElement(index_1.TextField, { autoComplete: 'username', className: "placeholder-2", placeholder: props.formData.username.label, style: { height: "4.8rem" }, prefix: props.formData.username.prefix, name: props.formData.username.name, register: ((_d = props.methods) !== null && _d !== void 0 ? _d : methods).register(props.formData.username.name, {
|
|
30
|
-
onChange: (ev) => { ev.target.value = ev.target.value.trim(); },
|
|
31
|
-
onBlur: props.formData.username.onValidate
|
|
32
|
-
}), onComplete: (ev) => { ev.target.blur(); }, helperText: (_g = (_f = ((_e = props.methods) !== null && _e !== void 0 ? _e : methods).formState.errors) === null || _f === void 0 ? void 0 : _f[props.formData.username.name]) === null || _g === void 0 ? void 0 : _g.message })),
|
|
33
|
-
react_1.default.createElement("div", { className: 'col', style: { gap: "0.8rem", overflow: "visible" } },
|
|
34
|
-
react_1.default.createElement(index_1.Text, { className: 'label-3' }, (_h = props.formData.password.label) !== null && _h !== void 0 ? _h : t("password")),
|
|
35
|
-
react_1.default.createElement(index_1.TextField, { autoComplete: 'current-password', className: "placeholder-2", placeholder: props.formData.password.label, style: { height: "4.8rem" }, prefix: props.formData.password.prefix, suffix: react_1.default.createElement("button", { type: 'button', onClick: () => { setShowPass(!isShowPass); } },
|
|
36
|
-
react_1.default.createElement(index_1.Winicon, { src: `outline/user interface/${isShowPass ? "view" : "hide"}`, size: "1.6rem" })), name: props.formData.password.name, type: isShowPass ? "text" : "password", register: ((_j = props.methods) !== null && _j !== void 0 ? _j : methods).register(props.formData.password.name, {
|
|
37
|
-
onChange: (ev) => { ev.target.value = ev.target.value.trim(); },
|
|
38
|
-
onBlur: props.formData.password.onValidate
|
|
39
|
-
}), onComplete: (ev) => {
|
|
40
|
-
var _a, _b, _c;
|
|
41
|
-
if ((_b = ((_a = props.methods) !== null && _a !== void 0 ? _a : methods).watch(props.formData.password.name)) === null || _b === void 0 ? void 0 : _b.length) {
|
|
42
|
-
ev.target.blur();
|
|
43
|
-
if (!props.formData.password.onValidate && props.onSubmit)
|
|
44
|
-
_onSubmit(((_c = props.methods) !== null && _c !== void 0 ? _c : methods).getValues());
|
|
45
|
-
}
|
|
46
|
-
else
|
|
47
|
-
ev.target.blur();
|
|
48
|
-
}, helperText: (_m = (_l = ((_k = props.methods) !== null && _k !== void 0 ? _k : methods).formState.errors) === null || _l === void 0 ? void 0 : _l[props.formData.password.name]) === null || _m === void 0 ? void 0 : _m.message })),
|
|
49
|
-
react_1.default.createElement(index_1.Text, { className: `button-text-3 ${view_module_css_1.default['forgot-password-btn']}`, onClick: props.onForgotPassword }, (_o = props.forgotPasswordText) !== null && _o !== void 0 ? _o : t("forgotPassword")),
|
|
50
|
-
react_1.default.createElement("div", { className: 'col', style: { gap: "1.6rem" } },
|
|
51
|
-
react_1.default.createElement(index_1.Button, { disabled: ((_q = ((_p = props.methods) !== null && _p !== void 0 ? _p : methods).watch(props.formData.username.name)) === null || _q === void 0 ? void 0 : _q.length) && ((_s = ((_r = props.methods) !== null && _r !== void 0 ? _r : methods).watch(props.formData.password.name)) === null || _s === void 0 ? void 0 : _s.length) ? false : true, className: `button-text-1 ${view_module_css_1.default['login-btn']}`, onClick: props.onSubmit && ((_t = props.methods) !== null && _t !== void 0 ? _t : methods).handleSubmit(_onSubmit), label: (_u = props.buttonLoginLabel) !== null && _u !== void 0 ? _u : t("login") }),
|
|
52
|
-
react_1.default.createElement("div", { className: 'row', style: { justifyContent: "center", gap: "0.4rem" } },
|
|
53
|
-
react_1.default.createElement(index_1.Text, { className: 'label-4' }, (_v = props.registerPrefixText) !== null && _v !== void 0 ? _v : t("dontHaveAccount")),
|
|
54
|
-
react_1.default.createElement(index_1.Text, { className: `button-text-3 ${view_module_css_1.default['register-btn']}`, onClick: props.onRegister }, (_w = props.registerText) !== null && _w !== void 0 ? _w : `${t("signupFor")} Wini`))),
|
|
55
|
-
(props.loginWithGoogle || props.loginWithFacebook || props.loginWithApple || props.loginWithMicrosoft) ?
|
|
56
|
-
react_1.default.createElement(react_1.default.Fragment, null,
|
|
57
|
-
react_1.default.createElement("div", { className: `row ${view_module_css_1.default['or-spacing']}` },
|
|
58
|
-
react_1.default.createElement("div", null),
|
|
59
|
-
react_1.default.createElement(index_1.Text, { className: "label-4" }, (_x = props.orText) !== null && _x !== void 0 ? _x : t("or")),
|
|
60
|
-
react_1.default.createElement("div", null)),
|
|
61
|
-
react_1.default.createElement("div", { className: `row ${view_module_css_1.default['login-social-media']}` },
|
|
62
|
-
props.loginWithGoogle && react_1.default.createElement(index_1.Button, { className: `label-1`, onClick: props.loginWithGoogle, prefix: react_1.default.createElement(index_1.Winicon, { src: 'color/social media/google', size: "2rem" }), label: "Google" }),
|
|
63
|
-
props.loginWithFacebook && react_1.default.createElement(index_1.Button, { className: `label-1`, onClick: props.loginWithFacebook, prefix: react_1.default.createElement(index_1.Winicon, { src: 'color/social media/logo-facebook', size: "2rem" }), label: "Facebook" }),
|
|
64
|
-
props.loginWithApple && react_1.default.createElement(index_1.Button, { className: `label-1`, onClick: props.loginWithApple, prefix: react_1.default.createElement(index_1.Winicon, { src: 'color/development/apple', size: "2rem" }), label: "Apple" }),
|
|
65
|
-
props.loginWithMicrosoft && react_1.default.createElement(index_1.Button, { className: `label-1`, onClick: props.loginWithMicrosoft, prefix: react_1.default.createElement(index_1.Winicon, { src: 'color/development/microsoft', size: "2rem" }), label: "Microsoft" }))) : null)));
|
|
66
|
-
}
|
package/dist/i18n.d.ts
DELETED
package/dist/i18n.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.i18n = void 0;
|
|
7
|
-
var i18next_1 = __importDefault(require("i18next"));
|
|
8
|
-
exports.i18n = i18next_1.default;
|
|
9
|
-
var react_i18next_1 = require("react-i18next");
|
|
10
|
-
// Translation resources
|
|
11
|
-
var resources = {
|
|
12
|
-
en: {
|
|
13
|
-
translation: {
|
|
14
|
-
su: 'Su',
|
|
15
|
-
mo: "Mo",
|
|
16
|
-
tu: "Tu",
|
|
17
|
-
we: "We",
|
|
18
|
-
th: "Th",
|
|
19
|
-
fr: "Fr",
|
|
20
|
-
sa: "Sa",
|
|
21
|
-
yesterday: "Yesterday",
|
|
22
|
-
lastWeek: "Last week",
|
|
23
|
-
lastMonth: "Last month",
|
|
24
|
-
lastYear: "Last year",
|
|
25
|
-
january: "January",
|
|
26
|
-
february: "February",
|
|
27
|
-
march: "March",
|
|
28
|
-
april: "April",
|
|
29
|
-
may: "May",
|
|
30
|
-
june: "June",
|
|
31
|
-
july: "July",
|
|
32
|
-
august: "August",
|
|
33
|
-
september: "September",
|
|
34
|
-
october: "October",
|
|
35
|
-
november: "November",
|
|
36
|
-
december: "December",
|
|
37
|
-
today: "Today",
|
|
38
|
-
apply: "Apply",
|
|
39
|
-
cancel: "Cancel",
|
|
40
|
-
submit: "Submit",
|
|
41
|
-
limitFileError: "File {{file.name}} exceeds the maximum size of {{sizeTitle}}",
|
|
42
|
-
limitFileWarning: "File size should not exceed {{sizeTitle}}.",
|
|
43
|
-
uploadFileAction: 'Click or drag and drop to upload file',
|
|
44
|
-
file: "File",
|
|
45
|
-
remove: "Remove",
|
|
46
|
-
choose: "Choose",
|
|
47
|
-
select: "Select",
|
|
48
|
-
all: "All",
|
|
49
|
-
noResultFound: "No result found",
|
|
50
|
-
ofItems: "of {{totalItem}} items",
|
|
51
|
-
page: "Page",
|
|
52
|
-
go: "Go to",
|
|
53
|
-
or: "Or",
|
|
54
|
-
username: "Username",
|
|
55
|
-
password: "Password",
|
|
56
|
-
dontHaveAccount: "Don't have an account?",
|
|
57
|
-
forgotPassword: "Forgot your password?",
|
|
58
|
-
login: "Log in",
|
|
59
|
-
loginTo: "Log in to",
|
|
60
|
-
signup: "Sign up",
|
|
61
|
-
signupFor: "Sign up for",
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
vi: {
|
|
65
|
-
translation: {
|
|
66
|
-
su: 'CN',
|
|
67
|
-
mo: "T2",
|
|
68
|
-
tu: "T3",
|
|
69
|
-
we: "T4",
|
|
70
|
-
th: "T5",
|
|
71
|
-
fr: "T6",
|
|
72
|
-
sa: "T7",
|
|
73
|
-
yesterday: "Hôm qua",
|
|
74
|
-
lastWeek: "Tuần trước",
|
|
75
|
-
lastMonth: "Tháng trước",
|
|
76
|
-
lastYear: "Năm trước",
|
|
77
|
-
january: "Tháng 1",
|
|
78
|
-
february: "Tháng 2",
|
|
79
|
-
march: "Tháng 3",
|
|
80
|
-
april: "Tháng 4",
|
|
81
|
-
may: "Tháng 5",
|
|
82
|
-
june: "Tháng 6",
|
|
83
|
-
july: "Tháng 7",
|
|
84
|
-
august: "Tháng 8",
|
|
85
|
-
september: "Tháng 9",
|
|
86
|
-
october: "Tháng 10",
|
|
87
|
-
november: "Tháng 11",
|
|
88
|
-
december: "Tháng 12",
|
|
89
|
-
today: "Hôm nay",
|
|
90
|
-
apply: "Áp dụng",
|
|
91
|
-
cancel: "Hủy",
|
|
92
|
-
submit: "Xác nhận",
|
|
93
|
-
limitFileError: "Tệp {{name}} vượt quá dung lượng tối đa {{sizeTitle}}",
|
|
94
|
-
limitFileWarning: "Tệp không được vượt quá {{sizeTitle}}.",
|
|
95
|
-
uploadFileAction: 'Nhấn hoặc kéo vào để tải tệp lên',
|
|
96
|
-
file: "Tệp",
|
|
97
|
-
remove: "Xóa",
|
|
98
|
-
choose: "Chọn",
|
|
99
|
-
select: "Chọn",
|
|
100
|
-
all: "Tất cả",
|
|
101
|
-
noResultFound: "Không tìm thấy kết quả",
|
|
102
|
-
ofItems: "trên {{totalItem}} kết quả",
|
|
103
|
-
page: "Trang",
|
|
104
|
-
go: "Đi tới",
|
|
105
|
-
or: "Hoặc",
|
|
106
|
-
username: "Tên đăng nhập",
|
|
107
|
-
password: "Mật khẩu",
|
|
108
|
-
dontHaveAccount: "Chưa có tài khoản?",
|
|
109
|
-
forgotPassword: "Quên mật khẩu?",
|
|
110
|
-
login: "Đăng nhập",
|
|
111
|
-
loginTo: "Đăng nhập vào",
|
|
112
|
-
signup: "Đăng ký",
|
|
113
|
-
signupFor: "Đăng ký"
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
// Initialize i18n
|
|
118
|
-
i18next_1.default.use(react_i18next_1.initReactI18next).init({
|
|
119
|
-
resources: resources,
|
|
120
|
-
lng: 'en',
|
|
121
|
-
fallbackLng: 'en',
|
|
122
|
-
interpolation: {
|
|
123
|
-
escapeValue: false, // React already escapes values
|
|
124
|
-
},
|
|
125
|
-
});
|
package/dist/index.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Checkbox } from './component/checkbox/checkbox';
|
|
2
|
-
import { Select1, OptionsItem } from './component/select1/select1';
|
|
3
|
-
import { Switch } from './component/switch/switch';
|
|
4
|
-
import { showPopup, closePopup, Popup } from './component/popup/popup';
|
|
5
|
-
import { showDialog, Dialog, DialogAlignment } from './component/dialog/dialog';
|
|
6
|
-
import { DateTimePicker } from './component/date-time-picker/date-time-picker';
|
|
7
|
-
import { SelectMultiple } from './component/input-multi-select/input-multi-select';
|
|
8
|
-
import { ProgressBar } from './component/progress-bar/progress-bar';
|
|
9
|
-
import { ComponentStatus, getStatusIcon } from './component/component-status';
|
|
10
|
-
import { Text } from './component/text/text';
|
|
11
|
-
import { Pagination } from './component/pagination/pagination';
|
|
12
|
-
import { Table, TbCell, TbHeader, TbRow, TbBody, CellAlignItems } from './component/table/table';
|
|
13
|
-
import { TextField } from './component/text-field/text-field';
|
|
14
|
-
import { RadioButton } from './component/radio-button/radio-button';
|
|
15
|
-
import { TextArea } from './component/text-area/text-area';
|
|
16
|
-
import { ImportFile } from './component/import-file/import-file';
|
|
17
|
-
import { ToastMessage } from './component/toast-noti/toast-noti';
|
|
18
|
-
import { Calendar } from './component/calendar/calendar';
|
|
19
|
-
import { InfiniteScroll } from './component/infinite-scroll/infinite-scroll';
|
|
20
|
-
import { Rating } from './component/rating/rating';
|
|
21
|
-
import { ProgressCircle } from './component/progress-circle/progress-circle';
|
|
22
|
-
import { CustomSlider } from './component/slider/slider';
|
|
23
|
-
import { ToastContainer } from 'react-toastify';
|
|
24
|
-
import { Button } from './component/button/button';
|
|
25
|
-
import { Tag } from './component/tag/tag';
|
|
26
|
-
import { Winicon } from './component/wini-icon/winicon';
|
|
27
|
-
import { NumberPicker } from './component/number-picker/number-picker';
|
|
28
|
-
import { InputOtp } from './component/input-otp/input-otp';
|
|
29
|
-
import { WLoginView } from './form/login/view';
|
|
30
|
-
import { CustomCkEditor5 } from './component/ck-editor/ckeditor';
|
|
31
|
-
export { Calendar, ComponentStatus, getStatusIcon, Checkbox, Select1, Switch, Popup, showPopup, closePopup, Dialog, showDialog, DialogAlignment, DateTimePicker, SelectMultiple, ProgressBar, Text, Pagination, Table, TbCell, TbHeader, TbBody, TbRow, CellAlignItems, TextField, RadioButton, TextArea, ImportFile, ToastMessage, InfiniteScroll, Rating, ProgressCircle, CustomSlider, ToastContainer, Button, Tag, Winicon, NumberPicker, InputOtp, WLoginView, CustomCkEditor5 };
|
|
32
|
-
export type { OptionsItem };
|
|
33
|
-
export { i18n } from './language/i18n';
|