Fix build
This commit is contained in:
parent
21d2dc52c2
commit
0fee4cae58
6 changed files with 14491 additions and 96 deletions
|
@ -2,7 +2,7 @@ import { Utils } from "../Utils";
|
||||||
|
|
||||||
export default class Constants {
|
export default class Constants {
|
||||||
|
|
||||||
public static vNumber = "0.4.9";
|
public static vNumber = "0.5.0-alpha-tailwind";
|
||||||
|
|
||||||
// The user journey states thresholds when a new feature gets unlocked
|
// The user journey states thresholds when a new feature gets unlocked
|
||||||
public static userJourney = {
|
public static userJourney = {
|
||||||
|
|
|
@ -81,7 +81,7 @@ I love it to see where the project ends up. You are free to reuse the software (
|
||||||
|
|
||||||
To develop:
|
To develop:
|
||||||
|
|
||||||
|
0. Make sure you have a recent version of nodejs - at least 12.0, preferably 15
|
||||||
0. Make a fork and clone the repository.
|
0. Make a fork and clone the repository.
|
||||||
1. Install `npm`. Linux: `sudo apt install npm` (or your favourite package manager), Windows: install nodeJS: https://nodejs.org/en/download/
|
1. Install `npm`. Linux: `sudo apt install npm` (or your favourite package manager), Windows: install nodeJS: https://nodejs.org/en/download/
|
||||||
2. Run `npm install` to install the package dependencies
|
2. Run `npm install` to install the package dependencies
|
||||||
|
|
|
@ -11,12 +11,14 @@ export class DropDown<T> extends InputElement<T> {
|
||||||
private readonly _value: UIEventSource<T>;
|
private readonly _value: UIEventSource<T>;
|
||||||
|
|
||||||
public IsSelected: UIEventSource<boolean> = new UIEventSource<boolean>(false);
|
public IsSelected: UIEventSource<boolean> = new UIEventSource<boolean>(false);
|
||||||
|
private readonly _label_class: string;
|
||||||
|
private readonly _select_class: string;
|
||||||
|
|
||||||
constructor(label: string | UIElement,
|
constructor(label: string | UIElement,
|
||||||
values: { value: T, shown: string | UIElement }[],
|
values: { value: T, shown: string | UIElement }[],
|
||||||
value: UIEventSource<T> = undefined,
|
value: UIEventSource<T> = undefined,
|
||||||
label_class: string,
|
label_class: string = "",
|
||||||
select_class: string) {
|
select_class: string = "") {
|
||||||
super(undefined);
|
super(undefined);
|
||||||
this._value = value ?? new UIEventSource<T>(undefined);
|
this._value = value ?? new UIEventSource<T>(undefined);
|
||||||
this._label = Translations.W(label);
|
this._label = Translations.W(label);
|
||||||
|
|
14565
package-lock.json
generated
14565
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -34,6 +34,7 @@
|
||||||
"@types/leaflet-providers": "^1.2.0",
|
"@types/leaflet-providers": "^1.2.0",
|
||||||
"@types/leaflet.markercluster": "^1.4.3",
|
"@types/leaflet.markercluster": "^1.4.3",
|
||||||
"autoprefixer": "^9.8.6",
|
"autoprefixer": "^9.8.6",
|
||||||
|
"canvas": "^2.6.1",
|
||||||
"country-language": "^0.1.7",
|
"country-language": "^0.1.7",
|
||||||
"email-validator": "^2.0.4",
|
"email-validator": "^2.0.4",
|
||||||
"escape-html": "^1.0.3",
|
"escape-html": "^1.0.3",
|
||||||
|
@ -59,7 +60,6 @@
|
||||||
"@babel/polyfill": "^7.10.4",
|
"@babel/polyfill": "^7.10.4",
|
||||||
"@types/node": "^7.0.5",
|
"@types/node": "^7.0.5",
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"canvas": "^2.6.1",
|
|
||||||
"fs": "0.0.1-security",
|
"fs": "0.0.1-security",
|
||||||
"marked": "^1.1.1",
|
"marked": "^1.1.1",
|
||||||
"promise-svg2img": "^0.2.0",
|
"promise-svg2img": "^0.2.0",
|
||||||
|
|
|
@ -6,7 +6,7 @@ import LayoutConfig from "../Customizations/JSON/LayoutConfig";
|
||||||
import {AllKnownLayouts} from "../Customizations/AllKnownLayouts";
|
import {AllKnownLayouts} from "../Customizations/AllKnownLayouts";
|
||||||
import {existsSync, mkdirSync, readFileSync, writeFile, writeFileSync} from "fs";
|
import {existsSync, mkdirSync, readFileSync, writeFile, writeFileSync} from "fs";
|
||||||
import Locale from "../UI/i18n/Locale";
|
import Locale from "../UI/i18n/Locale";
|
||||||
import svg2img from 'promise-svg2img';
|
// import svg2img from 'promise-svg2img';
|
||||||
import Translations from "../UI/i18n/Translations";
|
import Translations from "../UI/i18n/Translations";
|
||||||
import {Translation} from "../UI/i18n/Translation";
|
import {Translation} from "../UI/i18n/Translation";
|
||||||
|
|
||||||
|
@ -101,6 +101,7 @@ function generateWikiEntry(layout: LayoutConfig){
|
||||||
|
|
||||||
const alreadyWritten = []
|
const alreadyWritten = []
|
||||||
|
|
||||||
|
|
||||||
function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
|
function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
|
||||||
let name = iconPath.split(".").slice(0, -1).join(".");
|
let name = iconPath.split(".").slice(0, -1).join(".");
|
||||||
if (name.startsWith("./")) {
|
if (name.startsWith("./")) {
|
||||||
|
@ -122,7 +123,8 @@ function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log("Creating icon ", name, newname)
|
console.log("Could not create icon! ", name, newname)
|
||||||
|
/*
|
||||||
// We already read to file, in order to crash here if the file is not found
|
// We already read to file, in order to crash here if the file is not found
|
||||||
readFileSync(iconPath);
|
readFileSync(iconPath);
|
||||||
svg2img(iconPath,
|
svg2img(iconPath,
|
||||||
|
@ -134,7 +136,7 @@ function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log("ERROR while writing" + iconPath, error)
|
console.log("ERROR while writing" + iconPath, error)
|
||||||
});
|
});
|
||||||
|
//*/
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Could not read icon", iconPath, "due to", e)
|
console.error("Could not read icon", iconPath, "due to", e)
|
||||||
}
|
}
|
||||||
|
@ -142,6 +144,8 @@ function createIcon(iconPath: string, size: number, layout: LayoutConfig) {
|
||||||
return newname;
|
return newname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//*/
|
||||||
|
|
||||||
function createManifest(layout: LayoutConfig, relativePath: string) {
|
function createManifest(layout: LayoutConfig, relativePath: string) {
|
||||||
const name = layout.id;
|
const name = layout.id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue