pageflow 16.0.0 → 16.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +86 -33
  3. data/README.md +6 -6
  4. data/Rakefile +1 -1
  5. data/admins/pageflow/entry.rb +0 -1
  6. data/admins/pageflow/sites.rb +3 -0
  7. data/app/assets/images/pageflow/admin/icons/published_with_noindex.svg +4 -0
  8. data/app/assets/javascripts/pageflow/dist/ui.js +299 -72
  9. data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +1 -1
  10. data/app/assets/stylesheets/pageflow/admin/entries.scss +4 -0
  11. data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +10 -0
  12. data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +4 -0
  13. data/app/assets/stylesheets/pageflow/editor/base.scss +0 -1
  14. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +61 -7
  15. data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +12 -1
  16. data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +4 -0
  17. data/app/assets/stylesheets/pageflow/editor/help.scss +3 -3
  18. data/app/assets/stylesheets/pageflow/editor/info_box.scss +7 -0
  19. data/app/assets/stylesheets/pageflow/editor/inputs/file_input.scss +0 -5
  20. data/app/assets/stylesheets/pageflow/ui/forms.scss +4 -4
  21. data/app/assets/stylesheets/pageflow/{editor/wysihtml5.scss → ui/input/text_area_input.scss} +13 -1
  22. data/app/assets/stylesheets/pageflow/ui.scss +1 -0
  23. data/app/controllers/pageflow/chapters_controller.rb +2 -2
  24. data/app/controllers/pageflow/editor/entry_publications_controller.rb +5 -1
  25. data/app/controllers/pageflow/editor/file_import_controller.rb +1 -1
  26. data/app/controllers/pageflow/editor/files_controller.rb +1 -1
  27. data/app/controllers/pageflow/entries_controller.rb +12 -2
  28. data/app/controllers/pageflow/feeds_controller.rb +18 -0
  29. data/app/controllers/pageflow/pages_controller.rb +2 -2
  30. data/app/controllers/pageflow/sitemaps_controller.rb +15 -0
  31. data/app/controllers/pageflow/storylines_controller.rb +2 -2
  32. data/app/helpers/pageflow/entries_helper.rb +4 -1
  33. data/app/helpers/pageflow/feeds_helper.rb +66 -0
  34. data/app/helpers/pageflow/meta_tags_helper.rb +2 -1
  35. data/app/helpers/pageflow/page_types_helper.rb +10 -10
  36. data/app/helpers/pageflow/revision_file_helper.rb +3 -3
  37. data/app/helpers/pageflow/social_share_helper.rb +2 -2
  38. data/app/inputs/pageflow_permalink_input.rb +15 -3
  39. data/app/models/concerns/pageflow/entry_publication_states.rb +9 -0
  40. data/app/models/concerns/pageflow/reusable_file.rb +3 -3
  41. data/app/models/concerns/pageflow/uploadable_file.rb +5 -0
  42. data/app/models/pageflow/account.rb +8 -0
  43. data/app/models/pageflow/audio_file_url_templates.rb +2 -1
  44. data/app/models/pageflow/draft_entry.rb +1 -1
  45. data/app/models/pageflow/entries_feed.rb +32 -0
  46. data/app/models/pageflow/entry.rb +7 -5
  47. data/app/models/pageflow/entry_at_revision.rb +2 -0
  48. data/app/models/pageflow/image_file.rb +34 -8
  49. data/app/models/pageflow/image_file_url_templates.rb +7 -1
  50. data/app/models/pageflow/membership.rb +3 -2
  51. data/app/models/pageflow/other_file.rb +5 -0
  52. data/app/models/pageflow/other_file_url_templates.rb +16 -0
  53. data/app/models/pageflow/published_entry.rb +6 -0
  54. data/app/models/pageflow/revision.rb +6 -0
  55. data/app/models/pageflow/site.rb +8 -0
  56. data/app/models/pageflow/sitemaps.rb +14 -0
  57. data/app/models/pageflow/used_file.rb +10 -2
  58. data/app/models/pageflow/video_file_url_templates.rb +3 -1
  59. data/app/models/pageflow/widget.rb +9 -1
  60. data/app/views/admin/entries/_permalink_inputs.html.erb +1 -2
  61. data/app/views/admin/sites/_attributes_table.html.arb +3 -0
  62. data/app/views/admin/sites/_fields.html.erb +6 -0
  63. data/app/views/components/pageflow/admin/extensible_attributes_table.rb +2 -2
  64. data/app/views/components/pageflow/admin/revisions_tab.rb +8 -0
  65. data/app/views/components/pageflow/admin/sites_tab.rb +3 -0
  66. data/app/views/pageflow/editor/config/_seeds.json.jbuilder +2 -0
  67. data/app/views/pageflow/editor/entries/_entry.json.jbuilder +1 -0
  68. data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +1 -0
  69. data/app/views/pageflow/feeds/index.atom.builder +20 -0
  70. data/app/views/pageflow/image_files/_image_file.json.jbuilder +1 -0
  71. data/app/views/pageflow/meta_tags/_entry.html.erb +1 -0
  72. data/app/views/pageflow/sitemaps/index.xml.builder +9 -0
  73. data/config/initializers/features.rb +3 -0
  74. data/config/initializers/paperclip.rb +8 -0
  75. data/config/locales/de.yml +77 -6
  76. data/config/locales/en.yml +79 -4
  77. data/config/routes.rb +3 -0
  78. data/config/spring.rb +1 -1
  79. data/db/migrate/20230120092923_create_other_files.rb +23 -0
  80. data/db/migrate/20230323115745_add_feeds_enabled_to_sites.rb +5 -0
  81. data/db/migrate/20230323154323_add_sitemap_enabled_to_sites.rb +5 -0
  82. data/db/migrate/20230331103823_add_title_to_sites.rb +5 -0
  83. data/db/migrate/20230405103612_add_custom_feed_url_to_sites.rb +5 -0
  84. data/db/migrate/20231024062501_add_output_presences_to_image_files.rb +5 -0
  85. data/db/migrate/20231128124523_add_noindex_to_revisions.rb +5 -0
  86. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +710 -259
  87. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +34 -5
  88. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +1 -1
  89. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +1 -1
  90. data/entry_types/paged/app/controllers/pageflow_paged/editor/entries_controller.rb +0 -2
  91. data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +2 -1
  92. data/entry_types/paged/app/views/pageflow_paged/entries/show.html.erb +1 -0
  93. data/entry_types/paged/config/initializers/features.rb +0 -1
  94. data/entry_types/paged/lib/pageflow_paged/engine.rb +13 -1
  95. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +2 -2
  96. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +3 -4
  97. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +13 -6
  98. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +11 -3
  99. data/entry_types/scrolled/app/helpers/pageflow_scrolled/cache_helper.rb +11 -0
  100. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/entry_json_seed_helper.rb +42 -0
  101. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +8 -5
  102. data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +17 -12
  103. data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +9 -1
  104. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +1 -1
  105. data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +23 -0
  106. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -1
  107. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_seed.json.jbuilder +1 -5
  108. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/sections/_section_with_content_elements.json.jbuilder +10 -0
  109. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +44 -41
  110. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_consent_vendors.json.jbuilder +16 -0
  111. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +7 -0
  112. data/entry_types/scrolled/config/initializers/features.rb +5 -0
  113. data/entry_types/scrolled/config/locales/consent_widget.de.yml +4 -0
  114. data/entry_types/scrolled/config/locales/consent_widget.en.yml +4 -0
  115. data/entry_types/scrolled/config/locales/de.yml +225 -8
  116. data/entry_types/scrolled/config/locales/en.yml +239 -2
  117. data/entry_types/scrolled/config/routes.rb +4 -0
  118. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +69 -44
  119. data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +2 -1
  120. data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +1 -1
  121. data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +96 -0
  122. data/entry_types/scrolled/lib/pageflow_scrolled/content_element_consent_vendors.rb +38 -0
  123. data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +13 -1
  124. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +30 -0
  125. data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +6 -1
  126. data/entry_types/scrolled/lib/pageflow_scrolled/web_app_manifest.rb +1 -1
  127. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +1 -1
  128. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +1 -2
  129. data/entry_types/scrolled/package/config/webpack.js +26 -0
  130. data/entry_types/scrolled/package/contentElements-editor.js +330 -32
  131. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  132. data/entry_types/scrolled/package/contentElements-frontend.js +920 -145
  133. data/entry_types/scrolled/package/editor.js +819 -239
  134. data/entry_types/scrolled/package/frontend/{EditableInlineText.module-14c7b097.js → EditableInlineText.module-6ee0e024.js} +1975 -1792
  135. data/entry_types/scrolled/package/frontend/PhonePlatformContext-b28d991a.js +32 -0
  136. data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-8242f213.js +107 -0
  137. data/entry_types/scrolled/package/frontend/Viewer-32cd1ac1.js +154 -0
  138. data/entry_types/scrolled/package/frontend/{Viewer-b6becc57.js → Viewer-6e4d14ed.js} +32 -161
  139. data/entry_types/scrolled/package/frontend/arrowRight-e42e6011.js +77 -0
  140. data/entry_types/scrolled/package/frontend/{components-b3160dd7.js → components-24363f97.js} +188 -47
  141. data/entry_types/scrolled/package/frontend/{PhonePlatformContext-f6093cc6.js → i18n-71c39823.js} +191 -111
  142. data/entry_types/scrolled/package/frontend/index-fc4b13e6.js +118 -0
  143. data/entry_types/scrolled/package/frontend/index.css +1 -1
  144. data/entry_types/scrolled/package/frontend/index.js +252 -76
  145. data/entry_types/scrolled/package/frontend/useContentElementEditorState-245f1986.js +52 -0
  146. data/entry_types/scrolled/package/package.json +6 -4
  147. data/entry_types/scrolled/package/testHelpers.js +11 -2
  148. data/entry_types/scrolled/package/values/colors.module.css +15 -0
  149. data/entry_types/scrolled/package/widgets/consentBar.css +1 -0
  150. data/entry_types/scrolled/package/widgets/consentBar.js +426 -0
  151. data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
  152. data/entry_types/scrolled/package/widgets/defaultNavigation.js +39 -4
  153. data/entry_types/scrolled/package/widgets/iconInlineFileRights.css +1 -0
  154. data/entry_types/scrolled/package/widgets/iconInlineFileRights.js +49 -0
  155. data/entry_types/scrolled/package/widgets/textInlineFileRights.css +1 -0
  156. data/entry_types/scrolled/package/widgets/textInlineFileRights.js +37 -0
  157. data/lib/generators/pageflow/resque/resque_generator.rb +1 -1
  158. data/lib/generators/pageflow/resque/templates/resque.rake +1 -1
  159. data/lib/generators/pageflow/resque/templates/resque.rb +1 -1
  160. data/lib/generators/pageflow/routes/routes_generator.rb +1 -1
  161. data/lib/pageflow/ability_mixin.rb +5 -5
  162. data/lib/pageflow/active_admin_can_can_fix.rb +2 -2
  163. data/lib/pageflow/built_in_file_type.rb +7 -0
  164. data/lib/pageflow/configuration.rb +29 -1
  165. data/lib/pageflow/engine.rb +18 -40
  166. data/lib/pageflow/entry_export_import/revision_serialization.rb +1 -1
  167. data/lib/pageflow/file_type.rb +2 -2
  168. data/lib/pageflow/global_config_api.rb +2 -2
  169. data/lib/pageflow/nested_revision_component.rb +23 -5
  170. data/lib/pageflow/page_type.rb +1 -1
  171. data/lib/pageflow/paperclip_processors/webp.rb +63 -0
  172. data/lib/pageflow/rails_version.rb +19 -0
  173. data/lib/pageflow/seeds.rb +10 -7
  174. data/lib/pageflow/user_mixin.rb +1 -1
  175. data/lib/pageflow/version.rb +1 -1
  176. data/lib/pageflow/widget_types.rb +4 -0
  177. data/package/config/jest/index.js +3 -1
  178. data/package/config/webpack5.js +14 -0
  179. data/package/editor.js +410 -181
  180. data/package/frontend.js +34 -4
  181. data/package/testHelpers.js +1 -1
  182. data/package/ui.js +297 -71
  183. data/spec/factories/entries.rb +34 -3
  184. data/spec/factories/sites.rb +3 -0
  185. data/vendor/assets/javascripts/iscroll.js +4 -7
  186. metadata +118 -80
  187. data/app/helpers/pageflow/admin/permalinks_helper.rb +0 -15
  188. data/entry_types/scrolled/package/frontend/arrowRight-78a7cee4.js +0 -42
