@comet/cms-admin 9.0.0-beta.5 → 9.0.0-beta.6

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.
Files changed (60) hide show
  1. package/lib/blocks/ExternalLinkBlock.d.ts.map +1 -1
  2. package/lib/blocks/ExternalLinkBlock.js +18 -4
  3. package/lib/blocks/tipTap/TextBlockStyleContext.d.ts +3 -0
  4. package/lib/blocks/tipTap/TextBlockStyleContext.d.ts.map +1 -0
  5. package/lib/blocks/tipTap/TextBlockStyleContext.js +2 -0
  6. package/lib/blocks/tipTap/TipTapToolbar.d.ts +3 -3
  7. package/lib/blocks/tipTap/TipTapToolbar.d.ts.map +1 -1
  8. package/lib/blocks/tipTap/TipTapToolbar.js +28 -28
  9. package/lib/blocks/tipTap/createTipTapRichTextBlock.d.ts +12 -12
  10. package/lib/blocks/tipTap/createTipTapRichTextBlock.d.ts.map +1 -1
  11. package/lib/blocks/tipTap/createTipTapRichTextBlock.js +27 -27
  12. package/lib/blocks/tipTap/extensions/TextBlockStyleHeading.d.ts +2 -0
  13. package/lib/blocks/tipTap/extensions/TextBlockStyleHeading.d.ts.map +1 -0
  14. package/lib/blocks/tipTap/extensions/{BlockStyleHeading.js → TextBlockStyleHeading.js} +12 -12
  15. package/lib/blocks/tipTap/extensions/TextBlockStyleParagraph.d.ts +2 -0
  16. package/lib/blocks/tipTap/extensions/TextBlockStyleParagraph.d.ts.map +1 -0
  17. package/lib/blocks/tipTap/extensions/{BlockStyleParagraph.js → TextBlockStyleParagraph.js} +12 -12
  18. package/lib/blocks.generated.d.ts +2 -0
  19. package/lib/blocks.generated.d.ts.map +1 -1
  20. package/lib/builds/StartBuildsDialog.d.ts.map +1 -1
  21. package/lib/builds/StartBuildsDialog.js +1 -5
  22. package/lib/fullTextSearch/SearchHeaderItem.d.ts +2 -0
  23. package/lib/fullTextSearch/SearchHeaderItem.d.ts.map +1 -0
  24. package/lib/fullTextSearch/SearchHeaderItem.generated.d.ts +25 -0
  25. package/lib/fullTextSearch/SearchHeaderItem.generated.d.ts.map +1 -0
  26. package/lib/fullTextSearch/SearchHeaderItem.generated.js +5 -0
  27. package/lib/fullTextSearch/SearchHeaderItem.js +175 -0
  28. package/lib/graphql.generated.d.ts +19 -2
  29. package/lib/graphql.generated.d.ts.map +1 -1
  30. package/lib/index.d.ts +3 -2
  31. package/lib/index.d.ts.map +1 -1
  32. package/lib/index.js +1 -0
  33. package/lib/pages/pageSearch/usePageSearch.d.ts.map +1 -1
  34. package/lib/pages/pageSearch/usePageSearch.js +23 -4
  35. package/lib/pages/pageTree/PageActions.d.ts.map +1 -1
  36. package/lib/pages/pageTree/PageActions.js +4 -2
  37. package/lib/pages/pageTreeConfig.d.ts +5 -0
  38. package/lib/pages/pageTreeConfig.d.ts.map +1 -1
  39. package/lib/pages/pagesPage/PagesPageActionToolbar.d.ts.map +1 -1
  40. package/lib/pages/pagesPage/PagesPageActionToolbar.js +4 -2
  41. package/lib/storybook.d.js +1 -0
  42. package/package.json +23 -16
  43. package/lib/blocks/__stories__/BlockInFinalForm.stories.js +0 -53
  44. package/lib/blocks/__stories__/RichTextBlock.stories.js +0 -53
  45. package/lib/blocks/helpers/__stories__/createCompositeBlockSelectField.stories.js +0 -106
  46. package/lib/blocks/tipTap/BlockStyleContext.d.ts +0 -3
  47. package/lib/blocks/tipTap/BlockStyleContext.d.ts.map +0 -1
  48. package/lib/blocks/tipTap/BlockStyleContext.js +0 -2
  49. package/lib/blocks/tipTap/__stories__/TipTapRichTextBlock.stories.js +0 -1841
  50. package/lib/blocks/tipTap/extensions/BlockStyleHeading.d.ts +0 -2
  51. package/lib/blocks/tipTap/extensions/BlockStyleHeading.d.ts.map +0 -1
  52. package/lib/blocks/tipTap/extensions/BlockStyleParagraph.d.ts +0 -2
  53. package/lib/blocks/tipTap/extensions/BlockStyleParagraph.d.ts.map +0 -1
  54. package/lib/common/__stories__/MasterMenuInMasterLayout.stories.js +0 -87
  55. package/lib/contentScope/__stories__/ContentScopeProvider.stories.js +0 -85
  56. package/lib/contentScope/__stories__/ContentScopeSelect.stories.js +0 -655
  57. package/lib/contentScope/noContentScopeFallback/__stories__/NoContentScopeFallback.stories.js +0 -7
  58. package/lib/dashboard/__stories__/DateTime.stories.js +0 -7
  59. package/lib/dashboard/widgets/__stories__/DashboardWidgetRoot.stories.js +0 -82
  60. package/lib/form/file/__stories__/FileUploadField.stories.js +0 -351
