wini-web-components 1.8.5 → 1.9.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/calendar/calendar.js +5 -6
- package/dist/component/input-multi-select/input-multi-select.d.ts +0 -1
- package/dist/component/input-multi-select/input-multi-select.js +13 -14
- package/dist/component/pagination/pagination.js +2 -3
- package/dist/component/progress-bar/progress-bar.js +1 -3
- package/dist/component/select1/select1.js +4 -5
- package/dist/component/slider/slider.js +3 -4
- package/dist/component/wini-icon/winicon.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -3
|
@@ -32,9 +32,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
32
32
|
exports.Calendar = exports.CalendarType = exports.inRangeTime = exports.endDate = exports.startDate = exports.today = void 0;
|
|
33
33
|
var react_1 = __importDefault(require("react"));
|
|
34
34
|
var calendar_module_css_1 = __importDefault(require("./calendar.module.css"));
|
|
35
|
-
var react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
36
|
-
var free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
37
35
|
var date_fns_1 = require("date-fns");
|
|
36
|
+
var winicon_1 = require("../wini-icon/winicon");
|
|
38
37
|
exports.today = new Date();
|
|
39
38
|
exports.startDate = new Date(exports.today.getFullYear() - 100, exports.today.getMonth(), exports.today.getDate());
|
|
40
39
|
exports.endDate = new Date(exports.today.getFullYear() + 100, exports.today.getMonth(), exports.today.getDate());
|
|
@@ -323,7 +322,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
323
322
|
break;
|
|
324
323
|
}
|
|
325
324
|
} },
|
|
326
|
-
react_1.default.createElement(
|
|
325
|
+
react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/double-arrow-left", size: '1.6rem' })),
|
|
327
326
|
react_1.default.createElement("button", { type: 'button', onClick: function () {
|
|
328
327
|
switch (_this.state.type) {
|
|
329
328
|
case CalendarType.YEAR:
|
|
@@ -345,7 +344,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
345
344
|
break;
|
|
346
345
|
}
|
|
347
346
|
} },
|
|
348
|
-
react_1.default.createElement(
|
|
347
|
+
react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/left-arrow", size: '1.6rem' })),
|
|
349
348
|
react_1.default.createElement("span", { className: "heading-7", onClick: function () {
|
|
350
349
|
if (_this.state.type !== CalendarType.YEAR)
|
|
351
350
|
_this.setState(__assign(__assign({}, _this.state), { type: _this.state.type === CalendarType.DATE ? CalendarType.MONTH : CalendarType.YEAR }));
|
|
@@ -371,7 +370,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
371
370
|
break;
|
|
372
371
|
}
|
|
373
372
|
} },
|
|
374
|
-
react_1.default.createElement(
|
|
373
|
+
react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/double-arrow-right", size: '1.6rem' })),
|
|
375
374
|
react_1.default.createElement("button", { type: 'button', onClick: function () {
|
|
376
375
|
switch (_this.state.type) {
|
|
377
376
|
case CalendarType.YEAR:
|
|
@@ -395,7 +394,7 @@ var Calendar = /** @class */ (function (_super) {
|
|
|
395
394
|
break;
|
|
396
395
|
}
|
|
397
396
|
} },
|
|
398
|
-
react_1.default.createElement(
|
|
397
|
+
react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/right-arrow", size: '1.6rem' }))),
|
|
399
398
|
react_1.default.createElement("div", { className: "".concat(calendar_module_css_1.default['picker-date-body'], " row") }, this.state.type === CalendarType.YEAR ? this.showYearInRange() : this.state.type === CalendarType.MONTH ? this.showMonthInYear() : this.showDateInMonth())),
|
|
400
399
|
this.props.type === CalendarType.DATETIME ? react_1.default.createElement("div", { className: "".concat(calendar_module_css_1.default['picker-time-container'], " col") },
|
|
401
400
|
react_1.default.createElement("div", { className: "heading-7" },
|
|
@@ -98,13 +98,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
98
98
|
};
|
|
99
99
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
100
100
|
exports.SelectMultiple = void 0;
|
|
101
|
-
var free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
102
|
-
var react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
103
101
|
var react_1 = __importStar(require("react"));
|
|
104
102
|
var react_dom_1 = __importDefault(require("react-dom"));
|
|
105
|
-
require("./input-multi-select.css");
|
|
103
|
+
var input_multi_select_module_css_1 = __importDefault(require("./input-multi-select.module.css"));
|
|
106
104
|
var checkbox_1 = require("../checkbox/checkbox");
|
|
107
105
|
var text_1 = require("../text/text");
|
|
106
|
+
var winicon_1 = require("../wini-icon/winicon");
|
|
108
107
|
;
|
|
109
108
|
var SelectMultiple = /** @class */ (function (_super) {
|
|
110
109
|
__extends(SelectMultiple, _super);
|
|
@@ -195,7 +194,7 @@ var SelectMultiple = /** @class */ (function (_super) {
|
|
|
195
194
|
children = ((_a = this.state.search) !== null && _a !== void 0 ? _a : this.state.options).filter(function (e) { return e.parentId === item.id; });
|
|
196
195
|
//
|
|
197
196
|
return react_1.default.createElement("div", { key: item.id, className: 'col', style: { width: '100%' } },
|
|
198
|
-
react_1.default.createElement("div", { className: "select-tile row ".concat(item.disabled ? "disabled" : ""), style: { paddingLeft: item.parentId ? '4.4rem' : undefined }, onClick: children.length ? function () {
|
|
197
|
+
react_1.default.createElement("div", { className: "".concat(input_multi_select_module_css_1.default['select-tile'], " row ").concat(item.disabled ? input_multi_select_module_css_1.default["disabled"] : ""), style: { paddingLeft: item.parentId ? '4.4rem' : undefined }, onClick: children.length ? function () {
|
|
199
198
|
if (_this.state.search) {
|
|
200
199
|
_this.setState(__assign(__assign({}, _this.state), { search: _this.state.search.map(function (e) {
|
|
201
200
|
if (e.id === item.id)
|
|
@@ -213,7 +212,7 @@ var SelectMultiple = /** @class */ (function (_super) {
|
|
|
213
212
|
}) }));
|
|
214
213
|
}
|
|
215
214
|
} : undefined },
|
|
216
|
-
((_b = this.state.search) !== null && _b !== void 0 ? _b : this.state.options).some(function (e) { return e.parentId; }) && react_1.default.createElement("div", { className: 'row', style: { width: '1.4rem', height: '1.4rem' } }, children.length ? react_1.default.createElement(
|
|
215
|
+
((_b = this.state.search) !== null && _b !== void 0 ? _b : this.state.options).some(function (e) { return e.parentId; }) && react_1.default.createElement("div", { className: 'row', style: { width: '1.4rem', height: '1.4rem' } }, children.length ? react_1.default.createElement(winicon_1.Winicon, { src: item.isOpen ? 'fill/arrows/triangle-down' : 'fill/arrows/triangle-right', size: '1.2rem' }) : null),
|
|
217
216
|
react_1.default.createElement(checkbox_1.Checkbox, { disabled: item.disabled, value: children.length ? (children.every(function (e) { return _this.state.value.includes(e.id); }) ? true : children.some(function (e) { return _this.state.value.includes(e.id); }) ? undefined : false) : this.state.value.includes(item.id), onChange: function (v) { _this.onCheck(v, __spreadArray([item], children, true)); }, size: '2rem' }),
|
|
218
217
|
react_1.default.createElement(text_1.Text, { className: 'body-3' }, item.name)),
|
|
219
218
|
react_1.default.createElement("div", { className: 'col', style: { display: item.isOpen ? "flex" : "none", width: '100%' } }, children.map(function (e) { return _this.renderOptions(e); })));
|
|
@@ -226,7 +225,7 @@ var SelectMultiple = /** @class */ (function (_super) {
|
|
|
226
225
|
this.setState(__assign(__assign({}, this.state), { value: (_a = this.props.value) !== null && _a !== void 0 ? _a : [] }));
|
|
227
226
|
//
|
|
228
227
|
if (this.state.isOpen && (prevState.isOpen !== this.state.isOpen || prevState.value.length !== this.state.value.length)) {
|
|
229
|
-
var thisPopupRect = (_b = document.body.querySelector('
|
|
228
|
+
var thisPopupRect = (_b = document.body.querySelector(".".concat(input_multi_select_module_css_1.default['select-multi-popup']))) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
230
229
|
if (thisPopupRect) {
|
|
231
230
|
var style = void 0;
|
|
232
231
|
if (prevState.isOpen !== this.state.isOpen && thisPopupRect.right > document.body.offsetWidth) {
|
|
@@ -257,7 +256,7 @@ var SelectMultiple = /** @class */ (function (_super) {
|
|
|
257
256
|
SelectMultiple.prototype.render = function () {
|
|
258
257
|
var _this = this;
|
|
259
258
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
260
|
-
return react_1.default.createElement("div", { id: this.props.id, ref: this.containerRef, className: "select-multi-container row ".concat(this.props.disabled ? 'disabled' : '', " ").concat(((_a = this.props.helperText) === null || _a === void 0 ? void 0 : _a.length) && 'helper-text', " ").concat((_b = this.props.className) !== null && _b !== void 0 ? _b : 'body-3'), "helper-text": this.props.helperText, style: this.props.style ? __assign(__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' }, onClick: function () {
|
|
259
|
+
return react_1.default.createElement("div", { id: this.props.id, ref: this.containerRef, className: "".concat(input_multi_select_module_css_1.default['select-multi-container'], " row ").concat(this.props.disabled ? input_multi_select_module_css_1.default['disabled'] : '', " ").concat(((_a = this.props.helperText) === null || _a === void 0 ? void 0 : _a.length) && input_multi_select_module_css_1.default['helper-text'], " ").concat((_b = this.props.className) !== null && _b !== void 0 ? _b : 'body-3'), "helper-text": this.props.helperText, style: this.props.style ? __assign(__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' }, onClick: function () {
|
|
261
260
|
var _a, _b;
|
|
262
261
|
if (!_this.state.isOpen)
|
|
263
262
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: true, style: undefined, offset: (_b = (_a = _this.containerRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect() }));
|
|
@@ -265,9 +264,9 @@ var SelectMultiple = /** @class */ (function (_super) {
|
|
|
265
264
|
react_1.default.createElement("div", { className: 'row', style: { flexWrap: 'wrap', flex: 1, width: '100%', gap: '0.6rem 0.4rem' } },
|
|
266
265
|
this.state.value.map(function (item) {
|
|
267
266
|
var optionItem = _this.props.options.find(function (e) { return e.id === item; });
|
|
268
|
-
return react_1.default.createElement("div", { key: item, className: 'selected-item-value
|
|
267
|
+
return react_1.default.createElement("div", { key: item, className: "row ".concat(input_multi_select_module_css_1.default['selected-item-value']), onClick: function (ev) { return _this.onClickItem(ev, item); } },
|
|
269
268
|
react_1.default.createElement(text_1.Text, { style: { color: '#161D24E5', fontSize: '1.2rem', lineHeight: '1.4rem' } }, optionItem === null || optionItem === void 0 ? void 0 : optionItem.name),
|
|
270
|
-
react_1.default.createElement(
|
|
269
|
+
react_1.default.createElement(winicon_1.Winicon, { src: "outline/user interface/e-remove", size: '1.2rem' }));
|
|
271
270
|
}),
|
|
272
271
|
(!this.state.value.length || this.state.isOpen) && react_1.default.createElement("input", { autoFocus: this.state.isOpen, onChange: this.search, placeholder: this.state.value.length ? undefined : this.props.placeholder, onBlur: function (ev) {
|
|
273
272
|
if (_this.state.onSelect)
|
|
@@ -280,10 +279,10 @@ var SelectMultiple = /** @class */ (function (_super) {
|
|
|
280
279
|
if (_this.state.value.length)
|
|
281
280
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: true, value: [] }));
|
|
282
281
|
} },
|
|
283
|
-
react_1.default.createElement(
|
|
284
|
-
react_1.default.createElement(
|
|
282
|
+
react_1.default.createElement(winicon_1.Winicon, { src: "outline/user interface/c-remove", size: '1.6rem' })) : react_1.default.createElement("div", { className: 'row', style: { display: (this.containerRef.current && this.containerRef.current.getBoundingClientRect().width >= 120) ? "flex" : "none" } },
|
|
283
|
+
react_1.default.createElement(winicon_1.Winicon, { src: this.state.isOpen ? "fill/arrows/up-arrow" : "fill/arrows/down-arrow", size: '1.2rem' })),
|
|
285
284
|
this.state.isOpen &&
|
|
286
|
-
react_dom_1.default.createPortal(react_1.default.createElement("div", { className: "select-multi-popup col ".concat((_e = this.props.popupClassName) !== null && _e !== void 0 ? _e : ""), style: (_f = this.state.style) !== null && _f !== void 0 ? _f : {
|
|
285
|
+
react_dom_1.default.createPortal(react_1.default.createElement("div", { className: "".concat(input_multi_select_module_css_1.default['select-multi-popup'], " col ").concat((_e = this.props.popupClassName) !== null && _e !== void 0 ? _e : ""), style: (_f = this.state.style) !== null && _f !== void 0 ? _f : {
|
|
287
286
|
top: this.state.offset.y + this.state.offset.height + 2 + 'px',
|
|
288
287
|
left: this.state.offset.x + 'px',
|
|
289
288
|
width: this.state.offset.width,
|
|
@@ -307,9 +306,9 @@ var SelectMultiple = /** @class */ (function (_super) {
|
|
|
307
306
|
_this.props.onChange(newValue);
|
|
308
307
|
}, className: 'button-text-3', style: { color: _list.length ? 'var(--infor-main-color)' : '#00204D99', } }, _list.length && isSelectedAll ? 'Bỏ chọn tất cả' : 'Chọn tất cả');
|
|
309
308
|
})()),
|
|
310
|
-
react_1.default.createElement("div", { className:
|
|
309
|
+
react_1.default.createElement("div", { className: "col ".concat(input_multi_select_module_css_1.default['select-body']) },
|
|
311
310
|
((_g = this.state.search) !== null && _g !== void 0 ? _g : this.state.options).filter(function (e) { return !e.parentId; }).map(function (item) { return _this.renderOptions(item); }),
|
|
312
|
-
(((_h = this.state.search) === null || _h === void 0 ? void 0 : _h.length) === 0 || ((_j = this.props.options) === null || _j === void 0 ? void 0 : _j.length) === 0) && (react_1.default.createElement("div", { className: 'no-results-found' }, "No result found")))), document.body));
|
|
311
|
+
(((_h = this.state.search) === null || _h === void 0 ? void 0 : _h.length) === 0 || ((_j = this.props.options) === null || _j === void 0 ? void 0 : _j.length) === 0) && (react_1.default.createElement("div", { className: input_multi_select_module_css_1.default['no-results-found'] }, "No result found")))), document.body));
|
|
313
312
|
};
|
|
314
313
|
return SelectMultiple;
|
|
315
314
|
}(react_1.default.Component));
|
|
@@ -30,11 +30,10 @@ exports.Pagination = void 0;
|
|
|
30
30
|
var react_1 = __importStar(require("react"));
|
|
31
31
|
var react_paginate_1 = __importDefault(require("react-paginate"));
|
|
32
32
|
var pagination_module_css_1 = __importDefault(require("./pagination.module.css"));
|
|
33
|
-
var react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
34
|
-
var free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
35
33
|
var select1_1 = require("../select1/select1");
|
|
36
34
|
var text_1 = require("../text/text");
|
|
37
35
|
var text_field_1 = require("../text-field/text-field");
|
|
36
|
+
var winicon_1 = require("../wini-icon/winicon");
|
|
38
37
|
function Pagination(_a) {
|
|
39
38
|
var id = _a.id, currentPage = _a.currentPage, itemPerPage = _a.itemPerPage, totalItem = _a.totalItem, onChangePage = _a.onChangePage, _b = _a.hidePageSize, hidePageSize = _b === void 0 ? false : _b, _c = _a.hideGoToPage, hideGoToPage = _c === void 0 ? false : _c, style = _a.style;
|
|
40
39
|
var goToPageRef = (0, react_1.useRef)();
|
|
@@ -64,7 +63,7 @@ function Pagination(_a) {
|
|
|
64
63
|
onChangePage(ev.selected + 1, itemPerPage);
|
|
65
64
|
}, forcePage: currentPage - 1,
|
|
66
65
|
// initialPage={currentPage - 1}
|
|
67
|
-
breakClassName: "row button-text-3", breakLabel: "...", pageCount: Math.ceil(totalItem / itemPerPage), previousClassName: "row", previousLabel: react_1.default.createElement(
|
|
66
|
+
breakClassName: "row button-text-3", breakLabel: "...", pageCount: Math.ceil(totalItem / itemPerPage), previousClassName: "row", previousLabel: react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/left-arrow", size: "1.4rem" }), nextClassName: "row", nextLabel: react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/right-arrow", size: "1.4rem" }), containerClassName: "".concat(pagination_module_css_1.default['pagination'], " row"), pageClassName: "row button-text-3", activeClassName: pagination_module_css_1.default['active'], hrefBuilder: function (pageIndex) {
|
|
68
67
|
return pageIndex >= 1 && pageIndex <= Math.ceil(totalItem / itemPerPage) ? "/page/".concat(pageIndex) : '#';
|
|
69
68
|
}, renderOnZeroPageCount: null }),
|
|
70
69
|
hideGoToPage ? null : react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -18,8 +18,6 @@ exports.ProgressBar = void 0;
|
|
|
18
18
|
var react_1 = require("react");
|
|
19
19
|
require("./progress-bar.css");
|
|
20
20
|
var react_2 = __importDefault(require("react"));
|
|
21
|
-
var react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
22
|
-
var free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
23
21
|
var index_1 = require("../../index");
|
|
24
22
|
function ProgressBar(_a) {
|
|
25
23
|
var id = _a.id, _b = _a.status, status = _b === void 0 ? index_1.ComponentStatus.INFOR : _b, _c = _a.percent, percent = _c === void 0 ? 100 : _c, titleText = _a.titleText, title = _a.title, _d = _a.hideTitle, hideTitle = _d === void 0 ? false : _d, _e = _a.progressBarOnly, progressBarOnly = _e === void 0 ? false : _e, _f = _a.fullColor, fullColor = _f === void 0 ? 'var(--neutral-main-background-color)' : _f, _g = _a.percentColor, percentColor = _g === void 0 ? 'var(--infor-main-color)' : _g, style = _a.style, progressBarStyle = _a.progressBarStyle;
|
|
@@ -28,7 +26,7 @@ function ProgressBar(_a) {
|
|
|
28
26
|
(hideTitle || progressBarOnly) ? null : (title !== null && title !== void 0 ? title : react_2.default.createElement("div", { className: "progress-bar-title row" },
|
|
29
27
|
react_2.default.createElement("div", { className: "heading-text" }, titleText),
|
|
30
28
|
react_2.default.createElement("button", { type: "button", className: "suffix-action", onClick: function () { setOpenDetails(!openDetails); } },
|
|
31
|
-
react_2.default.createElement(
|
|
29
|
+
react_2.default.createElement(index_1.Winicon, { src: openDetails ? "fill/arrows/down-arrow" : "fill/arrows/up-arrow" })))),
|
|
32
30
|
openDetails ? react_2.default.createElement("div", { className: 'progress-bar-tile row' },
|
|
33
31
|
react_2.default.createElement("div", { className: "progress-bar-value", style: __assign({ '--percent-color': percentColor, '--full-color': fullColor, '--percent': "".concat(percent, "%") }, (progressBarStyle !== null && progressBarStyle !== void 0 ? progressBarStyle : {})) }),
|
|
34
32
|
progressBarOnly || status === index_1.ComponentStatus.INFOR ? null : react_2.default.createElement("div", { className: 'status-icon' }, (0, index_1.getStatusIcon)(status)),
|
|
@@ -90,11 +90,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
90
90
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
91
91
|
exports.Select1 = void 0;
|
|
92
92
|
var select1_module_css_1 = __importDefault(require("./select1.module.css"));
|
|
93
|
-
var free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
94
|
-
var react_fontawesome_1 = require("@fortawesome/react-fontawesome");
|
|
95
93
|
var react_1 = __importStar(require("react"));
|
|
96
94
|
var react_dom_1 = __importDefault(require("react-dom"));
|
|
97
95
|
var text_1 = require("../text/text");
|
|
96
|
+
var winicon_1 = require("../wini-icon/winicon");
|
|
98
97
|
;
|
|
99
98
|
var Select1 = /** @class */ (function (_super) {
|
|
100
99
|
__extends(Select1, _super);
|
|
@@ -227,7 +226,7 @@ var Select1 = /** @class */ (function (_super) {
|
|
|
227
226
|
} : function () {
|
|
228
227
|
_this.onSelect(item);
|
|
229
228
|
} },
|
|
230
|
-
((_b = this.state.search) !== null && _b !== void 0 ? _b : this.state.options).some(function (e) { return e.parentId; }) && react_1.default.createElement("div", { className: 'row', style: { width: '1.4rem', height: '1.4rem' } }, children.length ? react_1.default.createElement(
|
|
229
|
+
((_b = this.state.search) !== null && _b !== void 0 ? _b : this.state.options).some(function (e) { return e.parentId; }) && react_1.default.createElement("div", { className: 'row', style: { width: '1.4rem', height: '1.4rem' } }, children.length ? react_1.default.createElement(winicon_1.Winicon, { src: item.isOpen ? "fill/arrows/triangle-down" : "fill/arrows/triangle-right", size: "1.2rem" }) : null),
|
|
231
230
|
react_1.default.createElement(text_1.Text, { className: 'body-3' }, item.name)),
|
|
232
231
|
react_1.default.createElement("div", { className: 'col', style: { display: item.isOpen ? "flex" : "none", width: '100%' } }, children.map(function (e) { return _this.renderOptions(e); })));
|
|
233
232
|
};
|
|
@@ -245,7 +244,7 @@ var Select1 = /** @class */ (function (_super) {
|
|
|
245
244
|
this.inputRef.current.value = "".concat((_d = (_c = this.state.options.find(function (e) { return e.id === _this.state.value; })) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : "");
|
|
246
245
|
//
|
|
247
246
|
if (this.state.isOpen && prevState.isOpen !== this.state.isOpen) {
|
|
248
|
-
var thisPopupRect = (_e = document.body.querySelector(
|
|
247
|
+
var thisPopupRect = (_e = document.body.querySelector(":scope > .".concat(select1_module_css_1.default['select1-popup']))) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect();
|
|
249
248
|
if (thisPopupRect) {
|
|
250
249
|
var style = void 0;
|
|
251
250
|
if (thisPopupRect.right > document.body.offsetWidth) {
|
|
@@ -297,7 +296,7 @@ var Select1 = /** @class */ (function (_super) {
|
|
|
297
296
|
if ((iconRef === null || iconRef === void 0 ? void 0 : iconRef.parentElement) && iconRef.parentElement.getBoundingClientRect().width < 100)
|
|
298
297
|
iconRef.style.display = "none";
|
|
299
298
|
}, className: 'row' },
|
|
300
|
-
react_1.default.createElement(
|
|
299
|
+
react_1.default.createElement(winicon_1.Winicon, { src: this.state.isOpen ? "fill/arrows/up-arrow" : "fill/arrows/down-arrow", size: "1.2rem" })),
|
|
301
300
|
this.state.isOpen &&
|
|
302
301
|
react_dom_1.default.createPortal(react_1.default.createElement("div", { className: "".concat(select1_module_css_1.default['select1-popup'], " col ").concat((_e = this.props.popupClassName) !== null && _e !== void 0 ? _e : ""), style: (_f = this.state.style) !== null && _f !== void 0 ? _f : {
|
|
303
302
|
top: this.state.offset.y + this.state.offset.height + 2 + 'px',
|
|
@@ -22,8 +22,7 @@ exports.CustomSlider = void 0;
|
|
|
22
22
|
var react_1 = __importDefault(require("react"));
|
|
23
23
|
var react_awesome_slider_1 = __importDefault(require("react-awesome-slider"));
|
|
24
24
|
require("./slider.css");
|
|
25
|
-
var
|
|
26
|
-
var free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
|
|
25
|
+
var winicon_1 = require("../wini-icon/winicon");
|
|
27
26
|
var CustomSlider = /** @class */ (function (_super) {
|
|
28
27
|
__extends(CustomSlider, _super);
|
|
29
28
|
function CustomSlider(props) {
|
|
@@ -74,8 +73,8 @@ var CustomSlider = /** @class */ (function (_super) {
|
|
|
74
73
|
clearInterval(this.intervalPlay);
|
|
75
74
|
};
|
|
76
75
|
CustomSlider.prototype.render = function () {
|
|
77
|
-
var _a, _b, _c, _d, _e, _f
|
|
78
|
-
return react_1.default.createElement(react_awesome_slider_1.default, { style: this.props.style, className: "custom-slider-container ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : ''), selected: this.state.page, bullets: false, buttons: this.props.buttons ? (this.props.children && ((_b = this.props.children) === null || _b === void 0 ? void 0 : _b.length) > 1) : false, organicArrows: false, buttonContentLeft: (_c = this.props.prevButton) !== null && _c !== void 0 ? _c : react_1.default.createElement(
|
|
76
|
+
var _a, _b, _c, _d, _e, _f;
|
|
77
|
+
return react_1.default.createElement(react_awesome_slider_1.default, { style: this.props.style, className: "custom-slider-container ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : ''), selected: this.state.page, bullets: false, buttons: this.props.buttons ? (this.props.children && ((_b = this.props.children) === null || _b === void 0 ? void 0 : _b.length) > 1) : false, organicArrows: false, buttonContentLeft: (_c = this.props.prevButton) !== null && _c !== void 0 ? _c : react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/circle-ctrl-left", size: "2.4rem", color: (_d = this.props.iconColor) !== null && _d !== void 0 ? _d : "var(--neutral-absolute-background-color)" }), buttonContentRight: (_e = this.props.nextButton) !== null && _e !== void 0 ? _e : react_1.default.createElement(winicon_1.Winicon, { src: "fill/arrows/circle-ctrl-right", size: "2.4rem", color: (_f = this.props.iconColor) !== null && _f !== void 0 ? _f : "var(--neutral-absolute-background-color)" }) }, this.props.children);
|
|
79
78
|
};
|
|
80
79
|
return CustomSlider;
|
|
81
80
|
}(react_1.default.Component));
|