@@ -1,5 +1,5 @@
1
1
  this.pageflow = this.pageflow || {};
2
- this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, Backbone, ChildViewContainer, IScroll, jquery_minicolors, wysihtml5, Cocktail) {
2
+ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, Backbone, ChildViewContainer, IScroll, jquery_minicolors, wysihtml5, jqueryUi, Cocktail) {
3
3
  'use strict';
4
4
 
5
5
  Marionette = Marionette && Marionette.hasOwnProperty('default') ? Marionette['default'] : Marionette;
@@ -1067,6 +1067,107 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
1067
1067
  }
1068
1068
  });
1069
1069
 
1070
+ function _defineProperty(obj, key, value) {
1071
+ if (key in obj) {
1072
+ Object.defineProperty(obj, key, {
1073
+ value: value,
1074
+ enumerable: true,
1075
+ configurable: true,
1076
+ writable: true
1077
+ });
1078
+ } else {
1079
+ obj[key] = value;
1080
+ }
1081
+
1082
+ return obj;
1083
+ }
1084
+
1085
+ function ownKeys(object, enumerableOnly) {
1086
+ var keys = Object.keys(object);
1087
+
1088
+ if (Object.getOwnPropertySymbols) {
1089
+ var symbols = Object.getOwnPropertySymbols(object);
1090
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
1091
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1092
+ });
1093
+ keys.push.apply(keys, symbols);
1094
+ }
1095
+
1096
+ return keys;
1097
+ }
1098
+
1099
+ function _objectSpread2(target) {
1100
+ for (var i = 1; i < arguments.length; i++) {
1101
+ var source = arguments[i] != null ? arguments[i] : {};
1102
+
1103
+ if (i % 2) {
1104
+ ownKeys(Object(source), true).forEach(function (key) {
1105
+ _defineProperty(target, key, source[key]);
1106
+ });
1107
+ } else if (Object.getOwnPropertyDescriptors) {
1108
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1109
+ } else {
1110
+ ownKeys(Object(source)).forEach(function (key) {
1111
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1112
+ });
1113
+ }
1114
+ }
1115
+
1116
+ return target;
1117
+ }
1118
+
1119
+ var attributeBinding = {
1120
+ setupBooleanAttributeBinding: function setupBooleanAttributeBinding(optionName, updateMethod) {
1121
+ this.setupAttributeBinding(optionName, updateMethod, Boolean);
1122
+ },
1123
+ getBooleanAttributBoundOption: function getBooleanAttributBoundOption(optionName) {
1124
+ return this.getAttributeBoundOption(optionName, Boolean);
1125
+ },
1126
+ setupAttributeBinding: function setupAttributeBinding(optionName, updateMethod) {
1127
+ var _this = this;
1128
+
1129
+ var normalize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (value) {
1130
+ return value;
1131
+ };
1132
+ var binding = this.options["".concat(optionName, "Binding")];
1133
+ var view = this;
1134
+
1135
+ if (binding) {
1136
+ _.flatten([binding]).forEach(function (attribute) {
1137
+ _this.listenTo(_this.model, 'change:' + attribute, update);
1138
+ });
1139
+ }
1140
+
1141
+ update();
1142
+
1143
+ function update() {
1144
+ updateMethod.call(view, view.getAttributeBoundOption(optionName, normalize));
1145
+ }
1146
+ },
1147
+ getAttributeBoundOption: function getAttributeBoundOption(optionName) {
1148
+ var _this2 = this;
1149
+
1150
+ var normalize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (value) {
1151
+ return value;
1152
+ };
1153
+ var binding = this.options["".concat(optionName, "Binding")];
1154
+ var bindingValueOptionName = "".concat(optionName, "BindingValue");
1155
+ var value = Array.isArray(binding) ? binding.map(function (attribute) {
1156
+ return _this2.model.get(attribute);
1157
+ }) : this.model.get(binding);
1158
+
1159
+ if (bindingValueOptionName in this.options) {
1160
+ return value === this.options[bindingValueOptionName];
1161
+ } else if (typeof this.options[optionName] === 'function') {
1162
+ return normalize(this.options[optionName](value));
1163
+ } else if (optionName in this.options) {
1164
+ return normalize(this.options[optionName]);
1165
+ } else if (binding) {
1166
+ return normalize(value);
1167
+ }
1168
+ }
1169
+ };
1170
+
1070
1171
  /**
1071
1172
  * Mixin for input views handling common concerns like labels,
1072
1173
  * inline help, visiblity and disabling.
@@ -1196,7 +1297,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
1196
1297
  * @mixin
1197
1298
  */
