@coorpacademy/components 10.4.6 → 10.5.2
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/es/atom/autocomplete/style.css +4 -4
- package/es/atom/button/style.css +1 -1
- package/es/atom/card-image-preview/test/fixtures.js +15 -0
- package/es/atom/card-image-preview/test/fixtures.js.map +1 -0
- package/es/atom/catalog-section/style.css +1 -1
- package/es/atom/clue/style.css +2 -2
- package/es/atom/cta/style.css +1 -1
- package/es/atom/difficulty-level/style.css +1 -1
- package/es/atom/drag-and-drop/style.css +6 -5
- package/es/atom/input-checkbox/style.css +1 -1
- package/es/atom/input-doublestep/style.css +5 -5
- package/es/atom/input-html/input-preview.css +2 -2
- package/es/atom/input-html/style.css +2 -2
- package/es/atom/input-readonly/style.css +3 -3
- package/es/atom/input-search/style.css +1 -1
- package/es/atom/input-switch/style.css +2 -2
- package/es/atom/input-text/style.css +5 -5
- package/es/atom/input-textarea/style.css +5 -5
- package/es/atom/life/style.css +1 -1
- package/es/atom/notification/style.css +1 -1
- package/es/atom/radio-group/item.css +1 -1
- package/es/atom/resource-miniature/style.css +1 -1
- package/es/atom/select/style.css +7 -7
- package/es/atom/slide/style.css +1 -1
- package/es/molecule/add-to-my-list/style.css +3 -3
- package/es/molecule/audio/style.css +1 -1
- package/es/molecule/battle-request/style.css +4 -4
- package/es/molecule/brand-card/description.css +1 -1
- package/es/molecule/brand-card/style.css +2 -2
- package/es/molecule/brand-card-create/style.css +1 -1
- package/es/molecule/brand-create-form/style.css +6 -6
- package/es/molecule/brand-download-box/style.css +2 -2
- package/es/molecule/brand-tabs/style.css +1 -1
- package/es/molecule/brand-upload-box/style.css +2 -2
- package/es/molecule/breadcrumbs/style.css +3 -3
- package/es/molecule/card/customer.css +1 -1
- package/es/molecule/card/favorite.css +1 -1
- package/es/molecule/card/notification.css +1 -1
- package/es/molecule/card/style.css +1 -1
- package/es/molecule/card/test/fixtures.js +2 -0
- package/es/molecule/card/test/fixtures.js.map +1 -1
- package/es/molecule/card-content/style.css +4 -4
- package/es/molecule/card-with-button/style.css +2 -2
- package/es/molecule/cookie-banner/style.css +2 -2
- package/es/molecule/course-section/index.js +60 -0
- package/es/molecule/course-section/index.js.map +1 -0
- package/es/molecule/course-section/style.css +65 -0
- package/es/molecule/course-section/test/fixtures/chapter.js +17 -0
- package/es/molecule/course-section/test/fixtures/chapter.js.map +1 -0
- package/es/molecule/course-section/test/fixtures/course.js +17 -0
- package/es/molecule/course-section/test/fixtures/course.js.map +1 -0
- package/es/molecule/dashboard/cards-list/style.css +2 -2
- package/es/molecule/dashboard/news-list/style.css +2 -2
- package/es/molecule/dashboard/start-battle/style.css +4 -4
- package/es/molecule/discipline-cta/style.css +2 -2
- package/es/molecule/discipline-header/style.css +4 -4
- package/es/molecule/discipline-partners/style.css +2 -2
- package/es/molecule/drag-and-drop/common.css +1 -1
- package/es/molecule/drag-and-drop/overlay.css +1 -1
- package/es/molecule/drag-and-drop/style.css +1 -1
- package/es/molecule/drag-and-drop/upload-report.css +4 -4
- package/es/molecule/draggable/index.js +56 -0
- package/es/molecule/draggable/index.js.map +1 -0
- package/es/molecule/draggable/style.css +77 -0
- package/es/molecule/draggable/test/fixtures/default.js +12 -0
- package/es/molecule/draggable/test/fixtures/default.js.map +1 -0
- package/es/molecule/draggable/test/fixtures.js +13 -0
- package/es/molecule/draggable/test/fixtures.js.map +1 -0
- package/es/molecule/external-content-button/style.css +2 -2
- package/es/molecule/feedback/style.css +3 -3
- package/es/molecule/filters/filters-wapper.css +2 -2
- package/es/molecule/filters/style.css +2 -2
- package/es/molecule/forum/forum-comment/style.css +1 -1
- package/es/molecule/forum/forum-post/style.css +5 -5
- package/es/molecule/menu-list/style.css +1 -1
- package/es/molecule/message-popin/style.css +2 -2
- package/es/molecule/modal/style.css +2 -2
- package/es/molecule/module-card/style.css +2 -2
- package/es/molecule/news/style.css +3 -3
- package/es/molecule/notification-banner/style.css +3 -3
- package/es/molecule/pagination/style.css +1 -1
- package/es/molecule/payment-form/index.js +2 -2
- package/es/molecule/payment-form/index.js.map +1 -1
- package/es/molecule/pdf/style.css +2 -2
- package/es/molecule/popin/style.css +2 -2
- package/es/molecule/progress-bar/style.css +1 -1
- package/es/molecule/questions/free-text/style.css +1 -1
- package/es/molecule/questions/qcm/style.css +1 -1
- package/es/molecule/questions/qcm-drag/style.css +2 -2
- package/es/molecule/questions/qcm-graphic/style.css +1 -1
- package/es/molecule/questions/question-range/style.css +2 -2
- package/es/molecule/questions/template/style.css +1 -1
- package/es/molecule/resource-player/style.css +1 -1
- package/es/molecule/scope-content/style.css +6 -6
- package/es/molecule/scope-tabs/style.css +1 -1
- package/es/molecule/select-multiple/style.css +2 -2
- package/es/molecule/setup-cohort-item/style.css +1 -1
- package/es/molecule/setup-section/index.js +2 -23
- package/es/molecule/setup-section/index.js.map +1 -1
- package/es/molecule/setup-section/style.css +3 -28
- package/es/molecule/setup-sections/index.js +3 -55
- package/es/molecule/setup-sections/index.js.map +1 -1
- package/es/molecule/setup-sections/style.css +0 -52
- package/es/molecule/setup-sections/test/on-drop.js +1 -1
- package/es/molecule/setup-sections/test/on-drop.js.map +1 -1
- package/es/molecule/share/style.css +3 -3
- package/es/molecule/ssmenu-list/style.css +1 -1
- package/es/molecule/table/style.css +5 -5
- package/es/molecule/teams-popin/style.css +2 -2
- package/es/molecule/titled-checkbox/style.css +1 -1
- package/es/molecule/video-player/jwplayer.css +1 -1
- package/es/molecule/wizard-summary/index.js +5 -5
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/organism/accordion/part/style.css +1 -1
- package/es/organism/brand-analytics/analytics-popin.css +1 -0
- package/es/organism/brand-analytics/style.css +1 -1
- package/es/organism/brand-table/style.css +2 -2
- package/es/organism/brand-upload/style.css +2 -2
- package/es/organism/discussion/style.css +1 -1
- package/es/organism/get-the-app/style.css +1 -1
- package/es/organism/hero/style.css +1 -1
- package/es/organism/mooc-footer/style.css +2 -2
- package/es/organism/mooc-header/style.css +8 -8
- package/es/organism/playlist-translation/test/fixtures.js +15 -0
- package/es/organism/playlist-translation/test/fixtures.js.map +1 -0
- package/es/organism/popin/style.css +1 -0
- package/es/organism/sidebar/style.css +2 -2
- package/es/organism/user-preferences/style.css +1 -1
- package/es/template/activity/engine-stars.css +3 -3
- package/es/template/activity/progression-item.css +5 -4
- package/es/template/activity/stars-summary.css +2 -2
- package/es/template/activity/style.css +3 -3
- package/es/template/app-player/player/slides/footer/style.css +1 -1
- package/es/template/app-player/player/slides/header/learner.css +4 -4
- package/es/template/app-player/player/slides/header/microlearning.css +1 -1
- package/es/template/app-player/player/slides/style.css +9 -8
- package/es/template/app-player/popin-correction/style.css +3 -3
- package/es/template/app-player/popin-end/summary.css +4 -4
- package/es/template/app-player/popin-end/test/fixtures.js +2 -0
- package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/es/template/app-player/popin-header/style.css +5 -5
- package/es/template/back-office/dashboard-preview/dashboard-popin.css +1 -0
- package/es/template/back-office/dashboard-preview/style.css +1 -1
- package/es/template/cockpit/jw-uploader/style.css +1 -0
- package/es/template/common/authors/style.css +5 -4
- package/es/template/common/layout.css +1 -1
- package/es/template/common/search-page/style.css +2 -1
- package/es/template/external-course/style.css +1 -1
- package/es/variables/fonts.css +1 -1
- package/lib/atom/autocomplete/style.css +4 -4
- package/lib/atom/button/style.css +1 -1
- package/lib/atom/card-image-preview/test/fixtures.js +25 -0
- package/lib/atom/card-image-preview/test/fixtures.js.map +1 -0
- package/lib/atom/catalog-section/style.css +1 -1
- package/lib/atom/clue/style.css +2 -2
- package/lib/atom/cta/style.css +1 -1
- package/lib/atom/difficulty-level/style.css +1 -1
- package/lib/atom/drag-and-drop/style.css +6 -5
- package/lib/atom/input-checkbox/style.css +1 -1
- package/lib/atom/input-doublestep/style.css +5 -5
- package/lib/atom/input-html/input-preview.css +2 -2
- package/lib/atom/input-html/style.css +2 -2
- package/lib/atom/input-readonly/style.css +3 -3
- package/lib/atom/input-search/style.css +1 -1
- package/lib/atom/input-switch/style.css +2 -2
- package/lib/atom/input-text/style.css +5 -5
- package/lib/atom/input-textarea/style.css +5 -5
- package/lib/atom/life/style.css +1 -1
- package/lib/atom/notification/style.css +1 -1
- package/lib/atom/radio-group/item.css +1 -1
- package/lib/atom/resource-miniature/style.css +1 -1
- package/lib/atom/select/style.css +7 -7
- package/lib/atom/slide/style.css +1 -1
- package/lib/molecule/add-to-my-list/style.css +3 -3
- package/lib/molecule/audio/style.css +1 -1
- package/lib/molecule/battle-request/style.css +4 -4
- package/lib/molecule/brand-card/description.css +1 -1
- package/lib/molecule/brand-card/style.css +2 -2
- package/lib/molecule/brand-card-create/style.css +1 -1
- package/lib/molecule/brand-create-form/style.css +6 -6
- package/lib/molecule/brand-download-box/style.css +2 -2
- package/lib/molecule/brand-tabs/style.css +1 -1
- package/lib/molecule/brand-upload-box/style.css +2 -2
- package/lib/molecule/breadcrumbs/style.css +3 -3
- package/lib/molecule/card/customer.css +1 -1
- package/lib/molecule/card/favorite.css +1 -1
- package/lib/molecule/card/notification.css +1 -1
- package/lib/molecule/card/style.css +1 -1
- package/lib/molecule/card/test/fixtures.js +3 -0
- package/lib/molecule/card/test/fixtures.js.map +1 -1
- package/lib/molecule/card-content/style.css +4 -4
- package/lib/molecule/card-with-button/style.css +2 -2
- package/lib/molecule/cookie-banner/style.css +2 -2
- package/lib/molecule/course-section/index.js +72 -0
- package/lib/molecule/course-section/index.js.map +1 -0
- package/lib/molecule/course-section/style.css +65 -0
- package/lib/molecule/course-section/test/fixtures/chapter.js +22 -0
- package/lib/molecule/course-section/test/fixtures/chapter.js.map +1 -0
- package/lib/molecule/course-section/test/fixtures/course.js +22 -0
- package/lib/molecule/course-section/test/fixtures/course.js.map +1 -0
- package/lib/molecule/dashboard/cards-list/style.css +2 -2
- package/lib/molecule/dashboard/news-list/style.css +2 -2
- package/lib/molecule/dashboard/start-battle/style.css +4 -4
- package/lib/molecule/discipline-cta/style.css +2 -2
- package/lib/molecule/discipline-header/style.css +4 -4
- package/lib/molecule/discipline-partners/style.css +2 -2
- package/lib/molecule/drag-and-drop/common.css +1 -1
- package/lib/molecule/drag-and-drop/overlay.css +1 -1
- package/lib/molecule/drag-and-drop/style.css +1 -1
- package/lib/molecule/drag-and-drop/upload-report.css +4 -4
- package/lib/molecule/draggable/index.js +71 -0
- package/lib/molecule/draggable/index.js.map +1 -0
- package/lib/molecule/draggable/style.css +77 -0
- package/lib/molecule/draggable/test/fixtures/default.js +17 -0
- package/lib/molecule/draggable/test/fixtures/default.js.map +1 -0
- package/lib/molecule/draggable/test/fixtures.js +22 -0
- package/lib/molecule/draggable/test/fixtures.js.map +1 -0
- package/lib/molecule/external-content-button/style.css +2 -2
- package/lib/molecule/feedback/style.css +3 -3
- package/lib/molecule/filters/filters-wapper.css +2 -2
- package/lib/molecule/filters/style.css +2 -2
- package/lib/molecule/forum/forum-comment/style.css +1 -1
- package/lib/molecule/forum/forum-post/style.css +5 -5
- package/lib/molecule/menu-list/style.css +1 -1
- package/lib/molecule/message-popin/style.css +2 -2
- package/lib/molecule/modal/style.css +2 -2
- package/lib/molecule/module-card/style.css +2 -2
- package/lib/molecule/news/style.css +3 -3
- package/lib/molecule/notification-banner/style.css +3 -3
- package/lib/molecule/pagination/style.css +1 -1
- package/lib/molecule/payment-form/index.js +2 -2
- package/lib/molecule/payment-form/index.js.map +1 -1
- package/lib/molecule/pdf/style.css +2 -2
- package/lib/molecule/popin/style.css +2 -2
- package/lib/molecule/progress-bar/style.css +1 -1
- package/lib/molecule/questions/free-text/style.css +1 -1
- package/lib/molecule/questions/qcm/style.css +1 -1
- package/lib/molecule/questions/qcm-drag/style.css +2 -2
- package/lib/molecule/questions/qcm-graphic/style.css +1 -1
- package/lib/molecule/questions/question-range/style.css +2 -2
- package/lib/molecule/questions/template/style.css +1 -1
- package/lib/molecule/resource-player/style.css +1 -1
- package/lib/molecule/scope-content/style.css +6 -6
- package/lib/molecule/scope-tabs/style.css +1 -1
- package/lib/molecule/select-multiple/style.css +2 -2
- package/lib/molecule/setup-cohort-item/style.css +1 -1
- package/lib/molecule/setup-section/index.js +2 -21
- package/lib/molecule/setup-section/index.js.map +1 -1
- package/lib/molecule/setup-section/style.css +3 -28
- package/lib/molecule/setup-sections/index.js +3 -55
- package/lib/molecule/setup-sections/index.js.map +1 -1
- package/lib/molecule/setup-sections/style.css +0 -52
- package/lib/molecule/setup-sections/test/on-drop.js +1 -1
- package/lib/molecule/setup-sections/test/on-drop.js.map +1 -1
- package/lib/molecule/share/style.css +3 -3
- package/lib/molecule/ssmenu-list/style.css +1 -1
- package/lib/molecule/table/style.css +5 -5
- package/lib/molecule/teams-popin/style.css +2 -2
- package/lib/molecule/titled-checkbox/style.css +1 -1
- package/lib/molecule/video-player/jwplayer.css +1 -1
- package/lib/molecule/wizard-summary/index.js +5 -5
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/organism/accordion/part/style.css +1 -1
- package/lib/organism/brand-analytics/analytics-popin.css +1 -0
- package/lib/organism/brand-analytics/style.css +1 -1
- package/lib/organism/brand-table/style.css +2 -2
- package/lib/organism/brand-upload/style.css +2 -2
- package/lib/organism/discussion/style.css +1 -1
- package/lib/organism/get-the-app/style.css +1 -1
- package/lib/organism/hero/style.css +1 -1
- package/lib/organism/mooc-footer/style.css +2 -2
- package/lib/organism/mooc-header/style.css +8 -8
- package/lib/organism/playlist-translation/test/fixtures.js +25 -0
- package/lib/organism/playlist-translation/test/fixtures.js.map +1 -0
- package/lib/organism/popin/style.css +1 -0
- package/lib/organism/sidebar/style.css +2 -2
- package/lib/organism/user-preferences/style.css +1 -1
- package/lib/template/activity/engine-stars.css +3 -3
- package/lib/template/activity/progression-item.css +5 -4
- package/lib/template/activity/stars-summary.css +2 -2
- package/lib/template/activity/style.css +3 -3
- package/lib/template/app-player/player/slides/footer/style.css +1 -1
- package/lib/template/app-player/player/slides/header/learner.css +4 -4
- package/lib/template/app-player/player/slides/header/microlearning.css +1 -1
- package/lib/template/app-player/player/slides/style.css +9 -8
- package/lib/template/app-player/popin-correction/style.css +3 -3
- package/lib/template/app-player/popin-end/summary.css +4 -4
- package/lib/template/app-player/popin-end/test/fixtures.js +3 -0
- package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/lib/template/app-player/popin-header/style.css +5 -5
- package/lib/template/back-office/dashboard-preview/dashboard-popin.css +1 -0
- package/lib/template/back-office/dashboard-preview/style.css +1 -1
- package/lib/template/cockpit/jw-uploader/style.css +1 -0
- package/lib/template/common/authors/style.css +5 -4
- package/lib/template/common/layout.css +1 -1
- package/lib/template/common/search-page/style.css +2 -1
- package/lib/template/external-course/style.css +1 -1
- package/lib/variables/fonts.css +1 -1
- package/package.json +2 -2
- package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
- package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +0 -1
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
27
|
position: fixed;
|
|
28
|
-
font-family: '
|
|
28
|
+
font-family: 'Gilroy';
|
|
29
29
|
top: 0;
|
|
30
30
|
left: 0;
|
|
31
31
|
right: 0;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
|
|
83
83
|
.title {
|
|
84
84
|
height: 15px;
|
|
85
|
-
font-family: '
|
|
85
|
+
font-family: 'Gilroy';
|
|
86
86
|
font-size: 11px;
|
|
87
87
|
font-weight: bold;
|
|
88
88
|
font-stretch: normal;
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.message {
|
|
95
|
-
font-family: '
|
|
95
|
+
font-family: 'Gilroy';
|
|
96
96
|
font-size: 14px;
|
|
97
97
|
font-weight: bold;
|
|
98
98
|
font-stretch: normal;
|
|
@@ -34,11 +34,11 @@ class PaymentForm extends _react.default.Component {
|
|
|
34
34
|
iconStyle: 'solid',
|
|
35
35
|
color: '#546E7A',
|
|
36
36
|
fontSize: '16px',
|
|
37
|
-
fontFamily: '
|
|
37
|
+
fontFamily: 'Gilroy',
|
|
38
38
|
'::placeholder': {
|
|
39
39
|
color: '#546E7A',
|
|
40
40
|
fontSize: '16px',
|
|
41
|
-
fontFamily: '
|
|
41
|
+
fontFamily: 'Gilroy'
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/payment-form/index.js"],"names":["PaymentForm","React","Component","constructor","props","stripe","stripeInstance","stripeKeyPublic","handleCardNumberChange","bind","handleCardExpiryChange","handleCardCvcChange","handleSubmit","componentDidMount","elements","elementOptions","style","base","iconStyle","color","fontSize","fontFamily","cardNumber","create","cardExpiry","cardCvc","mount","on","componentWillUnmount","cardNumer","unmount","off","onSubscription","createToken","then","response","error","onCardNumberChange","onCardExpiryChange","onCardCvcChange","render","checkImage","cardsImage","cardOwnerEmail","securedPaymentImage","errors","warning","submitButtonEnabled","cardNumberHasError","cardExpiryHasError","cardCvcHasError","translate","context","paymentForm","acceptedCards","acceptedCardsCheck","acceptedCardsText","acceptedCardsImage","creditCardOwnerEmail","creditCardOwnerEmailSeparator","creditCardOwnerEmailText","paymentErrors","paymentWarning","securedPayment","securedPaymentText","cardBlock","invalidElement","subscriptionDisclaimer","subscribeButtonContainer","subscribeButton","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","func","bool"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAN,SAA0BC,eAAMC,SAAhC,CAA0C;AAwBxCC,EAAAA,WAAW,CAACC,KAAD,EAAQ;AACjB,UAAMA,KAAN;AACA,SAAKC,MAAL,GAAcD,KAAK,CAACE,cAAN,GAAuBF,KAAK,CAACE,cAAN,CAAqBF,KAAK,CAACG,eAA3B,CAAvB,GAAqE,IAAnF;AACA,SAAKC,sBAAL,GAA8B,KAAKA,sBAAL,CAA4B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B,kBAASC,iBAAT,CAA2BpB;AADlB,C;;AApBlBnD,W,CACGwE,S,2CAAY;AACjBjE,EAAAA,eAAe,EAAEkE,mBAAUC,MAAV,CAAiBC,UADjB;AAEjBrE,EAAAA,cAAc,EAAEmE,mBAAUG,IAAV,CAAeD,UAFd;AAGjB3C,EAAAA,cAAc,EAAEyC,mBAAUG,IAAV,CAAeD,UAHd;AAIjBlC,EAAAA,UAAU,EAAEgC,mBAAUC,MAAV,CAAiBC,UAJZ;AAKjBjC,EAAAA,UAAU,EAAE+B,mBAAUC,MAAV,CAAiBC,UALZ;AAMjBhC,EAAAA,cAAc,EAAE8B,mBAAUC,MANT;AAOjB9B,EAAAA,mBAAmB,EAAE6B,mBAAUC,MAPd;AAQjB7B,EAAAA,MAAM,EAAE4B,mBAAUC,MARD;AASjB5B,EAAAA,OAAO,EAAE2B,mBAAUC,MATF;AAUjBrC,EAAAA,kBAAkB,EAAEoC,mBAAUG,IAVb;AAWjB5B,EAAAA,kBAAkB,EAAEyB,mBAAUI,IAXb;AAYjBvC,EAAAA,kBAAkB,EAAEmC,mBAAUG,IAZb;AAajB3B,EAAAA,kBAAkB,EAAEwB,mBAAUI,IAbb;AAcjBtC,EAAAA,eAAe,EAAEkC,mBAAUG,IAdV;AAejB1B,EAAAA,eAAe,EAAEuB,mBAAUI,IAfV;AAgBjB9B,EAAAA,mBAAmB,EAAE0B,mBAAUI;AAhBd,C;eA2KN7E,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nclass PaymentForm extends React.Component {\n static propTypes = {\n stripeKeyPublic: PropTypes.string.isRequired,\n stripeInstance: PropTypes.func.isRequired,\n onSubscription: PropTypes.func.isRequired,\n checkImage: PropTypes.string.isRequired,\n cardsImage: PropTypes.string.isRequired,\n cardOwnerEmail: PropTypes.string,\n securedPaymentImage: PropTypes.string,\n errors: PropTypes.string,\n warning: PropTypes.string,\n onCardNumberChange: PropTypes.func,\n cardNumberHasError: PropTypes.bool,\n onCardExpiryChange: PropTypes.func,\n cardExpiryHasError: PropTypes.bool,\n onCardCvcChange: PropTypes.func,\n cardCvcHasError: PropTypes.bool,\n submitButtonEnabled: PropTypes.bool\n };\n\n static contextTypes = {\n translate: Provider.childContextTypes.translate\n };\n\n constructor(props) {\n super(props);\n this.stripe = props.stripeInstance ? props.stripeInstance(props.stripeKeyPublic) : null;\n this.handleCardNumberChange = this.handleCardNumberChange.bind(this);\n this.handleCardExpiryChange = this.handleCardExpiryChange.bind(this);\n this.handleCardCvcChange = this.handleCardCvcChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n componentDidMount() {\n if (this.stripe) {\n const elements = this.stripe.elements();\n\n const elementOptions = {\n style: {\n base: {\n iconStyle: 'solid',\n color: '#546E7A',\n fontSize: '16px',\n fontFamily: '\"Open Sans\"',\n '::placeholder': {\n color: '#546E7A',\n fontSize: '16px',\n fontFamily: '\"Open Sans\"'\n }\n }\n }\n };\n\n this.cardNumber = elements.create('cardNumber', elementOptions);\n this.cardExpiry = elements.create('cardExpiry', elementOptions);\n this.cardCvc = elements.create('cardCvc', elementOptions);\n\n this.cardNumber.mount('#card-number');\n this.cardExpiry.mount('#card-expiry');\n this.cardCvc.mount('#card-cvc');\n\n this.cardNumber.on('change', this.handleCardNumberChange);\n this.cardExpiry.on('change', this.handleCardExpiryChange);\n this.cardCvc.on('change', this.handleCardCvcChange);\n }\n }\n\n componentWillUnmount() {\n if (this.cardNumer) {\n this.cardNumber.unmount();\n this.cardNumber.off('change', this.handleCardNumberChange);\n }\n if (this.cardExpiry) {\n this.cardExpiry.unmount();\n this.cardExpiry.off('change', this.handleCardExpiryChange);\n }\n if (this.cardCvc) {\n this.cardCvc.unmount();\n this.cardCvc.off('change', this.handleCardCvcChange);\n }\n }\n\n handleSubmit() {\n const {onSubscription} = this.props;\n if (this.stripe) {\n return this.stripe.createToken(this.cardNumber).then(response => {\n return onSubscription(response);\n });\n }\n }\n\n handleCardNumberChange({error}) {\n const {onCardNumberChange = () => {}} = this.props;\n onCardNumberChange(error);\n }\n\n handleCardExpiryChange({error}) {\n const {onCardExpiryChange = () => {}} = this.props;\n onCardExpiryChange(error);\n }\n\n handleCardCvcChange({error}) {\n const {onCardCvcChange = () => {}} = this.props;\n onCardCvcChange(error);\n }\n\n render() {\n const {\n checkImage,\n cardsImage,\n cardOwnerEmail,\n securedPaymentImage,\n errors,\n warning,\n submitButtonEnabled,\n cardNumberHasError,\n cardExpiryHasError,\n cardCvcHasError\n } = this.props;\n\n const {translate} = this.context;\n\n return (\n <div className={style.paymentForm}>\n <div className={style.acceptedCards}>\n <img className={style.acceptedCardsCheck} src={checkImage} />\n <div className={style.acceptedCardsText}>{translate('accepted_cards')}</div>\n <img className={style.acceptedCardsImage} src={cardsImage} />\n </div>\n <div className={style.creditCardOwnerEmail}>\n <hr className={style.creditCardOwnerEmailSeparator} />\n <div className={style.creditCardOwnerEmailText}>{cardOwnerEmail}</div>\n <hr className={style.creditCardOwnerEmailSeparator} />\n </div>\n {errors ? <div className={style.paymentErrors}>-{errors}</div> : null}\n {warning ? <div className={style.paymentWarning}>-{warning}</div> : null}\n <div className={style.securedPayment}>\n <img className={style.securedPaymentImage} src={securedPaymentImage} />\n <div className={style.securedPaymentText}>{translate('secured_payment')}</div>\n </div>\n <div className={style.cardBlock}>\n <div\n className={`${style.cardNumber} ${cardNumberHasError && style.invalidElement}`}\n id=\"card-number\"\n />\n </div>\n <div className={style.cardBlock}>\n <div\n className={`${style.cardExpiry} ${cardExpiryHasError && style.invalidElement}`}\n id=\"card-expiry\"\n />\n <div\n className={`${style.cardCvc} ${cardCvcHasError && style.invalidElement}`}\n id=\"card-cvc\"\n />\n </div>\n <div className={style.subscriptionDisclaimer}>{translate('subscription_disclaimer')}</div>\n <div className={style.subscribeButtonContainer}>\n <button\n className={style.subscribeButton}\n type=\"button\"\n onClick={this.handleSubmit}\n disabled={!submitButtonEnabled}\n >\n {translate('payment_form_submit')}\n </button>\n </div>\n </div>\n );\n }\n}\n\nexport default PaymentForm;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/payment-form/index.js"],"names":["PaymentForm","React","Component","constructor","props","stripe","stripeInstance","stripeKeyPublic","handleCardNumberChange","bind","handleCardExpiryChange","handleCardCvcChange","handleSubmit","componentDidMount","elements","elementOptions","style","base","iconStyle","color","fontSize","fontFamily","cardNumber","create","cardExpiry","cardCvc","mount","on","componentWillUnmount","cardNumer","unmount","off","onSubscription","createToken","then","response","error","onCardNumberChange","onCardExpiryChange","onCardCvcChange","render","checkImage","cardsImage","cardOwnerEmail","securedPaymentImage","errors","warning","submitButtonEnabled","cardNumberHasError","cardExpiryHasError","cardCvcHasError","translate","context","paymentForm","acceptedCards","acceptedCardsCheck","acceptedCardsText","acceptedCardsImage","creditCardOwnerEmail","creditCardOwnerEmailSeparator","creditCardOwnerEmailText","paymentErrors","paymentWarning","securedPayment","securedPaymentText","cardBlock","invalidElement","subscriptionDisclaimer","subscribeButtonContainer","subscribeButton","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","func","bool"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAN,SAA0BC,eAAMC,SAAhC,CAA0C;AAwBxCC,EAAAA,WAAW,CAACC,KAAD,EAAQ;AACjB,UAAMA,KAAN;AACA,SAAKC,MAAL,GAAcD,KAAK,CAACE,cAAN,GAAuBF,KAAK,CAACE,cAAN,CAAqBF,KAAK,CAACG,eAA3B,CAAvB,GAAqE,IAAnF;AACA,SAAKC,sBAAL,GAA8B,KAAKA,sBAAL,CAA4BC,IAA5B,CAAiC,IAAjC,CAA9B;AACA,SAAKC,sBAAL,GAA8B,KAAKA,sBAAL,CAA4BD,IAA5B,CAAiC,IAAjC,CAA9B;AACA,SAAKE,mBAAL,GAA2B,KAAKA,mBAAL,CAAyBF,IAAzB,CAA8B,IAA9B,CAA3B;AACA,SAAKG,YAAL,GAAoB,KAAKA,YA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IAAV,CAAeD,UAHd;AAIjBlC,EAAAA,UAAU,EAAEgC,mBAAUC,MAAV,CAAiBC,UAJZ;AAKjBjC,EAAAA,UAAU,EAAE+B,mBAAUC,MAAV,CAAiBC,UALZ;AAMjBhC,EAAAA,cAAc,EAAE8B,mBAAUC,MANT;AAOjB9B,EAAAA,mBAAmB,EAAE6B,mBAAUC,MAPd;AAQjB7B,EAAAA,MAAM,EAAE4B,mBAAUC,MARD;AASjB5B,EAAAA,OAAO,EAAE2B,mBAAUC,MATF;AAUjBrC,EAAAA,kBAAkB,EAAEoC,mBAAUG,IAVb;AAWjB5B,EAAAA,kBAAkB,EAAEyB,mBAAUI,IAXb;AAYjBvC,EAAAA,kBAAkB,EAAEmC,mBAAUG,IAZb;AAajB3B,EAAAA,kBAAkB,EAAEwB,mBAAUI,IAbb;AAcjBtC,EAAAA,eAAe,EAAEkC,mBAAUG,IAdV;AAejB1B,EAAAA,eAAe,EAAEuB,mBAAUI,IAfV;AAgBjB9B,EAAAA,mBAAmB,EAAE0B,mBAAUI;AAhBd,C;eA2KN7E,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nclass PaymentForm extends React.Component {\n static propTypes = {\n stripeKeyPublic: PropTypes.string.isRequired,\n stripeInstance: PropTypes.func.isRequired,\n onSubscription: PropTypes.func.isRequired,\n checkImage: PropTypes.string.isRequired,\n cardsImage: PropTypes.string.isRequired,\n cardOwnerEmail: PropTypes.string,\n securedPaymentImage: PropTypes.string,\n errors: PropTypes.string,\n warning: PropTypes.string,\n onCardNumberChange: PropTypes.func,\n cardNumberHasError: PropTypes.bool,\n onCardExpiryChange: PropTypes.func,\n cardExpiryHasError: PropTypes.bool,\n onCardCvcChange: PropTypes.func,\n cardCvcHasError: PropTypes.bool,\n submitButtonEnabled: PropTypes.bool\n };\n\n static contextTypes = {\n translate: Provider.childContextTypes.translate\n };\n\n constructor(props) {\n super(props);\n this.stripe = props.stripeInstance ? props.stripeInstance(props.stripeKeyPublic) : null;\n this.handleCardNumberChange = this.handleCardNumberChange.bind(this);\n this.handleCardExpiryChange = this.handleCardExpiryChange.bind(this);\n this.handleCardCvcChange = this.handleCardCvcChange.bind(this);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n componentDidMount() {\n if (this.stripe) {\n const elements = this.stripe.elements();\n\n const elementOptions = {\n style: {\n base: {\n iconStyle: 'solid',\n color: '#546E7A',\n fontSize: '16px',\n fontFamily: 'Gilroy',\n '::placeholder': {\n color: '#546E7A',\n fontSize: '16px',\n fontFamily: 'Gilroy'\n }\n }\n }\n };\n\n this.cardNumber = elements.create('cardNumber', elementOptions);\n this.cardExpiry = elements.create('cardExpiry', elementOptions);\n this.cardCvc = elements.create('cardCvc', elementOptions);\n\n this.cardNumber.mount('#card-number');\n this.cardExpiry.mount('#card-expiry');\n this.cardCvc.mount('#card-cvc');\n\n this.cardNumber.on('change', this.handleCardNumberChange);\n this.cardExpiry.on('change', this.handleCardExpiryChange);\n this.cardCvc.on('change', this.handleCardCvcChange);\n }\n }\n\n componentWillUnmount() {\n if (this.cardNumer) {\n this.cardNumber.unmount();\n this.cardNumber.off('change', this.handleCardNumberChange);\n }\n if (this.cardExpiry) {\n this.cardExpiry.unmount();\n this.cardExpiry.off('change', this.handleCardExpiryChange);\n }\n if (this.cardCvc) {\n this.cardCvc.unmount();\n this.cardCvc.off('change', this.handleCardCvcChange);\n }\n }\n\n handleSubmit() {\n const {onSubscription} = this.props;\n if (this.stripe) {\n return this.stripe.createToken(this.cardNumber).then(response => {\n return onSubscription(response);\n });\n }\n }\n\n handleCardNumberChange({error}) {\n const {onCardNumberChange = () => {}} = this.props;\n onCardNumberChange(error);\n }\n\n handleCardExpiryChange({error}) {\n const {onCardExpiryChange = () => {}} = this.props;\n onCardExpiryChange(error);\n }\n\n handleCardCvcChange({error}) {\n const {onCardCvcChange = () => {}} = this.props;\n onCardCvcChange(error);\n }\n\n render() {\n const {\n checkImage,\n cardsImage,\n cardOwnerEmail,\n securedPaymentImage,\n errors,\n warning,\n submitButtonEnabled,\n cardNumberHasError,\n cardExpiryHasError,\n cardCvcHasError\n } = this.props;\n\n const {translate} = this.context;\n\n return (\n <div className={style.paymentForm}>\n <div className={style.acceptedCards}>\n <img className={style.acceptedCardsCheck} src={checkImage} />\n <div className={style.acceptedCardsText}>{translate('accepted_cards')}</div>\n <img className={style.acceptedCardsImage} src={cardsImage} />\n </div>\n <div className={style.creditCardOwnerEmail}>\n <hr className={style.creditCardOwnerEmailSeparator} />\n <div className={style.creditCardOwnerEmailText}>{cardOwnerEmail}</div>\n <hr className={style.creditCardOwnerEmailSeparator} />\n </div>\n {errors ? <div className={style.paymentErrors}>-{errors}</div> : null}\n {warning ? <div className={style.paymentWarning}>-{warning}</div> : null}\n <div className={style.securedPayment}>\n <img className={style.securedPaymentImage} src={securedPaymentImage} />\n <div className={style.securedPaymentText}>{translate('secured_payment')}</div>\n </div>\n <div className={style.cardBlock}>\n <div\n className={`${style.cardNumber} ${cardNumberHasError && style.invalidElement}`}\n id=\"card-number\"\n />\n </div>\n <div className={style.cardBlock}>\n <div\n className={`${style.cardExpiry} ${cardExpiryHasError && style.invalidElement}`}\n id=\"card-expiry\"\n />\n <div\n className={`${style.cardCvc} ${cardCvcHasError && style.invalidElement}`}\n id=\"card-cvc\"\n />\n </div>\n <div className={style.subscriptionDisclaimer}>{translate('subscription_disclaimer')}</div>\n <div className={style.subscribeButtonContainer}>\n <button\n className={style.subscribeButton}\n type=\"button\"\n onClick={this.handleSubmit}\n disabled={!submitButtonEnabled}\n >\n {translate('payment_form_submit')}\n </button>\n </div>\n </div>\n );\n }\n}\n\nexport default PaymentForm;\n"],"file":"index.js"}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.pdfDescription {
|
|
35
|
-
font-family: '
|
|
35
|
+
font-family: 'Gilroy';
|
|
36
36
|
font-weight: 600;
|
|
37
37
|
text-align: center;
|
|
38
38
|
font-size: 12px;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
left: 0;
|
|
73
73
|
right: 0;
|
|
74
74
|
text-align: center;
|
|
75
|
-
font-family: '
|
|
75
|
+
font-family: 'Gilroy';
|
|
76
76
|
font-size: 12px;
|
|
77
77
|
font-weight: bold;
|
|
78
78
|
color: inherit;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.header {
|
|
51
|
-
font-family: '
|
|
51
|
+
font-family: 'Gilroy';
|
|
52
52
|
font-size: 24px;
|
|
53
53
|
font-weight: bold;
|
|
54
54
|
color: black;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.content {
|
|
60
|
-
font-family: '
|
|
60
|
+
font-family: 'Gilroy';
|
|
61
61
|
font-size: 16px;
|
|
62
62
|
font-weight: normal;
|
|
63
63
|
color: black;
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
.emptySpan {
|
|
44
44
|
width: 100%;
|
|
45
45
|
text-align: center;
|
|
46
|
-
font-family: '
|
|
46
|
+
font-family: 'Gilroy';
|
|
47
47
|
font-size: 13px;
|
|
48
48
|
font-weight: 600;
|
|
49
49
|
color: medium;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.answer {
|
|
53
|
-
font-family: '
|
|
53
|
+
font-family: 'Gilroy';
|
|
54
54
|
font-size: 13px;
|
|
55
55
|
font-weight: 600;
|
|
56
56
|
color: black;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
.title {
|
|
12
12
|
color: brand;
|
|
13
13
|
display: table;
|
|
14
|
-
font-family: "
|
|
14
|
+
font-family: "Gilroy";
|
|
15
15
|
font-size: 24px;
|
|
16
16
|
font-weight: 700;
|
|
17
17
|
margin: 0 auto 15px;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.label {
|
|
29
|
-
font-family: "
|
|
29
|
+
font-family: "Gilroy";
|
|
30
30
|
color: black;
|
|
31
31
|
font-size: 15px;
|
|
32
32
|
font-weight: 700;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
.title {
|
|
34
34
|
display: inline-block;
|
|
35
|
-
font-family: "
|
|
35
|
+
font-family: "Gilroy";
|
|
36
36
|
font-weight: 600;
|
|
37
37
|
font-size: 20px;
|
|
38
38
|
color: dark;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
padding: 3px 13px;
|
|
48
48
|
background: dark;
|
|
49
49
|
border-radius: 15px;
|
|
50
|
-
font-family: "
|
|
50
|
+
font-family: "Gilroy";
|
|
51
51
|
font-weight: 800;
|
|
52
52
|
font-size: 10px;
|
|
53
53
|
color: white;
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
display: inline-block;
|
|
59
59
|
vertical-align: top;
|
|
60
60
|
width: 50%;
|
|
61
|
-
font-family: "
|
|
61
|
+
font-family: "Gilroy";
|
|
62
62
|
font-size: 12px;
|
|
63
63
|
padding-right: 40px;
|
|
64
64
|
color: grey;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.coltitle {
|
|
68
|
-
font-family: "
|
|
68
|
+
font-family: "Gilroy";
|
|
69
69
|
font-weight: 800;
|
|
70
70
|
text-transform: uppercase;
|
|
71
71
|
margin-bottom: 15px;
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
.dottedlist li {
|
|
92
92
|
line-height: 26px;
|
|
93
93
|
font-size: 14px;
|
|
94
|
-
font-family: "
|
|
94
|
+
font-family: "Gilroy";
|
|
95
95
|
color: dark;
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
.roundedlist li {
|
|
107
107
|
line-height: 26px;
|
|
108
108
|
font-size: 14px;
|
|
109
|
-
font-family: "
|
|
109
|
+
font-family: "Gilroy";
|
|
110
110
|
color: dark;
|
|
111
111
|
}
|
|
112
112
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.title {
|
|
59
|
-
font-family: "
|
|
59
|
+
font-family: "Gilroy";
|
|
60
60
|
font-size: 15px;
|
|
61
61
|
text-transform: none;
|
|
62
62
|
color: dark;
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.description {
|
|
132
|
-
font-family: '
|
|
132
|
+
font-family: 'Gilroy';
|
|
133
133
|
font-weight: 500;
|
|
134
134
|
font-size: 12px;
|
|
135
135
|
color: medium;
|
|
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
13
|
-
|
|
14
12
|
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
15
13
|
|
|
16
14
|
var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
|
|
@@ -56,20 +54,13 @@ ContentTypesToggler.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
56
54
|
|
|
57
55
|
const SetupSection = (props, context) => {
|
|
58
56
|
const {
|
|
59
|
-
translate
|
|
60
|
-
skin
|
|
57
|
+
translate
|
|
61
58
|
} = context;
|
|
62
|
-
const brand = (0, _get2.default)('common.brand', skin);
|
|
63
|
-
const medium = (0, _get2.default)('common.medium', skin);
|
|
64
59
|
const {
|
|
65
60
|
title,
|
|
66
|
-
onUp,
|
|
67
|
-
onDown,
|
|
68
61
|
display,
|
|
69
62
|
contentTypes
|
|
70
63
|
} = props;
|
|
71
|
-
const colorUp = onDown ? brand : medium;
|
|
72
|
-
const colorDown = onUp ? brand : medium;
|
|
73
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
74
65
|
className: _style.default.wrapper
|
|
75
66
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -80,17 +71,7 @@ const SetupSection = (props, context) => {
|
|
|
80
71
|
contentTypes: contentTypes
|
|
81
72
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
82
73
|
className: _style.default.label
|
|
83
|
-
}, translate('Show')), /*#__PURE__*/_react.default.createElement(_inputSwitch.default, display)
|
|
84
|
-
className: _style.default.arrowSection
|
|
85
|
-
}, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, {
|
|
86
|
-
color: colorUp,
|
|
87
|
-
className: onDown ? _style.default.arrow : _style.default.disabled,
|
|
88
|
-
onClick: onDown
|
|
89
|
-
}), /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowTop, {
|
|
90
|
-
color: colorDown,
|
|
91
|
-
className: onUp ? _style.default.arrow : _style.default.disabled,
|
|
92
|
-
onClick: onUp
|
|
93
|
-
}))));
|
|
74
|
+
}, translate('Show')), /*#__PURE__*/_react.default.createElement(_inputSwitch.default, display)));
|
|
94
75
|
};
|
|
95
76
|
|
|
96
77
|
SetupSection.contextTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/setup-section/index.js"],"names":["ContentTypesToggler","props","context","skin","contentTypes","brand","orange","contentTypesColor","style","contentTypeWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","shape","RadioGroup","modified","bool","SetupSection","translate","
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/setup-section/index.js"],"names":["ContentTypesToggler","props","context","skin","contentTypes","brand","orange","contentTypesColor","style","contentTypeWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","shape","RadioGroup","modified","bool","SetupSection","translate","title","display","wrapper","settings","label","string","isRequired","onUp","func","onDown","InputSwitch"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,mBAAmB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AAC9C,QAAM;AAACC,IAAAA;AAAD,MAASD,OAAf;AACA,QAAM;AAACE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OAAjB,CAHF,CAFF,CADF;AAUD,CAfD;;AAiBAH,YAAY,CAACT,YAAb,GAA4B;AAC1BU,EAAAA,SAAS,EAAET,kBAASC,iBAAT,CAA2BQ,SADZ;AAE1BjB,EAAAA,IAAI,EAAEQ,kBAASC,iBAAT,CAA2BT;AAFP,CAA5B;AAKAgB,YAAY,CAACN,SAAb,2CAAyB;AACvBQ,EAAAA,KAAK,EAAEP,mBAAUY,MAAV,CAAiBC,UADD;AAEvBC,EAAAA,IAAI,EAAEd,mBAAUe,IAFO;AAGvBC,EAAAA,MAAM,EAAEhB,mBAAUe,IAHK;AAIvBP,EAAAA,OAAO,EAAER,mBAAUC,KAAV,CAAgBgB,qBAAYlB,SAA5B,CAJc;AAKvBT,EAAAA,YAAY,EAAEJ,mBAAmB,CAACa,SAApB,CAA8BT;AALrB,CAAzB;eAQee,Y","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport style from './style.css';\n\nconst ContentTypesToggler = (props, context) => {\n const {skin} = context;\n const {contentTypes} = props;\n\n if (!contentTypes) {\n return null;\n }\n\n const brand = get('common.brand', skin);\n const orange = get('common.orange', skin);\n const contentTypesColor = get('modified', contentTypes) ? orange : brand;\n\n return (\n <div className={style.contentTypeWrapper}>\n <RadioGroup {...contentTypes} color={contentTypesColor} />\n </div>\n );\n};\n\nContentTypesToggler.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nContentTypesToggler.propTypes = {\n contentTypes: PropTypes.shape({\n ...RadioGroup.propTypes,\n modified: PropTypes.bool\n })\n};\n\nconst SetupSection = (props, context) => {\n const {translate} = context;\n\n const {title, display, contentTypes} = props;\n\n return (\n <div className={style.wrapper}>\n <div className={style.title}>{title}</div>\n <div className={style.settings}>\n <ContentTypesToggler contentTypes={contentTypes} />\n <div className={style.label}>{translate('Show')}</div>\n <InputSwitch {...display} />\n </div>\n </div>\n );\n};\n\nSetupSection.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nSetupSection.propTypes = {\n title: PropTypes.string.isRequired,\n onUp: PropTypes.func,\n onDown: PropTypes.func,\n display: PropTypes.shape(InputSwitch.propTypes),\n contentTypes: ContentTypesToggler.propTypes.contentTypes\n};\n\nexport default SetupSection;\n"],"file":"index.js"}
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
14
|
justify-content: space-between;
|
|
15
|
-
padding: 0 24px;
|
|
15
|
+
padding: 0 24px 0 48px;
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.title {
|
|
20
|
-
font-family: '
|
|
20
|
+
font-family: 'Gilroy';
|
|
21
21
|
font-size: 14px;
|
|
22
22
|
color: brand;
|
|
23
23
|
font-weight: 700;
|
|
@@ -30,39 +30,14 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.label {
|
|
33
|
-
font-family: '
|
|
33
|
+
font-family: 'Gilroy';
|
|
34
34
|
font-weight: 600;
|
|
35
35
|
font-size: 14px;
|
|
36
36
|
color: brand;
|
|
37
37
|
margin-left: 30px;
|
|
38
38
|
margin-right: 16px;
|
|
39
39
|
}
|
|
40
|
-
.arrowSection {
|
|
41
|
-
display: none
|
|
42
|
-
}
|
|
43
|
-
.arrow {
|
|
44
|
-
left: 50%;
|
|
45
|
-
top: 50%;
|
|
46
|
-
margin: 0 0 0 24px;
|
|
47
|
-
width: 30px;
|
|
48
|
-
height: 30px;
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.arrow:hover path:last-child {
|
|
53
|
-
fill: primaryAdd1;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.disabled {
|
|
57
|
-
composes: arrow;
|
|
58
|
-
pointer-events: none;
|
|
59
|
-
}
|
|
60
40
|
|
|
61
41
|
.contentTypeWrapper {
|
|
62
42
|
width: 310px;
|
|
63
43
|
}
|
|
64
|
-
@media mobile {
|
|
65
|
-
.arrowSection {
|
|
66
|
-
display: block;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -7,7 +7,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _draggable = _interopRequireDefault(require("../draggable"));
|
|
11
11
|
|
|
12
12
|
var _setupSection = _interopRequireDefault(require("../setup-section"));
|
|
13
13
|
|
|
@@ -23,56 +23,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
23
23
|
|
|
24
24
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
25
|
|
|
26
|
-
const preventDefault = e => e.preventDefault();
|
|
27
|
-
|
|
28
|
-
const stopPropagation = e => e.stopPropagation();
|
|
29
|
-
|
|
30
|
-
const Draggable = props => {
|
|
31
|
-
const {
|
|
32
|
-
id,
|
|
33
|
-
dragging = false,
|
|
34
|
-
onDragStart,
|
|
35
|
-
onDragOver,
|
|
36
|
-
onDragLeave,
|
|
37
|
-
onDrop,
|
|
38
|
-
children
|
|
39
|
-
} = props;
|
|
40
|
-
const dragStartHandler = (0, _react.useCallback)(e => {
|
|
41
|
-
stopPropagation(e);
|
|
42
|
-
onDragStart(id);
|
|
43
|
-
}, [id, onDragStart]);
|
|
44
|
-
const dragOverHandler = (0, _react.useCallback)(e => {
|
|
45
|
-
preventDefault(e);
|
|
46
|
-
onDragOver(id);
|
|
47
|
-
}, [id, onDragOver]);
|
|
48
|
-
const dragLeaveHandler = (0, _react.useCallback)(e => {
|
|
49
|
-
preventDefault(e);
|
|
50
|
-
onDragLeave(id);
|
|
51
|
-
}, [id, onDragLeave]);
|
|
52
|
-
const dropHandler = (0, _react.useCallback)(e => {
|
|
53
|
-
preventDefault(e);
|
|
54
|
-
onDrop(id);
|
|
55
|
-
}, [id, onDrop]);
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
57
|
-
className: (0, _classnames.default)(dragging ? _style.default.dragging : null, _style.default.section, _style.default.draggable),
|
|
58
|
-
onDragStart: dragStartHandler,
|
|
59
|
-
onDragOver: dragOverHandler,
|
|
60
|
-
onDragLeave: dragLeaveHandler,
|
|
61
|
-
onDrop: dropHandler,
|
|
62
|
-
draggable: true
|
|
63
|
-
}, children);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
Draggable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
67
|
-
id: _propTypes.default.string,
|
|
68
|
-
dragging: _propTypes.default.bool,
|
|
69
|
-
onDragStart: _propTypes.default.func,
|
|
70
|
-
onDragOver: _propTypes.default.func,
|
|
71
|
-
onDragLeave: _propTypes.default.func,
|
|
72
|
-
onDrop: _propTypes.default.func,
|
|
73
|
-
children: _propTypes.default.element
|
|
74
|
-
} : {};
|
|
75
|
-
|
|
76
26
|
const Loading = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
77
27
|
className: _style.default.loading
|
|
78
28
|
}, /*#__PURE__*/_react.default.createElement(_loader.default, null));
|
|
@@ -100,7 +50,7 @@ const SetupSections = ({
|
|
|
100
50
|
setDragFrom(null);
|
|
101
51
|
}, [onDrop, setDragTo, setDragFrom, dragFrom]);
|
|
102
52
|
if (loading) return /*#__PURE__*/_react.default.createElement(Loading, null);
|
|
103
|
-
const sectionsView = sections.map(
|
|
53
|
+
const sectionsView = sections.map(section => /*#__PURE__*/_react.default.createElement(_draggable.default, {
|
|
104
54
|
key: section.id,
|
|
105
55
|
id: section.id,
|
|
106
56
|
dragging: dragTo === section.id,
|
|
@@ -109,9 +59,7 @@ const SetupSections = ({
|
|
|
109
59
|
onDragLeave: dragLeaveHandler,
|
|
110
60
|
onDrop: dropHandler
|
|
111
61
|
}, /*#__PURE__*/_react.default.createElement(_setupSection.default, _extends({}, section, {
|
|
112
|
-
key: section.id
|
|
113
|
-
onUp: index === 0 ? null : section.onUp,
|
|
114
|
-
onDown: index === sections.length - 1 ? null : section.onDown
|
|
62
|
+
key: section.id
|
|
115
63
|
}))));
|
|
116
64
|
return /*#__PURE__*/_react.default.createElement("div", null, sectionsView);
|
|
117
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/setup-sections/index.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/setup-sections/index.js"],"names":["Loading","style","loading","SetupSections","sections","onDrop","dragTo","setDragTo","dragFrom","setDragFrom","dragStartHandler","id","dragOverHandler","dragLeaveHandler","dropHandler","sectionsView","map","section","propTypes","PropTypes","arrayOf","shape","SetupSection","bool","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,OAAO,GAAG,mBACd;AAAK,EAAA,SAAS,EAAEC,eAAMC;AAAtB,gBACE,6BAAC,eAAD,OADF,CADF;;AAMA,MAAMC,aAAa,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWF,EAAAA,OAAX;AAAoBG,EAAAA;AAApB,CAAD,KAAiC;AACrD,QAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,qBAAS,IAAT,CAA5B;AACA,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0B,qBAAS,IAAT,CAAhC;AAEA,QAAMC,gBAAgB,GAAG,wBACvBC,EAAE,IAAI;AACJF,IAAAA,WAAW,CAACE,EAAD,CAAX;AACD,GAHsB,EAIvB,CAACF,WAAD,CAJuB,CAAzB;AAOA,QAAMG,eAAe,GAAG,wBACtBD,EAAE,IAAI;AACJ,QAAIL,MAAM,KAAKK,EAAf,EAAmB;AACnBJ,IAAAA,SAAS,CAACI,EA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AAM,EAAEc,mBAAUK;AAHM,CAA1B;eAMerB,a","sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Draggable from '../draggable';\nimport SetupSection from '../setup-section';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst Loading = () => (\n <div className={style.loading}>\n <Loader />\n </div>\n);\n\nconst SetupSections = ({sections, loading, onDrop}) => {\n const [dragTo, setDragTo] = useState(null);\n const [dragFrom, setDragFrom] = useState(null);\n\n const dragStartHandler = useCallback(\n id => {\n setDragFrom(id);\n },\n [setDragFrom]\n );\n\n const dragOverHandler = useCallback(\n id => {\n if (dragTo === id) return;\n setDragTo(id);\n },\n [dragTo, setDragTo]\n );\n\n const dragLeaveHandler = useCallback(\n id => {\n setDragTo(null);\n },\n [setDragTo]\n );\n\n const dropHandler = useCallback(\n id => {\n if (onDrop && dragFrom) onDrop(dragFrom, id);\n\n setDragTo(null);\n setDragFrom(null);\n },\n [onDrop, setDragTo, setDragFrom, dragFrom]\n );\n\n if (loading) return <Loading />;\n\n const sectionsView = sections.map(section => (\n <Draggable\n key={section.id}\n id={section.id}\n dragging={dragTo === section.id}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n >\n <SetupSection {...section} key={section.id} />\n </Draggable>\n ));\n return <div>{sectionsView}</div>;\n};\n\nSetupSections.propTypes = {\n sections: PropTypes.arrayOf(PropTypes.shape(SetupSection.propTypes)),\n loading: PropTypes.bool,\n onDrop: PropTypes.func\n};\n\nexport default SetupSections;\n"],"file":"index.js"}
|
|
@@ -27,55 +27,3 @@
|
|
|
27
27
|
min-height: 60px;
|
|
28
28
|
position: relative;
|
|
29
29
|
}
|
|
30
|
-
.draggable {
|
|
31
|
-
cursor: grab;
|
|
32
|
-
position: relative;
|
|
33
|
-
background: transparent;
|
|
34
|
-
}
|
|
35
|
-
.draggable:hover{
|
|
36
|
-
background: rgba(0, 0, 0, 0.3);
|
|
37
|
-
}
|
|
38
|
-
.draggable:active{
|
|
39
|
-
background: transparent;
|
|
40
|
-
}
|
|
41
|
-
.draggable:before {
|
|
42
|
-
content: '.';
|
|
43
|
-
position: absolute;
|
|
44
|
-
left: 5px;
|
|
45
|
-
font-size: 20px;
|
|
46
|
-
line-height: 7px;
|
|
47
|
-
color: medium;
|
|
48
|
-
pointer-events: none;
|
|
49
|
-
text-shadow: 0 0 medium, 0 5px medium, 0 10px medium, 0 15px medium, 0 20px medium, 0 25px medium, 0 30px medium, 0 35px medium, 0 40px medium, 0 45px medium,
|
|
50
|
-
5px 0 medium, 5px 5px medium, 5px 10px medium, 5px 15px medium, 5px 20px medium, 5px 25px medium, 5px 30px medium, 5px 35px medium, 5px 40px medium, 5px 45px medium,
|
|
51
|
-
10px 0 medium, 10px 5px medium, 10px 10px medium, 10px 15px medium, 10px 20px medium, 10px 25px medium, 10px 30px medium, 10px 35px medium, 10px 40px medium, 10px 45px medium;
|
|
52
|
-
}
|
|
53
|
-
.dragging {
|
|
54
|
-
background: rgba(0, 0, 0, 0.1);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.dragging:after {
|
|
58
|
-
position: absolute;
|
|
59
|
-
content: "drop here";
|
|
60
|
-
left: 5px;
|
|
61
|
-
top: 5px;
|
|
62
|
-
bottom: 5px;
|
|
63
|
-
right: 5px;
|
|
64
|
-
background: color(black lightness(95%));
|
|
65
|
-
pointer-events: none;
|
|
66
|
-
border: 1px dashed medium;
|
|
67
|
-
box-sizing: border-box;
|
|
68
|
-
display: flex;
|
|
69
|
-
justify-content: center;
|
|
70
|
-
align-items: center;
|
|
71
|
-
color: dark;
|
|
72
|
-
font-family: 'Open Sans';
|
|
73
|
-
font-weight: 600;
|
|
74
|
-
font-size: 14px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@media mobile {
|
|
78
|
-
.draggable:before {
|
|
79
|
-
content: none;
|
|
80
|
-
}
|
|
81
|
-
}
|