@coorpacademy/components
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -1,1 +0,1 @@ | ||
var Components=function(e){function t(u){if(n[u])return n[u].exports;var r=n[u]={exports:{},id:u,loaded:!1};return e[u].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}({0:function(e,t,n){"use strict";function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}var r=n(127),l=u(r);e.exports=l},7:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(e[u]=n[u])}return e},l=n(45),a=u(l),o=n(128),i=u(o),d=function(e){return function(t,n){var u=t.map,l=t.resolve,o=(0,i.default)(e)(t,n),d=function(e){return r({},e,{children:u(l,e.children)})},c=function(e){return o(d(e))};return c.decorate=(0,a.default)(t)(c),c}};t.default=d},22:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(130),l=u(r),a=n(121),o=u(a);t.default=function(e,t){return function(n){var u=e.h,r=t.skin,a=t.translate,i=n.module,d=n.onClick,c=n.delay,f=n.after,s=(0,o.default)(e,t),_=String.fromCharCode(r.icons[i.status]),p=i.filtered,v=i.disabled,b=p||v?l.default.disabled:l.default.default,m=a?a(i.label):i.label,M=.08*(c||0)+.8*(f||0)+"s";return u("div",{className:l.default.modulewrapper,style:{animationDelay:M}},u("span",{className:b,attributes:{"data-icon":_},style:{background:r&&r.mod[i.status]},onClick:function(e){e.stopPropagation(),d(i)}}),u(s,null,m))}}},45:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.h;return function(e,n){return function(u,r){return function(l){return t(e,n,t(u,r,l.children))}}}};t.default=n},115:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),l=u(r),a=function(e,t){return function(e){var t={style:{textAlign:"center"}};return t}};t.default=(0,l.default)(a)},116:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),l=u(r),a=function(e,t){return function(e){var n=t.skin,u={style:{color:e.value||n&&n.primary}};return u}};t.default=(0,l.default)(a)},117:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),l=u(r),a=function(e,t){return function(e){var n=t.skin,u={style:{color:e.value||n&&n.texts.normal}};return u}};t.default=(0,l.default)(a)},118:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),l=u(r),a=function(e,t){return function(e){var t={style:{fontSize:"12px",fontWeight:"normal"}};return t}};t.default=(0,l.default)(a)},119:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),l=u(r),a=function(e,t){return function(e){var t={style:{fontSize:"9px"}};return t}};t.default=(0,l.default)(a)},120:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(7),l=u(r),a=function(e,t){return function(e){var t={style:{textTransform:"uppercase"}};return t}};t.default=(0,l.default)(a)},121:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(122),l=u(r),a=n(119),o=u(a),i=n(120),d=u(i),c=n(117),f=u(c);t.default=function(e,t){return function(n){var u=e.h,r=t.skin,a=(0,l.default)(e,t),i=(0,d.default)(e,t),c=(0,o.default)(e,t),s=(0,f.default)(e,t);return u(i,null,u(c,null,u(s,{value:r.texts["mod-tree-label"]},u(a,null,n.children))))}}},122:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(129),l=u(r);t.default=function(e,t){return function(t){var n=e.h;return n("span",{className:l.default.default},t.children)}}},123:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(t){var n=e.h;return n("h1",null,t.children)}}},124:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(131),l=u(r),a=n(22),o=u(a),i=n(115),d=u(i);t.default=function(e,t){var n=(0,o.default)(e,t),u=(0,d.default)(e,t);return function(r){var a=e.h,o=t.translate,i=r.discipline,d=r.onClick,c=r.onModuleClick,f=.2*(Math.floor(7*Math.random())+3),s=f+"s",_=i.modules.map(function(e,t){return a(n,{module:e,onClick:c,delay:t,after:f,key:e.ref})}),p=o?o(i.label):i.label;return a("div",{className:l.default.default,onClick:function(e){return d(i)},style:{animationDuration:s}},a("div",{className:l.default.area},a("div",{className:l.default.text},a("p",{className:l.default.headerModule},p))),a(u,null,a("div",{className:l.default.moduleProgressionWrapper},_)))}}},125:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(132),l=u(r),a=n(124),o=u(a);t.default=function(e,t){var n=(0,o.default)(e,t);return function(u){var r=e.h,a=t.skin,o=u.onModuleClick,i=u.onDisciplineClick,d=u.disciplines.map(function(e){return r(n,{discipline:e,onClick:i,onModuleClick:o,key:e.ref})}),c=a&&a.images&&a.images.tree,f=a&&a.theme&&a.theme.background||"#123",s=c?"url("+c+")":f;return r("div",{className:l.default.default,style:{backgroundImage:s}},d)}}},126:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(133),l=u(r),a=n(123),o=u(a),i=n(22),d=u(i),c=n(118),f=u(c),s=n(116),_=u(s);t.default=function(e,t){return function(n){var u=e.h,r=(0,o.default)(e,t),a=(0,d.default)(e,t),i=(0,_.default)(e,t),c=(0,f.default)(e,t),s=c.decorate(r),p=i.decorate(r),v=c.decorate(p);return u("article",{className:l.default.container},u(a,null),u(p,null,"ColoredTitle"),u(v,null,"ColoredBigTitle"),u(s,null,"BigTitle"),u(c,null,u(i,null,u(r,null,"ColorPrimary + FontNormal wrapped title"))),u("p",{className:l.default.subTitle},"Saisissez votre réponse"),u("form",{onSubmit:function(e){return n.onValidate()&&!1}},u("textarea",{className:l.default.textArea,onChange:function(e){return n.onChange(e.target.value)}}),u("input",{type:"button",className:l.default.button,onClick:function(e){return n.onValidate()},value:"Vérifier la réponse"})))}}},127:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDisciplineCards=t.createModuleBubble=t.createSlide=void 0;var r=n(126),l=u(r),a=n(22),o=u(a),i=n(125),d=u(i);t.createSlide=l.default,t.createModuleBubble=o.default,t.createDisciplineCards=d.default},128:function(e,t,n){"use strict";function u(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(45),l=u(r),a=function(e){return function(t,n){return function(u){var r=t.clone,l=t.map;if(!r||!l)return u.children;var a=e(t,n)(u),o=l(function(e){return e},u.children)[0];return r(o,a)}}},o=function(e){return function(t,n){var u=a(e)(t,n);return u.decorate=(0,l.default)(t)(u),u}};t.default=o},129:function(e,t){e.exports={"default":"label__default___MA2iU"}},130:function(e,t){e.exports={"default":"module-bubble__default___33Ue3",disabled:"module-bubble__disabled___2Cukn module-bubble__default___33Ue3",modulewrapper:"module-bubble__modulewrapper___27I3D",bubbleFadeIn:"module-bubble__bubbleFadeIn___18EFn"}},131:function(e,t){e.exports={"default":"discipline-card__default___3tNQe",disciplineCardFadeIn:"discipline-card__disciplineCardFadeIn___2mpdh",moduleProgressionWrapper:"discipline-card__moduleProgressionWrapper___2yLOJ",area:"discipline-card__area___35nmx",text:"discipline-card__text___1v40p",headerModule:"discipline-card__headerModule___3LVXV"}},132:function(e,t){e.exports={"default":"discipline-cards__default___sVz3P"}},133:function(e,t){e.exports={defaultColor:"#030",container:"slide__container___3dM6O",subTitle:"slide__subTitle___tKyKc",textArea:"slide__textArea___1hfkZ",button:"slide__button___1UK13"}}}); | ||
var Components=function(e){function t(n){if(u[n])return u[n].exports;var r=u[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var u={};return t.m=e,t.c=u,t.p="",t(0)}({0:function(e,t,u){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&(t[u]=e[u]);return t.default=e,t}var r=u(125),l=n(r);e.exports=l},17:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var u=arguments[t];for(var n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n])}return e},l=u(47),a=n(l),o=u(126),i=n(o),d=function(e){return function(t,u){var n=t.map,l=t.resolve,o=(0,i.default)(e)(t,u),d=function(e){return r({},e,{children:n(l,e.children)})},c=function(e){return o(d(e))};return c.decorate=(0,a.default)(t)(c),c}};t.default=d},44:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(128),l=n(r),a=u(121),o=n(a);t.default=function(e,t){var u=e.h,n=t.skin,r=t.translate,a=(0,o.default)(e,t);return function(e){var t=e.module,o=e.onClick,i=e.delay,d=e.after,c=String.fromCharCode(n.icons[t.status]),f=t.filtered,s=t.disabled,_=f||s?l.default.disabled:l.default.default,p=r?r(t.label):t.label,v=.08*(i||0)+.8*(d||0)+"s";return u("div",{className:l.default.modulewrapper,style:{animationDelay:v}},u("span",{className:_,attributes:{"data-icon":c},style:{background:n&&n.mod[t.status]},onClick:function(e){e.stopPropagation(),o(t)}}),u(a,null,p))}}},45:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(130),l=n(r);t.default=function(e,t){var u=e.h,n=t.translate;return function(e){var t=e.state,r=e.onToggle,a=n?n(t.label):t.label;return u("div",{className:l.default.default},u("span",null,a),u("input",{type:"checkbox",className:l.default.box,checked:t.checked,onChange:function(){return r(t)}}))}}},46:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(131),l=n(r),a=u(44),o=n(a),i=u(117),d=n(i);t.default=function(e,t){var u=(0,o.default)(e,t),n=(0,d.default)(e,t);return function(r){var a=e.h,o=t.translate,i=r.discipline,d=r.onClick,c=r.onModuleClick,f=.2*(Math.floor(7*Math.random())+3),s=f+"s",_=i.modules.map(function(e,t){return a(u,{module:e,onClick:c,delay:t,after:f,key:e.ref})}),p=o?o(i.label):i.label;return a("div",{className:l.default.default,onClick:function(e){return d(i)},style:{animationDuration:s}},a("div",{className:l.default.area},a("div",{className:l.default.text},a("p",{className:l.default.headerModule},p))),a(n,null,a("div",{className:l.default.moduleProgressionWrapper},_)))}}},47:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=function(e){var t=e.h;return function(e,u){return function(n,r){return function(l){return t(e,u,t(n,r,l.children))}}}};t.default=u},117:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(17),l=n(r),a=function(e,t){return function(e){var t={style:{textAlign:"center"}};return t}};t.default=(0,l.default)(a)},118:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(17),l=n(r),a=function(e,t){return function(e){var u=t.skin,n={style:{color:e.value||u&&u.texts.normal}};return n}};t.default=(0,l.default)(a)},119:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(17),l=n(r),a=function(e,t){return function(e){var t={style:{fontSize:"9px"}};return t}};t.default=(0,l.default)(a)},120:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(17),l=n(r),a=function(e,t){return function(e){var t={style:{textTransform:"uppercase"}};return t}};t.default=(0,l.default)(a)},121:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(122),l=n(r),a=u(119),o=n(a),i=u(120),d=n(i),c=u(118),f=n(c);t.default=function(e,t){return function(u){var n=e.h,r=t.skin,a=(0,l.default)(e,t),i=(0,d.default)(e,t),c=(0,o.default)(e,t),s=(0,f.default)(e,t);return n(i,null,n(c,null,n(s,{value:r.texts["mod-tree-label"]},n(a,null,u.children))))}}},122:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(127),l=n(r);t.default=function(e,t){return function(t){var u=e.h;return u("span",{className:l.default.default},t.children)}}},123:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(129),l=n(r),a=u(45),o=n(a);t.default=function(e,t){var u=e.h,n=(0,o.default)(e,t);return function(e){var t=e.choices,r=e.onToggle,a=t.map(function(e){return u("li",{className:l.default.line},u(n,{state:e,onToggle:r}))});return u("ul",{className:l.default.default},a)}}},124:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(132),l=n(r),a=u(46),o=n(a);t.default=function(e,t){var u=(0,o.default)(e,t);return function(n){var r=e.h,a=t.skin,o=n.onModuleClick,i=n.onDisciplineClick,d=n.disciplines.map(function(e){return r(u,{discipline:e,onClick:i,onModuleClick:o,key:e.ref})}),c=a&&a.images&&a.images.tree,f=a&&a.theme&&a.theme.background||"#123",s=c?"url("+c+")":f;return r("div",{className:l.default.default,style:{backgroundImage:s}},d)}}},125:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.createDisciplineCards=t.createDisciplineCard=t.createTitledCheckbox=t.createSelectBox=t.createModuleBubble=void 0;var r=u(44),l=n(r),a=u(123),o=n(a),i=u(45),d=n(i),c=u(46),f=n(c),s=u(124),_=n(s);t.createModuleBubble=l.default,t.createSelectBox=o.default,t.createTitledCheckbox=d.default,t.createDisciplineCard=f.default,t.createDisciplineCards=_.default},126:function(e,t,u){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=u(47),l=n(r),a=function(e){return function(t,u){return function(n){var r=t.clone,l=t.map;if(!r||!l)return n.children;var a=e(t,u)(n),o=l(function(e){return e},n.children)[0];return r(o,a)}}},o=function(e){return function(t,u){var n=a(e)(t,u);return n.decorate=(0,l.default)(t)(n),n}};t.default=o},127:function(e,t){e.exports={"default":"label__default___MA2iU"}},128:function(e,t){e.exports={"default":"module-bubble__default___33Ue3",disabled:"module-bubble__disabled___2Cukn module-bubble__default___33Ue3",modulewrapper:"module-bubble__modulewrapper___27I3D",bubbleFadeIn:"module-bubble__bubbleFadeIn___18EFn"}},129:function(e,t){e.exports={"default":"select-box__default___3Q68K",line:"select-box__line___3BK7D"}},130:function(e,t){e.exports={"default":"titled-checkbox__default___1fCfm",box:"titled-checkbox__box___2X7Xr"}},131:function(e,t){e.exports={"default":"discipline-card__default___3tNQe",disciplineCardFadeIn:"discipline-card__disciplineCardFadeIn___2mpdh",moduleProgressionWrapper:"discipline-card__moduleProgressionWrapper___2yLOJ",area:"discipline-card__area___35nmx",text:"discipline-card__text___1v40p",headerModule:"discipline-card__headerModule___3LVXV"}},132:function(e,t){e.exports={"default":"discipline-cards__default___sVz3P"}}}); |
@@ -18,3 +18,3 @@ 'use strict'; | ||
var refresh = function refresh() { | ||
var props = scope.props(); | ||
var props = scope.props || scope.buildProps(); | ||
var shallowTree = component(props); | ||
@@ -32,2 +32,6 @@ update(shallowTree); | ||
scope.$watch('props', function () { | ||
refresh(); | ||
}, true); | ||
scope.$on('$destroy', function () { | ||
@@ -61,3 +65,4 @@ window.angular.element(element).remove(); | ||
watch: '=', | ||
props: '&' | ||
props: '=', | ||
buildProps: '&' | ||
} | ||
@@ -64,0 +69,0 @@ }; |
@@ -18,6 +18,9 @@ 'use strict'; | ||
exports.default = function (engine, options) { | ||
var h = engine.h; | ||
var skin = options.skin; | ||
var translate = options.translate; | ||
var LabelModName = (0, _labelModName2.default)(engine, options); | ||
return function (props) { | ||
var h = engine.h; | ||
var skin = options.skin; | ||
var translate = options.translate; | ||
var module = props.module; | ||
@@ -28,5 +31,2 @@ var _onClick = props.onClick; | ||
var LabelModName = (0, _labelModName2.default)(engine, options); | ||
var iconCode = String.fromCharCode(skin.icons[module.status]); | ||
@@ -33,0 +33,0 @@ var filtered = module.filtered; |
@@ -6,8 +6,4 @@ 'use strict'; | ||
}); | ||
exports.createDisciplineCards = exports.createModuleBubble = exports.createSlide = undefined; | ||
exports.createDisciplineCards = exports.createDisciplineCard = exports.createTitledCheckbox = exports.createSelectBox = exports.createModuleBubble = undefined; | ||
var _slide = require('./design/organism/slide'); | ||
var _slide2 = _interopRequireDefault(_slide); | ||
var _moduleBubble = require('./design/molecule/module-bubble'); | ||
@@ -17,2 +13,14 @@ | ||
var _selectBox = require('./design/molecule/select-box'); | ||
var _selectBox2 = _interopRequireDefault(_selectBox); | ||
var _titledCheckbox = require('./design/molecule/titled-checkbox'); | ||
var _titledCheckbox2 = _interopRequireDefault(_titledCheckbox); | ||
var _disciplineCard = require('./design/organism/discipline-card'); | ||
var _disciplineCard2 = _interopRequireDefault(_disciplineCard); | ||
var _disciplineCards = require('./design/organism/discipline-cards'); | ||
@@ -24,5 +32,7 @@ | ||
exports.createSlide = _slide2.default; | ||
exports.createModuleBubble = _moduleBubble2.default; | ||
exports.createSelectBox = _selectBox2.default; | ||
exports.createTitledCheckbox = _titledCheckbox2.default; | ||
exports.createDisciplineCard = _disciplineCard2.default; | ||
exports.createDisciplineCards = _disciplineCards2.default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@coorpacademy/components", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Component library for web front ends", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97
579954
2874