1198
1299
 
1199
- var inputView = {
1300
+ var inputView = _objectSpread2(_objectSpread2({}, attributeBinding), {}, {
1200
1301
  ui: {
1201
1302
  label: 'label',
1202
1303
  labelText: 'label .name',
@@ -1240,8 +1341,8 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
1240
1341
  this.ui.labelText.text(this.labelText());
1241
1342
  this.updateInlineHelp();
1242
1343
  this.setLabelFor();
1243
- this.setupAttributeBinding('disabled', this.updateDisabled);
1244
- this.setupAttributeBinding('visible', this.updateVisible);
1344
+ this.setupBooleanAttributeBinding('disabled', this.updateDisabled);
1345
+ this.setupBooleanAttributeBinding('visible', this.updateVisible);
1245
1346
  },
1246
1347
 
1247
1348
  /**
@@ -1290,7 +1391,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
1290
1391
  }
1291
1392
  },
1292
1393
  isDisabled: function isDisabled() {
1293
- return this.getAttributeBoundOption('disabled');
1394
+ return this.getBooleanAttributBoundOption('disabled');
1294
1395
  },
1295
1396
  updateDisabled: function updateDisabled() {
1296
1397
  this.$el.toggleClass('input-disabled', !!this.isDisabled());
@@ -1308,46 +1409,9 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
1308
1409
  }
1309
1410
  },
1310
1411
  updateVisible: function updateVisible() {
1311
- this.$el.toggleClass('input-hidden_via_binding', this.getAttributeBoundOption('visible') === false);
1312
- },
1313
- setupAttributeBinding: function setupAttributeBinding(optionName, updateMethod) {
1314
- var _this = this;
1315
-
1316
- var binding = this.options["".concat(optionName, "Binding")];
1317
- var view = this;
1318
-
1319
- if (binding) {
1320
- _.flatten([binding]).forEach(function (attribute) {
1321
- _this.listenTo(_this.model, 'change:' + attribute, update);
1322
- });
1323
- }
1324
-
1325
- update();
1326
-
1327
- function update() {
1328
- updateMethod.call(view, view.getAttributeBoundOption(optionName));
1329
- }
1330
- },
1331
- getAttributeBoundOption: function getAttributeBoundOption(optionName) {
1332
- var _this2 = this;
1333
-
1334
- var binding = this.options["".concat(optionName, "Binding")];
1335
- var bindingValueOptionName = "".concat(optionName, "BindingValue");
1336
- var value = Array.isArray(binding) ? binding.map(function (attribute) {
1337
- return _this2.model.get(attribute);
1338
- }) : this.model.get(binding);
1339
-
1340
- if (bindingValueOptionName in this.options) {
1341
- return value === this.options[bindingValueOptionName];
1342
- } else if (typeof this.options[optionName] === 'function') {
1343
- return !!this.options[optionName](value);
1344
- } else if (optionName in this.options) {
1345
- return !!this.options[optionName];
1346
- } else if (binding) {
1347
- return !!value;
1348
- }
1412
+ this.$el.toggleClass('hidden_via_binding', this.getBooleanAttributBoundOption('visible') === false);
1349
1413
  }
1350
- };
1414
+ });
1351
1415
 
1352
1416
  function template$4(data) {
1353
1417
  var __p = '';
@@ -1466,6 +1530,125 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
1466
1530
  }
1467
1531
  });
1468
1532
 
1533
+ function _classCallCheck(instance, Constructor) {
1534
+ if (!(instance instanceof Constructor)) {
1535
+ throw new TypeError("Cannot call a class as a function");
1536
+ }
1537
+ }
1538
+
1539
+ function _defineProperties(target, props) {
1540
+ for (var i = 0; i < props.length; i++) {
1541
+ var descriptor = props[i];
1542
+ descriptor.enumerable = descriptor.enumerable || false;
1543
+ descriptor.configurable = true;
1544
+ if ("value" in descriptor) descriptor.writable = true;
1545
+ Object.defineProperty(target, descriptor.key, descriptor);
1546
+ }
1547
+ }
1548
+
1549
+ function _createClass(Constructor, protoProps, staticProps) {
1550
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1551
+ if (staticProps) _defineProperties(Constructor, staticProps);
1552
+ return Constructor;
1553
+ }
1554
+
1555
+ /**
1556
+ * Input view for a number.
1557
+ *
1558
+ * See {@link inputView} for further options.
1559
+ *
1560
+ * @param {Object} [options]
1561
+ *
1562
+ * @param {string} [options.locale]
1563
+ * Locale used to fomat and parse numbers.
1564
+ *
1565
+ * @class
1566
+ */
1567
+
1568
+ var NumberInputView = Marionette.ItemView.extend({
1569
+ mixins: [inputView],
1570
+ template: function template() {
1571
+ return "\n <label>\n <span class=\"name\"></span>\n <span class=\"inline_help\"></span>\n </label>\n <input type=\"text\" dir=\"auto\" />\n ";
1572
+ },
1573
+ ui: {
1574
+ input: 'input'
1575
+ },
1576
+ events: {
1577
+ 'change': 'onChange'
1578
+ },
1579
+ initialize: function initialize() {
1580
+ this.parser = new NumberParser(this.options.locale);
1581
+ },
1582
+ onRender: function onRender() {
1583
+ this.load();
1584
+ this.listenTo(this.model, 'change:' + this.options.propertyName, this.load);
1585
+ },
1586
+ onChange: function onChange() {
1587
+ this.save();
1588
+ this.load();
1589
+ },
1590
+ onClose: function onClose() {
1591
+ this.save();
1592
+ },
1593
+ save: function save() {
1594
+ var inputValue = this.ui.input.val();
1595
+ this.model.set(this.options.propertyName, this.parser.parse(inputValue) || 0);
1596
+ },
1597
+ load: function load() {
1598
+ var input = this.ui.input;
1599
+ var value = this.model.get(this.options.propertyName) || 0;
1600
+ input.val(value.toLocaleString(this.options.locale, {
1601
+ useGrouping: false
1602
+ }));
1603
+ },
1604
+ displayValidationError: function displayValidationError(message) {
1605
+ this.$el.addClass('invalid');
1606
+ this.ui.input.attr('title', message);
1607
+ },
1608
+ resetValidationError: function resetValidationError(message) {
1609
+ this.$el.removeClass('invalid');
1610
+ this.ui.input.attr('title', '');
1611
+ }
1612
+ });
1613
+
1614
+ var NumberParser = /*#__PURE__*/function () {
1615
+ function NumberParser(locale) {
1616
+ _classCallCheck(this, NumberParser);
1617
+
1618
+ var format = new Intl.NumberFormat(locale);
1619
+ var parts = format.formatToParts(12345.6);
1620
+ var numerals = Array.from({
1621
+ length: 10
1622
+ }).map(function (_, i) {
1623
+ return format.format(i);
1624
+ });
1625
+ var index = new Map(numerals.map(function (d, i) {
1626
+ return [d, i];
1627
+ }));
1628
+ this._group = new RegExp("[".concat(parts.find(function (d) {
1629
+ return d.type === "group";
1630
+ }).value, "]"), "g");
1631
+ this._decimal = new RegExp("[".concat(parts.find(function (d) {
1632
+ return d.type === "decimal";
1633
+ }).value, "]"));
1634
+ this._numeral = new RegExp("[".concat(numerals.join(""), "]"), "g");
1635
+
1636
+ this._index = function (d) {
1637
+ return index.get(d);
1638
+ };
1639
+ }
1640
+
1641
+ _createClass(NumberParser, [{
1642
+ key: "parse",
1643
+ value: function parse(string) {
1644
+ string = string.trim().replace(this._group, "").replace(this._decimal, ".").replace(this._numeral, this._index);
1645
+ return string ? +string : NaN;
1646
+ }
1647
+ }]);
1648
+
1649
+ return NumberParser;
1650
+ }();
1651
+
1469
1652
  /**
1470
1653
  * Text based input view that can display a placeholder.
1471
1654
  *
@@ -1676,11 +1859,15 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
1676
1859
  this.ui.input.minicolors({
1677
1860
  changeDelay: 200,
1678
1861
  change: _.bind(function (color) {
1862
+ this._saving = true;
1863
+
1679
1864
  if (color === this.defaultValue()) {
1680
1865
  this.model.unset(this.options.propertyName);
1681
1866
  } else {
1682
1867
  this.model.set(this.options.propertyName, color);
1683
1868
  }
1869
+
1870
+ this._saving = false;
1684
1871
  }, this)
1685
1872
  });
1686
1873
  this.listenTo(this.model, 'change:' + this.options.propertyName, this.load);
@@ -1709,7 +1896,10 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
1709
1896
  }
1710
1897
  },
1711
1898
  load: function load() {
1712
- this.ui.input.minicolors('value', this.model.get(this.options.propertyName) || this.defaultValue());
1899
+ if (!this._saving) {
1900
+ this.ui.input.minicolors('value', this.model.get(this.options.propertyName) || this.defaultValue());
1901
+ }
1902
+
1713
1903
  this.$el.toggleClass('is_default', !this.model.has(this.options.propertyName));
1714
1904
  },
1715
1905
  refreshPicker: function refreshPicker() {
@@ -2116,6 +2306,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
2116
2306
  var TextAreaInputView = Marionette.ItemView.extend({
2117
2307
  mixins: [inputView, inputWithPlaceholderText],
2118
2308
  template: template$8,
2309
+ className: 'text_area_input',
2119
2310
  ui: {
2120
2311
  input: 'textarea',
2121
2312
  toolbar: '.toolbar',
@@ -2292,21 +2483,6 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
2292
2483
  }
2293
2484
  });
2294
2485
 
2295
- function _defineProperty(obj, key, value) {
2296
- if (key in obj) {
2297
- Object.defineProperty(obj, key, {
2298
- value: value,
2299
- enumerable: true,
2300
- configurable: true,
2301
- writable: true
2302
- });
2303
- } else {
2304
- obj[key] = value;
2305
- }
2306
-
2307
- return obj;
2308
- }
2309
-
2310
2486
  function template$9(data) {
2311
2487
  var __p = '';
2312
2488
  __p += '<label>\n <span class="name"></span>\n <span class="inline_help"></span>\n</label>\n<input type="text" />\n<div class="validation"></div>\n';
@@ -2573,6 +2749,25 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
2573
2749
  *
2574
2750
  * @param {Object} [options]
2575
2751
  *
2752
+ * @param {number} [options.defaultValue]
2753
+ * Defaults value to display if property is not set.
2754
+ *
2755
+ * @param {number} [options.minValue=0]
2756
+ * Value when dragging slider to the very left.
2757
+ *
2758
+ * @param {number} [options.maxValue=100]
2759
+ * Value when dragging slider to the very right.
2760
+ *
2761
+ * @param {string} [options.unit="%"]
2762
+ * Unit to display after value.
2763
+ *
2764
+ * @param {function} [options.displayText]
2765
+ * Function that receives value and returns custom text to display as value.
2766
+ *
2767
+ * @param {boolean} [options.saveOnSlide]
2768
+ * Already update the model while dragging the handle - not only after
2769
+ * handle has been released.
2770
+ *
2576
2771
  * @class
2577
2772
  */
2578
2773
 
@@ -2585,15 +2780,27 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
2585
2780
  value: '.value'
2586
2781
  },
2587
2782
  events: {
2588
- 'slidechange': 'save'
2783
+ 'slidechange': 'save',
2784
+ 'slide': 'handleSlide'
2589
2785
  },
2590
2786
  onRender: function onRender() {
2787
+ var _this = this;
2788
+
2591
2789
  this.ui.widget.slider({
2592
- animate: 'fast',
2593
- min: 'minValue' in this.options ? this.options.minValue : 0,
2594
- max: 'maxValue' in this.options ? this.options.maxValue : 100
2790
+ animate: 'fast'
2791
+ });
2792
+ this.setupAttributeBinding('minValue', function (value) {
2793
+ return _this.updateSliderOption('min', value || 0);
2794
+ });
2795
+ this.setupAttributeBinding('maxValue', function (value) {
2796
+ return _this.updateSliderOption('max', value || 100);
2595
2797
  });
2596
2798
  this.load();
2799
+ this.listenTo(this.model, 'change:' + this.options.propertyName, this.load);
2800
+ },
2801
+ updateSliderOption: function updateSliderOption(name, value) {
2802
+ this.ui.widget.slider('option', name, value);
2803
+ this.updateText(this.ui.widget.slider('value'));
2597
2804
  },
2598
2805
  updateDisabled: function updateDisabled(disabled) {
2599
2806
  this.$el.toggleClass('disabled', !!disabled);
@@ -2604,11 +2811,15 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
2604
2811
  this.ui.widget.slider('enable');
2605
2812
  }
2606
2813
  },
2607
- save: function save() {
2608
- var value = this.ui.widget.slider('option', 'value');
2609
- var unit = 'unit' in this.options ? this.options.unit : '%';
2610
- this.ui.value.text(value + unit);
2611
- this.model.set(this.options.propertyName, value);
2814
+ handleSlide: function handleSlide(event, ui) {
2815
+ this.updateText(ui.value);
2816
+
2817
+ if (this.options.saveOnSlide) {
2818
+ this.save(event, ui);
2819
+ }
2820
+ },
2821
+ save: function save(event, ui) {
2822
+ this.model.set(this.options.propertyName, ui.value);
2612
2823
  },
2613
2824
  load: function load() {
2614
2825
  var value;
@@ -2619,7 +2830,18 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
2619
2830
  value = 'defaultValue' in this.options ? this.options.defaultValue : 0;
2620
2831
  }
2621
2832
 
2622
- this.ui.widget.slider('option', 'value', value);
2833
+ this.ui.widget.slider('option', 'value', this.clampValue(value));
2834
+ this.updateText(value);
2835
+ },
2836
+ clampValue: function clampValue(value) {
2837
+ var min = this.ui.widget.slider('option', 'min');
2838
+ var max = this.ui.widget.slider('option', 'max');
2839
+ return Math.min(max, Math.max(min, value));
2840
+ },
2841
+ updateText: function updateText(value) {
2842
+ var unit = 'unit' in this.options ? this.options.unit : '%';
2843
+ var text = 'displayText' in this.options ? this.options.displayText(value) : value + unit;
2844
+ this.ui.value.text(text);
2623
2845
  }
2624
2846
  });
