react-jupiter 5.9.67 → 5.9.68
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/accordion/index.js +5 -5
- package/accordion/index.styles.js +4 -4
- package/accordion/panel.js +16 -16
- package/avatar/index.js +12 -12
- package/avatar/index.styles.js +5 -5
- package/avatar/theme.js +4 -4
- package/button/index.js +16 -16
- package/button/index.styles.js +30 -30
- package/button/theme.js +4 -4
- package/button/utils.js +3 -3
- package/card/card-template/index.js +13 -13
- package/card/card-template/index.stories.js +49 -49
- package/card/card-template/index.style.js +11 -11
- package/card/card-template/index.test.js +23 -23
- package/card/event-card/constants.js +3 -3
- package/card/event-card/event-card-label/index.js +6 -6
- package/card/event-card/event-card-label/index.style.js +3 -3
- package/card/event-card/event-card-label/index.test.js +7 -7
- package/card/event-card/index.js +78 -78
- package/card/event-card/index.stories.js +51 -51
- package/card/event-card/index.style.js +22 -22
- package/card/event-card/index.test.js +17 -17
- package/card/index.js +2 -2
- package/card/organization-card/index.js +17 -17
- package/card/organization-card/index.stories.js +4 -4
- package/card/organization-card/index.style.js +3 -3
- package/card/organization-card/index.test.js +6 -6
- package/card/orgnizer-card/buttons.js +30 -30
- package/card/orgnizer-card/index.js +77 -77
- package/card/orgnizer-card/index.stories.js +5 -5
- package/card/orgnizer-card/index.style.js +10 -10
- package/cover/index.js +25 -25
- package/cover/index.style.js +6 -6
- package/display/index.js +11 -11
- package/display/index.style.js +16 -16
- package/file-item/fileImgIcon.js +8 -8
- package/file-item/fileImgsFont.js +3 -3
- package/file-item/index.js +36 -36
- package/file-item/index.style.js +11 -11
- package/file-item/theme.js +4 -4
- package/file-item/utils.js +1 -1
- package/form/captcha/index.js +29 -29
- package/form/captcha/index.stories.js +4 -4
- package/form/captcha/index.style.js +6 -6
- package/form/captcha/index.test.js +14 -14
- package/form/checkbox/checkbox-option.js +12 -12
- package/form/checkbox/checkbox.js +16 -16
- package/form/checkbox/index.js +2 -2
- package/form/checkbox/index.stories.js +14 -14
- package/form/checkbox/index.style.js +11 -11
- package/form/dropdown/index.js +2 -2
- package/form/dropdown/index.stories.js +18 -18
- package/form/dropdown/index.style.js +14 -14
- package/form/dropdown/index.test.js +6 -6
- package/form/dropdown/option.js +6 -6
- package/form/dropdown/select.js +17 -17
- package/form/errorMsg.js +7 -7
- package/form/index.js +2 -2
- package/form/radio/index.js +2 -2
- package/form/radio/index.stories.js +14 -14
- package/form/radio/index.style.js +12 -12
- package/form/radio/radio-option.js +12 -12
- package/form/radio/radio.js +17 -17
- package/form/text-input/index.js +33 -33
- package/form/text-input/index.stories.js +5 -5
- package/form/text-input/index.style.js +12 -12
- package/form/text-input/index.test.js +16 -16
- package/form/textarea/index.js +15 -15
- package/form/textarea/index.stories.js +7 -7
- package/form/textarea/index.style.js +10 -10
- package/form/theme.js +4 -4
- package/form-v7/captcha/index.js +37 -37
- package/form-v7/captcha/index.stories.js +9 -9
- package/form-v7/captcha/index.style.js +6 -6
- package/form-v7/captcha/index.test.js +14 -14
- package/form-v7/checkbox/checkbox-option.js +12 -12
- package/form-v7/checkbox/checkbox.js +18 -18
- package/form-v7/checkbox/index.js +2 -2
- package/form-v7/checkbox/index.stories.js +27 -27
- package/form-v7/checkbox/index.style.js +11 -11
- package/form-v7/dropdown/index.js +2 -2
- package/form-v7/dropdown/index.stories.js +32 -32
- package/form-v7/dropdown/index.style.js +14 -14
- package/form-v7/dropdown/index.test.js +6 -6
- package/form-v7/dropdown/option.js +6 -6
- package/form-v7/dropdown/select.js +20 -20
- package/form-v7/errorMsg.js +7 -7
- package/form-v7/file-input/index.js +25 -25
- package/form-v7/file-input/index.stories.js +7 -7
- package/form-v7/file-input/index.style.js +13 -13
- package/form-v7/file-input/index.test.js +16 -16
- package/form-v7/form/index.stories.js +52 -53
- package/form-v7/index.js +2 -2
- package/form-v7/index.style.js +1 -1
- package/form-v7/label/index.js +9 -9
- package/form-v7/label/index.style.js +4 -4
- package/form-v7/radio/index.js +2 -2
- package/form-v7/radio/index.stories.js +24 -24
- package/form-v7/radio/index.style.js +12 -12
- package/form-v7/radio/radio-option.js +12 -12
- package/form-v7/radio/radio.js +18 -18
- package/form-v7/text-input/index.js +27 -23
- package/form-v7/text-input/index.stories.js +14 -14
- package/form-v7/text-input/index.style.js +11 -11
- package/form-v7/text-input/index.test.js +16 -16
- package/form-v7/textarea/index.js +17 -17
- package/form-v7/textarea/index.stories.js +15 -15
- package/form-v7/textarea/index.style.js +10 -10
- package/form-v7/theme.js +4 -4
- package/globalStyle.js +3 -3
- package/icon/iconFont.js +3 -3
- package/icon/index.js +18 -18
- package/icon/index.styles.js +8 -8
- package/icon/theme.js +4 -4
- package/icons/index.js +9 -9
- package/icons/index.style.js +8 -8
- package/icons/theme.js +3 -3
- package/icons/utils.js +9 -9
- package/index.js +3 -3
- package/modal/index.js +21 -22
- package/modal/index.style.js +4 -4
- package/modal/theme.js +4 -4
- package/numeric-summery-report/index.js +10 -10
- package/numeric-summery-report/index.style.js +3 -3
- package/package.json +1 -1
- package/product-menu/index.js +2 -2
- package/product-menu/index.style.js +15 -15
- package/product-menu/menu-item.js +6 -6
- package/product-menu/menu.js +12 -12
- package/product-menu/theme.js +4 -4
- package/product-owner/index.js +42 -42
- package/product-owner/index.style.js +3 -3
- package/product-properties/index.js +19 -19
- package/product-properties/index.style.js +5 -5
- package/product-properties/product-property/index.js +13 -13
- package/product-properties/product-property/index.style.js +3 -3
- package/progress-bar/index.js +16 -16
- package/progress-bar/index.styles.js +8 -8
- package/responsive/index.js +13 -13
- package/show-date/index.js +10 -10
- package/spacing/index.js +2 -2
- package/spacing/margin/index.js +5 -5
- package/spacing/padding/index.js +5 -5
- package/table/actionCell.js +18 -18
- package/table/index.js +21 -21
- package/table/index.style.js +14 -14
- package/table/tableHeaderRow.js +9 -9
- package/table/tableRow.js +15 -15
- package/table/theme.js +4 -4
- package/tabs/index.js +2 -2
- package/tabs/index.style.js +10 -10
- package/tabs/tabPanel.js +5 -5
- package/tabs/tabs.js +22 -22
- package/tabs/theme.js +4 -4
- package/themes.js +3 -3
- package/titled-avatar/index.js +14 -14
- package/titled-avatar/index.style.js +5 -5
- package/typography/heading/index.js +12 -12
- package/typography/heading/index.stories.js +30 -30
- package/typography/heading/index.styles.js +31 -31
- package/typography/heading/index.test.js +42 -42
- package/typography/index.js +2 -2
- package/typography/link/index.js +23 -23
- package/typography/link/index.stories.js +5 -5
- package/typography/link/index.styles.js +4 -4
- package/typography/link/index.test.js +14 -14
- package/typography/paragraph/index.js +12 -12
- package/typography/paragraph/index.stories.js +4 -4
- package/typography/paragraph/index.styles.js +7 -7
- package/typography/paragraph/index.test.js +15 -15
- package/typography/text/index.js +40 -40
- package/typography/text/index.stories.js +19 -19
- package/typography/text/index.styles.js +36 -36
- package/typography/text/index.test.js +86 -86
- package/typography/theme.js +4 -4
- package/typography/utils.js +6 -6
- package/utils/date.js +2 -2
- package/utils/detectMobile.js +2 -2
- package/utils/index.js +2 -2
- package/utils/media-query.js +4 -4
- package/utils/numbers.js +4 -4
- package/utils/test.js +5 -5
- package/utils/theme.js +9 -9
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _templateObject,_styledComponents=_interopRequireDefault(require("styled-components"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _taggedTemplateLiteral(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _templateObject,_styledComponents=_interopRequireDefault(require("styled-components"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _taggedTemplateLiteral(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}
|
|
2
2
|
|
|
3
|
-
TemplateContainer=_styledComponents.default.section(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: ",";\n border-radius: ",";\n overflow: hidden;\n ",";\n box-shadow: ",";\n text-decoration: none;\n transition: ",";\n ",";\n\n &:hover {\n ",";\n }\n"])),
|
|
3
|
+
const TemplateContainer=_styledComponents.default.section(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: flex;\n flex-direction: ",";\n border-radius: ",";\n overflow: hidden;\n ",";\n box-shadow: ",";\n text-decoration: none;\n transition: ",";\n ",";\n\n &:hover {\n ",";\n }\n"])),
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
(a)=>{let{direction:b}=a;return"vertical"===b?"column":"row"},
|
|
6
|
+
(a)=>{let{theme:b}=a;return"".concat(b.borderRadius.low,"px")},
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
(a)=>{let{maxWidth:b}=a;return b?"max-width: ".concat(b,"px"):""},
|
|
9
|
+
(a)=>{let{theme:b,level:c}=a;return"0 0 ".concat(
|
|
10
10
|
b.shadows[c].blur,"px ").concat(b.shadows[c].spread,"px rgba(0, 0, 0, ").concat(b.shadows[c].opacity,")")},
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
(a)=>{let{theme:b}=a;return"all ".concat(b.animation.time,"s ").concat(b.animation.method)},
|
|
14
|
+
(a)=>{let{background:b}=a;return b?"background: url(".concat(b,") bottom left / 142px no-repeat"):""},
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
(a)=>{let{theme:b,level:c,hoverToLevel:d}=a;return(
|
|
18
18
|
d>c?"box-shadow: 0 0 ".concat(
|
|
19
19
|
b.shadows[d].blur,"px ").concat(b.shadows[d].spread,"px rgba(0, 0, 0, ").concat(b.shadows[d].opacity,")"):
|
|
20
|
-
"")})
|
|
20
|
+
"")});var _default=exports.default=
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
TemplateContainer;
|
|
25
|
+
TemplateContainer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var _react=_interopRequireDefault(require("react")),_enzyme=require("enzyme");require("jest-styled-components");var _index=_interopRequireDefault(require("./index")),_typography=require("../../typography"),_test=_interopRequireDefault(require("../../utils/test")),_themes=_interopRequireDefault(require("../../themes"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}
|
|
1
|
+
"use strict";var _react=_interopRequireDefault(require("react")),_enzyme=require("enzyme");require("jest-styled-components");var _index=_interopRequireDefault(require("./index")),_typography=require("../../typography"),_test=_interopRequireDefault(require("../../utils/test")),_themes=_interopRequireDefault(require("../../themes"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}const
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
setupShallow=function(){
|
|
10
|
+
setupShallow=function(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return(
|
|
11
11
|
(0,_enzyme.shallow)(/*#__PURE__*/
|
|
12
12
|
_react.default.createElement(_index.default,_extends({
|
|
13
13
|
level:a.level,
|
|
@@ -16,12 +16,12 @@ maxWidth:a.maxWidth,
|
|
|
16
16
|
linkTo:a.linkTo},
|
|
17
17
|
a),
|
|
18
18
|
|
|
19
|
-
a.children
|
|
19
|
+
a.children
|
|
20
|
+
)
|
|
21
|
+
))},
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
setupMount=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return(
|
|
24
|
+
setupMount=function(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return(
|
|
25
25
|
(0,_enzyme.mount)(/*#__PURE__*/
|
|
26
26
|
_react.default.createElement(_index.default,_extends({
|
|
27
27
|
level:a.level,
|
|
@@ -30,23 +30,23 @@ maxWidth:a.maxWidth,
|
|
|
30
30
|
linkTo:a.linkTo},
|
|
31
31
|
a),
|
|
32
32
|
|
|
33
|
-
a.children
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
a.children
|
|
34
|
+
)
|
|
35
|
+
))};
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
describe("Card Template",
|
|
39
|
-
it("should render correctly",
|
|
38
|
+
describe("Card Template",()=>{
|
|
39
|
+
it("should render correctly",()=>{const
|
|
40
40
|
a=setupShallow({
|
|
41
41
|
level:2,
|
|
42
42
|
hoverToLevel:3,
|
|
43
43
|
children:/*#__PURE__*/_react.default.createElement(_typography.Text,null,"\u06CC\u06A9 \u0645\u062A\u0646 \u062A\u0633\u062A\u06CC")
|
|
44
44
|
}),
|
|
45
45
|
b=(0,_test.default)(a,"card-template");
|
|
46
|
-
expect(b.length).toBe(1)
|
|
46
|
+
expect(b.length).toBe(1)
|
|
47
47
|
}),
|
|
48
48
|
|
|
49
|
-
it("should render correctly with link wrapper",
|
|
49
|
+
it("should render correctly with link wrapper",()=>{const
|
|
50
50
|
a=setupShallow({
|
|
51
51
|
level:2,
|
|
52
52
|
hoverToLevel:3,
|
|
@@ -54,10 +54,10 @@ linkTo:"/link-address",
|
|
|
54
54
|
children:/*#__PURE__*/_react.default.createElement(_typography.Text,null,"\u06CC\u06A9 \u0645\u062A\u0646 \u062A\u0633\u062A\u06CC")
|
|
55
55
|
}),
|
|
56
56
|
b=(0,_test.default)(a,"card-template-link-wrapper");
|
|
57
|
-
expect(b.length).toBe(1)
|
|
57
|
+
expect(b.length).toBe(1)
|
|
58
58
|
}),
|
|
59
59
|
|
|
60
|
-
it("should has correct style",
|
|
60
|
+
it("should has correct style",()=>{const
|
|
61
61
|
a={
|
|
62
62
|
level:1,
|
|
63
63
|
hoverToLevel:3,
|
|
@@ -67,19 +67,19 @@ maxWidth:300
|
|
|
67
67
|
b=setupMount(a);
|
|
68
68
|
expect(b).toHaveStyleRule(
|
|
69
69
|
"box-shadow","0 0 ".concat(
|
|
70
|
-
_themes.default.shadows[1].blur,"px ").concat(_themes.default.shadows[1].spread,"px rgba(0,0,0,").concat(_themes.default.shadows[1].opacity,")")
|
|
71
|
-
|
|
70
|
+
_themes.default.shadows[1].blur,"px ").concat(_themes.default.shadows[1].spread,"px rgba(0,0,0,").concat(_themes.default.shadows[1].opacity,")")
|
|
71
|
+
),
|
|
72
72
|
expect(b).toHaveStyleRule(
|
|
73
73
|
"box-shadow","0 0 ".concat(
|
|
74
74
|
_themes.default.shadows[3].blur,"px ").concat(_themes.default.shadows[3].spread,"px rgba(0,0,0,").concat(_themes.default.shadows[3].opacity,")"),
|
|
75
75
|
{
|
|
76
76
|
modifier:":hover"
|
|
77
|
-
}
|
|
78
|
-
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
79
|
expect(b).toHaveStyleRule(
|
|
80
80
|
"border-radius","".concat(
|
|
81
|
-
_themes.default.borderRadius.low,"px")
|
|
82
|
-
|
|
83
|
-
expect(b).toHaveStyleRule("max-width","".concat(a.maxWidth,"px"))
|
|
84
|
-
})
|
|
81
|
+
_themes.default.borderRadius.low,"px")
|
|
82
|
+
),
|
|
83
|
+
expect(b).toHaveStyleRule("max-width","".concat(a.maxWidth,"px"))
|
|
84
|
+
})
|
|
85
85
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VERTICAL_CARD=exports.HORIZONTAL_MOBILE_CARD=exports.HORIZONTAL_CARD=void 0;
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VERTICAL_CARD=exports.HORIZONTAL_MOBILE_CARD=exports.HORIZONTAL_CARD=void 0;const VERTICAL_CARD=exports.VERTICAL_CARD="vertical",
|
|
2
|
+
HORIZONTAL_CARD=exports.HORIZONTAL_CARD="horizontal",
|
|
3
|
+
HORIZONTAL_MOBILE_CARD=exports.HORIZONTAL_MOBILE_CARD="horizontal-mobile";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_index=_interopRequireDefault(require("./index.style"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(require("react")),_propTypes=_interopRequireDefault(require("prop-types")),_index=_interopRequireDefault(require("./index.style"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}const
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -7,18 +7,18 @@ adsLabelUrl="https://evand-storage.oss-eu-central-1.aliyuncs.com/assets/images/o
|
|
|
7
7
|
|
|
8
8
|
finishedLabelUrl="https://evand-storage.oss-eu-central-1.aliyuncs.com/assets/images/other/finished-text-label.svg",
|
|
9
9
|
|
|
10
|
-
EventCardLabel=
|
|
10
|
+
EventCardLabel=(a)=>{let{type:b}=a;
|
|
11
11
|
switch(b){
|
|
12
12
|
case"ads":
|
|
13
13
|
return/*#__PURE__*/_react.default.createElement(_index.default,{src:adsLabelUrl,"data-test":"ads-label"});
|
|
14
14
|
case"finished":
|
|
15
15
|
default:
|
|
16
|
-
return/*#__PURE__*/_react.default.createElement(_index.default,{src:finishedLabelUrl,"data-test":"finished-label"})
|
|
17
|
-
|
|
16
|
+
return/*#__PURE__*/_react.default.createElement(_index.default,{src:finishedLabelUrl,"data-test":"finished-label"})
|
|
17
|
+
}
|
|
18
18
|
};// const adsLabelUrl = require('../../../../docs/assets/ads-label.svg');
|
|
19
19
|
|
|
20
20
|
EventCardLabel.propTypes={
|
|
21
21
|
type:_propTypes.default.oneOf(["ads","finished"]).isRequired
|
|
22
|
-
};var _default=
|
|
22
|
+
};var _default=exports.default=
|
|
23
23
|
|
|
24
|
-
EventCardLabel;
|
|
24
|
+
EventCardLabel;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _templateObject,_styledComponents=_interopRequireDefault(require("styled-components"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _taggedTemplateLiteral(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _templateObject,_styledComponents=_interopRequireDefault(require("styled-components"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _taggedTemplateLiteral(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}
|
|
2
2
|
|
|
3
|
-
ImageLabel=_styledComponents.default.img(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: inline-block;\n margin-left: 12px;\n // margin-bottom: 5px;\n width: 33px;\n"])))
|
|
3
|
+
const ImageLabel=_styledComponents.default.img(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: inline-block;\n margin-left: 12px;\n // margin-bottom: 5px;\n width: 33px;\n"])));var _default=exports.default=
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
ImageLabel;
|
|
10
|
+
ImageLabel;
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const setupShallow=(a)=>{let{type:b}=a;return(
|
|
8
8
|
(0,_enzyme.shallow)(/*#__PURE__*/_react.default.createElement(_index.default,{type:b})))};
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
describe("EventCardLabel component",
|
|
12
|
-
it("Should render ads label",
|
|
11
|
+
describe("EventCardLabel component",()=>{
|
|
12
|
+
it("Should render ads label",()=>{const
|
|
13
13
|
a=setupShallow({type:"ads"}),
|
|
14
14
|
b=(0,_test.default)(a,"ads-label");
|
|
15
|
-
expect(b.length).toBe(1)
|
|
15
|
+
expect(b.length).toBe(1)
|
|
16
16
|
}),
|
|
17
17
|
|
|
18
|
-
it("Should render finished label",
|
|
18
|
+
it("Should render finished label",()=>{const
|
|
19
19
|
a=setupShallow({type:"finished"}),
|
|
20
20
|
b=(0,_test.default)(a,"finished-label");
|
|
21
|
-
expect(b.length).toBe(1)
|
|
22
|
-
})
|
|
21
|
+
expect(b.length).toBe(1)
|
|
22
|
+
})
|
|
23
23
|
});
|
package/card/event-card/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_propTypes=_interopRequireWildcard(require("prop-types")),_globalStyle=_interopRequireDefault(require("../../globalStyle")),_constants=require("./constants"),_showDate=_interopRequireDefault(require("../../show-date")),_typography=require("../../typography"),_titledAvatar=_interopRequireDefault(require("../../titled-avatar")),_eventCardLabel=_interopRequireDefault(require("./event-card-label")),_index=require("./index.style"),_icon=_interopRequireDefault(require("../../icon"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(b,c){if(!c&&b&&b.__esModule)return b;if(null===b||"object"!=typeof b&&"function"!=typeof b)return{default:b};var d=_getRequireWildcardCache(c);if(d&&d.has(b))return d.get(b);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in b)if("default"!=a&&Object.prototype.hasOwnProperty.call(b,a)){var g=f?Object.getOwnPropertyDescriptor(b,a):null;g&&(g.get||g.set)?Object.defineProperty(e,a,g):e[a]=b[a]}return e.default=b,d&&d.set(b,e),e}function _extends(){return _extends=Object.assign?Object.assign.bind():function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}const
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -27,9 +27,28 @@
|
|
|
27
27
|
|
|
28
28
|
finishedClockLabelUrl="https://evand-storage.oss-eu-central-1.aliyuncs.com/assets/images/other/finished-clock-label.svg",
|
|
29
29
|
defaultCoverUrl="https://static.evand.net/assets/images/defaults/event-cover.jpg",
|
|
30
|
-
EventCard=
|
|
30
|
+
EventCard=(a)=>{const
|
|
31
|
+
{
|
|
32
|
+
title:b,
|
|
33
|
+
bookmarked:c,
|
|
34
|
+
type:d,
|
|
35
|
+
price:e,
|
|
36
|
+
place:f,
|
|
37
|
+
date:g,
|
|
38
|
+
cover:h,
|
|
39
|
+
ads:i,
|
|
40
|
+
finished:j,
|
|
41
|
+
partnership:k,
|
|
42
|
+
organization:l,
|
|
43
|
+
renderEventLink:m,
|
|
44
|
+
renderOrganizationLink:n,
|
|
45
|
+
clickBookmark:o,
|
|
46
|
+
showDate:p,
|
|
47
|
+
coverImage:q,
|
|
48
|
+
...r
|
|
49
|
+
}=a,
|
|
50
|
+
[s,t]=(0,_react.useState)(c),
|
|
31
51
|
|
|
32
|
-
b=
|
|
33
52
|
|
|
34
53
|
|
|
35
54
|
|
|
@@ -37,48 +56,29 @@ b=
|
|
|
37
56
|
|
|
38
57
|
|
|
39
58
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
a.title,c=a.bookmarked,d=a.type,e=a.price,f=a.place,g=a.date,h=a.cover,i=a.ads,j=a.finished,k=a.partnership,l=a.organization,m=a.renderEventLink,n=a.renderOrganizationLink,o=a.clickBookmark,p=a.showDate,q=a.coverImage,r=_objectWithoutProperties(a,_excluded),s=
|
|
50
|
-
(0,_react.useState)(c),t=_slicedToArray(s,2),u=t[0],v=t[1],
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
w=[
|
|
59
|
+
u=[
|
|
60
60
|
{iconName:"place",text:f},
|
|
61
|
-
{iconName:"ticket",text:e}]
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
{iconName:"ticket",text:e}];// date param used on main evand and because it wrong to use moment-jalali in react jupiter
|
|
62
|
+
// we ommmit it in evand-next and use showDate param instead but its still used in evand
|
|
63
|
+
// TODO: remove date params if no longer needed (in evand project)
|
|
64
|
+
// TODO: remove ShowDate component and remove used places
|
|
65
|
+
// TODO: remove moment-jalali from this package after removing ShowDate
|
|
66
|
+
// in new form of event-card we dont show organazation info as a titled-avatar
|
|
67
|
+
// TODO: if the new form was accepted and remove old one from evand clean these parts
|
|
68
|
+
l&&"unset"===l.logo&&u.push({iconName:"supervisor-account",text:l.name});const v=()=>{const a=o();
|
|
69
69
|
!1!==a&&
|
|
70
|
-
|
|
70
|
+
t(!s)
|
|
71
71
|
|
|
72
72
|
},
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
w=()=>/*#__PURE__*/
|
|
75
75
|
_react.default.createElement(_index.VerticalCardContainer,_extends({
|
|
76
76
|
direction:d,
|
|
77
77
|
hoverToLevel:3,
|
|
78
78
|
maxWidth:270},
|
|
79
79
|
r),
|
|
80
80
|
|
|
81
|
-
m(q||/*#__PURE__*/_react.default.createElement(_index.VerticalCover,{"data-test":"vertical-cover",src:h||defaultCoverUrl,loading:"lazy",onError:
|
|
81
|
+
m(q||/*#__PURE__*/_react.default.createElement(_index.VerticalCover,{"data-test":"vertical-cover",src:h||defaultCoverUrl,loading:"lazy",onError:(a)=>{a.target.onerror=null,a.target.src=defaultCoverUrl}})),/*#__PURE__*/
|
|
82
82
|
_react.default.createElement(_index.VerticalContentContainer,{
|
|
83
83
|
"data-test":"vertical-content",
|
|
84
84
|
background:j?finishedClockLabelUrl:null},/*#__PURE__*/
|
|
@@ -92,32 +92,32 @@ j&&/*#__PURE__*/_react.default.createElement(_eventCardLabel.default,{type:"fini
|
|
|
92
92
|
_react.default.createElement(_index.PartnershipBox,null,/*#__PURE__*/
|
|
93
93
|
_react.default.createElement(_icon.default,{name:null===k||void 0===k?void 0:k.status,color:"yellow",stickyLeft:!0,marginRight:3}),
|
|
94
94
|
" ",
|
|
95
|
-
"colleague"===(null===k||void 0===k?void 0:k.status)?"\u0647\u0645\u06A9\u0627\u0631":"\u0647\u0645\u06CC\u0627\u0631"
|
|
96
|
-
|
|
95
|
+
"colleague"===(null===k||void 0===k?void 0:k.status)?"\u0647\u0645\u06A9\u0627\u0631":"\u0647\u0645\u06CC\u0627\u0631"
|
|
96
|
+
),
|
|
97
97
|
|
|
98
98
|
g&&/*#__PURE__*/_react.default.createElement(_showDate.default,{date:g,color:"gray",fontSize:"12"}),
|
|
99
99
|
p&&/*#__PURE__*/
|
|
100
|
-
_react.default.createElement(_typography.Text,{size:"12",color:"gray","data-test":"show-date"},p)
|
|
101
|
-
|
|
100
|
+
_react.default.createElement(_typography.Text,{size:"12",color:"gray","data-test":"show-date"},p)
|
|
102
101
|
|
|
102
|
+
),/*#__PURE__*/
|
|
103
103
|
_react.default.createElement(_index.BookmarkIcon,{
|
|
104
|
-
name:
|
|
104
|
+
name:s?"bookmark":"bookmark-border",
|
|
105
105
|
size:"lg",
|
|
106
106
|
color:"gray",
|
|
107
|
-
onClick:
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
onClick:v}
|
|
108
|
+
)
|
|
109
|
+
),
|
|
110
110
|
m(/*#__PURE__*/_react.default.createElement(_index.VerticalTitle,{level:2,size:"sm"},b)),/*#__PURE__*/
|
|
111
|
-
_react.default.createElement(_index.VerticalPlacePrice,{list:
|
|
112
|
-
|
|
111
|
+
_react.default.createElement(_index.VerticalPlacePrice,{list:u})
|
|
112
|
+
),
|
|
113
113
|
l&&"unset"!==l.logo&&/*#__PURE__*/
|
|
114
|
-
_react.default.createElement(_titledAvatar.default,{title:l.name,titleSize:10,avatar:l.logo,avatarSize:"sm",renderAvatarLink:n})
|
|
114
|
+
_react.default.createElement(_titledAvatar.default,{title:l.name,titleSize:10,avatar:l.logo,avatarSize:"sm",renderAvatarLink:n})
|
|
115
115
|
|
|
116
|
+
)
|
|
117
|
+
),
|
|
116
118
|
|
|
117
119
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
z=function renderHorizontalCard(){return/*#__PURE__*/(
|
|
120
|
+
x=()=>/*#__PURE__*/
|
|
121
121
|
_react.default.createElement(_index.HorizontalCardContainer,_extends({
|
|
122
122
|
direction:d,
|
|
123
123
|
hoverToLevel:3,
|
|
@@ -132,24 +132,24 @@ j&&/*#__PURE__*/_react.default.createElement(_eventCardLabel.default,{type:"fini
|
|
|
132
132
|
!j&&i&&/*#__PURE__*/_react.default.createElement(_eventCardLabel.default,{type:"ads"}),
|
|
133
133
|
g&&/*#__PURE__*/_react.default.createElement(_showDate.default,{date:g,color:"gray",fontSize:"12"}),
|
|
134
134
|
p&&/*#__PURE__*/
|
|
135
|
-
_react.default.createElement(_typography.Text,{size:"12",color:"gray","data-test":"show-date"},p)
|
|
136
|
-
|
|
135
|
+
_react.default.createElement(_typography.Text,{size:"12",color:"gray","data-test":"show-date"},p)
|
|
137
136
|
|
|
137
|
+
),/*#__PURE__*/
|
|
138
138
|
_react.default.createElement(_index.BookmarkIcon,{
|
|
139
|
-
name:
|
|
139
|
+
name:s?"bookmark":"bookmark-border",
|
|
140
140
|
size:"lg",
|
|
141
141
|
color:"gray",
|
|
142
|
-
onClick:
|
|
143
|
-
"data-test":
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
onClick:v,
|
|
143
|
+
"data-test":s?"bookmark":"bookmark-border"}
|
|
144
|
+
)
|
|
145
|
+
),
|
|
146
146
|
m(/*#__PURE__*/_react.default.createElement(_index.HorizontalTitle,{level:2,size:"sm"},b)),/*#__PURE__*/
|
|
147
|
-
_react.default.createElement(_index.HorizontalPlacePrice,{list:
|
|
147
|
+
_react.default.createElement(_index.HorizontalPlacePrice,{list:u,isHorizontal:!0})
|
|
148
|
+
)
|
|
149
|
+
),
|
|
148
150
|
|
|
149
151
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
A=function renderHorizontalMobileCard(){return/*#__PURE__*/(
|
|
152
|
+
y=()=>/*#__PURE__*/
|
|
153
153
|
_react.default.createElement(_index.HorizontalCardContainer,_extends({
|
|
154
154
|
direction:d,
|
|
155
155
|
hoverToLevel:3,
|
|
@@ -164,21 +164,21 @@ j&&/*#__PURE__*/_react.default.createElement(_eventCardLabel.default,{type:"fini
|
|
|
164
164
|
!j&&i&&/*#__PURE__*/_react.default.createElement(_eventCardLabel.default,{type:"ads"}),
|
|
165
165
|
g&&/*#__PURE__*/_react.default.createElement(_showDate.default,{date:g,color:"gray",fontSize:"10"}),
|
|
166
166
|
p&&/*#__PURE__*/
|
|
167
|
-
_react.default.createElement(_typography.Text,{size:"10",color:"gray","data-test":"show-date"},p)
|
|
168
|
-
|
|
167
|
+
_react.default.createElement(_typography.Text,{size:"10",color:"gray","data-test":"show-date"},p)
|
|
169
168
|
|
|
169
|
+
),/*#__PURE__*/
|
|
170
170
|
_react.default.createElement(_index.BookmarkIcon,{
|
|
171
|
-
name:
|
|
171
|
+
name:s?"bookmark":"bookmark-border",
|
|
172
172
|
size:"sm",
|
|
173
173
|
color:"gray",
|
|
174
|
-
onClick:
|
|
175
|
-
"data-test":
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
onClick:v,
|
|
175
|
+
"data-test":s?"bookmark":"bookmark-border"}
|
|
176
|
+
)
|
|
177
|
+
),
|
|
178
178
|
m(/*#__PURE__*/_react.default.createElement(_index.HorizontalTitle,{level:4,size:"sm"},b)),/*#__PURE__*/
|
|
179
|
-
_react.default.createElement(_index.HorizontalPlacePrice,{list:
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
_react.default.createElement(_index.HorizontalPlacePrice,{list:u,isHorizontal:!0})
|
|
180
|
+
)
|
|
181
|
+
);
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
|
|
@@ -197,8 +197,8 @@ _react.default.createElement(_index.HorizontalPlacePrice,{list:w,isHorizontal:!0
|
|
|
197
197
|
return/*#__PURE__*/(
|
|
198
198
|
_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/
|
|
199
199
|
_react.default.createElement(_globalStyle.default,null),
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
(()=>{const{type:b}=a;switch(b){case _constants.HORIZONTAL_CARD:return x(a);case _constants.HORIZONTAL_MOBILE_CARD:return y(a);case _constants.VERTICAL_CARD:default:return w(a)}})()
|
|
201
|
+
))
|
|
202
202
|
|
|
203
203
|
};
|
|
204
204
|
|
|
@@ -210,8 +210,8 @@ price:_propTypes.default.string.isRequired,
|
|
|
210
210
|
place:_propTypes.default.string.isRequired,
|
|
211
211
|
date:_propTypes.default.oneOfType([
|
|
212
212
|
_propTypes.default.string,
|
|
213
|
-
_propTypes.default.object]
|
|
214
|
-
|
|
213
|
+
_propTypes.default.object]
|
|
214
|
+
),
|
|
215
215
|
showDate:_propTypes.default.string,
|
|
216
216
|
cover:_propTypes.default.string,
|
|
217
217
|
ads:_propTypes.default.bool,
|
|
@@ -221,8 +221,8 @@ _propTypes.default.shape({
|
|
|
221
221
|
name:_propTypes.default.string.isRequired,
|
|
222
222
|
logo:_propTypes.default.string
|
|
223
223
|
}),
|
|
224
|
-
_propTypes.default.undefined]
|
|
225
|
-
|
|
224
|
+
_propTypes.default.undefined]
|
|
225
|
+
),
|
|
226
226
|
renderEventLink:_propTypes.default.func.isRequired,
|
|
227
227
|
renderOrganizationLink:_propTypes.default.func,
|
|
228
228
|
clickBookmark:_propTypes.default.func.isRequired,
|
|
@@ -239,13 +239,13 @@ type:_constants.VERTICAL_CARD,
|
|
|
239
239
|
ads:!1,
|
|
240
240
|
finished:!1,
|
|
241
241
|
organization:void 0,
|
|
242
|
-
renderOrganizationLink:
|
|
242
|
+
renderOrganizationLink:()=>!1,
|
|
243
243
|
date:"",
|
|
244
244
|
showDate:"",
|
|
245
245
|
partnership:{
|
|
246
246
|
status:""
|
|
247
247
|
},
|
|
248
248
|
coverImage:null
|
|
249
|
-
};var _default=
|
|
249
|
+
};var _default=exports.default=
|
|
250
250
|
|
|
251
|
-
EventCard;
|
|
251
|
+
EventCard;
|