@@ -1,82 +0,0 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import { InfoFilled } from "@comet/admin-icons";
8
- import { Grid } from "@mui/material";
9
- import { DashboardWidgetRoot } from "../DashboardWidgetRoot";
10
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- var config = {
12
- component: DashboardWidgetRoot,
13
- title: "dashboard/widgets/DashboardWidgetRoot"
14
- };
15
- export default config;
16
- export var Default = {
17
- args: {
18
- header: "Widget Header",
19
- children: /*#__PURE__*/_jsx("div", {
20
- style: {
21
- padding: "20px"
22
- },
23
- children: "Some content goes here"
24
- })
25
- }
26
- };
27
- export var WithIcon = {
28
- args: {
29
- header: "Widget Header",
30
- icon: /*#__PURE__*/_jsx(InfoFilled, {}),
31
- children: /*#__PURE__*/_jsx("div", {
32
- style: {
33
- padding: "20px"
34
- },
35
- children: "Some content goes here"
36
- })
37
- }
38
- };
39
- export var WidgetInGrid = {
40
- args: {
41
- header: "Widget Header",
42
- children: /*#__PURE__*/_jsx("div", {
43
- style: {
44
- padding: "20px"
45
- },
46
- children: "Some content goes here"
47
- })
48
- },
49
- render: function render(args, context) {
50
- return /*#__PURE__*/_jsxs(Grid, {
51
- container: true,
52
- spacing: 4,
53
- columns: {
54
- xs: 1,
55
- sm: 6,
56
- lg: 12
57
- },
58
- children: [/*#__PURE__*/_jsx(Grid, {
59
- size: 12,
60
- children: /*#__PURE__*/_jsx(DashboardWidgetRoot, _objectSpread({}, args))
61
- }), /*#__PURE__*/_jsx(Grid, {
62
- size: 6,
63
- children: /*#__PURE__*/_jsx(DashboardWidgetRoot, _objectSpread({}, args))
64
- }), /*#__PURE__*/_jsx(Grid, {
65
- size: 6,
66
- children: /*#__PURE__*/_jsx(DashboardWidgetRoot, _objectSpread({}, args))
67
- }), /*#__PURE__*/_jsx(Grid, {
68
- size: 3,
69
- children: /*#__PURE__*/_jsx(DashboardWidgetRoot, _objectSpread({}, args))
70
- }), /*#__PURE__*/_jsx(Grid, {
71
- size: 3,
72
- children: /*#__PURE__*/_jsx(DashboardWidgetRoot, _objectSpread({}, args))
73
- }), /*#__PURE__*/_jsx(Grid, {
74
- size: 3,
75
- children: /*#__PURE__*/_jsx(DashboardWidgetRoot, _objectSpread({}, args))
76
- }), /*#__PURE__*/_jsx(Grid, {
77
- size: 3,
78
- children: /*#__PURE__*/_jsx(DashboardWidgetRoot, _objectSpread({}, args))
79
- })]
80
- });
81
- }
82
- };
@@ -1,351 +0,0 @@
1
- import { Alert, FinalForm } from "@comet/admin";
2
- import { FileUploadField } from "../FileUploadField";
3
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
4
- var config = {
5
- component: FileUploadField,
6
- title: "form/file/FileUploadField"
7
- };
8
- export default config;
9
-
10
- /**
11
- * Example of a single file upload
12
- *
13
- */
14
- export var Default = {
15
- render: function render() {
16
- return /*#__PURE__*/_jsx(FinalForm, {
17
- mode: "edit",
18
- onSubmit: function onSubmit() {
19
- // not handled
20
- },
21
- subscription: {
22
- values: true
23
- },
24
- children: function children(_ref) {
25
- var values = _ref.values;
26
- return /*#__PURE__*/_jsxs(_Fragment, {
27
- children: [/*#__PURE__*/_jsx(FileUploadField, {
28
- name: "value",
29
- label: "File Upload Field",
30
- fullWidth: true,
31
- variant: "horizontal"
32
- }), /*#__PURE__*/_jsx(Alert, {
33
- title: "FormState",
34
- children: /*#__PURE__*/_jsx("pre", {
35
- children: JSON.stringify(values, null, 2)
36
- })
37
- })]
38
- });
39
- }
40
- });
41
- }
42
- };
43
-
44
- /**
45
- * Example of a single file upload with an already initialized image.
46
- *
47
- * Note that in the formstate the file object is present right from the start, and only the internal id, name and size is available.
48
- */
49
- export var DefaultWithInitializedImage = {
50
- render: function render() {
51
- return /*#__PURE__*/_jsx(FinalForm, {
52
- mode: "edit",
53
- onSubmit: function onSubmit() {
54
- // not handled
55
- },
56
- subscription: {
57
- values: true
58
- },
59
- initialValues: {
60
- value: {
61
- size: 123456,
62
- id: "mock-file-id-123",
63
- name: "cactus-in-sun.jpg"
64
- }
65
- },
66
- children: function children(_ref2) {
67
- var values = _ref2.values;
68
- return /*#__PURE__*/_jsxs(_Fragment, {
69
- children: [/*#__PURE__*/_jsx(FileUploadField, {
70
- name: "value",
71
- label: "File Upload Field",
72
- fullWidth: true,
73
- variant: "horizontal"
74
- }), /*#__PURE__*/_jsx(Alert, {
75
- title: "FormState",
76
- children: /*#__PURE__*/_jsx("pre", {
77
- children: JSON.stringify(values, null, 2)
78
- })
79
- })]
80
- });
81
- }
82
- });
83
- }
84
- };
85
-
86
- /**
87
- * Example of a multi file upload
88
- *
89
- * Its important to set `maxFiles` when using `multiple`, otherwise the user could upload an unlimited number of files.
90
- */
91
- export var MultiFileUpload = {
92
- render: function render() {
93
- return /*#__PURE__*/_jsx(FinalForm, {
94
- mode: "edit",
95
- onSubmit: function onSubmit() {
96
- // not handled
97
- },
98
- subscription: {
99
- values: true
100
- },
101
- children: function children(_ref3) {
102
- var values = _ref3.values;
103
- return /*#__PURE__*/_jsxs(_Fragment, {
104
- children: [/*#__PURE__*/_jsx(FileUploadField, {
105
- name: "value",
106
- label: "File Upload Field",
107
- fullWidth: true,
108
- variant: "horizontal",
109
- maxFiles: 5,
110
- multiple: true
111
- }), /*#__PURE__*/_jsx(Alert, {
112
- title: "FormState",
113
- children: /*#__PURE__*/_jsx("pre", {
114
- children: JSON.stringify(values, null, 2)
115
- })
116
- })]
117
- });
118
- }
119
- });
120
- }
121
- };
122
-
123
- /**
124
- * Example of a multi file upload with already initialized files.
125
- */
126
- export var MultiFileUploadWithDefaultValues = {
127
- render: function render() {
128
- return /*#__PURE__*/_jsx(FinalForm, {
129
- mode: "edit",
130
- onSubmit: function onSubmit() {
131
- // not handled
132
- },
133
- subscription: {
134
- values: true
135
- },
136
- initialValues: {
137
- value: [{
138
- size: 123456,
139
- id: "mock-file-id-123",
140
- name: "cactus-in-sun.jpg"
141
- }, {
142
- size: 54323,
143
- id: "mock-file-id-360",
144
- name: "red-flower.jpg"
145
- }, {
146
- size: 665343,
147
- id: "mock-file-id-429",
148
- name: "rasperry.jpg"
149
- }]
150
- },
151
- children: function children(_ref4) {
152
- var values = _ref4.values;
153
- return /*#__PURE__*/_jsxs(_Fragment, {
154
- children: [/*#__PURE__*/_jsx(FileUploadField, {
155
- name: "value",
156
- label: "File Upload Field",
157
- fullWidth: true,
158
- variant: "horizontal",
159
- maxFiles: 5,
160
- multiple: true
161
- }), /*#__PURE__*/_jsx(Alert, {
162
- title: "FormState",
163
- children: /*#__PURE__*/_jsx("pre", {
164
- children: JSON.stringify(values, null, 2)
165
- })
166
- })]
167
- });
168
- }
169
- });
170
- }
171
- };
172
-
173
- /**
174
- * Example of a single file upload with file download enabled
175
- *
176
- * File download gets automatically enabled when downloadUrl is present on the uploaded file object
177
- */
178
- export var WithDownload = {
179
- render: function render() {
180
- return /*#__PURE__*/_jsx(FinalForm, {
181
- mode: "edit",
182
- onSubmit: function onSubmit() {
183
- // not handled
184
- },
185
- subscription: {
186
- values: true
187
- },
188
- initialValues: {
189
- value: {
190
- size: 123456,
191
- id: "mock-file-id-123",
192
- name: "cactus-in-sun.jpg",
193
- imageUrl: "https://picsum.photos/id/35/200/300",
194
- downloadUrl: "https://picsum.photos/id/35/2000/3000"
195
- }
196
- },
197
- children: function children(_ref5) {
198
- var values = _ref5.values;
199
- return /*#__PURE__*/_jsxs(_Fragment, {
200
- children: [/*#__PURE__*/_jsx(FileUploadField, {
201
- name: "value",
202
- label: "File Upload Field",
203
- fullWidth: true,
204
- variant: "horizontal"
205
- }), /*#__PURE__*/_jsx(Alert, {
206
- title: "FormState",
207
- children: /*#__PURE__*/_jsx("pre", {
208
- children: JSON.stringify(values, null, 2)
209
- })
210
- })]
211
- });
212
- }
213
- });
214
- }
215
- };
216
-
217
- /**
218
- * Example of a file upload with grid layout and image preview
219
- */
220
- export var WithPreview = {
221
- render: function render() {
222
- return /*#__PURE__*/_jsx(FinalForm, {
223
- mode: "edit",
224
- onSubmit: function onSubmit() {
225
- // not handled
226
- },
227
- subscription: {
228
- values: true
229
- },
230
- children: function children(_ref6) {
231
- var values = _ref6.values;
232
- return /*#__PURE__*/_jsxs(_Fragment, {
233
- children: [/*#__PURE__*/_jsx(FileUploadField, {
234
- name: "value",
235
- label: "File Upload Field",
236
- fullWidth: true,
237
- variant: "horizontal",
238
- layout: "grid"
239
- }), /*#__PURE__*/_jsx(Alert, {
240
- title: "FormState",
241
- children: /*#__PURE__*/_jsx("pre", {
242
- children: JSON.stringify(values, null, 2)
243
- })
244
- })]
245
- });
246
- }
247
- });
248
- }
249
- };
250
-
251
- /**
252
- * Example of a multi file upload with grid layout, image preview and file download enabled
253
- *
254
- * Note that the maxFiles of 3 is reached with the initialized files, so no more files can be uploaded until one is removed.
255
- */
256
- export var WithPreviewAndMultiFileUploadInitialized = {
257
- render: function render() {
258
- return /*#__PURE__*/_jsx(FinalForm, {
259
- mode: "edit",
260
- onSubmit: function onSubmit() {
261
- // not handled
262
- },
263
- subscription: {
264
- values: true
265
- },
266
- initialValues: {
267
- value: [{
268
- size: 123456,
269
- id: "mock-file-id-123",
270
- name: "cactus-in-sun.jpg",
271
- imageUrl: "https://picsum.photos/id/35/200/300",
272
- downloadUrl: "https://picsum.photos/id/35/2000/3000"
273
- }, {
274
- size: 54323,
275
- id: "mock-file-id-123",
276
- name: "cactus-in-sun.jpg",
277
- imageUrl: "https://picsum.photos/id/360/200/300",
278
- downloadUrl: "https://picsum.photos/id/360/2000/3000"
279
- }, {
280
- size: 665343,
281
- id: "mock-file-id-123",
282
- name: "cactus-in-sun.jpg",
283
- imageUrl: "https://picsum.photos/id/429/200/300",
284
- downloadUrl: "https://picsum.photos/id/429/2000/3000"
285
- }]
286
- },
287
- children: function children(_ref7) {
288
- var values = _ref7.values;
289
- return /*#__PURE__*/_jsxs(_Fragment, {
290
- children: [/*#__PURE__*/_jsx(FileUploadField, {
291
- name: "value",
292
- label: "File Upload Field",
293
- fullWidth: true,
294
- variant: "horizontal",
295
- layout: "grid",
296
- multiple: true,
297
- maxFiles: 3
298
- }), /*#__PURE__*/_jsx(Alert, {
299
- title: "FormState",
300
- children: /*#__PURE__*/_jsx("pre", {
301
- children: JSON.stringify(values, null, 2)
302
- })
303
- })]
304
- });
305
- }
306
- });
307
- }
308
- };
309
-
310
- /**
311
- * Example of a file upload with grid layout, image preview and file download enabled
312
- */
313
- export var WithPreviewAndDownload = {
314
- render: function render() {
315
- return /*#__PURE__*/_jsx(FinalForm, {
316
- mode: "edit",
317
- onSubmit: function onSubmit() {
318
- // not handled
319
- },
320
- subscription: {
321
- values: true
322
- },
323
- initialValues: {
324
- value: {
325
- size: 123456,
326
- id: "mock-file-id-123",
327
- name: "cactus-in-sun.jpg",
328
- imageUrl: "https://picsum.photos/id/35/200/300",
329
- downloadUrl: "https://picsum.photos/id/35/2000/3000"
330
- }
331
- },
332
- children: function children(_ref8) {
333
- var values = _ref8.values;
334
- return /*#__PURE__*/_jsxs(_Fragment, {
335
- children: [/*#__PURE__*/_jsx(FileUploadField, {
336
- name: "value",
337
- label: "File Upload Field",
338
- fullWidth: true,
339
- variant: "horizontal",
340
- layout: "grid"
341
- }), /*#__PURE__*/_jsx(Alert, {
342
- title: "FormState",
343
- children: /*#__PURE__*/_jsx("pre", {
344
- children: JSON.stringify(values, null, 2)
345
- })
346
- })]
347
- });
348
- }
349
- });
350
- }
351
- };