gdpr audit implemented, email log, vollmachten, pdf delete cancel data privacy and vollmachten, removed message no id card in engergy car, and other contracts that are not telecom contracts, added insert counter for engery
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
Copyright (C) 2020 by Marijn Haverbeke <marijn@haverbeke.berlin>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# CRELT
|
||||
|
||||
Tiny DOM-element creation utility. Exports a single (default) value,
|
||||
which is a function that you call with:
|
||||
|
||||
- A tag name string or DOM element.
|
||||
|
||||
- Optionally an attribute object mapping names to values. When the
|
||||
values are strings, they are added to the element with
|
||||
`setAttribute`. When they have another type, they are assigned as
|
||||
regular properties (mostly useful for event handlers via `onclick`
|
||||
and such). When an attribute's value is null or undefined, it is
|
||||
not assigned.
|
||||
|
||||
- Any number of children, which may be null (ignored), strings (added
|
||||
as text nodes), DOM nodes (added), or arrays (each element is added
|
||||
separately).
|
||||
|
||||
The function returns a DOM element.
|
||||
|
||||
## License
|
||||
|
||||
This software is licensed under an MIT license.
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
'use strict';
|
||||
|
||||
function crelt() {
|
||||
var elt = arguments[0];
|
||||
if (typeof elt == "string") elt = document.createElement(elt);
|
||||
var i = 1, next = arguments[1];
|
||||
if (next && typeof next == "object" && next.nodeType == null && !Array.isArray(next)) {
|
||||
for (var name in next) if (Object.prototype.hasOwnProperty.call(next, name)) {
|
||||
var value = next[name];
|
||||
if (typeof value == "string") elt.setAttribute(name, value);
|
||||
else if (value != null) elt[name] = value;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
for (; i < arguments.length; i++) add(elt, arguments[i]);
|
||||
return elt
|
||||
}
|
||||
|
||||
function add(elt, child) {
|
||||
if (typeof child == "string") {
|
||||
elt.appendChild(document.createTextNode(child));
|
||||
} else if (child == null) ; else if (child.nodeType != null) {
|
||||
elt.appendChild(child);
|
||||
} else if (Array.isArray(child)) {
|
||||
for (var i = 0; i < child.length; i++) add(elt, child[i]);
|
||||
} else {
|
||||
throw new RangeError("Unsupported child node: " + child)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = crelt;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
type Child = string | Node | null | undefined | readonly Child[]
|
||||
|
||||
export default function crelt(elt: string | HTMLElement, attrs: {[attr: string]: any}, ...children: Child[]): HTMLElement
|
||||
export default function crelt(elt: string | HTMLElement, ...children: Child[]): HTMLElement
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
type Child = string | Node | null | undefined | readonly Child[]
|
||||
|
||||
export default function crelt(elt: string | HTMLElement, attrs: {[attr: string]: any}, ...children: Child[]): HTMLElement
|
||||
export default function crelt(elt: string | HTMLElement, ...children: Child[]): HTMLElement
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
export default function crelt() {
|
||||
var elt = arguments[0]
|
||||
if (typeof elt == "string") elt = document.createElement(elt)
|
||||
var i = 1, next = arguments[1]
|
||||
if (next && typeof next == "object" && next.nodeType == null && !Array.isArray(next)) {
|
||||
for (var name in next) if (Object.prototype.hasOwnProperty.call(next, name)) {
|
||||
var value = next[name]
|
||||
if (typeof value == "string") elt.setAttribute(name, value)
|
||||
else if (value != null) elt[name] = value
|
||||
}
|
||||
i++
|
||||
}
|
||||
for (; i < arguments.length; i++) add(elt, arguments[i])
|
||||
return elt
|
||||
}
|
||||
|
||||
function add(elt, child) {
|
||||
if (typeof child == "string") {
|
||||
elt.appendChild(document.createTextNode(child))
|
||||
} else if (child == null) {
|
||||
} else if (child.nodeType != null) {
|
||||
elt.appendChild(child)
|
||||
} else if (Array.isArray(child)) {
|
||||
for (var i = 0; i < child.length; i++) add(elt, child[i])
|
||||
} else {
|
||||
throw new RangeError("Unsupported child node: " + child)
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "crelt",
|
||||
"version": "1.0.6",
|
||||
"description": "Tiny DOM-element-creation utility",
|
||||
"main": "dist/index.cjs",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"import": "./index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
},
|
||||
"module": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"scripts": {
|
||||
"prepare": "rollup -c"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/marijnh/crelt.git"
|
||||
},
|
||||
"keywords": [
|
||||
"dom",
|
||||
"creation",
|
||||
"crel"
|
||||
],
|
||||
"author": "Marijn Haverbeke <marijn@haverbeke.berlin>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/marijnh/crelt/issues"
|
||||
},
|
||||
"homepage": "https://github.com/marijnh/crelt#readme",
|
||||
"devDependencies": {
|
||||
"rollup": "^2.0.5",
|
||||
"rollup-plugin-copy": "^3.4.0"
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import copy from "rollup-plugin-copy"
|
||||
|
||||
export default {
|
||||
input: "index.js",
|
||||
output: {
|
||||
file: "dist/index.cjs",
|
||||
format: "cjs",
|
||||
exports: "default"
|
||||
},
|
||||
plugins: [
|
||||
copy({targets: [{src: "index.d.ts", dest: "dist", rename: () => "index.d.cts"}]})
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user