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,34 +1,36 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentStatus } from '../../index';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStatus } from '../../index';
|
|
3
|
+
import { WithTranslation } from 'react-i18next';
|
|
4
|
+
export declare enum DialogAlignment {
|
|
5
|
+
start = "start",
|
|
6
|
+
center = "center",
|
|
7
|
+
end = "end"
|
|
8
|
+
}
|
|
9
|
+
interface DialogState {
|
|
10
|
+
readonly open?: boolean;
|
|
11
|
+
title: string;
|
|
12
|
+
status: ComponentStatus;
|
|
13
|
+
content: string;
|
|
14
|
+
onSubmit: Function;
|
|
15
|
+
submitTitle?: string;
|
|
16
|
+
cancelTitle?: string;
|
|
17
|
+
alignment?: DialogAlignment;
|
|
18
|
+
}
|
|
19
|
+
export declare const showDialog: ({ ref, title, status, content, onSubmit, submitTitle, cancelTitle, alignment }: {
|
|
20
|
+
ref: React.MutableRefObject<TDialog>;
|
|
21
|
+
title?: string;
|
|
22
|
+
status?: ComponentStatus;
|
|
23
|
+
content?: string;
|
|
24
|
+
onSubmit?: Function;
|
|
25
|
+
submitTitle?: string;
|
|
26
|
+
cancelTitle?: string;
|
|
27
|
+
alignment?: DialogAlignment;
|
|
28
|
+
}) => void;
|
|
29
|
+
declare class TDialog extends React.Component<WithTranslation, DialogState> {
|
|
30
|
+
constructor(props: WithTranslation);
|
|
31
|
+
showDialogNoti(data: DialogState): void;
|
|
32
|
+
closeDialog(): void;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
export declare const Dialog: React.ComponentType<Omit<import("react-i18next/helpers").$Subtract<WithTranslation<undefined, undefined>, import("react-i18next").WithTranslationProps>, keyof WithTranslation<Ns, undefined>> & import("react-i18next").WithTranslationProps>;
|
|
36
|
+
export {};
|
|
@@ -1,97 +1,99 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.Dialog = exports.showDialog = exports.DialogAlignment = void 0;
|
|
33
|
-
var react_1 = __importDefault(require("react"));
|
|
34
|
-
var react_dom_1 = __importDefault(require("react-dom"));
|
|
35
|
-
var dialog_module_css_1 = __importDefault(require("./dialog.module.css"));
|
|
36
|
-
var index_1 = require("../../index");
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
DialogAlignment["
|
|
41
|
-
DialogAlignment["
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
ref.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
_this
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
react_1.default.createElement("button", { type: 'button', style: this.state.alignment === DialogAlignment.center ? { flex: 1, width: '100%' } : undefined, onClick: function () {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.Dialog = exports.showDialog = exports.DialogAlignment = void 0;
|
|
33
|
+
var react_1 = __importDefault(require("react"));
|
|
34
|
+
var react_dom_1 = __importDefault(require("react-dom"));
|
|
35
|
+
var dialog_module_css_1 = __importDefault(require("./dialog.module.css"));
|
|
36
|
+
var index_1 = require("../../index");
|
|
37
|
+
var react_i18next_1 = require("react-i18next");
|
|
38
|
+
var DialogAlignment;
|
|
39
|
+
(function (DialogAlignment) {
|
|
40
|
+
DialogAlignment["start"] = "start";
|
|
41
|
+
DialogAlignment["center"] = "center";
|
|
42
|
+
DialogAlignment["end"] = "end";
|
|
43
|
+
})(DialogAlignment || (exports.DialogAlignment = DialogAlignment = {}));
|
|
44
|
+
var showDialog = function (_a) {
|
|
45
|
+
var ref = _a.ref, title = _a.title, status = _a.status, content = _a.content, onSubmit = _a.onSubmit, submitTitle = _a.submitTitle, cancelTitle = _a.cancelTitle, alignment = _a.alignment;
|
|
46
|
+
ref.current.showDialogNoti({
|
|
47
|
+
title: title !== null && title !== void 0 ? title : '',
|
|
48
|
+
status: status !== null && status !== void 0 ? status : index_1.ComponentStatus.INFOR,
|
|
49
|
+
content: content !== null && content !== void 0 ? content : '',
|
|
50
|
+
onSubmit: onSubmit !== null && onSubmit !== void 0 ? onSubmit : (function () { }),
|
|
51
|
+
submitTitle: submitTitle,
|
|
52
|
+
cancelTitle: cancelTitle,
|
|
53
|
+
alignment: alignment
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
exports.showDialog = showDialog;
|
|
57
|
+
var TDialog = /** @class */ (function (_super) {
|
|
58
|
+
__extends(TDialog, _super);
|
|
59
|
+
function TDialog(props) {
|
|
60
|
+
var _this = _super.call(this, props) || this;
|
|
61
|
+
_this.state = {
|
|
62
|
+
open: false,
|
|
63
|
+
title: '',
|
|
64
|
+
status: index_1.ComponentStatus.INFOR,
|
|
65
|
+
content: '',
|
|
66
|
+
onSubmit: function () { }
|
|
67
|
+
};
|
|
68
|
+
return _this;
|
|
69
|
+
}
|
|
70
|
+
TDialog.prototype.showDialogNoti = function (data) {
|
|
71
|
+
this.setState(__assign({ open: true }, data));
|
|
72
|
+
};
|
|
73
|
+
TDialog.prototype.closeDialog = function () {
|
|
74
|
+
this.setState({ open: false });
|
|
75
|
+
};
|
|
76
|
+
TDialog.prototype.render = function () {
|
|
77
|
+
var _this = this;
|
|
78
|
+
var _a, _b;
|
|
79
|
+
var t = this.props.t;
|
|
80
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, this.state.open &&
|
|
81
|
+
react_dom_1.default.createPortal(react_1.default.createElement("div", { className: dialog_module_css_1.default['dialog-overlay'] },
|
|
82
|
+
react_1.default.createElement("div", { className: "".concat(dialog_module_css_1.default['dialog-container'], " col"), style: { width: '41.4rem', alignItems: this.state.alignment }, "dialog-type": this.state.status, onClick: function (e) { return e.stopPropagation(); } },
|
|
83
|
+
react_1.default.createElement("div", { className: "".concat(dialog_module_css_1.default['dialog-body'], " col"), style: { alignItems: 'inherit' } },
|
|
84
|
+
react_1.default.createElement("div", { className: "".concat(dialog_module_css_1.default['dialog-status'], " row") }, (0, index_1.getStatusIcon)(this.state.status)),
|
|
85
|
+
react_1.default.createElement("div", { className: 'col' },
|
|
86
|
+
react_1.default.createElement(index_1.Text, { className: 'heading-6', style: { textAlign: this.state.alignment === DialogAlignment.center ? 'center' : 'start' } }, this.state.title),
|
|
87
|
+
react_1.default.createElement(index_1.Text, { className: 'body-3', style: { textAlign: this.state.alignment === DialogAlignment.center ? 'center' : 'start' } }, this.state.content))),
|
|
88
|
+
react_1.default.createElement("div", { className: "".concat(dialog_module_css_1.default['dialog-footer'], " row") },
|
|
89
|
+
react_1.default.createElement("button", { type: 'button', style: this.state.alignment === DialogAlignment.center ? { flex: 1, width: '100%' } : undefined, onClick: function () { return _this.setState({ open: false }); }, className: "".concat(dialog_module_css_1.default['dialog-action'], " row") },
|
|
90
|
+
react_1.default.createElement(index_1.Text, { className: 'button-text-3' }, (_a = this.state.cancelTitle) !== null && _a !== void 0 ? _a : t("cancel"))),
|
|
91
|
+
react_1.default.createElement("button", { type: 'button', style: this.state.alignment === DialogAlignment.center ? { flex: 1, width: '100%' } : undefined, onClick: function () {
|
|
92
|
+
_this.state.onSubmit();
|
|
93
|
+
_this.setState({ open: false });
|
|
94
|
+
}, className: "".concat(dialog_module_css_1.default['dialog-action'], " row ").concat(dialog_module_css_1.default['dialog-submit']) },
|
|
95
|
+
react_1.default.createElement(index_1.Text, { className: 'button-text-3' }, (_b = this.state.submitTitle) !== null && _b !== void 0 ? _b : t('submit')))))), document.body)));
|
|
96
|
+
};
|
|
97
|
+
return TDialog;
|
|
98
|
+
}(react_1.default.Component));
|
|
99
|
+
exports.Dialog = (0, react_i18next_1.withTranslation)()(TDialog);
|
|
@@ -1,36 +1,24 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import { ComponentStatus } from '../component-status';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*/
|
|
26
|
-
maxSize?: number;
|
|
27
|
-
}
|
|
28
|
-
export declare class ImportFile extends React.Component<ImportFileProps, ImportFileState> {
|
|
29
|
-
private fileRef;
|
|
30
|
-
constructor(props: ImportFileProps | Readonly<ImportFileProps>);
|
|
31
|
-
state: Readonly<ImportFileState>;
|
|
32
|
-
showFilePicker(): void;
|
|
33
|
-
componentDidUpdate(prevProps: Readonly<ImportFileProps>, prevState: Readonly<ImportFileState>): void;
|
|
34
|
-
render(): React.JSX.Element;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { ComponentStatus } from '../component-status';
|
|
3
|
+
import { WithTranslation } from 'react-i18next';
|
|
4
|
+
type ChangeFileFunction = (a?: File) => void;
|
|
5
|
+
interface ImportFileProps extends WithTranslation {
|
|
6
|
+
id?: string;
|
|
7
|
+
status?: ComponentStatus;
|
|
8
|
+
value?: File | {
|
|
9
|
+
[k: string]: any;
|
|
10
|
+
};
|
|
11
|
+
buttonOnly?: boolean;
|
|
12
|
+
onChange?: ChangeFileFunction;
|
|
13
|
+
label?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
allowType?: Array<string>;
|
|
17
|
+
subTitle?: string;
|
|
18
|
+
/**
|
|
19
|
+
* maxSize unit: kb (kilobytes)
|
|
20
|
+
*/
|
|
21
|
+
maxSize?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const ImportFile: React.ComponentType<Omit<import("react-i18next/helpers").$Subtract<ImportFileProps | Readonly<ImportFileProps>, import("react-i18next").WithTranslationProps>, keyof WithTranslation<Ns, undefined>> & import("react-i18next").WithTranslationProps>;
|
|
24
|
+
export {};
|