2625
2847
 
@@ -3013,7 +3235,10 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
3013
3235
  return view;
3014
3236
  },
3015
3237
  appendSubview: function appendSubview(view) {
3016
- return this.$el.append(this.subview(view).el);
3238
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
3239
+ to = _ref.to;
3240
+
3241
+ return (to || this.$el).append(this.subview(view).el);
3017
3242
  },
3018
3243
  onClose: function onClose() {
3019
3244
  if (this.subviews) {
@@ -3082,6 +3307,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
3082
3307
  exports.IconTableCellView = IconTableCellView;
3083
3308
  exports.JsonInputView = JsonInputView;
3084
3309
  exports.LabelOnlyView = LabelOnlyView;
3310
+ exports.NumberInputView = NumberInputView;
3085
3311
  exports.Object = BaseObject;
3086
3312
  exports.PresenceTableCellView = PresenceTableCellView;
3087
3313
  exports.ProxyUrlInputView = ProxyUrlInputView;
@@ -3100,6 +3326,7 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
3100
3326
  exports.TooltipView = TooltipView;
3101
3327
  exports.UrlDisplayView = UrlDisplayView;
3102
3328
  exports.UrlInputView = UrlInputView;
3329
+ exports.attributeBinding = attributeBinding;
3103
3330
  exports.cssModulesUtils = cssModulesUtils;
3104
3331
  exports.i18nUtils = i18nUtils;
3105
3332
  exports.inputView = inputView;
@@ -3111,4 +3338,4 @@ this.pageflow._uiGlobalInterop = (function (exports, Marionette, _, $, I18n$1, B
3111
3338
 
3112
3339
  return exports;
3113
3340
 
3114
- }({}, Backbone.Marionette, _, jQuery, I18n, Backbone, Backbone.ChildViewContainer, IScroll, jQuery, wysihtml5, Cocktail));
3341
+ }({}, Backbone.Marionette, _, jQuery, I18n, Backbone, Backbone.ChildViewContainer, IScroll, jQuery, wysihtml5, jQuery, Cocktail));
@@ -10,7 +10,7 @@
10
10
  display: inline;
