wini-web-components 2.2.8 → 2.3.2
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.d.ts +16 -16
- package/dist/component/button/button.js +39 -39
- package/dist/component/calendar/calendar.d.ts +30 -46
- package/dist/component/calendar/calendar.js +437 -432
- package/dist/component/checkbox/checkbox.d.ts +24 -22
- package/dist/component/checkbox/checkbox.js +120 -81
- package/dist/component/component-status.d.ts +8 -8
- package/dist/component/component-status.js +39 -39
- package/dist/component/date-picker/date-picker.d.ts +25 -36
- package/dist/component/date-picker/date-picker.js +362 -359
- package/dist/component/dialog/dialog.d.ts +36 -34
- package/dist/component/dialog/dialog.js +99 -97
- package/dist/component/import-file/import-file.d.ts +24 -36
- package/dist/component/import-file/import-file.js +154 -119
- package/dist/component/infinite-scroll/infinite-scroll.d.ts +17 -17
- package/dist/component/infinite-scroll/infinite-scroll.js +103 -103
- package/dist/component/input-multi-select/input-multi-select.d.ts +21 -38
- package/dist/component/input-multi-select/input-multi-select.js +334 -323
- package/dist/component/input-opt/input-opt.d.ts +21 -21
- package/dist/component/input-opt/input-opt.js +157 -147
- package/dist/component/number-picker/number-picker.d.ts +19 -19
- package/dist/component/number-picker/number-picker.js +137 -127
- package/dist/component/pagination/pagination.d.ts +13 -13
- package/dist/component/pagination/pagination.js +93 -82
- package/dist/component/popup/popup.d.ts +33 -33
- package/dist/component/popup/popup.js +138 -105
- package/dist/component/progress-bar/progress-bar.d.ts +16 -16
- package/dist/component/progress-bar/progress-bar.js +35 -36
- package/dist/component/progress-circle/progress-circle.d.ts +14 -14
- package/dist/component/progress-circle/progress-circle.js +30 -31
- package/dist/component/radio-button/radio-button.d.ts +20 -20
- package/dist/component/radio-button/radio-button.js +64 -64
- package/dist/component/rating/rating.d.ts +23 -23
- package/dist/component/rating/rating.js +73 -74
- package/dist/component/select1/select1.d.ts +31 -50
- package/dist/component/select1/select1.js +320 -309
- package/dist/component/slider/slider.d.ts +31 -31
- package/dist/component/slider/slider.js +80 -81
- package/dist/component/switch/switch.d.ts +23 -23
- package/dist/component/switch/switch.js +80 -81
- package/dist/component/table/table.d.ts +51 -51
- package/dist/component/table/table.js +119 -119
- package/dist/component/tag/tag.d.ts +17 -17
- package/dist/component/tag/tag.js +39 -39
- package/dist/component/text/text.d.ts +16 -16
- package/dist/component/text/text.js +51 -51
- package/dist/component/text-area/text-area.d.ts +28 -28
- package/dist/component/text-area/text-area.js +83 -73
- package/dist/component/text-field/text-field.d.ts +33 -33
- package/dist/component/text-field/text-field.js +107 -97
- package/dist/component/toast-noti/toast-noti.d.ts +5 -5
- package/dist/component/toast-noti/toast-noti.js +28 -28
- package/dist/component/wini-icon/winicon.d.ts +16 -16
- package/dist/component/wini-icon/winicon.js +121 -112
- package/dist/form/login/view.d.ts +40 -40
- package/dist/form/login/view.js +66 -65
- package/dist/i18n.d.ts +2 -0
- package/dist/i18n.js +125 -0
- package/dist/index.d.ts +32 -31
- package/dist/index.js +1 -1
- package/dist/language/i18n.d.ts +2 -0
- package/dist/language/i18n.js +125 -0
- package/package.json +5 -3
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React, { CSSProperties, ReactNode } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
id?: string;
|
|
4
|
-
onChange?: (value: string, target: HTMLDivElement) => void;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
value?: string;
|
|
7
|
-
length?: number;
|
|
8
|
-
inputStyle?: CSSProperties;
|
|
9
|
-
style?: CSSProperties;
|
|
10
|
-
className?: string;
|
|
11
|
-
helperText?: string;
|
|
12
|
-
helperTextColor?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class InputOpt extends React.Component<Props> {
|
|
15
|
-
private containerRef;
|
|
16
|
-
constructor(props: Props | Readonly<Props>);
|
|
17
|
-
getValue: () => string;
|
|
18
|
-
componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
19
|
-
render(): ReactNode;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
1
|
+
import React, { CSSProperties, ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
id?: string;
|
|
4
|
+
onChange?: (value: string, target: HTMLDivElement) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
value?: string;
|
|
7
|
+
length?: number;
|
|
8
|
+
inputStyle?: CSSProperties;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
className?: string;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
helperTextColor?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class InputOpt extends React.Component<Props> {
|
|
15
|
+
private containerRef;
|
|
16
|
+
constructor(props: Props | Readonly<Props>);
|
|
17
|
+
getValue: () => string;
|
|
18
|
+
componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
19
|
+
render(): ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -1,147 +1,157 @@
|
|
|
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
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
|
-
if (k2 === undefined) k2 = k;
|
|
30
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
-
}
|
|
34
|
-
Object.defineProperty(o, k2, desc);
|
|
35
|
-
}) : (function(o, m, k, k2) {
|
|
36
|
-
if (k2 === undefined) k2 = k;
|
|
37
|
-
o[k2] = m[k];
|
|
38
|
-
}));
|
|
39
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
-
}) : function(o, v) {
|
|
42
|
-
o["default"] = v;
|
|
43
|
-
});
|
|
44
|
-
var __importStar = (this && this.__importStar) || function (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
var
|
|
113
|
-
var
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
|
+
if (k2 === undefined) k2 = k;
|
|
30
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(o, k2, desc);
|
|
35
|
+
}) : (function(o, m, k, k2) {
|
|
36
|
+
if (k2 === undefined) k2 = k;
|
|
37
|
+
o[k2] = m[k];
|
|
38
|
+
}));
|
|
39
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
+
}) : function(o, v) {
|
|
42
|
+
o["default"] = v;
|
|
43
|
+
});
|
|
44
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
45
|
+
var ownKeys = function(o) {
|
|
46
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
47
|
+
var ar = [];
|
|
48
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
49
|
+
return ar;
|
|
50
|
+
};
|
|
51
|
+
return ownKeys(o);
|
|
52
|
+
};
|
|
53
|
+
return function (mod) {
|
|
54
|
+
if (mod && mod.__esModule) return mod;
|
|
55
|
+
var result = {};
|
|
56
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
57
|
+
__setModuleDefault(result, mod);
|
|
58
|
+
return result;
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
61
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
62
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
63
|
+
if (ar || !(i in from)) {
|
|
64
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
65
|
+
ar[i] = from[i];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
69
|
+
};
|
|
70
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
71
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
72
|
+
};
|
|
73
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74
|
+
exports.InputOpt = void 0;
|
|
75
|
+
var react_1 = __importStar(require("react"));
|
|
76
|
+
var input_opt_module_css_1 = __importDefault(require("./input-opt.module.css"));
|
|
77
|
+
var InputOpt = /** @class */ (function (_super) {
|
|
78
|
+
__extends(InputOpt, _super);
|
|
79
|
+
function InputOpt(props) {
|
|
80
|
+
var _this = _super.call(this, props) || this;
|
|
81
|
+
_this.containerRef = (0, react_1.createRef)();
|
|
82
|
+
_this.getValue = function () {
|
|
83
|
+
var _a;
|
|
84
|
+
if (_this.containerRef.current)
|
|
85
|
+
return __spreadArray([], _this.containerRef.current.querySelectorAll("input"), true).map(function (v) { return v.value; }).join("");
|
|
86
|
+
else
|
|
87
|
+
return (_a = _this.props.value) !== null && _a !== void 0 ? _a : "";
|
|
88
|
+
};
|
|
89
|
+
_this.getValue = _this.getValue.bind(_this);
|
|
90
|
+
return _this;
|
|
91
|
+
}
|
|
92
|
+
InputOpt.prototype.componentDidUpdate = function (prevProps, prevState, snapshot) {
|
|
93
|
+
var _a;
|
|
94
|
+
if (prevProps.value !== this.props.value && this.containerRef.current) {
|
|
95
|
+
var inputList = __spreadArray([], this.containerRef.current.querySelectorAll("input"), true);
|
|
96
|
+
if ((_a = this.props.value) === null || _a === void 0 ? void 0 : _a.length) {
|
|
97
|
+
for (var i = 0; i < inputList.length; i++)
|
|
98
|
+
inputList[i].value = this.props.value[i];
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
for (var i = 0; i < inputList.length; i++)
|
|
102
|
+
inputList[i].value = "";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
InputOpt.prototype.render = function () {
|
|
107
|
+
var _this = this;
|
|
108
|
+
var _a, _b, _c, _d, _e;
|
|
109
|
+
return react_1.default.createElement("div", { id: this.props.id, ref: this.containerRef, "helper-text": this.props.helperText, style: this.props.style ? __assign(__assign({}, { '--helper-text-color': (_a = this.props.helperTextColor) !== null && _a !== void 0 ? _a : '#e14337' }), this.props.style) : { '--helper-text-color': (_b = this.props.helperTextColor) !== null && _b !== void 0 ? _b : '#e14337' }, className: "row body-1 ".concat(input_opt_module_css_1.default['input-opt-container'], " ").concat(((_c = this.props.helperText) === null || _c === void 0 ? void 0 : _c.length) && 'helper-text', " ").concat((_d = this.props.className) !== null && _d !== void 0 ? _d : ''), onMouseDown: function (ev) {
|
|
110
|
+
ev.stopPropagation();
|
|
111
|
+
ev.preventDefault();
|
|
112
|
+
var inputList = __spreadArray([], ev.target.closest("div").childNodes, true);
|
|
113
|
+
for (var _i = 0, _a = inputList.entries(); _i < _a.length; _i++) {
|
|
114
|
+
var _b = _a[_i], index = _b[0], input = _b[1];
|
|
115
|
+
if (!input.value.length || index === (inputList.length - 1)) {
|
|
116
|
+
input.focus();
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
} }, Array.from({ length: (_e = this.props.length) !== null && _e !== void 0 ? _e : 6 }).map(function (_, i) { return react_1.default.createElement("input", { key: "opt-" + i, disabled: _this.props.disabled, style: _this.props.inputStyle, onKeyDown: function (ev) {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
var key = ev.key.toLowerCase();
|
|
124
|
+
switch (key) {
|
|
125
|
+
case "backspace":
|
|
126
|
+
if (ev.target.value.length)
|
|
127
|
+
ev.target.value = "";
|
|
128
|
+
else if (((_a = ev.target.previousSibling) === null || _a === void 0 ? void 0 : _a.localName) === "input")
|
|
129
|
+
ev.target.previousSibling.focus();
|
|
130
|
+
else
|
|
131
|
+
ev.target.blur();
|
|
132
|
+
break;
|
|
133
|
+
case "delete":
|
|
134
|
+
ev.target.value = "";
|
|
135
|
+
break;
|
|
136
|
+
default:
|
|
137
|
+
var numberCheck = /[0-9]/g;
|
|
138
|
+
if (numberCheck.test(key)) {
|
|
139
|
+
if (!ev.target.value.length)
|
|
140
|
+
ev.target.value = key;
|
|
141
|
+
if (((_b = ev.target.nextSibling) === null || _b === void 0 ? void 0 : _b.localName) === "input" && !ev.target.nextSibling.value.length)
|
|
142
|
+
ev.target.nextSibling.focus();
|
|
143
|
+
else
|
|
144
|
+
ev.target.blur();
|
|
145
|
+
}
|
|
146
|
+
else
|
|
147
|
+
ev.preventDefault();
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
}, onBlur: function () {
|
|
151
|
+
if (_this.props.onChange)
|
|
152
|
+
_this.props.onChange(_this.getValue(), _this.containerRef.current);
|
|
153
|
+
} }); }));
|
|
154
|
+
};
|
|
155
|
+
return InputOpt;
|
|
156
|
+
}(react_1.default.Component));
|
|
157
|
+
exports.InputOpt = InputOpt;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React, { CSSProperties } from "react";
|
|
2
|
-
interface Props {
|
|
3
|
-
id?: string;
|
|
4
|
-
value?: number;
|
|
5
|
-
onChange?: (ev: number) => void;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
readOnly?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
helperText?: string;
|
|
10
|
-
helperTextColor?: string;
|
|
11
|
-
/** default: 1 */
|
|
12
|
-
volume?: number;
|
|
13
|
-
style?: CSSProperties;
|
|
14
|
-
min?: number;
|
|
15
|
-
max?: number;
|
|
16
|
-
type?: "outline" | "icon-button";
|
|
17
|
-
}
|
|
18
|
-
export declare const NumberPicker: ({ id, value, onChange, disabled, readOnly, className, helperText, helperTextColor, max, min, style, type, volume }: Props) => React.JSX.Element;
|
|
19
|
-
export {};
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
id?: string;
|
|
4
|
+
value?: number;
|
|
5
|
+
onChange?: (ev: number) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
helperTextColor?: string;
|
|
11
|
+
/** default: 1 */
|
|
12
|
+
volume?: number;
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
min?: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
type?: "outline" | "icon-button";
|
|
17
|
+
}
|
|
18
|
+
export declare const NumberPicker: ({ id, value, onChange, disabled, readOnly, className, helperText, helperTextColor, max, min, style, type, volume }: Props) => React.JSX.Element;
|
|
19
|
+
export {};
|