pageflow-parent-page-box 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed88f5cb153907c5949ecca188f1701a1e84a619
4
- data.tar.gz: c085a7d052b7b6dfb76ec2c6ea94bc6d7238eefc
3
+ metadata.gz: cafe9be72de322ebb674acbb7f2b4efc61fc96fa
4
+ data.tar.gz: 8612e8a049892af638941c6f9fd88448aa24d44e
5
5
  SHA512:
6
- metadata.gz: dddf179fb48c4af5b8a3b026a7e1757ffd7d73fc6b0dbacdf8f2272a217c2def3d7999b677ef43d314ed761a0094ae0c21f5722f6a9b5627167ec50b19df2988
7
- data.tar.gz: 2e434ab3e003e2c0a87a67137b3ea9aa22ecda6a9cdd2c75b90803d695878f785d1fe4e76a8b9a02ca3447276a30b2b773b889f9bab94205095129fd05859d7b
6
+ metadata.gz: 7e04b68f5abd0066867fb6dd272c570970f8341d601bef659cc758a22ecc02059b21afa42815c4251e40af3169f7af6d453342989144f69edd01f18a7cd76b43
7
+ data.tar.gz: b040d0aea1b7a927bac3a51c51d78686ed764db733898eb2a975d4a28a541f217375f03af2dd93b6e37e41f6f426116df82a1b08a90b0fc16087a319dacd9878
data/CHANGELOG.md CHANGED
@@ -1,7 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 0.1.0
3
+ ### Version 1.0.0
4
4
 
5
- 2016-06-09
5
+ 2017-08-11
6
6
 
