druxt-entity 0.25.0 → 0.25.1

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.
@@ -21,7 +21,7 @@ async function DruxtEntityStorybook({ stories }) {
21
21
  try {
22
22
  return {
23
23
  resourceType: `${entity}--${bundle}`,
24
- entities: (await druxt.getCollection(`${entity}--${bundle}`, new DrupalJsonApiParams().addFields(`${entity}--${bundle}`, ["id", "title", "name", "info"]))).data.map((o) => ({
24
+ entities: (await druxt.getCollection(`${entity}--${bundle}`, new DrupalJsonApiParams().addFilter("status", 1).addFields(`${entity}--${bundle}`, ["id", "title", "name", "info"]))).data.map((o) => ({
25
25
  id: o.id,
26
26
  title: (o.attributes || {}).title || (o.attributes || {}).name || (o.attributes || {}).info || o.id
27
27
  }))
@@ -25,7 +25,7 @@ async function DruxtEntityStorybook({ stories }) {
25
25
  try {
26
26
  return {
27
27
  resourceType: `${entity}--${bundle}`,
28
- entities: (await druxt$1.getCollection(`${entity}--${bundle}`, new drupalJsonapiParams.DrupalJsonApiParams().addFields(`${entity}--${bundle}`, ["id", "title", "name", "info"]))).data.map((o) => ({
28
+ entities: (await druxt$1.getCollection(`${entity}--${bundle}`, new drupalJsonapiParams.DrupalJsonApiParams().addFilter("status", 1).addFields(`${entity}--${bundle}`, ["id", "title", "name", "info"]))).data.map((o) => ({
29
29
  id: o.id,
30
30
  title: (o.attributes || {}).title || (o.attributes || {}).name || (o.attributes || {}).info || o.id
31
31
  }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "druxt-entity",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Drupal Display Mode powered Entity, Form and Field Druxt components.",
5
5
  "keywords": [
6
6
  "cms",
@@ -46,8 +46,8 @@
46
46
  "dependencies": {
47
47
  "deepmerge": "^4.2.2",
48
48
  "drupal-jsonapi-params": "^2.0.0",
49
- "druxt": "^0.19.0",
50
- "druxt-router": "^0.27.0",
49
+ "druxt": "^0.19.3",
50
+ "druxt-router": "^0.27.4",
51
51
  "druxt-schema": "^0.10.4"
52
52
  },
53
53
  "publishConfig": {
@@ -76,7 +76,9 @@ export const <%= mode.charAt(0).toUpperCase() + mode.slice(1) %> = Template.bind
76
76
  }
77
77
  <%= mode.charAt(0).toUpperCase() + mode.slice(1) %>.parameters = {
78
78
  docs: {
79
- storyDescription: 'Render the content entity form using the **<%= mode %>** display mode.',
79
+ description: {
80
+ story: 'Render the content entity form using the **<%= mode %>** display mode.',
81
+ },
80
82
  source: {
81
83
  code: '<DruxtEntityForm\n mode="<%= mode %>"\n type="<%= options.resourceType %>"\n uuid=<%= devalue(((options.entities || [])[0] || {}).id || false) %>\n/>'
82
84
  }
@@ -51,7 +51,9 @@ export const Wrapper = (args, { argTypes }) => ({
51
51
  })
52
52
  Wrapper.parameters = {
53
53
  docs: {
54
- storyDescription: 'The DruxtEntityForm component can be themed by using a Druxt Wrapper component.\n\nCreate an appropriately named component, using the relevant component option, with the following boilerplate:\n\n```jsx\n' + code + '\n```',
54
+ description: {
55
+ story: 'The DruxtEntityForm component can be themed by using a Druxt Wrapper component.\n\nCreate an appropriately named component, using the relevant component option, with the following boilerplate:\n\n```jsx\n' + code + '\n```',
56
+ },
55
57
  source: { code }
56
58
  }
57
59
  }
@@ -70,7 +72,9 @@ export const TemplateInjection = (args, { argTypes }) => ({
70
72
  })
71
73
  TemplateInjection.parameters = {
72
74
  docs: {
73
- storyDescription: 'The DruxtEntityForm component can be themed by injecting the default template into the compomnent.\n\n```jsx\n' + code + '\n```',
75
+ description: {
76
+ story: 'The DruxtEntityForm component can be themed by injecting the default template into the compomnent.\n\n```jsx\n' + code + '\n```',
77
+ },
74
78
  source: { code }
75
79
  }
76
80
  }
@@ -75,7 +75,9 @@ export const <%= mode.charAt(0).toUpperCase() + mode.slice(1) %> = Template.bind
75
75
  }
76
76
  <%= mode.charAt(0).toUpperCase() + mode.slice(1) %>.parameters = {
77
77
  docs: {
78
- storyDescription: 'Render the content entity using the **<%= mode %>** display mode.',
78
+ description: {
79
+ story: 'Render the content entity using the **<%= mode %>** display mode.',
80
+ },
79
81
  source: {
80
82
  code: '<DruxtEntity\n mode="<%= mode %>"\n type="<%= options.resourceType %>"\n uuid=<%= devalue(((options.entities || [])[0] || {}).id || false) %>\n/>'
81
83
  }
@@ -52,7 +52,9 @@ export const Wrapper = (args, { argTypes }) => ({
52
52
  })
53
53
  Wrapper.parameters = {
54
54
  docs: {
55
- storyDescription: 'The DruxtEntity component can be themed by using a Druxt Wrapper component.\n\nCreate an appropriately named component, using the relevant component option, with the following boilerplate:\n\n```jsx\n' + code + '\n```',
55
+ description: {
56
+ story: 'The DruxtEntity component can be themed by using a Druxt Wrapper component.\n\nCreate an appropriately named component, using the relevant component option, with the following boilerplate:\n\n```jsx\n' + code + '\n```',
57
+ },
56
58
  source: { code }
57
59
  }
58
60
  }
@@ -71,7 +73,9 @@ export const TemplateInjection = (args, { argTypes }) => ({
71
73
  })
72
74
  TemplateInjection.parameters = {
73
75
  docs: {
74
- storyDescription: 'The DruxtEntity component can be themed by injecting the default template into the compomnent.\n\n```jsx\n' + code + '\n```',
76
+ description: {
77
+ story: 'The DruxtEntity component can be themed by injecting the default template into the compomnent.\n\n```jsx\n' + code + '\n```',
78
+ },
75
79
  source: { code }
76
80
  }
77
81
  }