@panneau/protocol 5.0.0-alpha.2 → 5.0.0-alpha.20

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 (136) hide show
  1. package/dist/addresses.d.ts +23 -0
  2. package/dist/addresses.d.ts.map +1 -0
  3. package/dist/addresses.js +52 -0
  4. package/dist/addresses.js.map +1 -0
  5. package/dist/compound.d.ts +20 -0
  6. package/dist/compound.d.ts.map +1 -0
  7. package/dist/compound.js +27 -0
  8. package/dist/compound.js.map +1 -0
  9. package/dist/conditions.d.ts +1 -1
  10. package/dist/conformance/index.d.ts +6 -0
  11. package/dist/conformance/index.d.ts.map +1 -1
  12. package/dist/conformance/index.js +787 -11
  13. package/dist/conformance/index.js.map +1 -1
  14. package/dist/constants.d.ts +101 -2
  15. package/dist/constants.d.ts.map +1 -1
  16. package/dist/constants.js +174 -3
  17. package/dist/constants.js.map +1 -1
  18. package/dist/context.d.ts +15 -0
  19. package/dist/context.d.ts.map +1 -0
  20. package/dist/context.js +34 -0
  21. package/dist/context.js.map +1 -0
  22. package/dist/currencies.d.ts +22 -0
  23. package/dist/currencies.d.ts.map +1 -0
  24. package/dist/currencies.js +231 -0
  25. package/dist/currencies.js.map +1 -0
  26. package/dist/index.d.ts +4 -4
  27. package/dist/index.js +17 -7
  28. package/dist/libraries.d.ts +26 -0
  29. package/dist/libraries.d.ts.map +1 -0
  30. package/dist/libraries.js +22 -0
  31. package/dist/libraries.js.map +1 -0
  32. package/dist/links.d.ts +38 -0
  33. package/dist/links.d.ts.map +1 -0
  34. package/dist/links.js +65 -0
  35. package/dist/links.js.map +1 -0
  36. package/dist/lint.d.ts +4 -3
  37. package/dist/lint.d.ts.map +1 -1
  38. package/dist/lint.js +114 -2
  39. package/dist/lint.js.map +1 -1
  40. package/dist/mock/auth.d.ts +71 -0
  41. package/dist/mock/auth.d.ts.map +1 -0
  42. package/dist/mock/auth.js +346 -0
  43. package/dist/mock/auth.js.map +1 -0
  44. package/dist/mock/example.d.ts +3 -2
  45. package/dist/mock/example.d.ts.map +1 -1
  46. package/dist/mock/example.js +223 -142
  47. package/dist/mock/example.js.map +1 -1
  48. package/dist/mock/index.d.ts +77 -7
  49. package/dist/mock/index.d.ts.map +1 -1
  50. package/dist/mock/index.js +577 -34
  51. package/dist/mock/index.js.map +1 -1
  52. package/dist/openapi.d.ts.map +1 -1
  53. package/dist/openapi.js +394 -145
  54. package/dist/openapi.js.map +1 -1
  55. package/dist/problem.d.ts +1 -1
  56. package/dist/query.d.ts +18 -0
  57. package/dist/query.d.ts.map +1 -1
  58. package/dist/query.js +34 -8
  59. package/dist/query.js.map +1 -1
  60. package/dist/rules.d.ts +16 -4
  61. package/dist/rules.d.ts.map +1 -1
  62. package/dist/rules.js +230 -13
  63. package/dist/rules.js.map +1 -1
  64. package/dist/runtime/index.d.ts +19 -10
  65. package/dist/runtime/index.d.ts.map +1 -1
  66. package/dist/runtime/index.js +12 -3
  67. package/dist/schemas/action.d.ts +117 -10
  68. package/dist/schemas/action.d.ts.map +1 -1
  69. package/dist/schemas/action.js +21 -3
  70. package/dist/schemas/action.js.map +1 -1
  71. package/dist/schemas/api.d.ts +326 -42
  72. package/dist/schemas/api.d.ts.map +1 -1
  73. package/dist/schemas/api.js +192 -34
  74. package/dist/schemas/api.js.map +1 -1
  75. package/dist/schemas/boot.d.ts +25 -1
  76. package/dist/schemas/boot.d.ts.map +1 -1
  77. package/dist/schemas/boot.js +2 -1
  78. package/dist/schemas/boot.js.map +1 -1
  79. package/dist/schemas/common.d.ts +1 -0
  80. package/dist/schemas/common.d.ts.map +1 -1
  81. package/dist/schemas/common.js +2 -1
  82. package/dist/schemas/common.js.map +1 -1
  83. package/dist/schemas/definition.d.ts +332 -28
  84. package/dist/schemas/definition.d.ts.map +1 -1
  85. package/dist/schemas/definition.js +65 -19
  86. package/dist/schemas/definition.js.map +1 -1
  87. package/dist/schemas/field.d.ts +356 -2
  88. package/dist/schemas/field.d.ts.map +1 -1
  89. package/dist/schemas/field.js +159 -20
  90. package/dist/schemas/field.js.map +1 -1
  91. package/dist/schemas/index.d.ts +1384 -72
  92. package/dist/schemas/index.d.ts.map +1 -1
  93. package/dist/schemas/index.js +58 -9
  94. package/dist/schemas/index.js.map +1 -1
  95. package/dist/schemas/jsonRules.d.ts +83 -0
  96. package/dist/schemas/jsonRules.d.ts.map +1 -0
  97. package/dist/schemas/jsonRules.js +46 -0
  98. package/dist/schemas/jsonRules.js.map +1 -0
  99. package/dist/schemas/layout.d.ts +1 -1
  100. package/dist/schemas/list.d.ts +23 -2
  101. package/dist/schemas/list.d.ts.map +1 -1
  102. package/dist/schemas/list.js +14 -5
  103. package/dist/schemas/list.js.map +1 -1
  104. package/dist/schemas/resource.d.ts +247 -15
  105. package/dist/schemas/resource.d.ts.map +1 -1
  106. package/dist/schemas/resource.js +6 -1
  107. package/dist/schemas/resource.js.map +1 -1
  108. package/dist/schemas/widget.d.ts +109 -0
  109. package/dist/schemas/widget.d.ts.map +1 -0
  110. package/dist/schemas/widget.js +74 -0
  111. package/dist/schemas/widget.js.map +1 -0
  112. package/dist/search.d.ts +51 -0
  113. package/dist/search.d.ts.map +1 -0
  114. package/dist/search.js +53 -0
  115. package/dist/search.js.map +1 -0
  116. package/dist/themes.d.ts +1 -1
  117. package/dist/transforms.d.ts +17 -0
  118. package/dist/transforms.d.ts.map +1 -0
  119. package/dist/transforms.js +34 -0
  120. package/dist/transforms.js.map +1 -0
  121. package/dist/validate.d.ts +5 -3
  122. package/dist/validate.d.ts.map +1 -1
  123. package/dist/validate.js +36 -2
  124. package/dist/validate.js.map +1 -1
  125. package/dist/values.d.ts +5 -1
  126. package/dist/values.d.ts.map +1 -1
  127. package/dist/values.js +16 -2
  128. package/dist/values.js.map +1 -1
  129. package/dist/widgets.d.ts +42 -0
  130. package/dist/widgets.d.ts.map +1 -0
  131. package/dist/widgets.js +130 -0
  132. package/dist/widgets.js.map +1 -0
  133. package/package.json +6 -3
  134. package/schema/boot.schema.json +666 -18
  135. package/schema/definition.schema.json +663 -18
  136. package/schema/openapi.json +5694 -2328
