@citygross/components 0.16.11 → 0.16.13
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/build/cjs/components/src/components/DeliverySlotItem/DeliverySlotItem.js +6 -6
- package/build/cjs/components/src/components/DeliveryTimeBlock/DeliveryTimeBlock.js +3 -4
- package/build/cjs/components/src/components/DeliveryTimeBlock/DeliveryTimeBlock.js.map +1 -1
- package/build/cjs/components/src/components/Modal/Modal.js +4 -3
- package/build/cjs/components/src/components/Modal/Modal.js.map +1 -1
- package/build/cjs/utils/build/index.js +3292 -18308
- package/build/cjs/utils/build/index.js.map +1 -1
- package/build/es/components/src/components/DeliverySlotItem/DeliverySlotItem.js +7 -7
- package/build/es/components/src/components/DeliveryTimeBlock/DeliveryTimeBlock.js +4 -5
- package/build/es/components/src/components/DeliveryTimeBlock/DeliveryTimeBlock.js.map +1 -1
- package/build/es/components/src/components/Modal/Modal.js +4 -3
- package/build/es/components/src/components/Modal/Modal.js.map +1 -1
- package/build/es/utils/build/index.js +3292 -18308
- package/build/es/utils/build/index.js.map +1 -1
- package/package.json +3 -4
- package/build/cjs/_virtual/_commonjsHelpers.js +0 -8
- package/build/cjs/_virtual/_commonjsHelpers.js.map +0 -1
- package/build/es/_virtual/_commonjsHelpers.js +0 -4
- package/build/es/_virtual/_commonjsHelpers.js.map +0 -1
|
@@ -13,14 +13,14 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
13
13
|
|
|
14
14
|
function DeliverySlotItem(_a) {
|
|
15
15
|
var date = _a.date, selected = _a.selected, children = _a.children, onSelect = _a.onSelect, icon = _a.icon;
|
|
16
|
-
var
|
|
16
|
+
var dateInfo = utils.getDateInfo(date);
|
|
17
17
|
var width = utils.useWindowSize().width;
|
|
18
|
-
var _b = React.useState(
|
|
19
|
-
var dayNumber =
|
|
20
|
-
var month =
|
|
18
|
+
var _b = React.useState(dateInfo.day.name.toLocaleLowerCase()), weekDay = _b[0], setWeekDay = _b[1];
|
|
19
|
+
var dayNumber = dateInfo.day.number;
|
|
20
|
+
var month = dateInfo.month.name.toLocaleLowerCase();
|
|
21
21
|
React.useEffect(function () {
|
|
22
|
-
setWeekDay(
|
|
23
|
-
}, [width]);
|
|
22
|
+
setWeekDay(dateInfo.day.name.toLocaleLowerCase());
|
|
23
|
+
}, [dateInfo.day.name, width]);
|
|
24
24
|
var slotRef = React.useRef(null);
|
|
25
25
|
return (React__default["default"].createElement(DeliverySlotItem_styles.DeliverySlotItemContainer, { onClick: onSelect, onKeyDown: function (event) {
|
|
26
26
|
if (event.key === 'Enter') {
|
|
@@ -12,14 +12,13 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
|
|
14
14
|
function DeliveryTimeBlock(_a) {
|
|
15
|
-
var _b,
|
|
16
|
-
var deliveryDate = _a.deliveryDate, deliveryFromTime = _a.deliveryFromTime, deliveryToTime = _a.deliveryToTime, icon = _a.icon, _d = _a.localTimeVar, localTimeVar = _d === void 0 ? 'kl' : _d, deliverOption = _a.deliverOption, children = _a.children;
|
|
15
|
+
var deliveryDate = _a.deliveryDate, deliveryFromTime = _a.deliveryFromTime, deliveryToTime = _a.deliveryToTime, icon = _a.icon, _b = _a.localTimeVar, localTimeVar = _b === void 0 ? 'kl' : _b, deliverOption = _a.deliverOption, children = _a.children;
|
|
17
16
|
return (React__default["default"].createElement(DeliveryTimeBlock_styles.DeliveryTimeBlock, null,
|
|
18
17
|
React__default["default"].createElement(DeliveryTimeBlock_styles.DeliverOption, null,
|
|
19
18
|
icon && icon,
|
|
20
19
|
deliverOption && React__default["default"].createElement(typography.H3, null, deliverOption)),
|
|
21
|
-
React__default["default"].createElement(typography.BodyText, null,
|
|
22
|
-
|
|
20
|
+
React__default["default"].createElement(typography.BodyText, null,
|
|
21
|
+
utils.formatDateToLocale(deliveryDate, false, true),
|
|
23
22
|
' ',
|
|
24
23
|
deliveryFromTime && deliveryToTime && (React__default["default"].createElement("span", { style: { whiteSpace: 'nowrap' } }, "".concat(localTimeVar, " ").concat(deliveryFromTime, " - ").concat(deliveryToTime)))),
|
|
25
24
|
children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliveryTimeBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeliveryTimeBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -30,7 +30,7 @@ var getPortalRoot = function (portalHostSelector) {
|
|
|
30
30
|
var _a;
|
|
31
31
|
if (typeof document === 'undefined')
|
|
32
32
|
return null;
|
|
33
|
-
var hostElement = document.
|
|
33
|
+
var hostElement = document.getElementById(portalHostSelector);
|
|
34
34
|
return (_a = hostElement === null || hostElement === void 0 ? void 0 : hostElement.parentElement) !== null && _a !== void 0 ? _a : document.body;
|
|
35
35
|
};
|
|
36
36
|
var Modal = function (_a) {
|
|
@@ -44,8 +44,9 @@ var Modal = function (_a) {
|
|
|
44
44
|
React.useEffect(function () {
|
|
45
45
|
if (typeof document === 'undefined')
|
|
46
46
|
return;
|
|
47
|
-
var inertElements = Array.from(new Set(inertSelectors.flatMap(function (
|
|
48
|
-
|
|
47
|
+
var inertElements = Array.from(new Set(inertSelectors.flatMap(function (id) {
|
|
48
|
+
var element = document.getElementById(id);
|
|
49
|
+
return element ? [element] : [];
|
|
49
50
|
})));
|
|
50
51
|
var body = document.body;
|
|
51
52
|
var html = document.documentElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|