@coorpacademy/components 10.2.2 → 10.3.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/es/atom/wizard-steps/index.js +1 -1
- package/es/atom/wizard-steps/index.js.map +1 -1
- package/es/atom/wizard-steps/style.css +1 -6
- package/es/molecule/banner/test/fixtures.js +8 -0
- package/es/molecule/banner/test/fixtures.js.map +1 -1
- package/es/molecule/brand-form-group/style.css +1 -2
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/select-multiple/index.js +2 -2
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/select-multiple/style.css +33 -16
- package/es/molecule/select-multiple/test/fixtures.js +8 -0
- package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/es/molecule/wizard-summary/index.js +4 -1
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/molecule/wizard-summary/style.css +18 -8
- package/es/molecule/wizard-summary/test/fixtures/three-sections.js +2 -2
- package/es/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
- package/es/organism/brand-form/index.js +39 -29
- package/es/organism/brand-form/index.js.map +1 -1
- package/es/organism/brand-form/style.css +8 -3
- package/es/organism/{playlist-translation → content-translation}/index.js +0 -0
- package/es/organism/content-translation/index.js.map +1 -0
- package/es/organism/{playlist-translation → content-translation}/style.css +0 -0
- package/es/organism/{playlist-translation → content-translation}/test/fixtures/default.js +0 -0
- package/es/organism/content-translation/test/fixtures/default.js.map +1 -0
- package/es/organism/{playlist-translation → content-translation}/test/fixtures/delete.js +0 -0
- package/es/organism/content-translation/test/fixtures/delete.js.map +1 -0
- package/es/organism/content-translation/test/fixtures.js +15 -0
- package/es/organism/content-translation/test/fixtures.js.map +1 -0
- package/es/organism/list-item/test/fixtures.js +19 -0
- package/es/organism/list-item/test/fixtures.js.map +1 -0
- package/es/organism/list-items/test/fixtures.js +17 -0
- package/es/organism/list-items/test/fixtures.js.map +1 -0
- package/es/organism/wizard-contents/index.js +146 -0
- package/es/organism/wizard-contents/index.js.map +1 -0
- package/es/organism/wizard-contents/style.css +118 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +40 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +36 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +36 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js +40 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +40 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -0
- package/es/organism/wizard-contents/test/fixtures.js +21 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/es/template/back-office/brand-update/index.js +8 -1
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +3 -15
- package/es/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js +21 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js.map +1 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +21 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js +22 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js.map +1 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js +21 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js.map +1 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js +21 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js.map +1 -0
- package/es/template/back-office/brand-update/test/fixtures.js +10 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/atom/wizard-steps/index.js +1 -1
- package/lib/atom/wizard-steps/index.js.map +1 -1
- package/lib/atom/wizard-steps/style.css +1 -6
- package/lib/molecule/banner/test/fixtures.js +12 -0
- package/lib/molecule/banner/test/fixtures.js.map +1 -1
- package/lib/molecule/brand-form-group/style.css +1 -2
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/select-multiple/index.js +2 -2
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/select-multiple/style.css +33 -16
- package/lib/molecule/select-multiple/test/fixtures.js +12 -0
- package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/lib/molecule/wizard-summary/index.js +5 -3
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/molecule/wizard-summary/style.css +18 -8
- package/lib/molecule/wizard-summary/test/fixtures/three-sections.js +2 -2
- package/lib/molecule/wizard-summary/test/fixtures/three-sections.js.map +1 -1
- package/lib/organism/brand-form/index.js +39 -29
- package/lib/organism/brand-form/index.js.map +1 -1
- package/lib/organism/brand-form/style.css +8 -3
- package/lib/organism/{playlist-translation → content-translation}/index.js +0 -0
- package/lib/organism/content-translation/index.js.map +1 -0
- package/lib/organism/{playlist-translation → content-translation}/style.css +0 -0
- package/lib/organism/{playlist-translation → content-translation}/test/fixtures/default.js +0 -0
- package/lib/organism/content-translation/test/fixtures/default.js.map +1 -0
- package/lib/organism/{playlist-translation → content-translation}/test/fixtures/delete.js +0 -0
- package/lib/organism/content-translation/test/fixtures/delete.js.map +1 -0
- package/lib/organism/content-translation/test/fixtures.js +25 -0
- package/lib/organism/content-translation/test/fixtures.js.map +1 -0
- package/lib/organism/list-item/test/fixtures.js +31 -0
- package/lib/organism/list-item/test/fixtures.js.map +1 -0
- package/lib/organism/list-items/test/fixtures.js +28 -0
- package/lib/organism/list-items/test/fixtures.js.map +1 -0
- package/lib/organism/wizard-contents/index.js +164 -0
- package/lib/organism/wizard-contents/index.js.map +1 -0
- package/lib/organism/wizard-contents/style.css +118 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js +49 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-add-courses-create.js.map +1 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js +45 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-create.js.map +1 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js +45 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-general-settings-edit.js.map +1 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js +49 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-populations-create.js.map +1 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js +49 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-translate-edit.js.map +1 -0
- package/lib/organism/wizard-contents/test/fixtures.js +34 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/lib/template/back-office/brand-update/index.js +9 -1
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +3 -15
- package/lib/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js +31 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-add-courses-playlist.js.map +1 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js +31 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-create-playlist.js.map +1 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js +33 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-form-edit-playlist.js.map +1 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js +31 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-populations-playlist.js.map +1 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js +31 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-translate-playlist.js.map +1 -0
- package/lib/template/back-office/brand-update/test/fixtures.js +15 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/package.json +2 -2
- package/es/organism/playlist-translation/index.js.map +0 -1
- package/es/organism/playlist-translation/test/fixtures/default.js.map +0 -1
- package/es/organism/playlist-translation/test/fixtures/delete.js.map +0 -1
- package/lib/organism/playlist-translation/index.js.map +0 -1
- package/lib/organism/playlist-translation/test/fixtures/default.js.map +0 -1
- package/lib/organism/playlist-translation/test/fixtures/delete.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","TemplateBackOfficeBrandUpdate","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureManageusers","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,OAAOC,kBAAP,MAA+B,yB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,6BAAxH,EAAuJgB,0BAAvJ,CAAJ;AACAnB,IAAI,CAAC,8FAAD,EAAiGE,oBAAjG,EAAuHC,6BAAvH,EAAsJiB,yBAAtJ,CAAJ;AACApB,IAAI,CAAC,8FAAD,EAAiGE,oBAAjG,EAAuHC,6BAAvH,EAAsJkB,yBAAtJ,CAAJ;AACArB,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+ImB,kBAA/I,CAAJ;AACAtB,IAAI,CAAC,2FAAD,EAA8FE,oBAA9F,EAAoHC,6BAApH,EAAmJoB,sBAAnJ,CAAJ;AACAvB,IAAI,CAAC,2FAAD,EAA8FE,oBAA9F,EAAoHC,6BAApH,EAAmJqB,sBAAnJ,CAAJ;AACAxB,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+IsB,kBAA/I,CAAJ;AACAzB,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+IuB,kBAA/I,CAAJ;AACA1B,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+IwB,kBAA/I,CAAJ;AACA3B,IAAI,CAAC,+EAAD,EAAkFE,oBAAlF,EAAwGC,6BAAxG,EAAuIyB,UAAvI,CAAJ;AACA5B,IAAI,CAAC,8FAAD,EAAiGE,oBAAjG,EAAuHC,6BAAvH,EAAsJ0B,yBAAtJ,CAAJ;AACA7B,IAAI,CAAC,iGAAD,EAAoGE,oBAApG,EAA0HC,6BAA1H,EAAyJ2B,4BAAzJ,CAAJ;AACA9B,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+I4B,kBAA/I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateBackOfficeBrandUpdate from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCohortError from './fixtures/cohort-error';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';\nimport fixtureGeneralSettings from './fixtures/general-settings';\nimport fixtureLmsError from './fixtures/lms-error';\nimport fixtureLmsModified from './fixtures/lms-modified';\nimport fixtureLmsSuccess from './fixtures/lms-success';\nimport fixtureLms from './fixtures/lms';\nimport fixtureLoader from './fixtures/loader';\nimport fixtureLookandfeelError from './fixtures/lookandfeel-error';\nimport fixtureLookandfeelModified from './fixtures/lookandfeel-modified';\nimport fixtureLookandfeelPending from './fixtures/lookandfeel-pending';\nimport fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureManageusersEdit from './fixtures/manageusers-edit';\nimport fixtureManageusersList from './fixtures/manageusers-list';\nimport fixtureManageusers from './fixtures/manageusers';\nimport fixtureQuickAccess from './fixtures/quick-access';\nimport fixtureSsoActivate from './fixtures/sso-activate';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUploadusersLoading from './fixtures/uploadusers-loading';\nimport fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';\nimport fixtureUploadusers from './fixtures/uploadusers';\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateBackOffice.TemplateBackOfficeBrandUpdate.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Analytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Animations › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnimations);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › CohortError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohortError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Cohort › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohort);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Dashboard › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboard);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboardsAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lms › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLms);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Loader › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLoader);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelPending › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelPending);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Manageusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusers);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);\n"],"file":"fixtures.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","TemplateBackOfficeBrandUpdate","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers","fixtureWizardAddCoursesPlaylist","fixtureWizardFormCreatePlaylist","fixtureWizardFormEditPlaylist","fixtureWizardPopulationsPlaylist","fixtureWizardTranslatePlaylist","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,0BAAP,MAAuC,iCAAvC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AACA,OAA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HC,6BAA9H,EAA6J+B,gCAA7J,CAAJ;AACAlC,IAAI,CAAC,mGAAD,EAAsGE,oBAAtG,EAA4HC,6BAA5H,EAA2JgC,8BAA3J,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateBackOfficeBrandUpdate from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCohortError from './fixtures/cohort-error';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';\nimport fixtureGeneralSettings from './fixtures/general-settings';\nimport fixtureLmsError from './fixtures/lms-error';\nimport fixtureLmsModified from './fixtures/lms-modified';\nimport fixtureLmsSuccess from './fixtures/lms-success';\nimport fixtureLms from './fixtures/lms';\nimport fixtureLoader from './fixtures/loader';\nimport fixtureLookandfeelError from './fixtures/lookandfeel-error';\nimport fixtureLookandfeelModified from './fixtures/lookandfeel-modified';\nimport fixtureLookandfeelPending from './fixtures/lookandfeel-pending';\nimport fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureManageusersEdit from './fixtures/manageusers-edit';\nimport fixtureManageusersList from './fixtures/manageusers-list';\nimport fixtureQuickAccess from './fixtures/quick-access';\nimport fixtureSsoActivate from './fixtures/sso-activate';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUploadusersLoading from './fixtures/uploadusers-loading';\nimport fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';\nimport fixtureUploadusers from './fixtures/uploadusers';\nimport fixtureWizardAddCoursesPlaylist from './fixtures/wizard-add-courses-playlist';\nimport fixtureWizardFormCreatePlaylist from './fixtures/wizard-form-create-playlist';\nimport fixtureWizardFormEditPlaylist from './fixtures/wizard-form-edit-playlist';\nimport fixtureWizardPopulationsPlaylist from './fixtures/wizard-populations-playlist';\nimport fixtureWizardTranslatePlaylist from './fixtures/wizard-translate-playlist';\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateBackOffice.TemplateBackOfficeBrandUpdate.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Analytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Animations › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnimations);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › CohortError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohortError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Cohort › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohort);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Dashboard › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboard);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboardsAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lms › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLms);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Loader › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLoader);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelPending › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelPending);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardAddCoursesPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardAddCoursesPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormCreatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormCreatePlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormEditPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormEditPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardTranslatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardTranslatePlaylist);\n"],"file":"fixtures.js"}
|
|
@@ -13,7 +13,7 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
const WizardSteps =
|
|
16
|
+
const WizardSteps = props => {
|
|
17
17
|
const {
|
|
18
18
|
steps
|
|
19
19
|
} = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/wizard-steps/index.js"],"names":["WizardSteps","props","
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/wizard-steps/index.js"],"names":["WizardSteps","props","steps","wizard","map","step","index","style","done","current","label","title","outerDot","dot","container","propTypes","PropTypes","arrayOf","shape","string","bool"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,WAAW,GAAGC,KAAK,IAAI;AAC3B,QAAM;AAACC,IAAAA;AAAD,MAAUD,KAAhB;AAEA,QAAME,MAAM,GAAGD,KAAK,CAACE,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACxC,wBACE;AACE,MAAA,SAAS,EAAE,yBAAWC,eAAMF,IAAjB,EAAuBA,IAAI,CAACG,IAAL,IAAaD,eAAMC,IAA1C,EAAgDH,IAAI,CAACI,OAAL,IAAgBF,eAAME,OAAtE,CADb;AAEE,MAAA,GAAG,EAAG,QAAOH,KAAM,EAFrB;AAGE,mBAAWA;AAHb,oBAKE;AAAK,MAAA,SAAS,EAAEC,eAAMG;AAAtB,oBACE;AAAK,MAAA,SAAS,EAAEH,eAAMI;AAAtB,OAA8BN,IAAI,CAACM,KAAnC,CADF,CALF,eAQE;AAAK,MAAA,SAAS,EAAEJ,eAAMK;AAAtB,oBACE;AAAK,MAAA,SAAS,EAAEL,eAAMM;AAAtB,WADF,CARF,CADF;AAcD,GAfc,CAAf;AAiBA,sBAAO;AAAK,IAAA,SAAS,EAAEN,eAAMO;AAAtB,KAAkCX,MAAlC,CAAP;AACD,CArBD;;AAuBAH,WAAW,CAACe,SAAZ,2CAAwB;AACtBb,EAAAA,KAAK,EAAEc,mBAAUC,OAAV,CACLD,mBAAUE,KAAV,CAAgB;AACdP,IAAAA,KAAK,EAAEK,mBAAUG,MADH;AAEdX,IAAAA,IAAI,EAAEQ,mBAAUI,IAFF;AAGdX,IAAAA,OAAO,EAAEO,mBAAUI;AAHL,GAAhB,CADK;AADe,CAAxB;eAUepB,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport style from './style.css';\n\nconst WizardSteps = props => {\n const {steps} = props;\n\n const wizard = steps.map((step, index) => {\n return (\n <div\n className={classnames(style.step, step.done && style.done, step.current && style.current)}\n key={`step-${index}`}\n data-step={index}\n >\n <div className={style.label}>\n <div className={style.title}>{step.title}</div>\n </div>\n <div className={style.outerDot}>\n <div className={style.dot}> </div>\n </div>\n </div>\n );\n });\n\n return <div className={style.container}>{wizard}</div>;\n};\n\nWizardSteps.propTypes = {\n steps: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n done: PropTypes.bool,\n current: PropTypes.bool\n })\n )\n};\n\nexport default WizardSteps;\n"],"file":"index.js"}
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
position: absolute;
|
|
32
32
|
border: 1px solid cm_grey_500;
|
|
33
33
|
display: block;
|
|
34
|
-
z-index: 2;
|
|
35
34
|
left: -50%;
|
|
36
35
|
bottom: 17px;
|
|
37
36
|
content: '';
|
|
@@ -42,7 +41,6 @@
|
|
|
42
41
|
position: absolute;
|
|
43
42
|
border: 1px solid cm_grey_500;
|
|
44
43
|
display: block;
|
|
45
|
-
z-index: 1;
|
|
46
44
|
left: 50%;
|
|
47
45
|
bottom: 17px;
|
|
48
46
|
content: '';
|
|
@@ -63,7 +61,6 @@
|
|
|
63
61
|
border: 1px solid cm_primary_blue;
|
|
64
62
|
bottom: 17px;
|
|
65
63
|
left: 50%;
|
|
66
|
-
z-index: 2;
|
|
67
64
|
position: absolute;
|
|
68
65
|
}
|
|
69
66
|
.step.done:before, .step.current:before {
|
|
@@ -72,7 +69,6 @@
|
|
|
72
69
|
border: 1px solid cm_primary_blue;
|
|
73
70
|
bottom: 17px;
|
|
74
71
|
left: 0px;
|
|
75
|
-
z-index: 2;
|
|
76
72
|
position: absolute;
|
|
77
73
|
}
|
|
78
74
|
|
|
@@ -84,7 +80,6 @@
|
|
|
84
80
|
border-radius: 10px;
|
|
85
81
|
display: inline-block;
|
|
86
82
|
position: relative;
|
|
87
|
-
z-index: 2;
|
|
88
83
|
margin-left: 3px;
|
|
89
84
|
margin-top: 3px;
|
|
90
85
|
border: 1px solid cm_grey_500;
|
|
@@ -118,10 +113,10 @@
|
|
|
118
113
|
border-radius: 18px;
|
|
119
114
|
display: inline-block;
|
|
120
115
|
position: relative;
|
|
121
|
-
z-index: 12;
|
|
122
116
|
margin: 0px auto;
|
|
123
117
|
border: 8px solid white;
|
|
124
118
|
transition: background-color 0.5s linear;
|
|
119
|
+
z-index: 1;
|
|
125
120
|
}
|
|
126
121
|
|
|
127
122
|
.step.done .outerDot, .step.current .outerDot {
|
|
@@ -12,6 +12,14 @@ var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
|
12
12
|
|
|
13
13
|
var _errorBanner = _interopRequireDefault(require("./fixtures/error-banner"));
|
|
14
14
|
|
|
15
|
+
var _errorTemporaryBanner = _interopRequireDefault(require("./fixtures/error-temporary-banner"));
|
|
16
|
+
|
|
17
|
+
var _successBanner = _interopRequireDefault(require("./fixtures/success-banner"));
|
|
18
|
+
|
|
19
|
+
var _successTemporaryBanner = _interopRequireDefault(require("./fixtures/success-temporary-banner"));
|
|
20
|
+
|
|
21
|
+
var _warningTemporaryBanner = _interopRequireDefault(require("./fixtures/warning-temporary-banner"));
|
|
22
|
+
|
|
15
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
24
|
|
|
17
25
|
(0, _ava.default)('Molecule › MoleculeBanner > should have valid propTypes', t => {
|
|
@@ -22,4 +30,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
22
30
|
});
|
|
23
31
|
(0, _ava.default)('Molecule › MoleculeBanner › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
32
|
(0, _ava.default)('Molecule › MoleculeBanner › ErrorBanner › should be rendered', _renderComponent.default, _.default, _errorBanner.default);
|
|
33
|
+
(0, _ava.default)('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', _renderComponent.default, _.default, _errorTemporaryBanner.default);
|
|
34
|
+
(0, _ava.default)('Molecule › MoleculeBanner › SuccessBanner › should be rendered', _renderComponent.default, _.default, _successBanner.default);
|
|
35
|
+
(0, _ava.default)('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', _renderComponent.default, _.default, _successTemporaryBanner.default);
|
|
36
|
+
(0, _ava.default)('Molecule › MoleculeBanner › WarningTemporaryBanner › should be rendered', _renderComponent.default, _.default, _warningTemporaryBanner.default);
|
|
25
37
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["t","pass","MoleculeBanner","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureErrorBanner"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,yDAAL,EAAgEA,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAeC,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,0DAAL,EAAiEG,wBAAjE,EAAuFN,SAAvF,EAAuGO,gBAAvG;AACA,kBAAK,8DAAL,EAAqED,wBAArE,EAA2FN,SAA3F,EAA2GQ,oBAA3G","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBanner from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureErrorBanner from './fixtures/error-banner';\n\ntest('Molecule › MoleculeBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);\ntest('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);\n"],"file":"fixtures.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["t","pass","MoleculeBanner","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureErrorBanner","fixtureErrorTemporaryBanner","fixtureSuccessBanner","fixtureSuccessTemporaryBanner","fixtureWarningTemporaryBanner"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,yDAAL,EAAgEA,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAeC,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,0DAAL,EAAiEG,wBAAjE,EAAuFN,SAAvF,EAAuGO,gBAAvG;AACA,kBAAK,8DAAL,EAAqED,wBAArE,EAA2FN,SAA3F,EAA2GQ,oBAA3G;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAAoHS,6BAApH;AACA,kBAAK,gEAAL,EAAuEH,wBAAvE,EAA6FN,SAA7F,EAA6GU,sBAA7G;AACA,kBAAK,yEAAL,EAAgFJ,wBAAhF,EAAsGN,SAAtG,EAAsHW,+BAAtH;AACA,kBAAK,yEAAL,EAAgFL,wBAAhF,EAAsGN,SAAtG,EAAsHY,+BAAtH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBanner from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureErrorBanner from './fixtures/error-banner';\nimport fixtureErrorTemporaryBanner from './fixtures/error-temporary-banner';\nimport fixtureSuccessBanner from './fixtures/success-banner';\nimport fixtureSuccessTemporaryBanner from './fixtures/success-temporary-banner';\nimport fixtureWarningTemporaryBanner from './fixtures/warning-temporary-banner';\n\ntest('Molecule › MoleculeBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);\ntest('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);\ntest('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorTemporaryBanner);\ntest('Molecule › MoleculeBanner › SuccessBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessBanner);\ntest('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessTemporaryBanner);\ntest('Molecule › MoleculeBanner › WarningTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureWarningTemporaryBanner);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
var _loading = _interopRequireDefault(require("./fixtures/loading"));
|
|
14
|
+
|
|
15
|
+
var _videoTranslate = _interopRequireDefault(require("./fixtures/video-translate"));
|
|
16
|
+
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
|
|
19
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
|
|
20
|
+
t.pass();
|
|
21
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
22
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
26
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
|
|
27
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', _renderComponent.default, _.default, _videoTranslate.default);
|
|
28
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["t","pass","MoleculeCockpitPopin","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureVideoTranslate"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAmHQ,gBAAnH;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAA0HS,uBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCockpitPopin from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureVideoTranslate from './fixtures/video-translate';\n\ntest('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCockpitPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCockpitPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);\ntest('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);\ntest('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);\n"],"file":"fixtures.js"}
|
|
@@ -188,8 +188,8 @@ const SelectMultiple = ({
|
|
|
188
188
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
189
189
|
className: _style.default.descriptionLabel
|
|
190
190
|
}, description)) : null) : null;
|
|
191
|
-
const hintView = isCMTheme
|
|
192
|
-
className: _style.default.hint // eslint-disable-next-line react/no-danger
|
|
191
|
+
const hintView = isCMTheme ? /*#__PURE__*/_react.default.createElement("div", {
|
|
192
|
+
className: (0, _classnames.default)(_style.default.hint, isActive && _style.default.hideHint) // eslint-disable-next-line react/no-danger
|
|
193
193
|
,
|
|
194
194
|
dangerouslySetInnerHTML: {
|
|
195
195
|
__html: error || hint
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/select-multiple/index.js"],"names":["themeStyle","setup","style","cockpit","sidebar","coorpmanager","useChoices","options","choicesRef","getChoices","current","setChoices","choice","choices","i","selected","filter","c","CMMultipleView","multiple","onChange","handleChange","checked","item","name","SelectMultiple","title","theme","placeholder","description","hint","onError","modified","required","error","disabled","skin","isOpened","updateIsOpened","nodeRef","defaultColor","black","handleOnClick","e","preventDefault","stopPropagation","prev","closeHandle","contains","target","document","addEventListener","removeEventListener","isCMTheme","lines","convert","cap","selection","_title","isActive","titleView","titleWithSelection","noValue","active","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","mainClass","default","showPlaceholder","behaviourClassName","errorIconView","errorIcon","select","noselection","iconsWrapper","flex","clicked","arrow","down","activeChoices","list","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","TitledCheckbox","func","string","arrayOf","oneOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEC,eAAMD,KADI;AAEjBE,EAAAA,OAAO,EAAED,eAAMC,OAFE;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,YAAY,EAAEH,eAAMG;AAJH,CAAnB;;AAOO,MAAMC,UAAU,GAAGC,OAAO,IAAI;AACnC,QAAMC,UAAU,GAAG,mBAAOD,OAAP,CAAnB;;AAEA,QAAME,UAAU,GAAG,MAAM;AACvB,WAAOD,UAA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AAWzBxD,EAAAA,QAAQ,EAAEuD,mBAAUC,IAXK;AAYzBvD,EAAAA,KAAK,EAAEsD,mBAAUI,MAZQ;AAazBjE,EAAAA,KAAK,EAAE6D,mBAAUM,KAAV,CAAgB,oBAAK9F,UAAL,CAAhB;AAbkB,CAA3B;eAgBeyB,c","sourcesContent":["import React, {useState, useEffect, useRef, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {map, pipe, join, filter, get, set, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport TitledCheckbox from '../titled-checkbox';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/input-checkbox';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n cockpit: style.cockpit,\n sidebar: style.sidebar,\n coorpmanager: style.coorpmanager\n};\n\nexport const useChoices = options => {\n const choicesRef = useRef(options);\n\n const getChoices = () => {\n return choicesRef.current;\n };\n\n const setChoices = choice => {\n const choices = set(`[${choice.i}].selected`, !choice.selected, getChoices());\n\n choicesRef.current = choices.filter(c => c.selected);\n };\n\n return [getChoices, setChoices];\n};\n\nconst CMMultipleView = ({multiple, choice, onChange}) => {\n const handleChange = useCallback(\n checked => {\n if (!multiple) {\n return onChange(choice);\n }\n return onChange({...choice, selected: checked});\n },\n [onChange, choice, multiple]\n );\n\n return multiple ? (\n <div className={style.item}>\n <Checkbox\n titleStyle=\"inherit\"\n checked={choice.selected}\n onChange={handleChange}\n noLabelMargins\n title={choice.name}\n />\n </div>\n ) : (\n <span className={style.item} onClick={handleChange} title={choice.name}>\n {choice.name}\n </span>\n );\n};\n\nconst SelectMultiple = (\n {\n title,\n options,\n theme,\n placeholder,\n description,\n hint,\n multiple,\n onChange,\n onError,\n modified = false,\n required = false,\n error = '',\n disabled = false\n },\n {skin}\n) => {\n const [isOpened, updateIsOpened] = useState(false);\n const [getChoices, setChoices] = useChoices(options);\n const nodeRef = useRef(null);\n\n const defaultColor = get('common.primary', skin);\n const black = get('common.black', skin);\n\n const handleOnClick = useCallback(\n e => {\n if (disabled) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n updateIsOpened(prev => !prev);\n },\n [disabled]\n );\n\n const closeHandle = useCallback(e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n updateIsOpened(false);\n }\n }, []);\n\n const handleChange = useCallback(\n choice => {\n // if multiple prop is turned on\n // we return all selected choices\n if (multiple) {\n setChoices(choice);\n\n return onChange(getChoices());\n }\n\n return onChange(choice);\n },\n [multiple, onChange, setChoices, getChoices]\n );\n\n useEffect(() => {\n document.addEventListener('click', closeHandle);\n document.addEventListener('touchstart', closeHandle);\n\n return () => {\n document.removeEventListener('click', closeHandle);\n document.removeEventListener('touchstart', closeHandle);\n };\n }, [closeHandle]);\n\n const isCMTheme = theme === 'coorpmanager';\n\n const lines = map.convert({cap: false})((choice, i) => {\n return (\n <li key={i} className={style.choice}>\n {isCMTheme ? (\n <CMMultipleView multiple={multiple} choice={{...choice, i}} onChange={handleChange} />\n ) : (\n <TitledCheckbox\n onToggle={handleChange}\n choice={{...choice, i}}\n background={defaultColor}\n />\n )}\n </li>\n );\n }, options);\n\n const selection = pipe(filter({selected: true}), map('name'), join(', '))(options);\n\n const _title = title && `${title}${required ? ' *' : ''}`;\n\n const isActive = isOpened === true;\n\n const titleView = title ? (\n <span\n className={classnames(\n style.title,\n isCMTheme && selection && style.titleWithSelection,\n isCMTheme && isEmpty(selection) && style.noValue,\n isActive && style.active\n )}\n >\n {_title}\n {isCMTheme ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null}\n </span>\n ) : null;\n\n const hintView =\n isCMTheme && !isActive ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n\n const mainClass = theme ? themeStyle[theme] : style.default;\n const showPlaceholder = isCMTheme && isActive;\n const behaviourClassName = getClassState(\n style.default,\n style.modified,\n style.error,\n modified,\n error\n );\n\n const errorIconView = error ? <ErrorIcon onClick={onError} className={style.errorIcon} /> : null;\n\n return (\n <div\n className={classnames(mainClass, behaviourClassName, disabled && style.disabled)}\n ref={nodeRef}\n >\n <label>\n {!isCMTheme && titleView}\n <div className={style.select} title={selection || placeholder} onClick={handleOnClick}>\n {isCMTheme && titleView}\n <span\n className={classnames(\n style.selection,\n isCMTheme && isEmpty(selection) && style.noselection\n )}\n >\n {selection || !isCMTheme || (showPlaceholder && placeholder) || null}\n </span>\n {isCMTheme ? (\n <div className={style.iconsWrapper}>\n <div className={style.flex}>{errorIconView}</div>\n <div className={classnames(style.flex, isActive && style.clicked)}>\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n </div>\n </div>\n ) : (\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n )}\n </div>\n <div className={classnames(style.choices, isActive && style.activeChoices)}>\n <ul className={style.list}>{lines}</ul>\n </div>\n </label>\n {!isCMTheme ? <div className={style.description}>{description}</div> : null}\n {hintView}\n </div>\n );\n};\n\nSelectMultiple.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCMMultipleView.propTypes = {\n multiple: PropTypes.bool,\n choice: TitledCheckbox.propTypes.choice,\n onChange: PropTypes.func\n};\n\nSelectMultiple.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n description: PropTypes.string,\n hint: PropTypes.string,\n options: PropTypes.arrayOf(TitledCheckbox.propTypes.choice),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n multiple: PropTypes.bool,\n modified: PropTypes.bool,\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n error: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle))\n};\n\nexport default SelectMultiple;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/select-multiple/index.js"],"names":["themeStyle","setup","style","cockpit","sidebar","coorpmanager","useChoices","options","choicesRef","getChoices","current","setChoices","choice","choices","i","selected","filter","c","CMMultipleView","multiple","onChange","handleChange","checked","item","name","SelectMultiple","title","theme","placeholder","description","hint","onError","modified","required","error","disabled","skin","isOpened","updateIsOpened","nodeRef","defaultColor","black","handleOnClick","e","preventDefault","stopPropagation","prev","closeHandle","contains","target","document","addEventListener","removeEventListener","isCMTheme","lines","convert","cap","selection","_title","isActive","titleView","titleWithSelection","noValue","active","infoIconWrapper","infoIcon","descriptionLabel","hintView","hideHint","__html","mainClass","default","showPlaceholder","behaviourClassName","errorIconView","errorIcon","select","noselection","iconsWrapper","flex","clicked","arrow","down","activeChoices","list","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","TitledCheckbox","func","string","arrayOf","oneOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEC,eAAMD,KADI;AAEjBE,EAAAA,OAAO,EAAED,eAAMC,OAFE;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,YAAY,EAAEH,eAAMG;AAJH,CAAnB;;AAOO,MAAMC,UAAU,GAAGC,OAAO,IAAI;AACnC,QAAMC,UAAU,GAAG,mBAAOD,OAAP,CAAnB;;AAEA,QAAME,UAAU,GAAG,MAAM;AACvB,WAAOD,UAAU,CAACE,OAAlB;AACD,GAFD;;AAIA,QAAMC,UAAU,GAAGC,MAAM,IAAI;AAC3B,UAAMC,OAAO,GAAG,mBAAK,IAAGD,MAAM,CAACE,CAAE,YAAjB,EAA8B,CAACF,MAAM,CAACG,QAAtC,EAAgDN,UAAU,EAA1D,CAAhB;AAEAD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/F,UAAL,CAAhB;AAbkB,CAA3B;eAgBeyB,c","sourcesContent":["import React, {useState, useEffect, useRef, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {map, pipe, join, filter, get, set, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport TitledCheckbox from '../titled-checkbox';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/input-checkbox';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n cockpit: style.cockpit,\n sidebar: style.sidebar,\n coorpmanager: style.coorpmanager\n};\n\nexport const useChoices = options => {\n const choicesRef = useRef(options);\n\n const getChoices = () => {\n return choicesRef.current;\n };\n\n const setChoices = choice => {\n const choices = set(`[${choice.i}].selected`, !choice.selected, getChoices());\n\n choicesRef.current = choices.filter(c => c.selected);\n };\n\n return [getChoices, setChoices];\n};\n\nconst CMMultipleView = ({multiple, choice, onChange}) => {\n const handleChange = useCallback(\n checked => {\n if (!multiple) {\n return onChange(choice);\n }\n return onChange({...choice, selected: checked});\n },\n [onChange, choice, multiple]\n );\n\n return multiple ? (\n <div className={style.item}>\n <Checkbox\n titleStyle=\"inherit\"\n checked={choice.selected}\n onChange={handleChange}\n noLabelMargins\n title={choice.name}\n />\n </div>\n ) : (\n <span className={style.item} onClick={handleChange} title={choice.name}>\n {choice.name}\n </span>\n );\n};\n\nconst SelectMultiple = (\n {\n title,\n options,\n theme,\n placeholder,\n description,\n hint,\n multiple,\n onChange,\n onError,\n modified = false,\n required = false,\n error = '',\n disabled = false\n },\n {skin}\n) => {\n const [isOpened, updateIsOpened] = useState(false);\n const [getChoices, setChoices] = useChoices(options);\n const nodeRef = useRef(null);\n\n const defaultColor = get('common.primary', skin);\n const black = get('common.black', skin);\n\n const handleOnClick = useCallback(\n e => {\n if (disabled) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n updateIsOpened(prev => !prev);\n },\n [disabled]\n );\n\n const closeHandle = useCallback(e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n updateIsOpened(false);\n }\n }, []);\n\n const handleChange = useCallback(\n choice => {\n // if multiple prop is turned on\n // we return all selected choices\n if (multiple) {\n setChoices(choice);\n\n return onChange(getChoices());\n }\n\n return onChange(choice);\n },\n [multiple, onChange, setChoices, getChoices]\n );\n\n useEffect(() => {\n document.addEventListener('click', closeHandle);\n document.addEventListener('touchstart', closeHandle);\n\n return () => {\n document.removeEventListener('click', closeHandle);\n document.removeEventListener('touchstart', closeHandle);\n };\n }, [closeHandle]);\n\n const isCMTheme = theme === 'coorpmanager';\n\n const lines = map.convert({cap: false})((choice, i) => {\n return (\n <li key={i} className={style.choice}>\n {isCMTheme ? (\n <CMMultipleView multiple={multiple} choice={{...choice, i}} onChange={handleChange} />\n ) : (\n <TitledCheckbox\n onToggle={handleChange}\n choice={{...choice, i}}\n background={defaultColor}\n />\n )}\n </li>\n );\n }, options);\n\n const selection = pipe(filter({selected: true}), map('name'), join(', '))(options);\n\n const _title = title && `${title}${required ? ' *' : ''}`;\n\n const isActive = isOpened === true;\n\n const titleView = title ? (\n <span\n className={classnames(\n style.title,\n isCMTheme && selection && style.titleWithSelection,\n isCMTheme && isEmpty(selection) && style.noValue,\n isActive && style.active\n )}\n >\n {_title}\n {isCMTheme ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null}\n </span>\n ) : null;\n\n const hintView = isCMTheme ? (\n <div\n className={classnames(style.hint, isActive && style.hideHint)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n\n const mainClass = theme ? themeStyle[theme] : style.default;\n const showPlaceholder = isCMTheme && isActive;\n const behaviourClassName = getClassState(\n style.default,\n style.modified,\n style.error,\n modified,\n error\n );\n\n const errorIconView = error ? <ErrorIcon onClick={onError} className={style.errorIcon} /> : null;\n\n return (\n <div\n className={classnames(mainClass, behaviourClassName, disabled && style.disabled)}\n ref={nodeRef}\n >\n <label>\n {!isCMTheme && titleView}\n <div className={style.select} title={selection || placeholder} onClick={handleOnClick}>\n {isCMTheme && titleView}\n <span\n className={classnames(\n style.selection,\n isCMTheme && isEmpty(selection) && style.noselection\n )}\n >\n {selection || !isCMTheme || (showPlaceholder && placeholder) || null}\n </span>\n {isCMTheme ? (\n <div className={style.iconsWrapper}>\n <div className={style.flex}>{errorIconView}</div>\n <div className={classnames(style.flex, isActive && style.clicked)}>\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n </div>\n </div>\n ) : (\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n )}\n </div>\n <div className={classnames(style.choices, isActive && style.activeChoices)}>\n <ul className={style.list}>{lines}</ul>\n </div>\n </label>\n {!isCMTheme ? <div className={style.description}>{description}</div> : null}\n {hintView}\n </div>\n );\n};\n\nSelectMultiple.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCMMultipleView.propTypes = {\n multiple: PropTypes.bool,\n choice: TitledCheckbox.propTypes.choice,\n onChange: PropTypes.func\n};\n\nSelectMultiple.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n description: PropTypes.string,\n hint: PropTypes.string,\n options: PropTypes.arrayOf(TitledCheckbox.propTypes.choice),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n multiple: PropTypes.bool,\n modified: PropTypes.bool,\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n error: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle))\n};\n\nexport default SelectMultiple;\n"],"file":"index.js"}
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
@value lightGrey from colors;
|
|
7
7
|
@value negative from colors;
|
|
8
8
|
@value xtraLightGrey from colors;
|
|
9
|
+
@value cm_negative_100 from colors;
|
|
10
|
+
@value cm_grey_100 from colors;
|
|
11
|
+
@value cm_grey_150 from colors;
|
|
12
|
+
@value cm_grey_200 from colors;
|
|
9
13
|
@value cm_grey_400 from colors;
|
|
14
|
+
@value cm_grey_500 from colors;
|
|
10
15
|
@value cm_grey_700 from colors;
|
|
11
|
-
@value cm_grey_200 from colors;
|
|
12
|
-
@value cm_grey_150 from colors;
|
|
13
|
-
@value cm_grey_100 from colors;
|
|
14
|
-
@value cm_negative_100 from colors;
|
|
15
16
|
@value medium from colors;
|
|
16
17
|
@value defaultText from "../../variables/fonts.css";
|
|
17
18
|
|
|
@@ -227,12 +228,14 @@
|
|
|
227
228
|
flex-direction: column;
|
|
228
229
|
justify-content: center;
|
|
229
230
|
border-radius: 8px;
|
|
231
|
+
line-height: 31px;
|
|
230
232
|
width: 100%;
|
|
231
233
|
font-size: 14px;
|
|
232
234
|
color: black;
|
|
233
235
|
height: 44px;
|
|
234
236
|
padding: 11px 85px 11px 16px;
|
|
235
237
|
background-color: cm_grey_100;
|
|
238
|
+
overflow: visible;
|
|
236
239
|
}
|
|
237
240
|
|
|
238
241
|
.coorpmanager .select .title {
|
|
@@ -265,7 +268,7 @@
|
|
|
265
268
|
font-weight: 500;
|
|
266
269
|
transition: all 0.25s ease;
|
|
267
270
|
line-height: 20px;
|
|
268
|
-
margin:
|
|
271
|
+
margin: 0 0 -10px 0;
|
|
269
272
|
text-overflow: ellipsis;
|
|
270
273
|
white-space: nowrap;
|
|
271
274
|
overflow: hidden;
|
|
@@ -277,6 +280,10 @@
|
|
|
277
280
|
font-weight: 500;
|
|
278
281
|
}
|
|
279
282
|
|
|
283
|
+
.coorpmanager .select .title.noValue {
|
|
284
|
+
font-weight: 500;
|
|
285
|
+
}
|
|
286
|
+
|
|
280
287
|
.coorpmanager .select .title.noValue.active,
|
|
281
288
|
.coorpmanager .select .title.titleWithSelection {
|
|
282
289
|
font-size: 10px;
|
|
@@ -310,8 +317,6 @@
|
|
|
310
317
|
|
|
311
318
|
.coorpmanager .infoIconWrapper {
|
|
312
319
|
overflow: visible;
|
|
313
|
-
height: 12px;
|
|
314
|
-
margin: 0 4px;
|
|
315
320
|
cursor: pointer;
|
|
316
321
|
pointer-events: fill;
|
|
317
322
|
position: relative;
|
|
@@ -319,16 +324,16 @@
|
|
|
319
324
|
|
|
320
325
|
.coorpmanager .infoIcon {
|
|
321
326
|
cursor: pointer;
|
|
322
|
-
width:
|
|
327
|
+
width: 10px;
|
|
328
|
+
height: 10px;
|
|
323
329
|
margin: 4px 4px 0 4px;
|
|
324
|
-
height: 8px;
|
|
325
330
|
line-height: 16px;
|
|
326
331
|
color: cm_grey_400;
|
|
327
332
|
transition: all 0.25s linear;
|
|
328
333
|
}
|
|
329
334
|
|
|
330
335
|
.coorpmanager .select .title.noValue .infoIcon {
|
|
331
|
-
color:
|
|
336
|
+
color: cm_grey_500;
|
|
332
337
|
}
|
|
333
338
|
|
|
334
339
|
.coorpmanager .select .title.noValue.active .infoIcon,
|
|
@@ -344,7 +349,6 @@
|
|
|
344
349
|
|
|
345
350
|
.coorpmanager .descriptionLabel {
|
|
346
351
|
margin: 0 1px 18px 0;
|
|
347
|
-
padding: 8px 16px;
|
|
348
352
|
border-radius: 7px;
|
|
349
353
|
background-color: cm_grey_700;
|
|
350
354
|
flex-grow: 0;
|
|
@@ -357,14 +361,21 @@
|
|
|
357
361
|
letter-spacing: normal;
|
|
358
362
|
text-align: center;
|
|
359
363
|
color: white;
|
|
364
|
+
padding: 8px 16px;
|
|
360
365
|
max-width: 200px;
|
|
361
366
|
position: absolute;
|
|
362
|
-
left: -
|
|
363
|
-
z-index:
|
|
364
|
-
bottom:
|
|
367
|
+
left: -20px;
|
|
368
|
+
z-index: 999;
|
|
369
|
+
bottom: 18px;
|
|
365
370
|
width: max-content;
|
|
366
371
|
visibility: hidden;
|
|
367
|
-
opacity:
|
|
372
|
+
opacity: 0;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.coorpmanager .title.titleWithSelection .descriptionLabel,
|
|
376
|
+
.coorpmanager .title.noValue.active .descriptionLabel {
|
|
377
|
+
left: -19px;
|
|
378
|
+
bottom: 1px;
|
|
368
379
|
}
|
|
369
380
|
|
|
370
381
|
.coorpmanager .descriptionLabel::after {
|
|
@@ -378,7 +389,7 @@
|
|
|
378
389
|
}
|
|
379
390
|
|
|
380
391
|
.coorpmanager .title.noValue .descriptionLabel::after {
|
|
381
|
-
left:
|
|
392
|
+
left: 22px;
|
|
382
393
|
}
|
|
383
394
|
|
|
384
395
|
.coorpmanager:focus-within .title.noValue .descriptionLabel::after {
|
|
@@ -399,6 +410,8 @@
|
|
|
399
410
|
width: 44px;
|
|
400
411
|
height: 44px;
|
|
401
412
|
display: flex;
|
|
413
|
+
border-top-right-radius: 8px;
|
|
414
|
+
border-bottom-right-radius: 8px;
|
|
402
415
|
justify-content: center;
|
|
403
416
|
align-items: center;
|
|
404
417
|
}
|
|
@@ -484,3 +497,7 @@
|
|
|
484
497
|
.coorpmanager.disabled .arrow {
|
|
485
498
|
opacity: 0.5;
|
|
486
499
|
}
|
|
500
|
+
|
|
501
|
+
.coorpmanager .hideHint {
|
|
502
|
+
visibility: hidden;
|
|
503
|
+
}
|
|
@@ -8,6 +8,14 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
|
|
|
8
8
|
|
|
9
9
|
var _ = _interopRequireDefault(require(".."));
|
|
10
10
|
|
|
11
|
+
var _checkedCmThemeDisabled = _interopRequireDefault(require("./fixtures/checked-cm-theme-disabled"));
|
|
12
|
+
|
|
13
|
+
var _checkedCmThemeError = _interopRequireDefault(require("./fixtures/checked-cm-theme-error"));
|
|
14
|
+
|
|
15
|
+
var _checkedCmThemeMultiple = _interopRequireDefault(require("./fixtures/checked-cm-theme-multiple"));
|
|
16
|
+
|
|
17
|
+
var _checkedCmTheme = _interopRequireDefault(require("./fixtures/checked-cm-theme"));
|
|
18
|
+
|
|
11
19
|
var _checkedCockpitTheme = _interopRequireDefault(require("./fixtures/checked-cockpit-theme"));
|
|
12
20
|
|
|
13
21
|
var _checkedSetupTheme = _interopRequireDefault(require("./fixtures/checked-setup-theme"));
|
|
@@ -28,6 +36,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
28
36
|
t.not(value, undefined, `PropType for "Molecule.MoleculeSelectMultiple.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
29
37
|
});
|
|
30
38
|
});
|
|
39
|
+
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedCmThemeDisabled › should be rendered', _renderComponent.default, _.default, _checkedCmThemeDisabled.default);
|
|
40
|
+
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedCmThemeError › should be rendered', _renderComponent.default, _.default, _checkedCmThemeError.default);
|
|
41
|
+
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedCmThemeMultiple › should be rendered', _renderComponent.default, _.default, _checkedCmThemeMultiple.default);
|
|
42
|
+
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedCmTheme › should be rendered', _renderComponent.default, _.default, _checkedCmTheme.default);
|
|
31
43
|
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedCockpitTheme › should be rendered', _renderComponent.default, _.default, _checkedCockpitTheme.default);
|
|
32
44
|
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedSetupTheme › should be rendered', _renderComponent.default, _.default, _checkedSetupTheme.default);
|
|
33
45
|
(0, _ava.default)('Molecule › MoleculeSelectMultiple › Checked › should be rendered', _renderComponent.default, _.default, _checked.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/select-multiple/test/fixtures.js"],"names":["t","pass","MoleculeSelectMultiple","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCheckedCockpitTheme","fixtureCheckedSetupTheme","fixtureChecked","fixtureDefault","fixtureSetupThemeError","fixtureSetupTheme"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,8EAAL,
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/select-multiple/test/fixtures.js"],"names":["t","pass","MoleculeSelectMultiple","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCheckedCmThemeDisabled","fixtureCheckedCmThemeError","fixtureCheckedCmThemeMultiple","fixtureCheckedCmTheme","fixtureCheckedCockpitTheme","fixtureCheckedSetupTheme","fixtureChecked","fixtureDefault","fixtureSetupThemeError","fixtureSetupTheme"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,iFAAL,EAAwFG,wBAAxF,EAA8GN,SAA9G,EAAsIO,+BAAtI;AACA,kBAAK,8EAAL,EAAqFD,wBAArF,EAA2GN,SAA3G,EAAmIQ,4BAAnI;AACA,kBAAK,iFAAL,EAAwFF,wBAAxF,EAA8GN,SAA9G,EAAsIS,+BAAtI;AACA,kBAAK,yEAAL,EAAgFH,wBAAhF,EAAsGN,SAAtG,EAA8HU,uBAA9H;AACA,kBAAK,8EAAL,EAAqFJ,wBAArF,EAA2GN,SAA3G,EAAmIW,4BAAnI;AACA,kBAAK,4EAAL,EAAmFL,wBAAnF,EAAyGN,SAAzG,EAAiIY,0BAAjI;AACA,kBAAK,kEAAL,EAAyEN,wBAAzE,EAA+FN,SAA/F,EAAuHa,gBAAvH;AACA,kBAAK,kEAAL,EAAyEP,wBAAzE,EAA+FN,SAA/F,EAAuHc,gBAAvH;AACA,kBAAK,0EAAL,EAAiFR,wBAAjF,EAAuGN,SAAvG,EAA+He,wBAA/H;AACA,kBAAK,qEAAL,EAA4ET,wBAA5E,EAAkGN,SAAlG,EAA0HgB,mBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSelectMultiple from '..';\nimport fixtureCheckedCmThemeDisabled from './fixtures/checked-cm-theme-disabled';\nimport fixtureCheckedCmThemeError from './fixtures/checked-cm-theme-error';\nimport fixtureCheckedCmThemeMultiple from './fixtures/checked-cm-theme-multiple';\nimport fixtureCheckedCmTheme from './fixtures/checked-cm-theme';\nimport fixtureCheckedCockpitTheme from './fixtures/checked-cockpit-theme';\nimport fixtureCheckedSetupTheme from './fixtures/checked-setup-theme';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureDefault from './fixtures/default';\nimport fixtureSetupThemeError from './fixtures/setup-theme-error';\nimport fixtureSetupTheme from './fixtures/setup-theme';\n\ntest('Molecule › MoleculeSelectMultiple > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSelectMultiple.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSelectMultiple.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSelectMultiple › CheckedCmThemeDisabled › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCmThemeDisabled);\ntest('Molecule › MoleculeSelectMultiple › CheckedCmThemeError › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCmThemeError);\ntest('Molecule › MoleculeSelectMultiple › CheckedCmThemeMultiple › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCmThemeMultiple);\ntest('Molecule › MoleculeSelectMultiple › CheckedCmTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCmTheme);\ntest('Molecule › MoleculeSelectMultiple › CheckedCockpitTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCockpitTheme);\ntest('Molecule › MoleculeSelectMultiple › CheckedSetupTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedSetupTheme);\ntest('Molecule › MoleculeSelectMultiple › Checked › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureChecked);\ntest('Molecule › MoleculeSelectMultiple › Default › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureDefault);\ntest('Molecule › MoleculeSelectMultiple › SetupThemeError › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureSetupThemeError);\ntest('Molecule › MoleculeSelectMultiple › SetupTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureSetupTheme);\n"],"file":"fixtures.js"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
+
var _uniqueId2 = _interopRequireDefault(require("lodash/fp/uniqueId"));
|
|
7
|
+
|
|
6
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
9
|
|
|
8
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -17,12 +19,12 @@ var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
|
17
19
|
|
|
18
20
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
21
|
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
22
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
23
23
|
|
|
24
24
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
+
|
|
26
28
|
const buildItemsOfSection = items => {
|
|
27
29
|
return items.map((item, index) => {
|
|
28
30
|
const {
|
|
@@ -154,7 +156,7 @@ const WizardSummary = props => {
|
|
|
154
156
|
action
|
|
155
157
|
} = props;
|
|
156
158
|
const sectionsView = buildSections(sections);
|
|
157
|
-
const idSwitch = 'open-summary-wizard';
|
|
159
|
+
const idSwitch = (0, _uniqueId2.default)('open-summary-wizard');
|
|
158
160
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
159
161
|
className: _style.default.container
|
|
160
162
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/wizard-summary/index.js"],"names":["buildItemsOfSection","items","map","item","index","type","title","style","value","category","label","author","unsaved","contentWrapper","contentCounter","contentItem","content","contentTitle","__html","text","valueSimpleText","buildSectionHeader","section","counterText","sectionHeader","buildSections","sections","itemsView","sectionWrapper","BuildAction","action","onClick","icon","ariaLabel","handleClick","buttonProps","position","button","WizardSummary","props","sectionsView","idSwitch","container","desktopSummaryTitle","checkbox","summary","tabletSummaryHeader","tabletSummaryTitle","tabletSummaryIcon","summarySections","actionZone","propTypes","PropTypes","shape","string","func","arrayOf","oneOfType","bool","oneOf"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,mBAAmB,GAAGC,KAAK,IAAI;AACnC,SAAOA,KAAK,CAACC,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KAAiB;AAChC,UAAM;AAACC,MAAAA;AAAD,QAASF,IAAf;;AACA,YAAQE,IAAR;AACE,WAAK,aAAL;AACE,4BACE;AAAI,UAAA,GAAG,EAAG,GAAEF,IAAI,CAACG,KAAM,IAAGF,KAAM;AAAhC,wBACE;AAAM,UAAA,SAAS,EAAEG,eAAMD;AAAvB,WAA+BH,IAAI,CAACG,KAApC,CADF,eAEE;AAAM,UAAA,SAAS,EAAEC,eAAMC;AAAvB,WAA+BL,IAAI,CAACK,KAApC,CAFF,CADF;;AAMF,WAAK,SAAL;AAAgB;AACd,gBAAM;AAACC,YAAAA,QAAD;AAAWC,YAAAA,KAAX;AAAkBJ,YAAAA,KAAlB;AAAyBK,YAAAA,MAAzB;AAAiCC,YAAAA,OAAO,GAAG;AAA3C,cAAoDT,IAA1D;AACA,8BACE;AAAI,YAAA,SAAS,EAAEI,eAAMM,cAArB;AAAqC,YAAA,GAAG,EAAG,GAAEP,KAAM,IAAGF,KAAM;AAA5D,0BACE;AAAM,YAAA,SAAS,EAAEG,eAAMO;AAAvB,aAAwCV,KAAK,GAAG,CAAhD,CADF,eAEE;AAAK,YAAA,SAAS,EAAEG,eAAMQ;AAAtB,0BACE;AAAK,YAAA,SAAS,EAAER,eAAMS;AAAtB,0BACE,6BAAC,qBAAD;AAAc,YAAA,QAAQ,EAAEP,QAAxB;AAAkC,YAAA,KAAK,EAAEC;AAAzC,YADF,eAEE;AACE,YAAA,SAAS,EAAE,yBAAWH,eAAMU,YAAjB,EAA+BL,OAAO,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AAoB,CAClBL,mBAAUC,KAAV,CAAgB;AACdhD,MAAAA,IAAI,EAAE+C,mBAAUE,MADF;AAEdhD,MAAAA,KAAK,EAAE8C,mBAAUE,MAFH;AAGd9C,MAAAA,KAAK,EAAE4C,mBAAUE;AAHH,KAAhB,CADkB,EAMlBF,mBAAUC,KAAV,CAAgB;AACdhD,MAAAA,IAAI,EAAE+C,mBAAUE,MADF;AAEdnC,MAAAA,IAAI,EAAEiC,mBAAUE,MAFF;AAGd1C,MAAAA,OAAO,EAAEwC,mBAAUM;AAHL,KAAhB,CANkB,EAWlBN,mBAAUC,KAAV,CAAgB;AACdhD,MAAAA,IAAI,EAAE+C,mBAAUE,MADF;AAEd7C,MAAAA,QAAQ,EAAE2C,mBAAUO,KAAV,CAAgB,CACxB,MADwB,EAExB,UAFwB,EAGxB,OAHwB,EAIxB,SAJwB,EAKxB,OALwB,EAMxB,OANwB,EAOxB,SAPwB,EAQxB,SARwB,CAAhB,CAFI;AAYdrD,MAAAA,KAAK,EAAE8C,mBAAUE,MAZH;AAad5C,MAAAA,KAAK,EAAE0C,mBAAUE,MAbH;AAcd3C,MAAAA,MAAM,EAAEyC,mBAAUE,MAdJ;AAed1C,MAAAA,OAAO,EAAEwC,mBAAUM;AAfL,KAAhB,CAXkB,CAApB,CADK,CAFO;AAiCdnC,IAAAA,WAAW,EAAE6B,mBAAUE;AAjCT,GAAhB,CADQ,CAFc;AAuCxBxB,EAAAA,MAAM,EAAED,WAAW,CAACsB,SAAZ,CAAsBrB;AAvCN,CAA1B;eA0CeQ,a","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {NovaCompositionNavigationArrowDown as ArrowDownIcon} from '@coorpacademy/nova-icons';\nimport ContentBadge from '../../atom/content-badge';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildItemsOfSection = items => {\n return items.map((item, index) => {\n const {type} = item;\n switch (type) {\n case 'mainElement':\n return (\n <li key={`${item.title}-${index}`}>\n <span className={style.title}>{item.title}</span>\n <span className={style.value}>{item.value}</span>\n </li>\n );\n case 'content': {\n const {category, label, title, author, unsaved = false} = item;\n return (\n <li className={style.contentWrapper} key={`${title}-${index}`}>\n <span className={style.contentCounter}>{index + 1}</span>\n <div className={style.contentItem}>\n <div className={style.content}>\n <ContentBadge category={category} label={label} />\n <span\n className={classnames(style.contentTitle, unsaved && style.unsaved)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n {author ? <span className={style.author}>{author}</span> : null}\n </div>\n </li>\n );\n }\n case 'text':\n default: {\n const {text, unsaved = false} = item;\n return (\n <li key={`${item.text}-${index}`}>\n <span className={classnames(style.valueSimpleText, unsaved && style.unsaved)}>\n {text}\n </span>\n </li>\n );\n }\n }\n });\n};\n\nconst buildSectionHeader = section => {\n const {title, counterText} = section;\n if (!title) {\n return null;\n }\n return (\n <div className={style.sectionHeader}>\n <span className={style.title}>{title}</span>\n {counterText ? <span className={style.counterText}>{counterText}</span> : null}\n </div>\n );\n};\n\nconst buildSections = sections => {\n return sections.map((section, index) => {\n const sectionHeader = buildSectionHeader(section);\n const itemsView = buildItemsOfSection(section.items);\n return (\n <div key={`summary-section-${index}`} data-step={index} className={style.sectionWrapper}>\n {sectionHeader}\n <ul>{itemsView}</ul>\n </div>\n );\n });\n};\n\nconst BuildAction = ({action}) => {\n const {onClick, text, icon, 'aria-label': ariaLabel} = action;\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n\n if (!action) return null;\n\n const buttonProps = {\n type: 'text',\n label: text,\n 'aria-label': ariaLabel,\n 'data-name': `${icon}-button`,\n onClick: handleClick,\n icon: {\n position: 'left',\n type: icon\n }\n };\n\n return (\n <div className={style.button}>\n <ButtonLink {...buttonProps} />\n </div>\n );\n};\n\nconst WizardSummary = props => {\n const {title, sections, action} = props;\n const sectionsView = buildSections(sections);\n const idSwitch = 'open-summary-wizard';\n\n return (\n <div className={style.container}>\n <span className={style.desktopSummaryTitle}>{title}</span>\n <input\n type=\"checkbox\"\n id={idSwitch}\n name=\"toogle\"\n title={idSwitch}\n className={style.checkbox}\n />\n <div className={style.summary}>\n <div className={style.tabletSummaryHeader}>\n <label htmlFor={idSwitch}>\n <span className={style.tabletSummaryTitle}>{title}</span>\n <ArrowDownIcon className={style.tabletSummaryIcon} />\n </label>\n </div>\n <div className={style.summarySections}>{sectionsView}</div>\n </div>\n <div className={style.actionZone}>\n <BuildAction action={action} />\n </div>\n </div>\n );\n};\n\nBuildAction.propTypes = {\n action: PropTypes.shape({\n icon: PropTypes.string,\n text: PropTypes.string,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n};\n\nWizardSummary.propTypes = {\n title: PropTypes.string,\n sections: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.string,\n title: PropTypes.string,\n value: PropTypes.string\n }),\n PropTypes.shape({\n type: PropTypes.string,\n text: PropTypes.string,\n unsaved: PropTypes.bool\n }),\n PropTypes.shape({\n type: PropTypes.string,\n category: PropTypes.oneOf([\n 'base',\n 'advanced',\n 'coach',\n 'chapter',\n 'scorm',\n 'video',\n 'article',\n 'podcast'\n ]),\n title: PropTypes.string,\n label: PropTypes.string,\n author: PropTypes.string,\n unsaved: PropTypes.bool\n })\n ])\n ),\n counterText: PropTypes.string\n })\n ),\n action: BuildAction.propTypes.action\n};\n\nexport default WizardSummary;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/wizard-summary/index.js"],"names":["buildItemsOfSection","items","map","item","index","type","title","style","value","category","label","author","unsaved","contentWrapper","contentCounter","contentItem","content","contentTitle","__html","text","valueSimpleText","buildSectionHeader","section","counterText","sectionHeader","buildSections","sections","itemsView","sectionWrapper","BuildAction","action","onClick","icon","ariaLabel","handleClick","buttonProps","position","button","WizardSummary","props","sectionsView","idSwitch","container","desktopSummaryTitle","checkbox","summary","tabletSummaryHeader","tabletSummaryTitle","tabletSummaryIcon","summarySections","actionZone","propTypes","PropTypes","shape","string","func","arrayOf","oneOfType","bool","oneOf"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,mBAAmB,GAAGC,KAAK,IAAI;AACnC,SAAOA,KAAK,CAACC,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KAAiB;AAChC,UAAM;AAACC,MAAAA;AAAD,QAASF,IAAf;;AACA,YAAQE,IAAR;AACE,WAAK,aAAL;AACE,4BACE;AAAI,UAAA,GAAG,EAAG,GAAEF,IAAI,CAACG,KAAM,IAAGF,KAAM;AAAhC,wBACE;AAAM,UAAA,SAAS,EAAEG,eAAMD;AAAvB,WAA+BH,IAAI,CAACG,KAApC,CADF,eAEE;AAAM,UAAA,SAAS,EAAEC,eAAMC;AAAvB,WAA+BL,IAAI,CAACK,KAApC,CAFF,CADF;;AAMF,WAAK,SAAL;AAAgB;AACd,gBAAM;AAACC,YAAAA,QAAD;AAAWC,YAAAA,KAAX;AAAkBJ,YAAAA,KAAlB;AAAyBK,YAAAA,MAAzB;AAAiCC,YAAAA,OAAO,GAAG;AAA3C,cAAoDT,IAA1D;AACA,8BACE;AAAI,YAAA,SAAS,EAAEI,eAAMM,cAArB;AAAqC,YAAA,GAAG,EAAG,GAAEP,KAAM,IAAGF,KAAM;AAA5D,0BACE;AAAM,YAAA,SAAS,EAAEG,eAAMO;AAAvB,aAAwCV,KAAK,GAAG,CAAhD,CADF,eAEE;AAAK,YAAA,SAAS,EAAEG,eAAMQ;AAAtB,0BACE;AAAK,YAAA,SAAS,EAAER,eAAMS;AAAtB,0BACE,6BAAC,qBAAD;AAAc,YAAA,QAAQ,EAAEP,QAAxB;AAAkC,YAAA,KAAK,EAAEC;AAAzC,YADF,eAEE;AACE,YAAA,SAAS,EAAE,yBAAWH,eAAMU,YAAjB,EAA+BL,OAAO,IAAIL,e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AV,CAAoB,CAClBL,mBAAUC,KAAV,CAAgB;AACdhD,MAAAA,IAAI,EAAE+C,mBAAUE,MADF;AAEdhD,MAAAA,KAAK,EAAE8C,mBAAUE,MAFH;AAGd9C,MAAAA,KAAK,EAAE4C,mBAAUE;AAHH,KAAhB,CADkB,EAMlBF,mBAAUC,KAAV,CAAgB;AACdhD,MAAAA,IAAI,EAAE+C,mBAAUE,MADF;AAEdnC,MAAAA,IAAI,EAAEiC,mBAAUE,MAFF;AAGd1C,MAAAA,OAAO,EAAEwC,mBAAUM;AAHL,KAAhB,CANkB,EAWlBN,mBAAUC,KAAV,CAAgB;AACdhD,MAAAA,IAAI,EAAE+C,mBAAUE,MADF;AAEd7C,MAAAA,QAAQ,EAAE2C,mBAAUO,KAAV,CAAgB,CACxB,MADwB,EAExB,UAFwB,EAGxB,OAHwB,EAIxB,SAJwB,EAKxB,OALwB,EAMxB,OANwB,EAOxB,SAPwB,EAQxB,SARwB,CAAhB,CAFI;AAYdrD,MAAAA,KAAK,EAAE8C,mBAAUE,MAZH;AAad5C,MAAAA,KAAK,EAAE0C,mBAAUE,MAbH;AAcd3C,MAAAA,MAAM,EAAEyC,mBAAUE,MAdJ;AAed1C,MAAAA,OAAO,EAAEwC,mBAAUM;AAfL,KAAhB,CAXkB,CAApB,CADK,CAFO;AAiCdnC,IAAAA,WAAW,EAAE6B,mBAAUE;AAjCT,GAAhB,CADQ,CAFc;AAuCxBxB,EAAAA,MAAM,EAAED,WAAW,CAACsB,SAAZ,CAAsBrB;AAvCN,CAA1B;eA0CeQ,a","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {uniqueId} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDownIcon} from '@coorpacademy/nova-icons';\nimport ContentBadge from '../../atom/content-badge';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildItemsOfSection = items => {\n return items.map((item, index) => {\n const {type} = item;\n switch (type) {\n case 'mainElement':\n return (\n <li key={`${item.title}-${index}`}>\n <span className={style.title}>{item.title}</span>\n <span className={style.value}>{item.value}</span>\n </li>\n );\n case 'content': {\n const {category, label, title, author, unsaved = false} = item;\n return (\n <li className={style.contentWrapper} key={`${title}-${index}`}>\n <span className={style.contentCounter}>{index + 1}</span>\n <div className={style.contentItem}>\n <div className={style.content}>\n <ContentBadge category={category} label={label} />\n <span\n className={classnames(style.contentTitle, unsaved && style.unsaved)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n {author ? <span className={style.author}>{author}</span> : null}\n </div>\n </li>\n );\n }\n case 'text':\n default: {\n const {text, unsaved = false} = item;\n return (\n <li key={`${item.text}-${index}`}>\n <span className={classnames(style.valueSimpleText, unsaved && style.unsaved)}>\n {text}\n </span>\n </li>\n );\n }\n }\n });\n};\n\nconst buildSectionHeader = section => {\n const {title, counterText} = section;\n if (!title) {\n return null;\n }\n return (\n <div className={style.sectionHeader}>\n <span className={style.title}>{title}</span>\n {counterText ? <span className={style.counterText}>{counterText}</span> : null}\n </div>\n );\n};\n\nconst buildSections = sections => {\n return sections.map((section, index) => {\n const sectionHeader = buildSectionHeader(section);\n const itemsView = buildItemsOfSection(section.items);\n return (\n <div key={`summary-section-${index}`} data-step={index} className={style.sectionWrapper}>\n {sectionHeader}\n <ul>{itemsView}</ul>\n </div>\n );\n });\n};\n\nconst BuildAction = ({action}) => {\n const {onClick, text, icon, 'aria-label': ariaLabel} = action;\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n\n if (!action) return null;\n\n const buttonProps = {\n type: 'text',\n label: text,\n 'aria-label': ariaLabel,\n 'data-name': `${icon}-button`,\n onClick: handleClick,\n icon: {\n position: 'left',\n type: icon\n }\n };\n\n return (\n <div className={style.button}>\n <ButtonLink {...buttonProps} />\n </div>\n );\n};\n\nconst WizardSummary = props => {\n const {title, sections, action} = props;\n const sectionsView = buildSections(sections);\n const idSwitch = uniqueId('open-summary-wizard');\n\n return (\n <div className={style.container}>\n <span className={style.desktopSummaryTitle}>{title}</span>\n <input\n type=\"checkbox\"\n id={idSwitch}\n name=\"toogle\"\n title={idSwitch}\n className={style.checkbox}\n />\n <div className={style.summary}>\n <div className={style.tabletSummaryHeader}>\n <label htmlFor={idSwitch}>\n <span className={style.tabletSummaryTitle}>{title}</span>\n <ArrowDownIcon className={style.tabletSummaryIcon} />\n </label>\n </div>\n <div className={style.summarySections}>{sectionsView}</div>\n </div>\n <div className={style.actionZone}>\n <BuildAction action={action} />\n </div>\n </div>\n );\n};\n\nBuildAction.propTypes = {\n action: PropTypes.shape({\n icon: PropTypes.string,\n text: PropTypes.string,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n })\n};\n\nWizardSummary.propTypes = {\n title: PropTypes.string,\n sections: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.string,\n title: PropTypes.string,\n value: PropTypes.string\n }),\n PropTypes.shape({\n type: PropTypes.string,\n text: PropTypes.string,\n unsaved: PropTypes.bool\n }),\n PropTypes.shape({\n type: PropTypes.string,\n category: PropTypes.oneOf([\n 'base',\n 'advanced',\n 'coach',\n 'chapter',\n 'scorm',\n 'video',\n 'article',\n 'podcast'\n ]),\n title: PropTypes.string,\n label: PropTypes.string,\n author: PropTypes.string,\n unsaved: PropTypes.bool\n })\n ])\n ),\n counterText: PropTypes.string\n })\n ),\n action: BuildAction.propTypes.action\n};\n\nexport default WizardSummary;\n"],"file":"index.js"}
|