@@ -1,7 +1,8 @@
1
1
  //#region src/mock/example.ts
2
2
  /**
3
3
  * A small but complete definition: pages with localized titles, a status, a publication date shown
4
- * for published pages, an author and typed blocks, in tabs and a sidebar, plus authors. For tests
4
+ * for published pages, an author, an attachment and typed blocks, in tabs and a sidebar, plus
5
+ * authors with a photo, and a media library. For tests
5
6
  * and stories, with `createMockBackend()`.
6
7
  */
7
8
  function createExampleDefinition() {
@@ -11,164 +12,243 @@ function createExampleDefinition() {
11
12
  locale: "fr",
12
13
  locales: ["fr", "en"],
13
14
  api: { baseUrl: "/panneau/api" },
14
- resources: [{
15
- id: "pages",
16
- label: {
17
- singular: "page",
18
- plural: "pages"
19
- },
20
- itemTitle: "title",
21
- fields: [
22
- {
23
- name: "title",
24
- type: "text",
25
- label: "Titre",
26
- localized: true,
27
- rules: [{ rule: "required" }, {
28
- rule: "max",
29
- value: 120
30
- }]
15
+ resources: [
16
+ {
17
+ id: "pages",
18
+ label: {
19
+ singular: "page",
20
+ plural: "pages"
31
21
  },
32
- {
33
- name: "status",
34
- type: "select",
35
- options: [{
36
- value: "draft",
37
- label: "Brouillon"
38
- }, {
39
- value: "published",
40
- label: "Publiée"
41
- }],
42
- rules: [{ rule: "required" }, {
43
- rule: "in",
44
- value: ["draft", "published"]
45
- }]
46
- },
47
- {
48
- name: "published_at",
49
- type: "datetime",
50
- visibleWhen: {
51
- field: "status",
52
- equals: "published"
22
+ itemTitle: "title",
23
+ fields: [
24
+ {
25
+ name: "title",
26
+ type: "text",
27
+ label: "Titre",
28
+ localized: true,
29
+ rules: [{ rule: "required" }, {
30
+ rule: "max",
31
+ value: 120
32
+ }]
53
33
  },
54
- rules: [{ rule: "required" }]
55
- },
56
- {
57
- name: "author",
58
- type: "relation",
59
- resource: "authors"
60
- },
61
- {
62
- name: "blocks",
63
- type: "repeater",
64
- types: [{
65
- id: "text",
66
- label: "Texte",
67
- fields: [{
68
- name: "body",
69
- type: "richtext",
70
- rules: [{ rule: "required" }]
34
+ {
35
+ name: "status",
36
+ type: "select",
37
+ options: [{
38
+ value: "draft",
39
+ label: "Brouillon"
40
+ }, {
41
+ value: "published",
42
+ label: "Publiée"
43
+ }],
44
+ rules: [{ rule: "required" }, {
45
+ rule: "in",
46
+ value: ["draft", "published"]
71
47
  }]
72
- }, {
73
- id: "image",
74
- label: "Image",
75
- fields: [{
76
- name: "image",
77
- type: "media",
78
- rules: [{
79
- rule: "accept",
80
- value: ["image/*"]
81
- }, {
82
- rule: "maxSize",
83
- value: 1e3
48
+ },
49
+ {
50
+ name: "published_at",
51
+ type: "datetime",
52
+ visibleWhen: {
53
+ field: "status",
54
+ equals: "published"
55
+ },
56
+ rules: [{ rule: "required" }]
57
+ },
58
+ {
59
+ name: "author",
60
+ type: "relation",
61
+ resource: "authors"
62
+ },
63
+ {
64
+ name: "blocks",
65
+ type: "repeater",
66
+ types: [{
67
+ id: "text",
68
+ label: "Texte",
69
+ fields: [{
70
+ name: "body",
71
+ type: "richtext",
72
+ rules: [{ rule: "required" }]
73
+ }]
74
+ }, {
75
+ id: "image",
76
+ label: "Image",
77
+ fields: [{
78
+ name: "image",
79
+ type: "media",
80
+ rules: [{
81
+ rule: "accept",
82
+ value: ["image/*"]
83
+ }, {
84
+ rule: "maxSize",
85
+ value: 1e3
86
+ }]
84
87
  }]
85
88
  }]
86
- }]
87
- }
88
- ],
89
- form: { layout: [{
90
- type: "tabs",
91
- children: [{
92
- type: "tab",
93
- label: "Contenu",
89
+ },
90
+ {
91
+ name: "attachment",
92
+ type: "file",
93
+ label: "Pièce jointe",
94
+ rules: [{
95
+ rule: "accept",
96
+ value: ["application/pdf"]
97
+ }]
98
+ },
99
+ {
100
+ name: "slug",
101
+ type: "slug",
102
+ from: "title",
103
+ localized: true,
104
+ check: true,
105
+ settings: { prefix: "https://example.com/" }
106
+ }
107
+ ],
108
+ form: { layout: [{
109
+ type: "tabs",
94
110
  children: [{
95
- type: "row",
111
+ type: "tab",
112
+ label: "Contenu",
96
113
  children: [{
97
- type: "field",
98
- name: "title",
99
- width: 8
114
+ type: "row",
115
+ children: [{
116
+ type: "field",
117
+ name: "title",
118
+ width: 8
119
+ }, {
120
+ type: "field",
121
+ name: "status",
122
+ width: 4
123
+ }]
100
124
  }, {
101
125
  type: "field",
102
- name: "status",
103
- width: 4
126
+ name: "blocks"
104
127
  }]
128
+ }]
129
+ }, {
130
+ type: "sidebar",
131
+ children: [{
132
+ type: "field",
133
+ name: "published_at"
105
134
  }, {
106
135
  type: "field",
107
- name: "blocks"
136
+ name: "attachment"
108
137
  }]
109
- }]
110
- }, {
111
- type: "sidebar",
112
- children: [{
113
- type: "field",
114
- name: "published_at"
115
- }]
116
- }] },
117
- list: {
118
- columns: [
119
- {
120
- field: "title",
121
- sortable: true
122
- },
123
- { field: "status" },
124
- { id: "updated" }
125
- ],
126
- filters: [{
127
- id: "status",
128
- type: "select"
129
- }, {
130
- id: "published_at",
131
- type: "date-range",
132
- label: "Publication"
138
+ }] },
139
+ list: {
140
+ columns: [
141
+ {
142
+ field: "title",
143
+ sortable: true
144
+ },
145
+ { field: "status" },
146
+ { id: "updated" }
147
+ ],
148
+ filters: [{
149
+ id: "status",
150
+ type: "select"
151
+ }, {
152
+ id: "published_at",
153
+ type: "date-range",
154
+ label: "Publication"
155
+ }],
156
+ sorts: ["title", "published_at"],
157
+ defaultSort: "title",
158
+ perPage: 20,
159
+ search: true
160
+ },
161
+ actions: [{
162
+ id: "publish",
163
+ label: "Publier",
164
+ scope: ["item", "selection"],
165
+ placement: ["row", "toolbar"],
166
+ confirm: { message: "Publier {count} pages ?" },
167
+ fields: [{
168
+ name: "notify",
169
+ type: "boolean"
170
+ }],
171
+ dryRun: true
133
172
  }],
134
- sorts: ["title", "published_at"],
135
- defaultSort: "title",
136
- perPage: 20,
137
- search: true
173
+ abilities: {
174
+ viewAny: true,
175
+ create: true
176
+ }
138
177
  },
139
- actions: [{
140
- id: "publish",
141
- label: "Publier",
142
- scope: ["item", "selection"],
143
- placement: ["row", "toolbar"],
144
- confirm: { message: "Publier {count} pages ?" },
178
+ {
179
+ id: "authors",
180
+ label: {
181
+ singular: "auteur",
182
+ plural: "auteurs"
183
+ },
184
+ open: "edit",
145
185
  fields: [{
146
- name: "notify",
147
- type: "boolean"
186
+ name: "name",
187
+ type: "text",
188
+ rules: [{ rule: "required" }]
189
+ }, {
190
+ name: "photo",
191
+ type: "media",
192
+ accept: ["image/*"]
148
193
  }]
149
- }, {
150
- id: "edit",
151
- label: "Modifier",
152
- kind: "link",
153
- url: "/pages/{id}/edit",
154
- scope: ["item"]
155
- }],
156
- abilities: {
157
- viewAny: true,
158
- create: true
159
- }
160
- }, {
161
- id: "authors",
162
- label: {
163
- singular: "auteur",
164
- plural: "auteurs"
165
194
  },
166
- fields: [{
167
- name: "name",
168
- type: "text",
169
- rules: [{ rule: "required" }]
170
- }]
171
- }],
195
+ {
196
+ id: "media",
197
+ kind: "media",
198
+ label: {
199
+ singular: "média",
200
+ plural: "médias"
201
+ },
202
+ itemActions: ["edit", "delete"],
203
+ itemTitle: "name",
204
+ fields: [
205
+ {
206
+ name: "file",
207
+ type: "file",
208
+ accept: [
209
+ "image/*",
210
+ "video/*",
211
+ "application/pdf"
212
+ ],
213
+ rules: [{ rule: "required" }]
214
+ },
215
+ {
216
+ name: "name",
217
+ type: "text"
218
+ },
219
+ {
220
+ name: "alt",
221
+ type: "text",
222
+ localized: true
223
+ }
224
+ ],
225
+ list: {
226
+ filters: [{
227
+ id: "type",
228
+ type: "select",
229
+ options: [
230
+ {
231
+ value: "image",
232
+ label: "Images"
233
+ },
234
+ {
235
+ value: "video",
236
+ label: "Vidéos"
237
+ },
238
+ {
239
+ value: "document",
240
+ label: "Documents"
241
+ }
242
+ ]
243
+ }],
244
+ search: true
245
+ },
246
+ abilities: {
247
+ viewAny: true,
248
+ create: true
249
+ }
250
+ }
251
+ ],
172
252
  menus: { main: [{ type: "resources" }, {
173
253
  type: "link",
174
254
  label: "Site",
@@ -181,7 +261,8 @@ function createExampleDefinition() {
181
261
  id: "google",
182
262
  label: "Google"
183
263
  }]
184
- }
264
+ },
265
+ uploads: { mode: "presigned" }
185
266
  };
186
267
  }
187
268
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"example.js","names":[],"sources":["../../src/mock/example.ts"],"sourcesContent":["import type { DefinitionInput } from '../schemas';\n\n/**\n * A small but complete definition: pages with localized titles, a status, a publication date shown\n * for published pages, an author and typed blocks, in tabs and a sidebar, plus authors. For tests\n * and stories, with `createMockBackend()`.\n */\nexport function createExampleDefinition(): DefinitionInput {\n return {\n protocol: 1,\n name: 'Test site',\n locale: 'fr',\n locales: ['fr', 'en'],\n api: { baseUrl: '/panneau/api' },\n resources: [\n {\n id: 'pages',\n label: { singular: 'page', plural: 'pages' },\n itemTitle: 'title',\n fields: [\n {\n name: 'title',\n type: 'text',\n label: 'Titre',\n localized: true,\n rules: [{ rule: 'required' }, { rule: 'max', value: 120 }],\n },\n {\n name: 'status',\n type: 'select',\n options: [\n { value: 'draft', label: 'Brouillon' },\n { value: 'published', label: 'Publiée' },\n ],\n rules: [\n { rule: 'required' },\n { rule: 'in', value: ['draft', 'published'] },\n ],\n },\n {\n name: 'published_at',\n type: 'datetime',\n visibleWhen: { field: 'status', equals: 'published' },\n rules: [{ rule: 'required' }],\n },\n { name: 'author', type: 'relation', resource: 'authors' },\n {\n name: 'blocks',\n type: 'repeater',\n types: [\n {\n id: 'text',\n label: 'Texte',\n fields: [\n {\n name: 'body',\n type: 'richtext',\n rules: [{ rule: 'required' }],\n },\n ],\n },\n {\n id: 'image',\n label: 'Image',\n fields: [\n {\n name: 'image',\n type: 'media',\n rules: [\n { rule: 'accept', value: ['image/*'] },\n { rule: 'maxSize', value: 1000 },\n ],\n },\n ],\n },\n ],\n },\n ],\n form: {\n layout: [\n {\n type: 'tabs',\n children: [\n {\n type: 'tab',\n label: 'Contenu',\n children: [\n {\n type: 'row',\n children: [\n { type: 'field', name: 'title', width: 8 },\n { type: 'field', name: 'status', width: 4 },\n ],\n },\n { type: 'field', name: 'blocks' },\n ],\n },\n ],\n },\n { type: 'sidebar', children: [{ type: 'field', name: 'published_at' }] },\n ],\n },\n list: {\n columns: [\n { field: 'title', sortable: true },\n { field: 'status' },\n { id: 'updated' },\n ],\n filters: [\n { id: 'status', type: 'select' },\n { id: 'published_at', type: 'date-range', label: 'Publication' },\n ],\n sorts: ['title', 'published_at'],\n defaultSort: 'title',\n perPage: 20,\n search: true,\n },\n actions: [\n {\n id: 'publish',\n label: 'Publier',\n scope: ['item', 'selection'],\n placement: ['row', 'toolbar'],\n confirm: { message: 'Publier {count} pages ?' },\n fields: [{ name: 'notify', type: 'boolean' }],\n },\n {\n id: 'edit',\n label: 'Modifier',\n kind: 'link',\n url: '/pages/{id}/edit',\n scope: ['item'],\n },\n ],\n abilities: { viewAny: true, create: true },\n },\n {\n id: 'authors',\n label: { singular: 'auteur', plural: 'auteurs' },\n fields: [{ name: 'name', type: 'text', rules: [{ rule: 'required' }] }],\n },\n ],\n menus: { main: [{ type: 'resources' }, { type: 'link', label: 'Site', url: '/' }] },\n auth: { mode: 'panneau', password: true, providers: [{ id: 'google', label: 'Google' }] },\n };\n}\n"],"mappings":";;;;;;AAOA,SAAgB,0BAA2C;CACvD,OAAO;EACH,UAAU;EACV,MAAM;EACN,QAAQ;EACR,SAAS,CAAC,MAAM,IAAI;EACpB,KAAK,EAAE,SAAS,eAAe;EAC/B,WAAW,CACP;GACI,IAAI;GACJ,OAAO;IAAE,UAAU;IAAQ,QAAQ;GAAQ;GAC3C,WAAW;GACX,QAAQ;IACJ;KACI,MAAM;KACN,MAAM;KACN,OAAO;KACP,WAAW;KACX,OAAO,CAAC,EAAE,MAAM,WAAW,GAAG;MAAE,MAAM;MAAO,OAAO;KAAI,CAAC;IAC7D;IACA;KACI,MAAM;KACN,MAAM;KACN,SAAS,CACL;MAAE,OAAO;MAAS,OAAO;KAAY,GACrC;MAAE,OAAO;MA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,CACnE;IACA,OAAO,CAAC,SAAS,cAAc;IAC/B,aAAa;IACb,SAAS;IACT,QAAQ;GACZ;GACA,SAAS,CACL;IACI,IAAI;IACJ,OAAO;IACP,OAAO,CAAC,QAAQ,WAAW;IAC3B,WAAW,CAAC,OAAO,SAAS;IAC5B,SAAS,EAAE,SAAS,0BAA0B;IAC9C,QAAQ,CAAC;KAAE,MAAM;KAAU,MAAM;IAAU,CAAC;GAChD,GACA;IACI,IAAI;IACJ,OAAO;IACP,MAAM;IACN,KAAK;IACL,OAAO,CAAC,MAAM;GAClB,CACJ;GACA,WAAW;IAAE,SAAS;IAAM,QAAQ;GAAK;EAC7C,GACA;GACI,IAAI;GACJ,OAAO;IAAE,UAAU;IAAU,QAAQ;GAAU;GAC/C,QAAQ,CAAC;IAAE,MAAM;IAAQ,MAAM;IAAQ,OAAO,CAAC,EAAE,MAAM,WAAW,CAAC;GAAE,CAAC;EAC1E,CACJ;EACA,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,YAAY,GAAG;GAAE,MAAM;GAAQ,OAAO;GAAQ,KAAK;EAAI,CAAC,EAAE;EAClF,MAAM;GAAE,MAAM;GAAW,UAAU;GAAM,WAAW,CAAC;IAAE,IAAI;IAAU,OAAO;GAAS,CAAC;EAAE;CAC5F;AACJ"}
1
+ {"version":3,"file":"example.js","names":[],"sources":["../../src/mock/example.ts"],"sourcesContent":["import type { DefinitionInput } from '../schemas';\n\n/**\n * A small but complete definition: pages with localized titles, a status, a publication date shown\n * for published pages, an author, an attachment and typed blocks, in tabs and a sidebar, plus\n * authors with a photo, and a media library. For tests\n * and stories, with `createMockBackend()`.\n */\nexport function createExampleDefinition(): DefinitionInput {\n return {\n protocol: 1,\n name: 'Test site',\n locale: 'fr',\n locales: ['fr', 'en'],\n api: { baseUrl: '/panneau/api' },\n resources: [\n {\n id: 'pages',\n label: { singular: 'page', plural: 'pages' },\n itemTitle: 'title',\n fields: [\n {\n name: 'title',\n type: 'text',\n label: 'Titre',\n localized: true,\n rules: [{ rule: 'required' }, { rule: 'max', value: 120 }],\n },\n {\n name: 'status',\n type: 'select',\n options: [\n { value: 'draft', label: 'Brouillon' },\n { value: 'published', label: 'Publiée' },\n ],\n rules: [\n { rule: 'required' },\n { rule: 'in', value: ['draft', 'published'] },\n ],\n },\n {\n name: 'published_at',\n type: 'datetime',\n visibleWhen: { field: 'status', equals: 'published' },\n rules: [{ rule: 'required' }],\n },\n { name: 'author', type: 'relation', resource: 'authors' },\n {\n name: 'blocks',\n type: 'repeater',\n types: [\n {\n id: 'text',\n label: 'Texte',\n fields: [\n {\n name: 'body',\n type: 'richtext',\n rules: [{ rule: 'required' }],\n },\n ],\n },\n {\n id: 'image',\n label: 'Image',\n fields: [\n {\n name: 'image',\n type: 'media',\n rules: [\n { rule: 'accept', value: ['image/*'] },\n { rule: 'maxSize', value: 1000 },\n ],\n },\n ],\n },\n ],\n },\n {\n name: 'attachment',\n type: 'file',\n label: 'Pièce jointe',\n rules: [{ rule: 'accept', value: ['application/pdf'] }],\n },\n {\n name: 'slug',\n type: 'slug',\n from: 'title',\n localized: true,\n check: true,\n settings: { prefix: 'https://example.com/' },\n },\n ],\n form: {\n layout: [\n {\n type: 'tabs',\n children: [\n {\n type: 'tab',\n label: 'Contenu',\n children: [\n {\n type: 'row',\n children: [\n { type: 'field', name: 'title', width: 8 },\n { type: 'field', name: 'status', width: 4 },\n ],\n },\n { type: 'field', name: 'blocks' },\n ],\n },\n ],\n },\n {\n type: 'sidebar',\n children: [\n { type: 'field', name: 'published_at' },\n { type: 'field', name: 'attachment' },\n ],\n },\n ],\n },\n list: {\n columns: [\n { field: 'title', sortable: true },\n { field: 'status' },\n { id: 'updated' },\n ],\n filters: [\n { id: 'status', type: 'select' },\n { id: 'published_at', type: 'date-range', label: 'Publication' },\n ],\n sorts: ['title', 'published_at'],\n defaultSort: 'title',\n perPage: 20,\n search: true,\n },\n actions: [\n {\n id: 'publish',\n label: 'Publier',\n scope: ['item', 'selection'],\n placement: ['row', 'toolbar'],\n confirm: { message: 'Publier {count} pages ?' },\n fields: [{ name: 'notify', type: 'boolean' }],\n dryRun: true,\n },\n ],\n abilities: { viewAny: true, create: true },\n },\n {\n id: 'authors',\n label: { singular: 'auteur', plural: 'auteurs' },\n // Titles open the form, without the panel of the details.\n open: 'edit',\n fields: [\n { name: 'name', type: 'text', rules: [{ rule: 'required' }] },\n { name: 'photo', type: 'media', accept: ['image/*'] },\n ],\n },\n {\n id: 'media',\n kind: 'media',\n label: { singular: 'média', plural: 'médias' },\n // Of the built-in item actions, only these, in this order\n itemActions: ['edit', 'delete'],\n itemTitle: 'name',\n fields: [\n {\n name: 'file',\n type: 'file',\n accept: ['image/*', 'video/*', 'application/pdf'],\n rules: [{ rule: 'required' }],\n },\n { name: 'name', type: 'text' },\n { name: 'alt', type: 'text', localized: true },\n ],\n list: {\n filters: [\n {\n id: 'type',\n type: 'select',\n options: [\n { value: 'image', label: 'Images' },\n { value: 'video', label: 'Vidéos' },\n { value: 'document', label: 'Documents' },\n ],\n },\n ],\n search: true,\n },\n abilities: { viewAny: true, create: true },\n },\n ],\n menus: { main: [{ type: 'resources' }, { type: 'link', label: 'Site', url: '/' }] },\n auth: { mode: 'panneau', password: true, providers: [{ id: 'google', label: 'Google' }] },\n uploads: { mode: 'presigned' },\n };\n}\n"],"mappings":";;;;;;;AAQA,SAAgB,0BAA2C;CACvD,OAAO;EACH,UAAU;EACV,MAAM;EACN,QAAQ;EACR,SAAS,CAAC,MAAM,IAAI;EACpB,KAAK,EAAE,SAAS,eAAe;EAC/B,WAAW;GACP;IACI,IAAI;IACJ,OAAO;KAAE,UAAU;KAAQ,QAAQ;IAAQ;IAC3C,WAAW;IACX,QAAQ;KACJ;MACI,MAAM;MACN,MAAM;MACN,OAAO;MACP,WAAW;MACX,OAAO,CAAC,EAAE,MAAM,WAAW,GAAG;OAAE,MAAM;OAAO,OAAO;MAAI,CAAC;KAC7D;KACA;MACI,MAAM;MACN,MAAM;MACN,SAAS,CACL;OAAE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MACI,IAAI;MACJ,MAAM;MACN,SAAS;OACL;QAAE,OAAO;QAAS,OAAO;OAAS;OAClC;QAAE,OAAO;QAAS,OAAO;OAAS;OAClC;QAAE,OAAO;QAAY,OAAO;OAAY;MAC5C;KACJ,CACJ;KACA,QAAQ;IACZ;IACA,WAAW;KAAE,SAAS;KAAM,QAAQ;IAAK;GAC7C;EACJ;EACA,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,YAAY,GAAG;GAAE,MAAM;GAAQ,OAAO;GAAQ,KAAK;EAAI,CAAC,EAAE;EAClF,MAAM;GAAE,MAAM;GAAW,UAAU;GAAM,WAAW,CAAC;IAAE,IAAI;IAAU,OAAO;GAAS,CAAC;EAAE;EACxF,SAAS,EAAE,MAAM,YAAY;CACjC;AACJ"}
@@ -1,11 +1,74 @@
1
- import type { DefinitionInput } from '../schemas';
2
- import type { Item } from '../schemas/api';
1
+ import { type ContextValues } from '../context.js';
2
+ import type { ContextOption, DefinitionInput } from '../schemas/index.js';
3
+ import type { EmbedValue, Item } from '../schemas/api.js';
4
+ import { type MockAuthOptions } from './auth.js';
5
+ export type { MockAuthOptions, MockMail, MockUser } from './auth.js';
3
6
  type Values = Record<string, unknown>;
4
7
  export interface MockBackendOptions {
5
8
  /** The definition served by `GET /definition`. Its `api.baseUrl` is the prefix of every route. */
6
9
  definition: DefinitionInput;
7
10
  /** Initial values of the items, per resource id. Items without an `id` get one. */
8
11
  items?: Record<string, Values[]>;
12
+ /**
13
+ * The URL that `POST /resources/{resource}/{id}/preview` returns, for the item with the posted
14
+ * values. Defaults to a `data:` URL of a plain page with the item's values.
15
+ */
16
+ previewUrl?: (context: {
17
+ resource: string;
18
+ item: Item;
19
+ }) => string;
20
+ /**
21
+ * The value of `GET /embeds?url=` for a URL, or `null` to refuse it with a `422`. Defaults to
22
+ * a video for YouTube and Vimeo URLs, and a link for other web pages.
23
+ */
24
+ embed?: (url: string) => EmbedValue | null;
25
+ /**
26
+ * The current context, when the definition has `context` (decision 0045). The values of the
27
+ * `Panneau-Context` header are checked against the choices of each param: a value that isn't
28
+ * one is a `403` problem.
29
+ */
30
+ context?: MockContextOptions;
31
+ /**
32
+ * Users and a session, for the `panneau` auth mode: the auth routes answer, guests get a `401`
33
+ * on the other routes, and with `auth.emailVerification`, users whose address isn't verified
34
+ * get its `403` problem (decision 0048). Without it, every request is the user's.
35
+ */
36
+ auth?: MockAuthOptions;
37
+ /**
38
+ * The data of `GET /dashboard/widgets/{widget}`, per widget id (decision 0064): the data, a
39
+ * function that returns it for the current context, or a `Response` to answer as is (a `403`,
40
+ * a slow or failing widget). Data that doesn't have the shape of a built-in type is a `500`
41
+ * problem that names the wrong keys, as a backend answers it. Widgets of the dashboard without
42
+ * data, and built-in `stat` and `list` on a resource, are a `404`.
43
+ */
44
+ widgets?: Record<string, MockWidget>;
45
+ /**
46
+ * Whether something else uses an item, so that it can't be deleted: `delete` skips it with
47
+ * the reason `in_use`, and its `undo` leaves it out. Without it, no item is in use.
48
+ */
49
+ inUse?: (context: {
50
+ resource: string;
51
+ item: Item;
52
+ }) => boolean;
53
+ }
54
+ /** The data of a widget in the mock backend: its data, or what answers it. */
55
+ export type MockWidget = Response | Record<string, unknown> | ((context: MockWidgetContext) => Response | Record<string, unknown> | Promise<Response | Record<string, unknown>>);
56
+ /** What the function of a widget of the mock backend gets. */
57
+ export interface MockWidgetContext {
58
+ /** The values of the context of the request. */
59
+ context: ContextValues;
60
+ /** The current items of a resource, in the context. */
61
+ items: (resource: string) => Item[];
62
+ }
63
+ /** How the mock backend answers the context of its definition (decision 0045). */
64
+ export interface MockContextOptions {
65
+ /**
66
+ * Every choice of a param without inline `options`, for the values of the params before it.
67
+ * `GET /context/{name}/options?q=` gives the first 20 whose label matches `q`.
68
+ */
69
+ options?: (name: string, before: ContextValues) => ContextOption[];
70
+ /** Whether an item of a resource is in the context, for lists, items, actions and search. */
71
+ scope?: (resource: string, item: Item, values: ContextValues) => boolean;
9
72
  }
10
73
  export interface MockBackend {
11
74
  /** A `fetch`-compatible function that answers protocol requests. */
@@ -15,10 +78,17 @@ export interface MockBackend {
15
78
  }
16
79
  /**
17
80
  * An in-memory backend that implements the protocol's resource routes: definition, list, show,
18
- * create, update (with `If-Match`), delete and the built-in `delete` action. Values are checked
19
- * with the portable rules. Used to test the conformance kit, and to develop frontends without a
20
- * real backend.
81
+ * create, update (with `If-Match`), delete, duplicate and the built-in `delete` action. A resource
82
+ * that declares its `delete` `undoable` has a trash: the result of `delete` says how to undo it,
83
+ * and the built-in `restore` puts the items back (decision 0063). Its items
84
+ * allow every built-in item action (`view`, `update`, `duplicate`, `delete`), unless an item of
85
+ * `items` gives its own `abilities`. It reads abilities as clients do (decision 0046): a resource
86
+ * without `viewAny` answers `403` on its list, one without `create` on creates, an item without
87
+ * `view`, `update` or `delete` on those requests; items leave out the values of fields with
88
+ * `view: false`, and writes ignore those of fields with `update: false`. Values are checked with
89
+ * the portable rules. Used to test the conformance kit, and to develop frontends without a real
90
+ * backend.
21
91
  */
22
- export declare function createMockBackend({ definition, items }: MockBackendOptions): MockBackend;
23
- export { createExampleDefinition } from './example';
92
+ export declare function createMockBackend(options: MockBackendOptions): MockBackend;
93
+ export { createExampleDefinition } from './example.js';
24
94
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mock/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAgB,IAAI,EAAsB,MAAM,gBAAgB,CAAC;AAI7E,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEtC,MAAM,WAAW,kBAAkB;IAC/B,kGAAkG;IAClG,UAAU,EAAE,eAAe,CAAC;IAC5B,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,WAAW;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