pageflow 15.3.0 → 15.4.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +158 -353
  3. data/README.md +2 -3
  4. data/app/assets/javascripts/pageflow/dist/ui.js +99 -32
  5. data/app/assets/javascripts/pageflow/vendor.js +0 -1
  6. data/app/assets/stylesheets/pageflow/editor/base.scss +3 -2
  7. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +1 -1
  8. data/app/assets/stylesheets/pageflow/editor/select_button.scss +1 -1
  9. data/app/assets/stylesheets/pageflow/editor/sidebar_footer.scss +1 -1
  10. data/app/assets/stylesheets/pageflow/entries.scss +1 -1
  11. data/app/assets/stylesheets/pageflow/loading_spinner.scss +4 -1
  12. data/app/assets/stylesheets/pageflow/navigation_mobile.scss +4 -4
  13. data/app/assets/stylesheets/pageflow/themes/default/anchors.scss +1 -1
  14. data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +1 -1
  15. data/app/assets/stylesheets/pageflow/themes/default/page/anchors.scss +1 -1
  16. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/control_bar.scss +1 -1
  17. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +1 -1
  18. data/app/assets/stylesheets/pageflow/themes/default/player_controls/shared/menu_bar.scss +2 -2
  19. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/control_bar.scss +2 -2
  20. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +1 -1
  21. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/quality_menu.scss +2 -2
  22. data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform/wave.scss +1 -1
  23. data/app/assets/stylesheets/pageflow/ui/forms.scss +9 -2
  24. data/app/assets/stylesheets/pageflow/ui/input/extended_select_input.scss +2 -2
  25. data/app/models/pageflow/account_role_query.rb +1 -1
  26. data/app/models/pageflow/managed_user_query.rb +1 -1
  27. data/app/policies/pageflow/folder_policy.rb +2 -2
  28. data/app/policies/pageflow/membership_policy.rb +2 -2
  29. data/app/policies/pageflow/theming_policy.rb +2 -2
  30. data/app/policies/pageflow/user_policy.rb +1 -1
  31. data/app/views/pageflow/video_files/_video_file.json.jbuilder +8 -1
  32. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +103 -36
  33. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +42 -15
  34. data/entry_types/paged/app/assets/javascripts/pageflow_paged/vendor.js +1 -0
  35. data/entry_types/paged/app/assets/javascripts/pageflow_paged/videojs.js +6 -0
  36. data/entry_types/paged/app/views/layouts/pageflow_paged/_loading_spinner_inline_script.html.erb +1 -0
  37. data/entry_types/paged/app/views/layouts/pageflow_paged/application.html.erb +1 -1
  38. data/entry_types/paged/app/views/pageflow_paged/editor/entries/_head.html.erb +2 -0
  39. data/entry_types/paged/lib/tasks/pageflow_paged_tasks.rake +7 -0
  40. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/dash.all.min.js +0 -0
  41. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/videojs-dash.js +0 -0
  42. data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/videojs.js +0 -0
  43. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +2 -0
  44. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +1 -0
  45. data/entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb +21 -0
  46. data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +12 -5
  47. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +5 -7
  48. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +1 -0
  49. data/entry_types/scrolled/app/views/pageflow_scrolled/favicons/_entry.html.erb +10 -0
  50. data/entry_types/scrolled/config/locales/de.yml +655 -0
  51. data/entry_types/scrolled/config/locales/en.yml +522 -0
  52. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +5 -0
  53. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/android-chrome-192x192.png +0 -0
  54. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/android-chrome-512x512.png +0 -0
  55. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/apple-touch-icon.png +0 -0
  56. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/browserconfig.xml +9 -0
  57. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon-16x16.png +0 -0
  58. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon-32x32.png +0 -0
  59. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon.ico +0 -0
  60. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/mstile-150x150.png +0 -0
  61. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/safari-pinned-tab.svg +46 -0
  62. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/site.webmanifest +19 -0
  63. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/unmute.mp3 +0 -0
  64. data/entry_types/scrolled/lib/tasks/pageflow_scrolled_tasks.rake +1 -0
  65. data/entry_types/scrolled/package/contentElements-editor.js +14 -1
  66. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  67. data/entry_types/scrolled/package/contentElements-frontend.js +338 -104
  68. data/entry_types/scrolled/package/editor.js +594 -242
  69. data/entry_types/scrolled/package/frontend/{EditableText-4264c349.js → EditableText-43c50894.js} +331 -163
  70. data/entry_types/scrolled/package/frontend/{Wavesurfer-c3c45324.js → Wavesurfer-b88b02e0.js} +0 -3
  71. data/entry_types/scrolled/package/frontend/{components-cfe6a479.js → components-3ead1b4a.js} +509 -91
  72. data/entry_types/scrolled/package/frontend/index.css +2 -2
  73. data/entry_types/scrolled/package/frontend/index.js +2107 -1025
  74. data/entry_types/scrolled/package/package.json +15 -3
  75. data/lib/generators/pageflow/initializer/templates/pageflow.rb +2 -1
  76. data/lib/pageflow/engine.rb +0 -1
  77. data/lib/pageflow/themes.rb +4 -0
  78. data/lib/pageflow/version.rb +1 -1
  79. data/package/config/jest/index.js +7 -2
  80. data/package/config/webpack.js +1 -2
  81. data/package/editor.js +4 -4
  82. data/package/frontend.js +30 -13
  83. data/package/ui.js +99 -32
  84. metadata +25 -11
  85. data/app/assets/javascripts/pageflow/videojs.js +0 -6
  86. data/entry_types/scrolled/config/locales/new/de.yml +0 -601
  87. data/entry_types/scrolled/config/locales/new/en.yml +0 -507
