@react-pakistan/util-functions 1.23.43 → 1.23.45
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.
|
@@ -17,6 +17,7 @@ var dayjs_1 = __importDefault(require("dayjs"));
|
|
|
17
17
|
var get_number_of_days_in_month_1 = require("./get-number-of-days-in-month");
|
|
18
18
|
var getCalendarCurrentMonth = function (_a) {
|
|
19
19
|
var month = _a.month, year = _a.year;
|
|
20
|
+
var today = new Date().getDate();
|
|
20
21
|
return __spreadArray([], Array((0, get_number_of_days_in_month_1.getNumberOfDaysInMonth)({
|
|
21
22
|
year: year,
|
|
22
23
|
month: month,
|
|
@@ -24,6 +25,7 @@ var getCalendarCurrentMonth = function (_a) {
|
|
|
24
25
|
date: (0, dayjs_1.default)("".concat(year, "-").concat(month, "-").concat(index + 1)).format('YYYY-MM-DD'),
|
|
25
26
|
dayOfMonth: index + 1,
|
|
26
27
|
isCurrentMonth: true,
|
|
28
|
+
isToday: !!(today === index + 1),
|
|
27
29
|
}); });
|
|
28
30
|
};
|
|
29
31
|
exports.getCalendarCurrentMonth = getCalendarCurrentMonth;
|
package/hooks/with-seo.js
CHANGED
|
@@ -10,43 +10,23 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
15
|
};
|
|
36
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
17
|
exports.withSEO = void 0;
|
|
38
|
-
var react_1 =
|
|
39
|
-
var
|
|
18
|
+
var react_1 = __importDefault(require("react"));
|
|
19
|
+
var script_1 = __importDefault(require("next/script"));
|
|
40
20
|
var withSEO = function (Component, rest) {
|
|
41
21
|
var EnhancedComponent = function () { return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
42
22
|
react_1.default.createElement(Component, __assign({}, rest)),
|
|
43
|
-
rest.organizationJsonLd && (react_1.default.createElement(
|
|
23
|
+
rest.organizationJsonLd && (react_1.default.createElement(script_1.default, { id: 'organization-schema', type: 'application/ld+json', dangerouslySetInnerHTML: {
|
|
44
24
|
__html: JSON.stringify(rest.organizationJsonLd),
|
|
45
25
|
} })),
|
|
46
|
-
rest.breadcrumbJsonLd && (react_1.default.createElement(
|
|
26
|
+
rest.breadcrumbJsonLd && (react_1.default.createElement(script_1.default, { id: 'breadcrumb-schema', type: 'application/ld+json', dangerouslySetInnerHTML: {
|
|
47
27
|
__html: JSON.stringify(rest.breadcrumbJsonLd),
|
|
48
28
|
} })),
|
|
49
|
-
rest.faqJsonLd && (react_1.default.createElement(
|
|
29
|
+
rest.faqJsonLd && (react_1.default.createElement(script_1.default, { id: 'faq-schema', type: 'application/ld+json', dangerouslySetInnerHTML: {
|
|
50
30
|
__html: JSON.stringify(rest.faqJsonLd),
|
|
51
31
|
} })))); };
|
|
52
32
|
return EnhancedComponent;
|