wini-web-components 2.5.9 → 2.6.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.
Files changed (34) hide show
  1. package/dist/component/button/button.js +9 -29
  2. package/dist/component/calendar/calendar.js +140 -173
  3. package/dist/component/checkbox/checkbox.js +26 -56
  4. package/dist/component/ck-editor/ckeditor.js +18 -29
  5. package/dist/component/component-status.js +6 -6
  6. package/dist/component/date-picker/date-picker.js +141 -174
  7. package/dist/component/dialog/dialog.js +37 -67
  8. package/dist/component/import-file/import-file.js +67 -106
  9. package/dist/component/infinite-scroll/infinite-scroll.js +17 -83
  10. package/dist/component/input-multi-select/input-multi-select.js +102 -178
  11. package/dist/component/input-otp/input-otp.js +29 -69
  12. package/dist/component/number-picker/number-picker.js +21 -33
  13. package/dist/component/pagination/pagination.js +19 -22
  14. package/dist/component/popup/popup.d.ts +2 -1
  15. package/dist/component/popup/popup.js +44 -70
  16. package/dist/component/progress-bar/progress-bar.js +12 -24
  17. package/dist/component/progress-circle/progress-circle.js +8 -19
  18. package/dist/component/radio-button/radio-button.js +11 -42
  19. package/dist/component/rating/rating.js +29 -48
  20. package/dist/component/select1/select1.js +91 -160
  21. package/dist/component/slider/slider.js +36 -54
  22. package/dist/component/switch/switch.js +22 -52
  23. package/dist/component/table/table.js +36 -89
  24. package/dist/component/tag/tag.js +8 -28
  25. package/dist/component/text/text.js +9 -40
  26. package/dist/component/text-area/text-area.js +12 -41
  27. package/dist/component/text-field/text-field.js +17 -47
  28. package/dist/component/toast-noti/toast-noti.js +7 -10
  29. package/dist/component/wini-icon/winicon.js +55 -113
  30. package/dist/form/login/view.js +28 -28
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.LICENSE.txt +1 -11
  33. package/dist/language/i18n.js +4 -4
  34. package/package.json +1 -1
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -52,92 +41,45 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
52
41
  step((generator = generator.apply(thisArg, _arguments || [])).next());
53
42
  });
54
43
  };
55
- var __generator = (this && this.__generator) || function (thisArg, body) {
56
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
57
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
58
- function verb(n) { return function (v) { return step([n, v]); }; }
59
- function step(op) {
60
- if (f) throw new TypeError("Generator is already executing.");
61
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
62
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
63
- if (y = 0, t) op = [op[0] & 2, t.value];
64
- switch (op[0]) {
65
- case 0: case 1: t = op; break;
66
- case 4: _.label++; return { value: op[1], done: false };
67
- case 5: _.label++; y = op[1]; op = [0]; continue;
68
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
69
- default:
70
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
71
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
72
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
73
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
74
- if (t[2]) _.ops.pop();
75
- _.trys.pop(); continue;
76
- }
77
- op = body.call(thisArg, _);
78
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
79
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
80
- }
81
- };
82
44
  var __importDefault = (this && this.__importDefault) || function (mod) {
83
45
  return (mod && mod.__esModule) ? mod : { "default": mod };
84
46
  };
85
47
  Object.defineProperty(exports, "__esModule", { value: true });
86
48
  exports.Winicon = Winicon;