@@ -74,7 +74,7 @@ $slim-player-controls-info-box-header-typography: () !default;
74
74
  pointer-events: none;
75
75
 
76
76
  a {
77
- pointer-events: all;
77
+ pointer-events: auto;
78
78
  }
79
79
 
80
80
  position: absolute;
@@ -12,7 +12,7 @@ $slim-player-controls-quality-menu-annotation-color: #ff0000 !default;
12
12
  bottom: 0;
13
13
  right: 10px;
14
14
  z-index: 10;
15
- pointer-events: all;
15
+ pointer-events: auto;
16
16
 
17
17
  @include transition(opacity 0.5s, visibility 0.5s);
18
18
  }
@@ -88,7 +88,7 @@ $slim-player-controls-quality-menu-annotation-color: #ff0000 !default;
88
88
  &-menu_bar_button-sub_menu_visible .player_controls-menu_bar_button_sub_menu {
89
89
  visibility: visible;
90
90
  opacity: 1;
91
- pointer-events: all;
91
+ pointer-events: auto;
92
92
  @include transition(none);
93
93
  }
94
94
 
@@ -15,7 +15,7 @@
15
15
 
16
16
  position: relative;
17
17
  z-index: 1;
18
- pointer-events: all;
18
+ pointer-events: auto;
19
19
  height: 70px;
20
20
 
