pages_core 3.15.3 → 3.15.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/assets/builds/pages_core/admin-dist.js +1 -1
- data/app/assets/builds/pages_core/admin-dist.js.map +4 -4
- data/app/assets/builds/pages_core/admin.css +378 -253
- data/app/assets/builds/pages_core/mailer.css +41 -6
- data/app/assets/builds/pages_core_fonts/121b837e.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/216e5c23.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/3017b52f.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/489746b9.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/49775483.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/49c9e472.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/4a119645.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/5d56d7a8.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/61ea75a6.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/62cbb778.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/647d26c.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/67764053.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/6bb0fd00.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/6c0194a2.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/71423409.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/7584e61d.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/77bcfa1c.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/7aca0cc5.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/9a09533f.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/a51f5bc8.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/a80b2975.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/a891f617.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/ad6083f3.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/b29a61ff.woff2 +0 -0
- data/app/assets/builds/{fonts/6569749d.ttf → pages_core_fonts/b30b0656.ttf} +0 -0
- data/app/assets/builds/pages_core_fonts/b3a5f48c.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/bc73ee06.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/c38c6d45.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/c5ce0b1f.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/c8d53904.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/ce13c169.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/d43bd0d5.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/e1c7d368.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/e1e8175d.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/e318f796.woff2 +0 -0
- data/app/assets/builds/{fonts/ee32bc60.ttf → pages_core_fonts/e7acb7d9.ttf} +0 -0
- data/app/assets/builds/pages_core_fonts/ee5514c6.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/f4e495e2.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/f736ec65.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/f741c7ba.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/f7767345.woff2 +0 -0
- data/app/assets/builds/pages_core_fonts/fe9eb751.woff2 +0 -0
- data/app/assets/stylesheets/pages_core/admin/components/forms.css +2 -2
- data/app/assets/stylesheets/pages_core/admin/components/header.css +1 -1
- data/app/assets/stylesheets/pages_core/admin/controllers/pages.css +1 -1
- data/app/assets/stylesheets/pages_core/admin/global/fonts.css +38 -38
- data/app/controllers/{pages_core → admin}/admin_controller.rb +1 -3
- data/app/controllers/attachments_controller.rb +40 -0
- data/app/controllers/concerns/pages_core/document_title_controller.rb +16 -0
- data/app/controllers/concerns/pages_core/page_parameters.rb +1 -1
- data/app/controllers/concerns/pages_core/pages/preview_controller.rb +49 -0
- data/app/controllers/concerns/pages_core/pages/rss_controller.rb +43 -0
- data/app/controllers/errors_controller.rb +2 -0
- data/app/controllers/images_controller.rb +13 -0
- data/app/controllers/pages_core/frontend/pages_controller.rb +3 -4
- data/app/controllers/pages_core/frontend_controller.rb +6 -1
- data/app/controllers/pages_core/sitemaps_controller.rb +21 -52
- data/app/helpers/pages_core/admin/image_uploads_helper.rb +1 -1
- data/app/helpers/pages_core/application_helper.rb +0 -3
- data/app/helpers/pages_core/attachments_helper.rb +0 -10
- data/app/helpers/pages_core/feed_tags_helper.rb +31 -0
- data/app/helpers/pages_core/frontend_helper.rb +3 -0
- data/app/helpers/pages_core/head_tags_helper.rb +80 -70
- data/app/helpers/pages_core/page_path_helper.rb +1 -12
- data/app/javascript/components/Attachments/Attachment.tsx +3 -3
- data/app/javascript/components/Attachments/AttachmentEditor.tsx +5 -5
- data/app/javascript/components/Attachments/Deleted.tsx +28 -0
- data/app/javascript/components/Attachments/List.tsx +11 -24
- data/app/javascript/components/Attachments/Placeholder.tsx +0 -2
- data/app/javascript/components/Attachments.tsx +2 -3
- data/app/javascript/components/DateRangeSelect.tsx +13 -10
- data/app/javascript/components/DateTimeSelect.tsx +11 -11
- data/app/javascript/components/EditableImage.tsx +3 -3
- data/app/javascript/components/FileUploadButton.tsx +3 -3
- data/app/javascript/components/ImageCropper/FocalPoint.tsx +10 -14
- data/app/javascript/components/ImageCropper/Image.tsx +19 -25
- data/app/javascript/components/ImageCropper/Toolbar.tsx +27 -26
- data/app/javascript/components/ImageCropper/useContainerSize.ts +25 -0
- data/app/javascript/components/ImageCropper/useCrop.ts +28 -13
- data/app/javascript/components/ImageCropper/useImageCropperContext.ts +13 -0
- data/app/javascript/components/ImageCropper.tsx +24 -83
- data/app/javascript/components/ImageEditor/Form.tsx +25 -28
- data/app/javascript/components/ImageEditor/useImageEditor.ts +63 -0
- data/app/javascript/components/ImageEditor/useImageEditorContext.ts +14 -0
- data/app/javascript/components/ImageEditor.tsx +28 -42
- data/app/javascript/components/ImageGrid/Deleted.tsx +28 -0
- data/app/javascript/components/ImageGrid/DragElement.tsx +5 -5
- data/app/javascript/components/ImageGrid/FilePlaceholder.tsx +0 -2
- data/app/javascript/components/ImageGrid/Grid.tsx +15 -24
- data/app/javascript/components/ImageGrid/GridImage.tsx +4 -4
- data/app/javascript/components/ImageGrid/Placeholder.tsx +2 -4
- data/app/javascript/components/ImageGrid.tsx +2 -4
- data/app/javascript/components/ImageUploader.tsx +5 -5
- data/app/javascript/components/LabelledField.tsx +6 -6
- data/app/javascript/components/Modal.tsx +16 -13
- data/app/javascript/components/PageForm/Block.tsx +3 -3
- data/app/javascript/components/PageForm/Content.tsx +11 -15
- data/app/javascript/components/PageForm/Dates.tsx +3 -11
- data/app/javascript/components/PageForm/Files.tsx +2 -4
- data/app/javascript/components/PageForm/Form.tsx +3 -9
- data/app/javascript/components/PageForm/Images.tsx +2 -4
- data/app/javascript/components/PageForm/LocaleLinks.tsx +4 -11
- data/app/javascript/components/PageForm/Metadata.tsx +8 -13
- data/app/javascript/components/PageForm/Options.tsx +28 -11
- data/app/javascript/components/PageForm/PageDescription.tsx +7 -14
- data/app/javascript/components/PageForm/PathSegment.tsx +5 -10
- data/app/javascript/components/PageForm/TabPanel.tsx +3 -6
- data/app/javascript/components/PageForm/Tabs.tsx +2 -4
- data/app/javascript/components/PageForm/UnconfiguredContent.tsx +7 -12
- data/app/javascript/components/PageForm/pageParams.ts +3 -2
- data/app/javascript/components/PageForm/usePage.ts +1 -46
- data/app/javascript/components/PageForm/usePageFormContext.ts +8 -0
- data/app/javascript/components/PageForm/useTabs.ts +1 -1
- data/app/javascript/components/PageForm/utils.ts +49 -0
- data/app/javascript/components/PageForm.tsx +52 -48
- data/app/javascript/components/PageImages.tsx +1 -3
- data/app/javascript/components/PageTree/Button.tsx +25 -0
- data/app/javascript/components/PageTree/CollapseArrow.tsx +34 -0
- data/app/javascript/components/PageTree/CollapsedLabel.tsx +21 -0
- data/app/javascript/components/PageTree/EditPageName.tsx +68 -0
- data/app/javascript/components/PageTree/Node.tsx +143 -413
- data/app/javascript/components/PageTree/PageName.tsx +6 -4
- data/app/javascript/components/PageTree/StatusLabel.tsx +10 -0
- data/app/javascript/components/PageTree/tree.ts +268 -0
- data/app/javascript/components/PageTree/usePageTree.ts +268 -0
- data/app/javascript/components/PageTree/usePageTreeContext.ts +13 -0
- data/app/javascript/components/PageTree.tsx +194 -214
- data/app/javascript/components/{RichTextToolbarButton.tsx → RichTextArea/ToolbarButton.tsx} +3 -5
- data/app/javascript/components/RichTextArea/actions.ts +106 -0
- data/app/javascript/components/RichTextArea/useMaybeControlledValue.ts +14 -0
- data/app/javascript/components/RichTextArea.tsx +91 -209
- data/app/javascript/components/TagEditor/AddTagForm.tsx +2 -2
- data/app/javascript/components/TagEditor/Editor.tsx +3 -5
- data/app/javascript/components/TagEditor/Tag.tsx +3 -5
- data/app/javascript/components/TagEditor/useTags.ts +7 -4
- data/app/javascript/components/TagEditor.tsx +2 -4
- data/app/javascript/components/Toast.tsx +5 -5
- data/app/javascript/components/drag/draggedOrder.ts +6 -6
- data/app/javascript/components/drag/useDragCollection.ts +21 -25
- data/app/javascript/components/drag/useDragUploader.ts +20 -18
- data/app/javascript/components/drag/useDraggable.ts +3 -3
- data/app/javascript/features/RichText.tsx +0 -1
- data/app/javascript/features/contentTabs.ts +2 -2
- data/app/javascript/stores/useModalStore.ts +1 -1
- data/app/javascript/stores/useToastStore.ts +2 -2
- data/app/javascript/types/Attachments.ts +11 -11
- data/app/javascript/types/Crop.ts +16 -12
- data/app/javascript/types/Drag.ts +21 -23
- data/app/javascript/types/Images.ts +8 -8
- data/app/javascript/types/PageEditor.ts +11 -4
- data/app/javascript/types/Pages.ts +22 -27
- data/app/javascript/types/Tags.ts +5 -6
- data/app/javascript/types/Template.ts +4 -4
- data/app/javascript/types.ts +2 -2
- data/app/models/attachment.rb +5 -9
- data/app/models/autopublisher.rb +1 -1
- data/app/models/concerns/pages_core/page_model/redirectable.rb +1 -2
- data/app/models/concerns/pages_core/page_model/searchable.rb +1 -1
- data/app/models/concerns/pages_core/page_model/status.rb +2 -4
- data/app/models/concerns/pages_core/searchable_document.rb +2 -4
- data/app/models/image.rb +0 -15
- data/app/models/page_builder.rb +4 -6
- data/app/resources/admin/page_resource.rb +2 -2
- data/app/resources/export/page_resource.rb +1 -1
- data/app/services/pages_core/invite_service.rb +1 -2
- data/app/views/layouts/admin.html.erb +1 -0
- data/app/views/pages_core/sitemaps/index.xml.builder +10 -0
- data/config/routes.rb +4 -3
- data/db/migrate/20240917142300_add_skip_index_to_pages.rb +7 -0
- data/lib/pages_core/engine.rb +15 -17
- data/lib/pages_core/sitemap.rb +58 -0
- data/lib/pages_core/templates/configuration_proxy.rb +3 -3
- data/lib/pages_core.rb +7 -4
- data/lib/rails/generators/pages_core/frontend/frontend_generator.rb +2 -2
- data/lib/rails/generators/pages_core/frontend/templates/application.html.erb +13 -5
- data/lib/rails/generators/pages_core/frontend/templates/postcss.config.js +2 -6
- data/lib/rails/generators/pages_core/frontend/templates/stylesheets/components/base.css +3 -1
- data/lib/rails/generators/pages_core/frontend/templates/stylesheets/config.css +2 -3
- data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/animation.css +1 -1
- data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/colors.css +6 -5
- data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/fonts.css +1 -1
- data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/grid.css +9 -6
- data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/typography.css +42 -26
- data/lib/rails/generators/pages_core/install/templates/application_controller.rb +0 -6
- data/lib/rails/generators/pages_core/rspec/templates/rails_helper.rb +1 -1
- metadata +81 -49
- data/app/assets/builds/fonts/7b7db107.woff2 +0 -0
- data/app/assets/builds/fonts/921961e9.woff2 +0 -0
- data/app/controller_dummies/admin/admin_controller.rb +0 -6
- data/app/controller_dummies/application_controller.rb +0 -6
- data/app/controller_dummies/attachments_controller.rb +0 -4
- data/app/controller_dummies/frontend_controller.rb +0 -4
- data/app/controller_dummies/images_controller.rb +0 -4
- data/app/controller_dummies/page_files_controller.rb +0 -4
- data/app/controller_dummies/pages_controller.rb +0 -4
- data/app/controller_dummies/sitemaps_controller.rb +0 -4
- data/app/controllers/concerns/pages_core/preview_pages_controller.rb +0 -47
- data/app/controllers/concerns/pages_core/rss_controller.rb +0 -41
- data/app/controllers/pages_core/attachments_controller.rb +0 -42
- data/app/controllers/pages_core/frontend/page_files_controller.rb +0 -25
- data/app/controllers/pages_core/images_controller.rb +0 -15
- data/app/helpers/pages_core/meta_tags_helper.rb +0 -96
- data/app/helpers/pages_core/open_graph_tags_helper.rb +0 -49
- data/app/javascript/components/PageTree/Draggable.tsx +0 -338
- data/app/javascript/lib/Tree.ts +0 -305
- data/app/javascript/types/Trees.ts +0 -19
- data/app/views/sitemaps/show.xml.builder +0 -11
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pages_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.15.
|
4
|
+
version: 3.15.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Inge Jørgensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: alba
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bcrypt
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -318,32 +318,18 @@ dependencies:
|
|
318
318
|
- - "~>"
|
319
319
|
- !ruby/object:Gem::Version
|
320
320
|
version: '2.5'
|
321
|
-
- !ruby/object:Gem::Dependency
|
322
|
-
name: sass-rails
|
323
|
-
requirement: !ruby/object:Gem::Requirement
|
324
|
-
requirements:
|
325
|
-
- - ">="
|
326
|
-
- !ruby/object:Gem::Version
|
327
|
-
version: '5.0'
|
328
|
-
type: :runtime
|
329
|
-
prerelease: false
|
330
|
-
version_requirements: !ruby/object:Gem::Requirement
|
331
|
-
requirements:
|
332
|
-
- - ">="
|
333
|
-
- !ruby/object:Gem::Version
|
334
|
-
version: '5.0'
|
335
321
|
- !ruby/object:Gem::Dependency
|
336
322
|
name: react-rails
|
337
323
|
requirement: !ruby/object:Gem::Requirement
|
338
324
|
requirements:
|
339
|
-
- - "
|
325
|
+
- - ">"
|
340
326
|
- !ruby/object:Gem::Version
|
341
327
|
version: '2.4'
|
342
328
|
type: :runtime
|
343
329
|
prerelease: false
|
344
330
|
version_requirements: !ruby/object:Gem::Requirement
|
345
331
|
requirements:
|
346
|
-
- - "
|
332
|
+
- - ">"
|
347
333
|
- !ruby/object:Gem::Version
|
348
334
|
version: '2.4'
|
349
335
|
- !ruby/object:Gem::Dependency
|
@@ -384,14 +370,52 @@ files:
|
|
384
370
|
- README.md
|
385
371
|
- Rakefile
|
386
372
|
- VERSION
|
387
|
-
- app/assets/builds/fonts/6569749d.ttf
|
388
|
-
- app/assets/builds/fonts/7b7db107.woff2
|
389
|
-
- app/assets/builds/fonts/921961e9.woff2
|
390
|
-
- app/assets/builds/fonts/ee32bc60.ttf
|
391
373
|
- app/assets/builds/pages_core/admin-dist.js
|
392
374
|
- app/assets/builds/pages_core/admin-dist.js.map
|
393
375
|
- app/assets/builds/pages_core/admin.css
|
394
376
|
- app/assets/builds/pages_core/mailer.css
|
377
|
+
- app/assets/builds/pages_core_fonts/121b837e.woff2
|
378
|
+
- app/assets/builds/pages_core_fonts/216e5c23.woff2
|
379
|
+
- app/assets/builds/pages_core_fonts/3017b52f.woff2
|
380
|
+
- app/assets/builds/pages_core_fonts/489746b9.woff2
|
381
|
+
- app/assets/builds/pages_core_fonts/49775483.woff2
|
382
|
+
- app/assets/builds/pages_core_fonts/49c9e472.woff2
|
383
|
+
- app/assets/builds/pages_core_fonts/4a119645.woff2
|
384
|
+
- app/assets/builds/pages_core_fonts/5d56d7a8.woff2
|
385
|
+
- app/assets/builds/pages_core_fonts/61ea75a6.woff2
|
386
|
+
- app/assets/builds/pages_core_fonts/62cbb778.woff2
|
387
|
+
- app/assets/builds/pages_core_fonts/647d26c.woff2
|
388
|
+
- app/assets/builds/pages_core_fonts/67764053.woff2
|
389
|
+
- app/assets/builds/pages_core_fonts/6bb0fd00.woff2
|
390
|
+
- app/assets/builds/pages_core_fonts/6c0194a2.woff2
|
391
|
+
- app/assets/builds/pages_core_fonts/71423409.woff2
|
392
|
+
- app/assets/builds/pages_core_fonts/7584e61d.woff2
|
393
|
+
- app/assets/builds/pages_core_fonts/77bcfa1c.woff2
|
394
|
+
- app/assets/builds/pages_core_fonts/7aca0cc5.woff2
|
395
|
+
- app/assets/builds/pages_core_fonts/9a09533f.woff2
|
396
|
+
- app/assets/builds/pages_core_fonts/a51f5bc8.woff2
|
397
|
+
- app/assets/builds/pages_core_fonts/a80b2975.woff2
|
398
|
+
- app/assets/builds/pages_core_fonts/a891f617.woff2
|
399
|
+
- app/assets/builds/pages_core_fonts/ad6083f3.woff2
|
400
|
+
- app/assets/builds/pages_core_fonts/b29a61ff.woff2
|
401
|
+
- app/assets/builds/pages_core_fonts/b30b0656.ttf
|
402
|
+
- app/assets/builds/pages_core_fonts/b3a5f48c.woff2
|
403
|
+
- app/assets/builds/pages_core_fonts/bc73ee06.woff2
|
404
|
+
- app/assets/builds/pages_core_fonts/c38c6d45.woff2
|
405
|
+
- app/assets/builds/pages_core_fonts/c5ce0b1f.woff2
|
406
|
+
- app/assets/builds/pages_core_fonts/c8d53904.woff2
|
407
|
+
- app/assets/builds/pages_core_fonts/ce13c169.woff2
|
408
|
+
- app/assets/builds/pages_core_fonts/d43bd0d5.woff2
|
409
|
+
- app/assets/builds/pages_core_fonts/e1c7d368.woff2
|
410
|
+
- app/assets/builds/pages_core_fonts/e1e8175d.woff2
|
411
|
+
- app/assets/builds/pages_core_fonts/e318f796.woff2
|
412
|
+
- app/assets/builds/pages_core_fonts/e7acb7d9.ttf
|
413
|
+
- app/assets/builds/pages_core_fonts/ee5514c6.woff2
|
414
|
+
- app/assets/builds/pages_core_fonts/f4e495e2.woff2
|
415
|
+
- app/assets/builds/pages_core_fonts/f736ec65.woff2
|
416
|
+
- app/assets/builds/pages_core_fonts/f741c7ba.woff2
|
417
|
+
- app/assets/builds/pages_core_fonts/f7767345.woff2
|
418
|
+
- app/assets/builds/pages_core_fonts/fe9eb751.woff2
|
395
419
|
- app/assets/fonts/Inter-Black.woff2
|
396
420
|
- app/assets/fonts/Inter-BlackItalic.woff2
|
397
421
|
- app/assets/fonts/Inter-Bold.woff2
|
@@ -464,15 +488,8 @@ files:
|
|
464
488
|
- app/assets/stylesheets/pages_core/admin/global/typography.css
|
465
489
|
- app/assets/stylesheets/pages_core/admin/vars.css
|
466
490
|
- app/assets/stylesheets/pages_core/mailer.css
|
467
|
-
- app/controller_dummies/admin/admin_controller.rb
|
468
|
-
- app/controller_dummies/application_controller.rb
|
469
|
-
- app/controller_dummies/attachments_controller.rb
|
470
|
-
- app/controller_dummies/frontend_controller.rb
|
471
|
-
- app/controller_dummies/images_controller.rb
|
472
|
-
- app/controller_dummies/page_files_controller.rb
|
473
|
-
- app/controller_dummies/pages_controller.rb
|
474
|
-
- app/controller_dummies/sitemaps_controller.rb
|
475
491
|
- app/controllers/admin/account_recoveries_controller.rb
|
492
|
+
- app/controllers/admin/admin_controller.rb
|
476
493
|
- app/controllers/admin/attachments_controller.rb
|
477
494
|
- app/controllers/admin/calendars_controller.rb
|
478
495
|
- app/controllers/admin/images_controller.rb
|
@@ -483,24 +500,23 @@ files:
|
|
483
500
|
- app/controllers/admin/recovery_codes_controller.rb
|
484
501
|
- app/controllers/admin/sessions_controller.rb
|
485
502
|
- app/controllers/admin/users_controller.rb
|
503
|
+
- app/controllers/attachments_controller.rb
|
486
504
|
- app/controllers/concerns/pages_core/authentication.rb
|
505
|
+
- app/controllers/concerns/pages_core/document_title_controller.rb
|
487
506
|
- app/controllers/concerns/pages_core/error_renderer.rb
|
488
507
|
- app/controllers/concerns/pages_core/error_reporting.rb
|
489
508
|
- app/controllers/concerns/pages_core/page_parameters.rb
|
509
|
+
- app/controllers/concerns/pages_core/pages/preview_controller.rb
|
510
|
+
- app/controllers/concerns/pages_core/pages/rss_controller.rb
|
490
511
|
- app/controllers/concerns/pages_core/policies_helper.rb
|
491
|
-
- app/controllers/concerns/pages_core/preview_pages_controller.rb
|
492
512
|
- app/controllers/concerns/pages_core/process_titler.rb
|
493
513
|
- app/controllers/concerns/pages_core/ranged_response.rb
|
494
|
-
- app/controllers/concerns/pages_core/rss_controller.rb
|
495
514
|
- app/controllers/concerns/pages_core/static_cache_controller.rb
|
496
515
|
- app/controllers/errors_controller.rb
|
497
|
-
- app/controllers/
|
498
|
-
- app/controllers/pages_core/attachments_controller.rb
|
516
|
+
- app/controllers/images_controller.rb
|
499
517
|
- app/controllers/pages_core/base_controller.rb
|
500
|
-
- app/controllers/pages_core/frontend/page_files_controller.rb
|
501
518
|
- app/controllers/pages_core/frontend/pages_controller.rb
|
502
519
|
- app/controllers/pages_core/frontend_controller.rb
|
503
|
-
- app/controllers/pages_core/images_controller.rb
|
504
520
|
- app/controllers/pages_core/sitemaps_controller.rb
|
505
521
|
- app/formatters/pages_core/html_formatter.rb
|
506
522
|
- app/formatters/pages_core/image_embedder.rb
|
@@ -523,20 +539,20 @@ files:
|
|
523
539
|
- app/helpers/pages_core/admin/tag_editor_helper.rb
|
524
540
|
- app/helpers/pages_core/application_helper.rb
|
525
541
|
- app/helpers/pages_core/attachments_helper.rb
|
542
|
+
- app/helpers/pages_core/feed_tags_helper.rb
|
526
543
|
- app/helpers/pages_core/form_builder.rb
|
527
544
|
- app/helpers/pages_core/frontend_helper.rb
|
528
545
|
- app/helpers/pages_core/head_tags_helper.rb
|
529
546
|
- app/helpers/pages_core/images_helper.rb
|
530
547
|
- app/helpers/pages_core/labelled_form_builder.rb
|
531
548
|
- app/helpers/pages_core/locales_helper.rb
|
532
|
-
- app/helpers/pages_core/meta_tags_helper.rb
|
533
|
-
- app/helpers/pages_core/open_graph_tags_helper.rb
|
534
549
|
- app/helpers/pages_core/page_path_helper.rb
|
535
550
|
- app/javascript/admin-dist.ts
|
536
551
|
- app/javascript/components.ts
|
537
552
|
- app/javascript/components/Attachments.tsx
|
538
553
|
- app/javascript/components/Attachments/Attachment.tsx
|
539
554
|
- app/javascript/components/Attachments/AttachmentEditor.tsx
|
555
|
+
- app/javascript/components/Attachments/Deleted.tsx
|
540
556
|
- app/javascript/components/Attachments/List.tsx
|
541
557
|
- app/javascript/components/Attachments/Placeholder.tsx
|
542
558
|
- app/javascript/components/Attachments/useAttachments.ts
|
@@ -548,10 +564,15 @@ files:
|
|
548
564
|
- app/javascript/components/ImageCropper/FocalPoint.tsx
|
549
565
|
- app/javascript/components/ImageCropper/Image.tsx
|
550
566
|
- app/javascript/components/ImageCropper/Toolbar.tsx
|
567
|
+
- app/javascript/components/ImageCropper/useContainerSize.ts
|
551
568
|
- app/javascript/components/ImageCropper/useCrop.ts
|
569
|
+
- app/javascript/components/ImageCropper/useImageCropperContext.ts
|
552
570
|
- app/javascript/components/ImageEditor.tsx
|
553
571
|
- app/javascript/components/ImageEditor/Form.tsx
|
572
|
+
- app/javascript/components/ImageEditor/useImageEditor.ts
|
573
|
+
- app/javascript/components/ImageEditor/useImageEditorContext.ts
|
554
574
|
- app/javascript/components/ImageGrid.tsx
|
575
|
+
- app/javascript/components/ImageGrid/Deleted.tsx
|
555
576
|
- app/javascript/components/ImageGrid/DragElement.tsx
|
556
577
|
- app/javascript/components/ImageGrid/FilePlaceholder.tsx
|
557
578
|
- app/javascript/components/ImageGrid/Grid.tsx
|
@@ -579,14 +600,25 @@ files:
|
|
579
600
|
- app/javascript/components/PageForm/pageParams.ts
|
580
601
|
- app/javascript/components/PageForm/preview.ts
|
581
602
|
- app/javascript/components/PageForm/usePage.ts
|
603
|
+
- app/javascript/components/PageForm/usePageFormContext.ts
|
582
604
|
- app/javascript/components/PageForm/useTabs.ts
|
605
|
+
- app/javascript/components/PageForm/utils.ts
|
583
606
|
- app/javascript/components/PageImages.tsx
|
584
607
|
- app/javascript/components/PageTree.tsx
|
585
|
-
- app/javascript/components/PageTree/
|
608
|
+
- app/javascript/components/PageTree/Button.tsx
|
609
|
+
- app/javascript/components/PageTree/CollapseArrow.tsx
|
610
|
+
- app/javascript/components/PageTree/CollapsedLabel.tsx
|
611
|
+
- app/javascript/components/PageTree/EditPageName.tsx
|
586
612
|
- app/javascript/components/PageTree/Node.tsx
|
587
613
|
- app/javascript/components/PageTree/PageName.tsx
|
614
|
+
- app/javascript/components/PageTree/StatusLabel.tsx
|
615
|
+
- app/javascript/components/PageTree/tree.ts
|
616
|
+
- app/javascript/components/PageTree/usePageTree.ts
|
617
|
+
- app/javascript/components/PageTree/usePageTreeContext.ts
|
588
618
|
- app/javascript/components/RichTextArea.tsx
|
589
|
-
- app/javascript/components/
|
619
|
+
- app/javascript/components/RichTextArea/ToolbarButton.tsx
|
620
|
+
- app/javascript/components/RichTextArea/actions.ts
|
621
|
+
- app/javascript/components/RichTextArea/useMaybeControlledValue.ts
|
590
622
|
- app/javascript/components/TagEditor.tsx
|
591
623
|
- app/javascript/components/TagEditor/AddTagForm.tsx
|
592
624
|
- app/javascript/components/TagEditor/Editor.tsx
|
@@ -602,7 +634,6 @@ files:
|
|
602
634
|
- app/javascript/features/contentTabs.ts
|
603
635
|
- app/javascript/hooks.ts
|
604
636
|
- app/javascript/index.ts
|
605
|
-
- app/javascript/lib/Tree.ts
|
606
637
|
- app/javascript/lib/copyToClipboard.ts
|
607
638
|
- app/javascript/lib/readyHandler.ts
|
608
639
|
- app/javascript/lib/request.ts
|
@@ -618,7 +649,6 @@ files:
|
|
618
649
|
- app/javascript/types/Pages.ts
|
619
650
|
- app/javascript/types/Tags.ts
|
620
651
|
- app/javascript/types/Template.ts
|
621
|
-
- app/javascript/types/Trees.ts
|
622
652
|
- app/jobs/pages_core/autopublish_job.rb
|
623
653
|
- app/jobs/pages_core/sweep_cache_job.rb
|
624
654
|
- app/mailers/admin_mailer.rb
|
@@ -728,7 +758,7 @@ files:
|
|
728
758
|
- app/views/layouts/admin/_toast.html.erb
|
729
759
|
- app/views/layouts/errors.html.erb
|
730
760
|
- app/views/layouts/pages_core/mailer.html.erb
|
731
|
-
- app/views/sitemaps/
|
761
|
+
- app/views/pages_core/sitemaps/index.xml.builder
|
732
762
|
- config/locales/en.yml
|
733
763
|
- config/routes.rb
|
734
764
|
- db/migrate/20111219033112_create_pages_tables.rb
|
@@ -741,6 +771,7 @@ files:
|
|
741
771
|
- db/migrate/20240131140700_change_email_to_citext.rb
|
742
772
|
- db/migrate/20240201160700_remove_persistent_data.rb
|
743
773
|
- db/migrate/20240508145300_remove_categories.rb
|
774
|
+
- db/migrate/20240917142300_add_skip_index_to_pages.rb
|
744
775
|
- lib/pages_core.rb
|
745
776
|
- lib/pages_core/admin_menu_item.rb
|
746
777
|
- lib/pages_core/archive_finder.rb
|
@@ -757,6 +788,7 @@ files:
|
|
757
788
|
- lib/pages_core/pages_plugin.rb
|
758
789
|
- lib/pages_core/plugin.rb
|
759
790
|
- lib/pages_core/pub_sub.rb
|
791
|
+
- lib/pages_core/sitemap.rb
|
760
792
|
- lib/pages_core/static_cache.rb
|
761
793
|
- lib/pages_core/static_cache/null_handler.rb
|
762
794
|
- lib/pages_core/static_cache/page_cache_handler.rb
|
@@ -816,14 +848,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
816
848
|
requirements:
|
817
849
|
- - ">="
|
818
850
|
- !ruby/object:Gem::Version
|
819
|
-
version: 3.
|
851
|
+
version: 3.2.0
|
820
852
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
821
853
|
requirements:
|
822
854
|
- - ">="
|
823
855
|
- !ruby/object:Gem::Version
|
824
856
|
version: '0'
|
825
857
|
requirements: []
|
826
|
-
rubygems_version: 3.5.
|
858
|
+
rubygems_version: 3.5.17
|
827
859
|
signing_key:
|
828
860
|
specification_version: 4
|
829
861
|
summary: Pages Core
|
Binary file
|
Binary file
|
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module PagesCore
|
4
|
-
module PreviewPagesController
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
include PagesCore::PageParameters
|
7
|
-
|
8
|
-
included do
|
9
|
-
before_action :disable_xss_protection, only: %i[preview]
|
10
|
-
end
|
11
|
-
|
12
|
-
def preview?
|
13
|
-
@preview || false
|
14
|
-
end
|
15
|
-
|
16
|
-
def preview
|
17
|
-
render_error 403 unless logged_in?
|
18
|
-
|
19
|
-
@preview = true
|
20
|
-
@page = Page.find_by(id: params[:page_id]) || Page.new
|
21
|
-
@page.readonly!
|
22
|
-
@page.assign_attributes(preview_page_params)
|
23
|
-
|
24
|
-
render_page
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def disable_xss_protection
|
30
|
-
# Disabling this is probably not a good idea,
|
31
|
-
# but the header causes Chrome to choke when being
|
32
|
-
# redirected back after a submit and the page contains an iframe.
|
33
|
-
response.headers["X-XSS-Protection"] = "0"
|
34
|
-
end
|
35
|
-
|
36
|
-
def preview_page_params
|
37
|
-
ActionController::Parameters.new(
|
38
|
-
JSON.parse(params.require(:preview_page))
|
39
|
-
).permit(:id, page_content_attributes).merge(
|
40
|
-
status: 2,
|
41
|
-
published_at: Time.zone.now,
|
42
|
-
locale: content_locale,
|
43
|
-
redirect_to: nil
|
44
|
-
)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module PagesCore
|
4
|
-
module RssController
|
5
|
-
extend ActiveSupport::Concern
|
6
|
-
|
7
|
-
private
|
8
|
-
|
9
|
-
def all_feed_items
|
10
|
-
feeds = Page.enabled_feeds(locale, include_hidden: true)
|
11
|
-
Page.where(parent_page_id: feeds)
|
12
|
-
.order("published_at DESC")
|
13
|
-
.published
|
14
|
-
.localized(locale)
|
15
|
-
end
|
16
|
-
|
17
|
-
def per_page_rss_param(default = 20, max = 1000)
|
18
|
-
return default unless params[:per_page].is_a?(String)
|
19
|
-
|
20
|
-
params[:per_page].to_i.clamp(1, max)
|
21
|
-
end
|
22
|
-
|
23
|
-
def render_page_rss(page, pagination_page = 1)
|
24
|
-
if page.feed_enabled?
|
25
|
-
render_rss(page.pages.paginate(per_page: per_page_rss_param,
|
26
|
-
page: pagination_page)
|
27
|
-
.includes(:image, :author),
|
28
|
-
title: page.name)
|
29
|
-
else
|
30
|
-
render_error 404
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def render_rss(items, title: nil)
|
35
|
-
@title = PagesCore.config.site_name
|
36
|
-
@title += ": #{title}" if title
|
37
|
-
@items = items
|
38
|
-
render template: "feeds/pages", layout: false
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module PagesCore
|
4
|
-
class AttachmentsController < ::ApplicationController
|
5
|
-
include PagesCore::RangedResponse
|
6
|
-
|
7
|
-
before_action :verify_signed_params
|
8
|
-
before_action :find_attachment, only: %i[show download]
|
9
|
-
|
10
|
-
static_cache :show, permanent: true
|
11
|
-
|
12
|
-
def show
|
13
|
-
send_attachment
|
14
|
-
end
|
15
|
-
|
16
|
-
def download
|
17
|
-
send_attachment disposition: "attachment"
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def find_attachment
|
23
|
-
@attachment = Attachment.find(params[:id])
|
24
|
-
end
|
25
|
-
|
26
|
-
def send_attachment(disposition: "inline")
|
27
|
-
unless stale?(etag: @attachment, last_modified: @attachment.updated_at)
|
28
|
-
return
|
29
|
-
end
|
30
|
-
|
31
|
-
send_ranged_data(@attachment.data,
|
32
|
-
filename: @attachment.filename,
|
33
|
-
type: @attachment.content_type,
|
34
|
-
disposition:)
|
35
|
-
end
|
36
|
-
|
37
|
-
def verify_signed_params
|
38
|
-
key = params[:id].to_i.to_s
|
39
|
-
Attachment.verifier.verify(key, params[:digest])
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module PagesCore
|
4
|
-
module Frontend
|
5
|
-
class PageFilesController < ::FrontendController
|
6
|
-
include PagesCore::AttachmentsHelper
|
7
|
-
|
8
|
-
before_action :find_page_file, only: %i[show]
|
9
|
-
|
10
|
-
def show
|
11
|
-
unless stale?(etag: @page_file, last_modified: @page_file.updated_at)
|
12
|
-
return
|
13
|
-
end
|
14
|
-
|
15
|
-
redirect_to attachment_path(@page_file.attachment)
|
16
|
-
end
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
def find_page_file
|
21
|
-
@page_file = PageFile.find(params[:id])
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module PagesCore
|
4
|
-
class ImagesController < ::ApplicationController
|
5
|
-
include DynamicImage::Controller
|
6
|
-
|
7
|
-
static_cache :show, :uncropped, :original, permanent: true
|
8
|
-
|
9
|
-
private
|
10
|
-
|
11
|
-
def model
|
12
|
-
Image
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,96 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module PagesCore
|
4
|
-
module MetaTagsHelper
|
5
|
-
# Sets a default image to use for meta tags. Supports
|
6
|
-
# both paths and Image objects.
|
7
|
-
#
|
8
|
-
# default_meta_image image_path("facebook-share.png")
|
9
|
-
# default_meta_image root_page.image
|
10
|
-
#
|
11
|
-
def default_meta_image(*args)
|
12
|
-
if args.any?
|
13
|
-
@default_meta_image = args.first
|
14
|
-
else
|
15
|
-
@default_meta_image
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
# Returns true if default meta image has been set.
|
20
|
-
def default_meta_image?
|
21
|
-
default_meta_image ? true : false
|
22
|
-
end
|
23
|
-
|
24
|
-
# Sets a description for meta tags.
|
25
|
-
#
|
26
|
-
# meta_description "This is an awesome site"
|
27
|
-
#
|
28
|
-
def meta_description(*args)
|
29
|
-
if args.any?
|
30
|
-
@meta_description = args.first
|
31
|
-
else
|
32
|
-
description = @meta_description
|
33
|
-
description ||= @page.meta_description if @page.try(&:meta_description?)
|
34
|
-
description ||= @page.excerpt if @page && !@page.excerpt.empty?
|
35
|
-
strip_tags(description)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
# Returns true if meta description has been set.
|
40
|
-
def meta_description?
|
41
|
-
meta_description.present?
|
42
|
-
end
|
43
|
-
|
44
|
-
# Sets an image to use for meta tags. Supports
|
45
|
-
# both paths and Image objects.
|
46
|
-
#
|
47
|
-
# meta_image image_path("facebook-share.png")
|
48
|
-
# meta_image @page.image
|
49
|
-
#
|
50
|
-
def meta_image(*args)
|
51
|
-
if args.any?
|
52
|
-
@meta_image = args.first
|
53
|
-
else
|
54
|
-
image = find_meta_image
|
55
|
-
if image.is_a?(Image)
|
56
|
-
dynamic_image_url(image, size: "1200x", only_path: false)
|
57
|
-
else
|
58
|
-
image
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
# Returns true if meta image has been set.
|
64
|
-
def meta_image?
|
65
|
-
meta_image.present? || default_meta_image?
|
66
|
-
end
|
67
|
-
|
68
|
-
# Sets keywords for meta tags.
|
69
|
-
#
|
70
|
-
# meta_keywords "cialis viagra"
|
71
|
-
#
|
72
|
-
def meta_keywords(*args)
|
73
|
-
if args.any?
|
74
|
-
@meta_keywords = Array(args.first).join(", ")
|
75
|
-
else
|
76
|
-
keywords = @meta_keywords
|
77
|
-
keywords ||= @page.tag_list if @page&.tags&.any?
|
78
|
-
strip_tags(keywords)
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
# Returns true if meta keywords have been set.
|
83
|
-
def meta_keywords?
|
84
|
-
meta_keywords.present?
|
85
|
-
end
|
86
|
-
|
87
|
-
private
|
88
|
-
|
89
|
-
def find_meta_image
|
90
|
-
@meta_image ||
|
91
|
-
@page.try(&:meta_image) ||
|
92
|
-
@page.try(&:image) ||
|
93
|
-
default_meta_image
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module PagesCore
|
4
|
-
module OpenGraphTagsHelper
|
5
|
-
def open_graph_properties
|
6
|
-
@open_graph_properties ||= {}
|
7
|
-
end
|
8
|
-
|
9
|
-
# Outputs Open Graph tags for Facebook.
|
10
|
-
def open_graph_tags
|
11
|
-
properties = default_open_graph_properties.merge(open_graph_properties)
|
12
|
-
safe_join(
|
13
|
-
properties
|
14
|
-
.compact
|
15
|
-
.map do |name, content|
|
16
|
-
tag.meta(property: "og:#{name}", content:)
|
17
|
-
end,
|
18
|
-
"\n"
|
19
|
-
)
|
20
|
-
end
|
21
|
-
|
22
|
-
private
|
23
|
-
|
24
|
-
def default_open_graph_title
|
25
|
-
if @page.try(:open_graph_title?)
|
26
|
-
@page.open_graph_title
|
27
|
-
else
|
28
|
-
document_title
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def default_open_graph_description
|
33
|
-
if @page.try(:open_graph_description?)
|
34
|
-
@page.open_graph_description
|
35
|
-
elsif meta_description?
|
36
|
-
meta_description
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def default_open_graph_properties
|
41
|
-
{ type: "website",
|
42
|
-
site_name: PagesCore.config(:site_name),
|
43
|
-
title: default_open_graph_title,
|
44
|
-
image: (meta_image if meta_image?),
|
45
|
-
description: default_open_graph_description&.strip,
|
46
|
-
url: request.url }
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|