11
11
  }
12
12
 
13
- input[type="submit"] {
13
+ [type="submit"] {
14
14
  @include light-button;
15
15
  padding: 12px 17px 10px;
16
16
  margin: 0;
@@ -22,6 +22,10 @@ $pageflow-published-revision-background-color: #beebb8 !default;
22
22
  .publication_state_indicator {
23
23
  height: 17px;
24
24
  }
25
+
26
+ .tooltip_clue {
27
+ display: inline-block;
28
+ }
25
29
  }
26
30
 
27
31
  .legend {
@@ -62,4 +62,14 @@ $pageflow-permalink-input-directory-background-position: null !default;
62
62
  padding-left: 0;
63
63
  flex: 1;
64
64
  }
65
+
66
+ &.no_directories {
67
+ select {
68
+ display: none;
69
+ }
70
+
71
+ input {
72
+ padding-left: $pageflow-permalink-input-directory-padding-left;
73
+ }
74
+ }
65
75
  }
@@ -22,4 +22,8 @@ $pageflow-publication-state-indicator-size: 25px !default;
22
22
  &.published_with_password_protection {
23
23
  background-image: image-url("#{$dir}/published_with_password.svg");
24
24
  }
25
+
26
+ &.published_with_noindex {
27
+ background-image: image-url("#{$dir}/published_with_noindex.svg");
28
+ }
25
29
  }
