@overmap-ai/core 1.0.44 → 1.0.45-batch-bug-fixes.0
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/StringOrTextFields/TextField/TextField.d.ts +1 -1
- package/dist/overmap-core.js +11 -9
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +11 -9
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/forms/constants.d.ts +0 -9
|
@@ -13,7 +13,7 @@ export declare const emptyTextField: {
|
|
|
13
13
|
};
|
|
14
14
|
export declare class TextField extends StringOrTextField<"text"> {
|
|
15
15
|
static readonly fieldTypeName = "Paragraph";
|
|
16
|
-
static readonly fieldTypeDescription = "Paragraph fields can hold up to
|
|
16
|
+
static readonly fieldTypeDescription = "Paragraph fields can hold up to 10000 characters and can have multiple lines.";
|
|
17
17
|
static Icon: typeof RowsIcon;
|
|
18
18
|
constructor(options: TextFieldOptions);
|
|
19
19
|
serialize(): SerializedTextField;
|
package/dist/overmap-core.js
CHANGED
|
@@ -11053,18 +11053,20 @@ __publicField(_DateField, "fieldTypeName", "Date");
|
|
|
11053
11053
|
__publicField(_DateField, "fieldTypeDescription", "Allows specifying a date.");
|
|
11054
11054
|
__publicField(_DateField, "Icon", CalendarIcon);
|
|
11055
11055
|
let DateField = _DateField;
|
|
11056
|
+
const SHORT_TEXT_FIELD_MAX_LENGTH = 500;
|
|
11057
|
+
const LONG_TEXT_FIELD_MAX_LENGTH = 1e4;
|
|
11056
11058
|
const valueIsFormikUserFormRevision = (form) => {
|
|
11057
11059
|
return "fields" in form;
|
|
11058
11060
|
};
|
|
11059
11061
|
class StringOrTextField extends BaseField {
|
|
11060
11062
|
constructor(options) {
|
|
11061
|
-
const { minLength, maxLength
|
|
11063
|
+
const { minLength, maxLength, placeholder = "", ...base } = options;
|
|
11062
11064
|
super(base);
|
|
11063
11065
|
__publicField(this, "minLength");
|
|
11064
11066
|
__publicField(this, "maxLength");
|
|
11065
11067
|
__publicField(this, "placeholder");
|
|
11066
11068
|
this.minLength = minLength ? Math.max(minLength, 0) : void 0;
|
|
11067
|
-
this.maxLength = maxLength ? Math.max(maxLength, 0) :
|
|
11069
|
+
this.maxLength = maxLength ? Math.max(maxLength, 0) : LONG_TEXT_FIELD_MAX_LENGTH;
|
|
11068
11070
|
this.placeholder = placeholder;
|
|
11069
11071
|
}
|
|
11070
11072
|
static getFieldCreationSchema(parentPath = "") {
|
|
@@ -11093,7 +11095,7 @@ class StringOrTextField extends BaseField {
|
|
|
11093
11095
|
required: false,
|
|
11094
11096
|
identifier: `${path}maximum_length`,
|
|
11095
11097
|
minimum: 1,
|
|
11096
|
-
maximum:
|
|
11098
|
+
maximum: LONG_TEXT_FIELD_MAX_LENGTH,
|
|
11097
11099
|
// TODO: depends on short vs long text
|
|
11098
11100
|
formValidators: [this._validateMax(parentPath)],
|
|
11099
11101
|
// TODO: default: 500 (see: "Short text fields can hold up to 500 characters on a single line.")
|
|
@@ -11222,13 +11224,13 @@ StringInput.displayName = "StringInput";
|
|
|
11222
11224
|
const emptyStringField = {
|
|
11223
11225
|
...emptyBaseField,
|
|
11224
11226
|
type: "string",
|
|
11225
|
-
maximum_length:
|
|
11227
|
+
maximum_length: SHORT_TEXT_FIELD_MAX_LENGTH,
|
|
11226
11228
|
input_type: "text"
|
|
11227
11229
|
};
|
|
11228
11230
|
const _StringField = class _StringField extends StringOrTextField {
|
|
11229
11231
|
constructor(options) {
|
|
11230
11232
|
const { inputType = "text", ...rest } = options;
|
|
11231
|
-
const maxLength = options.maxLength ? Math.min(
|
|
11233
|
+
const maxLength = options.maxLength ? Math.min(SHORT_TEXT_FIELD_MAX_LENGTH, options.maxLength) : SHORT_TEXT_FIELD_MAX_LENGTH;
|
|
11232
11234
|
const minLength = options.minLength ? Math.min(options.minLength, maxLength) : void 0;
|
|
11233
11235
|
super({ ...rest, maxLength, minLength, type: "string" });
|
|
11234
11236
|
__publicField(this, "inputType");
|
|
@@ -11254,7 +11256,7 @@ const _StringField = class _StringField extends StringOrTextField {
|
|
|
11254
11256
|
}
|
|
11255
11257
|
};
|
|
11256
11258
|
__publicField(_StringField, "fieldTypeName", "Short Text");
|
|
11257
|
-
__publicField(_StringField, "fieldTypeDescription",
|
|
11259
|
+
__publicField(_StringField, "fieldTypeDescription", `Short text fields can hold up to ${SHORT_TEXT_FIELD_MAX_LENGTH} characters on a single line.`);
|
|
11258
11260
|
__publicField(_StringField, "Icon", InputIcon);
|
|
11259
11261
|
let StringField = _StringField;
|
|
11260
11262
|
const TextInput = memo((props) => {
|
|
@@ -11289,11 +11291,11 @@ TextInput.displayName = "TextInput";
|
|
|
11289
11291
|
const emptyTextField = {
|
|
11290
11292
|
...emptyBaseField,
|
|
11291
11293
|
type: "text",
|
|
11292
|
-
maximum_length:
|
|
11294
|
+
maximum_length: LONG_TEXT_FIELD_MAX_LENGTH
|
|
11293
11295
|
};
|
|
11294
11296
|
const _TextField = class _TextField extends StringOrTextField {
|
|
11295
11297
|
constructor(options) {
|
|
11296
|
-
const maxLength = options.maxLength ? Math.min(
|
|
11298
|
+
const maxLength = options.maxLength ? Math.min(LONG_TEXT_FIELD_MAX_LENGTH, options.maxLength) : LONG_TEXT_FIELD_MAX_LENGTH;
|
|
11297
11299
|
const minLength = options.minLength ? Math.min(options.minLength, maxLength) : void 0;
|
|
11298
11300
|
super({ ...options, maxLength, minLength, type: "text" });
|
|
11299
11301
|
}
|
|
@@ -11316,7 +11318,7 @@ const _TextField = class _TextField extends StringOrTextField {
|
|
|
11316
11318
|
}
|
|
11317
11319
|
};
|
|
11318
11320
|
__publicField(_TextField, "fieldTypeName", "Paragraph");
|
|
11319
|
-
__publicField(_TextField, "fieldTypeDescription",
|
|
11321
|
+
__publicField(_TextField, "fieldTypeDescription", `Paragraph fields can hold up to ${LONG_TEXT_FIELD_MAX_LENGTH} characters and can have multiple lines.`);
|
|
11320
11322
|
__publicField(_TextField, "Icon", RowsIcon);
|
|
11321
11323
|
let TextField = _TextField;
|
|
11322
11324
|
const SelectInput = memo((props) => {
|