nutella_framework 0.4.13 → 0.4.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/framework_components/order.json +2 -1
- data/framework_components/roomcast-bot/data/default/channels-data.json +1 -0
- data/framework_components/roomcast-bot/data/default/channels.json +1 -0
- data/framework_components/roomcast-bot/data/default/configs.json +1 -0
- data/framework_components/roomcast-bot/data/default/mapping.json +1 -0
- data/framework_components/roomcast-bot/roomcast_bot.rb +178 -0
- data/framework_components/roomcast-bot/startup +5 -0
- data/framework_components/roomcast-channel-creator/.gitignore +2 -0
- data/framework_components/roomcast-channel-creator/README.md +9 -0
- data/framework_components/roomcast-channel-creator/dist/app.js +29607 -0
- data/framework_components/roomcast-channel-creator/dist/css/font-awesome.min.css +4 -0
- data/framework_components/roomcast-channel-creator/dist/css/ionicons.min.css +11 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.svg +565 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.svg +2230 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-channel-creator/dist/main.css +3304 -0
- data/framework_components/roomcast-channel-creator/dist/nutella_lib.js +5068 -0
- data/framework_components/roomcast-channel-creator/gulp/config.js +51 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/browserify.js +77 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/build.js +3 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/css.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/default.js +3 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/fonts.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/less.js +16 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/mui-fonts.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/nutella.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/setWatch.js +5 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/svgs.js +7 -0
- data/framework_components/roomcast-channel-creator/gulp/tasks/watch.js +12 -0
- data/framework_components/roomcast-channel-creator/gulp/util/bundleLogger.js +21 -0
- data/framework_components/roomcast-channel-creator/gulp/util/handleErrors.js +15 -0
- data/framework_components/roomcast-channel-creator/gulpfile.js +16 -0
- data/framework_components/roomcast-channel-creator/index.html +52 -0
- data/framework_components/roomcast-channel-creator/nutella.json +6 -0
- data/framework_components/roomcast-channel-creator/package.json +37 -0
- data/framework_components/roomcast-channel-creator/src/app/app.js +22 -0
- data/framework_components/roomcast-channel-creator/src/app/components/AnimationMixin.js +44 -0
- data/framework_components/roomcast-channel-creator/src/app/components/CataloguePage.js +130 -0
- data/framework_components/roomcast-channel-creator/src/app/components/Channel.js +378 -0
- data/framework_components/roomcast-channel-creator/src/app/components/ColorCell.js +28 -0
- data/framework_components/roomcast-channel-creator/src/app/components/ColorPicker.js +53 -0
- data/framework_components/roomcast-channel-creator/src/app/components/DetailPage.js +66 -0
- data/framework_components/roomcast-channel-creator/src/app/components/NutellaMixin.js +40 -0
- data/framework_components/roomcast-channel-creator/src/app/components/PageSliderMixin.js +68 -0
- data/framework_components/roomcast-channel-creator/src/app/components/Router.js +52 -0
- data/framework_components/roomcast-channel-creator/src/app/components/TopBar.js +86 -0
- data/framework_components/roomcast-channel-creator/src/app/components/main.js +333 -0
- data/framework_components/roomcast-channel-creator/src/css/font-awesome.min.css +4 -0
- data/framework_components/roomcast-channel-creator/src/css/ionicons.min.css +11 -0
- data/framework_components/roomcast-channel-creator/src/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.svg +565 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.svg +2230 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-channel-creator/src/less/main.less +500 -0
- data/framework_components/roomcast-channel-creator/src/less/my_overrides.less +14 -0
- data/framework_components/roomcast-package-creator/.gitignore +2 -0
- data/framework_components/roomcast-package-creator/README.md +9 -0
- data/framework_components/roomcast-package-creator/dist/app.js +36624 -0
- data/framework_components/roomcast-package-creator/dist/css/font-awesome.min.css +4 -0
- data/framework_components/roomcast-package-creator/dist/css/ionicons.min.css +11 -0
- data/framework_components/roomcast-package-creator/dist/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.svg +565 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.svg +2230 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.svg +14 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/main.css +5932 -0
- data/framework_components/roomcast-package-creator/dist/nutella_lib.js +5068 -0
- data/framework_components/roomcast-package-creator/gulp/config.js +51 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/browserify.js +77 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/build.js +3 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/css.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/default.js +3 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/fonts.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/less.js +16 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/mui-fonts.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/nutella.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/setWatch.js +5 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/svgs.js +7 -0
- data/framework_components/roomcast-package-creator/gulp/tasks/watch.js +12 -0
- data/framework_components/roomcast-package-creator/gulp/util/bundleLogger.js +21 -0
- data/framework_components/roomcast-package-creator/gulp/util/handleErrors.js +15 -0
- data/framework_components/roomcast-package-creator/gulpfile.js +16 -0
- data/framework_components/roomcast-package-creator/index.html +51 -0
- data/framework_components/roomcast-package-creator/nutella.json +6 -0
- data/framework_components/roomcast-package-creator/package.json +38 -0
- data/framework_components/roomcast-package-creator/src/app/app.js +19 -0
- data/framework_components/roomcast-package-creator/src/app/components/ButtonInteractionsMixin.js +45 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelCard.js +87 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelItem.js +71 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js +64 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelsPanel.js +127 -0
- data/framework_components/roomcast-package-creator/src/app/components/ConfigField.js +50 -0
- data/framework_components/roomcast-package-creator/src/app/components/ConfigurationsPanel.js +114 -0
- data/framework_components/roomcast-package-creator/src/app/components/ContextButton.js +37 -0
- data/framework_components/roomcast-package-creator/src/app/components/GlobalButton.js +26 -0
- data/framework_components/roomcast-package-creator/src/app/components/NutellaMixin.js +23 -0
- data/framework_components/roomcast-package-creator/src/app/components/PoolHeader.js +67 -0
- data/framework_components/roomcast-package-creator/src/app/components/PoolRow.js +160 -0
- data/framework_components/roomcast-package-creator/src/app/components/ResourceFamilyPool.js +168 -0
- data/framework_components/roomcast-package-creator/src/app/components/ResourcesPanel.js +76 -0
- data/framework_components/roomcast-package-creator/src/app/components/main.js +222 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/dialog_.jsx +66 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/drop-down-menu.jsx +163 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/enhanced-textarea.jsx +113 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/floating-action-button_.jsx +73 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/menu-item.jsx +100 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/menu.jsx +209 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/overlay.jsx +21 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/raised-button_.jsx +72 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/right-nav.jsx +108 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/drop-down-arrow.jsx +17 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-chevron-left.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-chevron-right.jsx +17 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-menu.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/svg-icon.jsx +23 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-check-box-checked.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-check-box-outline-blank.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-radio-button-off.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-radio-button-on.jsx +16 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/text-field.jsx +215 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/css-event.js +52 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/date-time.js +132 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/dom.js +71 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/events.js +34 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/key-code.js +10 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/key-line.js +13 -0
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/unique-id.js +7 -0
- data/framework_components/roomcast-package-creator/src/css/font-awesome.min.css +4 -0
- data/framework_components/roomcast-package-creator/src/css/ionicons.min.css +11 -0
- data/framework_components/roomcast-package-creator/src/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.svg +565 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.svg +2230 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-package-creator/src/less/drop-down-icon.less +43 -0
- data/framework_components/roomcast-package-creator/src/less/drop-down-menu.less +77 -0
- data/framework_components/roomcast-package-creator/src/less/enhanced-textarea.less +16 -0
- data/framework_components/roomcast-package-creator/src/less/main.less +491 -0
- data/framework_components/roomcast-package-creator/src/less/menu-item.less +69 -0
- data/framework_components/roomcast-package-creator/src/less/menu.less +50 -0
- data/framework_components/roomcast-package-creator/src/less/my_overrides.less +15 -0
- data/framework_components/roomcast-package-creator/src/less/svg-icon.less +11 -0
- data/framework_components/roomcast-package-creator/src/less/text-field.less +168 -0
- data/lib/commands/checkup.rb +1 -1
- data/nutella_lib/framework_net.rb +0 -1
- metadata +173 -4
@@ -0,0 +1,17 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var SvgIcon = require('./svg-icon.jsx');
|
3
|
+
|
4
|
+
var DropDownArrow = React.createClass({
|
5
|
+
|
6
|
+
render: function() {
|
7
|
+
|
8
|
+
return (
|
9
|
+
<SvgIcon {...this.props} class={'mui-menu-drop-down-icon'}>
|
10
|
+
<polygon points="7,9.5 12,14.5 17,9.5 "/>
|
11
|
+
</SvgIcon>
|
12
|
+
);
|
13
|
+
}
|
14
|
+
|
15
|
+
});
|
16
|
+
|
17
|
+
module.exports = DropDownArrow;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var SvgIcon = require('./svg-icon.jsx');
|
3
|
+
|
4
|
+
var NavigationChevronLeft = React.createClass({
|
5
|
+
|
6
|
+
render: function() {
|
7
|
+
return (
|
8
|
+
<SvgIcon {...this.props}>
|
9
|
+
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
|
10
|
+
</SvgIcon>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
|
14
|
+
});
|
15
|
+
|
16
|
+
module.exports = NavigationChevronLeft;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var SvgIcon = require('./svg-icon.jsx');
|
3
|
+
|
4
|
+
var NavigationChevronLeft = React.createClass({
|
5
|
+
|
6
|
+
render: function() {
|
7
|
+
return (
|
8
|
+
<SvgIcon {...this.props}>
|
9
|
+
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
|
10
|
+
</SvgIcon>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
|
14
|
+
});
|
15
|
+
|
16
|
+
module.exports = NavigationChevronLeft;
|
17
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var SvgIcon = require('./svg-icon.jsx');
|
3
|
+
|
4
|
+
var NavigationMenu = React.createClass({
|
5
|
+
|
6
|
+
render: function() {
|
7
|
+
return (
|
8
|
+
<SvgIcon {...this.props}>
|
9
|
+
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
|
10
|
+
</SvgIcon>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
|
14
|
+
});
|
15
|
+
|
16
|
+
module.exports = NavigationMenu;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
|
3
|
+
var SvgIcon = React.createClass({
|
4
|
+
|
5
|
+
render: function() {
|
6
|
+
var classes = 'mui-svg-icon';
|
7
|
+
if(this.props.class) {
|
8
|
+
classes += ' ' + this.props.class;
|
9
|
+
}
|
10
|
+
|
11
|
+
return (
|
12
|
+
<svg
|
13
|
+
{...this.props}
|
14
|
+
className={classes}
|
15
|
+
viewBox="0 0 24 24">
|
16
|
+
{this.props.children}
|
17
|
+
</svg>
|
18
|
+
);
|
19
|
+
}
|
20
|
+
|
21
|
+
});
|
22
|
+
|
23
|
+
module.exports = SvgIcon;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var SvgIcon = require('./svg-icon.jsx');
|
3
|
+
|
4
|
+
var ToggleCheckBoxChecked = React.createClass({
|
5
|
+
|
6
|
+
render: function() {
|
7
|
+
return (
|
8
|
+
<SvgIcon {...this.props}>
|
9
|
+
<path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M10,17l-5-5l1.4-1.4 l3.6,3.6l7.6-7.6L19,8L10,17z"/>
|
10
|
+
</SvgIcon>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
|
14
|
+
});
|
15
|
+
|
16
|
+
module.exports = ToggleCheckBoxChecked;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var SvgIcon = require('./svg-icon.jsx');
|
3
|
+
|
4
|
+
var ToggleCheckBoxOutlineBlank = React.createClass({
|
5
|
+
|
6
|
+
render: function() {
|
7
|
+
return (
|
8
|
+
<SvgIcon {...this.props}>
|
9
|
+
<path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/>
|
10
|
+
</SvgIcon>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
|
14
|
+
});
|
15
|
+
|
16
|
+
module.exports = ToggleCheckBoxOutlineBlank;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var SvgIcon = require('./svg-icon.jsx');
|
3
|
+
|
4
|
+
var RadioButtonOff = React.createClass({
|
5
|
+
|
6
|
+
render: function() {
|
7
|
+
return (
|
8
|
+
<SvgIcon {...this.props}>
|
9
|
+
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
|
10
|
+
</SvgIcon>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
|
14
|
+
});
|
15
|
+
|
16
|
+
module.exports = RadioButtonOff;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var SvgIcon = require('./svg-icon.jsx');
|
3
|
+
|
4
|
+
var RadioButtonOn = React.createClass({
|
5
|
+
|
6
|
+
render: function() {
|
7
|
+
return (
|
8
|
+
<SvgIcon {...this.props}>
|
9
|
+
<path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
|
10
|
+
</SvgIcon>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
|
14
|
+
});
|
15
|
+
|
16
|
+
module.exports = RadioButtonOn;
|
data/framework_components/roomcast-package-creator/src/app/components/material-ui/text-field.jsx
ADDED
@@ -0,0 +1,215 @@
|
|
1
|
+
var React = require('react');
|
2
|
+
var Classable = require('../../../../node_modules/material-ui/src/js/mixins/classable');
|
3
|
+
var UniqueId = require('./utils/unique-id');
|
4
|
+
var EnhancedTextarea = require('./enhanced-textarea.jsx');
|
5
|
+
|
6
|
+
var TextField = React.createClass({
|
7
|
+
|
8
|
+
mixins: [Classable],
|
9
|
+
|
10
|
+
propTypes: {
|
11
|
+
errorText: React.PropTypes.string,
|
12
|
+
floatingLabelText: React.PropTypes.string,
|
13
|
+
hintText: React.PropTypes.string,
|
14
|
+
id: React.PropTypes.string,
|
15
|
+
multiLine: React.PropTypes.bool,
|
16
|
+
onBlur: React.PropTypes.func,
|
17
|
+
onChange: React.PropTypes.func,
|
18
|
+
onFocus: React.PropTypes.func,
|
19
|
+
onKeyDown: React.PropTypes.func,
|
20
|
+
onEnterKeyDown: React.PropTypes.func,
|
21
|
+
type: React.PropTypes.string
|
22
|
+
},
|
23
|
+
|
24
|
+
getDefaultProps: function() {
|
25
|
+
return {
|
26
|
+
type: 'text'
|
27
|
+
};
|
28
|
+
},
|
29
|
+
|
30
|
+
getInitialState: function() {
|
31
|
+
return {
|
32
|
+
errorText: this.props.errorText,
|
33
|
+
hasValue: this.props.value || this.props.defaultValue ||
|
34
|
+
(this.props.valueLink && this.props.valueLink.value)
|
35
|
+
};
|
36
|
+
},
|
37
|
+
|
38
|
+
componentWillReceiveProps: function(nextProps) {
|
39
|
+
var hasErrorProp = nextProps.hasOwnProperty('errorText');
|
40
|
+
var hasValueLinkProp = nextProps.hasOwnProperty('valueLink');
|
41
|
+
var hasValueProp = nextProps.hasOwnProperty('value');
|
42
|
+
var hasNewDefaultValue = nextProps.defaultValue !== this.props.defaultValue;
|
43
|
+
var newState = {};
|
44
|
+
|
45
|
+
if (hasValueProp) {
|
46
|
+
newState.hasValue = nextProps.value;
|
47
|
+
} else if (hasValueLinkProp) {
|
48
|
+
newState.hasValue = nextProps.valueLink.value;
|
49
|
+
} else if (hasNewDefaultValue) {
|
50
|
+
newState.hasValue = nextProps.defaultValue;
|
51
|
+
}
|
52
|
+
|
53
|
+
if (hasErrorProp) newState.errorText = nextProps.errorText;
|
54
|
+
if (newState) this.setState(newState);
|
55
|
+
},
|
56
|
+
|
57
|
+
render: function() {
|
58
|
+
var {
|
59
|
+
className,
|
60
|
+
errorText,
|
61
|
+
floatingLabelText,
|
62
|
+
hintText,
|
63
|
+
id,
|
64
|
+
multiLine,
|
65
|
+
onBlur,
|
66
|
+
onChange,
|
67
|
+
onFocus,
|
68
|
+
type,
|
69
|
+
...other
|
70
|
+
} = this.props;
|
71
|
+
|
72
|
+
var classes = this.getClasses('mui-text-field', {
|
73
|
+
'mui-has-error': this.props.errorText,
|
74
|
+
'mui-has-floating-labels': this.props.floatingLabelText,
|
75
|
+
'mui-has-value': this.state.hasValue,
|
76
|
+
'mui-is-disabled': this.props.disabled,
|
77
|
+
'mui-is-focused': this.state.isFocused,
|
78
|
+
'mui-is-multiLine': this.props.multiLine
|
79
|
+
});
|
80
|
+
|
81
|
+
var inputId = this.props.id || UniqueId.generate();
|
82
|
+
|
83
|
+
var errorTextElement = this.state.errorText ? (
|
84
|
+
<div className="mui-text-field-error">{this.state.errorText}</div>
|
85
|
+
) : null;
|
86
|
+
|
87
|
+
var hintTextElement = this.props.hintText ? (
|
88
|
+
<div className="mui-text-field-hint">{this.props.hintText}</div>
|
89
|
+
) : null;
|
90
|
+
|
91
|
+
var floatingLabelTextElement = this.props.floatingLabelText ? (
|
92
|
+
<label
|
93
|
+
className="mui-text-field-floating-label"
|
94
|
+
htmlFor={inputId}>
|
95
|
+
{this.props.floatingLabelText}
|
96
|
+
</label>
|
97
|
+
) : null;
|
98
|
+
|
99
|
+
var inputProps;
|
100
|
+
var inputElement;
|
101
|
+
|
102
|
+
inputProps = {
|
103
|
+
ref: 'input',
|
104
|
+
className: 'mui-text-field-input',
|
105
|
+
id: inputId,
|
106
|
+
onBlur: this._handleInputBlur,
|
107
|
+
onFocus: this._handleInputFocus,
|
108
|
+
onKeyDown: this._handleInputKeyDown
|
109
|
+
};
|
110
|
+
|
111
|
+
if (!this.props.hasOwnProperty('valueLink')) {
|
112
|
+
inputProps.onChange = this._handleInputChange;
|
113
|
+
}
|
114
|
+
|
115
|
+
inputElement = this.props.multiLine ? (
|
116
|
+
<EnhancedTextarea
|
117
|
+
{...other}
|
118
|
+
{...inputProps}
|
119
|
+
onHeightChange={this._handleTextAreaHeightChange}
|
120
|
+
textareaClassName="mui-text-field-textarea" />
|
121
|
+
) : (
|
122
|
+
<input
|
123
|
+
{...other}
|
124
|
+
{...inputProps}
|
125
|
+
type={this.props.type} />
|
126
|
+
);
|
127
|
+
|
128
|
+
return (
|
129
|
+
<div className={classes}>
|
130
|
+
|
131
|
+
{floatingLabelTextElement}
|
132
|
+
{hintTextElement}
|
133
|
+
{inputElement}
|
134
|
+
|
135
|
+
<hr className="mui-text-field-underline" />
|
136
|
+
<hr className="mui-text-field-focus-underline" />
|
137
|
+
|
138
|
+
{errorTextElement}
|
139
|
+
|
140
|
+
</div>
|
141
|
+
);
|
142
|
+
},
|
143
|
+
|
144
|
+
blur: function() {
|
145
|
+
if (this.isMounted()) this._getInputNode().blur();
|
146
|
+
},
|
147
|
+
|
148
|
+
clearValue: function() {
|
149
|
+
this.setValue('');
|
150
|
+
},
|
151
|
+
|
152
|
+
focus: function() {
|
153
|
+
if (this.isMounted()) this._getInputNode().focus();
|
154
|
+
},
|
155
|
+
|
156
|
+
getValue: function() {
|
157
|
+
return this.isMounted() ? this._getInputNode().value : undefined;
|
158
|
+
},
|
159
|
+
|
160
|
+
setErrorText: function(newErrorText) {
|
161
|
+
if (process.NODE_ENV !== 'production' && this.props.hasOwnProperty('errorText')) {
|
162
|
+
console.error('Cannot call TextField.setErrorText when errorText is defined as a property.');
|
163
|
+
} else if (this.isMounted()) {
|
164
|
+
this.setState({errorText: newErrorText});
|
165
|
+
}
|
166
|
+
},
|
167
|
+
|
168
|
+
setValue: function(newValue) {
|
169
|
+
if (process.NODE_ENV !== 'production' && this._isControlled()) {
|
170
|
+
console.error('Cannot call TextField.setValue when value or valueLink is defined as a property.');
|
171
|
+
} else if (this.isMounted()) {
|
172
|
+
this._getInputNode().value = newValue;
|
173
|
+
this.setState({hasValue: newValue});
|
174
|
+
}
|
175
|
+
},
|
176
|
+
|
177
|
+
_getInputNode: function() {
|
178
|
+
return this.props.multiLine ?
|
179
|
+
this.refs.input.getInputNode() : this.refs.input.getDOMNode();
|
180
|
+
},
|
181
|
+
|
182
|
+
_handleInputBlur: function(e) {
|
183
|
+
this.setState({isFocused: false});
|
184
|
+
if (this.props.onBlur) this.props.onBlur(e);
|
185
|
+
},
|
186
|
+
|
187
|
+
_handleInputChange: function(e) {
|
188
|
+
this.setState({hasValue: e.target.value});
|
189
|
+
if (this.props.onChange) this.props.onChange(e);
|
190
|
+
},
|
191
|
+
|
192
|
+
_handleInputFocus: function(e) {
|
193
|
+
this.setState({isFocused: true});
|
194
|
+
if (this.props.onFocus) this.props.onFocus(e);
|
195
|
+
},
|
196
|
+
|
197
|
+
_handleInputKeyDown: function(e) {
|
198
|
+
if (e.keyCode === 13 && this.props.onEnterKeyDown) this.props.onEnterKeyDown(e);
|
199
|
+
if (this.props.onKeyDown) this.props.onKeyDown(e);
|
200
|
+
},
|
201
|
+
|
202
|
+
_handleTextAreaHeightChange: function(e, height) {
|
203
|
+
var newHeight = height + 24;
|
204
|
+
if (this.props.floatingLabelText) newHeight += 24;
|
205
|
+
this.getDOMNode().style.height = newHeight + 'px';
|
206
|
+
},
|
207
|
+
|
208
|
+
_isControlled: function() {
|
209
|
+
return this.props.hasOwnProperty('value') ||
|
210
|
+
this.props.hasOwnProperty('valueLink');
|
211
|
+
}
|
212
|
+
|
213
|
+
});
|
214
|
+
|
215
|
+
module.exports = TextField;
|
data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/css-event.js
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
var Events = require('./events');
|
2
|
+
|
3
|
+
module.exports = {
|
4
|
+
|
5
|
+
_testSupportedProps: function(props) {
|
6
|
+
var i,
|
7
|
+
undefined,
|
8
|
+
el = document.createElement('div');
|
9
|
+
|
10
|
+
for (i in props) {
|
11
|
+
if (props.hasOwnProperty(i) && el.style[i] !== undefined) {
|
12
|
+
return props[i];
|
13
|
+
}
|
14
|
+
}
|
15
|
+
},
|
16
|
+
|
17
|
+
//Returns the correct event name to use
|
18
|
+
transitionEndEventName: function() {
|
19
|
+
return this._testSupportedProps({
|
20
|
+
'transition':'transitionend',
|
21
|
+
'OTransition':'otransitionend',
|
22
|
+
'MozTransition':'transitionend',
|
23
|
+
'WebkitTransition':'webkitTransitionEnd'
|
24
|
+
});
|
25
|
+
},
|
26
|
+
|
27
|
+
animationEndEventName: function() {
|
28
|
+
return this._testSupportedProps({
|
29
|
+
'animation': 'animationend',
|
30
|
+
'-o-animation': 'oAnimationEnd',
|
31
|
+
'-moz-animation': 'animationend',
|
32
|
+
'-webkit-animation': 'webkitAnimationEnd'
|
33
|
+
});
|
34
|
+
},
|
35
|
+
|
36
|
+
onTransitionEnd: function (el, callback) {
|
37
|
+
var transitionEnd = this.transitionEndEventName();
|
38
|
+
|
39
|
+
Events.once(el, transitionEnd, function() {
|
40
|
+
return callback();
|
41
|
+
});
|
42
|
+
},
|
43
|
+
|
44
|
+
onAnimationEnd: function (el, callback) {
|
45
|
+
var animationEnd = this.animationEndEventName();
|
46
|
+
|
47
|
+
Events.once(el, animationEnd, function() {
|
48
|
+
return callback();
|
49
|
+
});
|
50
|
+
}
|
51
|
+
|
52
|
+
};
|
data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/date-time.js
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
module.exports = {
|
2
|
+
|
3
|
+
addDays: function(d, days) {
|
4
|
+
var newDate = this.clone(d);
|
5
|
+
newDate.setDate(d.getDate() + days);
|
6
|
+
return newDate;
|
7
|
+
},
|
8
|
+
|
9
|
+
addMonths: function(d, months) {
|
10
|
+
var newDate = this.clone(d);
|
11
|
+
newDate.setMonth(d.getMonth() + months);
|
12
|
+
return newDate;
|
13
|
+
},
|
14
|
+
|
15
|
+
clone: function(d) {
|
16
|
+
return new Date(d.getTime());
|
17
|
+
},
|
18
|
+
|
19
|
+
getDaysInMonth: function(d) {
|
20
|
+
var resultDate = this.getFirstDayOfMonth(d);
|
21
|
+
|
22
|
+
resultDate.setMonth(resultDate.getMonth() + 1);
|
23
|
+
resultDate.setDate(resultDate.getDate() - 1);
|
24
|
+
|
25
|
+
return resultDate.getDate();
|
26
|
+
},
|
27
|
+
|
28
|
+
getFirstDayOfMonth: function(d) {
|
29
|
+
return new Date(d.getFullYear(), d.getMonth(), 1);
|
30
|
+
},
|
31
|
+
|
32
|
+
getFullMonth: function(d) {
|
33
|
+
var month = d.getMonth();
|
34
|
+
switch (month) {
|
35
|
+
case 0: return 'January';
|
36
|
+
case 1: return 'February';
|
37
|
+
case 2: return 'March';
|
38
|
+
case 3: return 'April';
|
39
|
+
case 4: return 'May';
|
40
|
+
case 5: return 'June';
|
41
|
+
case 6: return 'July';
|
42
|
+
case 7: return 'August';
|
43
|
+
case 8: return 'September';
|
44
|
+
case 9: return 'October';
|
45
|
+
case 10: return 'November';
|
46
|
+
case 11: return 'December';
|
47
|
+
}
|
48
|
+
},
|
49
|
+
|
50
|
+
getShortMonth: function(d) {
|
51
|
+
var month = d.getMonth();
|
52
|
+
switch (month) {
|
53
|
+
case 0: return 'Jan';
|
54
|
+
case 1: return 'Feb';
|
55
|
+
case 2: return 'Mar';
|
56
|
+
case 3: return 'Apr';
|
57
|
+
case 4: return 'May';
|
58
|
+
case 5: return 'Jun';
|
59
|
+
case 6: return 'Jul';
|
60
|
+
case 7: return 'Aug';
|
61
|
+
case 8: return 'Sep';
|
62
|
+
case 9: return 'Oct';
|
63
|
+
case 10: return 'Nov';
|
64
|
+
case 11: return 'Dec';
|
65
|
+
}
|
66
|
+
},
|
67
|
+
|
68
|
+
getDayOfWeek: function(d) {
|
69
|
+
var dow = d.getDay();
|
70
|
+
switch (dow) {
|
71
|
+
case 0: return 'Sunday';
|
72
|
+
case 1: return 'Monday';
|
73
|
+
case 2: return 'Tuesday';
|
74
|
+
case 3: return 'Wednesday';
|
75
|
+
case 4: return 'Thursday';
|
76
|
+
case 5: return 'Friday';
|
77
|
+
case 6: return 'Saturday';
|
78
|
+
}
|
79
|
+
},
|
80
|
+
|
81
|
+
getWeekArray: function(d) {
|
82
|
+
var dayArray = [];
|
83
|
+
var daysInMonth = this.getDaysInMonth(d);
|
84
|
+
var daysInWeek;
|
85
|
+
var emptyDays;
|
86
|
+
var firstDayOfWeek;
|
87
|
+
var week;
|
88
|
+
var weekArray = [];
|
89
|
+
|
90
|
+
for (var i = 1; i <= daysInMonth; i++) {
|
91
|
+
dayArray.push(new Date(d.getFullYear(), d.getMonth(), i));
|
92
|
+
};
|
93
|
+
|
94
|
+
while (dayArray.length) {
|
95
|
+
firstDayOfWeek = dayArray[0].getDay();
|
96
|
+
daysInWeek = 7 - firstDayOfWeek;
|
97
|
+
emptyDays = 7 - daysInWeek;
|
98
|
+
week = dayArray.splice(0, daysInWeek);
|
99
|
+
|
100
|
+
for (var i = 0; i < emptyDays; i++) {
|
101
|
+
week.unshift(null);
|
102
|
+
};
|
103
|
+
|
104
|
+
weekArray.push(week);
|
105
|
+
}
|
106
|
+
|
107
|
+
return weekArray;
|
108
|
+
},
|
109
|
+
|
110
|
+
format: function(date) {
|
111
|
+
var m = date.getMonth() + 1;
|
112
|
+
var d = date.getDate();
|
113
|
+
var y = date.getFullYear();
|
114
|
+
return m + '/' + d + '/' + y;
|
115
|
+
},
|
116
|
+
|
117
|
+
isEqualDate: function(d1, d2) {
|
118
|
+
return d1 && d2 &&
|
119
|
+
(d1.getFullYear() === d2.getFullYear()) &&
|
120
|
+
(d1.getMonth() === d2.getMonth()) &&
|
121
|
+
(d1.getDate() === d2.getDate());
|
122
|
+
},
|
123
|
+
|
124
|
+
monthDiff: function(d1, d2) {
|
125
|
+
var m;
|
126
|
+
m = (d1.getFullYear() - d2.getFullYear()) * 12;
|
127
|
+
m += d1.getMonth();
|
128
|
+
m -= d2.getMonth();
|
129
|
+
return m;
|
130
|
+
}
|
131
|
+
|
132
|
+
}
|
data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/dom.js
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
module.exports = {
|
2
|
+
|
3
|
+
isDescendant: function(parent, child) {
|
4
|
+
var node = child.parentNode;
|
5
|
+
|
6
|
+
while (node != null) {
|
7
|
+
if (node == parent) return true;
|
8
|
+
node = node.parentNode;
|
9
|
+
}
|
10
|
+
|
11
|
+
return false;
|
12
|
+
},
|
13
|
+
|
14
|
+
offset: function(el) {
|
15
|
+
var rect = el.getBoundingClientRect();
|
16
|
+
return {
|
17
|
+
top: rect.top + document.body.scrollTop,
|
18
|
+
left: rect.left + document.body.scrollLeft
|
19
|
+
};
|
20
|
+
},
|
21
|
+
|
22
|
+
addClass: function(el, className) {
|
23
|
+
if (el.classList)
|
24
|
+
el.classList.add(className);
|
25
|
+
else
|
26
|
+
el.className += ' ' + className;
|
27
|
+
},
|
28
|
+
|
29
|
+
removeClass: function(el, className) {
|
30
|
+
if (el.classList)
|
31
|
+
el.classList.remove(className);
|
32
|
+
else
|
33
|
+
el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
|
34
|
+
},
|
35
|
+
|
36
|
+
hasClass: function(el, className) {
|
37
|
+
if (el.classList)
|
38
|
+
return el.classList.contains(className);
|
39
|
+
else
|
40
|
+
return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className);
|
41
|
+
},
|
42
|
+
|
43
|
+
toggleClass: function(el, className) {
|
44
|
+
if (this.hasClass(el, className))
|
45
|
+
this.removeClass(el, className);
|
46
|
+
else
|
47
|
+
this.addClass(el, className);
|
48
|
+
},
|
49
|
+
|
50
|
+
forceRedraw: function(el) {
|
51
|
+
var originalDisplay = el.style.display;
|
52
|
+
|
53
|
+
el.style.display = 'none';
|
54
|
+
el.offsetHeight;
|
55
|
+
el.style.display = originalDisplay;
|
56
|
+
},
|
57
|
+
|
58
|
+
withoutTransition: function(el, callback) {
|
59
|
+
//turn off transition
|
60
|
+
el.style.transition = 'none';
|
61
|
+
|
62
|
+
callback();
|
63
|
+
|
64
|
+
//force a redraw
|
65
|
+
this.forceRedraw(el);
|
66
|
+
|
67
|
+
//put the transition back
|
68
|
+
el.style.transition = '';
|
69
|
+
}
|
70
|
+
|
71
|
+
}
|
data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/events.js
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
module.exports = {
|
2
|
+
|
3
|
+
once: function(el, type, callback) {
|
4
|
+
var typeArray = type.split(' ');
|
5
|
+
var recursiveFunction = function(e){
|
6
|
+
e.target.removeEventListener(e.type, recursiveFunction);
|
7
|
+
return callback(e);
|
8
|
+
};
|
9
|
+
|
10
|
+
for (var i = typeArray.length - 1; i >= 0; i--) {
|
11
|
+
this.on(el, typeArray[i], recursiveFunction);
|
12
|
+
}
|
13
|
+
},
|
14
|
+
|
15
|
+
// IE8+ Support
|
16
|
+
on: function(el, type, callback) {
|
17
|
+
if(el.addEventListener) {
|
18
|
+
el.addEventListener(type, callback);
|
19
|
+
} else {
|
20
|
+
el.attachEvent('on' + type, function() {
|
21
|
+
callback.call(el);
|
22
|
+
});
|
23
|
+
}
|
24
|
+
},
|
25
|
+
|
26
|
+
// IE8+ Support
|
27
|
+
off: function(el, type, callback) {
|
28
|
+
if(el.removeEventListener) {
|
29
|
+
el.removeEventListener(type, callback);
|
30
|
+
} else {
|
31
|
+
el.detachEvent('on' + type, callback);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
};
|