oolib 2.174.1 → 2.175.0
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.
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export function getEmptyStatesConfig({ preset, title, contentTypeTitle, commaSeparatedTags }: {
|
|
1
|
+
export function getEmptyStatesConfig({ preset, title, contentTypeTitle, commaSeparatedTags, localize }: {
|
|
2
2
|
preset: any;
|
|
3
3
|
title: any;
|
|
4
4
|
contentTypeTitle: any;
|
|
5
5
|
commaSeparatedTags: any;
|
|
6
|
+
localize: any;
|
|
6
7
|
}): {
|
|
7
8
|
align: string;
|
|
8
9
|
image: {
|
|
@@ -13,7 +14,7 @@ export function getEmptyStatesConfig({ preset, title, contentTypeTitle, commaSep
|
|
|
13
14
|
};
|
|
14
15
|
};
|
|
15
16
|
title: string;
|
|
16
|
-
subtitle:
|
|
17
|
+
subtitle: any;
|
|
17
18
|
imageSize?: undefined;
|
|
18
19
|
button?: undefined;
|
|
19
20
|
link?: undefined;
|
|
@@ -28,7 +29,7 @@ export function getEmptyStatesConfig({ preset, title, contentTypeTitle, commaSep
|
|
|
28
29
|
};
|
|
29
30
|
imageSize: number;
|
|
30
31
|
title: string;
|
|
31
|
-
subtitle:
|
|
32
|
+
subtitle: any;
|
|
32
33
|
button?: undefined;
|
|
33
34
|
link?: undefined;
|
|
34
35
|
} | {
|
|
@@ -78,7 +79,7 @@ export function getEmptyStatesConfig({ preset, title, contentTypeTitle, commaSep
|
|
|
78
79
|
height?: undefined;
|
|
79
80
|
};
|
|
80
81
|
};
|
|
81
|
-
title:
|
|
82
|
+
title: any;
|
|
82
83
|
subtitle: string;
|
|
83
84
|
link: {
|
|
84
85
|
text: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEmptyStatesConfig = void 0;
|
|
4
4
|
var getEmptyStatesConfig = function (_a) {
|
|
5
|
-
var preset = _a.preset, title = _a.title, contentTypeTitle = _a.contentTypeTitle, commaSeparatedTags = _a.commaSeparatedTags;
|
|
5
|
+
var preset = _a.preset, title = _a.title, contentTypeTitle = _a.contentTypeTitle, commaSeparatedTags = _a.commaSeparatedTags, localize = _a.localize;
|
|
6
6
|
switch (preset) {
|
|
7
7
|
case "multipleCollectionsListing":
|
|
8
8
|
return {
|
|
@@ -15,7 +15,7 @@ var getEmptyStatesConfig = function (_a) {
|
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
title: "No tags added",
|
|
18
|
-
subtitle: "Publishing under ".concat(commaSeparatedTags, " shows all tagged content here, You can edit published content in future, when required."),
|
|
18
|
+
subtitle: localize("Publishing under <word1 : ".concat(commaSeparatedTags, "> shows all tagged content here, You can edit published content in future, when required.")),
|
|
19
19
|
};
|
|
20
20
|
case "multiplePublishingListing":
|
|
21
21
|
return {
|
|
@@ -41,7 +41,7 @@ var getEmptyStatesConfig = function (_a) {
|
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
43
|
title: "No ".concat(contentTypeTitle === null || contentTypeTitle === void 0 ? void 0 : contentTypeTitle.toLowerCase(), " Added"),
|
|
44
|
-
subtitle: "Publishing under ".concat(contentTypeTitle === null || contentTypeTitle === void 0 ? void 0 : contentTypeTitle.toLowerCase(), " shows your content here, You can edit published content in future, when required."),
|
|
44
|
+
subtitle: localize("Publishing under <word1 : ".concat(contentTypeTitle === null || contentTypeTitle === void 0 ? void 0 : contentTypeTitle.toLowerCase(), "> shows your content here, You can edit published content in future, when required.")),
|
|
45
45
|
};
|
|
46
46
|
case "singleCollectionsListing":
|
|
47
47
|
return {
|
|
@@ -55,7 +55,7 @@ var getEmptyStatesConfig = function (_a) {
|
|
|
55
55
|
},
|
|
56
56
|
imageSize: 80,
|
|
57
57
|
title: "No ".concat(contentTypeTitle === null || contentTypeTitle === void 0 ? void 0 : contentTypeTitle.toLowerCase(), " Added"),
|
|
58
|
-
subtitle: "Publishing under ".concat(contentTypeTitle === null || contentTypeTitle === void 0 ? void 0 : contentTypeTitle.toLowerCase(), " shows your content here, You can edit published content in future, when required."),
|
|
58
|
+
subtitle: localize("Publishing under <word1 : ".concat(contentTypeTitle === null || contentTypeTitle === void 0 ? void 0 : contentTypeTitle.toLowerCase(), "> shows your content here, You can edit published content in future, when required.")),
|
|
59
59
|
};
|
|
60
60
|
case "profileListing":
|
|
61
61
|
return {
|
|
@@ -202,7 +202,7 @@ var getEmptyStatesConfig = function (_a) {
|
|
|
202
202
|
opacity: 0.6,
|
|
203
203
|
},
|
|
204
204
|
},
|
|
205
|
-
title: "Cant find any content for ".concat(contentTypeTitle),
|
|
205
|
+
title: localize("Cant find any content for <word1 : ".concat(contentTypeTitle, ">")),
|
|
206
206
|
subtitle: "Sorry we couldn’t find any matches for this. Please make sure the words are spelled correctly",
|
|
207
207
|
link: {
|
|
208
208
|
// onClick: action,
|
|
@@ -7,14 +7,17 @@ exports.EmptyStates = void 0;
|
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var EmptyStatesRenderer_1 = require("./comps/EmptyStatesRenderer");
|
|
9
9
|
var config_1 = require("./config");
|
|
10
|
+
var utilsOolib_1 = require("../../utilsOolib");
|
|
10
11
|
var EmptyStates = function (_a) {
|
|
11
12
|
var _b = _a.preset, preset = _b === void 0 ? "multiplePublishingListing" : _b, contentTypeTitle = _a.contentTypeTitle, titleProp = _a.title, tags = _a.tags, onClick = _a.onClick;
|
|
12
13
|
var commaSeparatedTags = tags === null || tags === void 0 ? void 0 : tags.map(function (item) { return item.toLowerCase(); }).join(",");
|
|
14
|
+
var localize = (0, utilsOolib_1.useLocale)();
|
|
13
15
|
var _c = (0, config_1.getEmptyStatesConfig)({
|
|
14
16
|
preset: preset,
|
|
15
17
|
contentTypeTitle: contentTypeTitle,
|
|
16
18
|
commaSeparatedTags: commaSeparatedTags,
|
|
17
|
-
title: titleProp
|
|
19
|
+
title: titleProp,
|
|
20
|
+
localize: localize
|
|
18
21
|
}), image = _c.image, title = _c.title, subtitle = _c.subtitle, link = _c.link, button = _c.button, align = _c.align;
|
|
19
22
|
return (react_1.default.createElement(EmptyStatesRenderer_1.EmptyStatesRenderer, { image: image, align: align, title: title, subtitle: subtitle, link: link, button: button, onClick: onClick, preset: preset }));
|
|
20
23
|
};
|