@opencraft/frontend-plugin-sandbox 1.2.0-alpha.1 → 1.2.0-alpha.3
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/.github/workflows/npm-package-for-pr.yaml +7 -4
- package/dist/components/CatalogBanner.js +15 -11
- package/dist/components/CatalogBanner.js.map +1 -1
- package/dist/components/DropDownToggler.js +1 -1
- package/dist/components/DropDownToggler.js.map +1 -1
- package/package.json +1 -2
- package/pnpm-workspace.yaml +13 -0
- package/src/components/CatalogBanner.tsx +36 -36
- package/src/components/DropDownToggler.tsx +1 -1
|
@@ -10,17 +10,20 @@ jobs:
|
|
|
10
10
|
steps:
|
|
11
11
|
- name: Checkout repository
|
|
12
12
|
uses: actions/checkout@v6
|
|
13
|
+
- name: Set up pnpm
|
|
14
|
+
uses: pnpm/action-setup@v6
|
|
15
|
+
with:
|
|
16
|
+
version: 11
|
|
13
17
|
- name: Setup Node.js
|
|
14
18
|
uses: actions/setup-node@v6
|
|
15
19
|
with:
|
|
16
20
|
node-version: '24'
|
|
17
|
-
cache: 'npm'
|
|
18
21
|
- name: Install dependencies
|
|
19
|
-
run:
|
|
22
|
+
run: pnpm install --frozen-lockfile
|
|
20
23
|
- name: Build
|
|
21
|
-
run:
|
|
24
|
+
run: pnpm run build
|
|
22
25
|
- name: Pack package
|
|
23
|
-
run:
|
|
26
|
+
run: pnpm pack
|
|
24
27
|
- name: Upload package
|
|
25
28
|
id: upload-package
|
|
26
29
|
uses: actions/upload-artifact@v7
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Image, Row, Stack } from '@openedx/paragon';
|
|
2
|
+
import { Image, Row, Col, Stack } from '@openedx/paragon';
|
|
3
3
|
import bannerBg from '../assets/banner-bg.png';
|
|
4
4
|
export const CatalogBanner = () => /*#__PURE__*/React.createElement(Row, {
|
|
5
5
|
direction: "horizontal",
|
|
6
6
|
className: "bg-primary"
|
|
7
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
8
|
+
xl: 7,
|
|
9
|
+
xs: 12,
|
|
10
|
+
className: "d-flex align-content-middle"
|
|
7
11
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
8
12
|
direction: "vertical",
|
|
9
|
-
className: "justify-content-center px-6",
|
|
13
|
+
className: "justify-content-center px-6 py-lg-6 py-5 my-lg-4",
|
|
10
14
|
style: {
|
|
11
15
|
maxWidth: '55rem'
|
|
12
16
|
}
|
|
@@ -16,20 +20,20 @@ export const CatalogBanner = () => /*#__PURE__*/React.createElement(Row, {
|
|
|
16
20
|
className: "text-brand-500"
|
|
17
21
|
}, ' Open edX® '), "demo"), /*#__PURE__*/React.createElement("p", {
|
|
18
22
|
className: "h4 text-light-100 "
|
|
19
|
-
}, "OpenClass is a demo site by OpenCraft where you can explore the Open edX platform as a learner or course author.")), /*#__PURE__*/React.createElement(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
}, "OpenClass is a demo site by OpenCraft where you can explore the Open edX platform as a learner or course author."))), /*#__PURE__*/React.createElement(Col, {
|
|
24
|
+
xl: 5,
|
|
25
|
+
xs: 12,
|
|
26
|
+
className: "d-flex align-content-middle"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
28
|
+
className: "justify-content-lg-end justify-content-center"
|
|
24
29
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
25
30
|
src: bannerBg,
|
|
31
|
+
className: "mt-lg-6",
|
|
26
32
|
style: {
|
|
27
33
|
height: '100%',
|
|
28
34
|
width: '100%',
|
|
29
|
-
|
|
30
|
-
objectFit: 'contain',
|
|
31
|
-
objectPosition: 'right top'
|
|
35
|
+
objectFit: "contain"
|
|
32
36
|
},
|
|
33
37
|
alt: "illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
|
|
34
|
-
})));
|
|
38
|
+
}))));
|
|
35
39
|
//# sourceMappingURL=CatalogBanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatalogBanner.js","names":["React","Image","Row","Stack","bannerBg","CatalogBanner","createElement","direction","className","
|
|
1
|
+
{"version":3,"file":"CatalogBanner.js","names":["React","Image","Row","Col","Stack","bannerBg","CatalogBanner","createElement","direction","className","xl","xs","style","maxWidth","src","height","width","objectFit","alt"],"sources":["../../src/components/CatalogBanner.tsx"],"sourcesContent":["import React from 'react';\nimport { Image, Row, Col, Stack } from '@openedx/paragon';\nimport bannerBg from '../assets/banner-bg.png';\n\nexport const CatalogBanner = () => (\n <Row\n direction=\"horizontal\"\n className=\"bg-primary\"\n >\n <Col xl={7} xs={12} className={\"d-flex align-content-middle\"}>\n <Stack\n direction=\"vertical\"\n className=\"justify-content-center px-6 py-lg-6 py-5 my-lg-4\"\n style={{ maxWidth: '55rem' }}\n >\n <h1 className=\"display-2 text-light-100\">\n You’re viewing a live\n <span className=\"text-brand-500\">\n {' Open edX® '}\n </span>\n demo\n </h1>\n <p className=\"h4 text-light-100 \">\n OpenClass is a demo site by OpenCraft where you can explore the\n Open edX platform as a learner or course author.\n </p>\n </Stack>\n </Col>\n <Col xl={5} xs={12} className={\"d-flex align-content-middle\"}>\n <Stack\n className=\"justify-content-lg-end justify-content-center\"\n >\n <Image\n src={bannerBg}\n className=\"mt-lg-6\"\n style={{\n height: '100%',\n width: '100%',\n objectFit: \"contain\",\n }}\n alt=\"illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant\"\n />\n </Stack>\n </Col>\n </Row>\n);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,GAAG,EAAEC,GAAG,EAAEC,KAAK,QAAQ,kBAAkB;AACzD,OAAOC,QAAQ,MAAM,yBAAyB;AAE9C,OAAO,MAAMC,aAAa,GAAGA,CAAA,kBAC3BN,KAAA,CAAAO,aAAA,CAACL,GAAG;EACFM,SAAS,EAAC,YAAY;EACtBC,SAAS,EAAC;AAAY,gBAEtBT,KAAA,CAAAO,aAAA,CAACJ,GAAG;EAACO,EAAE,EAAE,CAAE;EAACC,EAAE,EAAE,EAAG;EAACF,SAAS,EAAE;AAA8B,gBACzDT,KAAA,CAAAO,aAAA,CAACH,KAAK;EACJI,SAAS,EAAC,UAAU;EACpBC,SAAS,EAAC,kDAAkD;EAC5DG,KAAK,EAAE;IAAEC,QAAQ,EAAE;EAAQ;AAAE,gBAE7Bb,KAAA,CAAAO,aAAA;EAAIE,SAAS,EAAC;AAA0B,GAAC,4BAEvC,eAAAT,KAAA,CAAAO,aAAA;EAAME,SAAS,EAAC;AAAgB,GAC7B,aACG,CAAC,QAEL,CAAC,eACLT,KAAA,CAAAO,aAAA;EAAGE,SAAS,EAAC;AAAoB,GAAC,kHAG/B,CACE,CACN,CAAC,eACNT,KAAA,CAAAO,aAAA,CAACJ,GAAG;EAACO,EAAE,EAAE,CAAE;EAACC,EAAE,EAAE,EAAG;EAACF,SAAS,EAAE;AAA8B,gBACzDT,KAAA,CAAAO,aAAA,CAACH,KAAK;EACJK,SAAS,EAAC;AAA+C,gBAEzDT,KAAA,CAAAO,aAAA,CAACN,KAAK;EACJa,GAAG,EAAET,QAAS;EACdI,SAAS,EAAC,SAAS;EACnBG,KAAK,EAAE;IACLG,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE,MAAM;IACbC,SAAS,EAAE;EACb,CAAE;EACFC,GAAG,EAAC;AAA2I,CAChJ,CACI,CACJ,CACJ,CACN","ignoreList":[]}
|
|
@@ -11,7 +11,7 @@ export const DropDownToggler = ({
|
|
|
11
11
|
return /*#__PURE__*/React.createElement(Avatar, {
|
|
12
12
|
size: "1.5em",
|
|
13
13
|
src: avatar,
|
|
14
|
-
alt: authenticatedUser
|
|
14
|
+
alt: authenticatedUser?.username || 'Account'
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
DropDownToggler.propTypes = DesktopUserMenuTogglePropTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDownToggler.js","names":["React","useContext","Avatar","DesktopUserMenuTogglePropTypes","AppContext","DropDownToggler","avatar","authenticatedUser","createElement","size","src","alt","username","propTypes"],"sources":["../../src/components/DropDownToggler.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport Avatar from '@edx/frontend-component-header/dist/Avatar';\nimport { DesktopUserMenuTogglePropTypes } from '@edx/frontend-component-header/dist/desktop-header/DesktopUserMenuToggle';\nimport { AppContext } from '@edx/frontend-platform/react';\n\nexport const DropDownToggler = ({ avatar }) => {\n const { authenticatedUser } = useContext(AppContext);\n return (\n <Avatar size=\"1.5em\" src={avatar} alt={authenticatedUser
|
|
1
|
+
{"version":3,"file":"DropDownToggler.js","names":["React","useContext","Avatar","DesktopUserMenuTogglePropTypes","AppContext","DropDownToggler","avatar","authenticatedUser","createElement","size","src","alt","username","propTypes"],"sources":["../../src/components/DropDownToggler.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport Avatar from '@edx/frontend-component-header/dist/Avatar';\nimport { DesktopUserMenuTogglePropTypes } from '@edx/frontend-component-header/dist/desktop-header/DesktopUserMenuToggle';\nimport { AppContext } from '@edx/frontend-platform/react';\n\nexport const DropDownToggler = ({ avatar }) => {\n const { authenticatedUser } = useContext(AppContext);\n return (\n <Avatar size=\"1.5em\" src={avatar} alt={authenticatedUser?.username || 'Account'} />\n );\n};\n\nDropDownToggler.propTypes = DesktopUserMenuTogglePropTypes;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,MAAM,MAAM,4CAA4C;AAC/D,SAASC,8BAA8B,QAAQ,0EAA0E;AACzH,SAASC,UAAU,QAAQ,8BAA8B;AAEzD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC;AAAO,CAAC,KAAK;EAC7C,MAAM;IAAEC;EAAkB,CAAC,GAAGN,UAAU,CAACG,UAAU,CAAC;EACpD,oBACEJ,KAAA,CAAAQ,aAAA,CAACN,MAAM;IAACO,IAAI,EAAC,OAAO;IAACC,GAAG,EAAEJ,MAAO;IAACK,GAAG,EAAEJ,iBAAiB,EAAEK,QAAQ,IAAI;EAAU,CAAE,CAAC;AAEvF,CAAC;AAEDP,eAAe,CAACQ,SAAS,GAAGV,8BAA8B","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencraft/frontend-plugin-sandbox",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.3",
|
|
4
4
|
"description": "Plugin for custom headers and footers in OpenCraft's sandboxes",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"typescript": "^5.2.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"prepublish": "pnpm run build",
|
|
38
37
|
"build": "fedx-scripts babel -x .ts,.tsx src --out-dir dist --source-maps --ignore **/*.test.jsx,**/__mocks__,**/__snapshots__,**/setupTest.js --copy-files",
|
|
39
38
|
"lint": "fedx-scripts eslint --ext .ts --ext .tsx src/",
|
|
40
39
|
"lint:fix": "fedx-scripts eslint --fix --ext .ts --ext .tsx src/",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
allowBuilds:
|
|
2
|
+
'@bundled-es-modules/glob': false
|
|
3
|
+
'@parcel/watcher': false
|
|
4
|
+
core-js: false
|
|
5
|
+
core-js-pure: false
|
|
6
|
+
sharp: false
|
|
7
|
+
style-dictionary: false
|
|
8
|
+
unrs-resolver: false
|
|
9
|
+
blockExoticSubdeps: true
|
|
10
|
+
# Supply chain security configuration. See https://pnpm.io/supply-chain-security for more information.
|
|
11
|
+
minimumReleaseAge: 4320 # 3 days
|
|
12
|
+
trustPolicy: no-downgrade
|
|
13
|
+
trustPolicyIgnoreAfter: 43200 # 30 days
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Image, Row, Stack } from '@openedx/paragon';
|
|
2
|
+
import { Image, Row, Col, Stack } from '@openedx/paragon';
|
|
3
3
|
import bannerBg from '../assets/banner-bg.png';
|
|
4
4
|
|
|
5
5
|
export const CatalogBanner = () => (
|
|
@@ -7,40 +7,40 @@ export const CatalogBanner = () => (
|
|
|
7
7
|
direction="horizontal"
|
|
8
8
|
className="bg-primary"
|
|
9
9
|
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
10
|
+
<Col xl={7} xs={12} className={"d-flex align-content-middle"}>
|
|
11
|
+
<Stack
|
|
12
|
+
direction="vertical"
|
|
13
|
+
className="justify-content-center px-6 py-lg-6 py-5 my-lg-4"
|
|
14
|
+
style={{ maxWidth: '55rem' }}
|
|
15
|
+
>
|
|
16
|
+
<h1 className="display-2 text-light-100">
|
|
17
|
+
You’re viewing a live
|
|
18
|
+
<span className="text-brand-500">
|
|
19
|
+
{' Open edX® '}
|
|
20
|
+
</span>
|
|
21
|
+
demo
|
|
22
|
+
</h1>
|
|
23
|
+
<p className="h4 text-light-100 ">
|
|
24
|
+
OpenClass is a demo site by OpenCraft where you can explore the
|
|
25
|
+
Open edX platform as a learner or course author.
|
|
26
|
+
</p>
|
|
27
|
+
</Stack>
|
|
28
|
+
</Col>
|
|
29
|
+
<Col xl={5} xs={12} className={"d-flex align-content-middle"}>
|
|
30
|
+
<Stack
|
|
31
|
+
className="justify-content-lg-end justify-content-center"
|
|
32
|
+
>
|
|
33
|
+
<Image
|
|
34
|
+
src={bannerBg}
|
|
35
|
+
className="mt-lg-6"
|
|
36
|
+
style={{
|
|
37
|
+
height: '100%',
|
|
38
|
+
width: '100%',
|
|
39
|
+
objectFit: "contain",
|
|
40
|
+
}}
|
|
41
|
+
alt="illustration of a workspace with a computer screen displaying charts and graphs, accompanied by a desk lamp, coffee cup, and potted plant"
|
|
42
|
+
/>
|
|
43
|
+
</Stack>
|
|
44
|
+
</Col>
|
|
45
45
|
</Row>
|
|
46
46
|
);
|
|
@@ -6,7 +6,7 @@ import { AppContext } from '@edx/frontend-platform/react';
|
|
|
6
6
|
export const DropDownToggler = ({ avatar }) => {
|
|
7
7
|
const { authenticatedUser } = useContext(AppContext);
|
|
8
8
|
return (
|
|
9
|
-
<Avatar size="1.5em" src={avatar} alt={authenticatedUser
|
|
9
|
+
<Avatar size="1.5em" src={avatar} alt={authenticatedUser?.username || 'Account'} />
|
|
10
10
|
);
|
|
11
11
|
};
|
|
12
12
|
|