21
21
  @media (min-height: 600px) {
@@ -24,7 +24,8 @@ label:hover span.name {
24
24
  select,
25
25
  textarea,
26
26
  input {
27
- font-family: Helvetica, "Sans-Serif";
27
+ font-family: Helvetica, Arial, "Sans-Serif";
28
+ font-size: 13px;
28
29
  display: block;
29
30
  width: 100%;
30
31
  border: solid 1px #888;
@@ -158,6 +159,12 @@ textarea.short {
158
159
  margin: 7px 0;
159
160
  float: left;
160
161
  }
162
+
163
+ &.disabled .slider,
164
+ &.disabled .value {
165
+ opacity: 0.5;
166
+ pointer-events: none;
167
+ }
161
168
  }
162
169
 
163
170
  .validation {
@@ -189,7 +196,7 @@ textarea.short {
189
196
  width: 20px;
190
197
  height: 17px;
191
198
  text-align: center;
192
- pointer-events: all;
199
+ pointer-events: auto;
193
200
  }
194
201
 
195
202
  position: absolute;
@@ -1,6 +1,6 @@
1
1
  .extended_select_input {
2
2
  .ui-selectmenu-button span.ui-selectmenu-text {
3
- font-family: Helvetica, Sans-Serif;
3
+ font-family: Helvetica, Arial, Sans-Serif;
4
4
  font-size: 13px;
5
5
  }
6
6
  }
@@ -91,7 +91,7 @@
91
91
  }
92
92
 
93
93
  .ui-widget {
94
- font-family: Helvetica, Sans-Serif;
94
+ font-family: Helvetica, Arial, Sans-Serif;
95
95
  font-size: 13px;
96
96
 
97
97
  .item-description {
@@ -32,7 +32,7 @@ module Pageflow
32
32
  INNER JOIN pageflow_memberships ON
33
33
  pageflow_memberships.user_id = :user_id AND
34
34
  pageflow_memberships.entity_id = pageflow_accounts.id AND
35
- pageflow_memberships.entity_type = "Pageflow::Account" AND
35
+ pageflow_memberships.entity_type = 'Pageflow::Account' AND
36
36
  pageflow_memberships.role IN (:roles)
37
37
  SQL
38
38
  end
@@ -26,7 +26,7 @@ module Pageflow
26
26
  <<-SQL
27
27
  INNER JOIN pageflow_memberships account_memberships ON
28
28
  account_memberships.user_id = users.id AND
29
- account_memberships.entity_type = "Pageflow::Account"
29
+ account_memberships.entity_type = 'Pageflow::Account'
30
30
  SQL
31
31
  end
32
32
 
@@ -24,9 +24,9 @@ module Pageflow
24
24
  user.accounts.joins(sanitize_sql_array([
25
25
  'LEFT OUTER JOIN pageflow_memberships as pageflow_memberships_2 ON ' \
26
26
  'pageflow_memberships_2.user_id = :user_id AND ' \
27
- 'pageflow_memberships_2.entity_type = "Pageflow::Account" AND ' \
27
+ 'pageflow_memberships_2.entity_type = \'Pageflow::Account\' AND ' \
28
28
  'pageflow_memberships_2.entity_id = pageflow_accounts.id AND ' \
29
- 'pageflow_memberships_2.role IN ("previewer", "editor", "publisher", "manager")',
29
+ 'pageflow_memberships_2.role IN (\'previewer\', \'editor\', \'publisher\', \'manager\')',
30
30
  user_id: user.id])).where('pageflow_memberships_2.entity_id IS NOT NULL')
31
31
  end
32
32
  end
@@ -19,9 +19,9 @@ module Pageflow
19
19
  private
20
20
 
21
21
  def permissions_appropriate
22
- sanitize_sql_array(['pageflow_memberships.entity_type = "Pageflow::Account" AND ' \
22
+ sanitize_sql_array(['pageflow_memberships.entity_type = \'Pageflow::Account\' AND ' \
23
23
  'pageflow_memberships.entity_id IN (:managed_account_ids) OR ' \
24
- 'pageflow_memberships.entity_type = "Pageflow::Entry" AND ' \
24
+ 'pageflow_memberships.entity_type = \'Pageflow::Entry\' AND ' \
25
25
  'pageflow_memberships.entity_id IN (:common_entry_ids) OR '\
26
26
  'pageflow_memberships.user_id = :user_id',
27
27
  managed_account_ids: managed_account_ids,
@@ -25,8 +25,8 @@ module Pageflow
25
25
  'pageflow_memberships.user_id = :user_id AND ' \
26
26
  'pageflow_themings.account_id IN (:accounts_ids) AND ' \
27
27
  'pageflow_memberships.entity_id IN (:accounts_ids) AND ' \
28
- 'pageflow_memberships.entity_type = "Pageflow::Account" AND ' \
29
- 'pageflow_memberships.role IN ("publisher", "manager")',
28
+ 'pageflow_memberships.entity_type = \'Pageflow::Account\' AND ' \
29
+ 'pageflow_memberships.role IN (\'publisher\', \'manager\')',
30
30
  user_id: user.id, accounts_ids: accounts_ids])
31
31
  end
32
32
 
@@ -16,7 +16,7 @@ module Pageflow
16
16
  .new(@user, Account).member_addable.map(&:id)
17
17
 
18
18
  scope.joins(:memberships)
19
- .where('pageflow_memberships.entity_type = "Pageflow::Account"')
19
+ .where('pageflow_memberships.entity_type = \'Pageflow::Account\'')
20
20
  .where(membership_in_managed_account(manager_accounts_ids)).distinct
21
21
  end
22
22
  end
@@ -1,3 +1,10 @@
1
1
  json.call(video_file, :width, :height, :duration_in_ms)
2
2
  json.created_at video_file.created_at.try(:utc).try(:iso8601, 0)
3
- json.variants video_file.present_outputs + [:poster_medium, :poster_large, :poster_ultra, :print]
3
+
4
+ variants = (video_file.present_outputs + [:poster_medium, :poster_large, :poster_ultra, :print])
5
+
6
+ # Use JBuilder's private _key method to use format variants according
7
+ # to current key format (camel case/underscored). This ensures
8
+ # variants are consistent with the keys generated by
9
+ # ConfigHelper#config_file_url_templates_seed.
10
+ json.variants(variants.map { |varaint| json.__send__(:_key, varaint) })
@@ -1140,13 +1140,30 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
1140
1140
  * A text that will be appended to the translation based inline
1141
1141
  * text.
1142
1142
  *
1143
- * @param {boolean} [options.disabled]
1144
- * Render input as disabled.
1143
+ * @param {string|string[]} [options.disabledBinding]
1144
+ * Name of an attribute to control whether the input is disabled. If
1145
+ * the `disabled` and `disabledBinding` options are not set,
1146
+ * input will be disabled whenever this attribute has a truthy value.
1147
+ * When multiple attribute names are passed, the function passed to
1148
+ * the `disabled` option will receive an array of values in the same
1149
+ * order.
1150
+ *
1151
+ * @param {function|boolean} [options.disabled]
1152
+ * Render input as disabled. A Function taking the value of the
1153
+ * `disabledBinding` attribute as parameter. Input will be disabled
1154
+ * only if function returns `true`.
1155
+ *
1156
+ * @param {any} [options.disabledBindingValue]
1157
+ * Input will be disabled whenever the value of the `disabledBinding`
1158
+ * attribute equals the value of this option.
1145
1159
  *
1146
- * @param {string} [options.visibleBinding]
1160
+ * @param {string|string[]} [options.visibleBinding]
1147
1161
  * Name of an attribute to control whether the input is visible. If
1148
1162
  * the `visible` and `visibleBindingValue` options are not set,
1149
1163
  * input will be visible whenever this attribute has a truthy value.
1164
+ * When multiple attribute names are passed, the function passed to
1165
+ * the `visible` option will receive an array of values in the same
1166
+ * order.
1150
1167
  *
1151
1168
  * @param {function|boolean} [options.visible]
1152
1169
  * A Function taking the value of the `visibleBinding` attribute as
@@ -1201,15 +1218,10 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
1201
1218
  this.$el.data('labelText', this.labelText());
1202
1219
  this.$el.data('inlineHelpText', this.inlineHelpText());
1203
1220
  this.ui.labelText.text(this.labelText());
1204
- this.ui.inlineHelp.html(this.inlineHelpText());
1205
-
1206
- if (!this.inlineHelpText()) {
1207
- this.ui.inlineHelp.hide();
1208
- }
1209
-
1221
+ this.updateInlineHelp();
1210
1222
  this.setLabelFor();
1211
- this.updateDisabled();
1212
- this.setupVisibleBinding();
1223
+ this.setupAttributeBinding('disabled', this.updateDisabled);
1224
+ this.setupAttributeBinding('visible', this.updateVisible);
1213
1225
  },
1214
1226
 
1215
1227
  /**
@@ -1224,6 +1236,13 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
1224
1236
  fallbackPrefix: 'activerecord.attributes'
1225
1237
  }));
1226
1238
  },
1239
+ updateInlineHelp: function updateInlineHelp() {
1240
+ this.ui.inlineHelp.html(this.inlineHelpText());
1241
+
1242
+ if (!this.inlineHelpText()) {
1243
+ this.ui.inlineHelp.hide();
1244
+ }
1245
+ },
1227
1246
 
1228
1247
  /**
1229
1248
  * The inline help text for the form field.
@@ -1234,7 +1253,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
1234
1253
  fallbackPrefix: 'pageflow.ui.inline_help'
1235
1254
  });
1236
1255
 
1237
- if (this.options.disabled) {
1256
+ if (this.isDisabled()) {
1238
1257
  keys = translationKeysWithSuffix(keys, 'disabled');
1239
1258
  }
1240
1259
 
@@ -1250,40 +1269,61 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
1250
1269
  this.ui.label.attr('for', id);
1251
1270
  }
1252
1271
  },
1272
+ isDisabled: function isDisabled() {
1273
+ return this.getAttributeBoundOption('disabled');
1274
+ },
1253
1275
  updateDisabled: function updateDisabled() {
1276
+ this.updateInlineHelp();
1277
+
1254
1278
  if (this.ui.input) {
1255
1279
  this.updateDisabledAttribute(this.ui.input);
1256
1280
  }
1257
1281
  },
1258
1282
  updateDisabledAttribute: function updateDisabledAttribute(element) {
1259
- if (this.options.disabled) {
1283
+ if (this.isDisabled()) {
1260
1284
  element.attr('disabled', true);
1261
1285
  } else {
1262
1286
  element.removeAttr('disabled');
1263
1287
  }
1264
1288
  },
1265
- setupVisibleBinding: function setupVisibleBinding() {
1289
+ updateVisible: function updateVisible() {
1290
+ this.$el.toggleClass('input-hidden_via_binding', this.getAttributeBoundOption('visible') === false);
1291
+ },
1292
+ setupAttributeBinding: function setupAttributeBinding(optionName, updateMethod) {
1293
+ var _this = this;
1294
+
1295
+ var binding = this.options["".concat(optionName, "Binding")];
1266
1296
  var view = this;
1267
1297
 
1268
- if (this.options.visibleBinding) {
1269
- this.listenTo(this.model, 'change:' + this.options.visibleBinding, updateVisible);
1270
- updateVisible(this.model, this.model.get(this.options.visibleBinding));
1298
+ if (binding) {
1299
+ _.flatten([binding]).forEach(function (attribute) {
1300
+ _this.listenTo(_this.model, 'change:' + attribute, update);
1301
+ });
1271
1302
  }
1272
1303
 
1273
- function updateVisible(model, value) {
1274
- view.$el.toggleClass('input-hidden_via_binding', !isVisible(value));
1304
+ update();
1305
+
1306
+ function update() {
1307
+ updateMethod.call(view, view.getAttributeBoundOption(optionName));
1275
1308
  }
1309
+ },
1310
+ getAttributeBoundOption: function getAttributeBoundOption(optionName) {
1311
+ var _this2 = this;
1276
1312
 
1277
- function isVisible(value) {
1278
- if ('visibleBindingValue' in view.options) {
1279
- return value === view.options.visibleBindingValue;
1280
- } else if (typeof view.options.visible === 'function') {
1281
- return !!view.options.visible(value);
1282
- } else if ('visible' in view.options) {
1283
- return !!view.options.visible;
1284
- } else {
1285
- return !!value;
1286
- }
1313
+ var binding = this.options["".concat(optionName, "Binding")];
1314
+ var bindingValueOptionName = "".concat(optionName, "BindingValue");
1315
+ var value = Array.isArray(binding) ? binding.map(function (attribute) {
1316
+ return _this2.model.get(attribute);
1317
+ }) : this.model.get(binding);
1318
+
1319
+ if (bindingValueOptionName in this.options) {
1320
+ return value === this.options[bindingValueOptionName];
1321
+ } else if (typeof this.options[optionName] === 'function') {
1322
+ return !!this.options[optionName](value);
1323
+ } else if (optionName in this.options) {
1324
+ return !!this.options[optionName];
1325
+ } else if (binding) {
1326
+ return !!value;
1287
1327
  }
1288
1328
  }
1289
1329
  };
@@ -1434,11 +1474,14 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
1434
1474
  this.listenTo(this.model, 'change:' + this.options.placeholderBinding, this.updatePlaceholder);
1435
1475
  }
1436
1476
  },
1477
+ updateDisabled: function updateDisabled() {
1478
+ this.updatePlaceholder();
1479
+ },
1437
1480
  updatePlaceholder: function updatePlaceholder() {
1438
1481
  this.ui.input.attr('placeholder', this.placeholderText());
1439
1482
  },
1440
1483
  placeholderText: function placeholderText() {
1441
- if (!this.options.disabled || !this.options.hidePlaceholderIfDisabled) {
1484
+ if (!this.isDisabled() || !this.options.hidePlaceholderIfDisabled) {
1442
1485
  if (this.options.placeholder) {
1443
1486
  if (typeof this.options.placeholder == 'function') {
1444
1487
  return this.options.placeholder(this.model);
@@ -1449,6 +1492,8 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
1449
1492
  return this.placeholderModelValue();
1450
1493
  }
1451
1494
  }
1495
+
1496
+ return '';
1452
1497
  },
1453
1498
  placeholderModelValue: function placeholderModelValue() {
1454
1499
  return this.options.placeholderModel && this.options.placeholderModel.get(this.options.propertyName);
@@ -1600,12 +1645,22 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
1600
1645
  this.updateSettings();
1601
1646
  },
1602
1647
  updateSettings: function updateSettings() {
1648
+ this.resetSwatchesInStoredSettings();
1603
1649
  this.ui.input.minicolors('settings', {
1604
1650
  defaultValue: this.defaultValue(),
1605
1651
  swatches: this.getSwatches()
1606
1652
  });
1607
1653
  this.load();
1608
1654
  },
1655
+ // see https://github.com/claviska/jquery-minicolors/issues/287
1656
+ resetSwatchesInStoredSettings: function resetSwatchesInStoredSettings() {
1657
+ var settings = this.ui.input.data('minicolors-settings');
1658
+
1659
+ if (settings) {
1660
+ delete settings.swatches;
1661
+ this.ui.input.data('minicolors-settings', settings);
1662
+ }
1663
+ },
1609
1664
  load: function load() {
1610
1665
  this.ui.input.minicolors('value', this.model.get(this.options.propertyName) || this.defaultValue());
1611
1666
  this.$el.toggleClass('is_default', !this.model.has(this.options.propertyName));
@@ -2430,6 +2485,15 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
2430
2485
  });
2431
2486
  this.load();
2432
2487
  },
2488
+ updateDisabled: function updateDisabled(disabled) {
2489
+ this.$el.toggleClass('disabled', !!disabled);
2490
+
2491
+ if (disabled) {
2492
+ this.ui.widget.slider('disable');
2493
+ } else {
2494
+ this.ui.widget.slider('enable');
2495
+ }
2496
+ },
2433
2497
  save: function save() {
2434
2498
  var value = this.ui.widget.slider('option', 'value');
2435
2499
  var unit = 'unit' in this.options ? this.options.unit : '%';
@@ -2554,8 +2618,11 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
2554
2618
  this.load();
2555
2619
  this.listenTo(this.model, 'change:' + this.options.propertyName, this.load);
2556
2620
  },
2621
+ updateDisabled: function updateDisabled() {
2622
+ this.load();
2623
+ },
2557
2624
  save: function save() {
2558
- if (!this.options.disabled) {
2625
+ if (!this.isDisabled()) {
2559
2626
  this.model.set(this.options.propertyName, this.ui.input.is(':checked'));
2560
2627
  }
2561
2628
  },
@@ -2565,7 +2632,7 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
2565
2632
  }
2566
2633
  },
2567
2634
  displayValue: function displayValue() {
2568
- if (this.options.disabled && this.options.displayUncheckedIfDisabled) {
2635
+ if (this.isDisabled() && this.options.displayUncheckedIfDisabled) {
2569
2636
  return false;
2570
2637
  } else {
2571
2638
  return this.model.get(this.options.propertyName);
@@ -4000,10 +4067,10 @@ var pageflow_paged = (function (exports, Backbone, _, Marionette, $, I18n$1, Chi
4000
4067
  I18n$1.translations = window.I18n.translations;
4001
4068
  $(function () {
4002
4069
  editor.ensureBrowserSupport(function () {
4003
- $.when($.getJSON('/editor/entries/' + options.entryId + '/seed'), frontend.browser.detectFeatures()).done(function (result) {
4004
- app.start(result[0]);
4005
- }).fail(function () {
4006
- alert('Error while starting editor.');
4070
+ Promise.all([$.getJSON('/editor/entries/' + options.entryId + '/seed'), frontend.browser.detectFeatures()]).then(function (result) {
4071
+ return app.start(result[0]);
4072
+ }, function () {
4073
+ return alert('Error while starting editor.');
4007
4074
  });
4008
4075
  });
4009
4076
  });
@@ -382,7 +382,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
382
382
  (module.exports = function (key, value) {
383
383
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
384
384
  })('versions', []).push({
385
- version: '3.6.4',
385
+ version: '3.6.5',
386
386
  mode: 'global',
387
387
  copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
388
388
  });
@@ -1318,7 +1318,13 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
1318
1318
  defer = functionBindContext(port.postMessage, port, 1);
1319
1319
  // Browsers with postMessage, skip WebWorkers
1320
1320
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1321
- } else if (global_1.addEventListener && typeof postMessage == 'function' && !global_1.importScripts && !fails(post)) {
1321
+ } else if (
1322
+ global_1.addEventListener &&
1323
+ typeof postMessage == 'function' &&
1324
+ !global_1.importScripts &&
1325
+ !fails(post) &&
1326
+ location$1.protocol !== 'file:'
1327
+ ) {
1322
1328
  defer = post;
1323
1329
  global_1.addEventListener('message', listener, false);
1324
1330
  // IE8-
@@ -3295,6 +3301,9 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
3295
3301
  browser.feature('mse and native hls support', function (has) {
3296
3302
  return agent.matchesSafari() && !agent.matchesMobilePlatform();
3297
3303
  });
3304
+ browser.feature('hls support', function (has) {
3305
+ return agent.matchesSafari() || agent.matchesMobilePlatform();
3306
+ });
3298
3307
  browser.feature('native video player', function (has) {
3299
3308
  return has('iphone platform');
3300
3309
  });
@@ -4347,6 +4356,10 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
4347
4356
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
4348
4357
  }
4349
4358
 
4359
+ if (typeof window !== 'undefined') {
4360
+ window.VIDEOJS_NO_DYNAMIC_STYLE = true;
4361
+ }
4362
+
4350
4363
  var filterSources = function filterSources(playerElement) {
4351
4364
  if (playerElement.tagName.toLowerCase() !== 'video') {
4352
4365
  return playerElement;
@@ -4692,12 +4705,6 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
4692
4705
  return player;
4693
4706
  };
4694
4707
 
4695
- if (VideoJS.Html5DashJS) {
4696
- VideoJS.Html5DashJS.hook('beforeinitialize', function (player, mediaPlayer) {
4697
- mediaPlayer.getDebug().setLogToBrowserConsole(false);
4698
- });
4699
- }
4700
-
4701
4708
  VideoPlayer.useSlimPlayerControlsDuringPhonePlayback = useSlimPlayerControlsDuringPhonePlayback;
4702
4709
  VideoPlayer.prebuffering = prebuffering;
4703
4710
  VideoPlayer.filterSources = filterSources;
@@ -4764,8 +4771,14 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
4764
4771
  var BLANK_AUDIO_SRC = 'data:audio/wav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MYX' + 'ZmNTUuMzMuMTAw';
4766
4773
  var blankSources = {
4767
- 'audio': BLANK_AUDIO_SRC,
4768
- 'video': BLANK_VIDEO_SRC
4774
+ audio: {
4775
+ src: BLANK_AUDIO_SRC,
4776
+ type: 'audio/wav'
4777
+ },
4778
+ video: {
4779
+ src: BLANK_VIDEO_SRC,
4780
+ type: 'video/mp4'
4781
+ }
4769
4782
  };
4770
4783
  /** @const @enum {string} */
4771
4784
 
@@ -4816,7 +4829,8 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
4816
4829
  _ref$loop = _ref.loop,
4817
4830
  loop = _ref$loop === void 0 ? false : _ref$loop,
4818
4831
  _ref$controls = _ref.controls,
4819
- controls = _ref$controls === void 0 ? false : _ref$controls;
4832
+ controls = _ref$controls === void 0 ? false : _ref$controls,
4833
+ altText = _ref.altText;
4820
4834
  var player = undefined;
4821
4835
 
4822
4836
  if (!this.unAllocatedPlayers[playerType]) {
@@ -4832,6 +4846,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
4832
4846
  if (player) {
4833
4847
  player.pause();
4834
4848
  player.getMediaElement().loop = loop;
4849
+ player.getMediaElement().setAttribute('alt', altText);
4835
4850
  player.poster(poster);
4836
4851
  player.controls(controls);
4837
4852
 
@@ -4864,7 +4879,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
4864
4879
  player.controls(false);
4865
4880
  player.getMediaElement().loop = false;
4866
4881
  player.playsinline(false);
4867
- player.getMediaElement().setAttribute('src', blankSources[type]);
4882
+ player.src(blankSources[type]);
4868
4883
  player.poster('');
4869
4884
  clearTextTracks(player);
4870
4885
  this.unAllocatedPlayers[type].push(player);
@@ -4935,7 +4950,7 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
4935
4950
  mediaElement: mediaEl,
4936
4951
  tagName: type
4937
4952
  });
4938
- mediaEl.setAttribute('src', blankSources[type]);
4953
+ mediaEl.setAttribute('src', blankSources[type].src);
4939
4954
  this.unAllocatedPlayers[type].push(player);
4940
4955
  return player;
4941
4956
  }
@@ -5194,6 +5209,14 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
5194
5209
  this[id] = sources;
5195
5210
  },
5196
5211
  get: function get(sourceID) {
5212
+ if (!this[sourceID]) {
5213
+ return new AudioPlayer.Null();
5214
+ }
5215
+
5216
+ if (this.current && this.current.playerId === sourceID) {
5217
+ return this.current;
5218
+ }
5219
+
5197
5220
  if (this.previous && this.previous.playerId === sourceID) {
5198
5221
  var holder = this.current;
5199
5222
  this.current = this.previous;
@@ -9144,14 +9167,18 @@ this.pageflow_paged.frontend = (function (exports, jqueryUi, $, Backbone, _, Vid
9144
9167
  }
9145
9168
  };
9146
9169
 
9170
+ if (VideoJS.Html5DashJS) {
9171
+ VideoJS.Html5DashJS.hook('beforeinitialize', function (player, mediaPlayer) {
9172
+ mediaPlayer.getDebug().setLogToBrowserConsole(false);
9173
+ });
9174
+ }
9175
+
9147
9176
  VideoPlayer.Lazy = Lazy;
9148
9177
 
9149
9178
  exports.AdjacentPreloader = AdjacentPreloader;
9150
9179
  exports.Atmo = Atmo;
9151
9180
  exports.Audio = Audio;
9152
9181
  exports.AudioPlayer = AudioPlayer;
9153
- exports.BLANK_AUDIO_SRC = BLANK_AUDIO_SRC;
9154
- exports.BLANK_VIDEO_SRC = BLANK_VIDEO_SRC;
9155
9182
  exports.ChapterFilter = ChapterFilter;
9156
9183
  exports.DelayedStart = DelayedStart;
9157
9184
  exports.DomOrderScrollNavigator = DomOrderScrollNavigator;