@overmap-ai/core 1.0.36-misc-improvements.2 → 1.0.36-misc-improvements.3
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/forms/fields/MultiStringField/MultiStringField.d.ts +0 -1
- package/dist/forms/fields/NumberField/NumberField.d.ts +0 -1
- package/dist/forms/fields/SelectField/MultiSelectField.d.ts +0 -1
- package/dist/forms/fields/SelectField/SelectField.d.ts +0 -1
- package/dist/forms/fields/StringOrTextFields/StringField/StringField.d.ts +0 -1
- package/dist/forms/fields/StringOrTextFields/TextField/TextField.d.ts +0 -1
- package/dist/forms/fields/constants.d.ts +0 -6
- package/dist/overmap-core.js +22 -18
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +22 -18
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,6 @@ export declare const FieldTypeToEmptyFieldMapping: {
|
|
|
30
30
|
minimum: number;
|
|
31
31
|
maximum: number;
|
|
32
32
|
integers: boolean;
|
|
33
|
-
placeholder: string;
|
|
34
33
|
label: string;
|
|
35
34
|
description: string;
|
|
36
35
|
required: boolean;
|
|
@@ -44,7 +43,6 @@ export declare const FieldTypeToEmptyFieldMapping: {
|
|
|
44
43
|
readonly select: {
|
|
45
44
|
type: string;
|
|
46
45
|
options: never[];
|
|
47
|
-
placeholder: string;
|
|
48
46
|
label: string;
|
|
49
47
|
description: string;
|
|
50
48
|
required: boolean;
|
|
@@ -53,7 +51,6 @@ export declare const FieldTypeToEmptyFieldMapping: {
|
|
|
53
51
|
type: string;
|
|
54
52
|
maximum_length: number;
|
|
55
53
|
input_type: string;
|
|
56
|
-
placeholder: string;
|
|
57
54
|
label: string;
|
|
58
55
|
description: string;
|
|
59
56
|
required: boolean;
|
|
@@ -61,7 +58,6 @@ export declare const FieldTypeToEmptyFieldMapping: {
|
|
|
61
58
|
readonly text: {
|
|
62
59
|
type: string;
|
|
63
60
|
maximum_length: number;
|
|
64
|
-
placeholder: string;
|
|
65
61
|
label: string;
|
|
66
62
|
description: string;
|
|
67
63
|
required: boolean;
|
|
@@ -85,7 +81,6 @@ export declare const FieldTypeToEmptyFieldMapping: {
|
|
|
85
81
|
type: string;
|
|
86
82
|
minimum_length: number;
|
|
87
83
|
maximum_length: null;
|
|
88
|
-
placeholder: string;
|
|
89
84
|
label: string;
|
|
90
85
|
description: string;
|
|
91
86
|
required: boolean;
|
|
@@ -93,7 +88,6 @@ export declare const FieldTypeToEmptyFieldMapping: {
|
|
|
93
88
|
readonly "multi-select": {
|
|
94
89
|
type: string;
|
|
95
90
|
options: never[];
|
|
96
|
-
placeholder: string;
|
|
97
91
|
label: string;
|
|
98
92
|
description: string;
|
|
99
93
|
required: boolean;
|
package/dist/overmap-core.js
CHANGED
|
@@ -8501,8 +8501,7 @@ const emptyNumberField = {
|
|
|
8501
8501
|
type: "number",
|
|
8502
8502
|
minimum: Number.MIN_SAFE_INTEGER,
|
|
8503
8503
|
maximum: Number.MAX_SAFE_INTEGER,
|
|
8504
|
-
integers: false
|
|
8505
|
-
placeholder: "Enter a number"
|
|
8504
|
+
integers: false
|
|
8506
8505
|
};
|
|
8507
8506
|
const valueIsFormikUserFormRevision$1 = (form) => {
|
|
8508
8507
|
return "fields" in form;
|
|
@@ -8850,15 +8849,14 @@ const emptyStringField = {
|
|
|
8850
8849
|
...emptyBaseField,
|
|
8851
8850
|
type: "string",
|
|
8852
8851
|
maximum_length: 500,
|
|
8853
|
-
input_type: "text"
|
|
8854
|
-
placeholder: "Enter a short description"
|
|
8852
|
+
input_type: "text"
|
|
8855
8853
|
};
|
|
8856
8854
|
const _StringField = class _StringField extends StringOrTextField {
|
|
8857
8855
|
constructor(options) {
|
|
8858
|
-
const { inputType = "text",
|
|
8856
|
+
const { inputType = "text", ...rest } = options;
|
|
8859
8857
|
const maxLength = options.maxLength ? Math.min(500, options.maxLength) : 500;
|
|
8860
8858
|
const minLength = options.minLength ? Math.min(options.minLength, maxLength) : void 0;
|
|
8861
|
-
super({ ...rest, maxLength, minLength,
|
|
8859
|
+
super({ ...rest, maxLength, minLength, type: "string" });
|
|
8862
8860
|
__publicField(this, "inputType");
|
|
8863
8861
|
this.inputType = inputType;
|
|
8864
8862
|
}
|
|
@@ -8869,7 +8867,13 @@ const _StringField = class _StringField extends StringOrTextField {
|
|
|
8869
8867
|
if (data.type !== "string")
|
|
8870
8868
|
throw new Error("Type mismatch.");
|
|
8871
8869
|
const { maximum_length, minimum_length, input_type, ...rest } = data;
|
|
8872
|
-
return new _StringField({
|
|
8870
|
+
return new _StringField({
|
|
8871
|
+
...rest,
|
|
8872
|
+
maxLength: maximum_length,
|
|
8873
|
+
minLength: minimum_length,
|
|
8874
|
+
inputType: input_type,
|
|
8875
|
+
placeholder: "Enter a short description"
|
|
8876
|
+
});
|
|
8873
8877
|
}
|
|
8874
8878
|
getInput(props) {
|
|
8875
8879
|
return /* @__PURE__ */ jsx(StringInput, { field: this, ...props });
|
|
@@ -8911,15 +8915,13 @@ TextInput.displayName = "TextInput";
|
|
|
8911
8915
|
const emptyTextField = {
|
|
8912
8916
|
...emptyBaseField,
|
|
8913
8917
|
type: "text",
|
|
8914
|
-
maximum_length: 5e3
|
|
8915
|
-
placeholder: "Enter a description"
|
|
8918
|
+
maximum_length: 5e3
|
|
8916
8919
|
};
|
|
8917
8920
|
const _TextField = class _TextField extends StringOrTextField {
|
|
8918
8921
|
constructor(options) {
|
|
8919
|
-
const { placeholder = "Enter a description", ...rest } = options;
|
|
8920
8922
|
const maxLength = options.maxLength ? Math.min(5e3, options.maxLength) : 5e3;
|
|
8921
8923
|
const minLength = options.minLength ? Math.min(options.minLength, maxLength) : void 0;
|
|
8922
|
-
super({ ...
|
|
8924
|
+
super({ ...options, maxLength, minLength, type: "text" });
|
|
8923
8925
|
}
|
|
8924
8926
|
serialize() {
|
|
8925
8927
|
return super._serialize();
|
|
@@ -8928,7 +8930,12 @@ const _TextField = class _TextField extends StringOrTextField {
|
|
|
8928
8930
|
if (data.type !== "text")
|
|
8929
8931
|
throw new Error("Type mismatch.");
|
|
8930
8932
|
const { maximum_length, minimum_length, ...rest } = data;
|
|
8931
|
-
return new _TextField({
|
|
8933
|
+
return new _TextField({
|
|
8934
|
+
...rest,
|
|
8935
|
+
maxLength: maximum_length,
|
|
8936
|
+
minLength: minimum_length,
|
|
8937
|
+
placeholder: "Enter a description"
|
|
8938
|
+
});
|
|
8932
8939
|
}
|
|
8933
8940
|
getInput(props) {
|
|
8934
8941
|
return /* @__PURE__ */ jsx(TextInput, { field: this, ...props });
|
|
@@ -9305,8 +9312,7 @@ const emptyMultiStringField = {
|
|
|
9305
9312
|
...emptyBaseField,
|
|
9306
9313
|
type: "multi-string",
|
|
9307
9314
|
minimum_length: 0,
|
|
9308
|
-
maximum_length: null
|
|
9309
|
-
placeholder: "Press enter to add a new option"
|
|
9315
|
+
maximum_length: null
|
|
9310
9316
|
};
|
|
9311
9317
|
const _MultiStringField = class _MultiStringField extends BaseField {
|
|
9312
9318
|
constructor(options) {
|
|
@@ -9413,8 +9419,7 @@ class BaseSelectField extends BaseField {
|
|
|
9413
9419
|
const emptySelectField = {
|
|
9414
9420
|
...emptyBaseField,
|
|
9415
9421
|
type: "select",
|
|
9416
|
-
options: []
|
|
9417
|
-
placeholder: "Select one..."
|
|
9422
|
+
options: []
|
|
9418
9423
|
};
|
|
9419
9424
|
const _SelectField = class _SelectField extends BaseSelectField {
|
|
9420
9425
|
constructor(options) {
|
|
@@ -9492,8 +9497,7 @@ MultiSelectInput.displayName = "MultiSelectInput";
|
|
|
9492
9497
|
const emptyMultiSelectField = {
|
|
9493
9498
|
...emptyBaseField,
|
|
9494
9499
|
type: "multi-select",
|
|
9495
|
-
options: []
|
|
9496
|
-
placeholder: "Select one or more..."
|
|
9500
|
+
options: []
|
|
9497
9501
|
};
|
|
9498
9502
|
const _MultiSelectField = class _MultiSelectField extends BaseSelectField {
|
|
9499
9503
|
constructor(options) {
|