@openforis/arena-core 3.1.5 → 3.2.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/esm/geo/geoFeature.js +2 -0
- package/dist/esm/geo/geoFeature.js.map +1 -0
- package/dist/esm/geo/index.js.map +1 -1
- package/dist/esm/geo/points/isFilled.js +5 -1
- package/dist/esm/geo/points/isFilled.js.map +1 -1
- package/dist/esm/geo/points/parse.js +2 -2
- package/dist/esm/geo/points/parse.js.map +1 -1
- package/dist/esm/geo/points/toLatLong.js +2 -2
- package/dist/esm/geo/points/toLatLong.js.map +1 -1
- package/dist/esm/geo/points/transform.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/logger/logger.js.map +1 -1
- package/dist/esm/node/index.js.map +1 -1
- package/dist/esm/node/node.js.map +1 -1
- package/dist/esm/node/nodeValue/coordinate.js.map +1 -1
- package/dist/esm/node/nodeValue/geo.js +2 -0
- package/dist/esm/node/nodeValue/geo.js.map +1 -0
- package/dist/esm/node/nodeValue/index.js.map +1 -1
- package/dist/esm/node/nodeValue/nodeValue.js +2 -0
- package/dist/esm/node/nodeValue/nodeValue.js.map +1 -0
- package/dist/esm/nodeDef/index.js.map +1 -1
- package/dist/esm/nodeDef/nodeDefs.js.map +1 -1
- package/dist/esm/nodeDef/types/coordinate.js.map +1 -1
- package/dist/esm/record/index.js.map +1 -1
- package/dist/esm/record/recordSummary.js +2 -0
- package/dist/esm/record/recordSummary.js.map +1 -0
- package/dist/esm/survey/index.js.map +1 -1
- package/dist/esm/survey/surveySummary.js +2 -0
- package/dist/esm/survey/surveySummary.js.map +1 -0
- package/dist/esm/survey/surveys/nodeDefs.js +1 -1
- package/dist/esm/survey/surveys/nodeDefs.js.map +1 -1
- package/dist/esm/survey/surveys/refsData.js +4 -3
- package/dist/esm/survey/surveys/refsData.js.map +1 -1
- package/dist/esm/utils/_objects/isEqual.js +6 -2
- package/dist/esm/utils/_objects/isEqual.js.map +1 -1
- package/dist/esm/utils/_objects/path.js +1 -0
- package/dist/esm/utils/_objects/path.js.map +1 -1
- package/dist/esm/utils/fileProcessor.js +1 -0
- package/dist/esm/utils/fileProcessor.js.map +1 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/numbers.js +4 -4
- package/dist/esm/utils/numbers.js.map +1 -1
- package/dist/esm/validation/validations.js +1 -1
- package/dist/esm/validation/validations.js.map +1 -1
- package/dist/geo/geoFeature.d.ts +16 -0
- package/dist/geo/geoFeature.js +3 -0
- package/dist/geo/geoFeature.js.map +1 -0
- package/dist/geo/index.d.ts +1 -0
- package/dist/geo/index.js.map +1 -1
- package/dist/geo/points/isFilled.d.ts +1 -1
- package/dist/geo/points/isFilled.js +5 -1
- package/dist/geo/points/isFilled.js.map +1 -1
- package/dist/geo/points/parse.d.ts +3 -3
- package/dist/geo/points/parse.js +2 -2
- package/dist/geo/points/parse.js.map +1 -1
- package/dist/geo/points/toLatLong.d.ts +1 -1
- package/dist/geo/points/toLatLong.js +1 -1
- package/dist/geo/points/toLatLong.js.map +1 -1
- package/dist/geo/points/transform.d.ts +2 -2
- package/dist/geo/points/transform.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js.map +1 -1
- package/dist/logger/logger.d.ts +4 -4
- package/dist/logger/logger.js.map +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/node.d.ts +2 -2
- package/dist/node/node.js.map +1 -1
- package/dist/node/nodeValue/coordinate.d.ts +3 -0
- package/dist/node/nodeValue/coordinate.js.map +1 -1
- package/dist/node/nodeValue/geo.d.ts +2 -0
- package/dist/node/nodeValue/geo.js +3 -0
- package/dist/node/nodeValue/geo.js.map +1 -0
- package/dist/node/nodeValue/index.d.ts +2 -0
- package/dist/node/nodeValue/index.js.map +1 -1
- package/dist/node/nodeValue/nodeValue.d.ts +9 -0
- package/dist/node/nodeValue/nodeValue.js +3 -0
- package/dist/node/nodeValue/nodeValue.js.map +1 -0
- package/dist/nodeDef/index.d.ts +1 -1
- package/dist/nodeDef/index.js.map +1 -1
- package/dist/nodeDef/nodeDefs.d.ts +2 -2
- package/dist/nodeDef/nodeDefs.js.map +1 -1
- package/dist/nodeDef/types/coordinate.d.ts +2 -0
- package/dist/nodeDef/types/coordinate.js.map +1 -1
- package/dist/record/index.d.ts +1 -0
- package/dist/record/index.js.map +1 -1
- package/dist/record/recordNodesUpdater/recordUpdateResult.d.ts +1 -1
- package/dist/record/recordSummary.d.ts +15 -0
- package/dist/record/recordSummary.js +3 -0
- package/dist/record/recordSummary.js.map +1 -0
- package/dist/survey/index.d.ts +1 -0
- package/dist/survey/index.js.map +1 -1
- package/dist/survey/surveySummary.d.ts +10 -0
- package/dist/survey/surveySummary.js +3 -0
- package/dist/survey/surveySummary.js.map +1 -0
- package/dist/survey/surveys/nodeDefs.d.ts +2 -2
- package/dist/survey/surveys/nodeDefs.js +1 -1
- package/dist/survey/surveys/nodeDefs.js.map +1 -1
- package/dist/survey/surveys/refsData.d.ts +1 -1
- package/dist/survey/surveys/refsData.js +4 -3
- package/dist/survey/surveys/refsData.js.map +1 -1
- package/dist/utils/_objects/index.d.ts +2 -1
- package/dist/utils/_objects/isEqual.d.ts +5 -1
- package/dist/utils/_objects/isEqual.js +7 -5
- package/dist/utils/_objects/isEqual.js.map +1 -1
- package/dist/utils/_objects/path.d.ts +2 -1
- package/dist/utils/_objects/path.js +1 -0
- package/dist/utils/_objects/path.js.map +1 -1
- package/dist/utils/fileProcessor.d.ts +24 -11
- package/dist/utils/fileProcessor.js +1 -0
- package/dist/utils/fileProcessor.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/numbers.d.ts +5 -5
- package/dist/utils/numbers.js +4 -4
- package/dist/utils/numbers.js.map +1 -1
- package/dist/validation/validations.d.ts +10 -10
- package/dist/validation/validations.js +1 -1
- package/dist/validation/validations.js.map +1 -1
- package/package.json +2 -3
package/dist/geo/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/geo/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/geo/index.ts"],"names":[],"mappings":";;;AAIA,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AAErB,mCAAiC;AAAxB,gGAAA,MAAM,OAAA","sourcesContent":["export type { ArenaAreaOfInterest, ArenaAreaOfInterestDescriptor } from './areaOfInterest'\nexport type { ArenaGeoPolygonFeature, ArenaGeoTrackFeature, ArenaGeoTrackFeatureProperties } from './geoFeature'\nexport type { ArenaPoint } from './point'\n\nexport { PointFactory } from './pointFactory'\n\nexport { Points } from './points'\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ArenaPoint } from '../point';
|
|
2
|
-
export declare const isFilled: (point: ArenaPoint) =>
|
|
2
|
+
export declare const isFilled: (point: ArenaPoint | null | undefined) => point is ArenaPoint;
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isFilled = void 0;
|
|
4
4
|
const utils_1 = require("../../utils");
|
|
5
|
-
const isFilled = (point) =>
|
|
5
|
+
const isFilled = (point) => !!point &&
|
|
6
|
+
!utils_1.Objects.isEmpty(point) &&
|
|
7
|
+
!utils_1.Objects.isEmpty(point.srs) &&
|
|
8
|
+
!utils_1.Objects.isEmpty(point.x) &&
|
|
9
|
+
!utils_1.Objects.isEmpty(point.y);
|
|
6
10
|
exports.isFilled = isFilled;
|
|
7
11
|
//# sourceMappingURL=isFilled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isFilled.js","sourceRoot":"","sources":["../../../src/geo/points/isFilled.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAG9B,MAAM,QAAQ,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"isFilled.js","sourceRoot":"","sources":["../../../src/geo/points/isFilled.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAG9B,MAAM,QAAQ,GAAG,CAAC,KAAoC,EAAuB,EAAE,CACpF,CAAC,CAAC,KAAK;IACP,CAAC,eAAO,CAAC,OAAO,CAAC,KAAK,CAAC;IACvB,CAAC,eAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;IAC3B,CAAC,eAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACzB,CAAC,eAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AALd,QAAA,QAAQ,GAAR,QAAQ,CAKM","sourcesContent":["import { Objects } from '../../utils'\nimport { ArenaPoint } from '../point'\n\nexport const isFilled = (point: ArenaPoint | null | undefined): point is ArenaPoint =>\n !!point &&\n !Objects.isEmpty(point) &&\n !Objects.isEmpty(point.srs) &&\n !Objects.isEmpty(point.x) &&\n !Objects.isEmpty(point.y)\n"]}
|
|
@@ -6,7 +6,7 @@ import { ArenaPoint } from '../point';
|
|
|
6
6
|
* - SRID=4326;POINT(12 41)
|
|
7
7
|
* - SRID=4326;POINT(1e-7 41).
|
|
8
8
|
*
|
|
9
|
-
* @param {
|
|
10
|
-
* @returns {ArenaPoint} - The parsed Point object.
|
|
9
|
+
* @param {unknown} value - The point to parse. It can be a string or an object.
|
|
10
|
+
* @returns {ArenaPoint} - The parsed Point object, or null if the value is empty or not a point.
|
|
11
11
|
*/
|
|
12
|
-
export declare const parse: (value:
|
|
12
|
+
export declare const parse: (value: unknown) => ArenaPoint | null;
|
package/dist/geo/points/parse.js
CHANGED
|
@@ -12,8 +12,8 @@ const POINT_REGEX = new RegExp(String.raw `SRID=((EPSG:)?(\w+));POINT\((${NUMBER
|
|
|
12
12
|
* - SRID=4326;POINT(12 41)
|
|
13
13
|
* - SRID=4326;POINT(1e-7 41).
|
|
14
14
|
*
|
|
15
|
-
* @param {
|
|
16
|
-
* @returns {ArenaPoint} - The parsed Point object.
|
|
15
|
+
* @param {unknown} value - The point to parse. It can be a string or an object.
|
|
16
|
+
* @returns {ArenaPoint} - The parsed Point object, or null if the value is empty or not a point.
|
|
17
17
|
*/
|
|
18
18
|
const parse = (value) => {
|
|
19
19
|
if (!value)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../../src/geo/points/parse.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAE9C,sIAAsI;AACtI,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA,kCAAkC,CAAA;AACnE,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAA,gCAAgC,cAAc,MAAM,cAAc,KAAK,CAAC,CAAA;AAEjH;;;;;;;;;GASG;AACI,MAAM,KAAK,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../../src/geo/points/parse.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAE9C,sIAAsI;AACtI,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA,kCAAkC,CAAA;AACnE,MAAM,WAAW,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,CAAA,gCAAgC,cAAc,MAAM,cAAc,KAAK,CAAC,CAAA;AAEjH;;;;;;;;;GASG;AACI,MAAM,KAAK,GAAG,CAAC,KAAc,EAAqB,EAAE;IACzD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAA;IAEvB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAmB,CAAA;IAEzD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACrC,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAA;QAEvB,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QACpB,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;QAC1B,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;QAC1B,OAAO,2BAAY,CAAC,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;IACnD,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAfY,QAAA,KAAK,GAAL,KAAK,CAejB","sourcesContent":["import { ArenaPoint } from '../point'\nimport { PointFactory } from '../pointFactory'\n\n// coordinates can be in exponent notation (e.g. 1e-7), as generated by Number.toString or by PostgreSQL for very small or big numbers\nconst NUMBER_PATTERN = String.raw`-?\\d+(?:\\.\\d+)?(?:[eE][-+]?\\d+)?`\nconst POINT_REGEX = new RegExp(String.raw`SRID=((EPSG:)?(\\w+));POINT\\((${NUMBER_PATTERN}) (${NUMBER_PATTERN})\\)`)\n\n/**\n * Parses a point in the format: SRID=SRS_CODE;POINT(X Y)\n * (X and Y separated by a space). Valid examples are:\n * - SRID=EPSG:4326;POINT(12.489060 41.882788)\n * - SRID=4326;POINT(12 41)\n * - SRID=4326;POINT(1e-7 41).\n *\n * @param {unknown} value - The point to parse. It can be a string or an object.\n * @returns {ArenaPoint} - The parsed Point object, or null if the value is empty or not a point.\n */\nexport const parse = (value: unknown): ArenaPoint | null => {\n if (!value) return null\n\n if (typeof value === 'object') return value as ArenaPoint\n\n if (typeof value === 'string') {\n const match = POINT_REGEX.exec(value)\n if (!match) return null\n\n const srs = match[3]\n const x = Number(match[4])\n const y = Number(match[5])\n return PointFactory.createInstance({ srs, x, y })\n }\n return null\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ArenaSRSIndex } from '../../srs';
|
|
2
2
|
import { ArenaPoint } from '../point';
|
|
3
|
-
export declare const toLatLong: (point: ArenaPoint, srsIndex
|
|
3
|
+
export declare const toLatLong: (point: ArenaPoint | null | undefined, srsIndex?: ArenaSRSIndex) => ArenaPoint | null;
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toLatLong = void 0;
|
|
4
4
|
const srs_1 = require("../../srs");
|
|
5
5
|
const transform_1 = require("./transform");
|
|
6
|
-
const toLatLong = (point, srsIndex) => (0, transform_1.transform)(point, srs_1.DEFAULT_SRS.code, srsIndex);
|
|
6
|
+
const toLatLong = (point, srsIndex = srs_1.DEFAULT_SRS_INDEX) => (0, transform_1.transform)(point, srs_1.DEFAULT_SRS.code, srsIndex);
|
|
7
7
|
exports.toLatLong = toLatLong;
|
|
8
8
|
//# sourceMappingURL=toLatLong.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toLatLong.js","sourceRoot":"","sources":["../../../src/geo/points/toLatLong.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"toLatLong.js","sourceRoot":"","sources":["../../../src/geo/points/toLatLong.ts"],"names":[],"mappings":";;;AAAA,mCAAyE;AAEzE,2CAAuC;AAEhC,MAAM,SAAS,GAAG,CACvB,KAAoC,EACpC,QAAQ,GAAkB,uBAAiB,EACxB,EAAE,CAAC,IAAA,qBAAS,EAAC,KAAK,EAAE,iBAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AAHvD,QAAA,SAAS,GAAT,SAAS,CAG8C","sourcesContent":["import { DEFAULT_SRS, DEFAULT_SRS_INDEX, ArenaSRSIndex } from '../../srs'\nimport { ArenaPoint } from '../point'\nimport { transform } from './transform'\n\nexport const toLatLong = (\n point: ArenaPoint | null | undefined,\n srsIndex: ArenaSRSIndex = DEFAULT_SRS_INDEX\n): ArenaPoint | null => transform(point, DEFAULT_SRS.code, srsIndex)\n"]}
|
|
@@ -9,7 +9,7 @@ import { ArenaPoint } from '../point';
|
|
|
9
9
|
* @returns The transformed point (the point itself if it is already in the target SRS).
|
|
10
10
|
* @throws {SystemError} `geo.pointNotFilled`, `geo.srsNotFound` (with the `code` param) or `geo.transformFailed`.
|
|
11
11
|
*/
|
|
12
|
-
export declare const transformOrThrow: (point: ArenaPoint, srsCodeTo: string, srsIndex?: ArenaSRSIndex) => ArenaPoint;
|
|
12
|
+
export declare const transformOrThrow: (point: ArenaPoint | null | undefined, srsCodeTo: string, srsIndex?: ArenaSRSIndex) => ArenaPoint;
|
|
13
13
|
/**
|
|
14
14
|
* Transforms the specified point from one SRS into another.
|
|
15
15
|
* Use `transformOrThrow` to know why a point cannot be transformed.
|
|
@@ -19,4 +19,4 @@ export declare const transformOrThrow: (point: ArenaPoint, srsCodeTo: string, sr
|
|
|
19
19
|
* @param srsIndex - SRSs indexed by SRS code.
|
|
20
20
|
* @returns The transformed point, or null if the point is not filled, an SRS is unknown or the transformation fails.
|
|
21
21
|
*/
|
|
22
|
-
export declare const transform: (point: ArenaPoint, srsCodeTo: string, srsIndex?: ArenaSRSIndex) => ArenaPoint | null;
|
|
22
|
+
export declare const transform: (point: ArenaPoint | null | undefined, srsCodeTo: string, srsIndex?: ArenaSRSIndex) => ArenaPoint | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/geo/points/transform.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA6C;AAE7C,uCAA0D;AAC1D,mCAA4D;AAE5D,kDAA8C;AAC9C,yCAAqC;AACrC,qCAAiC;AAEjC,oGAAoG;AACpG,MAAM,eAAe,GAAG,IAAI,GAAG,EAAqB,CAAA;AAEpD,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,KAAa,EAAa,EAAE;IACjE,MAAM,GAAG,GAAG,GAAG,OAAO,KAAK,KAAK,EAAE,CAAA;IAClC,IAAI,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACxC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,SAAS,GAAG,IAAA,eAAK,EAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACjC,eAAe,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ACrB,IAAI,CAAC;QACH,OAAO,IAAA,QAAA,gBAAgB,EAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;IACrD,CAAC;eAAO,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAVY,QAAA,SAAS,GAAT,SAAS,CAUrB","sourcesContent":["import proj4, { type Converter } from 'proj4'\n\nimport { SystemError, SystemErrorKeys } from '../../error'\nimport { DEFAULT_SRS_INDEX, ArenaSRSIndex } from '../../srs'\nimport { ArenaPoint } from '../point'\nimport { PointFactory } from '../pointFactory'\nimport { isFilled } from './isFilled'\nimport { getSrs } from './getSrs'\n\n// proj4 parses both WKT strings every time it is called with them: cache the converters by WKT pair\nconst convertersCache = new Map<string, Converter>()\n\nconst getConverter = (wktFrom: string, wktTo: string): Converter => {\n const key = `${wktFrom}\\n${wktTo}`\n let converter = convertersCache.get(key)\n if (!converter) {\n converter = proj4(wktFrom, wktTo)\n convertersCache.set(key, converter)\n }\n return converter\n}\n\n/**\n * Transforms the specified point from one SRS into another, throwing a SystemError with the reason when it cannot.\n *\n * @param point - The point to transform.\n * @param srsCodeTo - The SRS code to transform the point into.\n * @param srsIndex - SRSs indexed by SRS code.\n * @returns The transformed point (the point itself if it is already in the target SRS).\n * @throws {SystemError} `geo.pointNotFilled`, `geo.srsNotFound` (with the `code` param) or `geo.transformFailed`.\n */\nexport const transformOrThrow = (\n point: ArenaPoint | null | undefined,\n srsCodeTo: string,\n srsIndex: ArenaSRSIndex = DEFAULT_SRS_INDEX\n): ArenaPoint => {\n if (!isFilled(point)) throw new SystemError(SystemErrorKeys.geo.pointNotFilled)\n\n const { srs: srsCodeFrom } = point\n\n if (srsCodeFrom === srsCodeTo) {\n // projection is not needed\n return point\n }\n const srsFrom = getSrs({ code: srsCodeFrom, srsIndex })\n if (!srsFrom) throw new SystemError(SystemErrorKeys.geo.srsNotFound, { code: srsCodeFrom })\n\n const srsTo = getSrs({ code: srsCodeTo, srsIndex })\n if (!srsTo) throw new SystemError(SystemErrorKeys.geo.srsNotFound, { code: srsCodeTo })\n\n try {\n const { x, y } = point\n const [long, lat] = getConverter(srsFrom.wkt, srsTo.wkt).forward([Number(x), Number(y)])\n\n return PointFactory.createInstance({ ...point, srs: srsCodeTo, x: long, y: lat })\n } catch (error) {\n throw new SystemError(\n SystemErrorKeys.geo.transformFailed,\n { srsFrom: srsCodeFrom, srsTo: srsCodeTo },\n { cause: error }\n )\n }\n}\n\n/**\n * Transforms the specified point from one SRS into another.\n * Use `transformOrThrow` to know why a point cannot be transformed.\n *\n * @param point - The point to transform.\n * @param srsCodeTo - The SRS code to transform the point into.\n * @param srsIndex - SRSs indexed by SRS code.\n * @returns The transformed point, or null if the point is not filled, an SRS is unknown or the transformation fails.\n */\nexport const transform = (\n point: ArenaPoint | null | undefined,\n srsCodeTo: string,\n srsIndex: ArenaSRSIndex = DEFAULT_SRS_INDEX\n): ArenaPoint | null => {\n try {\n return transformOrThrow(point, srsCodeTo, srsIndex)\n } catch {\n return null\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type { ArenaArrayExpression, ArenaBinaryExpression, ArenaCallExpression,
|
|
|
18
18
|
export { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp';
|
|
19
19
|
export type { ArenaExtraPropDef, ArenaExtraPropDefs } from './extraProp';
|
|
20
20
|
export { PointFactory, Points } from './geo';
|
|
21
|
-
export type { ArenaAreaOfInterest, ArenaAreaOfInterestDescriptor, ArenaPoint } from './geo';
|
|
21
|
+
export type { ArenaAreaOfInterest, ArenaAreaOfInterestDescriptor, ArenaGeoPolygonFeature, ArenaGeoTrackFeature, ArenaGeoTrackFeatureProperties, ArenaPoint, } from './geo';
|
|
22
22
|
export { JobBase, JobEventType, JobStatus } from './job';
|
|
23
23
|
export type { ArenaJob, ArenaJobContext, ArenaJobEvent, ArenaJobSerialized, ArenaJobTxClient } from './job';
|
|
24
24
|
export { LanguageCode, Languages, LanguagesISO639part2 } from './language';
|
|
@@ -27,24 +27,24 @@ export type { ArenaLogger } from './logger';
|
|
|
27
27
|
export type { ArenaMessage } from './message';
|
|
28
28
|
export { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message';
|
|
29
29
|
export { RecordNodeFactory, RecordNodeKeys, RecordNodeMetaKeys, RecordNodes, RecordNodeValueFormatter, RecordNodeValues, } from './node';
|
|
30
|
-
export type { ArenaRecordNode, ArenaRecordNodeMeta, ArenaRecordNodePointer, ArenaRecordNodeRefData, ArenaRecordNodesMap, ArenaRecordNodeValueCode, ArenaRecordNodeValueCoordinate, ArenaRecordNodeValueFile, ArenaRecordNodeValueTaxon, } from './node';
|
|
30
|
+
export type { ArenaRecordNode, ArenaRecordNodeMeta, ArenaRecordNodePointer, ArenaRecordNodeRefData, ArenaRecordNodesMap, ArenaRecordNodeValue, ArenaRecordNodeValueCode, ArenaRecordNodeValueCoordinate, ArenaRecordNodeValueFile, ArenaRecordNodeValueGeo, ArenaRecordNodeValueTaxon, } from './node';
|
|
31
31
|
export { NodeDefCountType, NodeDefExpressionFactory, NodeDefType, NodeDefFactory, NodeDefs, NodeDefEntityRenderType, NodeDefFileType, NodeDefTextInputType, NodeDefTextRenderType, FormHeaderColor, } from './nodeDef';
|
|
32
32
|
export { NodeDefExpressionEvaluator, NodeDefExpressionValidator } from './nodeDefExpressionEvaluator';
|
|
33
33
|
export type { ArenaAreaOfInterestProvider, ArenaCategoryItemProvider, ArenaTaxonProvider, } from './nodeDefExpressionEvaluator';
|
|
34
|
-
export type { ArenaNodeDef, ArenaAnyNodeDef, ArenaNodeDefLayout, ArenaNodeDefMeta, ArenaNodeDefProps, ArenaNodeDefPropsWithLayout, ArenaNodeDefBoolean, ArenaNodeDefBooleanProps, ArenaNodeDefCode, ArenaNodeDefCodeLayout, ArenaNodeDefCodeProps, ArenaNodeDefCoordinate, ArenaNodeDefCoordinateProps, ArenaNodeDefDate, ArenaNodeDefDecimal, ArenaNodeDefDecimalProps, ArenaNodeDefEntity, ArenaNodeDefEntityChildPosition, ArenaNodeDefEntityLayout, ArenaNodeDefEntityLayoutChildItem, ArenaNodeDefEntityProps, ArenaNodeDefPrintOrientation, ArenaNodeDefFile, ArenaNodeDefFileProps, ArenaNodeDefGeo, ArenaNodeDefGeoProps, ArenaNodeDefFormHeader, ArenaNodeDefFormHeaderProps, ArenaNodeDefInteger, ArenaNodeDefPropsAdvanced, ArenaNodeDefTaxon, ArenaNodeDefTaxonProps, ArenaNodeDefText, ArenaNodeDefTextProps, ArenaNodeDefTextLayout, ArenaNodeDefTime, ArenaNodeDefTimeProps, ArenaNodeDefCountExpression, ArenaNodeDefExpression, ArenaNodeDefExpressionFactoryParams, ArenaNodeDefMap, ArenaNodeDefValidations, } from './nodeDef';
|
|
34
|
+
export type { ArenaNodeDef, ArenaAnyNodeDef, ArenaNodeDefLayout, ArenaNodeDefMeta, ArenaNodeDefProps, ArenaNodeDefPropsWithLayout, ArenaNodeDefBoolean, ArenaNodeDefBooleanProps, ArenaNodeDefCode, ArenaNodeDefCodeLayout, ArenaNodeDefCodeProps, ArenaCoordinateAdditionalField, ArenaNodeDefCoordinate, ArenaNodeDefCoordinateProps, ArenaNodeDefDate, ArenaNodeDefDecimal, ArenaNodeDefDecimalProps, ArenaNodeDefEntity, ArenaNodeDefEntityChildPosition, ArenaNodeDefEntityLayout, ArenaNodeDefEntityLayoutChildItem, ArenaNodeDefEntityProps, ArenaNodeDefPrintOrientation, ArenaNodeDefFile, ArenaNodeDefFileProps, ArenaNodeDefGeo, ArenaNodeDefGeoProps, ArenaNodeDefFormHeader, ArenaNodeDefFormHeaderProps, ArenaNodeDefInteger, ArenaNodeDefPropsAdvanced, ArenaNodeDefTaxon, ArenaNodeDefTaxonProps, ArenaNodeDefText, ArenaNodeDefTextProps, ArenaNodeDefTextLayout, ArenaNodeDefTime, ArenaNodeDefTimeProps, ArenaNodeDefCountExpression, ArenaNodeDefExpression, ArenaNodeDefExpressionFactoryParams, ArenaNodeDefMap, ArenaNodeDefValidations, } from './nodeDef';
|
|
35
35
|
export { RecordNodePointers, RecordCloner, RecordFactory, RecordFixer, Records, RECORD_STEP_DEFAULT, RecordStepAnalysisCode, RecordStepCleansingCode, RecordStepEntryCode, RecordStepNames, RecordSteps, RecordStepsList, RecordExpressionEvaluator, RecordNodesUpdater, RecordPrettyPrinter, RecordUpdater, RecordUpdateResult, RecordValidator, RecordValidations, } from './record';
|
|
36
|
-
export type { ArenaAttributeValidatorParams, ArenaAttributesValidatorParams, ArenaRecordNodeCreateParams, ArenaRecordNodesUpdateParams, ArenaRecord, ArenaRecordExpressionContext, ArenaRecordExpressionEvaluationContext, ArenaRecordService, ArenaRecordStep, ArenaRecordUpdateOptions, ArenaRecordValidatorParams, ArenaSortedAttributesValidatorParams, } from './record';
|
|
36
|
+
export type { ArenaAttributeValidatorParams, ArenaAttributesValidatorParams, ArenaRecordNodeCreateParams, ArenaRecordNodesUpdateParams, ArenaRecord, ArenaRecordExpressionContext, ArenaRecordExpressionEvaluationContext, ArenaRecordService, ArenaRecordStep, ArenaRecordSummary, ArenaRecordUpdateOptions, ArenaRecordValidatorParams, ArenaSortedAttributesValidatorParams, } from './record';
|
|
37
37
|
export { ServiceRegistry, ServiceType } from './registry';
|
|
38
38
|
export type { ArenaServiceTypeMap } from './registry';
|
|
39
39
|
export { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs';
|
|
40
40
|
export type { ArenaSRS, ArenaSRSIndex } from './srs';
|
|
41
41
|
export { NodeDefsFixer, SurveyDocImages, SurveyDocImageFactory, SurveyDocPlace, SurveyDependencyType, SurveyFactory, SurveyFileFactory, SurveyFileType, SurveyRefDataFactory, SurveySecurityProp, Surveys, surveyDocImagePropKeys, surveySecurityDefaults, defaultCycle, } from './survey';
|
|
42
|
-
export type { ArenaSurvey, ArenaSurveyCycle, ArenaSurveyDependency, ArenaSurveyDependencyGraph, ArenaSurveyDocImage, ArenaSurveyDocImageFactoryParams, ArenaSurveyDocImageProps, ArenaSurveyFile, ArenaSurveyFileFactoryParams, ArenaSurveyFileProps, ArenaSurveyNodeDefsIndex, ArenaSurveyProps, ArenaSurveyRefData, ArenaSurveySecurity, ArenaSurveyService, } from './survey';
|
|
42
|
+
export type { ArenaSurvey, ArenaSurveyCycle, ArenaSurveyDependency, ArenaSurveyDependencyGraph, ArenaSurveyDocImage, ArenaSurveyDocImageFactoryParams, ArenaSurveyDocImageProps, ArenaSurveyFile, ArenaSurveyFileFactoryParams, ArenaSurveyFileProps, ArenaSurveyNodeDefsIndex, ArenaSurveyProps, ArenaSurveyRefData, ArenaSurveySecurity, ArenaSurveyService, ArenaSurveySummary, } from './survey';
|
|
43
43
|
export { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy';
|
|
44
44
|
export type { ArenaVernacularNameParams, ArenaTaxonomyFactoryParams, ArenaTaxonFactoryParams, ArenaTaxonomy, ArenaVernacularNameProps, ArenaVernacularName, ArenaTaxonProps, ArenaTaxon, ArenaTaxonomyProps, } from './taxonomy';
|
|
45
45
|
export { SurveyBuilder, SurveyObjectBuilders } from './tests/builder/surveyBuilder';
|
|
46
46
|
export { RecordBuilder, RecordNodeBuilders } from './tests/builder/recordBuilder';
|
|
47
47
|
export { Arrays, DateFormats, Dates, FileNames, FileProcessor, Numbers, Objects, Promises, Queue, RetryProcessor, Strings, UnitOfTime, UUIDs, Versions, } from './utils';
|
|
48
|
-
export type { ArenaFileProcessorConstructorArgs, ArenaMutationOptions, ArenaParsedVersion } from './utils';
|
|
48
|
+
export type { ArenaFileProcessorChunk, ArenaFileProcessorConstructorArgs, ArenaFileProcessorUriChunk, ArenaMutationOptions, ArenaParsedVersion, } from './utils';
|
|
49
49
|
export { FieldValidators, ValidationFactory, ValidationResultFactory, ValidationResults, Validations, ValidationSeverity, Validator, ValidatorErrorKeys, } from './validation';
|
|
50
50
|
export type { ArenaDissocFieldValidationOptions, ArenaFieldValidator, ArenaValidation, ArenaValidationFields, ArenaValidationResult, ArenaValidationCounts, } from './validation';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAEA,+BASe;AARb,kGAAA,UAAU,OAAA;AACV,qGAAA,aAAa,OAAA;AACb,+GAAA,uBAAuB,OAAA;AACvB,kGAAA,UAAU,OAAA;AACV,kGAAA,UAAU,OAAA;AACV,iGAAA,SAAS,OAAA;AACT,mGAAA,WAAW,OAAA;AACX,6FAAA,KAAK,OAAA;AAyBP,uCAAuF;AAA9E,2GAAA,eAAe,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAAE,gHAAA,oBAAoB,OAAA;AAUnE,uCAAsD;AAA7C,sGAAA,UAAU,OAAA;AAAE,yGAAA,aAAa,OAAA;AAElC,iCAA4E;AAAnE,qGAAA,YAAY,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,4GAAA,mBAAmB,OAAA;AAU3D,mCAAyC;AAAhC,wGAAA,cAAc,OAAA;AAIvB,2CAUqB;AATnB,0HAAA,4BAA4B,OAAA;AAC5B,kHAAA,oBAAoB,OAAA;AACpB,2GAAA,aAAa,OAAA;AACb,iHAAA,mBAAmB,OAAA;AACnB,0HAAA,4BAA4B,OAAA;AAC5B,6GAAA,eAAe,OAAA;AACf,oHAAA,sBAAsB,OAAA;AACtB,6GAAA,eAAe,OAAA;AACf,sHAAA,wBAAwB,OAAA;AAG1B,yCAA+D;AAAtD,0GAAA,aAAa,OAAA;AAAE,+GAAA,kBAAkB,OAAA;AAG1C,iCAAsD;AAA7C,oGAAA,WAAW,OAAA;AAAE,wGAAA,eAAe,OAAA;AAErC,2CAMqB;AALnB,gHAAA,kBAAkB,OAAA;AAClB,qHAAA,uBAAuB,OAAA;AACvB,gHAAA,kBAAkB,OAAA;AAClB,2HAAA,6BAA6B,OAAA;AAC7B,wHAAA,0BAA0B,OAAA;AAuB5B,yCA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;AACT,sGAAA,aAAa,OAAA;AACb,gGAAA,OAAO,OAAA;AACP,gGAAA,OAAO,OAAA;AACP,iGAAA,QAAQ,OAAA;AACR,8FAAA,KAAK,OAAA;AACL,uGAAA,cAAc,OAAA;AACd,gGAAA,OAAO,OAAA;AACP,mGAAA,UAAU,OAAA;AACV,8FAAA,KAAK,OAAA;AACL,iGAAA,QAAQ,OAAA;AAKV,2CASqB;AARnB,6GAAA,eAAe,OAAA;AACf,+GAAA,iBAAiB,OAAA;AACjB,qHAAA,uBAAuB,OAAA;AACvB,+GAAA,iBAAiB,OAAA;AACjB,yGAAA,WAAW,OAAA;AACX,gHAAA,kBAAkB,OAAA;AAClB,uGAAA,SAAS,OAAA;AACT,gHAAA,kBAAkB,OAAA","sourcesContent":["export type { ArenaAppInfo } from './app'\n\nexport {\n Authorizer,\n AuthGroupName,\n createDefaultAuthGroups,\n UserStatus,\n Permission,\n UserTitle,\n UserFactory,\n Users,\n} from './auth'\nexport type {\n ArenaAuthGroup,\n ArenaUser,\n ArenaUserAuthGroup,\n ArenaUserAuthGroupProps,\n ArenaAuthToken,\n ArenaUserAuthTokenPayload,\n ArenaUserAuthTokenService,\n ArenaUserPrefs,\n ArenaUserPrefSurveys,\n ArenaUserProps,\n ArenaUserAuthRefreshToken,\n ArenaUserAuthRefreshTokenProps,\n ArenaUserAuthRefreshTokenPayload,\n ArenaUserService,\n ArenaUserTokenPayload,\n ArenaDownloadAuthTokenPayload,\n ArenaUserGroup,\n ArenaUserGroupProps,\n ArenaUserGroupQualifier,\n ArenaUserInvitation,\n} from './auth'\n\nexport { CategoryFactory, CategoryItemFactory, CategoryLevelFactory } from './category'\nexport type {\n ArenaCategoryItemProps,\n ArenaCategory,\n ArenaCategoryItem,\n ArenaCategoryLevel,\n ArenaCategoryLevelProps,\n ArenaCategoryProps,\n} from './category'\n\nexport { Categories, CategoryItems } from './category'\n\nexport { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain'\nexport type {\n ArenaChain,\n ArenaChainProps,\n ArenaChainNodeDef,\n ArenaChainNodeDefProps,\n ArenaChainNodeDefAggregate,\n ArenaChainNodeDefAggregateProps,\n} from './chain'\n\nexport { TraverseMethod } from './common'\nexport type { ArenaObject, ArenaService, ArenaDictionary, ArenaFactory, ArenaI18n } from './common'\n\nexport type { ArenaFlatDataExportOptions, ArenaExportInfoFactoryParams, ArenaExportInfo } from './dataExport'\nexport {\n FlatDataExportDefaultOptions,\n FlatDataExportOption,\n FlatDataFiles,\n FlatDataExportModel,\n FlatDataExportColumnDataType,\n ArenaExportFile,\n ArenaExportInfoFactory,\n ArenaExportType,\n UniqueFileNamesGenerator,\n} from './dataExport'\n\nexport { DataQueryMode, DataQuerySummaries } from './dataQuery'\nexport type { ArenaDataQuery, ArenaDataQuerySummary, ArenaDataQuerySummaryProps } from './dataQuery'\n\nexport { SystemError, SystemErrorKeys } from './error'\n\nexport {\n ExpressionNodeType,\n ExpressionNodeEvaluator,\n ExpressionVariable,\n JavascriptExpressionEvaluator,\n JavascriptExpressionParser,\n} from './expression'\nexport type {\n ArenaArrayExpression,\n ArenaBinaryExpression,\n ArenaCallExpression,\n ArenaCompoundExpression,\n ArenaConditionalExpression,\n ArenaExpressionContext,\n ArenaExpressionEvaluator,\n ArenaExpressionFunction,\n ArenaExpressionFunctions,\n ArenaAnyExpressionNode,\n ArenaExpressionNode,\n ArenaExpressionNodeEvaluatorConstructor,\n ArenaMemberExpression,\n ArenaIdentifierExpression,\n ArenaLiteralExpression,\n ArenaSequenceExpression,\n ArenaThisExpression,\n ArenaUnaryExpression,\n} from './expression'\n\nexport { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp'\nexport type { ArenaExtraPropDef, ArenaExtraPropDefs } from './extraProp'\n\nexport { PointFactory, Points } from './geo'\nexport type { ArenaAreaOfInterest, ArenaAreaOfInterestDescriptor, ArenaPoint } from './geo'\n\nexport { JobBase, JobEventType, JobStatus } from './job'\nexport type { ArenaJob, ArenaJobContext, ArenaJobEvent, ArenaJobSerialized, ArenaJobTxClient } from './job'\n\nexport { LanguageCode, Languages, LanguagesISO639part2 } from './language'\nexport type { ArenaLabels } from './language'\n\nexport type { ArenaLogger } from './logger'\n\nexport type { ArenaMessage } from './message'\nexport { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message'\n\nexport {\n RecordNodeFactory,\n RecordNodeKeys,\n RecordNodeMetaKeys,\n RecordNodes,\n RecordNodeValueFormatter,\n RecordNodeValues,\n} from './node'\nexport type {\n ArenaRecordNode,\n ArenaRecordNodeMeta,\n ArenaRecordNodePointer,\n ArenaRecordNodeRefData,\n ArenaRecordNodesMap,\n ArenaRecordNodeValueCode,\n ArenaRecordNodeValueCoordinate,\n ArenaRecordNodeValueFile,\n ArenaRecordNodeValueTaxon,\n} from './node'\n\nexport {\n NodeDefCountType,\n NodeDefExpressionFactory,\n NodeDefType,\n NodeDefFactory,\n NodeDefs,\n NodeDefEntityRenderType,\n NodeDefFileType,\n NodeDefTextInputType,\n NodeDefTextRenderType,\n FormHeaderColor,\n} from './nodeDef'\n\nexport { NodeDefExpressionEvaluator, NodeDefExpressionValidator } from './nodeDefExpressionEvaluator'\nexport type {\n ArenaAreaOfInterestProvider,\n ArenaCategoryItemProvider,\n ArenaTaxonProvider,\n} from './nodeDefExpressionEvaluator'\n\nexport type {\n ArenaNodeDef,\n ArenaAnyNodeDef,\n ArenaNodeDefLayout,\n ArenaNodeDefMeta,\n ArenaNodeDefProps,\n ArenaNodeDefPropsWithLayout,\n ArenaNodeDefBoolean,\n ArenaNodeDefBooleanProps,\n ArenaNodeDefCode,\n ArenaNodeDefCodeLayout,\n ArenaNodeDefCodeProps,\n ArenaNodeDefCoordinate,\n ArenaNodeDefCoordinateProps,\n ArenaNodeDefDate,\n ArenaNodeDefDecimal,\n ArenaNodeDefDecimalProps,\n ArenaNodeDefEntity,\n ArenaNodeDefEntityChildPosition,\n ArenaNodeDefEntityLayout,\n ArenaNodeDefEntityLayoutChildItem,\n ArenaNodeDefEntityProps,\n ArenaNodeDefPrintOrientation,\n ArenaNodeDefFile,\n ArenaNodeDefFileProps,\n ArenaNodeDefGeo,\n ArenaNodeDefGeoProps,\n ArenaNodeDefFormHeader,\n ArenaNodeDefFormHeaderProps,\n ArenaNodeDefInteger,\n ArenaNodeDefPropsAdvanced,\n ArenaNodeDefTaxon,\n ArenaNodeDefTaxonProps,\n ArenaNodeDefText,\n ArenaNodeDefTextProps,\n ArenaNodeDefTextLayout,\n ArenaNodeDefTime,\n ArenaNodeDefTimeProps,\n ArenaNodeDefCountExpression,\n ArenaNodeDefExpression,\n ArenaNodeDefExpressionFactoryParams,\n ArenaNodeDefMap,\n ArenaNodeDefValidations,\n} from './nodeDef'\n\nexport {\n RecordNodePointers,\n RecordCloner,\n RecordFactory,\n RecordFixer,\n Records,\n RECORD_STEP_DEFAULT,\n RecordStepAnalysisCode,\n RecordStepCleansingCode,\n RecordStepEntryCode,\n RecordStepNames,\n RecordSteps,\n RecordStepsList,\n RecordExpressionEvaluator,\n RecordNodesUpdater,\n RecordPrettyPrinter,\n RecordUpdater,\n RecordUpdateResult,\n RecordValidator,\n RecordValidations,\n} from './record'\nexport type {\n ArenaAttributeValidatorParams,\n ArenaAttributesValidatorParams,\n ArenaRecordNodeCreateParams,\n ArenaRecordNodesUpdateParams,\n ArenaRecord,\n ArenaRecordExpressionContext,\n ArenaRecordExpressionEvaluationContext,\n ArenaRecordService,\n ArenaRecordStep,\n ArenaRecordUpdateOptions,\n ArenaRecordValidatorParams,\n ArenaSortedAttributesValidatorParams,\n} from './record'\n\nexport { ServiceRegistry, ServiceType } from './registry'\nexport type { ArenaServiceTypeMap } from './registry'\n\nexport { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs'\nexport type { ArenaSRS, ArenaSRSIndex } from './srs'\n\nexport {\n NodeDefsFixer,\n SurveyDocImages,\n SurveyDocImageFactory,\n SurveyDocPlace,\n SurveyDependencyType,\n SurveyFactory,\n SurveyFileFactory,\n SurveyFileType,\n SurveyRefDataFactory,\n SurveySecurityProp,\n Surveys,\n surveyDocImagePropKeys,\n surveySecurityDefaults,\n defaultCycle,\n} from './survey'\nexport type {\n ArenaSurvey,\n ArenaSurveyCycle,\n ArenaSurveyDependency,\n ArenaSurveyDependencyGraph,\n ArenaSurveyDocImage,\n ArenaSurveyDocImageFactoryParams,\n ArenaSurveyDocImageProps,\n ArenaSurveyFile,\n ArenaSurveyFileFactoryParams,\n ArenaSurveyFileProps,\n ArenaSurveyNodeDefsIndex,\n ArenaSurveyProps,\n ArenaSurveyRefData,\n ArenaSurveySecurity,\n ArenaSurveyService,\n} from './survey'\n\nexport { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy'\nexport type {\n ArenaVernacularNameParams,\n ArenaTaxonomyFactoryParams,\n ArenaTaxonFactoryParams,\n ArenaTaxonomy,\n ArenaVernacularNameProps,\n ArenaVernacularName,\n ArenaTaxonProps,\n ArenaTaxon,\n ArenaTaxonomyProps,\n} from './taxonomy'\n\nexport { SurveyBuilder, SurveyObjectBuilders } from './tests/builder/surveyBuilder'\nexport { RecordBuilder, RecordNodeBuilders } from './tests/builder/recordBuilder'\n\nexport {\n Arrays,\n DateFormats,\n Dates,\n FileNames,\n FileProcessor,\n Numbers,\n Objects,\n Promises,\n Queue,\n RetryProcessor,\n Strings,\n UnitOfTime,\n UUIDs,\n Versions,\n} from './utils'\n\nexport type { ArenaFileProcessorConstructorArgs, ArenaMutationOptions, ArenaParsedVersion } from './utils'\n\nexport {\n FieldValidators,\n ValidationFactory,\n ValidationResultFactory,\n ValidationResults,\n Validations,\n ValidationSeverity,\n Validator,\n ValidatorErrorKeys,\n} from './validation'\nexport type {\n ArenaDissocFieldValidationOptions,\n ArenaFieldValidator,\n ArenaValidation,\n ArenaValidationFields,\n ArenaValidationResult,\n ArenaValidationCounts,\n} from './validation'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index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Ac,OAAA;AACd,gGAAA,OAAO,OAAA;AACP,mGAAA,UAAU,OAAA;AACV,8FAAA,KAAK,OAAA;AACL,iGAAA,QAAQ,OAAA;AAWV,2CASqB;AARnB,6GAAA,eAAe,OAAA;AACf,+GAAA,iBAAiB,OAAA;AACjB,qHAAA,uBAAuB,OAAA;AACvB,+GAAA,iBAAiB,OAAA;AACjB,yGAAA,WAAW,OAAA;AACX,gHAAA,kBAAkB,OAAA;AAClB,uGAAA,SAAS,OAAA;AACT,gHAAA,kBAAkB,OAAA","sourcesContent":["export type { ArenaAppInfo } from './app'\n\nexport {\n Authorizer,\n AuthGroupName,\n createDefaultAuthGroups,\n UserStatus,\n Permission,\n UserTitle,\n UserFactory,\n Users,\n} from './auth'\nexport type {\n ArenaAuthGroup,\n ArenaUser,\n ArenaUserAuthGroup,\n ArenaUserAuthGroupProps,\n ArenaAuthToken,\n ArenaUserAuthTokenPayload,\n ArenaUserAuthTokenService,\n ArenaUserPrefs,\n ArenaUserPrefSurveys,\n ArenaUserProps,\n ArenaUserAuthRefreshToken,\n ArenaUserAuthRefreshTokenProps,\n ArenaUserAuthRefreshTokenPayload,\n ArenaUserService,\n ArenaUserTokenPayload,\n ArenaDownloadAuthTokenPayload,\n ArenaUserGroup,\n ArenaUserGroupProps,\n ArenaUserGroupQualifier,\n ArenaUserInvitation,\n} from './auth'\n\nexport { CategoryFactory, CategoryItemFactory, CategoryLevelFactory } from './category'\nexport type {\n ArenaCategoryItemProps,\n ArenaCategory,\n ArenaCategoryItem,\n ArenaCategoryLevel,\n ArenaCategoryLevelProps,\n ArenaCategoryProps,\n} from './category'\n\nexport { Categories, CategoryItems } from './category'\n\nexport { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain'\nexport type {\n ArenaChain,\n ArenaChainProps,\n ArenaChainNodeDef,\n ArenaChainNodeDefProps,\n ArenaChainNodeDefAggregate,\n ArenaChainNodeDefAggregateProps,\n} from './chain'\n\nexport { TraverseMethod } from './common'\nexport type { ArenaObject, ArenaService, ArenaDictionary, ArenaFactory, ArenaI18n } from './common'\n\nexport type { ArenaFlatDataExportOptions, ArenaExportInfoFactoryParams, ArenaExportInfo } from './dataExport'\nexport {\n FlatDataExportDefaultOptions,\n FlatDataExportOption,\n FlatDataFiles,\n FlatDataExportModel,\n FlatDataExportColumnDataType,\n ArenaExportFile,\n ArenaExportInfoFactory,\n ArenaExportType,\n UniqueFileNamesGenerator,\n} from './dataExport'\n\nexport { DataQueryMode, DataQuerySummaries } from './dataQuery'\nexport type { ArenaDataQuery, ArenaDataQuerySummary, ArenaDataQuerySummaryProps } from './dataQuery'\n\nexport { SystemError, SystemErrorKeys } from './error'\n\nexport {\n ExpressionNodeType,\n ExpressionNodeEvaluator,\n ExpressionVariable,\n JavascriptExpressionEvaluator,\n JavascriptExpressionParser,\n} from './expression'\nexport type {\n ArenaArrayExpression,\n ArenaBinaryExpression,\n ArenaCallExpression,\n ArenaCompoundExpression,\n ArenaConditionalExpression,\n ArenaExpressionContext,\n ArenaExpressionEvaluator,\n ArenaExpressionFunction,\n ArenaExpressionFunctions,\n ArenaAnyExpressionNode,\n ArenaExpressionNode,\n ArenaExpressionNodeEvaluatorConstructor,\n ArenaMemberExpression,\n ArenaIdentifierExpression,\n ArenaLiteralExpression,\n ArenaSequenceExpression,\n ArenaThisExpression,\n ArenaUnaryExpression,\n} from './expression'\n\nexport { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp'\nexport type { ArenaExtraPropDef, ArenaExtraPropDefs } from './extraProp'\n\nexport { PointFactory, Points } from './geo'\nexport type {\n ArenaAreaOfInterest,\n ArenaAreaOfInterestDescriptor,\n ArenaGeoPolygonFeature,\n ArenaGeoTrackFeature,\n ArenaGeoTrackFeatureProperties,\n ArenaPoint,\n} from './geo'\n\nexport { JobBase, JobEventType, JobStatus } from './job'\nexport type { ArenaJob, ArenaJobContext, ArenaJobEvent, ArenaJobSerialized, ArenaJobTxClient } from './job'\n\nexport { LanguageCode, Languages, LanguagesISO639part2 } from './language'\nexport type { ArenaLabels } from './language'\n\nexport type { ArenaLogger } from './logger'\n\nexport type { ArenaMessage } from './message'\nexport { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message'\n\nexport {\n RecordNodeFactory,\n RecordNodeKeys,\n RecordNodeMetaKeys,\n RecordNodes,\n RecordNodeValueFormatter,\n RecordNodeValues,\n} from './node'\nexport type {\n ArenaRecordNode,\n ArenaRecordNodeMeta,\n ArenaRecordNodePointer,\n ArenaRecordNodeRefData,\n ArenaRecordNodesMap,\n ArenaRecordNodeValue,\n ArenaRecordNodeValueCode,\n ArenaRecordNodeValueCoordinate,\n ArenaRecordNodeValueFile,\n ArenaRecordNodeValueGeo,\n ArenaRecordNodeValueTaxon,\n} from './node'\n\nexport {\n NodeDefCountType,\n NodeDefExpressionFactory,\n NodeDefType,\n NodeDefFactory,\n NodeDefs,\n NodeDefEntityRenderType,\n NodeDefFileType,\n NodeDefTextInputType,\n NodeDefTextRenderType,\n FormHeaderColor,\n} from './nodeDef'\n\nexport { NodeDefExpressionEvaluator, NodeDefExpressionValidator } from './nodeDefExpressionEvaluator'\nexport type {\n ArenaAreaOfInterestProvider,\n ArenaCategoryItemProvider,\n ArenaTaxonProvider,\n} from './nodeDefExpressionEvaluator'\n\nexport type {\n ArenaNodeDef,\n ArenaAnyNodeDef,\n ArenaNodeDefLayout,\n ArenaNodeDefMeta,\n ArenaNodeDefProps,\n ArenaNodeDefPropsWithLayout,\n ArenaNodeDefBoolean,\n ArenaNodeDefBooleanProps,\n ArenaNodeDefCode,\n ArenaNodeDefCodeLayout,\n ArenaNodeDefCodeProps,\n ArenaCoordinateAdditionalField,\n ArenaNodeDefCoordinate,\n ArenaNodeDefCoordinateProps,\n ArenaNodeDefDate,\n ArenaNodeDefDecimal,\n ArenaNodeDefDecimalProps,\n ArenaNodeDefEntity,\n ArenaNodeDefEntityChildPosition,\n ArenaNodeDefEntityLayout,\n ArenaNodeDefEntityLayoutChildItem,\n ArenaNodeDefEntityProps,\n ArenaNodeDefPrintOrientation,\n ArenaNodeDefFile,\n ArenaNodeDefFileProps,\n ArenaNodeDefGeo,\n ArenaNodeDefGeoProps,\n ArenaNodeDefFormHeader,\n ArenaNodeDefFormHeaderProps,\n ArenaNodeDefInteger,\n ArenaNodeDefPropsAdvanced,\n ArenaNodeDefTaxon,\n ArenaNodeDefTaxonProps,\n ArenaNodeDefText,\n ArenaNodeDefTextProps,\n ArenaNodeDefTextLayout,\n ArenaNodeDefTime,\n ArenaNodeDefTimeProps,\n ArenaNodeDefCountExpression,\n ArenaNodeDefExpression,\n ArenaNodeDefExpressionFactoryParams,\n ArenaNodeDefMap,\n ArenaNodeDefValidations,\n} from './nodeDef'\n\nexport {\n RecordNodePointers,\n RecordCloner,\n RecordFactory,\n RecordFixer,\n Records,\n RECORD_STEP_DEFAULT,\n RecordStepAnalysisCode,\n RecordStepCleansingCode,\n RecordStepEntryCode,\n RecordStepNames,\n RecordSteps,\n RecordStepsList,\n RecordExpressionEvaluator,\n RecordNodesUpdater,\n RecordPrettyPrinter,\n RecordUpdater,\n RecordUpdateResult,\n RecordValidator,\n RecordValidations,\n} from './record'\nexport type {\n ArenaAttributeValidatorParams,\n ArenaAttributesValidatorParams,\n ArenaRecordNodeCreateParams,\n ArenaRecordNodesUpdateParams,\n ArenaRecord,\n ArenaRecordExpressionContext,\n ArenaRecordExpressionEvaluationContext,\n ArenaRecordService,\n ArenaRecordStep,\n ArenaRecordSummary,\n ArenaRecordUpdateOptions,\n ArenaRecordValidatorParams,\n ArenaSortedAttributesValidatorParams,\n} from './record'\n\nexport { ServiceRegistry, ServiceType } from './registry'\nexport type { ArenaServiceTypeMap } from './registry'\n\nexport { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs'\nexport type { ArenaSRS, ArenaSRSIndex } from './srs'\n\nexport {\n NodeDefsFixer,\n SurveyDocImages,\n SurveyDocImageFactory,\n SurveyDocPlace,\n SurveyDependencyType,\n SurveyFactory,\n SurveyFileFactory,\n SurveyFileType,\n SurveyRefDataFactory,\n SurveySecurityProp,\n Surveys,\n surveyDocImagePropKeys,\n surveySecurityDefaults,\n defaultCycle,\n} from './survey'\nexport type {\n ArenaSurvey,\n ArenaSurveyCycle,\n ArenaSurveyDependency,\n ArenaSurveyDependencyGraph,\n ArenaSurveyDocImage,\n ArenaSurveyDocImageFactoryParams,\n ArenaSurveyDocImageProps,\n ArenaSurveyFile,\n ArenaSurveyFileFactoryParams,\n ArenaSurveyFileProps,\n ArenaSurveyNodeDefsIndex,\n ArenaSurveyProps,\n ArenaSurveyRefData,\n ArenaSurveySecurity,\n ArenaSurveyService,\n ArenaSurveySummary,\n} from './survey'\n\nexport { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy'\nexport type {\n ArenaVernacularNameParams,\n ArenaTaxonomyFactoryParams,\n ArenaTaxonFactoryParams,\n ArenaTaxonomy,\n ArenaVernacularNameProps,\n ArenaVernacularName,\n ArenaTaxonProps,\n ArenaTaxon,\n ArenaTaxonomyProps,\n} from './taxonomy'\n\nexport { SurveyBuilder, SurveyObjectBuilders } from './tests/builder/surveyBuilder'\nexport { RecordBuilder, RecordNodeBuilders } from './tests/builder/recordBuilder'\n\nexport {\n Arrays,\n DateFormats,\n Dates,\n FileNames,\n FileProcessor,\n Numbers,\n Objects,\n Promises,\n Queue,\n RetryProcessor,\n Strings,\n UnitOfTime,\n UUIDs,\n Versions,\n} from './utils'\n\nexport type {\n ArenaFileProcessorChunk,\n ArenaFileProcessorConstructorArgs,\n ArenaFileProcessorUriChunk,\n ArenaMutationOptions,\n ArenaParsedVersion,\n} from './utils'\n\nexport {\n FieldValidators,\n ValidationFactory,\n ValidationResultFactory,\n ValidationResults,\n Validations,\n ValidationSeverity,\n Validator,\n ValidatorErrorKeys,\n} from './validation'\nexport type {\n ArenaDissocFieldValidationOptions,\n ArenaFieldValidator,\n ArenaValidation,\n ArenaValidationFields,\n ArenaValidationResult,\n ArenaValidationCounts,\n} from './validation'\n"]}
|
package/dist/logger/logger.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export interface ArenaLogger {
|
|
|
3
3
|
isInfoEnabled(): boolean;
|
|
4
4
|
isWarnEnabled(): boolean;
|
|
5
5
|
isErrorEnabled(): boolean;
|
|
6
|
-
debug(...msgs:
|
|
7
|
-
info(...msgs:
|
|
8
|
-
warn(...msgs:
|
|
9
|
-
error(...msgs:
|
|
6
|
+
debug(...msgs: unknown[]): void;
|
|
7
|
+
info(...msgs: unknown[]): void;
|
|
8
|
+
warn(...msgs: unknown[]): void;
|
|
9
|
+
error(...msgs: unknown[]): void;
|
|
10
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger/logger.ts"],"names":[],"mappings":"","sourcesContent":["export interface ArenaLogger {\n isDebugEnabled(): boolean\n\n isInfoEnabled(): boolean\n\n isWarnEnabled(): boolean\n\n isErrorEnabled(): boolean\n\n debug(...msgs:
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger/logger.ts"],"names":[],"mappings":"","sourcesContent":["export interface ArenaLogger {\n isDebugEnabled(): boolean\n\n isInfoEnabled(): boolean\n\n isWarnEnabled(): boolean\n\n isErrorEnabled(): boolean\n\n debug(...msgs: unknown[]): void\n\n info(...msgs: unknown[]): void\n\n warn(...msgs: unknown[]): void\n\n error(...msgs: unknown[]): void\n}\n"]}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { ArenaRecordNode, ArenaRecordNodeMeta, ArenaRecordNodeRefData, ArenaRecordNodesMap } from './node';
|
|
2
2
|
export { RecordNodeKeys, RecordNodeMetaKeys } from './node';
|
|
3
3
|
export type { ArenaRecordNodePointer } from './nodePointer';
|
|
4
|
-
export type { ArenaRecordNodeValueCode, ArenaRecordNodeValueCoordinate, ArenaRecordNodeValueFile, ArenaRecordNodeValueTaxon, } from './nodeValue';
|
|
4
|
+
export type { ArenaRecordNodeValue, ArenaRecordNodeValueCode, ArenaRecordNodeValueCoordinate, ArenaRecordNodeValueFile, ArenaRecordNodeValueGeo, ArenaRecordNodeValueTaxon, } from './nodeValue';
|
|
5
5
|
export { RecordNodeFactory } from './factory';
|
|
6
6
|
export { RecordNodes } from './nodes';
|
|
7
7
|
export { RecordNodeValueFormatter } from './nodeValueFormatter';
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;AAEA,+BAA2D;AAAlD,sGAAA,cAAc,OAAA;AAAE,0GAAA,kBAAkB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;AAEA,+BAA2D;AAAlD,sGAAA,cAAc,OAAA;AAAE,0GAAA,kBAAkB,OAAA;AAa3C,qCAA6C;AAApC,4GAAA,iBAAiB,OAAA;AAE1B,iCAAqC;AAA5B,oGAAA,WAAW,OAAA;AAEpB,2DAA+D;AAAtD,8HAAA,wBAAwB,OAAA;AAEjC,2CAA+C;AAAtC,8GAAA,gBAAgB,OAAA","sourcesContent":["export type { ArenaRecordNode, ArenaRecordNodeMeta, ArenaRecordNodeRefData, ArenaRecordNodesMap } from './node'\n\nexport { RecordNodeKeys, RecordNodeMetaKeys } from './node'\n\nexport type { ArenaRecordNodePointer } from './nodePointer'\n\nexport type {\n ArenaRecordNodeValue,\n ArenaRecordNodeValueCode,\n ArenaRecordNodeValueCoordinate,\n ArenaRecordNodeValueFile,\n ArenaRecordNodeValueGeo,\n ArenaRecordNodeValueTaxon,\n} from './nodeValue'\n\nexport { RecordNodeFactory } from './factory'\n\nexport { RecordNodes } from './nodes'\n\nexport { RecordNodeValueFormatter } from './nodeValueFormatter'\n\nexport { RecordNodeValues } from './nodeValues'\n"]}
|
package/dist/node/node.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export interface ArenaRecordNodeRefData {
|
|
|
69
69
|
categoryItem?: ArenaCategoryItem;
|
|
70
70
|
taxon?: ArenaTaxon;
|
|
71
71
|
}
|
|
72
|
-
export interface ArenaRecordNode {
|
|
72
|
+
export interface ArenaRecordNode<V = any> {
|
|
73
73
|
dateCreated?: string;
|
|
74
74
|
dateModified?: string;
|
|
75
75
|
id?: number;
|
|
@@ -79,7 +79,7 @@ export interface ArenaRecordNode {
|
|
|
79
79
|
recordUuid: string;
|
|
80
80
|
refData?: ArenaRecordNodeRefData;
|
|
81
81
|
uuid: string;
|
|
82
|
-
value?:
|
|
82
|
+
value?: V;
|
|
83
83
|
placeholder?: boolean;
|
|
84
84
|
surveyUuid?: string;
|
|
85
85
|
/**
|
package/dist/node/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/node/node.ts"],"names":[],"mappings":";;;AAGA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,aAAd,cAAc,GAAd,cAAc,QAGzB;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,6BAAO,CAAA;IACP,qCAAe,CAAA;AACjB,CAAC,EAHW,kBAAkB,aAAlB,kBAAkB,GAAlB,kBAAkB,QAG7B","sourcesContent":["import { ArenaCategoryItem } from '../category'\nimport { ArenaTaxon } from '../taxonomy'\n\nexport enum RecordNodeKeys {\n meta = 'meta',\n value = 'value',\n}\n\nexport enum RecordNodeMetaKeys {\n h = 'h',\n hCode = 'hCode',\n}\n\nexport interface ArenaRecordNodeMeta {\n /**\n * Applicability of the node children (by definition UUID). If not defined, the children are applicable by default.\n */\n childApplicability?: { [uuid: string]: boolean }\n /**\n * Whether the node children (by definition UUID) are editable (true) or read-only (false).\n * If not defined, the children are editable by default.\n */\n cEdit?: { [uuid: string]: boolean }\n /**\n * Whether the node children (by definition UUID) are required because their \"required if\" condition is met (true).\n * If not defined, the children are not required by a condition (only true values are stored).\n */\n cReq?: { [uuid: string]: boolean }\n /**\n * Maximum number of children (by definition UUID) for the node.\n */\n childrenMaxCount?: { [uuid: string]: number }\n /**\n * Minimum number of children (by definition UUID) for the node.\n */\n childrenMinCount?: { [uuid: string]: number }\n /**\n * Whether the node children (by definition UUID) are visible (true) or hidden (false).\n * If not defined, the children are visible by default.\n */\n cVis?: { [uuid: string]: boolean }\n /**\n * Hierarchy of ancestor node UUIDs.\n */\n h?: string[]\n /**\n * Hierarchy of code attribute ancestor UUIDs (according to the parent code defs specified).\n */\n hCode?: string[]\n /**\n * True if the value has been auto-filled from the node default value\n */\n defaultValueApplied?: boolean\n /**\n * True if the value has been auto-filled from the user group qualifier\n */\n qualifierValueApplied?: boolean\n}\n\nexport interface ArenaRecordNodeRefData {\n categoryItem?: ArenaCategoryItem\n taxon?: ArenaTaxon\n}\n\nexport interface ArenaRecordNode {\n dateCreated?: string\n dateModified?: string\n id?: number\n meta?: ArenaRecordNodeMeta\n nodeDefUuid: string\n parentUuid?: string\n recordUuid: string\n refData?: ArenaRecordNodeRefData\n uuid: string\n value?:
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/node/node.ts"],"names":[],"mappings":";;;AAGA,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,aAAd,cAAc,GAAd,cAAc,QAGzB;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,6BAAO,CAAA;IACP,qCAAe,CAAA;AACjB,CAAC,EAHW,kBAAkB,aAAlB,kBAAkB,GAAlB,kBAAkB,QAG7B","sourcesContent":["import { ArenaCategoryItem } from '../category'\nimport { ArenaTaxon } from '../taxonomy'\n\nexport enum RecordNodeKeys {\n meta = 'meta',\n value = 'value',\n}\n\nexport enum RecordNodeMetaKeys {\n h = 'h',\n hCode = 'hCode',\n}\n\nexport interface ArenaRecordNodeMeta {\n /**\n * Applicability of the node children (by definition UUID). If not defined, the children are applicable by default.\n */\n childApplicability?: { [uuid: string]: boolean }\n /**\n * Whether the node children (by definition UUID) are editable (true) or read-only (false).\n * If not defined, the children are editable by default.\n */\n cEdit?: { [uuid: string]: boolean }\n /**\n * Whether the node children (by definition UUID) are required because their \"required if\" condition is met (true).\n * If not defined, the children are not required by a condition (only true values are stored).\n */\n cReq?: { [uuid: string]: boolean }\n /**\n * Maximum number of children (by definition UUID) for the node.\n */\n childrenMaxCount?: { [uuid: string]: number }\n /**\n * Minimum number of children (by definition UUID) for the node.\n */\n childrenMinCount?: { [uuid: string]: number }\n /**\n * Whether the node children (by definition UUID) are visible (true) or hidden (false).\n * If not defined, the children are visible by default.\n */\n cVis?: { [uuid: string]: boolean }\n /**\n * Hierarchy of ancestor node UUIDs.\n */\n h?: string[]\n /**\n * Hierarchy of code attribute ancestor UUIDs (according to the parent code defs specified).\n */\n hCode?: string[]\n /**\n * True if the value has been auto-filled from the node default value\n */\n defaultValueApplied?: boolean\n /**\n * True if the value has been auto-filled from the user group qualifier\n */\n qualifierValueApplied?: boolean\n}\n\nexport interface ArenaRecordNodeRefData {\n categoryItem?: ArenaCategoryItem\n taxon?: ArenaTaxon\n}\n\nexport interface ArenaRecordNode<V = any> {\n dateCreated?: string\n dateModified?: string\n id?: number\n meta?: ArenaRecordNodeMeta\n nodeDefUuid: string\n parentUuid?: string\n recordUuid: string\n refData?: ArenaRecordNodeRefData\n uuid: string\n value?: V\n placeholder?: boolean\n surveyUuid?: string\n\n // transient status variables\n /**\n * Record node has been created but not persisted yet.\n */\n created?: boolean\n /**\n * Record node has been deleted.\n */\n deleted?: boolean\n /**\n * Record node has been modified but not persisted yet.\n */\n updated?: boolean\n}\n\nexport interface ArenaRecordNodesMap {\n [key: string]: ArenaRecordNode\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinate.js","sourceRoot":"","sources":["../../../src/node/nodeValue/coordinate.ts"],"names":[],"mappings":"","sourcesContent":["import { NodeValueComposite } from './nodeValueComposite'\n\nexport interface ArenaRecordNodeValueCoordinate extends NodeValueComposite {\n srs: string\n x: number\n y: number\n}\n"]}
|
|
1
|
+
{"version":3,"file":"coordinate.js","sourceRoot":"","sources":["../../../src/node/nodeValue/coordinate.ts"],"names":[],"mappings":"","sourcesContent":["import { NodeValueComposite } from './nodeValueComposite'\n\nexport interface ArenaRecordNodeValueCoordinate extends NodeValueComposite {\n srs: string\n x: number\n y: number\n accuracy?: number\n altitude?: number\n altitudeAccuracy?: number\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geo.js","sourceRoot":"","sources":["../../../src/node/nodeValue/geo.ts"],"names":[],"mappings":"","sourcesContent":["import type { ArenaGeoPolygonFeature, ArenaGeoTrackFeature } from '../../geo'\n\nexport type ArenaRecordNodeValueGeo = ArenaGeoPolygonFeature | ArenaGeoTrackFeature\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { ArenaRecordNodeValueCode } from './code';
|
|
2
2
|
export type { ArenaRecordNodeValueCoordinate } from './coordinate';
|
|
3
3
|
export type { ArenaRecordNodeValueFile } from './file';
|
|
4
|
+
export type { ArenaRecordNodeValueGeo } from './geo';
|
|
5
|
+
export type { ArenaRecordNodeValue } from './nodeValue';
|
|
4
6
|
export type { ArenaRecordNodeValueTaxon } from './taxon';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/nodeValue/index.ts"],"names":[],"mappings":"","sourcesContent":["export type { ArenaRecordNodeValueCode } from './code'\nexport type { ArenaRecordNodeValueCoordinate } from './coordinate'\nexport type { ArenaRecordNodeValueFile } from './file'\nexport type { ArenaRecordNodeValueTaxon } from './taxon'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/node/nodeValue/index.ts"],"names":[],"mappings":"","sourcesContent":["export type { ArenaRecordNodeValueCode } from './code'\nexport type { ArenaRecordNodeValueCoordinate } from './coordinate'\nexport type { ArenaRecordNodeValueFile } from './file'\nexport type { ArenaRecordNodeValueGeo } from './geo'\nexport type { ArenaRecordNodeValue } from './nodeValue'\nexport type { ArenaRecordNodeValueTaxon } from './taxon'\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ArenaRecordNodeValueCode } from './code';
|
|
2
|
+
import type { ArenaRecordNodeValueCoordinate } from './coordinate';
|
|
3
|
+
import type { ArenaRecordNodeValueFile } from './file';
|
|
4
|
+
import type { ArenaRecordNodeValueGeo } from './geo';
|
|
5
|
+
import type { ArenaRecordNodeValueTaxon } from './taxon';
|
|
6
|
+
/**
|
|
7
|
+
* Value of a record node of any type (date and time values are strings).
|
|
8
|
+
*/
|
|
9
|
+
export type ArenaRecordNodeValue = ArenaRecordNodeValueCode | ArenaRecordNodeValueCoordinate | ArenaRecordNodeValueFile | ArenaRecordNodeValueGeo | ArenaRecordNodeValueTaxon | boolean | number | string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeValue.js","sourceRoot":"","sources":["../../../src/node/nodeValue/nodeValue.ts"],"names":[],"mappings":"","sourcesContent":["import type { ArenaRecordNodeValueCode } from './code'\nimport type { ArenaRecordNodeValueCoordinate } from './coordinate'\nimport type { ArenaRecordNodeValueFile } from './file'\nimport type { ArenaRecordNodeValueGeo } from './geo'\nimport type { ArenaRecordNodeValueTaxon } from './taxon'\n\n/**\n * Value of a record node of any type (date and time values are strings).\n */\nexport type ArenaRecordNodeValue =\n | ArenaRecordNodeValueCode\n | ArenaRecordNodeValueCoordinate\n | ArenaRecordNodeValueFile\n | ArenaRecordNodeValueGeo\n | ArenaRecordNodeValueTaxon\n | boolean\n | number\n | string\n"]}
|
package/dist/nodeDef/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { NodeDefCountType, NodeDefExpressionFactory, NodeDefType } from './nodeD
|
|
|
4
4
|
export { NodeDefs } from './nodeDefs';
|
|
5
5
|
export type { ArenaNodeDefBoolean, ArenaNodeDefBooleanProps } from './types/boolean';
|
|
6
6
|
export type { ArenaNodeDefCode, ArenaNodeDefCodeLayout, ArenaNodeDefCodeProps } from './types/code';
|
|
7
|
-
export type { ArenaNodeDefCoordinate, ArenaNodeDefCoordinateProps } from './types/coordinate';
|
|
7
|
+
export type { ArenaCoordinateAdditionalField, ArenaNodeDefCoordinate, ArenaNodeDefCoordinateProps, } from './types/coordinate';
|
|
8
8
|
export type { ArenaNodeDefDate } from './types/date';
|
|
9
9
|
export type { ArenaNodeDefDecimal, ArenaNodeDefDecimalProps } from './types/decimal';
|
|
10
10
|
export type { ArenaNodeDefEntity, ArenaNodeDefEntityChildPosition, ArenaNodeDefEntityLayout, ArenaNodeDefEntityLayoutChildItem, ArenaNodeDefEntityProps, ArenaNodeDefPrintOrientation, } from './types/entity';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodeDef/index.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAAjC,yGAAA,cAAc,OAAA;AAgBvB,qCAAmF;AAA1E,2GAAA,gBAAgB,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAAE,sGAAA,WAAW,OAAA;AAChE,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodeDef/index.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAAjC,yGAAA,cAAc,OAAA;AAgBvB,qCAAmF;AAA1E,2GAAA,gBAAgB,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAAE,sGAAA,WAAW,OAAA;AAChE,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AA0BjB,yCAAwD;AAA/C,iHAAA,uBAAuB,OAAA;AAEhC,qCAA8C;AAArC,uGAAA,eAAe,OAAA;AAKxB,iDAAoD;AAA3C,6GAAA,eAAe,OAAA;AAQxB,qCAA0E;AAAjE,6GAAA,qBAAqB,OAAA;AAAE,4GAAA,oBAAoB,OAAA","sourcesContent":["export { NodeDefFactory } from './factory'\n\nexport type {\n ArenaNodeDef,\n ArenaAnyNodeDef,\n ArenaNodeDefProps,\n ArenaNodeDefPropsWithLayout,\n ArenaNodeDefMeta,\n ArenaNodeDefPropsAdvanced,\n ArenaNodeDefExpression,\n ArenaNodeDefLayout,\n ArenaNodeDefValidations,\n ArenaNodeDefMap,\n ArenaNodeDefCountExpression,\n ArenaNodeDefExpressionFactoryParams,\n} from './nodeDef'\nexport { NodeDefCountType, NodeDefExpressionFactory, NodeDefType } from './nodeDef'\nexport { NodeDefs } from './nodeDefs'\n\n// ==== node def types\nexport type { ArenaNodeDefBoolean, ArenaNodeDefBooleanProps } from './types/boolean'\n\nexport type { ArenaNodeDefCode, ArenaNodeDefCodeLayout, ArenaNodeDefCodeProps } from './types/code'\n\nexport type {\n ArenaCoordinateAdditionalField,\n ArenaNodeDefCoordinate,\n ArenaNodeDefCoordinateProps,\n} from './types/coordinate'\n\nexport type { ArenaNodeDefDate } from './types/date'\n\nexport type { ArenaNodeDefDecimal, ArenaNodeDefDecimalProps } from './types/decimal'\n\nexport type {\n ArenaNodeDefEntity,\n ArenaNodeDefEntityChildPosition,\n ArenaNodeDefEntityLayout,\n ArenaNodeDefEntityLayoutChildItem,\n ArenaNodeDefEntityProps,\n ArenaNodeDefPrintOrientation,\n} from './types/entity'\n\nexport { NodeDefEntityRenderType } from './types/entity'\n\nexport { NodeDefFileType } from './types/file'\nexport type { ArenaNodeDefFile, ArenaNodeDefFileProps } from './types/file'\n\nexport type { ArenaNodeDefGeo, ArenaNodeDefGeoProps } from './types/geo'\n\nexport { FormHeaderColor } from './types/formHeader'\nexport type { ArenaNodeDefFormHeader, ArenaNodeDefFormHeaderProps } from './types/formHeader'\n\nexport type { ArenaNodeDefInteger } from './types/integer'\n\nexport type { ArenaNodeDefTaxon, ArenaNodeDefTaxonProps } from './types/taxon'\n\nexport type { ArenaNodeDefText, ArenaNodeDefTextProps, ArenaNodeDefTextLayout } from './types/text'\nexport { NodeDefTextRenderType, NodeDefTextInputType } from './types/text'\n\nexport type { ArenaNodeDefTime, ArenaNodeDefTimeProps } from './types/time'\n"]}
|
|
@@ -2,7 +2,7 @@ import { LanguageCode } from '../language';
|
|
|
2
2
|
import { ArenaAnyNodeDef, ArenaNodeDef, ArenaNodeDefCountExpression, NodeDefCountType, ArenaNodeDefExpression, ArenaNodeDefLayout, ArenaNodeDefPropsWithLayout, NodeDefType, ArenaNodeDefValidations } from './nodeDef';
|
|
3
3
|
import { ArenaNodeDefBoolean } from './types/boolean';
|
|
4
4
|
import { ArenaNodeDefCode } from './types/code';
|
|
5
|
-
import { ArenaNodeDefCoordinate } from './types/coordinate';
|
|
5
|
+
import { ArenaCoordinateAdditionalField, ArenaNodeDefCoordinate } from './types/coordinate';
|
|
6
6
|
import { ArenaNodeDefDate } from './types/date';
|
|
7
7
|
import { ArenaNodeDefDecimal } from './types/decimal';
|
|
8
8
|
import { ArenaNodeDefEntity, ArenaNodeDefEntityLayoutChildItem, ArenaNodeDefPrintOrientation } from './types/entity';
|
|
@@ -62,7 +62,7 @@ declare const isAlwaysVisible: (nodeDef: ArenaAnyNodeDef) => boolean;
|
|
|
62
62
|
declare const getCategoryUuid: (nodeDef: ArenaNodeDefCode) => string | undefined;
|
|
63
63
|
declare const getParentCodeDefUuid: (nodeDef: ArenaNodeDefCode) => string | undefined;
|
|
64
64
|
declare const isAllowOnlyDeviceCoordinate: (nodeDef: ArenaNodeDefCoordinate) => boolean;
|
|
65
|
-
declare const getCoordinateAdditionalFields: (nodeDef: ArenaNodeDefCoordinate) =>
|
|
65
|
+
declare const getCoordinateAdditionalFields: (nodeDef: ArenaNodeDefCoordinate) => ArenaCoordinateAdditionalField[];
|
|
66
66
|
declare const getMaxNumberDecimalDigits: (nodeDef: ArenaNodeDefDecimal) => number;
|
|
67
67
|
declare const getFileType: (nodeDef: ArenaNodeDefFile) => NodeDefFileType | undefined;
|
|
68
68
|
declare const getFileNameExpression: (nodeDef: ArenaNodeDefFile) => string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeDefs.js","sourceRoot":"","sources":["../../src/nodeDef/nodeDefs.ts"],"names":[],"mappings":";;;AACA,+CAAsD;AACtD,2DAA6D;AAC7D,sCAAwC;AACxC,oCAAkC;AAClC,uCAUkB;AAMlB,2CAMuB;AAMvB,uCAA4F;AAG5F,MAAM,MAAM,GAAG,CAAC,OAAwB,EAAW,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAA;AAEzE,MAAM,WAAW,GAAG,CAAC,OAAwB,EAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AAE7E,MAAM,QAAQ,GAAG,CAAC,OAAwB,EAAiC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,MAAM,CAAA;AAEjH,MAAM,SAAS,GAAG,CAAC,OAAwB,EAAkC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,OAAO,CAAA;AAEpH,MAAM,MAAM,GAAG,CAAC,OAAwB,EAA+B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,IAAI,CAAA;AAE3G,MAAM,YAAY,GAAG,CAAC,OAAwB,EAAqC,EAAE,CACnF,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,UAAU,CAAA;AAEzC,MAAM,MAAM,GAAG,CAAC,OAAwB,EAA+B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,IAAI,CAAA;AAE3G,MAAM,SAAS,GAAG,CAAC,OAAwB,EAAkC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,OAAO,CAAA;AAEpH,MAAM,MAAM,GAAG,CAAC,OAAwB,EAA+B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,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IACjB,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,eAAe;IAEf,eAAe;IACf,oBAAoB;IACpB,2BAA2B;IAC3B,6BAA6B;IAC7B,yBAAyB;IACzB,qBAAqB;IACrB,WAAW;IACX,cAAc;IACd,wBAAwB;IACxB,2BAA2B;IAC3B,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,6BAA6B;IAC7B,sCAAsC;IACtC,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IAEd,SAAS;IACT,cAAc;IACd,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,iCAAiC;IACjC,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,gBAAgB;IAChB,iCAAiC;IACjC,6BAA6B;IAC7B,uBAAuB;IACvB,WAAW;IACX,2BAA2B;IAC3B,0BAA0B;IAC1B,cAAc;IACd,cAAc;IACd,yBAAyB;IACzB,UAAU;IACV,aAAa;IACb,mBAAmB;IACnB,iCAAiC;IACjC,aAAa;IACb,gBAAgB;IAChB,QAAQ;IACR,WAAW;IACX,WAAW;IACX,WAAW;IACX,uBAAuB;IACvB,eAAe;IACf,WAAW;IACX,gBAAgB;CACjB,CAAA","sourcesContent":["import { LanguageCode } from '../language'\nimport { getLabelOrDefault } from '../language/labels'\nimport { ValuePropsCoordinate } from '../node/nodeValueProps'\nimport { defaultCycle } from '../survey'\nimport { Objects } from '../utils'\nimport {\n ArenaAnyNodeDef,\n ArenaNodeDef,\n ArenaNodeDefCountExpression,\n NodeDefCountType,\n ArenaNodeDefExpression,\n ArenaNodeDefLayout,\n ArenaNodeDefPropsWithLayout,\n NodeDefType,\n ArenaNodeDefValidations,\n} from './nodeDef'\nimport { ArenaNodeDefBoolean } from './types/boolean'\nimport { ArenaNodeDefCode } from './types/code'\nimport { ArenaNodeDefCoordinate } from './types/coordinate'\nimport { ArenaNodeDefDate } from './types/date'\nimport { ArenaNodeDefDecimal } from './types/decimal'\nimport {\n ArenaNodeDefEntity,\n ArenaNodeDefEntityLayout,\n ArenaNodeDefEntityLayoutChildItem,\n NodeDefEntityRenderType,\n ArenaNodeDefPrintOrientation,\n} from './types/entity'\nimport { ArenaNodeDefFile, NodeDefFileType } from './types/file'\nimport { ArenaNodeDefFormHeader } from './types/formHeader'\nimport { ArenaNodeDefGeo } from './types/geo'\nimport { ArenaNodeDefInteger } from './types/integer'\nimport { ArenaNodeDefTaxon } from './types/taxon'\nimport { ArenaNodeDefText, NodeDefTextRenderType, NodeDefTextInputType } from './types/text'\nimport { ArenaNodeDefTime } from './types/time'\n\nconst isRoot = (nodeDef: ArenaAnyNodeDef): boolean => !nodeDef.parentUuid\n\nconst isAttribute = (nodeDef: ArenaAnyNodeDef): boolean => !isEntity(nodeDef)\n\nconst isEntity = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefEntity => nodeDef.type === NodeDefType.entity\n\nconst isBoolean = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefBoolean => nodeDef.type === NodeDefType.boolean\n\nconst isCode = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefCode => nodeDef.type === NodeDefType.code\n\nconst isCoordinate = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefCoordinate =>\n nodeDef.type === NodeDefType.coordinate\n\nconst isDate = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefDate => nodeDef.type === NodeDefType.date\n\nconst isDecimal = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefDecimal => nodeDef.type === NodeDefType.decimal\n\nconst isFile = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefFile => nodeDef.type === NodeDefType.file\n\nconst isGeo = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefGeo => nodeDef.type === NodeDefType.geo\n\nconst isInteger = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefInteger => nodeDef.type === NodeDefType.integer\n\nconst isTaxon = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefTaxon => nodeDef.type === NodeDefType.taxon\n\nconst isText = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefText => nodeDef.type === NodeDefType.text\n\nconst isTime = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefTime => nodeDef.type === NodeDefType.time\n\nconst isMultiple = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.props.multiple ?? false\n\nconst isSingle = (nodeDef: ArenaAnyNodeDef): boolean => !isMultiple(nodeDef)\n\nconst isSingleEntity = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefEntity =>\n isEntity(nodeDef) && isSingle(nodeDef)\n\nconst isSingleAttribute = (nodeDef: ArenaAnyNodeDef): boolean => isAttribute(nodeDef) && isSingle(nodeDef)\n\nconst isMultipleEntity = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefEntity =>\n isEntity(nodeDef) && isMultiple(nodeDef)\n\nconst isMultipleAttribute = (nodeDef: ArenaAnyNodeDef): boolean => isAttribute(nodeDef) && isMultiple(nodeDef)\n\nconst isKey = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.props.key ?? false\n\nconst isAutoIncrementalKey = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.props.autoIncrementalKey ?? false\n\nconst isAnalysis = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.analysis ?? false\n\nconst getType = (nodeDef: ArenaAnyNodeDef): NodeDefType => nodeDef.type\n\nconst isLayoutElement = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefFormHeader =>\n nodeDef.type === NodeDefType.formHeader\n\nconst getName = (nodeDef: ArenaAnyNodeDef): string => nodeDef.props.name ?? ''\n\nconst getLabelOrName = (nodeDef: ArenaAnyNodeDef, lang: LanguageCode): string =>\n getLabelOrDefault(nodeDef.props.labels, lang, getName(nodeDef))\n\nconst getDescription = (nodeDef: ArenaAnyNodeDef, lang: LanguageCode): string =>\n getLabelOrDefault(nodeDef.props.descriptions, lang)\n\nconst isQualifier = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.props.qualifier ?? false\n\nconst isReadOnly = (nodeDef: ArenaNodeDef<any>): boolean => nodeDef.props.readOnly ?? false\n\nconst isHidden = (nodeDef: ArenaNodeDef<any>): boolean => nodeDef.props.hidden ?? false\n\nconst isEnumerate = (nodeDef: ArenaNodeDefEntity): boolean => nodeDef.props.enumerate ?? false\n\nconst getEnumeratingItemsExpression = (nodeDef: ArenaNodeDefEntity): string | undefined =>\n nodeDef.propsAdvanced?.enumeratingItemsExpression\n\nconst isAutoCreateMinCountItems = (nodeDef: ArenaNodeDefEntity): boolean =>\n isMultipleEntity(nodeDef) && (nodeDef.props.autoCreateMinCountItems ?? false)\n\nconst getPrintOrientation = (nodeDef: ArenaNodeDefEntity): ArenaNodeDefPrintOrientation | undefined =>\n nodeDef.props.printOrientation\n\nconst getDefaultValues = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] =>\n nodeDef.propsAdvanced?.defaultValues ?? []\n\nconst isDefaultValueEvaluatedOneTime = (nodeDef: ArenaAnyNodeDef): boolean =>\n !!nodeDef.propsAdvanced?.defaultValueEvaluatedOneTime\n\nconst getApplicable = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] => nodeDef.propsAdvanced?.applicable ?? []\n\nconst getVisibleFields = (nodeDef: ArenaAnyNodeDef): string[] | undefined => nodeDef.props.visibleFields\n\nconst isFieldVisible = (field: string) => (nodeDef: ArenaNodeDef<any>) => {\n const visibleFields = getVisibleFields(nodeDef)\n return !visibleFields || visibleFields.includes(field)\n}\n\nconst isInCycle =\n (cycle: string) =>\n (nodeDef: ArenaAnyNodeDef): boolean => {\n const cycles = nodeDef.props.cycles ?? [defaultCycle]\n return cycles.includes(cycle)\n }\n\nconst isExcludedInClone = (nodeDef: ArenaAnyNodeDef): boolean => !!nodeDef.propsAdvanced?.excludedInClone\n\nconst getEditableIf = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] => nodeDef.propsAdvanced?.editableIf ?? []\n\nconst isAlwaysEditable = (nodeDef: ArenaAnyNodeDef): boolean => getEditableIf(nodeDef).length === 0\n\nconst getVisibleIf = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] => nodeDef.propsAdvanced?.visibleIf ?? []\n\nconst isAlwaysVisible = (nodeDef: ArenaAnyNodeDef): boolean => getVisibleIf(nodeDef).length === 0\n\n// code\nconst getCategoryUuid = (nodeDef: ArenaNodeDefCode): string | undefined => nodeDef.props.categoryUuid\nconst getParentCodeDefUuid = (nodeDef: ArenaNodeDefCode): string | undefined => nodeDef.props.parentCodeDefUuid\n\n// coordinate\nconst isAllowOnlyDeviceCoordinate = (nodeDef: ArenaNodeDefCoordinate): boolean =>\n !!nodeDef.props.allowOnlyDeviceCoordinate\n\nconst getCoordinateAdditionalFields = (nodeDef: ArenaNodeDefCoordinate): string[] => {\n const result = []\n if (nodeDef.props.includeAccuracy) result.push(ValuePropsCoordinate[ValuePropsCoordinate.accuracy])\n if (nodeDef.props.includeAltitude) result.push(ValuePropsCoordinate[ValuePropsCoordinate.altitude])\n if (nodeDef.props.includeAltitudeAccuracy) result.push(ValuePropsCoordinate[ValuePropsCoordinate.altitudeAccuracy])\n return result\n}\n\n// decimal\nconst getMaxNumberDecimalDigits = (nodeDef: ArenaNodeDefDecimal) => {\n const decimalDigits = nodeDef.props.maxNumberDecimalDigits\n return Objects.isEmpty(decimalDigits) ? Number.NaN : Number(decimalDigits)\n}\n\n// file\nconst getFileType = (nodeDef: ArenaNodeDefFile): NodeDefFileType | undefined => nodeDef.props.fileType\nconst getFileNameExpression = (nodeDef: ArenaNodeDefFile): string | undefined =>\n nodeDef.propsAdvanced?.fileNameExpression\nconst getFileMaxSize = (nodeDef: ArenaNodeDefFile): number | undefined => nodeDef.props.maxFileSize\nconst isGeotagInformationShown = (nodeDef: ArenaNodeDefFile): boolean => !!nodeDef.props.geotagInformationShown\nconst isScreenCaptureInMapAllowed = (nodeDef: ArenaNodeDefFile): boolean => !!nodeDef.props.screenCaptureInMapAllowed\n\n// geo\nconst isPositionTracking = (nodeDef: ArenaNodeDefGeo): boolean => !!nodeDef.props.positionTracking\n\n// time\nconst isSecondsIncluded = (nodeDef: ArenaNodeDefTime): boolean => !!nodeDef.props.includeSeconds\n\n// taxon\nconst getTaxonomyUuid = (nodeDef: ArenaNodeDefTaxon): string | undefined => nodeDef.props.taxonomyUuid\n\nconst isVernacularNameSelectionKept = (nodeDef: ArenaNodeDefTaxon): boolean =>\n !!nodeDef.props.vernacularNameSelectionKept\n\nconst isVernacularNameAlwaysIncludedIfSingle = (nodeDef: ArenaNodeDefTaxon): boolean =>\n !!nodeDef.props.vernacularNameAlwaysIncludedIfSingle\n\n// text\nconst getTextTransform = (nodeDef: ArenaNodeDefText): string | undefined => nodeDef.props?.textTransform\nconst getTextInputType = (nodeDef: ArenaNodeDefText): NodeDefTextInputType | undefined => nodeDef.props?.textInputType\n\n// code and taxon\nconst getItemsFilter = (nodeDef: ArenaNodeDef<any>): string | undefined => nodeDef.propsAdvanced?.itemsFilter\n\n// Validations\nconst getValidations = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefValidations | undefined =>\n nodeDef.propsAdvanced?.validations\n\nconst getValidationsExpressions = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] =>\n getValidations(nodeDef)?.expressions ?? []\n\nconst isRequired = (nodeDef: ArenaAnyNodeDef): boolean => getValidations(nodeDef)?.required ?? false\n\nconst getRequiredIf = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] => getValidations(nodeDef)?.requiredIf ?? []\n\nconst isRequiredIfDefined = (nodeDef: ArenaAnyNodeDef): boolean => getRequiredIf(nodeDef).length > 0\n\n/**\n * True if the node def is always required or required when a condition is met (node def level, not record level).\n */\nconst isRequiredOrConditionallyRequired = (nodeDef: ArenaAnyNodeDef): boolean =>\n isRequired(nodeDef) || isRequiredIfDefined(nodeDef)\n\n// // Min/max count\n\nconst getCount = (nodeDef: ArenaAnyNodeDef, countType: NodeDefCountType): ArenaNodeDefCountExpression | undefined => {\n const countValidations = getValidations(nodeDef)?.count\n if (!countValidations) return undefined\n return countType === NodeDefCountType.max ? countValidations.max : countValidations.min\n}\n\nconst getMinCount = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefCountExpression | undefined =>\n getCount(nodeDef, NodeDefCountType.min)\n\nconst getMaxCount = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefCountExpression | undefined =>\n getCount(nodeDef, NodeDefCountType.max)\n\nconst hasMinOrMaxCount = (nodeDef: ArenaAnyNodeDef): boolean =>\n Objects.isNotEmpty(getMinCount(nodeDef)) || Objects.isNotEmpty(getMaxCount(nodeDef))\n\n// layout\nconst getLayoutProps =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<any>>): any =>\n nodeDef?.props?.layout?.[cycle] ?? {}\n\nconst getLayoutRenderType =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<any>>): string | undefined =>\n getLayoutProps(cycle)(nodeDef).renderType\n\nconst isLayoutRenderTypeForm =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): boolean =>\n getLayoutRenderType(cycle)(nodeDef) === NodeDefEntityRenderType.form\n\nconst isLayoutRenderTypeTable =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): boolean =>\n getLayoutRenderType(cycle)(nodeDef) === NodeDefEntityRenderType.table\n\nconst isLayoutRenderTypeHyperlink =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefText): boolean =>\n getLayoutRenderType(cycle)(nodeDef) === NodeDefTextRenderType.hyperlink\n\nconst isLayoutRenderTypeMarkdown =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefText): boolean =>\n getLayoutRenderType(cycle)(nodeDef) === NodeDefTextRenderType.markdown\n\nconst getChildrenEntitiesInOwnPageUuids =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): string[] =>\n (getLayoutProps(cycle)(nodeDef) as ArenaNodeDefEntityLayout).indexChildren ?? []\n\nconst getLayoutChildren =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): ArenaNodeDefEntityLayoutChildItem[] =>\n (getLayoutProps(cycle)(nodeDef) as ArenaNodeDefEntityLayout).layoutChildren ?? []\n\nconst getPageUuid =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): string | undefined =>\n (getLayoutProps(cycle)(nodeDef) as ArenaNodeDefEntityLayout).pageUuid\n\nconst isDisplayInOwnPage =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): boolean =>\n !!getPageUuid(cycle)(nodeDef)\n\nconst isHiddenInMobile =\n (cycle = defaultCycle) =>\n <L extends ArenaNodeDefLayout>(nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<L>>): boolean =>\n getLayoutProps(cycle)(nodeDef).hiddenInMobile ?? false\n\nconst isIncludedInMultipleEntitySummary =\n (cycle = defaultCycle) =>\n <L extends ArenaNodeDefLayout>(nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<L>>): boolean =>\n getLayoutProps(cycle)(nodeDef).includedInMultipleEntitySummary ?? false\n\nconst isIncludedInPreviousCycleLink =\n (cycle = defaultCycle) =>\n <L extends ArenaNodeDefLayout>(nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<L>>): boolean =>\n getLayoutProps(cycle)(nodeDef).includedInPreviousCycleLink ?? true\n\nconst isHiddenWhenNotRelevant =\n (cycle = defaultCycle) =>\n <L extends ArenaNodeDefLayout>(nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<L>>): boolean =>\n getLayoutProps(cycle)(nodeDef).hiddenWhenNotRelevant ?? false\n\nconst isCodeShown =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefCode): boolean =>\n !!(getLayoutProps(cycle)(nodeDef).codeShown ?? true)\n\n// Analysis\nconst getAreaBasedEstimatedOf = (nodeDef: ArenaNodeDef<any>): string | undefined =>\n nodeDef.propsAdvancedDraft?.areaBasedEstimatedOf ?? nodeDef.propsAdvanced?.areaBasedEstimatedOf\n\nconst getIndexInChain = (nodeDef: ArenaNodeDef<any>): number | undefined => nodeDef.propsAdvanced?.index\n\n// Metadata\nconst getMetaHierarchy = (nodeDef: ArenaNodeDef<any>): string[] => nodeDef.meta?.h ?? []\n\nexport const NodeDefs = {\n isEntity,\n isBoolean,\n isCode,\n isCoordinate,\n isDate,\n isDecimal,\n isFile,\n isGeo,\n isInteger,\n isTaxon,\n isText,\n isTime,\n isMultiple,\n isMultipleEntity,\n isSingle,\n isSingleEntity,\n isAttribute,\n isSingleAttribute,\n isMultipleAttribute,\n isKey,\n isAutoIncrementalKey,\n isQualifier,\n isReadOnly,\n isHidden,\n isEnumerate,\n getEnumeratingItemsExpression,\n isAutoCreateMinCountItems,\n getPrintOrientation,\n isAnalysis,\n isRoot,\n getType,\n isLayoutElement,\n getName,\n getLabelOrName,\n getDescription,\n getDefaultValues,\n isDefaultValueEvaluatedOneTime,\n getApplicable,\n getVisibleFields,\n isFieldVisible,\n isInCycle,\n isExcludedInClone,\n getEditableIf,\n isAlwaysEditable,\n getVisibleIf,\n isAlwaysVisible,\n\n getCategoryUuid,\n getParentCodeDefUuid,\n isAllowOnlyDeviceCoordinate,\n getCoordinateAdditionalFields,\n getMaxNumberDecimalDigits,\n getFileNameExpression,\n getFileType,\n getFileMaxSize,\n isGeotagInformationShown,\n isScreenCaptureInMapAllowed,\n isPositionTracking,\n isSecondsIncluded,\n getTaxonomyUuid,\n isVernacularNameSelectionKept,\n isVernacularNameAlwaysIncludedIfSingle,\n getTextTransform,\n getTextInputType,\n getItemsFilter,\n\n // layout\n getLayoutProps,\n getLayoutRenderType,\n isLayoutRenderTypeForm,\n isLayoutRenderTypeTable,\n getChildrenEntitiesInOwnPageUuids,\n getLayoutChildren,\n getPageUuid,\n isDisplayInOwnPage,\n isHiddenInMobile,\n isIncludedInMultipleEntitySummary,\n isIncludedInPreviousCycleLink,\n isHiddenWhenNotRelevant,\n isCodeShown,\n isLayoutRenderTypeHyperlink,\n isLayoutRenderTypeMarkdown,\n // validations\n getValidations,\n getValidationsExpressions,\n isRequired,\n getRequiredIf,\n isRequiredIfDefined,\n isRequiredOrConditionallyRequired,\n // // Min Max\n hasMinOrMaxCount,\n getCount,\n getMaxCount,\n getMinCount,\n // Analysis\n getAreaBasedEstimatedOf,\n getIndexInChain,\n // Metadata\n getMetaHierarchy,\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nodeDefs.js","sourceRoot":"","sources":["../../src/nodeDef/nodeDefs.ts"],"names":[],"mappings":";;;AACA,+CAAsD;AACtD,2DAA6D;AAC7D,sCAAwC;AACxC,oCAAkC;AAClC,uCAUkB;AAMlB,2CAMuB;AAMvB,uCAA4F;AAG5F,MAAM,MAAM,GAAG,CAAC,OAAwB,EAAW,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAA;AAEzE,MAAM,WAAW,GAAG,CAAC,OAAwB,EAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AAE7E,MAAM,QAAQ,GAAG,CAAC,OAAwB,EAAiC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,MAAM,CAAA;AAEjH,MAAM,SAAS,GAAG,CAAC,OAAwB,EAAkC,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,OAAO,CAAA;AAEpH,MAAM,MAAM,GAAG,CAAC,OAAwB,EAA+B,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,IAAI,CAAA;AAE3G,MAAM,YAAY,GAAG,CAAC,OAAwB,EAAqC,EAAE,CACnF,OAAO,CAAC,IAAI,KAAK,qBAAW,CAAC,UAAU,CAAA;AAEzC,MAAM,MAAM,GAAG,CAAC,OAAwB,EAA+B,EAAE,CAAC,OAAO,CAAC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AAU;IACV,QAAQ;IACR,WAAW;IACX,6BAA6B;IAC7B,yBAAyB;IACzB,mBAAmB;IACnB,UAAU;IACV,MAAM;IACN,OAAO;IACP,eAAe;IACf,OAAO;IACP,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,8BAA8B;IAC9B,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,SAAS;IACT,iBAAiB;IACjB,aAAa;IACb,gBAAgB;IAChB,YAAY;IACZ,eAAe;IAEf,eAAe;IACf,oBAAoB;IACpB,2BAA2B;IAC3B,6BAA6B;IAC7B,yBAAyB;IACzB,qBAAqB;IACrB,WAAW;IACX,cAAc;IACd,wBAAwB;IACxB,2BAA2B;IAC3B,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,6BAA6B;IAC7B,sCAAsC;IACtC,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IAEd,SAAS;IACT,cAAc;IACd,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,iCAAiC;IACjC,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,gBAAgB;IAChB,iCAAiC;IACjC,6BAA6B;IAC7B,uBAAuB;IACvB,WAAW;IACX,2BAA2B;IAC3B,0BAA0B;IAC1B,cAAc;IACd,cAAc;IACd,yBAAyB;IACzB,UAAU;IACV,aAAa;IACb,mBAAmB;IACnB,iCAAiC;IACjC,aAAa;IACb,gBAAgB;IAChB,QAAQ;IACR,WAAW;IACX,WAAW;IACX,WAAW;IACX,uBAAuB;IACvB,eAAe;IACf,WAAW;IACX,gBAAgB;CACjB,CAAA","sourcesContent":["import { LanguageCode } from '../language'\nimport { getLabelOrDefault } from '../language/labels'\nimport { ValuePropsCoordinate } from '../node/nodeValueProps'\nimport { defaultCycle } from '../survey'\nimport { Objects } from '../utils'\nimport {\n ArenaAnyNodeDef,\n ArenaNodeDef,\n ArenaNodeDefCountExpression,\n NodeDefCountType,\n ArenaNodeDefExpression,\n ArenaNodeDefLayout,\n ArenaNodeDefPropsWithLayout,\n NodeDefType,\n ArenaNodeDefValidations,\n} from './nodeDef'\nimport { ArenaNodeDefBoolean } from './types/boolean'\nimport { ArenaNodeDefCode } from './types/code'\nimport { ArenaCoordinateAdditionalField, ArenaNodeDefCoordinate } from './types/coordinate'\nimport { ArenaNodeDefDate } from './types/date'\nimport { ArenaNodeDefDecimal } from './types/decimal'\nimport {\n ArenaNodeDefEntity,\n ArenaNodeDefEntityLayout,\n ArenaNodeDefEntityLayoutChildItem,\n NodeDefEntityRenderType,\n ArenaNodeDefPrintOrientation,\n} from './types/entity'\nimport { ArenaNodeDefFile, NodeDefFileType } from './types/file'\nimport { ArenaNodeDefFormHeader } from './types/formHeader'\nimport { ArenaNodeDefGeo } from './types/geo'\nimport { ArenaNodeDefInteger } from './types/integer'\nimport { ArenaNodeDefTaxon } from './types/taxon'\nimport { ArenaNodeDefText, NodeDefTextRenderType, NodeDefTextInputType } from './types/text'\nimport { ArenaNodeDefTime } from './types/time'\n\nconst isRoot = (nodeDef: ArenaAnyNodeDef): boolean => !nodeDef.parentUuid\n\nconst isAttribute = (nodeDef: ArenaAnyNodeDef): boolean => !isEntity(nodeDef)\n\nconst isEntity = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefEntity => nodeDef.type === NodeDefType.entity\n\nconst isBoolean = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefBoolean => nodeDef.type === NodeDefType.boolean\n\nconst isCode = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefCode => nodeDef.type === NodeDefType.code\n\nconst isCoordinate = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefCoordinate =>\n nodeDef.type === NodeDefType.coordinate\n\nconst isDate = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefDate => nodeDef.type === NodeDefType.date\n\nconst isDecimal = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefDecimal => nodeDef.type === NodeDefType.decimal\n\nconst isFile = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefFile => nodeDef.type === NodeDefType.file\n\nconst isGeo = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefGeo => nodeDef.type === NodeDefType.geo\n\nconst isInteger = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefInteger => nodeDef.type === NodeDefType.integer\n\nconst isTaxon = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefTaxon => nodeDef.type === NodeDefType.taxon\n\nconst isText = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefText => nodeDef.type === NodeDefType.text\n\nconst isTime = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefTime => nodeDef.type === NodeDefType.time\n\nconst isMultiple = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.props.multiple ?? false\n\nconst isSingle = (nodeDef: ArenaAnyNodeDef): boolean => !isMultiple(nodeDef)\n\nconst isSingleEntity = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefEntity =>\n isEntity(nodeDef) && isSingle(nodeDef)\n\nconst isSingleAttribute = (nodeDef: ArenaAnyNodeDef): boolean => isAttribute(nodeDef) && isSingle(nodeDef)\n\nconst isMultipleEntity = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefEntity =>\n isEntity(nodeDef) && isMultiple(nodeDef)\n\nconst isMultipleAttribute = (nodeDef: ArenaAnyNodeDef): boolean => isAttribute(nodeDef) && isMultiple(nodeDef)\n\nconst isKey = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.props.key ?? false\n\nconst isAutoIncrementalKey = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.props.autoIncrementalKey ?? false\n\nconst isAnalysis = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.analysis ?? false\n\nconst getType = (nodeDef: ArenaAnyNodeDef): NodeDefType => nodeDef.type\n\nconst isLayoutElement = (nodeDef: ArenaAnyNodeDef): nodeDef is ArenaNodeDefFormHeader =>\n nodeDef.type === NodeDefType.formHeader\n\nconst getName = (nodeDef: ArenaAnyNodeDef): string => nodeDef.props.name ?? ''\n\nconst getLabelOrName = (nodeDef: ArenaAnyNodeDef, lang: LanguageCode): string =>\n getLabelOrDefault(nodeDef.props.labels, lang, getName(nodeDef))\n\nconst getDescription = (nodeDef: ArenaAnyNodeDef, lang: LanguageCode): string =>\n getLabelOrDefault(nodeDef.props.descriptions, lang)\n\nconst isQualifier = (nodeDef: ArenaAnyNodeDef): boolean => nodeDef.props.qualifier ?? false\n\nconst isReadOnly = (nodeDef: ArenaNodeDef<any>): boolean => nodeDef.props.readOnly ?? false\n\nconst isHidden = (nodeDef: ArenaNodeDef<any>): boolean => nodeDef.props.hidden ?? false\n\nconst isEnumerate = (nodeDef: ArenaNodeDefEntity): boolean => nodeDef.props.enumerate ?? false\n\nconst getEnumeratingItemsExpression = (nodeDef: ArenaNodeDefEntity): string | undefined =>\n nodeDef.propsAdvanced?.enumeratingItemsExpression\n\nconst isAutoCreateMinCountItems = (nodeDef: ArenaNodeDefEntity): boolean =>\n isMultipleEntity(nodeDef) && (nodeDef.props.autoCreateMinCountItems ?? false)\n\nconst getPrintOrientation = (nodeDef: ArenaNodeDefEntity): ArenaNodeDefPrintOrientation | undefined =>\n nodeDef.props.printOrientation\n\nconst getDefaultValues = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] =>\n nodeDef.propsAdvanced?.defaultValues ?? []\n\nconst isDefaultValueEvaluatedOneTime = (nodeDef: ArenaAnyNodeDef): boolean =>\n !!nodeDef.propsAdvanced?.defaultValueEvaluatedOneTime\n\nconst getApplicable = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] => nodeDef.propsAdvanced?.applicable ?? []\n\nconst getVisibleFields = (nodeDef: ArenaAnyNodeDef): string[] | undefined => nodeDef.props.visibleFields\n\nconst isFieldVisible = (field: string) => (nodeDef: ArenaNodeDef<any>) => {\n const visibleFields = getVisibleFields(nodeDef)\n return !visibleFields || visibleFields.includes(field)\n}\n\nconst isInCycle =\n (cycle: string) =>\n (nodeDef: ArenaAnyNodeDef): boolean => {\n const cycles = nodeDef.props.cycles ?? [defaultCycle]\n return cycles.includes(cycle)\n }\n\nconst isExcludedInClone = (nodeDef: ArenaAnyNodeDef): boolean => !!nodeDef.propsAdvanced?.excludedInClone\n\nconst getEditableIf = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] => nodeDef.propsAdvanced?.editableIf ?? []\n\nconst isAlwaysEditable = (nodeDef: ArenaAnyNodeDef): boolean => getEditableIf(nodeDef).length === 0\n\nconst getVisibleIf = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] => nodeDef.propsAdvanced?.visibleIf ?? []\n\nconst isAlwaysVisible = (nodeDef: ArenaAnyNodeDef): boolean => getVisibleIf(nodeDef).length === 0\n\n// code\nconst getCategoryUuid = (nodeDef: ArenaNodeDefCode): string | undefined => nodeDef.props.categoryUuid\nconst getParentCodeDefUuid = (nodeDef: ArenaNodeDefCode): string | undefined => nodeDef.props.parentCodeDefUuid\n\n// coordinate\nconst isAllowOnlyDeviceCoordinate = (nodeDef: ArenaNodeDefCoordinate): boolean =>\n !!nodeDef.props.allowOnlyDeviceCoordinate\n\nconst getCoordinateAdditionalFields = (nodeDef: ArenaNodeDefCoordinate): ArenaCoordinateAdditionalField[] => {\n const result: ArenaCoordinateAdditionalField[] = []\n if (nodeDef.props.includeAccuracy) result.push(ValuePropsCoordinate[ValuePropsCoordinate.accuracy])\n if (nodeDef.props.includeAltitude) result.push(ValuePropsCoordinate[ValuePropsCoordinate.altitude])\n if (nodeDef.props.includeAltitudeAccuracy) result.push(ValuePropsCoordinate[ValuePropsCoordinate.altitudeAccuracy])\n return result\n}\n\n// decimal\nconst getMaxNumberDecimalDigits = (nodeDef: ArenaNodeDefDecimal) => {\n const decimalDigits = nodeDef.props.maxNumberDecimalDigits\n return Objects.isEmpty(decimalDigits) ? Number.NaN : Number(decimalDigits)\n}\n\n// file\nconst getFileType = (nodeDef: ArenaNodeDefFile): NodeDefFileType | undefined => nodeDef.props.fileType\nconst getFileNameExpression = (nodeDef: ArenaNodeDefFile): string | undefined =>\n nodeDef.propsAdvanced?.fileNameExpression\nconst getFileMaxSize = (nodeDef: ArenaNodeDefFile): number | undefined => nodeDef.props.maxFileSize\nconst isGeotagInformationShown = (nodeDef: ArenaNodeDefFile): boolean => !!nodeDef.props.geotagInformationShown\nconst isScreenCaptureInMapAllowed = (nodeDef: ArenaNodeDefFile): boolean => !!nodeDef.props.screenCaptureInMapAllowed\n\n// geo\nconst isPositionTracking = (nodeDef: ArenaNodeDefGeo): boolean => !!nodeDef.props.positionTracking\n\n// time\nconst isSecondsIncluded = (nodeDef: ArenaNodeDefTime): boolean => !!nodeDef.props.includeSeconds\n\n// taxon\nconst getTaxonomyUuid = (nodeDef: ArenaNodeDefTaxon): string | undefined => nodeDef.props.taxonomyUuid\n\nconst isVernacularNameSelectionKept = (nodeDef: ArenaNodeDefTaxon): boolean =>\n !!nodeDef.props.vernacularNameSelectionKept\n\nconst isVernacularNameAlwaysIncludedIfSingle = (nodeDef: ArenaNodeDefTaxon): boolean =>\n !!nodeDef.props.vernacularNameAlwaysIncludedIfSingle\n\n// text\nconst getTextTransform = (nodeDef: ArenaNodeDefText): string | undefined => nodeDef.props?.textTransform\nconst getTextInputType = (nodeDef: ArenaNodeDefText): NodeDefTextInputType | undefined => nodeDef.props?.textInputType\n\n// code and taxon\nconst getItemsFilter = (nodeDef: ArenaNodeDef<any>): string | undefined => nodeDef.propsAdvanced?.itemsFilter\n\n// Validations\nconst getValidations = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefValidations | undefined =>\n nodeDef.propsAdvanced?.validations\n\nconst getValidationsExpressions = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] =>\n getValidations(nodeDef)?.expressions ?? []\n\nconst isRequired = (nodeDef: ArenaAnyNodeDef): boolean => getValidations(nodeDef)?.required ?? false\n\nconst getRequiredIf = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefExpression[] => getValidations(nodeDef)?.requiredIf ?? []\n\nconst isRequiredIfDefined = (nodeDef: ArenaAnyNodeDef): boolean => getRequiredIf(nodeDef).length > 0\n\n/**\n * True if the node def is always required or required when a condition is met (node def level, not record level).\n */\nconst isRequiredOrConditionallyRequired = (nodeDef: ArenaAnyNodeDef): boolean =>\n isRequired(nodeDef) || isRequiredIfDefined(nodeDef)\n\n// // Min/max count\n\nconst getCount = (nodeDef: ArenaAnyNodeDef, countType: NodeDefCountType): ArenaNodeDefCountExpression | undefined => {\n const countValidations = getValidations(nodeDef)?.count\n if (!countValidations) return undefined\n return countType === NodeDefCountType.max ? countValidations.max : countValidations.min\n}\n\nconst getMinCount = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefCountExpression | undefined =>\n getCount(nodeDef, NodeDefCountType.min)\n\nconst getMaxCount = (nodeDef: ArenaAnyNodeDef): ArenaNodeDefCountExpression | undefined =>\n getCount(nodeDef, NodeDefCountType.max)\n\nconst hasMinOrMaxCount = (nodeDef: ArenaAnyNodeDef): boolean =>\n Objects.isNotEmpty(getMinCount(nodeDef)) || Objects.isNotEmpty(getMaxCount(nodeDef))\n\n// layout\nconst getLayoutProps =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<any>>): any =>\n nodeDef?.props?.layout?.[cycle] ?? {}\n\nconst getLayoutRenderType =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<any>>): string | undefined =>\n getLayoutProps(cycle)(nodeDef).renderType\n\nconst isLayoutRenderTypeForm =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): boolean =>\n getLayoutRenderType(cycle)(nodeDef) === NodeDefEntityRenderType.form\n\nconst isLayoutRenderTypeTable =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): boolean =>\n getLayoutRenderType(cycle)(nodeDef) === NodeDefEntityRenderType.table\n\nconst isLayoutRenderTypeHyperlink =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefText): boolean =>\n getLayoutRenderType(cycle)(nodeDef) === NodeDefTextRenderType.hyperlink\n\nconst isLayoutRenderTypeMarkdown =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefText): boolean =>\n getLayoutRenderType(cycle)(nodeDef) === NodeDefTextRenderType.markdown\n\nconst getChildrenEntitiesInOwnPageUuids =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): string[] =>\n (getLayoutProps(cycle)(nodeDef) as ArenaNodeDefEntityLayout).indexChildren ?? []\n\nconst getLayoutChildren =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): ArenaNodeDefEntityLayoutChildItem[] =>\n (getLayoutProps(cycle)(nodeDef) as ArenaNodeDefEntityLayout).layoutChildren ?? []\n\nconst getPageUuid =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): string | undefined =>\n (getLayoutProps(cycle)(nodeDef) as ArenaNodeDefEntityLayout).pageUuid\n\nconst isDisplayInOwnPage =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefEntity): boolean =>\n !!getPageUuid(cycle)(nodeDef)\n\nconst isHiddenInMobile =\n (cycle = defaultCycle) =>\n <L extends ArenaNodeDefLayout>(nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<L>>): boolean =>\n getLayoutProps(cycle)(nodeDef).hiddenInMobile ?? false\n\nconst isIncludedInMultipleEntitySummary =\n (cycle = defaultCycle) =>\n <L extends ArenaNodeDefLayout>(nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<L>>): boolean =>\n getLayoutProps(cycle)(nodeDef).includedInMultipleEntitySummary ?? false\n\nconst isIncludedInPreviousCycleLink =\n (cycle = defaultCycle) =>\n <L extends ArenaNodeDefLayout>(nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<L>>): boolean =>\n getLayoutProps(cycle)(nodeDef).includedInPreviousCycleLink ?? true\n\nconst isHiddenWhenNotRelevant =\n (cycle = defaultCycle) =>\n <L extends ArenaNodeDefLayout>(nodeDef: ArenaNodeDef<any, ArenaNodeDefPropsWithLayout<L>>): boolean =>\n getLayoutProps(cycle)(nodeDef).hiddenWhenNotRelevant ?? false\n\nconst isCodeShown =\n (cycle = defaultCycle) =>\n (nodeDef: ArenaNodeDefCode): boolean =>\n !!(getLayoutProps(cycle)(nodeDef).codeShown ?? true)\n\n// Analysis\nconst getAreaBasedEstimatedOf = (nodeDef: ArenaNodeDef<any>): string | undefined =>\n nodeDef.propsAdvancedDraft?.areaBasedEstimatedOf ?? nodeDef.propsAdvanced?.areaBasedEstimatedOf\n\nconst getIndexInChain = (nodeDef: ArenaNodeDef<any>): number | undefined => nodeDef.propsAdvanced?.index\n\n// Metadata\nconst getMetaHierarchy = (nodeDef: ArenaNodeDef<any>): string[] => nodeDef.meta?.h ?? []\n\nexport const NodeDefs = {\n isEntity,\n isBoolean,\n isCode,\n isCoordinate,\n isDate,\n isDecimal,\n isFile,\n isGeo,\n isInteger,\n isTaxon,\n isText,\n isTime,\n isMultiple,\n isMultipleEntity,\n isSingle,\n isSingleEntity,\n isAttribute,\n isSingleAttribute,\n isMultipleAttribute,\n isKey,\n isAutoIncrementalKey,\n isQualifier,\n isReadOnly,\n isHidden,\n isEnumerate,\n getEnumeratingItemsExpression,\n isAutoCreateMinCountItems,\n getPrintOrientation,\n isAnalysis,\n isRoot,\n getType,\n isLayoutElement,\n getName,\n getLabelOrName,\n getDescription,\n getDefaultValues,\n isDefaultValueEvaluatedOneTime,\n getApplicable,\n getVisibleFields,\n isFieldVisible,\n isInCycle,\n isExcludedInClone,\n getEditableIf,\n isAlwaysEditable,\n getVisibleIf,\n isAlwaysVisible,\n\n getCategoryUuid,\n getParentCodeDefUuid,\n isAllowOnlyDeviceCoordinate,\n getCoordinateAdditionalFields,\n getMaxNumberDecimalDigits,\n getFileNameExpression,\n getFileType,\n getFileMaxSize,\n isGeotagInformationShown,\n isScreenCaptureInMapAllowed,\n isPositionTracking,\n isSecondsIncluded,\n getTaxonomyUuid,\n isVernacularNameSelectionKept,\n isVernacularNameAlwaysIncludedIfSingle,\n getTextTransform,\n getTextInputType,\n getItemsFilter,\n\n // layout\n getLayoutProps,\n getLayoutRenderType,\n isLayoutRenderTypeForm,\n isLayoutRenderTypeTable,\n getChildrenEntitiesInOwnPageUuids,\n getLayoutChildren,\n getPageUuid,\n isDisplayInOwnPage,\n isHiddenInMobile,\n isIncludedInMultipleEntitySummary,\n isIncludedInPreviousCycleLink,\n isHiddenWhenNotRelevant,\n isCodeShown,\n isLayoutRenderTypeHyperlink,\n isLayoutRenderTypeMarkdown,\n // validations\n getValidations,\n getValidationsExpressions,\n isRequired,\n getRequiredIf,\n isRequiredIfDefined,\n isRequiredOrConditionallyRequired,\n // // Min Max\n hasMinOrMaxCount,\n getCount,\n getMaxCount,\n getMinCount,\n // Analysis\n getAreaBasedEstimatedOf,\n getIndexInChain,\n // Metadata\n getMetaHierarchy,\n}\n"]}
|