@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
|
@@ -11043,18 +11043,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11043
11043
|
__publicField(_DateField, "fieldTypeDescription", "Allows specifying a date.");
|
|
11044
11044
|
__publicField(_DateField, "Icon", CalendarIcon);
|
|
11045
11045
|
let DateField = _DateField;
|
|
11046
|
+
const SHORT_TEXT_FIELD_MAX_LENGTH = 500;
|
|
11047
|
+
const LONG_TEXT_FIELD_MAX_LENGTH = 1e4;
|
|
11046
11048
|
const valueIsFormikUserFormRevision = (form) => {
|
|
11047
11049
|
return "fields" in form;
|
|
11048
11050
|
};
|
|
11049
11051
|
class StringOrTextField extends BaseField {
|
|
11050
11052
|
constructor(options) {
|
|
11051
|
-
const { minLength, maxLength
|
|
11053
|
+
const { minLength, maxLength, placeholder = "", ...base } = options;
|
|
11052
11054
|
super(base);
|
|
11053
11055
|
__publicField(this, "minLength");
|
|
11054
11056
|
__publicField(this, "maxLength");
|
|
11055
11057
|
__publicField(this, "placeholder");
|
|
11056
11058
|
this.minLength = minLength ? Math.max(minLength, 0) : void 0;
|
|
11057
|
-
this.maxLength = maxLength ? Math.max(maxLength, 0) :
|
|
11059
|
+
this.maxLength = maxLength ? Math.max(maxLength, 0) : LONG_TEXT_FIELD_MAX_LENGTH;
|
|
11058
11060
|
this.placeholder = placeholder;
|
|
11059
11061
|
}
|
|
11060
11062
|
static getFieldCreationSchema(parentPath = "") {
|
|
@@ -11083,7 +11085,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11083
11085
|
required: false,
|
|
11084
11086
|
identifier: `${path}maximum_length`,
|
|
11085
11087
|
minimum: 1,
|
|
11086
|
-
maximum:
|
|
11088
|
+
maximum: LONG_TEXT_FIELD_MAX_LENGTH,
|
|
11087
11089
|
// TODO: depends on short vs long text
|
|
11088
11090
|
formValidators: [this._validateMax(parentPath)],
|
|
11089
11091
|
// TODO: default: 500 (see: "Short text fields can hold up to 500 characters on a single line.")
|
|
@@ -11212,13 +11214,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11212
11214
|
const emptyStringField = {
|
|
11213
11215
|
...emptyBaseField,
|
|
11214
11216
|
type: "string",
|
|
11215
|
-
maximum_length:
|
|
11217
|
+
maximum_length: SHORT_TEXT_FIELD_MAX_LENGTH,
|
|
11216
11218
|
input_type: "text"
|
|
11217
11219
|
};
|
|
11218
11220
|
const _StringField = class _StringField extends StringOrTextField {
|
|
11219
11221
|
constructor(options) {
|
|
11220
11222
|
const { inputType = "text", ...rest } = options;
|
|
11221
|
-
const maxLength = options.maxLength ? Math.min(
|
|
11223
|
+
const maxLength = options.maxLength ? Math.min(SHORT_TEXT_FIELD_MAX_LENGTH, options.maxLength) : SHORT_TEXT_FIELD_MAX_LENGTH;
|
|
11222
11224
|
const minLength = options.minLength ? Math.min(options.minLength, maxLength) : void 0;
|
|
11223
11225
|
super({ ...rest, maxLength, minLength, type: "string" });
|
|
11224
11226
|
__publicField(this, "inputType");
|
|
@@ -11244,7 +11246,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11244
11246
|
}
|
|
11245
11247
|
};
|
|
11246
11248
|
__publicField(_StringField, "fieldTypeName", "Short Text");
|
|
11247
|
-
__publicField(_StringField, "fieldTypeDescription",
|
|
11249
|
+
__publicField(_StringField, "fieldTypeDescription", `Short text fields can hold up to ${SHORT_TEXT_FIELD_MAX_LENGTH} characters on a single line.`);
|
|
11248
11250
|
__publicField(_StringField, "Icon", InputIcon);
|
|
11249
11251
|
let StringField = _StringField;
|
|
11250
11252
|
const TextInput = React.memo((props) => {
|
|
@@ -11279,11 +11281,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11279
11281
|
const emptyTextField = {
|
|
11280
11282
|
...emptyBaseField,
|
|
11281
11283
|
type: "text",
|
|
11282
|
-
maximum_length:
|
|
11284
|
+
maximum_length: LONG_TEXT_FIELD_MAX_LENGTH
|
|
11283
11285
|
};
|
|
11284
11286
|
const _TextField = class _TextField extends StringOrTextField {
|
|
11285
11287
|
constructor(options) {
|
|
11286
|
-
const maxLength = options.maxLength ? Math.min(
|
|
11288
|
+
const maxLength = options.maxLength ? Math.min(LONG_TEXT_FIELD_MAX_LENGTH, options.maxLength) : LONG_TEXT_FIELD_MAX_LENGTH;
|
|
11287
11289
|
const minLength = options.minLength ? Math.min(options.minLength, maxLength) : void 0;
|
|
11288
11290
|
super({ ...options, maxLength, minLength, type: "text" });
|
|
11289
11291
|
}
|
|
@@ -11306,7 +11308,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11306
11308
|
}
|
|
11307
11309
|
};
|
|
11308
11310
|
__publicField(_TextField, "fieldTypeName", "Paragraph");
|
|
11309
|
-
__publicField(_TextField, "fieldTypeDescription",
|
|
11311
|
+
__publicField(_TextField, "fieldTypeDescription", `Paragraph fields can hold up to ${LONG_TEXT_FIELD_MAX_LENGTH} characters and can have multiple lines.`);
|
|
11310
11312
|
__publicField(_TextField, "Icon", RowsIcon);
|
|
11311
11313
|
let TextField = _TextField;
|
|
11312
11314
|
const SelectInput = React.memo((props) => {
|