mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-31 04:33:40 +00:00
chore: Update inputMode to inputmode
This commit is contained in:
@@ -40,7 +40,7 @@ export class List<A extends ValueSpecList> extends IBuilder<A> {
|
|||||||
maxLength?: number | null;
|
maxLength?: number | null;
|
||||||
patterns: Pattern[];
|
patterns: Pattern[];
|
||||||
/** Default = "text" */
|
/** Default = "text" */
|
||||||
inputMode?: ListValueSpecText["inputMode"];
|
inputmode?: ListValueSpecText["inputmode"];
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const spec = {
|
const spec = {
|
||||||
@@ -49,7 +49,7 @@ export class List<A extends ValueSpecList> extends IBuilder<A> {
|
|||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
masked: false,
|
masked: false,
|
||||||
inputMode: "text" as const,
|
inputmode: "text" as const,
|
||||||
...aSpec,
|
...aSpec,
|
||||||
};
|
};
|
||||||
return new List({
|
return new List({
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
|||||||
maxLength?: number | null;
|
maxLength?: number | null;
|
||||||
patterns?: Pattern[];
|
patterns?: Pattern[];
|
||||||
/** Default = 'text' */
|
/** Default = 'text' */
|
||||||
inputMode?: ValueSpecText["inputMode"];
|
inputmode?: ValueSpecText["inputmode"];
|
||||||
}) {
|
}) {
|
||||||
return new Value({
|
return new Value({
|
||||||
type: "text" as const,
|
type: "text" as const,
|
||||||
@@ -77,7 +77,7 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
|||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
patterns: [],
|
patterns: [],
|
||||||
inputMode: "text",
|
inputmode: "text",
|
||||||
...a,
|
...a,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
|||||||
warning?: string | null;
|
warning?: string | null;
|
||||||
required: boolean;
|
required: boolean;
|
||||||
/** Default = 'datetime-local' */
|
/** Default = 'datetime-local' */
|
||||||
inputMode?: ValueSpecDatetime["inputMode"];
|
inputmode?: ValueSpecDatetime["inputmode"];
|
||||||
min?: string | null;
|
min?: string | null;
|
||||||
max?: string | null;
|
max?: string | null;
|
||||||
step?: string | null;
|
step?: string | null;
|
||||||
@@ -158,7 +158,7 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
|||||||
type: "datetime" as const,
|
type: "datetime" as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
inputMode: "datetime-local",
|
inputmode: "datetime-local",
|
||||||
min: null,
|
min: null,
|
||||||
max: null,
|
max: null,
|
||||||
step: null,
|
step: null,
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export interface ValueSpecColor extends WithStandalone {
|
|||||||
export interface ValueSpecDatetime extends WithStandalone {
|
export interface ValueSpecDatetime extends WithStandalone {
|
||||||
type: "datetime";
|
type: "datetime";
|
||||||
required: boolean;
|
required: boolean;
|
||||||
inputMode: "date" | "time" | "datetime-local";
|
inputmode: "date" | "time" | "datetime-local";
|
||||||
min: string | null;
|
min: string | null;
|
||||||
max: string | null;
|
max: string | null;
|
||||||
step: string | null;
|
step: string | null;
|
||||||
@@ -150,7 +150,7 @@ export interface ListValueSpecText {
|
|||||||
minLength: number | null;
|
minLength: number | null;
|
||||||
maxLength: number | null;
|
maxLength: number | null;
|
||||||
masked: boolean;
|
masked: boolean;
|
||||||
inputMode: "text" | "email" | "tel" | "url";
|
inputmode: "text" | "email" | "tel" | "url";
|
||||||
placeholder: string | null;
|
placeholder: string | null;
|
||||||
}
|
}
|
||||||
export interface ListValueSpecNumber {
|
export interface ListValueSpecNumber {
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ export async function specToBuilder(
|
|||||||
masked: spec?.masked || false,
|
masked: spec?.masked || false,
|
||||||
placeholder: spec?.placeholder || null,
|
placeholder: spec?.placeholder || null,
|
||||||
pattern: spec?.patterns || [],
|
pattern: spec?.patterns || [],
|
||||||
inputMode: spec?.inputMode || "text",
|
inputmode: spec?.inputmode || "text",
|
||||||
})})`;
|
})})`;
|
||||||
}
|
}
|
||||||
case "number": {
|
case "number": {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ describe("builder tests", () => {
|
|||||||
"minLength": null,
|
"minLength": null,
|
||||||
"maxLength": null,
|
"maxLength": null,
|
||||||
"patterns": [],
|
"patterns": [],
|
||||||
"inputMode":"text",
|
"inputmode":"text",
|
||||||
"name": "Peer tor address",
|
"name": "Peer tor address",
|
||||||
"required": true
|
"required": true
|
||||||
}}`
|
}}`
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.charlie32",
|
"version": "0.4.0-lib0.charlie33",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.charlie32",
|
"version": "0.4.0-lib0.charlie33",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.charlie32",
|
"version": "0.4.0-lib0.charlie33",
|
||||||
"description": "For making the patterns that are wanted in making services for the startOS.",
|
"description": "For making the patterns that are wanted in making services for the startOS.",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user