pages_core 3.12.1 → 3.12.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/app/assets/builds/pages_core/admin-dist.js +135 -50
  4. data/app/assets/builds/pages_core/admin-dist.js.map +7 -0
  5. data/app/assets/builds/pages_core/admin.css +72 -20
  6. data/app/assets/stylesheets/pages_core/admin/components/attachments.css +1 -1
  7. data/app/assets/stylesheets/pages_core/admin/components/image_editor.css +2 -2
  8. data/app/assets/stylesheets/pages_core/admin/components/image_grid.css +8 -8
  9. data/app/assets/stylesheets/pages_core/admin/components/image_uploader.css +2 -2
  10. data/app/assets/stylesheets/pages_core/admin/components/layout.css +2 -2
  11. data/app/assets/stylesheets/pages_core/admin/components/modal.css +2 -2
  12. data/app/assets/stylesheets/pages_core/admin/components/search.css +27 -0
  13. data/app/assets/stylesheets/pages_core/admin/controllers/pages.css +6 -0
  14. data/app/controllers/admin/pages_controller.rb +12 -11
  15. data/app/controllers/concerns/pages_core/rss_controller.rb +17 -1
  16. data/app/controllers/pages_core/admin_controller.rb +6 -0
  17. data/app/controllers/pages_core/frontend/pages_controller.rb +9 -5
  18. data/app/controllers/pages_core/sitemaps_controller.rb +3 -5
  19. data/app/helpers/admin/pages_helper.rb +32 -0
  20. data/app/helpers/pages_core/images_helper.rb +28 -7
  21. data/app/javascript/admin-dist.ts +2 -0
  22. data/app/javascript/components/Attachments/{Attachment.jsx → Attachment.tsx} +42 -33
  23. data/app/javascript/components/Attachments/{AttachmentEditor.jsx → AttachmentEditor.tsx} +23 -23
  24. data/app/javascript/components/{EditableImage.jsx → EditableImage.tsx} +27 -24
  25. data/app/javascript/components/{FileUploadButton.jsx → FileUploadButton.tsx} +15 -16
  26. data/app/javascript/components/ImageCropper/FocalPoint.tsx +94 -0
  27. data/app/javascript/components/ImageCropper/{Image.jsx → Image.tsx} +13 -14
  28. data/app/javascript/components/ImageCropper/{Toolbar.jsx → Toolbar.tsx} +16 -12
  29. data/app/javascript/components/ImageCropper/{useCrop.js → useCrop.ts} +80 -37
  30. data/app/javascript/components/{ImageCropper.jsx → ImageCropper.tsx} +17 -15
  31. data/app/javascript/components/ImageEditor/{Form.jsx → Form.tsx} +24 -23
  32. data/app/javascript/components/{ImageEditor.jsx → ImageEditor.tsx} +17 -15
  33. data/app/javascript/components/ImageGrid/{DragElement.jsx → DragElement.tsx} +12 -10
  34. data/app/javascript/components/ImageGrid/{GridImage.jsx → GridImage.tsx} +40 -30
  35. data/app/javascript/components/ImageGrid/{Placeholder.jsx → Placeholder.tsx} +5 -6
  36. data/app/javascript/components/ImageGrid.jsx +3 -4
  37. data/app/javascript/components/{ImageUploader.jsx → ImageUploader.tsx} +46 -41
  38. data/app/javascript/components/Modal.tsx +48 -0
  39. data/app/javascript/components/PageImages.tsx +28 -0
  40. data/app/javascript/components/{PageTreeDraggable.jsx → PageTree/Draggable.tsx} +79 -57
  41. data/app/javascript/components/{PageTreeNode.jsx → PageTree/Node.tsx} +79 -70
  42. data/app/javascript/components/PageTree/types.ts +15 -0
  43. data/app/javascript/components/PageTree.tsx +206 -0
  44. data/app/javascript/components/RichTextToolbarButton.tsx +17 -0
  45. data/app/javascript/components/TagEditor/{AddTagForm.jsx → AddTagForm.tsx} +9 -10
  46. data/app/javascript/components/TagEditor/{Tag.jsx → Tag.tsx} +8 -9
  47. data/app/javascript/components/{TagEditor.jsx → TagEditor.tsx} +12 -13
  48. data/app/javascript/components/Toast.tsx +61 -0
  49. data/app/javascript/components/drag/{draggedOrder.js → draggedOrder.ts} +22 -12
  50. data/app/javascript/components/drag/types.ts +28 -0
  51. data/app/javascript/components/drag/{useDragCollection.js → useDragCollection.ts} +40 -22
  52. data/app/javascript/components/drag/{useDragUploader.js → useDragUploader.ts} +34 -25
  53. data/app/javascript/components/drag/useDraggable.ts +21 -0
  54. data/app/javascript/components/{drag.js → drag.ts} +1 -0
  55. data/app/javascript/controllers/{EditPageController.js → EditPageController.ts} +3 -1
  56. data/app/javascript/controllers/{LoginController.js → LoginController.ts} +7 -3
  57. data/app/javascript/controllers/{MainController.js → MainController.ts} +19 -14
  58. data/app/javascript/features/{RichText.jsx → RichText.tsx} +3 -3
  59. data/app/javascript/{index.js → index.ts} +8 -7
  60. data/app/javascript/lib/{Tree.js → Tree.ts} +106 -85
  61. data/app/javascript/lib/{copyToClipboard.js → copyToClipboard.ts} +1 -1
  62. data/app/javascript/lib/{readyHandler.js → readyHandler.ts} +4 -2
  63. data/app/javascript/lib/{request.js → request.ts} +11 -5
  64. data/app/javascript/stores/useModalStore.ts +15 -0
  65. data/app/javascript/stores/useToastStore.ts +26 -0
  66. data/app/javascript/stores.ts +2 -0
  67. data/app/javascript/types.ts +30 -0
  68. data/app/policies/page_policy.rb +4 -0
  69. data/app/views/admin/calendars/_sidebar.html.erb +3 -0
  70. data/app/views/admin/news/_sidebar.html.erb +3 -0
  71. data/app/views/admin/pages/_list_item.html.erb +4 -22
  72. data/app/views/admin/pages/_search_bar.html.erb +12 -0
  73. data/app/views/admin/pages/index.html.erb +3 -0
  74. data/app/views/admin/pages/search.html.erb +54 -0
  75. data/app/views/feeds/pages.rss.builder +3 -9
  76. data/config/routes.rb +1 -0
  77. data/lib/pages_core/configuration/pages.rb +0 -1
  78. data/lib/rails/generators/pages_core/frontend/frontend_generator.rb +33 -17
  79. data/lib/rails/generators/pages_core/frontend/templates/application.html.erb +0 -1
  80. data/lib/rails/generators/pages_core/frontend/templates/javascript/lib/gridOverlay.ts +40 -0
  81. data/lib/rails/generators/pages_core/frontend/templates/javascript/lib/responsiveEmbeds.ts +68 -0
  82. data/lib/rails/generators/pages_core/frontend/templates/postcss.config.js +17 -0
  83. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/application.postcss.css +4 -0
  84. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/components/base.css +24 -0
  85. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/components/layout.css +21 -0
  86. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/config.css +5 -0
  87. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/animation.css +5 -0
  88. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/colors.css +18 -0
  89. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/fonts.css +6 -0
  90. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/grid.css +65 -0
  91. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/typography.css +131 -0
  92. data/lib/rails/generators/pages_core/install/templates/pages_initializer.rb +0 -3
  93. metadata +69 -63
  94. data/app/javascript/admin-dist.js +0 -2
  95. data/app/javascript/components/ImageCropper/FocalPoint.jsx +0 -93
  96. data/app/javascript/components/Modal.jsx +0 -59
  97. data/app/javascript/components/PageImages.jsx +0 -25
  98. data/app/javascript/components/PageTree.jsx +0 -196
  99. data/app/javascript/components/RichTextToolbarButton.jsx +0 -20
  100. data/app/javascript/components/Toast.jsx +0 -72
  101. data/app/javascript/components/drag/useDraggable.js +0 -17
  102. data/app/javascript/stores/ModalStore.jsx +0 -12
  103. data/app/javascript/stores/ToastStore.jsx +0 -14
  104. data/app/javascript/stores.js +0 -2
  105. data/lib/rails/generators/pages_core/frontend/templates/javascript/lib/GridOverlay.js +0 -66
  106. data/lib/rails/generators/pages_core/frontend/templates/javascript/lib/ResponsiveEmbeds.js +0 -72
  107. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/application.sass.scss +0 -15
  108. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/components/base.scss +0 -12
  109. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/config.scss +0 -26
  110. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/breakpoints.scss +0 -42
  111. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/clearfix.scss +0 -7
  112. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/fonts.scss +0 -32
  113. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid.scss +0 -168
  114. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/framework/grid_overlay.scss +0 -44
  115. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/colors.scss +0 -8
  116. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/global/typography.scss +0 -90
  117. data/lib/rails/generators/pages_core/frontend/templates/stylesheets/vendor/normalize.css +0 -349
  118. /data/app/javascript/components/Attachments/{Placeholder.jsx → Placeholder.tsx} +0 -0
  119. /data/app/javascript/components/ImageGrid/{FilePlaceholder.jsx → FilePlaceholder.tsx} +0 -0
  120. /data/app/javascript/{components.js → components.ts} +0 -0
  121. /data/app/javascript/{hooks.js → hooks.ts} +0 -0