7
- - Initial release.
7
+ [Compare changes](https://github.com/codevise/pageflow-parent-page-box/compare/0-1-stable...v1.0.0)
8
+
9
+ - Use Pageflow Redux API
10
+ ([#1](https://github.com/codevise/pageflow-parent-page-box/pull/1))
11
+
12
+ See
13
+ [0-1-stable branch](https://github.com/codevise/pageflow-parent-page-box/blob/0-1-stable/CHANGELOG.md)
14
+ for previous changes.
data/Gemfile CHANGED
@@ -2,9 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in chart.gemspec
4
4
  gemspec
5
-
6
- # Rails 4 compat
7
- gem 'activeadmin', :git => 'https://github.com/codevise/active_admin.git', :branch => 'rails4'
8
- gem 'ransack'
9
- gem 'inherited_resources', '1.4.1'
10
- gem 'formtastic', '2.3.0.rc2'
@@ -1,4 +1,5 @@
1
- const {createContainer, createWidget, resolve, classNames} = pageflow.react;
1
+ const {registerWidgetType, connect, combine, classNames} = pageflow.react;
2
+ const {currentParentPageAttributes, currentParentChapterAttributes, t} = pageflow.react.selectors;
2
3
  const {PageThumbnail} = pageflow.react.components;
3
4
 
4
5
  function ParentPageBox(props) {
@@ -10,16 +11,16 @@ function ParentPageBox(props) {
10
11
  tabIndex="2"
11
12
  onClick={handleClick} />
12
13
 
13
- {renderOverlay(props.parentPage, props.i18n)}
14
+ {renderOverlay(props.parentPage, props.parentChapter, props.t)}
14
15
  </div>
15
16
  )
16
17
  }
17
18
 
18
- function renderOverlay(page, i18n) {
19
+ function renderOverlay(page, chapter, t) {
19
20
  if (page) {
20
21
  return (
21
22
  <div className="parent_page_box-overlay">
22
- {renderBackTo(page.chapter, i18n)}
23
+ {renderBackTo(chapter, t)}
23
24
  <span className="parent_page_box-page_title">
24
25
  {page.title}
25
26
  </span>
@@ -32,11 +33,11 @@ function renderOverlay(page, i18n) {
32
33
  }
33
34
  }
34
35
 
35
- function renderBackTo(chapter, i18n) {
36
+ function renderBackTo(chapter, t) {
36
37
  if (chapter.title) {
37
38
  return (
38
39
  <div>
39
- {i18n.t('pageflow.public.back_to_chapter')}
40
+ {t('pageflow.public.back_to_chapter')}
40
41
  <div className="parent_page_box-chapter_title">
41
42
  {chapter.title}
42
43
  </div>
@@ -47,7 +48,7 @@ function renderBackTo(chapter, i18n) {
47
48
  else {
48
49
  return (
49
50
  <div className="parent_page_box-standalong_back_label">
50
- {i18n.t('pageflow.public.back_to_chapter')}
51
+ {t('pageflow.public.back_to_chapter')}
51
52
  </div>
52
53
  );
53
54
  }
@@ -58,13 +59,10 @@ function handleClick(event) {
58
59
  event.preventDefault();
59
60
  }
60
61
 
61
- pageflow.parentPageBox.Widget = createWidget(createContainer(ParentPageBox, {
62
- fragments: {
63
- i18n: resolve('i18n'),
64
- parentPage: resolve('currentParentPage', {
65
- fragments: {
66
- chapter: resolve('chapter')
67
- }
68
- })
69
- }
70
- }));
62
+ registerWidgetType('parent_page_box', {
63
+ component: connect(combine({
64
+ t,
65
+ parentPage: currentParentPageAttributes(),
66
+ parentChapter: currentParentChapterAttributes()
67
+ }))(ParentPageBox)
68
+ });
@@ -1,9 +1,4 @@
1
- //= require react
2
- //= require pageflow/react
3
-
4
1
  //= require_self
5
-
6
2
  //= require ./parent_page_box/components
7
- //= require ./parent_page_box/widget_type
8
3
 
9
4
  pageflow.parentPageBox = pageflow.parentPageBox || {};
@@ -1,5 +1,5 @@
1
1
  module Pageflow
2
2
  module ParentPageBox
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '1.0.0'.freeze
4
4
  end
5
5
  end
@@ -7,9 +7,7 @@ module Pageflow
7
7
  end
8
8
 
9
9
  def self.widget_type
10
- Pageflow::React.create_widget_type('parent_page_box',
11
- 'parent_page_box',
12
- 'pageflow.parentPageBox.Widget')
10
+ Pageflow::React.create_widget_type('parent_page_box', 'parent_page_box')
13
11
  end
14
12
  end
15
13
  end
@@ -16,13 +16,14 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^spec/})
17
17
  spec.require_paths = ['lib']
18
18
 
19
- spec.add_runtime_dependency 'pageflow', '~> 0.10'
19
+ spec.required_ruby_version = '~> 2.1'
20
+
21
+ spec.add_runtime_dependency 'pageflow', '~> 12.x'
20
22
  spec.add_runtime_dependency 'pageflow-public-i18n', '~> 1.1'
21
- spec.add_runtime_dependency 'pageflow-react'
22
23
 
23
- spec.add_development_dependency 'bundler'
24
- spec.add_development_dependency 'rake'
24
+ spec.add_development_dependency 'bundler', '~> 1.0'
25
+ spec.add_development_dependency 'rake', '~> 12.0'
25
26
 
26
27
  # Semantic versioning rake tasks
27
- spec.add_development_dependency 'semmy', '~> 0.2'
28
+ spec.add_development_dependency 'semmy', '~> 1.0'
28
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow-parent-page-box
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-09 00:00:00.000000000 Z
11
+ date: 2017-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pageflow
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.10'
19
+ version: 12.x
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.10'
26
+ version: 12.x
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pageflow-public-i18n
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,62 +38,48 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
- - !ruby/object:Gem::Dependency
42
- name: pageflow-react
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: bundler
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - ">="
45
+ - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '0'
47
+ version: '1.0'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - ">="
52
+ - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '0'
54
+ version: '1.0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rake
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - ">="
59
+ - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '0'
61
+ version: '12.0'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ">="
66
+ - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: '12.0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: semmy
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '0.2'
75
+ version: '1.0'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '0.2'
82
+ version: '1.0'
97
83
  description:
98
84
  email:
99
85
  - info@codevise.de
@@ -109,7 +95,6 @@ files:
109
95
  - app/assets/javascript/pageflow/parent_page_box.js
110
96
  - app/assets/javascript/pageflow/parent_page_box/components.js
111
97
  - app/assets/javascript/pageflow/parent_page_box/widget.jsx
112
- - app/assets/javascript/pageflow/parent_page_box/widget_type.js
113
98
  - app/assets/stylesheets/pageflow/parent_page_box/themes/default.scss
114
99
  - config/locales/de.yml
115
100
  - config/locales/en.yml
@@ -128,9 +113,9 @@ require_paths:
128
113
  - lib
129
114
  required_ruby_version: !ruby/object:Gem::Requirement
130
115
  requirements:
131
- - - ">="
116
+ - - "~>"
132
117
  - !ruby/object:Gem::Version
133
- version: '0'
118
+ version: '2.1'
134
119
  required_rubygems_version: !ruby/object:Gem::Requirement
135
120
  requirements:
136
121
  - - ">="
@@ -138,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
123
  version: '0'
139
124
  requirements: []
140
125
  rubyforge_project:
141
- rubygems_version: 2.2.5
126
+ rubygems_version: 2.6.8
142
127
  signing_key:
143
128
  specification_version: 4
144
129
  summary: Pageflow navigation widget to leave current storyline.
@@ -1,2 +0,0 @@
1
- pageflow.widgetTypes.register('parent_page_box',
2
- pageflow.react.createWidgetType(pageflow.parentPageBox.Widget));