druxt 0.13.0 → 0.17.0
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.
- package/dist/components/DruxtDebug.stories.mjs +48 -0
- package/dist/components/DruxtDebug.vue +31 -4
- package/dist/components/DruxtModule.stories.mdx +126 -0
- package/dist/components/DruxtModule.vue +67 -11
- package/dist/druxt.esm.js +181 -33
- package/dist/druxt.ssr.js +182 -33
- package/package.json +8 -1
- package/stories/README.stories.mdx +74 -0
- package/CHANGELOG.md +0 -338
package/CHANGELOG.md
DELETED
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
# druxt
|
|
2
|
-
|
|
3
|
-
## 0.13.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- 77ab204: Added ability to proxy the API
|
|
8
|
-
|
|
9
|
-
```js
|
|
10
|
-
export default {
|
|
11
|
-
druxt: {
|
|
12
|
-
proxy: {
|
|
13
|
-
api: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Creates two proxy entries:
|
|
20
|
-
|
|
21
|
-
- The JSON:API: `${ENDPOINT}` -> `${BASEURL}${ENDPOINT}`
|
|
22
|
-
- The Decoupled Router:`/router/translate-path` -> `${BASEURL}/router/translate-path`
|
|
23
|
-
|
|
24
|
-
- 77ab204: Added ability to proxy the Drupal file system
|
|
25
|
-
|
|
26
|
-
```js
|
|
27
|
-
export default {
|
|
28
|
-
druxt: {
|
|
29
|
-
proxy: {
|
|
30
|
-
files: "default"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Creates a proxy entry:
|
|
37
|
-
|
|
38
|
-
- `/sites/${PATH}/files` -> `${BASEURL}/site/${PATH}/files`
|
|
39
|
-
|
|
40
|
-
- c4457e1: Changed template injected module components to not use a DruxtWrapper component by default.
|
|
41
|
-
- e7b1533: Refactored DruxtModule fetch hooks
|
|
42
|
-
|
|
43
|
-
## 0.12.0
|
|
44
|
-
|
|
45
|
-
### Minor Changes
|
|
46
|
-
|
|
47
|
-
- 897dcbc: Added createResource method to DruxtClient
|
|
48
|
-
|
|
49
|
-
```js
|
|
50
|
-
this.$druxt.createResource({ type, attributes: {}, relationships: {} });
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
- 897dcbc: Added updateResource method to DruxtClient
|
|
54
|
-
|
|
55
|
-
```js
|
|
56
|
-
await this.$druxt.updateResource({
|
|
57
|
-
type,
|
|
58
|
-
id,
|
|
59
|
-
attributes: {},
|
|
60
|
-
relationships: {}
|
|
61
|
-
});
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
- 4504a2f: Added getRelated() method
|
|
65
|
-
|
|
66
|
-
```js
|
|
67
|
-
await this.$druxt.getRelated(type, id, related);
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
- e3e634c: Enabled Components auto-discovery by default
|
|
71
|
-
|
|
72
|
-
## 0.11.0
|
|
73
|
-
|
|
74
|
-
### Minor Changes
|
|
75
|
-
|
|
76
|
-
- dae345e: Added Druxt modules settings to `$druxt.settings`
|
|
77
|
-
|
|
78
|
-
### Patch Changes
|
|
79
|
-
|
|
80
|
-
- 75ff8a9: Fixed issue with Axios settings and Storybook
|
|
81
|
-
|
|
82
|
-
## 0.10.0
|
|
83
|
-
|
|
84
|
-
### Minor Changes
|
|
85
|
-
|
|
86
|
-
- 715e5ef: Updated component registration method to use the Nuxt `components:dirs` hook
|
|
87
|
-
- 2b8c3f3: Added DruxtDebug component
|
|
88
|
-
- 317184e: Added Druxt API URL to Nuxt CLI badge
|
|
89
|
-
|
|
90
|
-
## 0.9.0
|
|
91
|
-
|
|
92
|
-
### Minor Changes
|
|
93
|
-
|
|
94
|
-
- 21170fb: Moved Vue components out of bundle
|
|
95
|
-
|
|
96
|
-
⚠ Potential breaking change
|
|
97
|
-
|
|
98
|
-
_**Note:** This only effects custom Druxt modules and implementations._
|
|
99
|
-
|
|
100
|
-
```diff
|
|
101
|
-
-import { DruxtModule } from 'druxt'
|
|
102
|
-
+import DruxtModule from 'druxt/dist/components/DruxtModule.vue'
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## 0.8.3
|
|
106
|
-
|
|
107
|
-
### Patch Changes
|
|
108
|
-
|
|
109
|
-
- Fixed issue with attrs passthrough
|
|
110
|
-
|
|
111
|
-
## 0.8.2
|
|
112
|
-
|
|
113
|
-
### Patch Changes
|
|
114
|
-
|
|
115
|
-
- Fixed bug with fetchKey and attrs passthrough
|
|
116
|
-
|
|
117
|
-
## 0.8.1
|
|
118
|
-
|
|
119
|
-
### Patch Changes
|
|
120
|
-
|
|
121
|
-
- Fixed DruxtModule emit behavior
|
|
122
|
-
|
|
123
|
-
## 0.8.0
|
|
124
|
-
|
|
125
|
-
### Minor Changes
|
|
126
|
-
|
|
127
|
-
- Added support for default template injection to DruxtModule
|
|
128
|
-
|
|
129
|
-
_**Example:** Default template injection with DruxtEntity and DruxtMenu components_
|
|
130
|
-
|
|
131
|
-
```vue
|
|
132
|
-
<DruxtEntity v-bind="props">
|
|
133
|
-
<template #default="{ entity }">
|
|
134
|
-
<h2>{{ entity.attributes.title }}</h2>
|
|
135
|
-
<DruxtMenu name="main" :depth="1" :parentId="parentId(entity)">
|
|
136
|
-
<template #default="{ items }">
|
|
137
|
-
{{ items }}
|
|
138
|
-
</template>
|
|
139
|
-
</DruxtMenu>
|
|
140
|
-
</template>
|
|
141
|
-
</DruxtEntity>
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## 0.7.1
|
|
145
|
-
|
|
146
|
-
### Patch Changes
|
|
147
|
-
|
|
148
|
-
- Fixed issue with attrs passthrough
|
|
149
|
-
- Updated support for Drupal JSON-API Params
|
|
150
|
-
|
|
151
|
-
Thanks to [d34dman](https://github.com/d34dman)
|
|
152
|
-
|
|
153
|
-
## 0.7.0
|
|
154
|
-
|
|
155
|
-
### Minor Changes
|
|
156
|
-
|
|
157
|
-
- Added support for v-model to DruxtModule
|
|
158
|
-
|
|
159
|
-
_**Example:** Passing a custom entity model to the DruxtEntity component_
|
|
160
|
-
|
|
161
|
-
```vue
|
|
162
|
-
<DruxtEntity
|
|
163
|
-
type="node--article"
|
|
164
|
-
v-model="{
|
|
165
|
-
attributes: {
|
|
166
|
-
title: 'My Entity',
|
|
167
|
-
field_name: 'Value'
|
|
168
|
-
},
|
|
169
|
-
relationships: {}
|
|
170
|
-
}"
|
|
171
|
-
/>
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## 0.6.1
|
|
175
|
-
|
|
176
|
-
### Patch Changes
|
|
177
|
-
|
|
178
|
-
- Fixed issue with normalizaton of include/sort data
|
|
179
|
-
- Fixed issue with queryobject in getResource action
|
|
180
|
-
- Updated dependencies
|
|
181
|
-
|
|
182
|
-
## 0.6.0
|
|
183
|
-
|
|
184
|
-
### Minor Changes
|
|
185
|
-
|
|
186
|
-
- Refactored DruxtStore
|
|
187
|
-
- Added support for partial resources
|
|
188
|
-
- Added dehyrdation/rehydration of included resources and collections
|
|
189
|
-
- Fixed issue with DruxtStore reactivity
|
|
190
|
-
|
|
191
|
-
## 0.5.1
|
|
192
|
-
|
|
193
|
-
### Patch Changes
|
|
194
|
-
|
|
195
|
-
- Fixed issue with getWrapperData
|
|
196
|
-
- Fixed issue with DruxtStore reactivity
|
|
197
|
-
|
|
198
|
-
## 0.5.0
|
|
199
|
-
|
|
200
|
-
### Minor Changes
|
|
201
|
-
|
|
202
|
-
- Added DruxtModule component
|
|
203
|
-
|
|
204
|
-
```vue
|
|
205
|
-
<script>
|
|
206
|
-
import { DruxtModule } from "druxt";
|
|
207
|
-
export default {
|
|
208
|
-
name: "MyCustomDruxtModule",
|
|
209
|
-
extends: DruxtModule
|
|
210
|
-
};
|
|
211
|
-
</script>
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
- For more details, refer to the [DruxtModule API documentation](/api/packages/druxt/components/DruxtModule)
|
|
215
|
-
|
|
216
|
-
- Added \$attrs/props splitting
|
|
217
|
-
|
|
218
|
-
## 0.4.2
|
|
219
|
-
|
|
220
|
-
### Patch Changes
|
|
221
|
-
|
|
222
|
-
- Added metadata to Nuxt module
|
|
223
|
-
|
|
224
|
-
## 0.4.1
|
|
225
|
-
|
|
226
|
-
### Patch Changes
|
|
227
|
-
|
|
228
|
-
- Fixed dependency issues
|
|
229
|
-
|
|
230
|
-
## 0.4.0
|
|
231
|
-
|
|
232
|
-
### Minor Changes
|
|
233
|
-
|
|
234
|
-
- Added DruxtClient
|
|
235
|
-
|
|
236
|
-
_**Example:** Using the DruxtClient to load a JSON:API resource in a node.js application_
|
|
237
|
-
|
|
238
|
-
```js
|
|
239
|
-
import { DruxtClient } from 'druxt'
|
|
240
|
-
const druxt = new DruxtClient('https://demo-api.druxtjs.org')
|
|
241
|
-
druxt.getResource('node--page', uuid, query).then((resource) => {
|
|
242
|
-
console.log('getResource', resource)
|
|
243
|
-
}))
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
- For more details, refer to the [DruxtClient API documentation](/api/packages/druxt/client)
|
|
247
|
-
|
|
248
|
-
- Added DruxtStore
|
|
249
|
-
|
|
250
|
-
_**Example:** Using the DruxtStore to load a JSON:API resource within Nuxt_
|
|
251
|
-
|
|
252
|
-
```vue
|
|
253
|
-
<script>
|
|
254
|
-
export default {
|
|
255
|
-
data: () => ({
|
|
256
|
-
resource: null
|
|
257
|
-
}),
|
|
258
|
-
|
|
259
|
-
async fetch() {
|
|
260
|
-
const resource = await this.$store.dispatch("druxt/getResource", {
|
|
261
|
-
type: "node--article",
|
|
262
|
-
id: uuid,
|
|
263
|
-
query
|
|
264
|
-
});
|
|
265
|
-
this.resource = resource;
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
</script>
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
- For more details, refer to the [DruxtStore API documentation](/api/packages/druxt/stores/druxt)
|
|
272
|
-
|
|
273
|
-
- Added \$druxt plugin wrapper for DruxtClient
|
|
274
|
-
|
|
275
|
-
## 0.3.4
|
|
276
|
-
|
|
277
|
-
### Patch Changes
|
|
278
|
-
|
|
279
|
-
- Updated dependencies
|
|
280
|
-
|
|
281
|
-
## 0.3.3
|
|
282
|
-
|
|
283
|
-
### Patch Changes
|
|
284
|
-
|
|
285
|
-
- Added Inner prop to DruxtComponentMixin
|
|
286
|
-
|
|
287
|
-
## 0.3.2
|
|
288
|
-
|
|
289
|
-
### Patch Changes
|
|
290
|
-
|
|
291
|
-
- Added sorting of component options
|
|
292
|
-
- Fixed issue with component options
|
|
293
|
-
|
|
294
|
-
## 0.3.1
|
|
295
|
-
|
|
296
|
-
### Patch Changes
|
|
297
|
-
|
|
298
|
-
- Added DruxtWrapper to DruxtComponentMixin
|
|
299
|
-
- Added unique filter to component options
|
|
300
|
-
|
|
301
|
-
## 0.3.0
|
|
302
|
-
|
|
303
|
-
### Minor Changes
|
|
304
|
-
|
|
305
|
-
- Moved Site functionality to the [DruxtSite module](/modules/site)
|
|
306
|
-
- Added Druxt component and mixin
|
|
307
|
-
- Added available component options data
|
|
308
|
-
- Removed unused Class and Store
|
|
309
|
-
|
|
310
|
-
## 0.2.1
|
|
311
|
-
|
|
312
|
-
### Patch Changes
|
|
313
|
-
|
|
314
|
-
- Added @nuxtjs/proxy and default configuration
|
|
315
|
-
- Updated dependencies for no-JS support
|
|
316
|
-
|
|
317
|
-
## 0.2.0
|
|
318
|
-
|
|
319
|
-
### Minor Changes
|
|
320
|
-
|
|
321
|
-
- Updated dependencies for no-JS support
|
|
322
|
-
|
|
323
|
-
## 0.1.2
|
|
324
|
-
|
|
325
|
-
### Patch Changes
|
|
326
|
-
|
|
327
|
-
- Fixed Vuex store installation
|
|
328
|
-
- Updated dependencies
|
|
329
|
-
|
|
330
|
-
## 0.1.1
|
|
331
|
-
|
|
332
|
-
### Patch Changes
|
|
333
|
-
|
|
334
|
-
- Removed schema generation workaround
|
|
335
|
-
|
|
336
|
-
## 0.1.0
|
|
337
|
-
|
|
338
|
-
### Initial release
|