@drodil/backstage-plugin-qeta 3.7.2 → 3.8.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.
@@ -27,7 +27,14 @@ const CollectionPage = () => {
27
27
  description: t("collectionPage.info")
28
28
  },
29
29
  /* @__PURE__ */ React.createElement(CreateCollectionButton, null)
30
- ), /* @__PURE__ */ React.createElement(Grid, { container: true }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(CollectionCard, { collection })), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(PostsGrid, { collectionId: collection.id }))));
30
+ ), /* @__PURE__ */ React.createElement(Grid, { container: true }, /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(CollectionCard, { collection })), /* @__PURE__ */ React.createElement(Grid, { item: true, xs: 12 }, /* @__PURE__ */ React.createElement(
31
+ PostsGrid,
32
+ {
33
+ collectionId: collection.id,
34
+ orderBy: "rank",
35
+ allowRanking: collection.canEdit
36
+ }
37
+ ))));
31
38
  };
32
39
 
33
40
  export { CollectionPage };
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionPage.esm.js","sources":["../../../src/components/CollectionPage/CollectionPage.tsx"],"sourcesContent":["import React from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n CollectionCard,\n CollectionFollowButton,\n CreateCollectionButton,\n PostsGrid,\n useQetaApi,\n useTranslation,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { Skeleton } from '@material-ui/lab';\nimport { ContentHeader, WarningPanel } from '@backstage/core-components';\nimport { Grid, Typography } from '@material-ui/core';\n\nexport const CollectionPage = () => {\n const { id } = useParams();\n const { t } = useTranslation();\n\n const {\n value: collection,\n loading,\n error,\n } = useQetaApi(api => api.getCollection(id), [id]);\n\n if (loading) {\n return <Skeleton variant=\"rect\" height={200} />;\n }\n\n if (error || collection === undefined) {\n return (\n <WarningPanel severity=\"error\" title={t('questionPage.errorLoading')}>\n {error?.message}\n </WarningPanel>\n );\n }\n\n const title = (\n <Typography variant=\"h5\" component=\"h2\">\n {collection.title}\n <CollectionFollowButton collection={collection} />\n </Typography>\n );\n\n return (\n <>\n <ContentHeader\n titleComponent={title}\n description={t('collectionPage.info')}\n >\n <CreateCollectionButton />\n </ContentHeader>\n <Grid container>\n <Grid item xs={12}>\n <CollectionCard collection={collection} />\n </Grid>\n <Grid item xs={12}>\n <PostsGrid collectionId={collection.id} />\n </Grid>\n </Grid>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAcO,MAAM,iBAAiB,MAAM;AAClC,EAAM,MAAA,EAAE,EAAG,EAAA,GAAI,SAAU,EAAA,CAAA;AACzB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAE7B,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,UAAA;AAAA,IACP,OAAA;AAAA,IACA,KAAA;AAAA,GACF,GAAI,WAAW,CAAO,GAAA,KAAA,GAAA,CAAI,cAAc,EAAE,CAAA,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEjD,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAQ,EAAA,MAAA,EAAO,QAAQ,GAAK,EAAA,CAAA,CAAA;AAAA,GAC/C;AAEA,EAAI,IAAA,KAAA,IAAS,eAAe,KAAW,CAAA,EAAA;AACrC,IACE,uBAAA,KAAA,CAAA,aAAA,CAAC,gBAAa,QAAS,EAAA,OAAA,EAAQ,OAAO,CAAE,CAAA,2BAA2B,CAChE,EAAA,EAAA,KAAA,EAAO,OACV,CAAA,CAAA;AAAA,GAEJ;AAEA,EAAA,MAAM,KACJ,mBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,IAAK,EAAA,SAAA,EAAU,IAChC,EAAA,EAAA,UAAA,CAAW,KACZ,kBAAA,KAAA,CAAA,aAAA,CAAC,sBAAuB,EAAA,EAAA,UAAA,EAAwB,CAClD,CAAA,CAAA;AAGF,EAAA,uBAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,cAAgB,EAAA,KAAA;AAAA,MAChB,WAAA,EAAa,EAAE,qBAAqB,CAAA;AAAA,KAAA;AAAA,wCAEnC,sBAAuB,EAAA,IAAA,CAAA;AAAA,GAE1B,kBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,SAAA,EAAS,IACb,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,IAAK,EAAA,EAAA,IAAA,EAAI,IAAC,EAAA,EAAA,EAAI,EACb,EAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,UAAA,EAAwB,CAC1C,CAAA,kBACC,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,IAAI,EAAA,IAAA,EAAC,EAAI,EAAA,EAAA,EAAA,kBACZ,KAAA,CAAA,aAAA,CAAA,SAAA,EAAA,EAAU,YAAc,EAAA,UAAA,CAAW,EAAI,EAAA,CAC1C,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"CollectionPage.esm.js","sources":["../../../src/components/CollectionPage/CollectionPage.tsx"],"sourcesContent":["import React from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n CollectionCard,\n CollectionFollowButton,\n CreateCollectionButton,\n PostsGrid,\n useQetaApi,\n useTranslation,\n} from '@drodil/backstage-plugin-qeta-react';\nimport { Skeleton } from '@material-ui/lab';\nimport { ContentHeader, WarningPanel } from '@backstage/core-components';\nimport { Grid, Typography } from '@material-ui/core';\n\nexport const CollectionPage = () => {\n const { id } = useParams();\n const { t } = useTranslation();\n\n const {\n value: collection,\n loading,\n error,\n } = useQetaApi(api => api.getCollection(id), [id]);\n\n if (loading) {\n return <Skeleton variant=\"rect\" height={200} />;\n }\n\n if (error || collection === undefined) {\n return (\n <WarningPanel severity=\"error\" title={t('questionPage.errorLoading')}>\n {error?.message}\n </WarningPanel>\n );\n }\n\n const title = (\n <Typography variant=\"h5\" component=\"h2\">\n {collection.title}\n <CollectionFollowButton collection={collection} />\n </Typography>\n );\n\n return (\n <>\n <ContentHeader\n titleComponent={title}\n description={t('collectionPage.info')}\n >\n <CreateCollectionButton />\n </ContentHeader>\n <Grid container>\n <Grid item xs={12}>\n <CollectionCard collection={collection} />\n </Grid>\n <Grid item xs={12}>\n <PostsGrid\n collectionId={collection.id}\n orderBy=\"rank\"\n allowRanking={collection.canEdit}\n />\n </Grid>\n </Grid>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAcO,MAAM,iBAAiB,MAAM;AAClC,EAAM,MAAA,EAAE,EAAG,EAAA,GAAI,SAAU,EAAA,CAAA;AACzB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA,CAAA;AAE7B,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,UAAA;AAAA,IACP,OAAA;AAAA,IACA,KAAA;AAAA,GACF,GAAI,WAAW,CAAO,GAAA,KAAA,GAAA,CAAI,cAAc,EAAE,CAAA,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEjD,EAAA,IAAI,OAAS,EAAA;AACX,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAS,OAAQ,EAAA,MAAA,EAAO,QAAQ,GAAK,EAAA,CAAA,CAAA;AAAA,GAC/C;AAEA,EAAI,IAAA,KAAA,IAAS,eAAe,KAAW,CAAA,EAAA;AACrC,IACE,uBAAA,KAAA,CAAA,aAAA,CAAC,gBAAa,QAAS,EAAA,OAAA,EAAQ,OAAO,CAAE,CAAA,2BAA2B,CAChE,EAAA,EAAA,KAAA,EAAO,OACV,CAAA,CAAA;AAAA,GAEJ;AAEA,EAAA,MAAM,KACJ,mBAAA,KAAA,CAAA,aAAA,CAAC,UAAW,EAAA,EAAA,OAAA,EAAQ,IAAK,EAAA,SAAA,EAAU,IAChC,EAAA,EAAA,UAAA,CAAW,KACZ,kBAAA,KAAA,CAAA,aAAA,CAAC,sBAAuB,EAAA,EAAA,UAAA,EAAwB,CAClD,CAAA,CAAA;AAGF,EAAA,uBAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,aAAA;AAAA,IAAA;AAAA,MACC,cAAgB,EAAA,KAAA;AAAA,MAChB,WAAA,EAAa,EAAE,qBAAqB,CAAA;AAAA,KAAA;AAAA,wCAEnC,sBAAuB,EAAA,IAAA,CAAA;AAAA,GAC1B,sCACC,IAAK,EAAA,EAAA,SAAA,EAAS,wBACZ,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAK,MAAI,IAAC,EAAA,EAAA,EAAI,sBACZ,KAAA,CAAA,aAAA,CAAA,cAAA,EAAA,EAAe,YAAwB,CAC1C,CAAA,sCACC,IAAK,EAAA,EAAA,IAAA,EAAI,IAAC,EAAA,EAAA,EAAI,EACb,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,cAAc,UAAW,CAAA,EAAA;AAAA,MACzB,OAAQ,EAAA,MAAA;AAAA,MACR,cAAc,UAAW,CAAA,OAAA;AAAA,KAAA;AAAA,GAE7B,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "frontend",
8
8
  "backstage.io"
9
9
  ],
10
- "version": "3.7.2",
10
+ "version": "3.8.0",
11
11
  "main": "dist/index.esm.js",
12
12
  "types": "dist/index.d.ts",
13
13
  "prepublishOnly": "yarn tsc && yarn build",
@@ -54,8 +54,8 @@
54
54
  "@backstage/plugin-catalog-react": "^1.14.0",
55
55
  "@backstage/plugin-home-react": "^0.1.18",
56
56
  "@backstage/plugin-signals-react": "^0.0.6",
57
- "@drodil/backstage-plugin-qeta-common": "^3.7.2",
58
- "@drodil/backstage-plugin-qeta-react": "^3.7.2",
57
+ "@drodil/backstage-plugin-qeta-common": "^3.8.0",
58
+ "@drodil/backstage-plugin-qeta-react": "^3.8.0",
59
59
  "@material-ui/core": "^4.12.2",
60
60
  "@material-ui/icons": "^4.11.3",
61
61
  "@material-ui/lab": "4.0.0-alpha.61",