wini-web-components 2.2.7 → 2.3.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.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 +22 -22
- package/dist/component/checkbox/checkbox.js +80 -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 -0
- package/dist/component/input-opt/input-opt.js +157 -0
- 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 -30
- 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,14 +1,14 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import './progress-circle.css';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export declare function ProgressCircle(props: {
|
|
5
|
-
id?: string;
|
|
6
|
-
/** value: 0 - 100 (%)*/
|
|
7
|
-
percent?: number;
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
fillColor?: string;
|
|
10
|
-
percentColor?: string;
|
|
11
|
-
strokeWidth?: number;
|
|
12
|
-
strokeColor?: string;
|
|
13
|
-
textStyle?: CSSProperties;
|
|
14
|
-
}): React.JSX.Element;
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import './progress-circle.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare function ProgressCircle(props: {
|
|
5
|
+
id?: string;
|
|
6
|
+
/** value: 0 - 100 (%)*/
|
|
7
|
+
percent?: number;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
fillColor?: string;
|
|
10
|
+
percentColor?: string;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
strokeColor?: string;
|
|
13
|
+
textStyle?: CSSProperties;
|
|
14
|
+
}): React.JSX.Element;
|
|
@@ -1,31 +1,30 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ProgressCircle =
|
|
18
|
-
require("./progress-circle.css");
|
|
19
|
-
var react_1 = __importDefault(require("react"));
|
|
20
|
-
function ProgressCircle(props) {
|
|
21
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
22
|
-
var radius = 30 - ((_a = props.strokeWidth) !== null && _a !== void 0 ? _a : 4);
|
|
23
|
-
var diameter = Math.PI * 2 * radius;
|
|
24
|
-
var strokeOffset = (1 - (((_b = props.percent) !== null && _b !== void 0 ? _b : 0) / 100)) * diameter;
|
|
25
|
-
return react_1.default.createElement("svg", { id: props.id, width: "100%", height: "100%", viewBox: "0 0 60 60", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: __assign({ width: '6rem', height: '6rem' }, ((_c = props.style) !== null && _c !== void 0 ? _c : {})) },
|
|
26
|
-
react_1.default.createElement("path", { d: "M 30,30 m 0,-".concat(radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,").concat(2 * radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,-").concat(2 * radius), style: { fill: "none", stroke: (_d = props.strokeColor) !== null && _d !== void 0 ? _d : "var(--neutral-main-background-color)", strokeWidth: (_e = props.strokeWidth) !== null && _e !== void 0 ? _e : '4px', } }),
|
|
27
|
-
react_1.default.createElement("path", { d: "M 30,30 m 0,-".concat(radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,").concat(2 * radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,-").concat(2 * radius), style: { fill: (_f = props.fillColor) !== null && _f !== void 0 ? _f : "none", stroke: (_g = props.percentColor) !== null && _g !== void 0 ? _g : "var(--primary-main-color)", strokeWidth: (_h = props.strokeWidth) !== null && _h !== void 0 ? _h : '4px', strokeLinecap: 'round', strokeDasharray: "".concat(diameter, "px ").concat(diameter, "px"), strokeDashoffset: "".concat(strokeOffset, "px") } }),
|
|
28
|
-
react_1.default.createElement("text", { x: "50%", y: "50%", dy: ".3em", textAnchor: "middle", fontSize: "1.6rem", fontWeight: '600', style: __assign({ fill: "var(neutral-text-title-color)" }, ((_j = props.textStyle) !== null && _j !== void 0 ? _j : {})) }, (_k = props.percent) !== null && _k !== void 0 ? _k : 0,
|
|
29
|
-
"%"));
|
|
30
|
-
}
|
|
31
|
-
exports.ProgressCircle = ProgressCircle;
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ProgressCircle = ProgressCircle;
|
|
18
|
+
require("./progress-circle.css");
|
|
19
|
+
var react_1 = __importDefault(require("react"));
|
|
20
|
+
function ProgressCircle(props) {
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
22
|
+
var radius = 30 - ((_a = props.strokeWidth) !== null && _a !== void 0 ? _a : 4);
|
|
23
|
+
var diameter = Math.PI * 2 * radius;
|
|
24
|
+
var strokeOffset = (1 - (((_b = props.percent) !== null && _b !== void 0 ? _b : 0) / 100)) * diameter;
|
|
25
|
+
return react_1.default.createElement("svg", { id: props.id, width: "100%", height: "100%", viewBox: "0 0 60 60", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: __assign({ width: '6rem', height: '6rem' }, ((_c = props.style) !== null && _c !== void 0 ? _c : {})) },
|
|
26
|
+
react_1.default.createElement("path", { d: "M 30,30 m 0,-".concat(radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,").concat(2 * radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,-").concat(2 * radius), style: { fill: "none", stroke: (_d = props.strokeColor) !== null && _d !== void 0 ? _d : "var(--neutral-main-background-color)", strokeWidth: (_e = props.strokeWidth) !== null && _e !== void 0 ? _e : '4px', } }),
|
|
27
|
+
react_1.default.createElement("path", { d: "M 30,30 m 0,-".concat(radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,").concat(2 * radius, " a ").concat(radius, ",").concat(radius, " 0 1 1 0,-").concat(2 * radius), style: { fill: (_f = props.fillColor) !== null && _f !== void 0 ? _f : "none", stroke: (_g = props.percentColor) !== null && _g !== void 0 ? _g : "var(--primary-main-color)", strokeWidth: (_h = props.strokeWidth) !== null && _h !== void 0 ? _h : '4px', strokeLinecap: 'round', strokeDasharray: "".concat(diameter, "px ").concat(diameter, "px"), strokeDashoffset: "".concat(strokeOffset, "px") } }),
|
|
28
|
+
react_1.default.createElement("text", { x: "50%", y: "50%", dy: ".3em", textAnchor: "middle", fontSize: "1.6rem", fontWeight: '600', style: __assign({ fill: "var(neutral-text-title-color)" }, ((_j = props.textStyle) !== null && _j !== void 0 ? _j : {})) }, (_k = props.percent) !== null && _k !== void 0 ? _k : 0,
|
|
29
|
+
"%"));
|
|
30
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import { UseFormRegister } from 'react-hook-form';
|
|
3
|
-
interface RadioButtonProps {
|
|
4
|
-
id?: string;
|
|
5
|
-
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
6
|
-
value?: string | number | readonly string[];
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
size?: number | string;
|
|
10
|
-
defaultChecked?: boolean;
|
|
11
|
-
name?: string;
|
|
12
|
-
activeColor?: string;
|
|
13
|
-
offColor?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
register?: UseFormRegister<{}>;
|
|
16
|
-
}
|
|
17
|
-
export declare class RadioButton extends React.Component<RadioButtonProps> {
|
|
18
|
-
render(): React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { UseFormRegister } from 'react-hook-form';
|
|
3
|
+
interface RadioButtonProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
6
|
+
value?: string | number | readonly string[];
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
size?: number | string;
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
name?: string;
|
|
12
|
+
activeColor?: string;
|
|
13
|
+
offColor?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
register?: UseFormRegister<{}>;
|
|
16
|
+
}
|
|
17
|
+
export declare class RadioButton extends React.Component<RadioButtonProps> {
|
|
18
|
+
render(): React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -1,64 +1,64 @@
|
|
|
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.RadioButton = void 0;
|
|
33
|
-
var react_1 = __importDefault(require("react"));
|
|
34
|
-
var radio_button_module_css_1 = __importDefault(require("./radio-button.module.css"));
|
|
35
|
-
var RadioButton = /** @class */ (function (_super) {
|
|
36
|
-
__extends(RadioButton, _super);
|
|
37
|
-
function RadioButton() {
|
|
38
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
39
|
-
}
|
|
40
|
-
RadioButton.prototype.render = function () {
|
|
41
|
-
var _a, _b, _c;
|
|
42
|
-
var convertStyle = {
|
|
43
|
-
'--off-color': (_a = this.props.offColor) !== null && _a !== void 0 ? _a : 'var(--neutral-bolder-border-color)',
|
|
44
|
-
'--active-color': (_b = this.props.activeColor) !== null && _b !== void 0 ? _b : 'var(--primary-main-color)',
|
|
45
|
-
'--size': this.props.size ? (typeof this.props.size === 'number') ? "".concat(this.props.size, "px") : this.props.size : '20px'
|
|
46
|
-
};
|
|
47
|
-
if (this.props.style) {
|
|
48
|
-
delete this.props.style.width;
|
|
49
|
-
delete this.props.style.minWidth;
|
|
50
|
-
delete this.props.style.maxWidth;
|
|
51
|
-
delete this.props.style.height;
|
|
52
|
-
delete this.props.style.minHeight;
|
|
53
|
-
delete this.props.style.maxHeight;
|
|
54
|
-
convertStyle = __assign(__assign({}, this.props.style), convertStyle);
|
|
55
|
-
}
|
|
56
|
-
return react_1.default.createElement("label", { id: this.props.id, className: "row ".concat(radio_button_module_css_1.default['radio-btn-container'], " ").concat((_c = this.props.className) !== null && _c !== void 0 ? _c : ''), style: convertStyle },
|
|
57
|
-
this.props.register ?
|
|
58
|
-
react_1.default.createElement("input", __assign({}, this.props.register, { type: "radio", value: this.props.value, disabled: this.props.disabled })) :
|
|
59
|
-
react_1.default.createElement("input", { type: "radio", name: this.props.name, value: this.props.value, defaultChecked: this.props.defaultChecked, disabled: this.props.disabled, onChange: this.props.onChange }),
|
|
60
|
-
react_1.default.createElement("span", { className: radio_button_module_css_1.default['checkmark'] }));
|
|
61
|
-
};
|
|
62
|
-
return RadioButton;
|
|
63
|
-
}(react_1.default.Component));
|
|
64
|
-
exports.RadioButton = RadioButton;
|
|
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.RadioButton = void 0;
|
|
33
|
+
var react_1 = __importDefault(require("react"));
|
|
34
|
+
var radio_button_module_css_1 = __importDefault(require("./radio-button.module.css"));
|
|
35
|
+
var RadioButton = /** @class */ (function (_super) {
|
|
36
|
+
__extends(RadioButton, _super);
|
|
37
|
+
function RadioButton() {
|
|
38
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
39
|
+
}
|
|
40
|
+
RadioButton.prototype.render = function () {
|
|
41
|
+
var _a, _b, _c;
|
|
42
|
+
var convertStyle = {
|
|
43
|
+
'--off-color': (_a = this.props.offColor) !== null && _a !== void 0 ? _a : 'var(--neutral-bolder-border-color)',
|
|
44
|
+
'--active-color': (_b = this.props.activeColor) !== null && _b !== void 0 ? _b : 'var(--primary-main-color)',
|
|
45
|
+
'--size': this.props.size ? (typeof this.props.size === 'number') ? "".concat(this.props.size, "px") : this.props.size : '20px'
|
|
46
|
+
};
|
|
47
|
+
if (this.props.style) {
|
|
48
|
+
delete this.props.style.width;
|
|
49
|
+
delete this.props.style.minWidth;
|
|
50
|
+
delete this.props.style.maxWidth;
|
|
51
|
+
delete this.props.style.height;
|
|
52
|
+
delete this.props.style.minHeight;
|
|
53
|
+
delete this.props.style.maxHeight;
|
|
54
|
+
convertStyle = __assign(__assign({}, this.props.style), convertStyle);
|
|
55
|
+
}
|
|
56
|
+
return react_1.default.createElement("label", { id: this.props.id, className: "row ".concat(radio_button_module_css_1.default['radio-btn-container'], " ").concat((_c = this.props.className) !== null && _c !== void 0 ? _c : ''), style: convertStyle },
|
|
57
|
+
this.props.register ?
|
|
58
|
+
react_1.default.createElement("input", __assign({}, this.props.register, { type: "radio", value: this.props.value, disabled: this.props.disabled })) :
|
|
59
|
+
react_1.default.createElement("input", { type: "radio", name: this.props.name, value: this.props.value, defaultChecked: this.props.defaultChecked, disabled: this.props.disabled, onChange: this.props.onChange }),
|
|
60
|
+
react_1.default.createElement("span", { className: radio_button_module_css_1.default['checkmark'] }));
|
|
61
|
+
};
|
|
62
|
+
return RadioButton;
|
|
63
|
+
}(react_1.default.Component));
|
|
64
|
+
exports.RadioButton = RadioButton;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React, { CSSProperties } from "react";
|
|
2
|
-
interface RatingProps {
|
|
3
|
-
id?: string;
|
|
4
|
-
/**
|
|
5
|
-
value: 0-5
|
|
6
|
-
*/
|
|
7
|
-
value?: number;
|
|
8
|
-
size?: number | string;
|
|
9
|
-
onChange?: (e: number) => void;
|
|
10
|
-
className?: string;
|
|
11
|
-
style?: CSSProperties;
|
|
12
|
-
strokeColor?: string;
|
|
13
|
-
fillColor?: string;
|
|
14
|
-
}
|
|
15
|
-
interface RatingState {
|
|
16
|
-
value: number;
|
|
17
|
-
}
|
|
18
|
-
export declare class Rating extends React.Component<RatingProps, RatingState> {
|
|
19
|
-
state: Readonly<RatingState>;
|
|
20
|
-
componentDidUpdate(prevProps: Readonly<RatingProps>): void;
|
|
21
|
-
render(): React.ReactNode;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
interface RatingProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
/**
|
|
5
|
+
value: 0-5
|
|
6
|
+
*/
|
|
7
|
+
value?: number;
|
|
8
|
+
size?: number | string;
|
|
9
|
+
onChange?: (e: number) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
strokeColor?: string;
|
|
13
|
+
fillColor?: string;
|
|
14
|
+
}
|
|
15
|
+
interface RatingState {
|
|
16
|
+
value: number;
|
|
17
|
+
}
|
|
18
|
+
export declare class Rating extends React.Component<RatingProps, RatingState> {
|
|
19
|
+
state: Readonly<RatingState>;
|
|
20
|
+
componentDidUpdate(prevProps: Readonly<RatingProps>): void;
|
|
21
|
+
render(): React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,74 +1,73 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.Rating = void 0;
|
|
22
|
-
var react_1 = __importDefault(require("react"));
|
|
23
|
-
var rating_module_css_1 = __importDefault(require("./rating.module.css"));
|
|
24
|
-
var autoKeyId = function () { return window.crypto.randomUUID().replace(/-/g, ''); };
|
|
25
|
-
var Rating = /** @class */ (function (_super) {
|
|
26
|
-
__extends(Rating, _super);
|
|
27
|
-
function Rating() {
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
_this =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_this.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
react_1.default.createElement("stop", { offset: "
|
|
66
|
-
react_1.default.createElement("stop", { offset: "".concat(stopValue, "%"), stopColor:
|
|
67
|
-
|
|
68
|
-
react_1.default.createElement("path", {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
exports.Rating = Rating;
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.Rating = void 0;
|
|
22
|
+
var react_1 = __importDefault(require("react"));
|
|
23
|
+
var rating_module_css_1 = __importDefault(require("./rating.module.css"));
|
|
24
|
+
var autoKeyId = function () { return window.crypto.randomUUID().replace(/-/g, ''); };
|
|
25
|
+
var Rating = /** @class */ (function (_super) {
|
|
26
|
+
__extends(Rating, _super);
|
|
27
|
+
function Rating() {
|
|
28
|
+
var _a;
|
|
29
|
+
var _this = _super.apply(this, arguments) || this;
|
|
30
|
+
_this.state = {
|
|
31
|
+
value: (_a = _this.props.value) !== null && _a !== void 0 ? _a : 0
|
|
32
|
+
};
|
|
33
|
+
return _this;
|
|
34
|
+
}
|
|
35
|
+
Rating.prototype.componentDidUpdate = function (prevProps) {
|
|
36
|
+
var _a;
|
|
37
|
+
if (prevProps.value !== this.props.value) {
|
|
38
|
+
this.setState({ value: (_a = this.props.value) !== null && _a !== void 0 ? _a : 0 });
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
Rating.prototype.render = function () {
|
|
42
|
+
var _this = this;
|
|
43
|
+
var _a;
|
|
44
|
+
return react_1.default.createElement("div", { id: this.props.id, className: "row ".concat(rating_module_css_1.default['rating-container'], " ").concat((_a = this.props.className) !== null && _a !== void 0 ? _a : ''), style: this.props.style }, Array.from({ length: 5 }).map(function (_, i) {
|
|
45
|
+
var _a, _b, _c, _d, _e;
|
|
46
|
+
var uniqueId = 'rating-star-grad-0';
|
|
47
|
+
var stopValue = 0;
|
|
48
|
+
if (_this.state.value >= 5) {
|
|
49
|
+
uniqueId = 'rating-star-grad-5';
|
|
50
|
+
stopValue = 100;
|
|
51
|
+
}
|
|
52
|
+
else if (_this.state.value >= i) {
|
|
53
|
+
uniqueId = autoKeyId();
|
|
54
|
+
stopValue = (_this.state.value - i) * 100;
|
|
55
|
+
}
|
|
56
|
+
return react_1.default.createElement("svg", { onClick: function () {
|
|
57
|
+
if (_this.props.onChange) {
|
|
58
|
+
_this.setState({ value: i + 1 });
|
|
59
|
+
_this.props.onChange(i + 1);
|
|
60
|
+
}
|
|
61
|
+
}, key: 'rate-' + i, width: "100%", height: "100%", style: { width: (_a = _this.props.size) !== null && _a !== void 0 ? _a : '2rem', height: (_b = _this.props.size) !== null && _b !== void 0 ? _b : '2rem' }, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
62
|
+
react_1.default.createElement("defs", null,
|
|
63
|
+
react_1.default.createElement("linearGradient", { id: uniqueId, x1: "0%", x2: "100%", y1: "0%", y2: "0%" },
|
|
64
|
+
react_1.default.createElement("stop", { offset: "0%", stopColor: (_c = _this.props.fillColor) !== null && _c !== void 0 ? _c : '#FC6B03' }),
|
|
65
|
+
react_1.default.createElement("stop", { offset: "".concat(stopValue, "%"), stopColor: (_d = _this.props.fillColor) !== null && _d !== void 0 ? _d : '#FC6B03' }),
|
|
66
|
+
react_1.default.createElement("stop", { offset: "".concat(stopValue, "%"), stopColor: "#00000000" }))),
|
|
67
|
+
react_1.default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 1.66667C10.2884 1.66667 10.5518 1.82993 10.6794 2.0878L12.844 6.46194L17.6847 7.16325C17.97 7.20459 18.2071 7.4039 18.2962 7.67736C18.3853 7.95082 18.311 8.25101 18.1045 8.45172L14.6018 11.8563L15.4285 16.6636C15.4772 16.947 15.3604 17.2334 15.127 17.4024C14.8937 17.5714 14.5844 17.5937 14.3292 17.4599L10 15.1897L5.67081 17.4599C5.41557 17.5937 5.10627 17.5714 4.87295 17.4024C4.63964 17.2334 4.52278 16.947 4.57151 16.6636L5.39815 11.8563L1.89545 8.45172C1.68896 8.25101 1.61465 7.95082 1.70377 7.67736C1.79288 7.4039 2.02996 7.20459 2.31533 7.16325L7.15599 6.46194L9.32063 2.0878C9.44825 1.82993 9.71162 1.66667 10 1.66667ZM10 4.12915L8.33846 7.48665C8.22811 7.70963 8.01479 7.86418 7.76802 7.89993L4.05223 8.43827L6.74094 11.0517C6.91947 11.2252 7.00094 11.4752 6.95881 11.7203L6.3243 15.4102L9.64738 13.6676C9.86813 13.5519 10.1319 13.5519 10.3526 13.6676L13.6757 15.4102L13.0412 11.7203C12.9991 11.4752 13.0805 11.2252 13.2591 11.0517L15.9478 8.43827L12.232 7.89993C11.9852 7.86418 11.7719 7.70963 11.6615 7.48665L10 4.12915Z", fill: (_e = _this.props.strokeColor) !== null && _e !== void 0 ? _e : '#667994' }),
|
|
68
|
+
react_1.default.createElement("path", { d: "M17.738 7.18949L12.8212 6.47499L10.6249 2.02268C10.5611 1.91426 10.47 1.82438 10.3608 1.76194C10.2515 1.6995 10.1279 1.66666 10.0021 1.66666C9.87623 1.66666 9.75259 1.6995 9.64335 1.76194C9.53411 1.82438 9.44306 1.91426 9.37921 2.02268L7.17875 6.47499L2.26191 7.18949C2.13368 7.208 2.0132 7.26201 1.91406 7.34542C1.81493 7.42882 1.74111 7.5383 1.70095 7.66147C1.66078 7.78463 1.65588 7.91658 1.68678 8.04239C1.71769 8.1682 1.78317 8.28286 1.87583 8.3734L5.43449 11.8411L4.59499 16.7385C4.57311 16.8662 4.58739 16.9975 4.63622 17.1175C4.68505 17.2375 4.76648 17.3414 4.8713 17.4175C4.97612 17.4937 5.10016 17.539 5.22938 17.5483C5.3586 17.5577 5.48785 17.5306 5.60252 17.4704L9.99998 15.1588L14.3974 17.4704C14.5121 17.5306 14.6414 17.5577 14.7706 17.5483C14.8998 17.539 15.0238 17.4937 15.1286 17.4175C15.2335 17.3414 15.3149 17.2375 15.3637 17.1175C15.4126 16.9975 15.4268 16.8662 15.405 16.7385L14.5655 11.8411L18.1241 8.3734C18.2168 8.28295 18.2823 8.16841 18.3132 8.0427C18.3442 7.91699 18.3394 7.78512 18.2994 7.66199C18.2594 7.53886 18.1858 7.42937 18.0868 7.34587C17.9879 7.26238 17.8675 7.20822 17.7394 7.18949H17.738Z", fill: "url(#".concat(uniqueId, ")") }));
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
71
|
+
return Rating;
|
|
72
|
+
}(react_1.default.Component));
|
|
73
|
+
exports.Rating = Rating;
|
|
@@ -1,50 +1,31 @@
|
|
|
1
|
-
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
|
|
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
|
-
offset: DOMRect;
|
|
33
|
-
isOpen: boolean;
|
|
34
|
-
onSelect: any;
|
|
35
|
-
selected?: string | number;
|
|
36
|
-
search?: Array<OptionsItem>;
|
|
37
|
-
style?: Object;
|
|
38
|
-
}
|
|
39
|
-
export declare class Select1 extends React.Component<Select1Props, Select1State> {
|
|
40
|
-
private containerRef;
|
|
41
|
-
private inputRef;
|
|
42
|
-
constructor(props: Select1Props);
|
|
43
|
-
private search;
|
|
44
|
-
private onSelect;
|
|
45
|
-
private onKeyDown;
|
|
46
|
-
componentDidUpdate(prevProps: Select1Props, prevState: Select1State): void;
|
|
47
|
-
componentDidMount(): void;
|
|
48
|
-
render(): React.JSX.Element;
|
|
49
|
-
}
|
|
50
|
-
export {};
|
|
1
|
+
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { WithTranslation } from 'react-i18next';
|
|
3
|
+
export interface OptionsItem {
|
|
4
|
+
id: string | number;
|
|
5
|
+
parentId?: string;
|
|
6
|
+
name: string | ReactNode;
|
|
7
|
+
title?: string | ((onSelect: (e: OptionsItem) => void) => ReactNode);
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface Select1Props extends WithTranslation {
|
|
11
|
+
id?: string;
|
|
12
|
+
value?: string | number;
|
|
13
|
+
options: Required<Array<OptionsItem>>;
|
|
14
|
+
onChange?: (v?: OptionsItem) => void;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
helperText?: string;
|
|
19
|
+
helperTextColor?: string;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
handleSearch?: (e: string) => Promise<Array<OptionsItem>>;
|
|
22
|
+
handleLoadmore?: (onLoadMore: boolean, ev: React.UIEvent<HTMLDivElement, UIEvent>) => void;
|
|
23
|
+
handleLoadChildren?: () => {};
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
popupClassName?: string;
|
|
26
|
+
prefix?: ReactNode;
|
|
27
|
+
suffix?: ReactNode;
|
|
28
|
+
onOpenOptions?: (popupRef: HTMLDivElement) => void;
|
|
29
|
+
}
|
|
30
|
+
export declare const Select1: React.ComponentType<Omit<import("react-i18next/helpers").$Subtract<Select1Props, import("react-i18next").WithTranslationProps>, keyof WithTranslation<Ns, undefined>> & import("react-i18next").WithTranslationProps>;
|
|
31
|
+
export {};
|