vanjs-jsf 0.0.12 → 0.0.14
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/dist/VanJsfField.d.ts +1 -0
- package/dist/VanJsfField.js +19 -1
- package/dist/index.js.map +2 -2
- package/dist/main.js +8 -34
- package/package.json +4 -2
package/dist/VanJsfField.d.ts
CHANGED
package/dist/VanJsfField.js
CHANGED
|
@@ -6,12 +6,15 @@ import { javascript, esLint } from "@codemirror/lang-javascript";
|
|
|
6
6
|
import { json, jsonParseLinter } from "@codemirror/lang-json";
|
|
7
7
|
import { lintGutter, linter, forEachDiagnostic } from "@codemirror/lint";
|
|
8
8
|
import * as eslint from "eslint-linter-browserify";
|
|
9
|
-
import
|
|
9
|
+
import { CronComponent } from "van-ui-extended";
|
|
10
|
+
import "van-ui-extended/dist/index.css";
|
|
10
11
|
const { div, p, input, label, textarea, legend, link, fieldset, span, select, option } = van.tags;
|
|
12
|
+
import globals from "globals";
|
|
11
13
|
var FieldType;
|
|
12
14
|
(function (FieldType) {
|
|
13
15
|
FieldType["text"] = "text";
|
|
14
16
|
FieldType["code"] = "code";
|
|
17
|
+
FieldType["cron"] = "cron";
|
|
15
18
|
FieldType["number"] = "number";
|
|
16
19
|
FieldType["textarea"] = "textarea";
|
|
17
20
|
FieldType["select"] = "select";
|
|
@@ -216,6 +219,21 @@ export class VanJsfField extends VanJSComponent {
|
|
|
216
219
|
}
|
|
217
220
|
});
|
|
218
221
|
break;
|
|
222
|
+
case FieldType.cron:
|
|
223
|
+
el =
|
|
224
|
+
div(props, label({ for: this.name, style: "margin-right: 5px;", class: this.titleClass ? this.titleClass : '' }, this.label), this.description &&
|
|
225
|
+
div({ id: `${this.name}-description`, class: this.descriptionClass ? this.descriptionClass : '' }, this.description), p({ class: this.errorClass }, () => this.error), () => {
|
|
226
|
+
let ele;
|
|
227
|
+
if (CronComponent) {
|
|
228
|
+
ele = new CronComponent() || null;
|
|
229
|
+
ele.setAttribute("color", "d58512");
|
|
230
|
+
ele.setAttribute("extraClass", this.class ? this.class : "");
|
|
231
|
+
ele.setAttribute("value", this.iniVal.toString());
|
|
232
|
+
ele.oninput = (e) => this.handleChange(this, e.detail.value);
|
|
233
|
+
}
|
|
234
|
+
return ele;
|
|
235
|
+
});
|
|
236
|
+
break;
|
|
219
237
|
case FieldType.number:
|
|
220
238
|
el = div(props, label({ for: this.name, style: "margin-right: 5px;", class: this.titleClass ? this.titleClass : '' }, this.label), this.description &&
|
|
221
239
|
div({ id: `${this.name}-description`, class: this.descriptionClass ? this.descriptionClass : '' }, this.description), input({
|