Skip to content
Snippets Groups Projects
Verified Commit bff0cc2a authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: wip showroom

parent 27964ab4
No related branches found
No related tags found
No related merge requests found
Showing
with 677 additions and 352 deletions
...@@ -29,6 +29,18 @@ tasks: ...@@ -29,6 +29,18 @@ tasks:
cmds: cmds:
- run-showroom - run-showroom
build-and-publish-showroom:
silent: true
desc: Build the showroom to dist/showroom and publish it to the s3 bucket
cmds:
- build-and-publish-showroom
create-new-showroom-page:
silent: true
desc: Create a new showroom page
cmds:
- create-new-showroom-page
run-theme-generator: run-theme-generator:
silent: true silent: true
desc: Start and run the theme generator desc: Start and run the theme generator
......
...@@ -14,7 +14,15 @@ ...@@ -14,7 +14,15 @@
<li><a href="/">Back to overview</a></li> <li><a href="/">Back to overview</a></li>
</ul> </ul>
<main> <main>
<!-- Write your code here --> <monster-field-set>
<label>N1<input type="text" name="name1" id="name1" placeholder="Name1"></label>
<label>N2<input type="text" name="name2" id="name2" placeholder="Name2"></label>
<label>N3<input type="text" name="name3" id="name3" placeholder="Name3"></label>
<label>N4<input type="text" name="name4" id="name4" placeholder="Name4"></label>
<label>N5<input type="text" name="name5" id="name5" placeholder="Name5"></label>
</monster-field-set>
</main> </main>
</body> </body>
......
...@@ -8,4 +8,5 @@ ...@@ -8,4 +8,5 @@
import "../../../source/components/style/property.pcss"; import "../../../source/components/style/property.pcss";
import "../../../source/components/style/normalize.pcss"; import "../../../source/components/style/normalize.pcss";
import "../../../source/components/style/typography.pcss"; import "../../../source/components/style/typography.pcss";
import "../../../source/components/form/field-set.mjs";
...@@ -7,7 +7,7 @@ import "../../../source/components/style/form.pcss"; ...@@ -7,7 +7,7 @@ import "../../../source/components/style/form.pcss";
import "../../../source/components/style/link.pcss"; import "../../../source/components/style/link.pcss";
import "../../../source/components/style/button.pcss"; import "../../../source/components/style/button.pcss";
import "../../../source/components/style/ripple.pcss"; import "../../../source/components/style/ripple.pcss";
import "../../../source/components/layout/split-screen.mjs"; import "../../../source/components/layout/split-panel.mjs";
import "./main.pcss"; import "./main.pcss";
...@@ -27,6 +27,10 @@ function scanSymbols(root) { ...@@ -27,6 +27,10 @@ function scanSymbols(root) {
continue; continue;
} }
if (f.path.endsWith("/stylesheet")||f.path.endsWith("stylesheet/mixin")) {
continue;
}
const fn = join(root, f.name); const fn = join(root, f.name);
let content = readFileSync(fn, 'utf8'); let content = readFileSync(fn, 'utf8');
......
This diff is collapsed.
const fs = require('fs'); import fs from "fs";
const os = require('os'); import path from "path";
const path = require('path'); import {projectRoot} from "./import.mjs";
const process = require('process');
const args = process.argv.slice(2); const args = process.argv.slice(2);
...@@ -10,8 +10,6 @@ if (args.length < 1) { ...@@ -10,8 +10,6 @@ if (args.length < 1) {
process.exit(1); process.exit(1);
} }
const projectRoot = args[0];
if (!fs.existsSync(projectRoot)) { if (!fs.existsSync(projectRoot)) {
console.log("Project root " + projectRoot + " does not exist"); console.log("Project root " + projectRoot + " does not exist");
process.exit(1); process.exit(1);
...@@ -32,6 +30,7 @@ const packageJsonContent = JSON.parse( fs.readFileSync(packageJson, 'utf8')); ...@@ -32,6 +30,7 @@ const packageJsonContent = JSON.parse( fs.readFileSync(packageJson, 'utf8'));
const docPath = path.normalize(absoluteProjectRoot + 'dist/doc/') const docPath = path.normalize(absoluteProjectRoot + 'dist/doc/')
const dir = fs.opendirSync(docPath); const dir = fs.opendirSync(docPath);
let f;
while ((f = dir.readSync()) !== null) { while ((f = dir.readSync()) !== null) {
if (!f.isFile()) { if (!f.isFile()) {
continue; continue;
......
File moved
...@@ -407,7 +407,6 @@ in { ...@@ -407,7 +407,6 @@ in {
''; '';
scripts.run-theme-generator.exec = '' scripts.run-theme-generator.exec = ''
if ! ${pkgs.nodePackages.pnpm}/bin/pnpx vite --config "${config.devenv.root}/theme-generator/vite.config.js"; then if ! ${pkgs.nodePackages.pnpm}/bin/pnpx vite --config "${config.devenv.root}/theme-generator/vite.config.js"; then
echo "ERROR: Vite build failed, check your JS!" echo "ERROR: Vite build failed, check your JS!"
exit 1 exit 1
...@@ -415,12 +414,38 @@ in { ...@@ -415,12 +414,38 @@ in {
''; '';
scripts.run-showroom.exec = '' scripts.run-showroom.exec = ''
if ! ${pkgs.nodePackages.pnpm}/bin/pnpx vite --config "${config.devenv.root}/showroom/vite.config.js"; then if ! ${pkgs.nodePackages.pnpm}/bin/pnpx vite --config "${config.devenv.root}/showroom/vite.config.js"; then
echo "ERROR: Vite build failed, check your JS!" echo "ERROR: Vite build failed, check your JS!"
exit 1 exit 1
fi fi
'';
scripts.create-new-showroom-page.exec = ''
#!${pkgs.bash}/bin/bash
source ${commonFunctionsScript}
echo_section "create new showroom page"
if ! ${pkgs.nodejs_20}/bin/node ${config.devenv.root}/development/scripts/createNewShowrootmPage.mjs "$@"
then
echo_fail "script createNewClass.mjs failed, check your JS!"
exit 1
fi
echo_ok "New showroom page created"
'';
scripts.build-and-publish-showroom.exec = ''
rm -rf "${config.devenv.root}/showroom/dist/showroom"
if ! ${pkgs.nodePackages.pnpm}/bin/pnpx vite build --config "${config.devenv.root}/showroom/vite.config.js"; then
echo "ERROR: Vite build failed, check your JS!"
exit 1
fi
mv "${config.devenv.root}/showroom/dist/source" "${config.devenv.root}/showroom/dist/showroom"
${pkgs.awscli}/bin/aws --profile=shopcloud s3 --recursive --only-show-errors cp ${config.devenv.root}/showroom/dist/ s3://monsterjs.org/en/
''; '';
...@@ -725,7 +750,7 @@ in { ...@@ -725,7 +750,7 @@ in {
fi fi
${config.devenv.root}/node_modules/.bin/jsdoc -c ${config.devenv.root}/doc/jsdoc.json ${config.devenv.root}/node_modules/.bin/jsdoc -c ${config.devenv.root}/doc/jsdoc.json
${pkgs.nodejs_20}/bin/node ${config.devenv.root}/opt/scripts/replace-skypack.cjs ${config.devenv.root} ${pkgs.nodejs_20}/bin/node ${config.devenv.root}/development/scripts/replaceSkypack.cjs
''; '';
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*:not(:defined) {
visibility: hidden;
}
</style>
</head>
<body>
<h1>Components</h1>
<h2>Layout</h2>
<a href="source/component.layout.collapse.html">Collapse</a>
</body>
</html>
\ No newline at end of file
const json =
`{
"dataset": [
{
"erpID": "",
"type": "order",
"erpName": "mix up erp9",
"erpNumber": "",
"erpLastUpdate": "2020-01-16T10:27:18",
"erpCreation": "2020-01-16T10:27:18",
"archived": false,
"oid": 88,
"orderDate": "2019-01-16T10:27:18",
"orderState": 57,
"orderLastStatusChange": "2019-01-16T10:38:53",
"customerUID": 30,
"customerNotice": "",
"billingAddressAID": 16,
"deliveryAddressAID": 16,
"deliveryNotice": "",
"paymentPID": 101,
"assigndTickets": "",
"resubmissionDate": "1970-01-01T12:00:00",
"resubmissionInfo": "",
"acquisitionPartnerID": 0,
"acquisitionInfo": "",
"acquisitionRedirect": null,
"acquisitionDate": "1970-01-01T12:00:00",
"shippingNotice": "",
"shippingDCID": 2,
"retoureRID": 0,
"companySHID": 1,
"salesmanUID": 0,
"channelOrderID": "",
"channelOrderState": "0",
"channelOrderDate": null,
"channelOrderData": {}
},
{
"erpID": "",
"type": "retoure",
"erpName": "erp 2",
"erpNumber": "",
"erpLastUpdate": "2020-01-16T10:27:18",
"erpCreation": "2020-01-16T10:27:18",
"archived": true,
"oid": 1000,
"orderDate": "2019-01-16T10:27:18",
"orderState": 57,
"orderLastStatusChange": "2019-01-16T10:38:53",
"customerUID": 30,
"customerNotice": "",
"billingAddressAID": 16,
"deliveryAddressAID": 16,
"deliveryNotice": "",
"paymentPID": 101,
"assigndTickets": "",
"resubmissionDate": "1970-01-01T12:00:00",
"resubmissionInfo": "",
"acquisitionPartnerID": 0,
"acquisitionInfo": "",
"acquisitionRedirect": null,
"acquisitionDate": "1970-01-01T12:00:00",
"shippingNotice": "",
"shippingDCID": 2,
"retoureRID": 0,
"companySHID": 1,
"salesmanUID": 0,
"channelOrderID": "",
"channelOrderState": "0",
"channelOrderDate": null,
"channelOrderData": {}
},
{
"erpID": "",
"type": "shipping",
"erpName": "erp4",
"erpNumber": "",
"erpLastUpdate": "2020-01-16T10:27:18",
"erpCreation": "2020-01-16T10:27:18",
"archived": false,
"oid": 1001,
"orderDate": "2019-01-16T10:27:18",
"orderState": 57,
"orderLastStatusChange": "2019-02-16T10:38:53",
"customerUID": 30,
"customerNotice": "",
"billingAddressAID": 16,
"deliveryAddressAID": 16,
"deliveryNotice": "",
"paymentPID": 101,
"assigndTickets": "",
"resubmissionDate": "1970-01-01T12:00:00",
"resubmissionInfo": "",
"acquisitionPartnerID": 0,
"acquisitionInfo": "",
"acquisitionRedirect": null,
"acquisitionDate": "1970-01-01T12:00:00",
"shippingNotice": "",
"shippingDCID": 2,
"retoureRID": 0,
"companySHID": 1,
"salesmanUID": 0,
"channelOrderID": "",
"channelOrderState": "0",
"channelOrderDate": null,
"channelOrderData": {}
},
{
"erpID": "",
"erpName": "erpedsdf",
"erpNumber": "",
"erpLastUpdate": "2020-01-16T10:27:18",
"erpCreation": "2020-01-16T10:27:18",
"archived": false,
"oid": 1002,
"orderDate": "2019-01-16T10:27:18",
"orderState": 57,
"orderLastStatusChange": "2019-03-16T10:38:53",
"customerUID": 30,
"customerNotice": "",
"billingAddressAID": 16,
"deliveryAddressAID": 16,
"deliveryNotice": "",
"paymentPID": 101,
"assigndTickets": "",
"resubmissionDate": "1970-01-01T12:00:00",
"resubmissionInfo": "",
"acquisitionPartnerID": 0,
"acquisitionInfo": "",
"acquisitionRedirect": null,
"acquisitionDate": "1970-01-01T12:00:00",
"shippingNotice": "",
"shippingDCID": 2,
"retoureRID": 0,
"companySHID": 1,
"salesmanUID": 0,
"channelOrderID": "",
"channelOrderState": "0",
"channelOrderDate": null,
"channelOrderData": {}
}
],
"sys": {
"pagination": {
"currentPage": 1,
"nextOffset": 3,
"pages": 1,
"prevOffset": null,
"offset": 0,
"objectsPerPage": 20,
"total": 3
},
"message": "200 OK",
"code": 200
}}`
const data = JSON.parse(json)
const requestDelay = 1000
export default [
{
url: '/demo/bind-with-datasource/data.json',
method: 'get',
rawResponse: async (req, res) => {
res.setHeader('Content-Type', 'application/json')
res.statusCode = 200
setTimeout(function() {
res.end(json)
}, requestDelay);
},
},
{
url: '/demo/bind-with-datasource/data.json',
method: 'post',
rawResponse: async (req, res) => {
let reqbody = ''
await new Promise((resolve) => {
req.on('data', (chunk) => {
reqbody += chunk
})
req.on('end', () => resolve(undefined))
})
res.setHeader('Content-Type', 'application/json')
res.statusCode = 200
setTimeout(function() {
res.end("{}")
}, requestDelay);
},
},
];
\ No newline at end of file
{ {
"name": "@schukai/monster", "name": "@schukai/monster-showroom",
"version": "3.63.3", "version": "1.0.0",
"description": "Monster is a simple library for creating fast, robust and lightweight websites.", "description": "This is the showroom for the MonsterJS library.",
"keywords": [ "keywords": [],
"framework", "main": "source/index.mjs",
"web", "module": "source/index.mjs",
"dom",
"css",
"sass",
"mobile-first",
"app",
"front-end",
"templates",
"schukai",
"core",
"shopcloud",
"alvine",
"monster",
"buildmap",
"stack",
"observer",
"observable",
"uuid",
"node",
"nodelist",
"css-in-js",
"logger",
"log",
"theme"
],
"main": "source/monster.mjs",
"module": "source/monster.mjs",
"type": "module", "type": "module",
"homepage": "https://monsterjs.org/", "homepage": "https://monsterjs.org/",
"repository": { "repository": {
...@@ -42,8 +16,8 @@ ...@@ -42,8 +16,8 @@
"dependencies": { "dependencies": {
"@floating-ui/dom": "^1.6.3", "@floating-ui/dom": "^1.6.3",
"@popperjs/core": "^2.11.8", "@popperjs/core": "^2.11.8",
"@schukai/monster": "^3.64.0", "@schukai/monster": "^3.64.1",
"vite-plugin-directory-index": "^3.0.1" "highlight.js": "^11.9.0"
}, },
"devDependencies": { "devDependencies": {
"@esbuild-plugins/node-modules-polyfill": "^0.2.2", "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
...@@ -76,6 +50,7 @@ ...@@ -76,6 +50,7 @@
"util": "^0.12.5", "util": "^0.12.5",
"vite": "5.2.7", "vite": "5.2.7",
"vite-plugin-banner": "^0.7.1", "vite-plugin-banner": "^0.7.1",
"vite-plugin-directory-index": "^3.0.1",
"vite-plugin-list-directory-contents": "^1.4.5", "vite-plugin-list-directory-contents": "^1.4.5",
"vite-plugin-minify": "^1.5.2", "vite-plugin-minify": "^1.5.2",
"vite-plugin-mock": "^3.0.1", "vite-plugin-mock": "^3.0.1",
......
This diff is collapsed.
../source/
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment