pageflow 16.0.0 → 16.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +210 -33
- data/README.md +0 -1
- data/Rakefile +1 -1
- data/admins/pageflow/entry.rb +0 -1
- data/admins/pageflow/sites.rb +3 -0
- data/app/assets/javascripts/pageflow/dist/ui.js +298 -72
- data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +10 -0
- data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +6 -1
- data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +4 -0
- data/app/assets/stylesheets/pageflow/editor/help.scss +3 -3
- data/app/assets/stylesheets/pageflow/editor/info_box.scss +7 -0
- data/app/assets/stylesheets/pageflow/editor/inputs/file_input.scss +0 -5
- data/app/assets/stylesheets/pageflow/ui/forms.scss +1 -1
- data/app/controllers/pageflow/chapters_controller.rb +2 -2
- data/app/controllers/pageflow/editor/files_controller.rb +1 -1
- data/app/controllers/pageflow/entries_controller.rb +10 -0
- data/app/controllers/pageflow/feeds_controller.rb +18 -0
- data/app/controllers/pageflow/pages_controller.rb +2 -2
- data/app/controllers/pageflow/sitemaps_controller.rb +15 -0
- data/app/controllers/pageflow/storylines_controller.rb +2 -2
- data/app/helpers/pageflow/entries_helper.rb +2 -1
- data/app/helpers/pageflow/feeds_helper.rb +66 -0
- data/app/helpers/pageflow/page_types_helper.rb +9 -9
- data/app/inputs/pageflow_permalink_input.rb +15 -3
- data/app/models/concerns/pageflow/reusable_file.rb +3 -3
- data/app/models/pageflow/account.rb +8 -0
- data/app/models/pageflow/audio_file_url_templates.rb +2 -1
- data/app/models/pageflow/draft_entry.rb +1 -1
- data/app/models/pageflow/entries_feed.rb +32 -0
- data/app/models/pageflow/image_file.rb +14 -3
- data/app/models/pageflow/membership.rb +3 -2
- data/app/models/pageflow/other_file.rb +5 -0
- data/app/models/pageflow/other_file_url_templates.rb +16 -0
- data/app/models/pageflow/published_entry.rb +6 -0
- data/app/models/pageflow/revision.rb +4 -0
- data/app/models/pageflow/site.rb +8 -0
- data/app/models/pageflow/sitemaps.rb +13 -0
- data/app/models/pageflow/used_file.rb +2 -2
- data/app/models/pageflow/video_file_url_templates.rb +3 -1
- data/app/models/pageflow/widget.rb +9 -1
- data/app/views/admin/entries/_permalink_inputs.html.erb +1 -2
- data/app/views/admin/sites/_attributes_table.html.arb +3 -0
- data/app/views/admin/sites/_fields.html.erb +6 -0
- data/app/views/components/pageflow/admin/extensible_attributes_table.rb +8 -2
- data/app/views/components/pageflow/admin/sites_tab.rb +3 -0
- data/app/views/pageflow/editor/config/_seeds.json.jbuilder +1 -0
- data/app/views/pageflow/feeds/index.atom.builder +20 -0
- data/app/views/pageflow/sitemaps/index.xml.builder +9 -0
- data/config/initializers/features.rb +1 -0
- data/config/initializers/paperclip.rb +4 -0
- data/config/locales/de.yml +27 -6
- data/config/locales/en.yml +30 -4
- data/config/routes.rb +3 -0
- data/config/spring.rb +1 -1
- data/db/migrate/20230120092923_create_other_files.rb +23 -0
- data/db/migrate/20230323115745_add_feeds_enabled_to_sites.rb +5 -0
- data/db/migrate/20230323154323_add_sitemap_enabled_to_sites.rb +5 -0
- data/db/migrate/20230331103823_add_title_to_sites.rb +5 -0
- data/db/migrate/20230405103612_add_custom_feed_url_to_sites.rb +5 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +445 -109
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +26 -3
- data/entry_types/paged/app/controllers/pageflow_paged/editor/entries_controller.rb +0 -2
- data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +1 -0
- data/entry_types/paged/app/views/pageflow_paged/entries/show.html.erb +1 -0
- data/entry_types/paged/config/initializers/features.rb +0 -1
- data/entry_types/paged/lib/pageflow_paged/engine.rb +17 -1
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +2 -2
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +3 -4
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +13 -6
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +2 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/cache_helper.rb +11 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/entry_json_seed_helper.rb +42 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +3 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +31 -10
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +9 -1
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +3 -1
- data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +23 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +6 -1
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_seed.json.jbuilder +1 -5
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/sections/_section_with_content_elements.json.jbuilder +10 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +44 -41
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_consent_vendors.json.jbuilder +16 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +3 -0
- data/entry_types/scrolled/config/initializers/features.rb +5 -0
- data/entry_types/scrolled/config/locales/consent_widget.de.yml +4 -0
- data/entry_types/scrolled/config/locales/consent_widget.en.yml +4 -0
- data/entry_types/scrolled/config/locales/de.yml +189 -8
- data/entry_types/scrolled/config/locales/en.yml +207 -2
- data/entry_types/scrolled/config/routes.rb +4 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +97 -5
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +1 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +96 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/content_element_consent_vendors.rb +38 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +17 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +24 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +6 -1
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +1 -2
- data/entry_types/scrolled/package/contentElements-editor.js +307 -22
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
- data/entry_types/scrolled/package/contentElements-frontend.js +690 -71
- data/entry_types/scrolled/package/editor.js +616 -220
- data/entry_types/scrolled/package/frontend/{EditableInlineText.module-14c7b097.js → EditableInlineText.module-fa9e3aff.js} +1669 -1674
- data/entry_types/scrolled/package/frontend/PhonePlatformContext-10a1d600.js +32 -0
- data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-727cce0d.js +107 -0
- data/entry_types/scrolled/package/frontend/Viewer-169e14ca.js +154 -0
- data/entry_types/scrolled/package/frontend/{Viewer-b6becc57.js → Viewer-ee1aa590.js} +32 -161
- data/entry_types/scrolled/package/frontend/arrowRight-92a34ccc.js +77 -0
- data/entry_types/scrolled/package/frontend/{components-b3160dd7.js → components-4a09bfa3.js} +185 -45
- data/entry_types/scrolled/package/frontend/{PhonePlatformContext-f6093cc6.js → i18n-ddd92820.js} +149 -107
- data/entry_types/scrolled/package/frontend/index-02378634.js +118 -0
- data/entry_types/scrolled/package/frontend/index.css +1 -1
- data/entry_types/scrolled/package/frontend/index.js +206 -54
- data/entry_types/scrolled/package/frontend/useContentElementEditorState-63045393.js +52 -0
- data/entry_types/scrolled/package/package.json +2 -1
- data/entry_types/scrolled/package/testHelpers.js +9 -2
- data/entry_types/scrolled/package/values/colors.module.css +15 -0
- data/entry_types/scrolled/package/widgets/consentBar.css +1 -0
- data/entry_types/scrolled/package/widgets/consentBar.js +426 -0
- data/entry_types/scrolled/package/widgets/defaultNavigation.css +1 -1
- data/lib/generators/pageflow/resque/resque_generator.rb +1 -1
- data/lib/pageflow/ability_mixin.rb +5 -5
- data/lib/pageflow/active_admin_can_can_fix.rb +2 -2
- data/lib/pageflow/built_in_file_type.rb +7 -0
- data/lib/pageflow/configuration.rb +21 -0
- data/lib/pageflow/engine.rb +60 -39
- data/lib/pageflow/entry_export_import/revision_serialization.rb +1 -1
- data/lib/pageflow/file_type.rb +2 -2
- data/lib/pageflow/global_config_api.rb +2 -2
- data/lib/pageflow/nested_revision_component.rb +23 -5
- data/lib/pageflow/rails_version.rb +19 -0
- data/lib/pageflow/seeds.rb +10 -7
- data/lib/pageflow/version.rb +1 -1
- data/lib/pageflow/widget_types.rb +4 -0
- data/package/config/webpack5.js +14 -0
- data/package/editor.js +141 -30
- data/package/frontend.js +26 -2
- data/package/testHelpers.js +1 -1
- data/package/ui.js +296 -71
- data/spec/factories/entries.rb +17 -3
- data/spec/factories/sites.rb +3 -0
- data/vendor/assets/javascripts/iscroll.js +4 -7
- metadata +65 -49
- data/app/helpers/pageflow/admin/permalinks_helper.rb +0 -15
- data/entry_types/scrolled/package/frontend/arrowRight-78a7cee4.js +0 -42
@@ -0,0 +1,426 @@
|
|
1
|
+
import { useI18n, ThemeIcon, useConsentRequested, useLocale, useLegalInfo, frontend } from 'pageflow-scrolled/frontend';
|
2
|
+
import React, { useReducer, useState } from 'react';
|
3
|
+
|
4
|
+
function _arrayWithHoles(arr) {
|
5
|
+
if (Array.isArray(arr)) return arr;
|
6
|
+
}
|
7
|
+
|
8
|
+
function _iterableToArrayLimit(arr, i) {
|
9
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
10
|
+
var _arr = [];
|
11
|
+
var _n = true;
|
12
|
+
var _d = false;
|
13
|
+
var _e = undefined;
|
14
|
+
|
15
|
+
try {
|
16
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
17
|
+
_arr.push(_s.value);
|
18
|
+
|
19
|
+
if (i && _arr.length === i) break;
|
20
|
+
}
|
21
|
+
} catch (err) {
|
22
|
+
_d = true;
|
23
|
+
_e = err;
|
24
|
+
} finally {
|
25
|
+
try {
|
26
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
27
|
+
} finally {
|
28
|
+
if (_d) throw _e;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
return _arr;
|
33
|
+
}
|
34
|
+
|
35
|
+
function _arrayLikeToArray(arr, len) {
|
36
|
+
if (len == null || len > arr.length) len = arr.length;
|
37
|
+
|
38
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
39
|
+
arr2[i] = arr[i];
|
40
|
+
}
|
41
|
+
|
42
|
+
return arr2;
|
43
|
+
}
|
44
|
+
|
45
|
+
function _unsupportedIterableToArray(o, minLen) {
|
46
|
+
if (!o) return;
|
47
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
48
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
49
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
50
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
51
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
52
|
+
}
|
53
|
+
|
54
|
+
function _nonIterableRest() {
|
55
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
56
|
+
}
|
57
|
+
|
58
|
+
function _slicedToArray(arr, i) {
|
59
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
60
|
+
}
|
61
|
+
|
62
|
+
function _defineProperty(obj, key, value) {
|
63
|
+
if (key in obj) {
|
64
|
+
Object.defineProperty(obj, key, {
|
65
|
+
value: value,
|
66
|
+
enumerable: true,
|
67
|
+
configurable: true,
|
68
|
+
writable: true
|
69
|
+
});
|
70
|
+
} else {
|
71
|
+
obj[key] = value;
|
72
|
+
}
|
73
|
+
|
74
|
+
return obj;
|
75
|
+
}
|
76
|
+
|
77
|
+
function ownKeys(object, enumerableOnly) {
|
78
|
+
var keys = Object.keys(object);
|
79
|
+
|
80
|
+
if (Object.getOwnPropertySymbols) {
|
81
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
82
|
+
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
83
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
84
|
+
});
|
85
|
+
keys.push.apply(keys, symbols);
|
86
|
+
}
|
87
|
+
|
88
|
+
return keys;
|
89
|
+
}
|
90
|
+
|
91
|
+
function _objectSpread2(target) {
|
92
|
+
for (var i = 1; i < arguments.length; i++) {
|
93
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
94
|
+
|
95
|
+
if (i % 2) {
|
96
|
+
ownKeys(Object(source), true).forEach(function (key) {
|
97
|
+
_defineProperty(target, key, source[key]);
|
98
|
+
});
|
99
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
100
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
101
|
+
} else {
|
102
|
+
ownKeys(Object(source)).forEach(function (key) {
|
103
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
104
|
+
});
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
return target;
|
109
|
+
}
|
110
|
+
|
111
|
+
var styles = {"toggle":"Toggle-module_toggle__2N5XY"};
|
112
|
+
|
113
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
114
|
+
if (source == null) return {};
|
115
|
+
var target = {};
|
116
|
+
var sourceKeys = Object.keys(source);
|
117
|
+
var key, i;
|
118
|
+
|
119
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
120
|
+
key = sourceKeys[i];
|
121
|
+
if (excluded.indexOf(key) >= 0) continue;
|
122
|
+
target[key] = source[key];
|
123
|
+
}
|
124
|
+
|
125
|
+
return target;
|
126
|
+
}
|
127
|
+
|
128
|
+
function _objectWithoutProperties(source, excluded) {
|
129
|
+
if (source == null) return {};
|
130
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
131
|
+
var key, i;
|
132
|
+
|
133
|
+
if (Object.getOwnPropertySymbols) {
|
134
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
135
|
+
|
136
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
137
|
+
key = sourceSymbolKeys[i];
|
138
|
+
if (excluded.indexOf(key) >= 0) continue;
|
139
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
140
|
+
target[key] = source[key];
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
return target;
|
145
|
+
}
|
146
|
+
|
147
|
+
function _extends() {
|
148
|
+
_extends = Object.assign || function (target) {
|
149
|
+
for (var i = 1; i < arguments.length; i++) {
|
150
|
+
var source = arguments[i];
|
151
|
+
|
152
|
+
for (var key in source) {
|
153
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
154
|
+
target[key] = source[key];
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
return target;
|
160
|
+
};
|
161
|
+
|
162
|
+
return _extends.apply(this, arguments);
|
163
|
+
}
|
164
|
+
var ToggleOnIcon = (function (_ref) {
|
165
|
+
var _ref$styles = _ref.styles,
|
166
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
167
|
+
|
168
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
169
|
+
xmlns: "http://www.w3.org/2000/svg",
|
170
|
+
viewBox: "60 170 90 157"
|
171
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
172
|
+
d: "M150 297a50 50 0 0050-50 50 50 0 00-50-50H50a50 50 0 00-50 50 50 50 0 0050 50z"
|
173
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
174
|
+
cx: "-150",
|
175
|
+
cy: "-247",
|
176
|
+
fill: "currentColor",
|
177
|
+
r: "40",
|
178
|
+
transform: "scale(-1)"
|
179
|
+
}), /*#__PURE__*/React.createElement("path", {
|
180
|
+
stroke: "currentColor",
|
181
|
+
strokeWidth: "6",
|
182
|
+
d: "M87 227l-37 37-16-18",
|
183
|
+
fill: "none"
|
184
|
+
}));
|
185
|
+
});
|
186
|
+
|
187
|
+
function _extends$1() {
|
188
|
+
_extends$1 = Object.assign || function (target) {
|
189
|
+
for (var i = 1; i < arguments.length; i++) {
|
190
|
+
var source = arguments[i];
|
191
|
+
|
192
|
+
for (var key in source) {
|
193
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
194
|
+
target[key] = source[key];
|
195
|
+
}
|
196
|
+
}
|
197
|
+
}
|
198
|
+
|
199
|
+
return target;
|
200
|
+
};
|
201
|
+
|
202
|
+
return _extends$1.apply(this, arguments);
|
203
|
+
}
|
204
|
+
var ToggleOffIcon = (function (_ref) {
|
205
|
+
var _ref$styles = _ref.styles,
|
206
|
+
props = _objectWithoutProperties(_ref, ["styles"]);
|
207
|
+
|
208
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
209
|
+
xmlns: "http://www.w3.org/2000/svg",
|
210
|
+
viewBox: "60 170 90 157"
|
211
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
212
|
+
d: "M50 197a50 50 0 00-50 50 50 50 0 0050 50h100a50 50 0 0050-50 50 50 0 00-50-50H50z"
|
213
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
214
|
+
cx: "50",
|
215
|
+
cy: "247",
|
216
|
+
fill: "currentColor",
|
217
|
+
r: "40"
|
218
|
+
}), /*#__PURE__*/React.createElement("path", {
|
219
|
+
stroke: "currentColor",
|
220
|
+
strokeWidth: "6",
|
221
|
+
d: "M110.103 271.897l49.795-49.794m-.001 49.794l-49.794-49.795",
|
222
|
+
fill: "none"
|
223
|
+
}));
|
224
|
+
});
|
225
|
+
|
226
|
+
function Toggle(_ref) {
|
227
|
+
var id = _ref.id,
|
228
|
+
checked = _ref.checked,
|
229
|
+
onChange = _ref.onChange;
|
230
|
+
var Icon = checked ? ToggleOnIcon : ToggleOffIcon;
|
231
|
+
return /*#__PURE__*/React.createElement("button", {
|
232
|
+
id: id,
|
233
|
+
className: styles.toggle,
|
234
|
+
role: "checkbox",
|
235
|
+
"aria-checked": checked ? 'true' : 'false',
|
236
|
+
onClick: onChange
|
237
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
238
|
+
width: 50,
|
239
|
+
height: 35
|
240
|
+
}));
|
241
|
+
}
|
242
|
+
|
243
|
+
var styles$1 = {"bar":"ConsentBar-module_bar__YiYoC","text":"ConsentBar-module_text__2GSPP","button":"ConsentBar-module_button__2LVnY","acceptAllButton":"ConsentBar-module_acceptAllButton__1rSdh ConsentBar-module_button__2LVnY","saveButton":"ConsentBar-module_saveButton__16b97 ConsentBar-module_button__2LVnY","configureButton":"ConsentBar-module_configureButton__1VBqX ConsentBar-module_button__2LVnY","vendorsBox":"ConsentBar-module_vendorsBox__Jckbl","vendorList":"ConsentBar-module_vendorList__3Z4jU","vendor":"ConsentBar-module_vendor__2hPAk","expandVendor":"ConsentBar-module_expandVendor__hSkAD","decisionButtons":"ConsentBar-module_decisionButtons__I4T8q"};
|
244
|
+
|
245
|
+
function reducer(state, vendorName) {
|
246
|
+
return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, vendorName, !state[vendorName]));
|
247
|
+
}
|
248
|
+
|
249
|
+
function VendorsBox(_ref) {
|
250
|
+
var vendors = _ref.vendors,
|
251
|
+
save = _ref.save,
|
252
|
+
_ref$defaultExpanded = _ref.defaultExpanded,
|
253
|
+
defaultExpanded = _ref$defaultExpanded === void 0 ? false : _ref$defaultExpanded;
|
254
|
+
|
255
|
+
var _useI18n = useI18n(),
|
256
|
+
t = _useI18n.t;
|
257
|
+
|
258
|
+
var _useReducer = useReducer(reducer, vendors.reduce(function (result, vendor) {
|
259
|
+
return _objectSpread2(_objectSpread2({}, result), {}, _defineProperty({}, vendor.name, vendor.state === 'accepted'));
|
260
|
+
}, {})),
|
261
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
262
|
+
vendorStates = _useReducer2[0],
|
263
|
+
dispatch = _useReducer2[1];
|
264
|
+
|
265
|
+
return /*#__PURE__*/React.createElement("div", {
|
266
|
+
className: styles$1.vendorsBox
|
267
|
+
}, /*#__PURE__*/React.createElement("h3", null, t('pageflow_scrolled.public.consent_settings')), /*#__PURE__*/React.createElement("div", {
|
268
|
+
className: styles$1.vendorList
|
269
|
+
}, renderVendors({
|
270
|
+
vendors: vendors,
|
271
|
+
vendorStates: vendorStates,
|
272
|
+
t: t,
|
273
|
+
defaultExpanded: defaultExpanded,
|
274
|
+
onToggle: dispatch
|
275
|
+
})), /*#__PURE__*/React.createElement("button", {
|
276
|
+
className: styles$1.saveButton,
|
277
|
+
onClick: function onClick() {
|
278
|
+
return save(vendorStates);
|
279
|
+
}
|
280
|
+
}, t('pageflow_scrolled.public.consent_save')));
|
281
|
+
}
|
282
|
+
|
283
|
+
function renderVendors(_ref2) {
|
284
|
+
var vendors = _ref2.vendors,
|
285
|
+
vendorStates = _ref2.vendorStates,
|
286
|
+
t = _ref2.t,
|
287
|
+
defaultExpanded = _ref2.defaultExpanded,
|
288
|
+
onToggle = _ref2.onToggle;
|
289
|
+
|
290
|
+
if (!vendors.length) {
|
291
|
+
return /*#__PURE__*/React.createElement("div", {
|
292
|
+
className: "consent_vendor_list-blank"
|
293
|
+
}, t('pageflow_scrolled.public.consent_no_vendors'));
|
294
|
+
}
|
295
|
+
|
296
|
+
return vendors.map(function (vendor) {
|
297
|
+
return /*#__PURE__*/React.createElement(Vendor, {
|
298
|
+
key: vendor.name,
|
299
|
+
vendor: vendor,
|
300
|
+
state: vendorStates[vendor.name],
|
301
|
+
t: t,
|
302
|
+
defaultExpanded: defaultExpanded,
|
303
|
+
onToggle: onToggle
|
304
|
+
});
|
305
|
+
});
|
306
|
+
}
|
307
|
+
|
308
|
+
function Vendor(_ref3) {
|
309
|
+
var vendor = _ref3.vendor,
|
310
|
+
state = _ref3.state,
|
311
|
+
onToggle = _ref3.onToggle,
|
312
|
+
t = _ref3.t,
|
313
|
+
defaultExpanded = _ref3.defaultExpanded;
|
314
|
+
|
315
|
+
var _useState = useState(defaultExpanded),
|
316
|
+
_useState2 = _slicedToArray(_useState, 2),
|
317
|
+
expanded = _useState2[0],
|
318
|
+
setExpanded = _useState2[1];
|
319
|
+
|
320
|
+
var id = "consent-vendor-".concat(vendor.name);
|
321
|
+
return /*#__PURE__*/React.createElement("div", {
|
322
|
+
className: styles$1.vendor
|
323
|
+
}, /*#__PURE__*/React.createElement("label", {
|
324
|
+
htmlFor: id
|
325
|
+
}, vendor.displayName), /*#__PURE__*/React.createElement(Toggle, {
|
326
|
+
id: id,
|
327
|
+
checked: state,
|
328
|
+
onChange: function onChange() {
|
329
|
+
return onToggle(vendor.name);
|
330
|
+
}
|
331
|
+
}), /*#__PURE__*/React.createElement("button", {
|
332
|
+
className: styles$1.expandVendor,
|
333
|
+
title: t('pageflow_scrolled.public.consent_expand_vendor'),
|
334
|
+
onClick: function onClick() {
|
335
|
+
return setExpanded(!expanded);
|
336
|
+
}
|
337
|
+
}, /*#__PURE__*/React.createElement(ThemeIcon, {
|
338
|
+
name: "information",
|
339
|
+
width: 30,
|
340
|
+
height: 34
|
341
|
+
})), expanded && /*#__PURE__*/React.createElement("p", {
|
342
|
+
dangerouslySetInnerHTML: {
|
343
|
+
__html: vendor.description
|
344
|
+
}
|
345
|
+
}));
|
346
|
+
}
|
347
|
+
|
348
|
+
function ConsentBar(_ref) {
|
349
|
+
var _ref$configuration = _ref.configuration,
|
350
|
+
configuration = _ref$configuration === void 0 ? {} : _ref$configuration;
|
351
|
+
|
352
|
+
var _useConsentRequested = useConsentRequested(),
|
353
|
+
vendors = _useConsentRequested.vendors,
|
354
|
+
acceptAll = _useConsentRequested.acceptAll,
|
355
|
+
denyAll = _useConsentRequested.denyAll,
|
356
|
+
save = _useConsentRequested.save;
|
357
|
+
|
358
|
+
var _useState = useState(configuration.defaultExpanded),
|
359
|
+
_useState2 = _slicedToArray(_useState, 2),
|
360
|
+
expanded = _useState2[0],
|
361
|
+
setExpanded = _useState2[1];
|
362
|
+
|
363
|
+
var _useI18n = useI18n(),
|
364
|
+
t = _useI18n.t;
|
365
|
+
|
366
|
+
var locale = useLocale();
|
367
|
+
var privacyLinkUrl = useLegalInfo().privacy.url;
|
368
|
+
|
369
|
+
if (vendors) {
|
370
|
+
return /*#__PURE__*/React.createElement("div", {
|
371
|
+
className: styles$1.bar
|
372
|
+
}, renderText({
|
373
|
+
privacyLinkUrl: privacyLinkUrl,
|
374
|
+
t: t,
|
375
|
+
locale: locale,
|
376
|
+
vendors: vendors
|
377
|
+
}), !expanded && /*#__PURE__*/React.createElement("button", {
|
378
|
+
className: styles$1.configureButton,
|
379
|
+
onClick: function onClick() {
|
380
|
+
return setExpanded(true);
|
381
|
+
}
|
382
|
+
}, /*#__PURE__*/React.createElement(ThemeIcon, {
|
383
|
+
name: "gear",
|
384
|
+
width: 15,
|
385
|
+
height: 15
|
386
|
+
}), t('pageflow_scrolled.public.consent_configure')), expanded && /*#__PURE__*/React.createElement(VendorsBox, {
|
387
|
+
vendors: vendors,
|
388
|
+
save: save,
|
389
|
+
t: t,
|
390
|
+
defaultExpanded: configuration.defaultExpanded
|
391
|
+
}), /*#__PURE__*/React.createElement("div", {
|
392
|
+
className: styles$1.decisionButtons
|
393
|
+
}, /*#__PURE__*/React.createElement("button", {
|
394
|
+
className: styles$1.button,
|
395
|
+
onClick: denyAll
|
396
|
+
}, t('pageflow_scrolled.public.consent_deny_all')), /*#__PURE__*/React.createElement("button", {
|
397
|
+
className: styles$1.acceptAllButton,
|
398
|
+
onClick: acceptAll
|
399
|
+
}, t('pageflow_scrolled.public.consent_accept_all'))));
|
400
|
+
}
|
401
|
+
|
402
|
+
return null;
|
403
|
+
}
|
404
|
+
|
405
|
+
function renderText(_ref2) {
|
406
|
+
var privacyLinkUrl = _ref2.privacyLinkUrl,
|
407
|
+
t = _ref2.t,
|
408
|
+
locale = _ref2.locale,
|
409
|
+
vendors = _ref2.vendors;
|
410
|
+
var vendorNames = vendors.map(function (vendor) {
|
411
|
+
return vendor.name;
|
412
|
+
}).join(',');
|
413
|
+
var text = t('pageflow_scrolled.public.consent_prompt_html', {
|
414
|
+
privacyLinkUrl: "".concat(privacyLinkUrl, "?lang=").concat(locale, "&vendors=").concat(vendorNames, "#consent")
|
415
|
+
});
|
416
|
+
return /*#__PURE__*/React.createElement("div", {
|
417
|
+
className: styles$1.text,
|
418
|
+
dangerouslySetInnerHTML: {
|
419
|
+
__html: text
|
420
|
+
}
|
421
|
+
});
|
422
|
+
}
|
423
|
+
|
424
|
+
frontend.widgetTypes.register('consentBar', {
|
425
|
+
component: ConsentBar
|
426
|
+
});
|
@@ -6,4 +6,4 @@
|
|
6
6
|
* @author Jonathan Suh @jonsuh
|
7
7
|
* @site https://jonsuh.com/hamburgers
|
8
8
|
* @link https://github.com/jonsuh/hamburgers
|
9
|
-
*/.HamburgerIcons-module_hamburger__SOreS{display:inline-block;cursor:pointer;transition-property:opacity,filter;transition-duration:.15s;transition-timing-function:linear;font:inherit;color:inherit;text-transform:none;background-color:transparent;border:0;margin:0;overflow:visible}.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn,.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{background-color:var(--theme-accent-color)}.HamburgerIcons-module_hamburger-box__10MR1{width:40px;height:24px;display:inline-block;position:relative;vertical-align:top;transform:var(--hamburger-icon-transform)}.HamburgerIcons-module_hamburger-inner__Wv7Dn{display:block;top:50%;margin-top:-2px}.HamburgerIcons-module_hamburger-inner__Wv7Dn,.HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{width:30px;height:var(--hamburger-icon-line-width,4px);background-color:var(--theme-widget-primary-color);border-radius:4px;position:absolute;transition-property:transform;transition-duration:.15s;transition-timing-function:ease}.HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{content:"";display:block}.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{top:-10px}.HamburgerIcons-module_hamburger-inner__Wv7Dn:after{bottom:-10px}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn{top:auto;bottom:0;transition-duration:.13s;transition-delay:.13s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity .1s linear}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{transition:top .12s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn{transform:translate3d(0,-10px,0) rotate(-45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:after{top:0;opacity:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity .1s linear .22s}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{top:0;transform:rotate(-90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .16s,transform .13s cubic-bezier(.215,.61,.355,1) .25s}.ChapterLink-module_chapterLink__3YspQ{line-height:42px;color:var(--theme-widget-primary-color);text-decoration:none;position:relative;display:block;font-family:inherit;font-weight:700;font-size:1rem;height:42px;white-space:nowrap;padding:0 10px;margin:4px 0}.ChapterLink-module_chapterLink__3YspQ:hover,.ChapterLink-module_chapterLinkActive__9i8SL{color:var(--theme-accent-color)}.ChapterLink-module_summary__2ZfRU{color:var(--theme-widget-on-background-color)}.ChapterLink-module_tooltipBubble__3VRUO{display:none}@media (min-width:768px){.ChapterLink-module_summary__2ZfRU{display:none}.ChapterLink-module_tooltipBubble__3VRUO{display:block}}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u{text-align:left}.LegalInfoMenu-module_scroller__3NPW_{overflow:auto;max-height:40vh;scrollbar-width:thin;margin-right:-5px;padding-right:5px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar{width:3px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar-thumb{background-color:var(--theme-widget-secondary-color);border-radius:2px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar-track{background-color:var(--theme-widget-surface-color)}.LegalInfoMenu-module_links__1kpsd{position:relative;padding-top:5px;padding-bottom:5px}.LegalInfoMenu-module_links__1kpsd:before{content:"";position:absolute;top:0;left:-5px;right:-5px;border-top:1px solid var(--theme-widget-primary-color);opacity:.1}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u:after{left:90%!important}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u p{margin:0 0 .5em}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u a{color:var(--theme-accent-color)}.LegalInfoMenu-module_legalInfoLink__gkXaF{display:block;margin-top:5px}header .share svg{fill:var(--theme-widget-primary-color)}header .share:hover svg{fill:var(--theme-accent-color)}.SharingMenu-module_sharingTooltip__2Tyev{width:160px;padding:0!important}.SharingMenu-module_sharingTooltip__2Tyev:after{left:90%!important}.SharingMenu-module_shareLinkContainer__3-3W6{display:inline-block;width:80px;height:60px;cursor:pointer;color:transparent;text-align:center}.SharingMenu-module_shareLink__3PdRE{position:relative;color:var(--theme-widget-primary-color);text-decoration:none}.SharingMenu-module_shareLink__3PdRE:hover{color:var(--theme-accent-color)}.SharingMenu-module_shareLink__3PdRE svg{width:80px;height:25px;margin-top:5px;margin-bottom:3px}.ToggleMuteButton-module_button__1ACmo{color:var(--theme-widget-primary-color)}.ToggleMuteButton-module_animate__pd1yK{position:relative}.ToggleMuteButton-module_animate__pd1yK:before{content:"";display:block;position:absolute;top:50%;left:50%;margin:-5px;z-index:-1;width:10px;height:10px;background-color:#ddd;border-radius:5px;-webkit-animation:ToggleMuteButton-module_pulse__2UN7Q .5s ease .2s 1;animation:ToggleMuteButton-module_pulse__2UN7Q .5s ease .2s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;pointer-events:none}@-webkit-keyframes ToggleMuteButton-module_pulse__2UN7Q{0%{opacity:.8}to{transform:scale(40);opacity:0}}@keyframes ToggleMuteButton-module_pulse__2UN7Q{0%{opacity:.8}to{transform:scale(40);opacity:0}}.SkipLinks-module_link__HMj9l{position:absolute;z-index:10000;top:-1000em;left:-1000em;display:block;border:1px solid #eee;border-radius:5px;padding:5px;background:#00375a;text-align:center;line-height:25px;color:#fff}.SkipLinks-module_link__HMj9l:focus{left:13.8%;top:13%}.utils-module_clip__34eot{
|
9
|
+
*/.HamburgerIcons-module_hamburger__SOreS{display:inline-block;cursor:pointer;transition-property:opacity,filter;transition-duration:.15s;transition-timing-function:linear;font:inherit;color:inherit;text-transform:none;background-color:transparent;border:0;margin:0;overflow:visible}.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn,.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{background-color:var(--theme-accent-color)}.HamburgerIcons-module_hamburger-box__10MR1{width:40px;height:24px;display:inline-block;position:relative;vertical-align:top;transform:var(--hamburger-icon-transform)}.HamburgerIcons-module_hamburger-inner__Wv7Dn{display:block;top:50%;margin-top:-2px}.HamburgerIcons-module_hamburger-inner__Wv7Dn,.HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{width:30px;height:var(--hamburger-icon-line-width,4px);background-color:var(--theme-widget-primary-color);border-radius:4px;position:absolute;transition-property:transform;transition-duration:.15s;transition-timing-function:ease}.HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{content:"";display:block}.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{top:-10px}.HamburgerIcons-module_hamburger-inner__Wv7Dn:after{bottom:-10px}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn{top:auto;bottom:0;transition-duration:.13s;transition-delay:.13s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity .1s linear}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{transition:top .12s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn{transform:translate3d(0,-10px,0) rotate(-45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:after{top:0;opacity:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity .1s linear .22s}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{top:0;transform:rotate(-90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .16s,transform .13s cubic-bezier(.215,.61,.355,1) .25s}.ChapterLink-module_chapterLink__3YspQ{line-height:42px;color:var(--theme-widget-primary-color);text-decoration:none;position:relative;display:block;font-family:inherit;font-weight:700;font-size:1rem;height:42px;white-space:nowrap;padding:0 10px;margin:4px 0}.ChapterLink-module_chapterLink__3YspQ:hover,.ChapterLink-module_chapterLinkActive__9i8SL{color:var(--theme-accent-color)}.ChapterLink-module_summary__2ZfRU{color:var(--theme-widget-on-background-color)}.ChapterLink-module_tooltipBubble__3VRUO{display:none}@media (min-width:768px){.ChapterLink-module_summary__2ZfRU{display:none}.ChapterLink-module_tooltipBubble__3VRUO{display:block}}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u{text-align:left}.LegalInfoMenu-module_scroller__3NPW_{overflow:auto;max-height:40vh;scrollbar-width:thin;margin-right:-5px;padding-right:5px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar{width:3px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar-thumb{background-color:var(--theme-widget-secondary-color);border-radius:2px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar-track{background-color:var(--theme-widget-surface-color)}.LegalInfoMenu-module_links__1kpsd{position:relative;padding-top:5px;padding-bottom:5px}.LegalInfoMenu-module_links__1kpsd:before{content:"";position:absolute;top:0;left:-5px;right:-5px;border-top:1px solid var(--theme-widget-primary-color);opacity:.1}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u:after{left:90%!important}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u p{margin:0 0 .5em}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u a{color:var(--theme-accent-color)}.LegalInfoMenu-module_legalInfoLink__gkXaF{display:block;margin-top:5px}header .share svg{fill:var(--theme-widget-primary-color)}header .share:hover svg{fill:var(--theme-accent-color)}.SharingMenu-module_sharingTooltip__2Tyev{width:160px;padding:0!important}.SharingMenu-module_sharingTooltip__2Tyev:after{left:90%!important}.SharingMenu-module_shareLinkContainer__3-3W6{display:inline-block;width:80px;height:60px;cursor:pointer;color:transparent;text-align:center}.SharingMenu-module_shareLink__3PdRE{position:relative;color:var(--theme-widget-primary-color);text-decoration:none}.SharingMenu-module_shareLink__3PdRE:hover{color:var(--theme-accent-color)}.SharingMenu-module_shareLink__3PdRE svg{width:80px;height:25px;margin-top:5px;margin-bottom:3px}.ToggleMuteButton-module_button__1ACmo{color:var(--theme-widget-primary-color)}.ToggleMuteButton-module_animate__pd1yK{position:relative}.ToggleMuteButton-module_animate__pd1yK:before{content:"";display:block;position:absolute;top:50%;left:50%;margin:-5px;z-index:-1;width:10px;height:10px;background-color:#ddd;border-radius:5px;-webkit-animation:ToggleMuteButton-module_pulse__2UN7Q .5s ease .2s 1;animation:ToggleMuteButton-module_pulse__2UN7Q .5s ease .2s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;pointer-events:none}@-webkit-keyframes ToggleMuteButton-module_pulse__2UN7Q{0%{opacity:.8}to{transform:scale(40);opacity:0}}@keyframes ToggleMuteButton-module_pulse__2UN7Q{0%{opacity:.8}to{transform:scale(40);opacity:0}}.SkipLinks-module_link__HMj9l{position:absolute;z-index:10000;top:-1000em;left:-1000em;display:block;border:1px solid #eee;border-radius:5px;padding:5px;background:#00375a;text-align:center;line-height:25px;color:#fff}.SkipLinks-module_link__HMj9l:focus{left:13.8%;top:13%}.utils-module_clip__34eot{-webkit-clip-path:polygon(0 0,100% 0,100% 110%,0 110%);clip-path:polygon(0 0,100% 0,100% 110%,0 110%)}.utils-module_unstyledButton__3rgne{border:0;padding:0;background-color:transparent;text-align:initial}.ScrollButton-module_button__1GKRF{position:absolute;top:var(--default-navigation-scroll-button-top);height:40px;width:20px;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;z-index:1}.ScrollButton-module_button__1GKRF svg{width:18px;height:18px;color:var(--theme-widget-primary-color)}.ScrollButton-module_visible__29yco{opacity:1;visibility:visible}.ScrollButton-module_start__1XPra{right:80%}.ScrollButton-module_end__3PxQt{left:79%}@media screen and (min-width:768px){.Scroller-module_scroller__139cK{overflow:hidden;scroll-behavior:smooth;padding-bottom:90vh;pointer-events:none;margin:0 auto;width:58%}.Scroller-module_scroller__139cK>*{pointer-events:auto}@supports ((-webkit-clip-path:polygon(0 0)) or (clip-path:polygon(0 0))){.Scroller-module_scroller__139cK{width:auto;-webkit-clip-path:polygon(20% 0,79% 0,79% var(--default-navigation-chapter-link-height),100% var(--default-navigation-chapter-link-height),100% 400%,0 400%,0 var(--default-navigation-chapter-link-height),20% var(--default-navigation-chapter-link-height));clip-path:polygon(20% 0,79% 0,79% var(--default-navigation-chapter-link-height),100% var(--default-navigation-chapter-link-height),100% 400%,0 400%,0 var(--default-navigation-chapter-link-height),20% var(--default-navigation-chapter-link-height));-webkit-mask:linear-gradient(90deg,transparent 0,transparent 20%,#000 22%,#000 77%,transparent 79%,transparent) top,linear-gradient(90deg,#000 0,#000) bottom;mask:linear-gradient(90deg,transparent 0,transparent 20%,#000 22%,#000 77%,transparent 79%,transparent) top,linear-gradient(90deg,#000 0,#000) bottom;-webkit-mask-size:100% var(--default-navigation-chapter-link-height),100% calc(100% - var(--default-navigation-chapter-link-height));mask-size:100% var(--default-navigation-chapter-link-height),100% calc(100% - var(--default-navigation-chapter-link-height));-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.Scroller-module_inner__3dhuM{display:inline-block;margin:0 22%}}}
|
@@ -12,7 +12,7 @@ module Pageflow
|
|
12
12
|
template 'resque_enqueue_after_commit_patch.rb', 'config/initializers/resque_enqueue_after_commit_patch.rb'
|
13
13
|
template 'resque.rake', 'lib/tasks/resque.rake'
|
14
14
|
|
15
|
-
inject_into_file 'config/application.rb', after:
|
15
|
+
inject_into_file 'config/application.rb', after: /config.load_defaults .*\n/ do
|
16
16
|
<<-RUBY
|
17
17
|
config.active_job.queue_adapter = :resque
|
18
18
|
RUBY
|
@@ -31,7 +31,7 @@ module Pageflow
|
|
31
31
|
AccountPolicy.new(user, account).see_badge_belonging_to?
|
32
32
|
end
|
33
33
|
|
34
|
-
can :create, Membership do |membership|
|
34
|
+
can :create, Membership, Membership.all do |membership|
|
35
35
|
membership.entity.nil? ||
|
36
36
|
membership.user.nil? ||
|
37
37
|
(!(membership.user.entries.include?(membership.entity) ||
|
@@ -120,7 +120,7 @@ module Pageflow
|
|
120
120
|
AccountPolicy.new(user, account).update_site_on_entry_of?
|
121
121
|
end
|
122
122
|
|
123
|
-
can :create, Entry do |entry|
|
123
|
+
can :create, Entry, Entry.all do |entry|
|
124
124
|
EntryPolicy.new(user, entry).create?
|
125
125
|
end
|
126
126
|
|
@@ -204,7 +204,7 @@ module Pageflow
|
|
204
204
|
FilePolicy.new(user, record).use?
|
205
205
|
end
|
206
206
|
|
207
|
-
can [:create, :update, :destroy], Folder do |folder|
|
207
|
+
can [:create, :update, :destroy], Folder, Folder.all do |folder|
|
208
208
|
FolderPolicy.new(user, folder).manage?
|
209
209
|
end
|
210
210
|
|
@@ -234,7 +234,7 @@ module Pageflow
|
|
234
234
|
SitePolicy.new(user, site).update?
|
235
235
|
end
|
236
236
|
|
237
|
-
can :create, EntryTemplate do |entry_template|
|
237
|
+
can :create, EntryTemplate, EntryTemplate.all do |entry_template|
|
238
238
|
EntryTemplatePolicy.new(user, entry_template).create?
|
239
239
|
end
|
240
240
|
|
@@ -242,7 +242,7 @@ module Pageflow
|
|
242
242
|
EntryTemplatePolicy.new(user, entry_template).update?
|
243
243
|
end
|
244
244
|
|
245
|
-
can :create, ::User do |managed_user|
|
245
|
+
can :create, ::User, ::User.all do |managed_user|
|
246
246
|
UserPolicy.new(user, managed_user).create?
|
247
247
|
end
|
248
248
|
|
@@ -17,13 +17,13 @@ module Pageflow
|
|
17
17
|
# :create, User -> :create_any, :users
|
18
18
|
module ActiveAdminCanCanFix
|
19
19
|
def can?(action, subject)
|
20
|
-
if [:read, :create].include?(action) &&
|
20
|
+
if [:read, :new, :create].include?(action) &&
|
21
21
|
[Entry, Account, User].include?(subject)
|
22
22
|
collection_name = subject.name.demodulize.underscore.pluralize.to_sym
|
23
23
|
|
24
24
|
if action == :read
|
25
25
|
super(:index, collection_name)
|
26
|
-
|
26
|
+
else
|
27
27
|
super(:create_any, collection_name)
|
28
28
|
end
|
29
29
|
else
|
@@ -41,5 +41,12 @@ module Pageflow
|
|
41
41
|
collection_name: 'text_track_files',
|
42
42
|
url_templates: TextTrackFileUrlTemplates.new)
|
43
43
|
end
|
44
|
+
|
45
|
+
def self.other
|
46
|
+
FileType.new(model: 'Pageflow::OtherFile',
|
47
|
+
collection_name: 'other_files',
|
48
|
+
url_templates: OtherFileUrlTemplates.new,
|
49
|
+
top_level_type: true)
|
50
|
+
end
|
44
51
|
end
|
45
52
|
end
|
@@ -195,6 +195,19 @@ module Pageflow
|
|
195
195
|
# @since 12.4
|
196
196
|
attr_accessor :public_entry_redirect
|
197
197
|
|
198
|
+
# Cache-Control header to set for published entries that have been
|
199
|
+
# published without a password. For password protected entries,
|
200
|
+
# cache control is always set to private to prevent caching
|
201
|
+
# authenticated responses in public caches like CDNs and serving
|
202
|
+
# them to unauthenticated users.
|
203
|
+
#
|
204
|
+
# Can be wrapped in a `features.register` block to use different
|
205
|
+
# caching strategies for different entries or accounts.
|
206
|
+
#
|
207
|
+
# @since 16.1
|
208
|
+
# @return [String]
|
209
|
+
attr_accessor :public_entry_cache_control_header
|
210
|
+
|
198
211
|
# Either a lambda or an object with a `call` method taking a
|
199
212
|
# {Site} as paramater and returing a hash of options used to
|
200
213
|
# construct the url of a published entry.
|
@@ -232,6 +245,12 @@ module Pageflow
|
|
232
245
|
# boolean. Defaults to false.
|
233
246
|
attr_accessor :confirm_encoding_jobs
|
234
247
|
|
248
|
+
# Controls default value of "published until" date field in editor
|
249
|
+
# publish entry view.
|
250
|
+
#
|
251
|
+
# @since 16.1
|
252
|
+
attr_accessor :default_published_until_duration_in_months
|
253
|
+
|
235
254
|
# Used by Pageflow extensions to provide new tabs to be displayed
|
236
255
|
# in the admin.
|
237
256
|
#
|
@@ -412,6 +431,7 @@ module Pageflow
|
|
412
431
|
@transform_theme_customization_files = ->(files, _entry) { files }
|
413
432
|
|
414
433
|
@confirm_encoding_jobs = false
|
434
|
+
@default_published_until_duration_in_months = 12
|
415
435
|
|
416
436
|
@admin_resource_tabs = Pageflow::Admin::Tabs.new
|
417
437
|
@admin_form_inputs = Pageflow::Admin::FormInputs.new
|
@@ -541,6 +561,7 @@ module Pageflow
|
|
541
561
|
delegate :page_types, to: :config
|
542
562
|
delegate :themes, to: :config
|
543
563
|
delegate :widget_types, to: :config
|
564
|
+
delegate :public_entry_cache_control_header=, to: :config
|
544
565
|
|
545
566
|
delegate :for_entry_type, to: :config
|
546
567
|
end
|