87
- var react_dom_1 = __importDefault(require("react-dom"));
88
- var react_1 = __importStar(require("react"));
89
- var winicon_module_css_1 = __importDefault(require("./winicon.module.css"));
90
- var text_1 = require("../text/text");
91
- function Winicon(_a) {
92
- var _this = this;
93
- var id = _a.id, src = _a.src, link = _a.link, className = _a.className, style = _a.style, size = _a.size, color = _a.color, alt = _a.alt, onClick = _a.onClick, tooltip = _a.tooltip;
94
- var ref = (0, react_1.useRef)(null);
95
- var _b = (0, react_1.useState)(), svgData = _b[0], setSvgData = _b[1];
96
- var _c = (0, react_1.useState)(false), showTooltip = _c[0], setShowTooltip = _c[1];
97
- var cdnSrc = "https://cdn.jsdelivr.net/gh/WiniGit/icon-library@latest/";
98
- var extendAttribute = (0, react_1.useMemo)(function () {
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)(() => {
99
59
  if (tooltip)
100
60
  return {
101
61
  "tooltip-value": tooltip,
102
- onMouseOver: function () { setShowTooltip(true); },
103
- onMouseOut: function () { setShowTooltip(false); }
62
+ onMouseOver: () => { setShowTooltip(true); },
63
+ onMouseOut: () => { setShowTooltip(false); }
104
64
  };
105
65
  return {};
106
66
  }, [tooltip]);
107
- (0, react_1.useEffect)(function () {
67
+ (0, react_1.useEffect)(() => {
108
68
  if (src) {
109
- fetch(cdnSrc + src + ".svg").then(function (res) { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) {
110
- switch (_b.label) {
111
- case 0:
112
- _a = setSvgData;
113
- return [4 /*yield*/, res.text()];
114
- case 1:
115
- _a.apply(void 0, [_b.sent()]);
116
- return [2 /*return*/];
117
- }
118
- }); }); }).catch(function () { setSvgData(alt !== null && alt !== void 0 ? alt : "error"); });
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"); });
119
70
  }
120
71
  else if (link) {
121
- fetch(link).then(function (res) { return __awaiter(_this, void 0, void 0, function () { var _a; return __generator(this, function (_b) {
122
- switch (_b.label) {
123
- case 0:
124
- _a = setSvgData;
125
- return [4 /*yield*/, res.text()];
126
- case 1:
127
- _a.apply(void 0, [_b.sent()]);
128
- return [2 /*return*/];
129
- }
130
- }); }); });
72
+ fetch(link).then((res) => __awaiter(this, void 0, void 0, function* () { setSvgData(yield res.text()); }));
131
73
  }
132
74
  }, [src, link]);
