hippo-fw 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/.nvmrc +2 -0
  3. data/.travis.yml +1 -1
  4. data/client/hippo/access/login-dialog.jsx +3 -5
  5. data/client/hippo/boot.jsx +2 -2
  6. data/client/hippo/components/asset.jsx +0 -1
  7. data/client/hippo/components/data-list.jsx +16 -15
  8. data/client/hippo/components/data-list/data-list.scss +10 -0
  9. data/client/hippo/components/data-table.jsx +14 -14
  10. data/client/hippo/components/data-table/header-cell.jsx +0 -1
  11. data/client/hippo/components/data-table/table-styles.scss +7 -0
  12. data/client/hippo/components/date-time.jsx +19 -16
  13. data/client/hippo/components/date-time/calendar.jsx +5 -7
  14. data/client/hippo/components/date-time/date-time-drop.jsx +0 -2
  15. data/client/hippo/components/date-time/time.jsx +0 -1
  16. data/client/hippo/components/form.jsx +1 -1
  17. data/client/hippo/components/form/{model.js → api.js} +25 -7
  18. data/client/hippo/components/form/fields.jsx +12 -11
  19. data/client/hippo/components/form/fields/date-wrapper.jsx +1 -1
  20. data/client/hippo/components/form/fields/form-field.scss +9 -1
  21. data/client/hippo/components/form/fields/label.jsx +14 -0
  22. data/client/hippo/components/form/fields/select-wrapper.jsx +2 -3
  23. data/client/hippo/components/form/wrapper.jsx +1 -3
  24. data/client/hippo/components/icon.jsx +2 -69
  25. data/client/hippo/components/master-detail.jsx +0 -2
  26. data/client/hippo/components/network-activity-overlay.jsx +1 -4
  27. data/client/hippo/components/query-builder.jsx +15 -16
  28. data/client/hippo/components/record-finder.jsx +2 -5
  29. data/client/hippo/components/record-finder/query-layer.jsx +1 -5
  30. data/client/hippo/components/screen.jsx +7 -3
  31. data/client/hippo/components/text-editor.jsx +2 -8
  32. data/client/hippo/components/tool-tip.jsx +2 -3
  33. data/client/hippo/components/warning-notification.jsx +3 -3
  34. data/client/hippo/lib/date-range.js +28 -0
  35. data/client/hippo/lib/util.js +6 -0
  36. data/client/hippo/models/asset.js +6 -3
  37. data/client/hippo/models/config.js +1 -1
  38. data/client/hippo/models/pub_sub.js +12 -7
  39. data/client/hippo/models/pub_sub/channel.js +6 -4
  40. data/client/hippo/models/query.js +19 -4
  41. data/client/hippo/models/query/array-result.js +9 -8
  42. data/client/hippo/models/query/clause.js +21 -13
  43. data/client/hippo/models/query/field.js +7 -2
  44. data/client/hippo/models/query/info.js +7 -3
  45. data/client/hippo/models/sync.js +11 -14
  46. data/client/hippo/react/Root.jsx +1 -2
  47. data/client/hippo/react/{DefaultComponentNotFound.jsx → component-not-found.jsx} +1 -3
  48. data/client/hippo/screens/index.js +6 -2
  49. data/client/hippo/screens/system-settings.jsx +10 -6
  50. data/client/hippo/screens/system-settings/mailer-config.jsx +0 -2
  51. data/client/hippo/screens/system-settings/tenant.jsx +1 -4
  52. data/client/hippo/screens/user-management.jsx +0 -1
  53. data/client/hippo/screens/user-management/edit-form.jsx +1 -2
  54. data/client/hippo/workspace/index.jsx +21 -12
  55. data/client/hippo/workspace/menu-group.jsx +4 -7
  56. data/client/hippo/workspace/menu-option.jsx +1 -3
  57. data/client/hippo/workspace/menu.jsx +29 -11
  58. data/client/hippo/workspace/navbar.jsx +1 -2
  59. data/client/hippo/workspace/root-view.jsx +5 -2
  60. data/client/hippo/workspace/screen.jsx +2 -3
  61. data/client/hippo/workspace/styles.scss +17 -0
  62. data/command-reference-files/screen/client/appy-app/screens/ready-set-go.jsx +2 -1
  63. data/db/migrate/20170530120004_create_users.rb +1 -1
  64. data/hippo-fw.gemspec +3 -2
  65. data/lib/hippo/api/cable.rb +13 -13
  66. data/lib/hippo/api/controller_base.rb +1 -0
  67. data/lib/hippo/api/handlers/tenant.rb +1 -1
  68. data/lib/hippo/api/handlers/user_session.rb +2 -1
  69. data/lib/hippo/api/helper_methods.rb +4 -1
  70. data/lib/hippo/api/pub_sub.rb +7 -6
  71. data/lib/hippo/api/to_json.rb +1 -1
  72. data/lib/hippo/api/updates.rb +2 -0
  73. data/lib/hippo/command/console.rb +11 -3
  74. data/lib/hippo/command/jest.rb +2 -0
  75. data/lib/hippo/configuration.rb +4 -7
  76. data/lib/hippo/rake_tasks.rb +1 -1
  77. data/lib/hippo/screen.rb +31 -93
  78. data/lib/hippo/screen/definition.rb +76 -0
  79. data/lib/hippo/screen/group.rb +26 -0
  80. data/lib/hippo/spec_helper.rb +3 -0
  81. data/lib/hippo/system_settings.rb +6 -0
  82. data/lib/hippo/user.rb +11 -3
  83. data/lib/hippo/version.rb +1 -1
  84. data/package-lock.json +419 -533
  85. data/package.json +32 -30
  86. data/spec/client/access/login-dialog.spec.jsx +4 -5
  87. data/spec/client/components/__snapshots__/query-builder.spec.jsx.snap +1 -1
  88. data/spec/client/components/__snapshots__/record-finder.spec.jsx.snap +72 -0
  89. data/spec/client/components/asset.spec.jsx +2 -6
  90. data/spec/client/components/data-list.spec.jsx +2 -6
  91. data/spec/client/components/data-table.spec.jsx +3 -5
  92. data/spec/client/components/date-time.spec.jsx +1 -1
  93. data/spec/client/components/form.spec.jsx +2 -2
  94. data/spec/client/components/master-detail.spec.jsx +1 -2
  95. data/spec/client/components/network-activity-overlay.spec.jsx +2 -3
  96. data/spec/client/components/query-builder.spec.jsx +3 -6
  97. data/spec/client/components/record-finder.spec.jsx +4 -4
  98. data/spec/client/models/pub_sub.spec.js +3 -1
  99. data/spec/client/models/query.spec.js +4 -9
  100. data/spec/client/screens/system-settings-tenants.spec.jsx +1 -1
  101. data/spec/client/screens/system-settings.spec.jsx +1 -4
  102. data/spec/client/workspace/__snapshots__/menu.spec.jsx.snap +15 -20
  103. data/spec/client/workspace/menu.spec.jsx +1 -2
  104. data/spec/server/api/user_sessions_spec.rb +15 -0
  105. data/templates/client/screens/screen.jsx +2 -1
  106. data/views/hippo_root_view.erb +1 -0
  107. metadata +30 -52
  108. data/client/hippo/components/calendar/Calendar.jsx +0 -25
  109. data/client/hippo/components/calendar/index.js +0 -3
  110. data/client/hippo/components/calendar/styles.scss +0 -3
  111. data/client/hippo/components/shared/AssetsListing.jsx +0 -23
  112. data/client/hippo/components/shared/Checkbox.jsx +0 -49
  113. data/client/hippo/components/shared/CountBadge.jsx +0 -13
  114. data/client/hippo/components/shared/DateTime.jsx +0 -58
  115. data/client/hippo/components/shared/DisplayValue.jsx +0 -15
  116. data/client/hippo/components/shared/ErrorDisplay.jsx +0 -37
  117. data/client/hippo/components/shared/FieldMixin.jsx +0 -254
  118. data/client/hippo/components/shared/FieldSet.jsx +0 -52
  119. data/client/hippo/components/shared/FieldWrapper.jsx +0 -94
  120. data/client/hippo/components/shared/FormGroup.jsx +0 -41
  121. data/client/hippo/components/shared/GenericField.jsx +0 -7
  122. data/client/hippo/components/shared/IconButton.jsx +0 -13
  123. data/client/hippo/components/shared/ImageAsset.jsx +0 -78
  124. data/client/hippo/components/shared/IndeterminateCheckbox.jsx +0 -31
  125. data/client/hippo/components/shared/Input.jsx +0 -16
  126. data/client/hippo/components/shared/InputFieldMixin.jsx +0 -78
  127. data/client/hippo/components/shared/JobProgress.jsx +0 -46
  128. data/client/hippo/components/shared/NumberInput.jsx +0 -37
  129. data/client/hippo/components/shared/PanelHeader.jsx +0 -15
  130. data/client/hippo/components/shared/RadioField.jsx +0 -33
  131. data/client/hippo/components/shared/ResizeSensor.jsx +0 -18
  132. data/client/hippo/components/shared/ScreenWrapper.jsx +0 -17
  133. data/client/hippo/components/shared/TextArea.jsx +0 -19
  134. data/client/hippo/components/shared/Throbber.jsx +0 -8
  135. data/client/hippo/components/shared/ToggleField.jsx +0 -2
  136. data/client/hippo/components/shared/Tooltip.jsx +0 -23
  137. data/client/hippo/components/shared/fields.scss +0 -58
  138. data/client/hippo/components/shared/fieldset.scss +0 -27
  139. data/client/hippo/components/shared/image-asset.scss +0 -53
  140. data/client/hippo/components/shared/index.js +0 -5
  141. data/client/hippo/components/shared/overlay.scss +0 -83
  142. data/client/hippo/components/shared/resize-sensor.scss +0 -30
  143. data/client/hippo/components/shared/styles.scss +0 -64
  144. data/client/hippo/components/shared/throbber.scss +0 -53
  145. data/client/hippo/fonts/fontawesome-webfont.woff +0 -0
  146. data/client/hippo/fonts/fontawesome-webfont.woff2 +0 -0
  147. data/client/hippo/workspace/content.jsx +0 -22
  148. data/client/hippo/workspace/tabs.jsx +0 -60
  149. data/client/hippo/workspace/viewport.jsx +0 -82
  150. data/spec/client/screens/__snapshots__/tabs.spec.jsx.snap +0 -127
  151. data/spec/client/screens/tabs.spec.jsx +0 -36
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
-
3
- export class TextArea extends React.Component {
4
- static mixins = [
5
- Hippo.Components.Form.InputFieldMixin
6
- ];
7
- renderInputField(props, handlers) {
8
- const export className = _.classnames(props.className, 'form-control');
9
- return (
10
- React.createElement("textarea", Object.assign({},
11
- props,
12
- handlers,
13
- _.pick(this.props, 'placeholder'), {
14
- "export className": (className),
15
- "onChange": (this.fieldMixinSetValue)
16
- }))
17
- );
18
- }
19
- }
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
-
3
- export class Throbber extends React.Component({render() {
4
- return (
5
- <div export className="throbber" />
6
- );
7
- }
8
- }) {}
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
-
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
-
3
- export default class Tooltip extends React.Component {
4
- static TTProps = [
5
- 'id', 'placement', 'positionLeft', 'positionTop',
6
- 'arrowOffsetLeft', 'arrowOffsetTop'
7
- ];
8
- render() {
9
- const ttprops = _.pick(this.props, ...this.TTProps);
10
- const tooltip = <BS.Tooltip {...ttprops}>
11
- {this.props.content}
12
- </BS.Tooltip>;
13
- return (
14
- <BS.OverlayTrigger
15
- overlay={tooltip}
16
- placement="left"
17
- container={this.context.viewport.hippo}
18
- {...this.props}>
19
- {this.props.children}
20
- </BS.OverlayTrigger>
21
- );
22
- }
23
- }
@@ -1,58 +0,0 @@
1
- @import "hippo/styles/bootstrap/variables";
2
- @import "hippo/styles/bootstrap/mixins";
3
-
4
- $hippo-field-margin: 6px;
5
-
6
-
7
-
8
- .hippo-field {
9
- .form-control {
10
- height: inherit;
11
- }
12
- .control-label {
13
- display: block;
14
- min-height: 18px;
15
- }
16
-
17
- &.display {
18
- .form-group {
19
- border-bottom: 1px solid $input-border;
20
- min-height: 57px; // 55 + 1px border
21
- }
22
- &.toggle {
23
- .form-group { border-bottom: 0; }
24
- .react-toggle { cursor: inherit; }
25
- }
26
-
27
- }
28
- &.align-right{
29
- .control-label, .value, .rw-widget input {text-align: right; }
30
- }
31
- &.align-center{
32
- .control-label, .value, .rw-widget input { text-align: center; }
33
- }
34
-
35
- &.select {
36
- .form-control-feedback { right: 30px; }
37
- }
38
- .form-group {
39
- background-color: rgba(255, 255, 255, 1);
40
- transition: background-color 1000ms linear;
41
- input { transition: background-color 1000ms linear; }
42
- }
43
- &.changeset .form-group {
44
- $color-rgba: rgba(255, 241, 72, .6);
45
- border-color: darken($color-rgba, 10%);
46
- background-color: $color-rgba;
47
- outline: 0;
48
- @include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba);
49
- input {
50
- background-color: darken($color-rgba, 20%);
51
- }
52
- }
53
-
54
- .rw-datetimepicker {
55
- &.rw-has-both { padding-right: 0; }
56
- .rw-select { @include hidden-print; }
57
- }
58
- }
@@ -1,27 +0,0 @@
1
- fieldset.collapsible {
2
- border: 1px solid $input-border;
3
- padding: 10px;
4
- border-radius: $border-radius-large;
5
- transition: max-height 1.40s ease-in-out;
6
- overflow: hidden;
7
- legend {
8
- border-bottom: 0;
9
- margin-bottom: 0;
10
- padding-left: 10px;
11
- width: inherit;
12
- cursor: pointer;
13
- &:after {
14
- @extend .icon;
15
- padding: 0 10px;
16
- }
17
- }
18
- &.expanded {
19
- legend:after { @extend .icon-minus-square-o:before; }
20
- }
21
- &.collapsed {
22
- border-bottom-left-radius: 0;
23
- border-bottom-right-radius: 0;
24
- legend:after { @extend .icon-plus-square-o:before; }
25
- }
26
-
27
- }
@@ -1,53 +0,0 @@
1
- @import "../../styles/bootstrap/buttons";
2
-
3
- .image-asset {
4
- position: relative;
5
- &.field {
6
- .value {
7
- border-bottom: 0;
8
- height: inherit;
9
- }
10
- &.display {
11
- .value {
12
- padding-left: 0;
13
- }
14
- }
15
- }
16
- input.file {
17
- width: 0.1px;
18
- height: 0.1px;
19
- opacity: 0;
20
- overflow: hidden;
21
- position: absolute;
22
- z-index: -1;
23
- }
24
- label.selector {
25
- @extend .btn;
26
- @extend .btn-default;
27
- }
28
- &.with-image label.selector {
29
- position: absolute;
30
- top: 5px;
31
- right: 5px;
32
- z-index: 2;
33
- box-shadow: 0 8px 6px -6px black;
34
- }
35
- img {
36
- height: auto;
37
- width: 100%;
38
- }
39
- }
40
-
41
- .assets-listing {
42
-
43
- display: flex;
44
-
45
- .image-asset {
46
- max-width: 200px;
47
- & + .image-asset {
48
- border-left: 1px dotted lightgrey;
49
- padding-left: 10px;
50
- margin-left: 10px;
51
- }
52
- }
53
- }
@@ -1,5 +0,0 @@
1
- //= require ./Helpers
2
- //= require hippo/vendor/toggle
3
- //= require ./FieldMixin
4
- //= require ./InputFieldMixin
5
- //= require_tree
@@ -1,83 +0,0 @@
1
- $gray-light: lightGrey !default;
2
- $well-border: darkGrey !default;
3
- $border-radius-large: 8px !default;
4
- $body-bg: white !default;
5
- $font-size-large: 15px !default;
6
- $gray-darker: lighten(#000, 13.5%) !default;
7
-
8
- .overlay {
9
- position: absolute;
10
- z-index: 11;
11
- height: 100%;
12
- width: 100%;
13
- left: 0;
14
- right: 0;
15
- top: 0;
16
- bottom: 0;
17
- .mask {
18
- background-color: white;
19
- height: 100%;
20
- left: 0;
21
- opacity: 0.8;
22
- position: absolute;
23
- top: 0;
24
- width: 100%;
25
- }
26
- &.rounded {
27
- .mask { border-radius: $border-radius-large; }
28
- }
29
-
30
- .message {
31
- width: 450px;
32
- max-width: 90%;
33
- min-height: 65px;
34
- line-height: 3rem;
35
- border: 2px solid $well-border;
36
- margin-left: auto;
37
- margin-right: auto;
38
- font-size: 2rem;
39
- position: relative;
40
- top: 25%;
41
- border-radius: $border-radius-large;
42
- padding: 10px;
43
- box-shadow: 6px 7px 5px $gray-light;
44
- background-color: $body-bg;
45
-
46
- i {
47
- display: inline-block;
48
- font-size: 3.2rem;
49
- float: left;
50
- margin-right: 0.5rem;
51
- &.loading-spinner {
52
- background:url(image-path('images/hippo/ajax-loader.gif')) no-repeat;
53
- height: 32px;
54
- margin-top: 10px;
55
- width: 32px;
56
- }
57
- &.icon-success {
58
- color: darkgreen;
59
- }
60
- &.icon-warning {
61
- color: darkred;
62
- }
63
-
64
- }
65
- p {
66
- display: inline;
67
- margin: 0;
68
- font-size: $font-size-large;
69
- color: $gray-darker;
70
- }
71
- &.short {
72
- width: 250px;
73
- padding: 5px;
74
- p {
75
- position: relative;
76
- top: 15px;
77
- left: 5px;
78
- }
79
- }
80
-
81
- }
82
-
83
- }
@@ -1,30 +0,0 @@
1
- .hippo-resize-sensor {
2
-
3
- position: relative;
4
-
5
- .resize-triggers {
6
- visibility: hidden;
7
-
8
- &,
9
- > div,
10
- .contract-trigger:before {
11
- content: " ";
12
- display: block;
13
- position: absolute;
14
- top: 0;
15
- left: 0;
16
- height: 100%;
17
- width: 100%;
18
- overflow: hidden;
19
- }
20
-
21
- > div {
22
- overflow: auto;
23
- }
24
-
25
- .contract-trigger:before {
26
- width: 200%;
27
- height: 200%;
28
- }
29
- }
30
- }
@@ -1,64 +0,0 @@
1
- @import "./fields";
2
- @import "./fieldset";
3
- @import "./resize-sensor";
4
- @import "./overlay";
5
- @import "./image-asset";
6
- @import "./throbber";
7
- @import "hippo/vendor/styles/toggle";
8
- @import "hippo/vendor/styles/widgets";
9
-
10
- .record-finder {
11
- .icon { cursor: pointer; }
12
- }
13
-
14
- .alert {
15
- .icon {
16
- margin-right: 5px;
17
- }
18
- }
19
-
20
- .badge.count {
21
- &.super {
22
- padding: 2px 2px 0;
23
- position: relative;
24
- font-size: 70%;
25
- top: -6px;
26
- right: 5px;
27
- }
28
- }
29
-
30
- .requesting-spinner {
31
- @extend .icon;
32
- @extend .icon-spinner;
33
- @extend .icon-spin;
34
- display: none;
35
- &.active {
36
- display: inline;
37
- }
38
- }
39
-
40
- .job-executing {
41
- display: flex;
42
- flex-direction: column;
43
- align-items: center;
44
- justify-content: center;
45
- .progress { width: 100%; }
46
- }
47
-
48
- .icon {
49
- &.with-action {
50
- cursor: pointer;
51
- &:hover{ text-shadow: 1px 2px 2px #666666; }
52
- }
53
- }
54
-
55
- .hippo-panel-heading {
56
- display: flex;
57
- align-items: center;
58
- .spacer {
59
- flex: 1;
60
- }
61
- > *:not(.panel-title){
62
- margin-left: 0.5rem;
63
- }
64
- }
@@ -1,53 +0,0 @@
1
- $throbber-color: #dde2e7 !default;
2
- $throbber-highlight-color: #6b9dc8 !default;
3
- $throbber-height: 1.5em !default;
4
- $throbber-segment-width: 0.9em !default;
5
- $throbber-spacing: 0.7em !default;
6
-
7
- @mixin keyframes($name) {
8
- @-webkit-keyframes #{$name} { @content }
9
- @-moz-keyframes #{$name} { @content }
10
- @-o-keyframes #{$name} { @content }
11
- @keyframes #{$name} { @content }
12
- }
13
-
14
- @include keyframes(throbber) {
15
- 0% { background: $throbber-color }
16
- 10% { background: $throbber-highlight-color }
17
- 40% { background: $throbber-color }
18
- }
19
-
20
- /* Styles for old versions of IE */
21
- .throbber {
22
- font-family: sans-serif;
23
- font-weight: 100;
24
- animation: throbber 2000ms 300ms infinite ease-out;
25
- background: $throbber-color;
26
- display: inline-block;
27
- position: relative;
28
- text-indent: -9999px;
29
- width: $throbber-segment-width;
30
- height: $throbber-height;
31
- margin: 0 ($throbber-segment-width + $throbber-spacing);
32
-
33
- &:before,
34
- &:after {
35
- background: $throbber-color;
36
- content: '\x200B';
37
- display: inline-block;
38
- width: $throbber-segment-width;
39
- height: $throbber-height;
40
- position: absolute;
41
- top: 0;
42
- }
43
-
44
- &:before {
45
- animation: throbber 2000ms 150ms infinite ease-out;
46
- left: -($throbber-segment-width + $throbber-spacing);
47
- }
48
-
49
- &:after {
50
- animation: throbber 2000ms 450ms infinite ease-out;
51
- right: -($throbber-segment-width + $throbber-spacing);
52
- }
53
- }