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