@@ -77,7 +77,6 @@
77
77
  @import "./info_box";
78
78
  @import "./text_tracks";
79
79
  @import "./static_thumbnails";
80
- @import "./wysihtml5";
81
80
  @import "./notifications";
82
81
  @import "./publish_entry";
83
82
  @import "./other_entry_item";
@@ -10,6 +10,11 @@
10
10
  @include icon-only-button;
11
11
  }
12
12
 
13
+ > button.ellipsis_icon {
14
+ @include fa-ellipsis-v-icon;
15
+ width: 31px;
16
+ }
17
+
13
18
  &.full_width {
14
19
  width: 100%;
15
20
 
@@ -26,7 +31,7 @@
26
31
  @include transition(visibility 100ms, opacity 100ms);
27
32
 
28
33
  position: absolute;
29
- z-index: 1;
34
+ z-index: 6;
30
35
  padding: 1px;
31
36
  border: solid 1px var(--ui-on-surface-color-lighter);
32
37
  border-radius: rounded(sm);
@@ -45,7 +50,8 @@
45
50
  .drop_down_button_item {
46
51
  a,
47
52
  .label {
48
- padding: 7px 15px;
53
+ padding: 5px 15px;
54
+ line-height: 1.75;
49
55
  }
50
56
 
51
57
  a {
@@ -59,6 +65,11 @@
59
65
 
60
66
  .label {
61
67
  cursor: default;
68
+ font-weight: 500;
69
+ }
70
+
71
+ &.is_hidden {
72
+ display: none;
62
73
  }
63
74
 
64
75
  &.is_selectable {
@@ -79,13 +90,56 @@
79
90
  }
80
91
  }
81
92
 
82
- &.is_checked a {
83
- @include background-icon-left($left: 15px, $font-size: 15px);
84
- @include fa-check-icon;
93
+ &.separated {
94
+ border-top: solid 1px var(--ui-on-surface-color-lighter);
95
+ margin-top: 1px;
96
+ padding-top: 1px;
85
97
  }
86
98
 
87
- .drop_down_button_item a {
88
- padding-left: 39px;
99
+ &.has_radio,
100
+ &.has_check_box {
101
+ a {
102
+ display: flex;
103
+ align-items: center;
104
+ justify-content: space-between;
105
+ gap: space(2);
106
+
107
+ &:after {
108
+ content: "";
109
+ flex-shrink: 0;
110
+ display: block;
111
+ box-sizing: border-box;
112
+ border: solid 1px var(--ui-on-surface-color-light);
113
+ width: 1rem;
114
+ height: 1rem;
115
+ }
116
+ }
117
+
118
+ &.is_checked a:after {
119
+ background-color: var(--ui-primary-color);
120
+ background-size: 100% 100%;
121
+ background-position: center;
122
+ }
123
+ }
124
+
125
+ &.has_check_box {
126
+ a:after {
127
+ border-radius: size(1);
128
+ }
129
+
130
+ &.is_checked a:after {
131
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
132
+ }
133
+ }
134
+
135
+ &.has_radio {
136
+ a:after {
137
+ border-radius: 100%;
138
+ }
139
+
140
+ &.is_checked a:after {
141
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
142
+ }
89
143
  }
90
144
 
91
145
  ul {
@@ -22,13 +22,24 @@
22
22
  }
23
23
 
24
24
  td {
25
- padding: 5px 5px 5px 0;
25
+ padding: 5px 0;
26
+ max-width: 0;
26
27
  }
27
28
 
28
29
  a {
29
30
  text-decoration: underline;
30
31
  }
31
32
 
33
+ .value_wrapper {
34
+ display: flex;
35
+ }
36
+
37
+ .value {
38
+ flex: 1;
39
+ overflow: hidden;
40
+ text-overflow: ellipsis;
41
+ }
42
+
32
43
  .edit {
33
44
  @include background-icon-center($font-size: 15px,
34
45
  $color: var(--ui-primary-color-light));