oolib 2.44.0 → 2.45.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.
- package/dist/components/Accordion/index.d.ts +4 -1
- package/dist/components/Accordion/index.js +35 -36
- package/dist/components/Accordion/styled.d.ts +6 -0
- package/dist/components/Accordion/styled.js +22 -0
- package/dist/components/EmptyStates/config.d.ts +127 -0
- package/dist/components/EmptyStates/config.js +88 -0
- package/dist/components/EmptyStates/index.d.ts +5 -0
- package/dist/components/EmptyStates/index.js +55 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Accordion({ id, HeaderStyle, CustomHeader, noHeader, children, expand: expandProp, setExpand: setExpandProp, title, label }: {
|
|
1
|
+
export function Accordion({ id, HeaderStyle, CustomHeader, noHeader, children, expand: expandProp, setExpand: setExpandProp, title, label, infoTooltip, invert, percent, }: {
|
|
2
2
|
id: any;
|
|
3
3
|
HeaderStyle?: string;
|
|
4
4
|
CustomHeader: any;
|
|
@@ -8,4 +8,7 @@ export function Accordion({ id, HeaderStyle, CustomHeader, noHeader, children, e
|
|
|
8
8
|
setExpand: any;
|
|
9
9
|
title: any;
|
|
10
10
|
label: any;
|
|
11
|
+
infoTooltip: any;
|
|
12
|
+
invert: any;
|
|
13
|
+
percent: any;
|
|
11
14
|
}): any;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
var __assign = (this && this.__assign) || function () {
|
|
7
3
|
__assign = Object.assign || function(t) {
|
|
8
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -42,55 +38,51 @@ exports.Accordion = void 0;
|
|
|
42
38
|
var framer_motion_1 = require("framer-motion");
|
|
43
39
|
var phosphor_react_1 = require("phosphor-react");
|
|
44
40
|
var react_1 = __importStar(require("react"));
|
|
45
|
-
var styled_components_1 = __importStar(require("styled-components"));
|
|
46
41
|
var Buttons_1 = require("../Buttons");
|
|
47
42
|
var Typo_1 = require("../Typo");
|
|
48
|
-
var mixins_1 = require("../../themes/mixins");
|
|
49
43
|
var colors_1 = require("../../themes/colors");
|
|
50
44
|
var utilsOolib_1 = require("../../utilsOolib");
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
45
|
+
var PercentCompletedPie_1 = require("../PercentCompletedPie");
|
|
46
|
+
var Tooltip_1 = require("../Tooltip");
|
|
47
|
+
var styled_1 = require("./styled");
|
|
54
48
|
//this is the new grey background, slim one. with the Caret icon on the right
|
|
55
49
|
//used in access control builder and several other places.
|
|
56
50
|
var HeaderStyle1 = function (_a) {
|
|
57
51
|
var title = _a.title, expand = _a.expand, handleToggle = _a.handleToggle;
|
|
58
|
-
return (react_1.default.createElement(StyledHeaderStyle1Wrapper, { onClick: function () { return handleToggle(!expand); } },
|
|
52
|
+
return (react_1.default.createElement(styled_1.StyledHeaderStyle1Wrapper, { onClick: function () { return handleToggle(!expand); } },
|
|
59
53
|
react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, title),
|
|
60
|
-
react_1.default.createElement(NormalizedButton, null,
|
|
61
|
-
react_1.default.createElement(framer_motion_1.motion.div, { animate: { rotate: expand ? -180 : 0 }, transition: { type:
|
|
54
|
+
react_1.default.createElement(styled_1.NormalizedButton, null,
|
|
55
|
+
react_1.default.createElement(framer_motion_1.motion.div, { animate: { rotate: expand ? -180 : 0 }, transition: { type: 'tween', ease: 'easeOut' } },
|
|
62
56
|
react_1.default.createElement(phosphor_react_1.CaretDown, { size: 16 })))));
|
|
63
57
|
};
|
|
64
|
-
var StyledHeaderStyle3Wrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n ", ";\n &:hover{\n background-color: ", ";\n }\n"], ["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n ", ";\n &:hover{\n background-color: ", ";\n }\n"
|
|
65
|
-
//this is the new grey background, slim one. with the Caret icon on the right
|
|
66
|
-
//used in access control builder and several other places.
|
|
67
|
-
])), colors_1.colors.none, colors_1.colors.greyColor15, (0, mixins_1.transition)('background-color'), colors_1.colors.greyColor3);
|
|
68
58
|
//this is the new grey background, slim one. with the Caret icon on the right
|
|
69
59
|
//used in access control builder and several other places.
|
|
70
60
|
var HeaderStyle3 = function (_a) {
|
|
71
61
|
var title = _a.title, expand = _a.expand, handleToggle = _a.handleToggle;
|
|
72
|
-
return (react_1.default.createElement(StyledHeaderStyle3Wrapper, { onClick: function () { return handleToggle(!expand); } },
|
|
62
|
+
return (react_1.default.createElement(styled_1.StyledHeaderStyle3Wrapper, { onClick: function () { return handleToggle(!expand); } },
|
|
73
63
|
react_1.default.createElement(Typo_1.SERIF_4_5, null, title),
|
|
74
|
-
react_1.default.createElement(NormalizedButton, null,
|
|
75
|
-
react_1.default.createElement(framer_motion_1.motion.div, { animate: { rotate: expand ? -180 : 0 }, transition: { type:
|
|
64
|
+
react_1.default.createElement(styled_1.NormalizedButton, null,
|
|
65
|
+
react_1.default.createElement(framer_motion_1.motion.div, { animate: { rotate: expand ? -180 : 0 }, transition: { type: 'tween', ease: 'easeOut' } },
|
|
76
66
|
react_1.default.createElement(phosphor_react_1.CaretDown, { size: 16 })))));
|
|
77
67
|
};
|
|
78
|
-
var StyledHeaderStyle2Wrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 0; \n background-color: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n ", ";\n /* &:hover{\n background-color: ", ";\n } */\n"], ["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 0; \n background-color: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n ", ";\n /* &:hover{\n background-color: ", ";\n } */\n"
|
|
79
|
-
//analysis dashboard wordcloud - this is the old accordion header style designed at the time of updates module
|
|
80
|
-
])), colors_1.colors.white, colors_1.colors.greyColor10, (0, mixins_1.transition)('background-color'), colors_1.colors.greyColor5);
|
|
81
68
|
//analysis dashboard wordcloud - this is the old accordion header style designed at the time of updates module
|
|
82
69
|
var HeaderStyle2 = function (_a) {
|
|
83
|
-
var title = _a.title, label = _a.label, expand = _a.expand, handleToggle = _a.handleToggle;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
react_1.default.createElement(
|
|
70
|
+
var title = _a.title, label = _a.label, expand = _a.expand, handleToggle = _a.handleToggle, percent = _a.percent, infoTooltip = _a.infoTooltip, invert = _a.invert;
|
|
71
|
+
return (react_1.default.createElement(styled_1.StyledHeaderStyle2Wrapper, { onClick: function () { return handleToggle(!expand); } },
|
|
72
|
+
react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '1rem' } },
|
|
73
|
+
percent &&
|
|
74
|
+
react_1.default.createElement("div", null,
|
|
75
|
+
react_1.default.createElement(PercentCompletedPie_1.PercentCompletedPie, { percent: percent.value })),
|
|
76
|
+
react_1.default.createElement("div", null,
|
|
77
|
+
label && (react_1.default.createElement(Typo_1.LABEL, { style: { color: (0, utilsOolib_1.getPrimaryColor100)(colors_1.colors) } }, label)),
|
|
78
|
+
react_1.default.createElement("div", { style: { display: 'flex', alignItems: 'center', gap: '1rem' } },
|
|
79
|
+
react_1.default.createElement(Typo_1.SERIF_5_6, null,
|
|
80
|
+
react_1.default.createElement(styled_1.StyledTitleSpan, { className: 'StyledTitleSpan' }, title)),
|
|
81
|
+
infoTooltip && (react_1.default.createElement(Tooltip_1.Tooltip, { text: infoTooltip.text || infoTooltip, position: infoTooltip.position || 'right', invert: invert, popOutOfOverflowHiddenParent: infoTooltip.popOutOfOverflowHiddenParent, presetTarget: 'infoIcon' }))))),
|
|
90
82
|
react_1.default.createElement(Buttons_1.ButtonGhost, { icon: expand ? 'Minus' : 'Plus' })));
|
|
91
83
|
};
|
|
92
84
|
var Accordion = function (_a) {
|
|
93
|
-
var id = _a.id, _b = _a.HeaderStyle, HeaderStyle = _b === void 0 ?
|
|
85
|
+
var id = _a.id, _b = _a.HeaderStyle, HeaderStyle = _b === void 0 ? 'HeaderStyle1' : _b, CustomHeader = _a.CustomHeader, _c = _a.noHeader, noHeader = _c === void 0 ? false : _c, children = _a.children, _d = _a.expand, expandProp = _d === void 0 ? false : _d, setExpandProp = _a.setExpand, title = _a.title, label = _a.label, infoTooltip = _a.infoTooltip, invert = _a.invert, percent = _a.percent;
|
|
94
86
|
var _e = (0, react_1.useState)(expandProp), expand = _e[0], setExpand = _e[1];
|
|
95
87
|
var handleToggle = function (bool) {
|
|
96
88
|
setExpand(bool);
|
|
@@ -104,7 +96,7 @@ var Accordion = function (_a) {
|
|
|
104
96
|
var HeaderStyles = {
|
|
105
97
|
HeaderStyle1: HeaderStyle1,
|
|
106
98
|
HeaderStyle2: HeaderStyle2,
|
|
107
|
-
HeaderStyle3: HeaderStyle3
|
|
99
|
+
HeaderStyle3: HeaderStyle3,
|
|
108
100
|
};
|
|
109
101
|
var genHeader = function () {
|
|
110
102
|
if (CustomHeader)
|
|
@@ -112,15 +104,22 @@ var Accordion = function (_a) {
|
|
|
112
104
|
//else
|
|
113
105
|
var HeaderStyleComp = HeaderStyles[HeaderStyle];
|
|
114
106
|
if (!HeaderStyleComp)
|
|
115
|
-
return react_1.default.createElement("div", { style: { padding: '1rem 2rem', background: colors_1.colors.red } },
|
|
116
|
-
react_1.default.createElement(Typo_1.SANS_2, null, 'Incorrect accordion HeaderStyle'));
|
|
117
|
-
return react_1.default.createElement(HeaderStyleComp, __assign({}, {
|
|
107
|
+
return (react_1.default.createElement("div", { style: { padding: '1rem 2rem', background: colors_1.colors.red } },
|
|
108
|
+
react_1.default.createElement(Typo_1.SANS_2, null, 'Incorrect accordion HeaderStyle')));
|
|
109
|
+
return (react_1.default.createElement(HeaderStyleComp, __assign({}, {
|
|
110
|
+
handleToggle: handleToggle,
|
|
111
|
+
expand: expand,
|
|
112
|
+
title: title,
|
|
113
|
+
label: label,
|
|
114
|
+
infoTooltip: infoTooltip,
|
|
115
|
+
invert: invert,
|
|
116
|
+
percent: percent,
|
|
117
|
+
})));
|
|
118
118
|
};
|
|
119
119
|
return (react_1.default.createElement("div", { id: id },
|
|
120
120
|
//unless header is explicitly disabled, generate it
|
|
121
121
|
!noHeader && genHeader(),
|
|
122
|
-
react_1.default.createElement(StyledAccordionContentsWrapper, { initial: { height: expand ?
|
|
122
|
+
react_1.default.createElement(styled_1.StyledAccordionContentsWrapper, { initial: { height: expand ? 'auto' : 0 }, animate: { height: expand ? 'auto' : 0 }, transition: { type: 'tween', ease: 'easeOut' } },
|
|
123
123
|
react_1.default.createElement("div", null, children))));
|
|
124
124
|
};
|
|
125
125
|
exports.Accordion = Accordion;
|
|
126
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.StyledTitleSpan = exports.NormalizedButton = exports.StyledHeaderStyle3Wrapper = exports.StyledHeaderStyle2Wrapper = exports.StyledHeaderStyle1Wrapper = exports.StyledAccordionContentsWrapper = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
var framer_motion_1 = require("framer-motion");
|
|
13
|
+
var themes_1 = require("../../themes");
|
|
14
|
+
var mixins_1 = require("../../themes/mixins");
|
|
15
|
+
var greyColor100 = themes_1.colors.greyColor100;
|
|
16
|
+
exports.StyledAccordionContentsWrapper = (0, styled_components_1.default)(framer_motion_1.motion.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n overflow: hidden;\n \n"], ["\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n overflow: hidden;\n \n"])));
|
|
17
|
+
exports.StyledHeaderStyle1Wrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n background-color: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n ", ";\n &:hover{\n background-color: ", ";\n }\n"], ["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n background-color: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n ", ";\n &:hover{\n background-color: ", ";\n }\n"])), themes_1.colors.greyColor5, themes_1.colors.greyColor10, (0, mixins_1.transition)('background-color'), themes_1.colors.greyColor10);
|
|
18
|
+
exports.StyledHeaderStyle2Wrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n background-color: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n ", ";\n &:hover {\n .StyledTitleSpan {\n background-size: 0 100%;\n }\n }\n"], ["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n background-color: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n ", ";\n &:hover {\n .StyledTitleSpan {\n background-size: 0 100%;\n }\n }\n"])), themes_1.colors.white, themes_1.colors.greyColor10, (0, mixins_1.transition)('background-color'));
|
|
19
|
+
exports.StyledHeaderStyle3Wrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n ", ";\n &:hover{\n background-color: ", ";\n }\n"], ["\n display: flex; \n align-items: center; \n justify-content: space-between; \n padding: 1rem 2rem; \n\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n ", ";\n &:hover{\n background-color: ", ";\n }\n"])), themes_1.colors.none, themes_1.colors.greyColor15, (0, mixins_1.transition)('background-color'), themes_1.colors.greyColor3);
|
|
20
|
+
exports.NormalizedButton = styled_components_1.default.button(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n border: none;\n background-color: ", ";\n"], ["\n border: none;\n background-color: ", ";\n"])), themes_1.colors.none);
|
|
21
|
+
exports.StyledTitleSpan = styled_components_1.default.span(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-size: 100% 100%;\n background-image: \n linear-gradient(\n 180deg,\n transparent 95%,\n ", " \n );\n background-repeat: no-repeat;\n ", "\n"], ["\n background-size: 100% 100%;\n background-image: \n linear-gradient(\n 180deg,\n transparent 95%,\n ", " \n );\n background-repeat: no-repeat;\n ", "\n"])), greyColor100, (0, mixins_1.transition)("background-size 0.5s"));
|
|
22
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
export namespace emptyStatesConfig {
|
|
2
|
+
namespace contentListing {
|
|
3
|
+
const layout: string;
|
|
4
|
+
const img: string;
|
|
5
|
+
const imgSize: number;
|
|
6
|
+
const title: string;
|
|
7
|
+
const subTitle: string;
|
|
8
|
+
}
|
|
9
|
+
namespace draftsListing {
|
|
10
|
+
const layout_1: string;
|
|
11
|
+
export { layout_1 as layout };
|
|
12
|
+
const img_1: string;
|
|
13
|
+
export { img_1 as img };
|
|
14
|
+
const imgSize_1: number;
|
|
15
|
+
export { imgSize_1 as imgSize };
|
|
16
|
+
const title_1: string;
|
|
17
|
+
export { title_1 as title };
|
|
18
|
+
const subTitle_1: string;
|
|
19
|
+
export { subTitle_1 as subTitle };
|
|
20
|
+
export namespace action {
|
|
21
|
+
const btnText: string;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
namespace publishedListing {
|
|
25
|
+
const layout_2: string;
|
|
26
|
+
export { layout_2 as layout };
|
|
27
|
+
const img_2: string;
|
|
28
|
+
export { img_2 as img };
|
|
29
|
+
const imgSize_2: number;
|
|
30
|
+
export { imgSize_2 as imgSize };
|
|
31
|
+
const title_2: string;
|
|
32
|
+
export { title_2 as title };
|
|
33
|
+
const subTitle_2: string;
|
|
34
|
+
export { subTitle_2 as subTitle };
|
|
35
|
+
export namespace action_1 {
|
|
36
|
+
const btnText_1: string;
|
|
37
|
+
export { btnText_1 as btnText };
|
|
38
|
+
}
|
|
39
|
+
export { action_1 as action };
|
|
40
|
+
}
|
|
41
|
+
namespace inModerationListing {
|
|
42
|
+
const layout_3: string;
|
|
43
|
+
export { layout_3 as layout };
|
|
44
|
+
const img_3: string;
|
|
45
|
+
export { img_3 as img };
|
|
46
|
+
const imgSize_3: number;
|
|
47
|
+
export { imgSize_3 as imgSize };
|
|
48
|
+
const title_3: string;
|
|
49
|
+
export { title_3 as title };
|
|
50
|
+
const subTitle_3: string;
|
|
51
|
+
export { subTitle_3 as subTitle };
|
|
52
|
+
export namespace action_2 {
|
|
53
|
+
const btnText_2: string;
|
|
54
|
+
export { btnText_2 as btnText };
|
|
55
|
+
}
|
|
56
|
+
export { action_2 as action };
|
|
57
|
+
}
|
|
58
|
+
namespace underMyModeration {
|
|
59
|
+
const layout_4: string;
|
|
60
|
+
export { layout_4 as layout };
|
|
61
|
+
const img_4: string;
|
|
62
|
+
export { img_4 as img };
|
|
63
|
+
const imgSize_4: number;
|
|
64
|
+
export { imgSize_4 as imgSize };
|
|
65
|
+
const title_4: string;
|
|
66
|
+
export { title_4 as title };
|
|
67
|
+
const subTitle_4: string;
|
|
68
|
+
export { subTitle_4 as subTitle };
|
|
69
|
+
}
|
|
70
|
+
namespace underOthersModeration {
|
|
71
|
+
const layout_5: string;
|
|
72
|
+
export { layout_5 as layout };
|
|
73
|
+
const img_5: string;
|
|
74
|
+
export { img_5 as img };
|
|
75
|
+
const imgSize_5: number;
|
|
76
|
+
export { imgSize_5 as imgSize };
|
|
77
|
+
const title_5: string;
|
|
78
|
+
export { title_5 as title };
|
|
79
|
+
const subTitle_5: string;
|
|
80
|
+
export { subTitle_5 as subTitle };
|
|
81
|
+
}
|
|
82
|
+
namespace awaitingMod {
|
|
83
|
+
const layout_6: string;
|
|
84
|
+
export { layout_6 as layout };
|
|
85
|
+
const img_6: string;
|
|
86
|
+
export { img_6 as img };
|
|
87
|
+
const imgSize_6: number;
|
|
88
|
+
export { imgSize_6 as imgSize };
|
|
89
|
+
const title_6: string;
|
|
90
|
+
export { title_6 as title };
|
|
91
|
+
const subTitle_6: string;
|
|
92
|
+
export { subTitle_6 as subTitle };
|
|
93
|
+
}
|
|
94
|
+
namespace searchListing {
|
|
95
|
+
const layout_7: string;
|
|
96
|
+
export { layout_7 as layout };
|
|
97
|
+
const img_7: string;
|
|
98
|
+
export { img_7 as img };
|
|
99
|
+
const title_7: string;
|
|
100
|
+
export { title_7 as title };
|
|
101
|
+
const subTitle_7: string;
|
|
102
|
+
export { subTitle_7 as subTitle };
|
|
103
|
+
export namespace additionalAction {
|
|
104
|
+
const text: string;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
namespace searchDashBoardListing {
|
|
108
|
+
const layout_8: string;
|
|
109
|
+
export { layout_8 as layout };
|
|
110
|
+
const img_8: string;
|
|
111
|
+
export { img_8 as img };
|
|
112
|
+
const title_8: string;
|
|
113
|
+
export { title_8 as title };
|
|
114
|
+
const subTitle_8: string;
|
|
115
|
+
export { subTitle_8 as subTitle };
|
|
116
|
+
}
|
|
117
|
+
namespace learningModule {
|
|
118
|
+
const layout_9: string;
|
|
119
|
+
export { layout_9 as layout };
|
|
120
|
+
const img_9: string;
|
|
121
|
+
export { img_9 as img };
|
|
122
|
+
const title_9: string;
|
|
123
|
+
export { title_9 as title };
|
|
124
|
+
const subTitle_9: string;
|
|
125
|
+
export { subTitle_9 as subTitle };
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emptyStatesConfig = void 0;
|
|
4
|
+
exports.emptyStatesConfig = {
|
|
5
|
+
contentListing: {
|
|
6
|
+
layout: "center",
|
|
7
|
+
img: "contentListing",
|
|
8
|
+
imgSize: 80,
|
|
9
|
+
title: "No Content Added",
|
|
10
|
+
subTitle: "Once you publish any content on the platform, it shows up here. You can edit published content in future, when required. "
|
|
11
|
+
},
|
|
12
|
+
draftsListing: {
|
|
13
|
+
layout: "left",
|
|
14
|
+
img: "draftsListing",
|
|
15
|
+
imgSize: 80,
|
|
16
|
+
title: "No Drafts Found",
|
|
17
|
+
subTitle: "Once you publish any content on the platform, it shows up here. You can edit published content in future, when required.",
|
|
18
|
+
action: {
|
|
19
|
+
// route: "/choose-template",
|
|
20
|
+
btnText: "Start Writing",
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
publishedListing: {
|
|
24
|
+
layout: "left",
|
|
25
|
+
img: "publishedListing",
|
|
26
|
+
imgSize: 80,
|
|
27
|
+
title: "No published content found",
|
|
28
|
+
subTitle: "Once you publish any content on the platform, it shows up here. You can edit published content in future, when required.",
|
|
29
|
+
action: {
|
|
30
|
+
// route: "/choose-template",
|
|
31
|
+
btnText: "Start Writing",
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
inModerationListing: {
|
|
35
|
+
layout: "left",
|
|
36
|
+
img: "moderationListing",
|
|
37
|
+
imgSize: 80,
|
|
38
|
+
title: "No content sent for moderation",
|
|
39
|
+
subTitle: "Once you publish any content on the platform, it shows up here. You can edit published content in future, when required.",
|
|
40
|
+
action: {
|
|
41
|
+
// route: "/choose-template",
|
|
42
|
+
btnText: "Start Writing",
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
underMyModeration: {
|
|
46
|
+
layout: "left",
|
|
47
|
+
img: "moderationListing",
|
|
48
|
+
imgSize: 80,
|
|
49
|
+
title: "No published content under my moderation",
|
|
50
|
+
subTitle: "Once you publish any content on the platform, it shows up here. You can edit published content in future, when required."
|
|
51
|
+
},
|
|
52
|
+
underOthersModeration: {
|
|
53
|
+
layout: "left",
|
|
54
|
+
img: "moderationListing",
|
|
55
|
+
imgSize: 80,
|
|
56
|
+
title: "No published content under others moderation",
|
|
57
|
+
subTitle: "Once you publish any content on the platform, it shows up here. You can edit published content in future, when required."
|
|
58
|
+
},
|
|
59
|
+
awaitingMod: {
|
|
60
|
+
layout: "left",
|
|
61
|
+
img: "moderationListing",
|
|
62
|
+
imgSize: 80,
|
|
63
|
+
title: "No published content under awaiting moderation",
|
|
64
|
+
subTitle: "Once you publish any content on the platform, it shows up here. You can edit published content in future, when required."
|
|
65
|
+
},
|
|
66
|
+
searchListing: {
|
|
67
|
+
layout: "center",
|
|
68
|
+
img: "searchListing",
|
|
69
|
+
title: "Cant find any content for",
|
|
70
|
+
subTitle: "Sorry we couldn’t find any matches for this. Please make sure the words are spelled correctly",
|
|
71
|
+
additionalAction: {
|
|
72
|
+
// onClick: action,
|
|
73
|
+
text: 'Clear Search'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
searchDashBoardListing: {
|
|
77
|
+
layout: "center",
|
|
78
|
+
img: "searchListing",
|
|
79
|
+
title: "No search results found",
|
|
80
|
+
subTitle: "Once you publish any content on the platform, it shows up here. You can edit published content in future, when required. "
|
|
81
|
+
},
|
|
82
|
+
learningModule: {
|
|
83
|
+
layout: "center",
|
|
84
|
+
img: "learningModule",
|
|
85
|
+
title: "No lesson added",
|
|
86
|
+
subTitle: "Looks like no lesson module has been assigned to you. Reach out to your Change leader and discuss what modules you'd like to study. "
|
|
87
|
+
}
|
|
88
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.EmptyStates = void 0;
|
|
11
|
+
var react_1 = __importDefault(require("react"));
|
|
12
|
+
var Container_1 = require("../Container");
|
|
13
|
+
var Typo_1 = require("../Typo");
|
|
14
|
+
var Buttons_1 = require("../Buttons");
|
|
15
|
+
var mixins_1 = require("../../themes/mixins");
|
|
16
|
+
var Wrappers_1 = require("../Wrappers");
|
|
17
|
+
var OKELink_1 = require("../OKELink");
|
|
18
|
+
var Paddings_1 = require("../Paddings");
|
|
19
|
+
var config_1 = require("./config");
|
|
20
|
+
var publishedListing_svg_1 = __importDefault(require("./images/publishedListing.svg"));
|
|
21
|
+
var contentListing_svg_1 = __importDefault(require("./images/contentListing.svg"));
|
|
22
|
+
var draftsListing_svg_1 = __importDefault(require("./images/draftsListing.svg"));
|
|
23
|
+
var moderationListing_svg_1 = __importDefault(require("./images/moderationListing.svg"));
|
|
24
|
+
var inPublishedSearch_svg_1 = __importDefault(require("./images/inPublishedSearch.svg"));
|
|
25
|
+
var learningModule_svg_1 = __importDefault(require("./images/learningModule.svg"));
|
|
26
|
+
var searchListing_svg_1 = __importDefault(require("./images/searchListing.svg"));
|
|
27
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
28
|
+
var StyledContainer = (0, styled_components_1.default)(Container_1.Container)(templateObject_1 || (templateObject_1 = __makeTemplateObject([" \n padding: ", "; \n display: ", ";\n justify-content: 'center'; \n text-align: ", ";\n ", "{\n padding: ", ";\n }\n"], [" \n padding: ", "; \n display: ", ";\n justify-content: 'center'; \n text-align: ", ";\n ", "{\n padding: ", ";\n }\n"])), function (props) { return props.layout === "center" ? '2rem 0rem' : '4rem 0'; }, function (props) { return props.layout === "center" && "flex"; }, function (props) { return props.layout === "center" && "center"; }, (0, mixins_1.mediaQuery)("sm"), function (props) { return props.layout === "center" ? "4rem 0" : "6rem 0"; });
|
|
29
|
+
var EmptyStates = function (_a) {
|
|
30
|
+
var preset = _a.preset, actionOnClick = _a.actionOnClick, additionalActionOnClick = _a.additionalActionOnClick;
|
|
31
|
+
var _b = config_1.emptyStatesConfig[preset], img = _b.img, imgSize = _b.imgSize, title = _b.title, subTitle = _b.subTitle, action = _b.action, additionalAction = _b.additionalAction, layout = _b.layout;
|
|
32
|
+
var imgConfig = {
|
|
33
|
+
publishedListing: publishedListing_svg_1.default,
|
|
34
|
+
contentListing: contentListing_svg_1.default,
|
|
35
|
+
draftsListing: draftsListing_svg_1.default,
|
|
36
|
+
moderationListing: moderationListing_svg_1.default,
|
|
37
|
+
inPublishedSearch: inPublishedSearch_svg_1.default,
|
|
38
|
+
learningModule: learningModule_svg_1.default,
|
|
39
|
+
searchListing: searchListing_svg_1.default
|
|
40
|
+
};
|
|
41
|
+
return (react_1.default.createElement(StyledContainer, { layout: layout },
|
|
42
|
+
react_1.default.createElement(Wrappers_1.Wrapper650, { style: { margin: layout === "center" ? "auto" : 0 } },
|
|
43
|
+
img && (react_1.default.createElement("img", { src: imgConfig[img], alt: '', style: {
|
|
44
|
+
opacity: layout === "center" ? '0.6' : '0.5',
|
|
45
|
+
height: imgSize ? imgSize + 'px' : '120px'
|
|
46
|
+
} })),
|
|
47
|
+
title && react_1.default.createElement(Typo_1.SERIF_5_6, { style: { marginTop: '2rem' } }, title),
|
|
48
|
+
subTitle && react_1.default.createElement(Typo_1.SANS_3_4, { style: { marginTop: '1rem' } }, subTitle),
|
|
49
|
+
additionalAction && (react_1.default.createElement(Paddings_1.PaddingTop10, null,
|
|
50
|
+
react_1.default.createElement(Typo_1.SANS_3, null,
|
|
51
|
+
react_1.default.createElement(OKELink_1.OKELink, { to: "#", onClick: additionalActionOnClick }, additionalAction.text))))),
|
|
52
|
+
action && (react_1.default.createElement(Buttons_1.ButtonPrimary, { onClick: actionOnClick, style: { marginTop: '2rem', opacity: '1' } }, action === null || action === void 0 ? void 0 : action.btnText))));
|
|
53
|
+
};
|
|
54
|
+
exports.EmptyStates = EmptyStates;
|
|
55
|
+
var templateObject_1;
|
package/dist/index.d.ts
CHANGED
|
@@ -30,5 +30,6 @@ export { SkeletonLoader } from "./components/LoadersAndProgress/SkeletonLoader";
|
|
|
30
30
|
export { ModalConfirm } from "./components/Modals/derivedComps/ModalConfirm";
|
|
31
31
|
export { ModalLarge } from "./components/Modals/ModalLarge";
|
|
32
32
|
export { ModalSmall } from "./components/Modals/ModalSmall";
|
|
33
|
+
export { EmptyStates } from "./components/EmptyStates";
|
|
33
34
|
export { HintsProvider } from "./components/Hints/contextApi";
|
|
34
35
|
export { LoaderCircle, ProgressBar, LoaderCircle as Loader, LoaderOverlay } from "./components/LoadersAndProgress";
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.HintsProvider = exports.ModalSmall = exports.ModalLarge = exports.ModalConfirm = exports.SkeletonLoader = exports.Divider = exports.PercentCompletedPie = exports.Accordion = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.LoaderOverlay = exports.Loader = exports.ProgressBar = exports.LoaderCircle = exports.icons = exports.colors = exports.GlobalStyles = void 0;
|
|
17
|
+
exports.HintsProvider = exports.EmptyStates = exports.ModalSmall = exports.ModalLarge = exports.ModalConfirm = exports.SkeletonLoader = exports.Divider = exports.PercentCompletedPie = exports.Accordion = exports.ActionMenu = exports.Tooltip = exports.OKELink = exports.UserRoleBadge = exports.Section = exports.LoaderOverlay = exports.Loader = exports.ProgressBar = exports.LoaderCircle = exports.icons = exports.colors = exports.GlobalStyles = void 0;
|
|
18
18
|
//css and styling related ( styled-components )
|
|
19
19
|
var globalStyles_1 = require("./globalStyles");
|
|
20
20
|
Object.defineProperty(exports, "GlobalStyles", { enumerable: true, get: function () { return globalStyles_1.GlobalStyles; } });
|
|
@@ -70,6 +70,8 @@ var ModalLarge_1 = require("./components/Modals/ModalLarge");
|
|
|
70
70
|
Object.defineProperty(exports, "ModalLarge", { enumerable: true, get: function () { return ModalLarge_1.ModalLarge; } });
|
|
71
71
|
var ModalSmall_1 = require("./components/Modals/ModalSmall");
|
|
72
72
|
Object.defineProperty(exports, "ModalSmall", { enumerable: true, get: function () { return ModalSmall_1.ModalSmall; } });
|
|
73
|
+
var EmptyStates_1 = require("./components/EmptyStates");
|
|
74
|
+
Object.defineProperty(exports, "EmptyStates", { enumerable: true, get: function () { return EmptyStates_1.EmptyStates; } });
|
|
73
75
|
//// context
|
|
74
76
|
var contextApi_1 = require("./components/Hints/contextApi");
|
|
75
77
|
Object.defineProperty(exports, "HintsProvider", { enumerable: true, get: function () { return contextApi_1.HintsProvider; } });
|