133
75
  return react_1.default.createElement(react_1.default.Fragment, null,
134
- react_1.default.createElement("div", __assign({ ref: ref, id: id, onClick: onClick, className: "".concat(winicon_module_css_1.default['wini-icon'], " ").concat(svgData ? "" : "skeleton-loading", " ").concat(onClick ? winicon_module_css_1.default['clickable'] : '', " ").concat(className !== null && className !== void 0 ? className : '', " ").concat(src ? src.split("/").map(function (e, i) { return i === 0 ? "".concat(e, "-icon") : e.replace(" ", "-"); }).join(" ") : '').concat(link ? ' link-icon' : ""), style: (style ? __assign(__assign({}, style), { '--size': size, '--color': color }) : { '--size': size, '--color': color }), dangerouslySetInnerHTML: { __html: svgData !== null && svgData !== void 0 ? svgData : '' } }, extendAttribute)),
135
- tooltip && showTooltip && react_dom_1.default.createPortal((function () {
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((() => {
136
78
  var _a;
137
79
  if (!ref.current)
138
80
  return null;
139
- var rect = ref.current.getBoundingClientRect();
140
- var pos = (_a = tooltip.position) !== null && _a !== void 0 ? _a : "bottom";
81
+ const rect = ref.current.getBoundingClientRect();
82
+ let pos = (_a = tooltip.position) !== null && _a !== void 0 ? _a : "bottom";
141
83
  if (document.body.offsetHeight - rect.bottom < 100 && pos === "bottom")
142
84
  pos = "top";
143
85
  else if (rect.top < 100 && pos === "top")
@@ -148,85 +90,85 @@ function Winicon(_a) {
148
90
  pos = "right";
149
91
  switch (pos) {
150
92
  case "top":
151
- return react_1.default.createElement("div", { ref: function (r) {
93
+ return react_1.default.createElement("div", { ref: r => {
152
94
  if (r) {
153
- var _r = r.getBoundingClientRect();
95
+ const _r = r.getBoundingClientRect();
154
96
  if (_r.x < 0) {
155
- r.style.left = "0px";
156
- r.style.transform = "translateX(0)";
97
+ r.style.left = (rect.x + rect.width / 2) + "px";
98
+ r.style.transform = "translateX(-1.8rem)";
157
99
  r.style.alignItems = "start";
158
100
  }
159
101
  else if (_r.right > document.body.offsetWidth) {
160
102
  r.style.left = "unset";
161
- r.style.right = "0px";
162
- r.style.transform = "translateX(0)";
103
+ r.style.right = (document.body.offsetWidth - rect.right - rect.width / 2) + "px";
104
+ r.style.transform = "translateX(-1.4rem)";
163
105
  r.style.alignItems = "end";
164
106
  }
165
107
  }
166
- }, className: "col ".concat(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%)" } },
167
- react_1.default.createElement(text_1.Text, { className: "body-3 ".concat(winicon_module_css_1.default['tooltip-message']), maxLine: 2 }, tooltip.message),
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),
168
110
  react_1.default.createElement("div", { className: "row", style: { padding: "0 1.2rem", transform: "translateY(-0.2rem)" } },
169
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 } })));
170
112
  case "bottom":
171
- return react_1.default.createElement("div", { ref: function (r) {
113
+ return react_1.default.createElement("div", { ref: r => {
172
114
  if (r) {
173
- var _r = r.getBoundingClientRect();
115
+ const _r = r.getBoundingClientRect();
174
116
  if (_r.x < 0) {
175
- r.style.left = "0px";
176
- r.style.transform = "translateX(0)";
117
+ r.style.left = (rect.x + rect.width / 2) + "px";
118
+ r.style.transform = "translateX(-1.8rem)";
177
119
  r.style.alignItems = "start";
178
120
  }
179
121
  else if (_r.right > document.body.offsetWidth) {
180
122
  r.style.left = "unset";
181
- r.style.right = "0px";
182
- r.style.transform = "translateX(0)";
123
+ r.style.right = (document.body.offsetWidth - rect.right - rect.width / 2) + "px";
124
+ r.style.transform = "translateX(-1.4rem)";
183
125
  r.style.alignItems = "end";
184
126
  }
185
127
  }
186
- }, className: "col ".concat(winicon_module_css_1.default['tooltip-container']), style: { alignItems: "center", top: rect.bottom + 4, left: rect.left + (rect.width / 2), transform: "translateX(-50%)" } },
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%)" } },
187
129
  react_1.default.createElement("div", { className: "row", style: { padding: "0 1.2rem", transform: "translateY(0.2rem)" } },
188
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 } })),
189
- react_1.default.createElement(text_1.Text, { className: "body-3 ".concat(winicon_module_css_1.default['tooltip-message']), maxLine: 2 }, tooltip.message));
131
+ react_1.default.createElement(text_1.Text, { className: `body-3 ${winicon_module_css_1.default['tooltip-message']}`, maxLine: 2 }, tooltip.message));
190
132
  case "left":
191
- return react_1.default.createElement("div", { ref: function (r) {
133
+ return react_1.default.createElement("div", { ref: r => {
192
134
  if (r) {
193
- var _r = r.getBoundingClientRect();
135
+ const _r = r.getBoundingClientRect();
194
136
  if (_r.y < 0) {
195
- r.style.top = "0px";
196
- r.style.transform = "translateY(0)";
137
+ r.style.top = (rect.y + rect.height / 2) + "px";
138
+ r.style.transform = "translateY(-1.8rem)";
197
139
  r.style.alignItems = "start";
198
140
  }
199
- else if (_r.right > document.body.offsetWidth) {
141
+ else if (_r.bottom > document.body.offsetHeight) {
200
142
  r.style.top = "unset";
201
- r.style.bottom = "0px";
202
- r.style.transform = "translateY(0)";
143
+ r.style.bottom = (document.body.offsetHeight - rect.bottom - rect.height / 2) + "px";
144
+ r.style.transform = "translateY(-1.4rem)";
203
145
  r.style.alignItems = "end";
204
146
  }
205
147
  }
206
- }, className: "row ".concat(winicon_module_css_1.default['tooltip-container']), style: { top: rect.top + (rect.height / 2), right: document.body.offsetWidth - rect.left - 4, transform: "translateY(-50%)" } },
207
- react_1.default.createElement(text_1.Text, { className: "body-3 ".concat(winicon_module_css_1.default['tooltip-message']), maxLine: 2 }, tooltip.message),
208
- react_1.default.createElement("div", { className: "row", style: { padding: "0 1.2rem", transform: "translateX(-0.2rem)" } },
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)" } },
209
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 } })));
210
152
  case "right":
211
- return react_1.default.createElement("div", { ref: function (r) {
153
+ return react_1.default.createElement("div", { ref: r => {
212
154
  if (r) {
213
- var _r = r.getBoundingClientRect();
155
+ const _r = r.getBoundingClientRect();
214
156
  if (_r.y < 0) {
215
- r.style.top = "0px";
216
- r.style.transform = "translateY(0)";
157
+ r.style.top = (rect.y + rect.height / 2) + "px";
158
+ r.style.transform = "translateY(-1.8rem)";
217
159
  r.style.alignItems = "start";
218
160
  }
219
- else if (_r.right > document.body.offsetWidth) {
161
+ else if (_r.bottom > document.body.offsetHeight) {
220
162
  r.style.top = "unset";
221
- r.style.bottom = "0px";
222
- r.style.transform = "translateY(0)";
163
+ r.style.bottom = (document.body.offsetHeight - rect.bottom - rect.height / 2) + "px";
164
+ r.style.transform = "translateY(-1.4rem)";
223
165
  r.style.alignItems = "end";
224
166
  }
225
167
  }
226
- }, className: "row ".concat(winicon_module_css_1.default['tooltip-container']), style: { top: rect.top + (rect.height / 2), left: rect.right + 4, transform: "translateY(-50%)" } },
227
- react_1.default.createElement("div", { className: "row", style: { padding: "0 1.2rem", transform: "translateX(0.2rem)" } },
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)" } },
228
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 } })),
229
- react_1.default.createElement(text_1.Text, { className: "body-3 ".concat(winicon_module_css_1.default['tooltip-message']), maxLine: 2 }, tooltip.message));
171
+ react_1.default.createElement(text_1.Text, { className: `body-3 ${winicon_module_css_1.default['tooltip-message']}`, maxLine: 2 }, tooltip.message));
230
172
  default:
231
173
  return react_1.default.createElement("div", null);
232
174
  }
@@ -4,39 +4,39 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.WLoginView = WLoginView;
7
- var react_1 = __importDefault(require("react"));
8
- var index_1 = require("../../index");
9
- var view_module_css_1 = __importDefault(require("./view.module.css"));
10
- var react_hook_form_1 = require("react-hook-form");
11
- var react_2 = require("react");
12
- var react_i18next_1 = require("react-i18next");
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
13
  function WLoginView(props) {
14
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
- var methods = (0, react_hook_form_1.useForm)({ shouldFocusError: false });
16
- var _y = (0, react_2.useState)(false), isShowPass = _y[0], setShowPass = _y[1];
17
- var t = (0, react_i18next_1.useTranslation)().t;
18
- var _onSubmit = function (ev) {
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
19
  if (props.onSubmit)
20
20
  props.onSubmit(ev, methods);
21
21
  };
22
- return react_1.default.createElement("form", { id: props.id, className: "col login-view-container ".concat(view_module_css_1.default['login-view-container'], " ").concat((_a = props.className) !== null && _a !== void 0 ? _a : ''), style: props.style },
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
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 ".concat(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 : "".concat(t("loginTo"), " Wini")),
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
26
  react_1.default.createElement("div", { className: 'col' },
27
27
  react_1.default.createElement("div", { className: 'col', style: { gap: "0.8rem", overflow: "visible" } },
28
28
  react_1.default.createElement(index_1.Text, { className: 'label-3' }, (_c = props.formData.username.label) !== null && _c !== void 0 ? _c : t("username")),
29
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: function (ev) { ev.target.value = ev.target.value.trim(); },
30
+ onChange: (ev) => { ev.target.value = ev.target.value.trim(); },
31
31
  onBlur: props.formData.username.onValidate
32
- }), onComplete: function (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 })),
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
33
  react_1.default.createElement("div", { className: 'col', style: { gap: "0.8rem", overflow: "visible" } },
34
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: function () { setShowPass(!isShowPass); } },
36
- react_1.default.createElement(index_1.Winicon, { src: "outline/user interface/".concat(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: function (ev) { ev.target.value = ev.target.value.trim(); },
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
38
  onBlur: props.formData.password.onValidate
39
- }), onComplete: function (ev) {
39
+ }), onComplete: (ev) => {
40
40
  var _a, _b, _c;
41
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
42
  ev.target.blur();
@@ -46,21 +46,21 @@ function WLoginView(props) {
46
46
  else
47
47
  ev.target.blur();
48
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 ".concat(view_module_css_1.default['forgot-password-btn']), onClick: props.onForgotPassword }, (_o = props.forgotPasswordText) !== null && _o !== void 0 ? _o : t("forgotPassword")),
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
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 ".concat(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") }),
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
52
  react_1.default.createElement("div", { className: 'row', style: { justifyContent: "center", gap: "0.4rem" } },
53
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 ".concat(view_module_css_1.default['register-btn']), onClick: props.onRegister }, (_w = props.registerText) !== null && _w !== void 0 ? _w : "".concat(t("signupFor"), " Wini")))),
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
55
  (props.loginWithGoogle || props.loginWithFacebook || props.loginWithApple || props.loginWithMicrosoft) ?
56
56
  react_1.default.createElement(react_1.default.Fragment, null,
57
- react_1.default.createElement("div", { className: "row ".concat(view_module_css_1.default['or-spacing']) },
57
+ react_1.default.createElement("div", { className: `row ${view_module_css_1.default['or-spacing']}` },
58
58
  react_1.default.createElement("div", null),
59
59
  react_1.default.createElement(index_1.Text, { className: "label-4" }, (_x = props.orText) !== null && _x !== void 0 ? _x : t("or")),
60
60
  react_1.default.createElement("div", null)),
61
- react_1.default.createElement("div", { className: "row ".concat(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)));
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
66
  }