@opengeoweb/form-fields 2.0.1
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/README.md +11 -0
- package/form-fields.esm.js +802 -0
- package/form-fields.umd.js +836 -0
- package/index.d.ts +1 -0
- package/lib/components/ReactHookFormDateTime.d.ts +13 -0
- package/lib/components/ReactHookFormDateTime.spec.d.ts +1 -0
- package/lib/components/ReactHookFormDateTime.stories.d.ts +6 -0
- package/lib/components/ReactHookFormFormControl.d.ts +8 -0
- package/lib/components/ReactHookFormFormControl.spec.d.ts +1 -0
- package/lib/components/ReactHookFormHiddenInput.d.ts +8 -0
- package/lib/components/ReactHookFormHiddenInput.spec.d.ts +1 -0
- package/lib/components/ReactHookFormHiddenInput.stories.d.ts +6 -0
- package/lib/components/ReactHookFormNumberField.d.ts +13 -0
- package/lib/components/ReactHookFormNumberField.spec.d.ts +1 -0
- package/lib/components/ReactHookFormNumberField.stories.d.ts +6 -0
- package/lib/components/ReactHookFormProvider.d.ts +20 -0
- package/lib/components/ReactHookFormProvider.spec.d.ts +1 -0
- package/lib/components/ReactHookFormProvider.stories.d.ts +6 -0
- package/lib/components/ReactHookFormRadioGroup.d.ts +10 -0
- package/lib/components/ReactHookFormRadioGroup.spec.d.ts +1 -0
- package/lib/components/ReactHookFormRadioGroup.stories.d.ts +6 -0
- package/lib/components/ReactHookFormSelect.d.ts +9 -0
- package/lib/components/ReactHookFormSelect.spec.d.ts +1 -0
- package/lib/components/ReactHookFormSelect.stories.d.ts +6 -0
- package/lib/components/ReactHookFormTextField.d.ts +10 -0
- package/lib/components/ReactHookFormTextField.spec.d.ts +1 -0
- package/lib/components/ReactHookFormTextField.stories.d.ts +6 -0
- package/lib/components/formUtils.d.ts +3 -0
- package/lib/components/formUtils.spec.d.ts +1 -0
- package/lib/components/index.d.ts +11 -0
- package/lib/components/types.d.ts +9 -0
- package/lib/components/utils.d.ts +42 -0
- package/lib/components/utils.spec.d.ts +1 -0
- package/package.json +27 -0
|
@@ -0,0 +1,836 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@material-ui/core'), require('react-hook-form'), require('moment'), require('lodash'), require('@material-ui/pickers'), require('moment-timezone')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', '@material-ui/core', 'react-hook-form', 'moment', 'lodash', '@material-ui/pickers', 'moment-timezone'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.FormFields = {}, global.React, global.core, global.reactHookForm, global.moment, global.lodash, global.pickers, global.moment$1));
|
|
5
|
+
})(this, (function (exports, React, core, reactHookForm, moment, lodash, pickers, moment$1) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n["default"] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
29
|
+
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
30
|
+
var moment__default$1 = /*#__PURE__*/_interopDefaultLegacy(moment$1);
|
|
31
|
+
|
|
32
|
+
/*! *****************************************************************************
|
|
33
|
+
Copyright (c) Microsoft Corporation.
|
|
34
|
+
|
|
35
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
36
|
+
purpose with or without fee is hereby granted.
|
|
37
|
+
|
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
39
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
40
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
41
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
42
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
43
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
44
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
45
|
+
***************************************************************************** */
|
|
46
|
+
|
|
47
|
+
var __assign = function() {
|
|
48
|
+
__assign = Object.assign || function __assign(t) {
|
|
49
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
50
|
+
s = arguments[i];
|
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
52
|
+
}
|
|
53
|
+
return t;
|
|
54
|
+
};
|
|
55
|
+
return __assign.apply(this, arguments);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
function __rest(s, e) {
|
|
59
|
+
var t = {};
|
|
60
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
61
|
+
t[p] = s[p];
|
|
62
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
63
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
64
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
65
|
+
t[p[i]] = s[p[i]];
|
|
66
|
+
}
|
|
67
|
+
return t;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function __read(o, n) {
|
|
71
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
72
|
+
if (!m) return o;
|
|
73
|
+
var i = m.call(o), r, ar = [], e;
|
|
74
|
+
try {
|
|
75
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
76
|
+
}
|
|
77
|
+
catch (error) { e = { error: error }; }
|
|
78
|
+
finally {
|
|
79
|
+
try {
|
|
80
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
81
|
+
}
|
|
82
|
+
finally { if (e) throw e.error; }
|
|
83
|
+
}
|
|
84
|
+
return ar;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function __spreadArray(to, from) {
|
|
88
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
89
|
+
to[j] = from[i];
|
|
90
|
+
return to;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* *
|
|
94
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
95
|
+
* you may not use this file except in compliance with the License.
|
|
96
|
+
* You may obtain a copy of the License at
|
|
97
|
+
*
|
|
98
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
99
|
+
*
|
|
100
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
101
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
102
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
103
|
+
* See the License for the specific language governing permissions and
|
|
104
|
+
* limitations under the License.
|
|
105
|
+
*
|
|
106
|
+
* Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
|
|
107
|
+
* Copyright 2021 - Finnish Meteorological Institute (FMI)
|
|
108
|
+
* */
|
|
109
|
+
var errorMessages = {
|
|
110
|
+
required: 'This field is required',
|
|
111
|
+
isValidDate: 'Not a valid date',
|
|
112
|
+
isAfter: 'Date should not be before',
|
|
113
|
+
isXHoursBefore: 'Date is too far in the past',
|
|
114
|
+
isXHoursAfter: 'Date is too far in the future',
|
|
115
|
+
isBefore: 'Timestamp too late',
|
|
116
|
+
minLevel: 'The minimum level is 1',
|
|
117
|
+
isLatitude: 'Invalid latitude, expected number with maximum two decimal degrees between -90.00 and 90.00',
|
|
118
|
+
isLongitude: 'Invalid longitude, expected number with maximum two decimal degrees between -180.00 and 180.00',
|
|
119
|
+
isValidMax: 'The maximum value is exceeded',
|
|
120
|
+
isLevelLower: 'The lower level has to be below the upper level',
|
|
121
|
+
isNonOrBothCoordinates: 'Please enter both coordinates',
|
|
122
|
+
isInteger: 'Invalid entry, enter a non-decimal number',
|
|
123
|
+
isNumeric: 'Invalid entry, enter a numeric value',
|
|
124
|
+
containsNoCommas: 'Please use a dot (.) as decimal separator',
|
|
125
|
+
minVisibility: 'The minimum visibility is 0',
|
|
126
|
+
maxVisibility: 'The maximum visibility is 4900'
|
|
127
|
+
};
|
|
128
|
+
var regexMaxTwoDecimals = /^\s*-?\d+(\.\d{1,2})?\s*$/; // validations
|
|
129
|
+
|
|
130
|
+
var isEmpty = function isEmpty(value) {
|
|
131
|
+
if (typeof value === 'string' && !value.trim().length || value === null || value === undefined) {
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return false;
|
|
136
|
+
};
|
|
137
|
+
var isValidDate = function isValidDate(value) {
|
|
138
|
+
return value ? moment__default["default"](value).isValid() : true;
|
|
139
|
+
};
|
|
140
|
+
var isBefore = function isBefore(ownDate, referenceDate) {
|
|
141
|
+
return ownDate ? moment__default["default"].utc(ownDate) < moment__default["default"].utc(referenceDate) : true;
|
|
142
|
+
};
|
|
143
|
+
var isAfter = function isAfter(ownDate, otherDate) {
|
|
144
|
+
return ownDate ? moment__default["default"].utc(ownDate).isAfter(moment__default["default"].utc(otherDate)) : true;
|
|
145
|
+
};
|
|
146
|
+
var isBetween = function isBetween(ownDate, otherDateStart, otherDateEnd) {
|
|
147
|
+
return moment__default["default"].utc(ownDate) >= moment__default["default"].utc(otherDateStart) && moment__default["default"].utc(ownDate) <= moment__default["default"].utc(otherDateEnd);
|
|
148
|
+
};
|
|
149
|
+
var isXHoursBefore = function isXHoursBefore(ownDate, otherDate, hours) {
|
|
150
|
+
if (hours === void 0) {
|
|
151
|
+
hours = 4;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (isEmpty(ownDate) || isEmpty(otherDate)) {
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
var duration = moment__default["default"].duration(moment__default["default"].utc(ownDate).diff(otherDate));
|
|
159
|
+
var inHours = duration.asHours();
|
|
160
|
+
return inHours >= -hours;
|
|
161
|
+
};
|
|
162
|
+
var isXHoursAfter = function isXHoursAfter(ownDate, otherDate, hours) {
|
|
163
|
+
if (hours === void 0) {
|
|
164
|
+
hours = 4;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (isEmpty(ownDate) || isEmpty(otherDate)) {
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
var duration = moment__default["default"].duration(moment__default["default"].utc(ownDate).diff(otherDate));
|
|
172
|
+
var inHours = duration.asHours();
|
|
173
|
+
return inHours <= hours;
|
|
174
|
+
};
|
|
175
|
+
var isLatitude = function isLatitude(lat) {
|
|
176
|
+
if (!lat) return true;
|
|
177
|
+
return isFinite(lat) && Math.abs(lat) <= 90 && regexMaxTwoDecimals.test(lat.toString());
|
|
178
|
+
};
|
|
179
|
+
var isLongitude = function isLongitude(lng) {
|
|
180
|
+
if (!lng) return true;
|
|
181
|
+
return isFinite(lng) && Math.abs(lng) <= 180 && lng >= -180 && regexMaxTwoDecimals.test(lng.toString());
|
|
182
|
+
};
|
|
183
|
+
var isValidMax = function isValidMax(value, maxValue) {
|
|
184
|
+
if (isEmpty(value)) {
|
|
185
|
+
return true;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return !(value > maxValue);
|
|
189
|
+
};
|
|
190
|
+
var isValidMin = function isValidMin(value, minValue) {
|
|
191
|
+
if (isEmpty(value)) {
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return !(value < minValue);
|
|
196
|
+
};
|
|
197
|
+
var hasValidGeometry = function hasValidGeometry(geojson) {
|
|
198
|
+
if (!geojson || !geojson.features || !geojson.features.length || !geojson.features[0].geometry || // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
!geojson.features[0].geometry.coordinates || !geojson.features[0].geometry.type) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return true;
|
|
205
|
+
};
|
|
206
|
+
var isValidGeoJsonCoordinates = function isValidGeoJsonCoordinates(geojson) {
|
|
207
|
+
var hasGeometry = hasValidGeometry(geojson);
|
|
208
|
+
|
|
209
|
+
if (!hasGeometry) {
|
|
210
|
+
return false;
|
|
211
|
+
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
212
|
+
// @ts-ignore
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
var _a = geojson.features[0].geometry,
|
|
216
|
+
coordinates = _a.coordinates,
|
|
217
|
+
type = _a.type; // For type POINT coordinates is an array of 2
|
|
218
|
+
|
|
219
|
+
if (coordinates.length === 2 && type === 'Point') {
|
|
220
|
+
return true;
|
|
221
|
+
} // For type POLYGON coordinates is an array of arrays
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
if (coordinates.length === 1 && coordinates[0].length > 0 && type === 'Polygon') {
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return false;
|
|
229
|
+
};
|
|
230
|
+
var isMaximumOneDrawing = function isMaximumOneDrawing(geojson) {
|
|
231
|
+
var hasGeometry = hasValidGeometry(geojson);
|
|
232
|
+
|
|
233
|
+
if (!hasGeometry) {
|
|
234
|
+
return true; // no need to check further when there is no drawing yet
|
|
235
|
+
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
236
|
+
// @ts-ignore
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
var _a = geojson.features[0].geometry,
|
|
240
|
+
coordinates = _a.coordinates,
|
|
241
|
+
type = _a.type; // For type POLYGON only one array of coordinates is allowed
|
|
242
|
+
|
|
243
|
+
if (type === 'Polygon' && coordinates.length > 1) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return true;
|
|
248
|
+
};
|
|
249
|
+
var hasIntersectionWithFIR = function hasIntersectionWithFIR(geojson, intersection) {
|
|
250
|
+
if (!hasValidGeometry(geojson) || // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
251
|
+
// @ts-ignore
|
|
252
|
+
!geojson.features[0].geometry.coordinates.length || geojson.features[0].geometry.type === 'Polygon' && !geojson.features[0].geometry.coordinates[0].length) {
|
|
253
|
+
return true; // no need to check further when there is no drawing yet
|
|
254
|
+
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
255
|
+
// @ts-ignore
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
var coordinates = intersection.features[0].geometry.coordinates;
|
|
259
|
+
|
|
260
|
+
if (coordinates.length > 0 && coordinates[0].length === 0) {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return true;
|
|
265
|
+
};
|
|
266
|
+
var hasMaxFeaturePoints = function hasMaxFeaturePoints(geojson, maxPoints) {
|
|
267
|
+
if (maxPoints === void 0) {
|
|
268
|
+
maxPoints = 7;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
var hasGeometry = hasValidGeometry(geojson);
|
|
272
|
+
|
|
273
|
+
if (!hasGeometry) {
|
|
274
|
+
return false;
|
|
275
|
+
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
276
|
+
// @ts-ignore
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
var _a = geojson.features[0].geometry,
|
|
280
|
+
coordinates = _a.coordinates,
|
|
281
|
+
type = _a.type;
|
|
282
|
+
|
|
283
|
+
if (type === 'Polygon' && coordinates[0].length > maxPoints) {
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return false;
|
|
288
|
+
};
|
|
289
|
+
var hasMulitpleIntersections = function hasMulitpleIntersections(geojson) {
|
|
290
|
+
var hasGeometry = hasValidGeometry(geojson);
|
|
291
|
+
|
|
292
|
+
if (!hasGeometry) {
|
|
293
|
+
return false;
|
|
294
|
+
} // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
295
|
+
// @ts-ignore
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
var _a = geojson.features[0].geometry,
|
|
299
|
+
coordinates = _a.coordinates,
|
|
300
|
+
type = _a.type;
|
|
301
|
+
|
|
302
|
+
if (type === 'MultiPolygon' || coordinates.length > 1 && type !== 'Point') {
|
|
303
|
+
return true;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
return false;
|
|
307
|
+
};
|
|
308
|
+
var isGeometryDirty = function isGeometryDirty(geoJSON, formGeoJSON) {
|
|
309
|
+
if (geoJSON === (undefined) || formGeoJSON === (undefined) || !hasValidGeometry(geoJSON) || !hasValidGeometry(formGeoJSON)) {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return !lodash.isEqual( // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
314
|
+
// @ts-ignore
|
|
315
|
+
geoJSON.features[0].geometry.coordinates, // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
316
|
+
// @ts-ignore
|
|
317
|
+
formGeoJSON.features[0].geometry.coordinates);
|
|
318
|
+
};
|
|
319
|
+
var isInteger = function isInteger(value) {
|
|
320
|
+
if (isEmpty(value)) {
|
|
321
|
+
return true;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return Number.isInteger(value);
|
|
325
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
326
|
+
var isNonOrBothCoordinates = function isNonOrBothCoordinates(coordinate, otherCoordinate) {
|
|
327
|
+
if (coordinate && otherCoordinate || !coordinate && !otherCoordinate) {
|
|
328
|
+
return true;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (coordinate) {
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
return false;
|
|
336
|
+
};
|
|
337
|
+
var containsNoCommas = function containsNoCommas(val) {
|
|
338
|
+
if (typeof val === 'string' && val.includes(',')) {
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
return true;
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
var ReactHookFormFormControl = function ReactHookFormFormControl(_a) {
|
|
346
|
+
var children = _a.children,
|
|
347
|
+
errors = _a.errors,
|
|
348
|
+
props = __rest(_a, ["children", "errors"]);
|
|
349
|
+
|
|
350
|
+
return /*#__PURE__*/React__namespace.createElement(core.FormControl, __assign({
|
|
351
|
+
fullWidth: true
|
|
352
|
+
}, props, {
|
|
353
|
+
error: !!errors
|
|
354
|
+
}), children, errors && /*#__PURE__*/React__namespace.createElement(core.FormHelperText, {
|
|
355
|
+
variant: "filled"
|
|
356
|
+
}, errors.message || errorMessages[errors.type]));
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
function getDeepProperty(p, o) {
|
|
360
|
+
return p.reduce(function (xs, x) {
|
|
361
|
+
return xs && xs[x] ? xs[x] : null;
|
|
362
|
+
}, o);
|
|
363
|
+
}
|
|
364
|
+
var getErrors = function getErrors(name, errors) {
|
|
365
|
+
var nameAsArray = name.split('.');
|
|
366
|
+
return getDeepProperty(nameAsArray, errors);
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
var ReactHookFormSelect = function ReactHookFormSelect(_a) {
|
|
370
|
+
var name = _a.name,
|
|
371
|
+
label = _a.label,
|
|
372
|
+
_b = _a.defaultValue,
|
|
373
|
+
defaultValue = _b === void 0 ? '' : _b,
|
|
374
|
+
children = _a.children,
|
|
375
|
+
rules = _a.rules,
|
|
376
|
+
_c = _a.onChange,
|
|
377
|
+
_onChange = _c === void 0 ? function () {} : _c,
|
|
378
|
+
disabled = _a.disabled,
|
|
379
|
+
className = _a.className,
|
|
380
|
+
otherProps = __rest(_a, ["name", "label", "defaultValue", "children", "rules", "onChange", "disabled", "className"]);
|
|
381
|
+
|
|
382
|
+
var labelId = name + "-label";
|
|
383
|
+
var inputRef = React__namespace.useRef(null);
|
|
384
|
+
|
|
385
|
+
var _d = reactHookForm.useFormContext(),
|
|
386
|
+
control = _d.control,
|
|
387
|
+
formErrors = _d.errors;
|
|
388
|
+
|
|
389
|
+
var errors = getErrors(name, formErrors);
|
|
390
|
+
return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
|
|
391
|
+
className: className,
|
|
392
|
+
disabled: disabled,
|
|
393
|
+
errors: errors
|
|
394
|
+
}, /*#__PURE__*/React__namespace.createElement(core.InputLabel, {
|
|
395
|
+
variant: "filled",
|
|
396
|
+
id: labelId
|
|
397
|
+
}, label), /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
|
|
398
|
+
render: function render(_props) {
|
|
399
|
+
return /*#__PURE__*/React__namespace.createElement(core.Select, __assign({
|
|
400
|
+
labelId: labelId,
|
|
401
|
+
label: label,
|
|
402
|
+
inputRef: inputRef,
|
|
403
|
+
name: name,
|
|
404
|
+
onChange: function onChange(changeEvent) {
|
|
405
|
+
_props.onChange(changeEvent.target.value); // default props
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
_onChange(changeEvent);
|
|
409
|
+
},
|
|
410
|
+
value: _props.value,
|
|
411
|
+
variant: "filled"
|
|
412
|
+
}, otherProps), children);
|
|
413
|
+
},
|
|
414
|
+
name: name,
|
|
415
|
+
control: control,
|
|
416
|
+
defaultValue: defaultValue,
|
|
417
|
+
rules: rules,
|
|
418
|
+
onFocus: function onFocus() {
|
|
419
|
+
var _a;
|
|
420
|
+
|
|
421
|
+
inputRef.current.disabled = false;
|
|
422
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
423
|
+
}
|
|
424
|
+
}));
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
var ReactHookFormRadioGroup = function ReactHookFormRadioGroup(_a) {
|
|
428
|
+
var name = _a.name,
|
|
429
|
+
label = _a.label,
|
|
430
|
+
_b = _a.defaultValue,
|
|
431
|
+
defaultValue = _b === void 0 ? '' : _b,
|
|
432
|
+
children = _a.children,
|
|
433
|
+
rules = _a.rules,
|
|
434
|
+
_c = _a.disabled,
|
|
435
|
+
disabled = _c === void 0 ? false : _c,
|
|
436
|
+
_d = _a.onChange,
|
|
437
|
+
_onChange = _d === void 0 ? function () {
|
|
438
|
+
return null;
|
|
439
|
+
} : _d,
|
|
440
|
+
otherProps = __rest(_a, ["name", "label", "defaultValue", "children", "rules", "disabled", "onChange"]);
|
|
441
|
+
|
|
442
|
+
var labelId = name + "-label";
|
|
443
|
+
var inputRef = React__namespace.useRef(null);
|
|
444
|
+
|
|
445
|
+
var _e = reactHookForm.useFormContext(),
|
|
446
|
+
control = _e.control,
|
|
447
|
+
formErrors = _e.errors;
|
|
448
|
+
|
|
449
|
+
var errors = getErrors(name, formErrors);
|
|
450
|
+
return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
|
|
451
|
+
disabled: disabled,
|
|
452
|
+
errors: errors
|
|
453
|
+
}, /*#__PURE__*/React__namespace.createElement(core.InputLabel, {
|
|
454
|
+
id: labelId
|
|
455
|
+
}, label), /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
|
|
456
|
+
render: function render(_props) {
|
|
457
|
+
return /*#__PURE__*/React__namespace.createElement(core.RadioGroup, __assign({
|
|
458
|
+
value: _props.value,
|
|
459
|
+
onChange: function onChange(changeEvent) {
|
|
460
|
+
_props.onChange(changeEvent.target.value);
|
|
461
|
+
|
|
462
|
+
_onChange(changeEvent, changeEvent.target.value);
|
|
463
|
+
},
|
|
464
|
+
innerRef: inputRef,
|
|
465
|
+
name: name
|
|
466
|
+
}, otherProps), children);
|
|
467
|
+
},
|
|
468
|
+
name: name,
|
|
469
|
+
control: control,
|
|
470
|
+
defaultValue: defaultValue,
|
|
471
|
+
rules: rules,
|
|
472
|
+
onFocus: function onFocus() {
|
|
473
|
+
// move focus to first radio on error
|
|
474
|
+
var firstElement = inputRef.current.querySelector('input');
|
|
475
|
+
|
|
476
|
+
if (firstElement) {
|
|
477
|
+
firstElement.disabled = false;
|
|
478
|
+
firstElement === null || firstElement === void 0 ? void 0 : firstElement.focus();
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}));
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
var styles = {
|
|
485
|
+
textEditor: {
|
|
486
|
+
backgroundColor: 'rgba(0, 117, 169, 0.05)'
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
var convertTextInputValue = function convertTextInputValue(value, inCapitals) {
|
|
490
|
+
return inCapitals ? value.toUpperCase() : value;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
var ReactHookFormTextField = function ReactHookFormTextField(_a) {
|
|
494
|
+
var name = _a.name,
|
|
495
|
+
label = _a.label,
|
|
496
|
+
_b = _a.defaultValue,
|
|
497
|
+
defaultValue = _b === void 0 ? '' : _b,
|
|
498
|
+
rules = _a.rules,
|
|
499
|
+
_c = _a.disabled,
|
|
500
|
+
disabled = _c === void 0 ? false : _c,
|
|
501
|
+
_d = _a.upperCase,
|
|
502
|
+
upperCase = _d === void 0 ? false : _d,
|
|
503
|
+
_e = _a.helperText,
|
|
504
|
+
helperText = _e === void 0 ? '' : _e,
|
|
505
|
+
className = _a.className,
|
|
506
|
+
_f = _a.onChange,
|
|
507
|
+
_onChange = _f === void 0 ? function () {
|
|
508
|
+
return null;
|
|
509
|
+
} : _f,
|
|
510
|
+
otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "upperCase", "helperText", "className", "onChange"]);
|
|
511
|
+
|
|
512
|
+
var inputRef = React__namespace.useRef(null);
|
|
513
|
+
|
|
514
|
+
var _g = reactHookForm.useFormContext(),
|
|
515
|
+
control = _g.control,
|
|
516
|
+
formErrors = _g.errors;
|
|
517
|
+
|
|
518
|
+
var errors = getErrors(name, formErrors);
|
|
519
|
+
return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
|
|
520
|
+
className: className,
|
|
521
|
+
disabled: disabled,
|
|
522
|
+
errors: errors
|
|
523
|
+
}, /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
|
|
524
|
+
render: function render(_props) {
|
|
525
|
+
return /*#__PURE__*/React__namespace.createElement(core.TextField, __assign({
|
|
526
|
+
label: label,
|
|
527
|
+
style: otherProps.multiline ? styles.textEditor : {},
|
|
528
|
+
error: !!errors,
|
|
529
|
+
helperText: helperText,
|
|
530
|
+
value: _props.value,
|
|
531
|
+
variant: "filled",
|
|
532
|
+
type: "text",
|
|
533
|
+
name: name,
|
|
534
|
+
onChange: function onChange(evt) {
|
|
535
|
+
var value = evt.target.value;
|
|
536
|
+
var convertedValue = convertTextInputValue(value, upperCase);
|
|
537
|
+
|
|
538
|
+
_props.onChange(convertedValue);
|
|
539
|
+
|
|
540
|
+
_onChange(null);
|
|
541
|
+
},
|
|
542
|
+
disabled: disabled,
|
|
543
|
+
inputRef: inputRef
|
|
544
|
+
}, otherProps));
|
|
545
|
+
},
|
|
546
|
+
name: name,
|
|
547
|
+
control: control,
|
|
548
|
+
defaultValue: defaultValue,
|
|
549
|
+
rules: rules,
|
|
550
|
+
disabled: disabled,
|
|
551
|
+
onFocus: function onFocus() {
|
|
552
|
+
var _a;
|
|
553
|
+
|
|
554
|
+
inputRef.current.disabled = false;
|
|
555
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
556
|
+
}
|
|
557
|
+
}));
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
var convertNumericInputValue = function convertNumericInputValue(value, inputMode) {
|
|
561
|
+
if (value !== '' && !isNaN(parseFloat(value))) {
|
|
562
|
+
// float is returned as string, option 'valueAsNumber: true' will take care of the parsing
|
|
563
|
+
return inputMode === 'numeric' ? parseInt(value, 10) : value;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
return value;
|
|
567
|
+
};
|
|
568
|
+
var parseInput = function parseInput(value) {
|
|
569
|
+
// allow '-' at the start of the value
|
|
570
|
+
if (typeof value === 'string' && value.includes('-')) {
|
|
571
|
+
return value.split('-').reduce(function (list, el) {
|
|
572
|
+
if (!el.length && !list.length) {
|
|
573
|
+
return '-';
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
return list.concat(el);
|
|
577
|
+
}, '');
|
|
578
|
+
} // return value when '.' is given
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
if (typeof value === 'string' && value.includes('.')) {
|
|
582
|
+
return value;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
return value == null || isNaN(value) ? '' : value.toString();
|
|
586
|
+
};
|
|
587
|
+
var getAllowedKeys = function getAllowedKeys(inputMode) {
|
|
588
|
+
if (inputMode === void 0) {
|
|
589
|
+
inputMode = 'numeric';
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
var allowedKeys = __spreadArray(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', 'Backspace', 'ArrowRight', 'ArrowLeft', 'Tab', 'Home', 'End', 'PageDown', 'PageUp', 'Delete'], __read(inputMode === 'decimal' ? ['.'] : []));
|
|
593
|
+
|
|
594
|
+
return allowedKeys;
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
var ReactHookFormNumberField = function ReactHookFormNumberField(_a) {
|
|
598
|
+
var name = _a.name,
|
|
599
|
+
label = _a.label,
|
|
600
|
+
_b = _a.defaultValue,
|
|
601
|
+
defaultValue = _b === void 0 ? '' : _b,
|
|
602
|
+
rules = _a.rules,
|
|
603
|
+
_c = _a.disabled,
|
|
604
|
+
disabled = _c === void 0 ? false : _c,
|
|
605
|
+
_d = _a.inputMode,
|
|
606
|
+
inputMode = _d === void 0 ? 'numeric' : _d,
|
|
607
|
+
_e = _a.helperText,
|
|
608
|
+
helperText = _e === void 0 ? '' : _e,
|
|
609
|
+
className = _a.className,
|
|
610
|
+
_f = _a.onChange,
|
|
611
|
+
_onChange = _f === void 0 ? function () {
|
|
612
|
+
return null;
|
|
613
|
+
} : _f,
|
|
614
|
+
otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "inputMode", "helperText", "className", "onChange"]);
|
|
615
|
+
|
|
616
|
+
var inputRef = React__namespace.useRef(null);
|
|
617
|
+
|
|
618
|
+
var _g = reactHookForm.useFormContext(),
|
|
619
|
+
control = _g.control,
|
|
620
|
+
formErrors = _g.errors;
|
|
621
|
+
|
|
622
|
+
var errors = getErrors(name, formErrors);
|
|
623
|
+
|
|
624
|
+
var validationRules = __assign(__assign({}, rules), {
|
|
625
|
+
setValueAs: function setValueAs(value) {
|
|
626
|
+
return parseFloat(value);
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
var allowedKeyes = getAllowedKeys(inputMode);
|
|
631
|
+
|
|
632
|
+
var onKeyDown = function onKeyDown(event) {
|
|
633
|
+
if (!allowedKeyes.includes(event.key) || // only allow one seperator
|
|
634
|
+
event.key === '.' && event.target.value.includes('.') || // only allow one -
|
|
635
|
+
event.key === '-' && event.target.value.includes('-')) {
|
|
636
|
+
event.preventDefault();
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
|
|
640
|
+
return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
|
|
641
|
+
className: className,
|
|
642
|
+
disabled: disabled,
|
|
643
|
+
errors: errors
|
|
644
|
+
}, /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
|
|
645
|
+
render: function render(_props) {
|
|
646
|
+
return /*#__PURE__*/React__namespace.createElement(core.TextField, __assign({
|
|
647
|
+
label: label,
|
|
648
|
+
error: !!errors,
|
|
649
|
+
helperText: helperText,
|
|
650
|
+
inputMode: inputMode,
|
|
651
|
+
value: parseInput(_props.value),
|
|
652
|
+
variant: "filled",
|
|
653
|
+
type: "text",
|
|
654
|
+
inputProps: {
|
|
655
|
+
inputMode: inputMode
|
|
656
|
+
},
|
|
657
|
+
name: name,
|
|
658
|
+
onChange: function onChange(evt) {
|
|
659
|
+
_props.onChange(convertNumericInputValue(evt.target.value, inputMode));
|
|
660
|
+
|
|
661
|
+
_onChange(null);
|
|
662
|
+
},
|
|
663
|
+
onKeyDown: onKeyDown,
|
|
664
|
+
disabled: disabled,
|
|
665
|
+
inputRef: inputRef
|
|
666
|
+
}, otherProps));
|
|
667
|
+
},
|
|
668
|
+
name: name,
|
|
669
|
+
control: control,
|
|
670
|
+
defaultValue: defaultValue,
|
|
671
|
+
rules: validationRules,
|
|
672
|
+
disabled: disabled,
|
|
673
|
+
onFocus: function onFocus() {
|
|
674
|
+
var _a;
|
|
675
|
+
|
|
676
|
+
inputRef.current.disabled = false;
|
|
677
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
678
|
+
}
|
|
679
|
+
}));
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
moment__default$1["default"].tz.setDefault('Etc/GMT-0');
|
|
683
|
+
var getFormattedValue = function getFormattedValue(value) {
|
|
684
|
+
var isMoment = moment__default$1["default"](value).isValid();
|
|
685
|
+
return isMoment ? moment__default$1["default"].utc(value).format() : value;
|
|
686
|
+
};
|
|
687
|
+
|
|
688
|
+
var ReactHookKeyboardDateTimePicker = function ReactHookKeyboardDateTimePicker(_a) {
|
|
689
|
+
var name = _a.name,
|
|
690
|
+
rules = _a.rules,
|
|
691
|
+
disabled = _a.disabled,
|
|
692
|
+
_b = _a.label,
|
|
693
|
+
label = _b === void 0 ? 'Select date and time' : _b,
|
|
694
|
+
_c = _a.format,
|
|
695
|
+
format = _c === void 0 ? 'YYYY/MM/DD HH:mm' : _c,
|
|
696
|
+
_d = _a.openTo,
|
|
697
|
+
openTo = _d === void 0 ? 'hours' : _d,
|
|
698
|
+
_e = _a.defaultNullValue,
|
|
699
|
+
defaultNullValue = _e === void 0 ? null : _e,
|
|
700
|
+
_f = _a.helperText,
|
|
701
|
+
helperText = _f === void 0 ? '' : _f,
|
|
702
|
+
_g = _a.onChange,
|
|
703
|
+
_onChange = _g === void 0 ? function () {
|
|
704
|
+
return null;
|
|
705
|
+
} : _g,
|
|
706
|
+
className = _a.className,
|
|
707
|
+
otherProps = __rest(_a, ["name", "rules", "disabled", "label", "format", "openTo", "defaultNullValue", "helperText", "onChange", "className"]);
|
|
708
|
+
|
|
709
|
+
var inputRef = React__namespace.useRef(null);
|
|
710
|
+
|
|
711
|
+
var _h = reactHookForm.useFormContext(),
|
|
712
|
+
control = _h.control,
|
|
713
|
+
formErrors = _h.errors,
|
|
714
|
+
getValues = _h.getValues;
|
|
715
|
+
|
|
716
|
+
var errors = getErrors(name, formErrors);
|
|
717
|
+
return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
|
|
718
|
+
disabled: disabled,
|
|
719
|
+
errors: errors,
|
|
720
|
+
className: className
|
|
721
|
+
}, /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
|
|
722
|
+
render: function render(_props) {
|
|
723
|
+
return /*#__PURE__*/React__namespace.createElement(pickers.KeyboardDateTimePicker, __assign({
|
|
724
|
+
autoOk: true,
|
|
725
|
+
name: name,
|
|
726
|
+
ampm: false,
|
|
727
|
+
format: format,
|
|
728
|
+
label: label,
|
|
729
|
+
value: _props.value,
|
|
730
|
+
openTo: openTo,
|
|
731
|
+
error: !!errors,
|
|
732
|
+
disabled: disabled,
|
|
733
|
+
onChange: function onChange(value) {
|
|
734
|
+
_props.onChange(getFormattedValue(value));
|
|
735
|
+
|
|
736
|
+
_onChange(getFormattedValue(value));
|
|
737
|
+
},
|
|
738
|
+
invalidDateMessage: null,
|
|
739
|
+
inputVariant: "filled",
|
|
740
|
+
inputRef: inputRef,
|
|
741
|
+
InputAdornmentProps: {
|
|
742
|
+
position: 'start'
|
|
743
|
+
},
|
|
744
|
+
helperText: helperText,
|
|
745
|
+
InputProps: {
|
|
746
|
+
endAdornment: /*#__PURE__*/React__namespace.createElement(core.InputAdornment, {
|
|
747
|
+
style: {
|
|
748
|
+
paddingTop: '16px'
|
|
749
|
+
},
|
|
750
|
+
position: "end"
|
|
751
|
+
}, "UTC")
|
|
752
|
+
}
|
|
753
|
+
}, otherProps));
|
|
754
|
+
},
|
|
755
|
+
name: name,
|
|
756
|
+
control: control,
|
|
757
|
+
rules: rules,
|
|
758
|
+
defaultValue: getValues(name) || defaultNullValue,
|
|
759
|
+
onFocus: function onFocus() {
|
|
760
|
+
var _a;
|
|
761
|
+
|
|
762
|
+
if (inputRef.current) {
|
|
763
|
+
inputRef.current.disabled = false;
|
|
764
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}));
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
var defaultFormOptions = {
|
|
771
|
+
mode: 'onChange',
|
|
772
|
+
reValidateMode: 'onChange'
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
var ReactHookFormProvider = function ReactHookFormProvider(_a) {
|
|
776
|
+
var children = _a.children,
|
|
777
|
+
_b = _a.options,
|
|
778
|
+
options = _b === void 0 ? defaultFormOptions : _b;
|
|
779
|
+
var formMethods = reactHookForm.useForm(options);
|
|
780
|
+
return /*#__PURE__*/React__default["default"].createElement(reactHookForm.FormProvider, __assign({}, formMethods), children);
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
var ReactHookFormHiddenInput = function ReactHookFormHiddenInput(_a) {
|
|
784
|
+
var name = _a.name,
|
|
785
|
+
_b = _a.defaultValue,
|
|
786
|
+
defaultValue = _b === void 0 ? null : _b,
|
|
787
|
+
rules = _a.rules;
|
|
788
|
+
var control = reactHookForm.useFormContext().control;
|
|
789
|
+
return /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
|
|
790
|
+
render: function render(field) {
|
|
791
|
+
return field.value !== null ? /*#__PURE__*/React__namespace.createElement("input", __assign({}, field, {
|
|
792
|
+
type: "hidden"
|
|
793
|
+
})) : null;
|
|
794
|
+
},
|
|
795
|
+
name: name,
|
|
796
|
+
control: control,
|
|
797
|
+
defaultValue: defaultValue,
|
|
798
|
+
rules: rules
|
|
799
|
+
});
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
exports.ReactHookFormDateTime = ReactHookKeyboardDateTimePicker;
|
|
803
|
+
exports.ReactHookFormFormControl = ReactHookFormFormControl;
|
|
804
|
+
exports.ReactHookFormHiddenInput = ReactHookFormHiddenInput;
|
|
805
|
+
exports.ReactHookFormNumberField = ReactHookFormNumberField;
|
|
806
|
+
exports.ReactHookFormProvider = ReactHookFormProvider;
|
|
807
|
+
exports.ReactHookFormRadioGroup = ReactHookFormRadioGroup;
|
|
808
|
+
exports.ReactHookFormSelect = ReactHookFormSelect;
|
|
809
|
+
exports.ReactHookFormTextField = ReactHookFormTextField;
|
|
810
|
+
exports.containsNoCommas = containsNoCommas;
|
|
811
|
+
exports.defaultFormOptions = defaultFormOptions;
|
|
812
|
+
exports.errorMessages = errorMessages;
|
|
813
|
+
exports.getDeepProperty = getDeepProperty;
|
|
814
|
+
exports.hasIntersectionWithFIR = hasIntersectionWithFIR;
|
|
815
|
+
exports.hasMaxFeaturePoints = hasMaxFeaturePoints;
|
|
816
|
+
exports.hasMulitpleIntersections = hasMulitpleIntersections;
|
|
817
|
+
exports.isAfter = isAfter;
|
|
818
|
+
exports.isBefore = isBefore;
|
|
819
|
+
exports.isBetween = isBetween;
|
|
820
|
+
exports.isEmpty = isEmpty;
|
|
821
|
+
exports.isGeometryDirty = isGeometryDirty;
|
|
822
|
+
exports.isInteger = isInteger;
|
|
823
|
+
exports.isLatitude = isLatitude;
|
|
824
|
+
exports.isLongitude = isLongitude;
|
|
825
|
+
exports.isMaximumOneDrawing = isMaximumOneDrawing;
|
|
826
|
+
exports.isNonOrBothCoordinates = isNonOrBothCoordinates;
|
|
827
|
+
exports.isValidDate = isValidDate;
|
|
828
|
+
exports.isValidGeoJsonCoordinates = isValidGeoJsonCoordinates;
|
|
829
|
+
exports.isValidMax = isValidMax;
|
|
830
|
+
exports.isValidMin = isValidMin;
|
|
831
|
+
exports.isXHoursAfter = isXHoursAfter;
|
|
832
|
+
exports.isXHoursBefore = isXHoursBefore;
|
|
833
|
+
|
|
834
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
835
|
+
|
|
836
|
+
}));
|