wini-web-components 2.6.0 → 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.
- package/dist/component/button/button.js +9 -29
- package/dist/component/calendar/calendar.js +140 -173
- package/dist/component/checkbox/checkbox.js +26 -56
- package/dist/component/ck-editor/ckeditor.js +18 -29
- package/dist/component/component-status.js +6 -6
- package/dist/component/date-picker/date-picker.js +141 -174
- package/dist/component/dialog/dialog.js +37 -67
- package/dist/component/import-file/import-file.js +67 -106
- package/dist/component/infinite-scroll/infinite-scroll.js +17 -83
- package/dist/component/input-multi-select/input-multi-select.js +102 -178
- package/dist/component/input-otp/input-otp.js +29 -69
- package/dist/component/number-picker/number-picker.js +21 -33
- package/dist/component/pagination/pagination.js +19 -22
- package/dist/component/popup/popup.d.ts +2 -1
- package/dist/component/popup/popup.js +44 -70
- package/dist/component/progress-bar/progress-bar.js +12 -24
- package/dist/component/progress-circle/progress-circle.js +8 -19
- package/dist/component/radio-button/radio-button.js +11 -42
- package/dist/component/rating/rating.js +29 -48
- package/dist/component/select1/select1.js +91 -160
- package/dist/component/slider/slider.js +36 -54
- package/dist/component/switch/switch.js +22 -52
- package/dist/component/table/table.js +36 -89
- package/dist/component/tag/tag.js +8 -28
- package/dist/component/text/text.js +9 -40
- package/dist/component/text-area/text-area.js +12 -41
- package/dist/component/text-field/text-field.js +17 -47
- package/dist/component/toast-noti/toast-noti.js +7 -10
- package/dist/component/wini-icon/winicon.js +55 -113
- package/dist/form/login/view.js +28 -28
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +1 -11
- package/dist/language/i18n.js +4 -4
- package/package.json +1 -1
|
@@ -1,62 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
4
|
};
|
|
31
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
6
|
exports.Switch = void 0;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
function Switch() {
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const switch_module_css_1 = __importDefault(require("./switch.module.css"));
|
|
9
|
+
class Switch extends react_1.default.Component {
|
|
10
|
+
constructor() {
|
|
38
11
|
var _a;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
value: (_a =
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.state = {
|
|
14
|
+
value: (_a = this.props.value) !== null && _a !== void 0 ? _a : false
|
|
42
15
|
};
|
|
43
|
-
return _this;
|
|
44
16
|
}
|
|
45
|
-
|
|
17
|
+
componentDidUpdate(prevProps) {
|
|
46
18
|
if (prevProps.value !== this.props.value) {
|
|
47
19
|
this.setState({ value: this.props.value });
|
|
48
20
|
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
var _this = this;
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
52
23
|
var _a, _b, _c, _d, _e;
|
|
53
|
-
|
|
24
|
+
const propStyle = {
|
|
54
25
|
'--off-bg': (_a = this.props.offBackground) !== null && _a !== void 0 ? _a : 'var(--neutral-main-background-color)',
|
|
55
26
|
'--on-bg': (_b = this.props.onBackground) !== null && _b !== void 0 ? _b : 'var(--primary-main-color)',
|
|
56
27
|
'--dot-color': (_c = this.props.dotColor) !== null && _c !== void 0 ? _c : '#ffffff',
|
|
57
|
-
'--size': this.props.size ? (typeof this.props.size === 'number') ?
|
|
28
|
+
'--size': this.props.size ? (typeof this.props.size === 'number') ? `${this.props.size}px` : this.props.size : '2rem'
|
|
58
29
|
};
|
|
59
|
-
|
|
30
|
+
let convertStyle = Object.assign({ height: (_d = this.props.size) !== null && _d !== void 0 ? _d : '2rem', width: `calc(${this.props.size ? (typeof this.props.size === 'number') ? `${this.props.size}px` : this.props.size : '2rem'} * 9 / 5)` }, propStyle);
|
|
60
31
|
if (this.props.style) {
|
|
61
32
|
delete this.props.style.width;
|
|
62
33
|
delete this.props.style.minWidth;
|
|
@@ -64,17 +35,16 @@ var Switch = /** @class */ (function (_super) {
|
|
|
64
35
|
delete this.props.style.height;
|
|
65
36
|
delete this.props.style.minHeight;
|
|
66
37
|
delete this.props.style.maxHeight;
|
|
67
|
-
convertStyle =
|
|
38
|
+
convertStyle = Object.assign(Object.assign({}, this.props.style), convertStyle);
|
|
68
39
|
}
|
|
69
|
-
return react_1.default.createElement("label", { id: this.props.id, className:
|
|
70
|
-
react_1.default.createElement("input", { type: "checkbox", checked: this.state.value, name: this.props.name, disabled: this.props.disabled, onChange:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
|
|
40
|
+
return react_1.default.createElement("label", { id: this.props.id, className: `${switch_module_css_1.default['switch-container']} row ${(_e = this.props.className) !== null && _e !== void 0 ? _e : ''}`, style: convertStyle },
|
|
41
|
+
react_1.default.createElement("input", { type: "checkbox", checked: this.state.value, name: this.props.name, disabled: this.props.disabled, onChange: () => {
|
|
42
|
+
const newValue = !this.state.value;
|
|
43
|
+
this.setState({ value: newValue });
|
|
44
|
+
if (this.props.onChange)
|
|
45
|
+
this.props.onChange(newValue);
|
|
75
46
|
} }),
|
|
76
47
|
react_1.default.createElement("span", { className: switch_module_css_1.default['slider'] }));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
}(react_1.default.Component));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
80
50
|
exports.Switch = Switch;
|
|
@@ -1,36 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
4
|
};
|
|
31
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
6
|
exports.Table = exports.TbBody = exports.TbHeader = exports.TbRow = exports.TbCell = exports.CellAlignItems = void 0;
|
|
33
|
-
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
34
8
|
require("./table.css");
|
|
35
9
|
var CellAlignItems;
|
|
36
10
|
(function (CellAlignItems) {
|
|
@@ -38,82 +12,55 @@ var CellAlignItems;
|
|
|
38
12
|
CellAlignItems["center"] = "center";
|
|
39
13
|
CellAlignItems["end"] = "end";
|
|
40
14
|
})(CellAlignItems || (exports.CellAlignItems = CellAlignItems = {}));
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
function TbCell() {
|
|
44
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
45
|
-
}
|
|
46
|
-
TbCell.prototype.render = function () {
|
|
15
|
+
class TbCell extends react_1.default.Component {
|
|
16
|
+
render() {
|
|
47
17
|
var _a, _b;
|
|
48
|
-
return react_1.default.createElement("td", { id: this.props.id, onClick: this.props.onClick, style: this.props.style, "align-cell": (_a = this.props.align) !== null && _a !== void 0 ? _a : CellAlignItems.start, className:
|
|
49
|
-
};
|
|
50
|
-
return TbCell;
|
|
51
|
-
}(react_1.default.Component));
|
|
52
|
-
exports.TbCell = TbCell;
|
|
53
|
-
var TbRow = /** @class */ (function (_super) {
|
|
54
|
-
__extends(TbRow, _super);
|
|
55
|
-
function TbRow() {
|
|
56
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
18
|
+
return react_1.default.createElement("td", { id: this.props.id, onClick: this.props.onClick, style: this.props.style, "align-cell": (_a = this.props.align) !== null && _a !== void 0 ? _a : CellAlignItems.start, className: `tb-cell ${(_b = this.props.className) !== null && _b !== void 0 ? _b : ''} ${this.props.fixed ? 'tb-cell-fixed' : ''}` }, this.props.children);
|
|
57
19
|
}
|
|
58
|
-
|
|
59
|
-
|
|
20
|
+
}
|
|
21
|
+
exports.TbCell = TbCell;
|
|
22
|
+
class TbRow extends react_1.default.Component {
|
|
23
|
+
render() {
|
|
60
24
|
var _a, _b;
|
|
61
|
-
return react_1.default.createElement("tr", { id: this.props.id, style: this.props.style, className:
|
|
25
|
+
return react_1.default.createElement("tr", { id: this.props.id, style: this.props.style, className: `tb-row ${(_a = this.props.className) !== null && _a !== void 0 ? _a : ""}`, onClick: this.props.onClick }, ((_b = this.props.children) !== null && _b !== void 0 ? _b : []).map((e, i) => {
|
|
62
26
|
var _a, _b;
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
ox =
|
|
27
|
+
let ox = 0;
|
|
28
|
+
if (this.props.children && i > 0 && i < (this.props.children.length - 1)) {
|
|
29
|
+
ox = `calc(${this.props.children.slice(0, i).map(tb => {
|
|
66
30
|
var _a, _b, _c;
|
|
67
|
-
|
|
68
|
-
return wValue ? typeof wValue === 'number' ?
|
|
69
|
-
}).join(" + ")
|
|
31
|
+
const wValue = (_b = (_a = tb.props.style) === null || _a === void 0 ? void 0 : _a.minWidth) !== null && _b !== void 0 ? _b : (_c = tb.props.style) === null || _c === void 0 ? void 0 : _c.width;
|
|
32
|
+
return wValue ? typeof wValue === 'number' ? `${wValue}px` : wValue : '60px';
|
|
33
|
+
}).join(" + ")})`;
|
|
70
34
|
}
|
|
71
|
-
return react_1.default.createElement(TbCell, { id: e.props.id, key:
|
|
35
|
+
return react_1.default.createElement(TbCell, { id: e.props.id, key: `tb-cell-${i}`, align: e.props.align, children: e.props.children, fixed: e.props.fixed, onClick: e.props.onClick, style: e.props.fixed ? (this.props.children && i === this.props.children.length - 1) ? Object.assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : Object.assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
|
|
72
36
|
}));
|
|
73
|
-
};
|
|
74
|
-
return TbRow;
|
|
75
|
-
}(react_1.default.Component));
|
|
76
|
-
exports.TbRow = TbRow;
|
|
77
|
-
var TbHeader = /** @class */ (function (_super) {
|
|
78
|
-
__extends(TbHeader, _super);
|
|
79
|
-
function TbHeader() {
|
|
80
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
81
37
|
}
|
|
82
|
-
|
|
83
|
-
|
|
38
|
+
}
|
|
39
|
+
exports.TbRow = TbRow;
|
|
40
|
+
class TbHeader extends react_1.default.Component {
|
|
41
|
+
render() {
|
|
84
42
|
var _a, _b;
|
|
85
|
-
return react_1.default.createElement("thead", { style: this.props.style, className:
|
|
86
|
-
react_1.default.createElement("tr", null, ((_b = this.props.children) !== null && _b !== void 0 ? _b : []).map(
|
|
43
|
+
return react_1.default.createElement("thead", { style: this.props.style, className: `tb-header ${(_a = this.props.className) !== null && _a !== void 0 ? _a : ""}` },
|
|
44
|
+
react_1.default.createElement("tr", null, ((_b = this.props.children) !== null && _b !== void 0 ? _b : []).map((e, i) => {
|
|
87
45
|
var _a, _b;
|
|
88
|
-
|
|
89
|
-
if (
|
|
90
|
-
ox =
|
|
46
|
+
let ox = 0;
|
|
47
|
+
if (this.props.children && i > 0 && i < (this.props.children.length - 1)) {
|
|
48
|
+
ox = `calc(${this.props.children.slice(0, i).map(tb => { var _a; return ((_a = tb.props.style) === null || _a === void 0 ? void 0 : _a.width) ? typeof tb.props.style.width === 'number' ? `${tb.props.style.width}px` : tb.props.style.width : '60px'; }).join(" + ")})`;
|
|
91
49
|
}
|
|
92
|
-
return react_1.default.createElement(TbCell, { id: e.props.id, key:
|
|
50
|
+
return react_1.default.createElement(TbCell, { id: e.props.id, key: `tb-cell-${i}`, align: e.props.align, children: e.props.children, onClick: e.props.onClick, fixed: e.props.fixed, style: e.props.fixed ? (this.props.children && i === this.props.children.length - 1) ? Object.assign({ right: 0 }, ((_a = e.props.style) !== null && _a !== void 0 ? _a : {})) : Object.assign({ left: ox }, ((_b = e.props.style) !== null && _b !== void 0 ? _b : {})) : e.props.style, className: e.props.className });
|
|
93
51
|
})));
|
|
94
|
-
};
|
|
95
|
-
return TbHeader;
|
|
96
|
-
}(react_1.default.Component));
|
|
97
|
-
exports.TbHeader = TbHeader;
|
|
98
|
-
var TbBody = /** @class */ (function (_super) {
|
|
99
|
-
__extends(TbBody, _super);
|
|
100
|
-
function TbBody() {
|
|
101
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
102
52
|
}
|
|
103
|
-
|
|
53
|
+
}
|
|
54
|
+
exports.TbHeader = TbHeader;
|
|
55
|
+
class TbBody extends react_1.default.Component {
|
|
56
|
+
render() {
|
|
104
57
|
return react_1.default.createElement("tbody", { id: this.props.id }, this.props.children);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
}(react_1.default.Component));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
108
60
|
exports.TbBody = TbBody;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
61
|
+
class Table extends react_1.default.Component {
|
|
62
|
+
render() {
|
|
63
|
+
return react_1.default.createElement("table", { id: this.props.id, className: `custom-table ${this.props.className}`, style: this.props.style }, this.props.children);
|
|
113
64
|
}
|
|
114
|
-
|
|
115
|
-
return react_1.default.createElement("table", { id: this.props.id, className: "custom-table ".concat(this.props.className), style: this.props.style }, this.props.children);
|
|
116
|
-
};
|
|
117
|
-
return Table;
|
|
118
|
-
}(react_1.default.Component));
|
|
65
|
+
}
|
|
119
66
|
exports.Table = Table;
|
|
@@ -1,39 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
4
|
};
|
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
6
|
exports.Tag = void 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
function Tag() {
|
|
28
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
-
}
|
|
30
|
-
Tag.prototype.render = function () {
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const text_1 = require("../text/text");
|
|
9
|
+
const tag_module_css_1 = __importDefault(require("./tag.module.css"));
|
|
10
|
+
class Tag extends react_1.default.Component {
|
|
11
|
+
render() {
|
|
31
12
|
var _a, _b;
|
|
32
|
-
return react_1.default.createElement("div", { id: this.props.id, "tag-type": (_a = this.props.status) !== null && _a !== void 0 ? _a : 'default', className:
|
|
13
|
+
return react_1.default.createElement("div", { id: this.props.id, "tag-type": (_a = this.props.status) !== null && _a !== void 0 ? _a : 'default', className: `${tag_module_css_1.default['tag-container']} row ${this.props.onClick ? tag_module_css_1.default['type-button'] : ''} ${this.props.disabled ? tag_module_css_1.default['disabled'] : ""} ${(_b = this.props.className) !== null && _b !== void 0 ? _b : "button-text-6"} `, style: this.props.style, onClick: this.props.onClick },
|
|
33
14
|
this.props.prefix,
|
|
34
15
|
react_1.default.createElement(text_1.Text, { maxLine: 1, className: tag_module_css_1.default['tag-label'] }, this.props.title),
|
|
35
16
|
this.props.suffix);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}(react_1.default.Component));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
39
19
|
exports.Tag = Tag;
|
|
@@ -1,51 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
4
|
};
|
|
31
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
6
|
exports.Text = void 0;
|
|
33
|
-
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
34
8
|
require("./text.css");
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
function Text() {
|
|
38
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
39
|
-
}
|
|
40
|
-
Text.prototype.render = function () {
|
|
9
|
+
class Text extends react_1.default.Component {
|
|
10
|
+
render() {
|
|
41
11
|
var _a, _b, _c;
|
|
42
|
-
|
|
12
|
+
let convertStyle = (_a = this.props.style) !== null && _a !== void 0 ? _a : {};
|
|
43
13
|
if (this.props.maxLine) {
|
|
44
|
-
convertStyle =
|
|
14
|
+
convertStyle = Object.assign(Object.assign({}, convertStyle), { '--max-line': this.props.maxLine });
|
|
45
15
|
}
|
|
46
|
-
return this.props.html ? react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: this.props.html }, id: this.props.id, onMouseOver: this.props.onHover, onClick: this.props.onClick, className:
|
|
47
|
-
react_1.default.createElement("div", { id: this.props.id, onMouseOver: this.props.onHover, onClick: this.props.onClick, className:
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
}(react_1.default.Component));
|
|
16
|
+
return this.props.html ? react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: this.props.html }, id: this.props.id, onMouseOver: this.props.onHover, onClick: this.props.onClick, className: `comp-text innerhtml ${this.props.onClick ? 'type-button' : ''} ${(_b = this.props.className) !== null && _b !== void 0 ? _b : ''}`, style: convertStyle }) :
|
|
17
|
+
react_1.default.createElement("div", { id: this.props.id, onMouseOver: this.props.onHover, onClick: this.props.onClick, className: `comp-text ${this.props.onClick ? 'type-button' : ''} ${(_c = this.props.className) !== null && _c !== void 0 ? _c : ''}`, style: convertStyle }, this.props.children);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
51
20
|
exports.Text = Text;
|
|
@@ -1,30 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
3
|
if (k2 === undefined) k2 = k;
|
|
30
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -60,24 +34,21 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
60
34
|
})();
|
|
61
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
36
|
exports.TextArea = void 0;
|
|
63
|
-
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
64
38
|
require("./text-area.css");
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
_this.getTextarea = function () {
|
|
39
|
+
class TextArea extends react_1.default.Component {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.containerRef = (0, react_1.createRef)();
|
|
43
|
+
this.getTextarea = () => {
|
|
71
44
|
var _a;
|
|
72
|
-
return (_a =
|
|
45
|
+
return (_a = this.containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("textarea");
|
|
73
46
|
};
|
|
74
|
-
return _this;
|
|
75
47
|
}
|
|
76
|
-
|
|
48
|
+
render() {
|
|
77
49
|
var _a, _b, _c, _d;
|
|
78
|
-
return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className:
|
|
79
|
-
react_1.default.createElement("textarea",
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
}(react_1.default.Component));
|
|
50
|
+
return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className: `text-area-container row ${(_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3'} ${((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) && 'helper-text'}`, "helper-text": this.props.helperText, style: this.props.style ? Object.assign(Object.assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } }, this.props.register ?
|
|
51
|
+
react_1.default.createElement("textarea", Object.assign({ name: this.props.name, autoFocus: this.props.autoFocus }, this.props.register, { maxLength: this.props.maxLength, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus })) : react_1.default.createElement("textarea", { autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur }));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
83
54
|
exports.TextArea = TextArea;
|
|
@@ -1,30 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
3
|
if (k2 === undefined) k2 = k;
|
|
30
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -60,40 +34,37 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
60
34
|
})();
|
|
61
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
36
|
exports.TextField = void 0;
|
|
63
|
-
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
64
38
|
require("./text-field.css");
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
_this.getInput = function () {
|
|
39
|
+
class TextField extends react_1.default.Component {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.containerRef = (0, react_1.createRef)();
|
|
43
|
+
this.getInput = () => {
|
|
71
44
|
var _a;
|
|
72
|
-
return (_a =
|
|
45
|
+
return (_a = this.containerRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("input");
|
|
73
46
|
};
|
|
74
|
-
return _this;
|
|
75
47
|
}
|
|
76
|
-
|
|
77
|
-
var _this = this;
|
|
48
|
+
render() {
|
|
78
49
|
var _a, _b, _c, _d, _e, _f;
|
|
79
|
-
return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className:
|
|
50
|
+
return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className: `text-field-container row ${(_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3'} ${((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) ? 'helper-text' : ""}`, "helper-text": this.props.helperText, style: this.props.style ? Object.assign(Object.assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } },
|
|
80
51
|
this.props.prefix,
|
|
81
52
|
this.props.register ?
|
|
82
|
-
react_1.default.createElement("input",
|
|
83
|
-
if (
|
|
53
|
+
react_1.default.createElement("input", Object.assign({ name: this.props.name }, this.props.register, { autoComplete: this.props.autoComplete, autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, type: (_e = this.props.type) !== null && _e !== void 0 ? _e : 'text', placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus, onKeyDown: this.props.onComplete ? (ev) => {
|
|
54
|
+
if (this.props.onComplete) {
|
|
84
55
|
switch (ev.key.toLowerCase()) {
|
|
85
56
|
case "enter":
|
|
86
|
-
|
|
57
|
+
this.props.onComplete(ev);
|
|
87
58
|
break;
|
|
88
59
|
default:
|
|
89
60
|
break;
|
|
90
61
|
}
|
|
91
62
|
}
|
|
92
|
-
} : undefined })) : react_1.default.createElement("input", { autoComplete: this.props.autoComplete, autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, type: (_f = this.props.type) !== null && _f !== void 0 ? _f : 'text', defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur, onKeyDown: this.props.onComplete ?
|
|
93
|
-
if (
|
|
63
|
+
} : undefined })) : react_1.default.createElement("input", { autoComplete: this.props.autoComplete, autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, type: (_f = this.props.type) !== null && _f !== void 0 ? _f : 'text', defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur, onKeyDown: this.props.onComplete ? (ev) => {
|
|
64
|
+
if (this.props.onComplete) {
|
|
94
65
|
switch (ev.key.toLowerCase()) {
|
|
95
66
|
case "enter":
|
|
96
|
-
|
|
67
|
+
this.props.onComplete(ev);
|
|
97
68
|
break;
|
|
98
69
|
default:
|
|
99
70
|
break;
|
|
@@ -101,7 +72,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
101
72
|
}
|
|
102
73
|
} : undefined }),
|
|
103
74
|
this.props.suffix);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
}(react_1.default.Component));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
107
77
|
exports.TextField = TextField;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ToastMessage = void 0;
|
|
4
|
-
|
|
4
|
+
const react_toastify_1 = require("react-toastify");
|
|
5
5
|
require("./toast-noti.css");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
ToastMessage.success = function (message) {
|
|
6
|
+
class ToastMessage {
|
|
7
|
+
static success(message) {
|
|
10
8
|
react_toastify_1.toast.success(message, {
|
|
11
9
|
hideProgressBar: true,
|
|
12
10
|
transition: react_toastify_1.Slide,
|
|
13
11
|
autoClose: 800,
|
|
14
12
|
theme: "colored",
|
|
15
13
|
});
|
|
16
|
-
}
|
|
17
|
-
|
|
14
|
+
}
|
|
15
|
+
static errors(message) {
|
|
18
16
|
react_toastify_1.toast.error(message, {
|
|
19
17
|
theme: "colored",
|
|
20
18
|
pauseOnHover: false,
|
|
@@ -22,7 +20,6 @@ var ToastMessage = /** @class */ (function () {
|
|
|
22
20
|
transition: react_toastify_1.Slide,
|
|
23
21
|
autoClose: 800,
|
|
24
22
|
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}());
|
|
23
|
+
}
|
|
24
|
+
}
|
|
28
25
|
exports.ToastMessage = ToastMessage;
|