@@ -1,349 +0,0 @@
1
- /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
2
-
3
- /* Document
4
- ========================================================================== */
5
-
6
- /**
7
- * 1. Correct the line height in all browsers.
8
- * 2. Prevent adjustments of font size after orientation changes in iOS.
9
- */
10
-
11
- html {
12
- line-height: 1.15; /* 1 */
13
- -webkit-text-size-adjust: 100%; /* 2 */
14
- }
15
-
16
- /* Sections
17
- ========================================================================== */
18
-
19
- /**
20
- * Remove the margin in all browsers.
21
- */
22
-
23
- body {
24
- margin: 0;
25
- }
26
-
27
- /**
28
- * Render the `main` element consistently in IE.
29
- */
30
-
31
- main {
32
- display: block;
33
- }
34
-
35
- /**
36
- * Correct the font size and margin on `h1` elements within `section` and
37
- * `article` contexts in Chrome, Firefox, and Safari.
38
- */
39
-
40
- h1 {
41
- font-size: 2em;
42
- margin: 0.67em 0;
43
- }
44
-
45
- /* Grouping content
46
- ========================================================================== */
47
-
48
- /**
49
- * 1. Add the correct box sizing in Firefox.
50
- * 2. Show the overflow in Edge and IE.
51
- */
52
-
53
- hr {
54
- box-sizing: content-box; /* 1 */
55
- height: 0; /* 1 */
56
- overflow: visible; /* 2 */
57
- }
58
-
59
- /**
60
- * 1. Correct the inheritance and scaling of font size in all browsers.
61
- * 2. Correct the odd `em` font sizing in all browsers.
62
- */
63
-
64
- pre {
65
- font-family: monospace, monospace; /* 1 */
66
- font-size: 1em; /* 2 */
67
- }
68
-
69
- /* Text-level semantics
70
- ========================================================================== */
71
-
72
- /**
73
- * Remove the gray background on active links in IE 10.
74
- */
75
-
76
- a {
77
- background-color: transparent;
78
- }
79
-
80
- /**
81
- * 1. Remove the bottom border in Chrome 57-
82
- * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
83
- */
84
-
85
- abbr[title] {
86
- border-bottom: none; /* 1 */
87
- text-decoration: underline; /* 2 */
88
- text-decoration: underline dotted; /* 2 */
89
- }
90
-
91
- /**
92
- * Add the correct font weight in Chrome, Edge, and Safari.
93
- */
94
-
95
- b,
96
- strong {
97
- font-weight: bolder;
98
- }
99
-
100
- /**
101
- * 1. Correct the inheritance and scaling of font size in all browsers.
102
- * 2. Correct the odd `em` font sizing in all browsers.
103
- */
104
-
105
- code,
106
- kbd,
107
- samp {
108
- font-family: monospace, monospace; /* 1 */
109
- font-size: 1em; /* 2 */
110
- }
111
-
112
- /**
113
- * Add the correct font size in all browsers.
114
- */
115
-
116
- small {
117
- font-size: 80%;
118
- }
119
-
120
- /**
121
- * Prevent `sub` and `sup` elements from affecting the line height in
122
- * all browsers.
123
- */
124
-
125
- sub,
126
- sup {
127
- font-size: 75%;
128
- line-height: 0;
129
- position: relative;
130
- vertical-align: baseline;
131
- }
132
-
133
- sub {
134
- bottom: -0.25em;
135
- }
136
-
137
- sup {
138
- top: -0.5em;
139
- }
140
-
141
- /* Embedded content
142
- ========================================================================== */
143
-
144
- /**
145
- * Remove the border on images inside links in IE 10.
146
- */
147
-
148
- img {
149
- border-style: none;
150
- }
151
-
152
- /* Forms
153
- ========================================================================== */
154
-
155
- /**
156
- * 1. Change the font styles in all browsers.
157
- * 2. Remove the margin in Firefox and Safari.
158
- */
159
-
160
- button,
161
- input,
162
- optgroup,
163
- select,
164
- textarea {
165
- font-family: inherit; /* 1 */
166
- font-size: 100%; /* 1 */
167
- line-height: 1.15; /* 1 */
168
- margin: 0; /* 2 */
169
- }
170
-
171
- /**
172
- * Show the overflow in IE.
173
- * 1. Show the overflow in Edge.
174
- */
175
-
176
- button,
177
- input { /* 1 */
178
- overflow: visible;
179
- }
180
-
181
- /**
182
- * Remove the inheritance of text transform in Edge, Firefox, and IE.
183
- * 1. Remove the inheritance of text transform in Firefox.
184
- */
185
-
186
- button,
187
- select { /* 1 */
188
- text-transform: none;
189
- }
190
-
191
- /**
192
- * Correct the inability to style clickable types in iOS and Safari.
193
- */
194
-
195
- button,
196
- [type="button"],
197
- [type="reset"],
198
- [type="submit"] {
199
- -webkit-appearance: button;
200
- }
201
-
202
- /**
203
- * Remove the inner border and padding in Firefox.
204
- */
205
-
206
- button::-moz-focus-inner,
207
- [type="button"]::-moz-focus-inner,
208
- [type="reset"]::-moz-focus-inner,
209
- [type="submit"]::-moz-focus-inner {
210
- border-style: none;
211
- padding: 0;
212
- }
213
-
214
- /**
215
- * Restore the focus styles unset by the previous rule.
216
- */
217
-
218
- button:-moz-focusring,
219
- [type="button"]:-moz-focusring,
220
- [type="reset"]:-moz-focusring,
221
- [type="submit"]:-moz-focusring {
222
- outline: 1px dotted ButtonText;
223
- }
224
-
225
- /**
226
- * Correct the padding in Firefox.
227
- */
228
-
229
- fieldset {
230
- padding: 0.35em 0.75em 0.625em;
231
- }
232
-
233
- /**
234
- * 1. Correct the text wrapping in Edge and IE.
235
- * 2. Correct the color inheritance from `fieldset` elements in IE.
236
- * 3. Remove the padding so developers are not caught out when they zero out
237
- * `fieldset` elements in all browsers.
238
- */
239
-
240
- legend {
241
- box-sizing: border-box; /* 1 */
242
- color: inherit; /* 2 */
243
- display: table; /* 1 */
244
- max-width: 100%; /* 1 */
245
- padding: 0; /* 3 */
246
- white-space: normal; /* 1 */
247
- }
248
-
249
- /**
250
- * Add the correct vertical alignment in Chrome, Firefox, and Opera.
251
- */
252
-
253
- progress {
254
- vertical-align: baseline;
255
- }
256
-
257
- /**
258
- * Remove the default vertical scrollbar in IE 10+.
259
- */
260
-
261
- textarea {
262
- overflow: auto;
263
- }
264
-
265
- /**
266
- * 1. Add the correct box sizing in IE 10.
267
- * 2. Remove the padding in IE 10.
268
- */
269
-
270
- [type="checkbox"],
271
- [type="radio"] {
272
- box-sizing: border-box; /* 1 */
273
- padding: 0; /* 2 */
274
- }
275
-
276
- /**
277
- * Correct the cursor style of increment and decrement buttons in Chrome.
278
- */
279
-
280
- [type="number"]::-webkit-inner-spin-button,
281
- [type="number"]::-webkit-outer-spin-button {
282
- height: auto;
283
- }
284
-
285
- /**
286
- * 1. Correct the odd appearance in Chrome and Safari.
287
- * 2. Correct the outline style in Safari.
288
- */
289
-
290
- [type="search"] {
291
- -webkit-appearance: textfield; /* 1 */
292
- outline-offset: -2px; /* 2 */
293
- }
294
-
295
- /**
296
- * Remove the inner padding in Chrome and Safari on macOS.
297
- */
298
-
299
- [type="search"]::-webkit-search-decoration {
300
- -webkit-appearance: none;
301
- }
302
-
303
- /**
304
- * 1. Correct the inability to style clickable types in iOS and Safari.
305
- * 2. Change font properties to `inherit` in Safari.
306
- */
307
-
308
- ::-webkit-file-upload-button {
309
- -webkit-appearance: button; /* 1 */
310
- font: inherit; /* 2 */
311
- }
312
-
313
- /* Interactive
314
- ========================================================================== */
315
-
316
- /*
317
- * Add the correct display in Edge, IE 10+, and Firefox.
318
- */
319
-
320
- details {
321
- display: block;
322
- }
323
-
324
- /*
325
- * Add the correct display in all browsers.
326
- */
327
-
328
- summary {
329
- display: list-item;
330
- }
331
-
332
- /* Misc
333
- ========================================================================== */
334
-
335
- /**
336
- * Add the correct display in IE 10+.
337
- */
338
-
339
- template {
340
- display: none;
341
- }
342
-
343
- /**
344
- * Add the correct display in IE 10.
345
- */
346
-
347
- [hidden] {
348
- display: none;
349
- }
File without changes
File without changes