@openforis/arena-core 2.22.0 → 2.24.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.
@@ -1,5 +1,5 @@
1
1
  export { Authorizer } from './authorizer';
2
- export { AuthGroupName } from './authGroup';
2
+ export { AuthGroupName, createDefaultAuthGroups } from './authGroup';
3
3
  export type { AuthGroup } from './authGroup';
4
4
  export type { User, UserAuthGroup, UserAuthGroupProps, UserInvitation, UserPrefs, UserProps, UserPrefSurveys, } from './user';
5
5
  export type { AuthToken, UserAuthTokenPayload, UserAuthRefreshToken, UserAuthRefreshTokenPayload, UserAuthRefreshTokenProps, UserTokenPayload, DownloadAuthTokenPayload, } from './userAuth';
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Users = exports.Permission = exports.UserFactory = exports.UserTitle = exports.UserStatus = exports.AuthGroupName = exports.Authorizer = void 0;
3
+ exports.Users = exports.Permission = exports.UserFactory = exports.UserTitle = exports.UserStatus = exports.createDefaultAuthGroups = exports.AuthGroupName = exports.Authorizer = void 0;
4
4
  var authorizer_1 = require("./authorizer");
5
5
  Object.defineProperty(exports, "Authorizer", { enumerable: true, get: function () { return authorizer_1.Authorizer; } });
6
6
  var authGroup_1 = require("./authGroup");
7
7
  Object.defineProperty(exports, "AuthGroupName", { enumerable: true, get: function () { return authGroup_1.AuthGroupName; } });
8
+ Object.defineProperty(exports, "createDefaultAuthGroups", { enumerable: true, get: function () { return authGroup_1.createDefaultAuthGroups; } });
8
9
  var user_1 = require("./user");
9
10
  Object.defineProperty(exports, "UserStatus", { enumerable: true, get: function () { return user_1.UserStatus; } });
10
11
  Object.defineProperty(exports, "UserTitle", { enumerable: true, get: function () { return user_1.UserTitle; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AAEnB,yCAA2C;AAAlC,0GAAA,aAAa,OAAA;AAwBtB,+BAA8C;AAArC,kGAAA,UAAU,OAAA;AAAE,iGAAA,SAAS,OAAA;AAC9B,qCAAuC;AAA9B,sGAAA,WAAW,OAAA;AAEpB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AAInB,iCAA+B;AAAtB,8FAAA,KAAK,OAAA","sourcesContent":["export { Authorizer } from './authorizer'\n\nexport { AuthGroupName } from './authGroup'\nexport type { AuthGroup } from './authGroup'\n\nexport type {\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n UserInvitation,\n UserPrefs,\n UserProps,\n UserPrefSurveys,\n} from './user'\nexport type {\n AuthToken,\n UserAuthTokenPayload,\n UserAuthRefreshToken,\n UserAuthRefreshTokenPayload,\n UserAuthRefreshTokenProps,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n} from './userAuth'\nexport type { UserService } from './userService'\nexport type { UserAuthTokenService } from './userAuthTokenService'\n\nexport { UserStatus, UserTitle } from './user'\nexport { UserFactory } from './factory'\n\nexport { Permission } from './permission'\n\nexport type { UserGroupQualifier, UserGroupProps, UserGroup } from './userGroup'\n\nexport { Users } from './users'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":";;;AAAA,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AAEnB,yCAAoE;AAA3D,0GAAA,aAAa,OAAA;AAAE,oHAAA,uBAAuB,OAAA;AAwB/C,+BAA8C;AAArC,kGAAA,UAAU,OAAA;AAAE,iGAAA,SAAS,OAAA;AAC9B,qCAAuC;AAA9B,sGAAA,WAAW,OAAA;AAEpB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AAInB,iCAA+B;AAAtB,8FAAA,KAAK,OAAA","sourcesContent":["export { Authorizer } from './authorizer'\n\nexport { AuthGroupName, createDefaultAuthGroups } from './authGroup'\nexport type { AuthGroup } from './authGroup'\n\nexport type {\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n UserInvitation,\n UserPrefs,\n UserProps,\n UserPrefSurveys,\n} from './user'\nexport type {\n AuthToken,\n UserAuthTokenPayload,\n UserAuthRefreshToken,\n UserAuthRefreshTokenPayload,\n UserAuthRefreshTokenProps,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n} from './userAuth'\nexport type { UserService } from './userService'\nexport type { UserAuthTokenService } from './userAuthTokenService'\n\nexport { UserStatus, UserTitle } from './user'\nexport { UserFactory } from './factory'\n\nexport { Permission } from './permission'\n\nexport type { UserGroupQualifier, UserGroupProps, UserGroup } from './userGroup'\n\nexport { Users } from './users'\n"]}
@@ -7,6 +7,7 @@ export declare enum ChainStatusExec {
7
7
  success = "success"
8
8
  }
9
9
  export interface ChainProps {
10
+ cycles?: string[];
10
11
  descriptions?: Labels;
11
12
  labels?: Labels;
12
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/chain/chain.ts"],"names":[],"mappings":";;;AAIA,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,aAAf,eAAe,GAAf,eAAe,QAI1B","sourcesContent":["import { ArenaObject } from '../common'\nimport { Labels } from '../language'\nimport { Validation } from '../validation'\n\nexport enum ChainStatusExec {\n error = 'error',\n running = 'running',\n success = 'success',\n}\n\nexport interface ChainProps {\n descriptions?: Labels\n labels?: Labels\n}\n\nexport interface Chain extends ArenaObject<ChainProps> {\n dateCreated?: string\n dateExecuted?: string\n dateModified?: string\n scriptCommon?: string\n statusExec?: string\n validation: Validation\n temporary?: boolean\n}\n"]}
1
+ {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../src/chain/chain.ts"],"names":[],"mappings":";;;AAIA,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,aAAf,eAAe,GAAf,eAAe,QAI1B","sourcesContent":["import { ArenaObject } from '../common'\nimport { Labels } from '../language'\nimport { Validation } from '../validation'\n\nexport enum ChainStatusExec {\n error = 'error',\n running = 'running',\n success = 'success',\n}\n\nexport interface ChainProps {\n cycles?: string[]\n descriptions?: Labels\n labels?: Labels\n}\n\nexport interface Chain extends ArenaObject<ChainProps> {\n dateCreated?: string\n dateExecuted?: string\n dateModified?: string\n scriptCommon?: string\n statusExec?: string\n validation: Validation\n temporary?: boolean\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  export { Authorizer } from './authorizer';
2
- export { AuthGroupName } from './authGroup';
2
+ export { AuthGroupName, createDefaultAuthGroups } from './authGroup';
3
3
  export { UserStatus, UserTitle } from './user';
4
4
  export { UserFactory } from './factory';
5
5
  export { Permission } from './permission';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAwB3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA","sourcesContent":["export { Authorizer } from './authorizer'\n\nexport { AuthGroupName } from './authGroup'\nexport type { AuthGroup } from './authGroup'\n\nexport type {\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n UserInvitation,\n UserPrefs,\n UserProps,\n UserPrefSurveys,\n} from './user'\nexport type {\n AuthToken,\n UserAuthTokenPayload,\n UserAuthRefreshToken,\n UserAuthRefreshTokenPayload,\n UserAuthRefreshTokenProps,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n} from './userAuth'\nexport type { UserService } from './userService'\nexport type { UserAuthTokenService } from './userAuthTokenService'\n\nexport { UserStatus, UserTitle } from './user'\nexport { UserFactory } from './factory'\n\nexport { Permission } from './permission'\n\nexport type { UserGroupQualifier, UserGroupProps, UserGroup } from './userGroup'\n\nexport { Users } from './users'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAwBpE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA","sourcesContent":["export { Authorizer } from './authorizer'\n\nexport { AuthGroupName, createDefaultAuthGroups } from './authGroup'\nexport type { AuthGroup } from './authGroup'\n\nexport type {\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n UserInvitation,\n UserPrefs,\n UserProps,\n UserPrefSurveys,\n} from './user'\nexport type {\n AuthToken,\n UserAuthTokenPayload,\n UserAuthRefreshToken,\n UserAuthRefreshTokenPayload,\n UserAuthRefreshTokenProps,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n} from './userAuth'\nexport type { UserService } from './userService'\nexport type { UserAuthTokenService } from './userAuthTokenService'\n\nexport { UserStatus, UserTitle } from './user'\nexport { UserFactory } from './factory'\n\nexport { Permission } from './permission'\n\nexport type { UserGroupQualifier, UserGroupProps, UserGroup } from './userGroup'\n\nexport { Users } from './users'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../src/chain/chain.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B","sourcesContent":["import { ArenaObject } from '../common'\nimport { Labels } from '../language'\nimport { Validation } from '../validation'\n\nexport enum ChainStatusExec {\n error = 'error',\n running = 'running',\n success = 'success',\n}\n\nexport interface ChainProps {\n descriptions?: Labels\n labels?: Labels\n}\n\nexport interface Chain extends ArenaObject<ChainProps> {\n dateCreated?: string\n dateExecuted?: string\n dateModified?: string\n scriptCommon?: string\n statusExec?: string\n validation: Validation\n temporary?: boolean\n}\n"]}
1
+ {"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../src/chain/chain.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B","sourcesContent":["import { ArenaObject } from '../common'\nimport { Labels } from '../language'\nimport { Validation } from '../validation'\n\nexport enum ChainStatusExec {\n error = 'error',\n running = 'running',\n success = 'success',\n}\n\nexport interface ChainProps {\n cycles?: string[]\n descriptions?: Labels\n labels?: Labels\n}\n\nexport interface Chain extends ArenaObject<ChainProps> {\n dateCreated?: string\n dateExecuted?: string\n dateModified?: string\n scriptCommon?: string\n statusExec?: string\n validation: Validation\n temporary?: boolean\n}\n"]}
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Authorizer, AuthGroupName, UserStatus, Permission, UserTitle, UserFactory, Users } from './auth';
1
+ export { Authorizer, AuthGroupName, createDefaultAuthGroups, UserStatus, Permission, UserTitle, UserFactory, Users, } from './auth';
2
2
  export { CategoryFactory, CategoryImportColumnType, CategoryItemFactory, CategoryLevelFactory } from './category';
3
3
  export { Categories, CategoryItems } from './category';
4
4
  export { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain';
@@ -13,9 +13,9 @@ export { JobBase, JobEventType, JobStatus } from './job';
13
13
  export { LanguageCode, Languages, LanguagesISO639part2 } from './language';
14
14
  export { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message';
15
15
  export { NodeFactory, NodeKeys, NodeMetaKeys, Nodes, NodeValueFormatter, NodeValues } from './node';
16
- export { NodeDefCountType, NodeDefType, NodeDefFactory, NodeDefs, NodeDefEntityRenderType, NodeDefFileType, NodeDefTextInputType, NodeDefTextRenderType, FormHeaderColor, } from './nodeDef';
16
+ export { NodeDefCountType, NodeDefExpressionFactory, NodeDefType, NodeDefFactory, NodeDefs, NodeDefEntityRenderType, NodeDefFileType, NodeDefTextInputType, NodeDefTextRenderType, FormHeaderColor, } from './nodeDef';
17
17
  export { NodeDefExpressionEvaluator, NodeDefExpressionValidator } from './nodeDefExpressionEvaluator';
18
- export { NodePointers, RecordCloner, RecordFactory, RecordFixer, Records, RECORD_STEP_DEFAULT, RecordExpressionEvaluator, RecordNodesUpdater, RecordPrettyPrinter, RecordUpdater, RecordUpdateResult, RecordValidator, RecordValidations, } from './record';
18
+ export { NodePointers, RecordCloner, RecordFactory, RecordFixer, Records, RECORD_STEP_DEFAULT, RecordStepAnalysisCode, RecordStepCleansingCode, RecordStepEntryCode, RecordStepNames, RecordSteps, RecordStepsList, RecordExpressionEvaluator, RecordNodesUpdater, RecordPrettyPrinter, RecordUpdater, RecordUpdateResult, RecordValidator, RecordValidations, } from './record';
19
19
  export { ServiceRegistry, ServiceType } from './registry';
20
20
  export { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs';
21
21
  export { NodeDefsFixer, SurveyDocImages, SurveyDocImageFactory, SurveyDocPlace, SurveyDependencyType, SurveyFactory, SurveyFileFactory, SurveyFileType, SurveyRefDataFactory, SurveySecurityProp, Surveys, surveyDocImagePropKeys, surveySecurityDefaults, defaultCycle, } from './survey';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OA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,MAAM,SAAS,CAAA;AAIhB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,kBAAkB,GACnB,MAAM,cAAc,CAAA","sourcesContent":["export type { AppInfo } from './app'\n\nexport { Authorizer, AuthGroupName, UserStatus, Permission, UserTitle, UserFactory, Users } from './auth'\nexport type {\n AuthGroup,\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n AuthToken,\n UserAuthTokenPayload,\n UserAuthTokenService,\n UserPrefs,\n UserPrefSurveys,\n UserProps,\n UserAuthRefreshToken,\n UserAuthRefreshTokenProps,\n UserAuthRefreshTokenPayload,\n UserService,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n UserGroup,\n UserGroupProps,\n UserGroupQualifier,\n UserInvitation,\n} from './auth'\n\nexport { CategoryFactory, CategoryImportColumnType, CategoryItemFactory, CategoryLevelFactory } from './category'\nexport type {\n CategoryItemProps,\n Category,\n CategoryItem,\n CategoryLevel,\n CategoryLevelProps,\n CategoryImportSummary,\n CategoryImportSummaryColumn,\n CategoryItemService,\n CategoryLevelService,\n CategoryProps,\n CategoryService,\n} from './category'\n\nexport { Categories, CategoryItems } from './category'\n\nexport { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain'\nexport type {\n Chain,\n ChainProps,\n ChainService,\n ChainNodeDef,\n ChainNodeDefProps,\n ChainNodeDefService,\n ChainNodeDefAggregate,\n ChainNodeDefAggregateProps,\n} from './chain'\n\nexport { TraverseMethod } from './common'\nexport type { ArenaObject, ArenaService, Dictionary, Factory, I18n } from './common'\n\nexport type { FlatDataExportOptions, 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 { DataQuery, DataQuerySummary, DataQuerySummaryProps } 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 ArrayExpression,\n BinaryExpression,\n CallExpression,\n CompoundExpression,\n ConditionalExpression,\n ExpressionContext,\n ExpressionEvaluator,\n ExpressionFunction,\n ExpressionFunctions,\n AnyExpressionNode,\n ExpressionNode,\n ExpressionNodeEvaluatorConstructor,\n MemberExpression,\n IdentifierExpression,\n LiteralExpression,\n SequenceExpression,\n ThisExpression,\n UnaryExpression,\n} from './expression'\n\nexport { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp'\nexport type { ExtraPropDef, ExtraPropDefs } from './extraProp'\n\nexport { PointFactory, Points } from './geo'\nexport type { AreaOfInterest, AreaOfInterestDescriptor, Point } from './geo'\n\nexport { JobBase, JobEventType, JobStatus } from './job'\nexport type { Job, JobContext, JobEvent, JobSerialized, JobTxClient } from './job'\n\nexport { LanguageCode, Languages, LanguagesISO639part2 } from './language'\nexport type { Labels } from './language'\n\nexport type { Logger } from './logger'\n\nexport type { Message } from './message'\nexport { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message'\n\nexport { NodeFactory, NodeKeys, NodeMetaKeys, Nodes, NodeValueFormatter, NodeValues } from './node'\nexport type {\n ArenaRecordNode,\n Node,\n NodeMeta,\n NodePointer,\n NodeRefData,\n NodeService,\n NodesMap,\n NodeValueCode,\n NodeValueCoordinate,\n NodeValueFile,\n NodeValueTaxon,\n} from './node'\n\nexport {\n NodeDefCountType,\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 { AreaOfInterestProvider, CategoryItemProvider, TaxonProvider } from './nodeDefExpressionEvaluator'\n\nexport type {\n NodeDef,\n NodeDefLayout,\n NodeDefMeta,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefBoolean,\n NodeDefBooleanProps,\n NodeDefCode,\n NodeDefCodeLayout,\n NodeDefCodeProps,\n NodeDefCoordinate,\n NodeDefCoordinateProps,\n NodeDefDate,\n NodeDefDecimal,\n NodeDefDecimalProps,\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n NodeDefFile,\n NodeDefFileProps,\n NodeDefGeo,\n NodeDefGeoProps,\n NodeDefFormHeader,\n NodeDefFormHeaderProps,\n NodeDefInteger,\n NodeDefPropsAdvanced,\n NodeDefTaxon,\n NodeDefTaxonProps,\n NodeDefText,\n NodeDefTextProps,\n NodeDefTextLayout,\n NodeDefTime,\n NodeDefTimeProps,\n NodeDefExpression,\n NodeDefMap,\n NodeDefService,\n NodeDefValidations,\n} from './nodeDef'\n\nexport {\n NodePointers,\n RecordCloner,\n RecordFactory,\n RecordFixer,\n Records,\n RECORD_STEP_DEFAULT,\n RecordExpressionEvaluator,\n RecordNodesUpdater,\n RecordPrettyPrinter,\n RecordUpdater,\n RecordUpdateResult,\n RecordValidator,\n RecordValidations,\n} from './record'\nexport type {\n AttributeValidatorParams,\n AttributesValidatorParams,\n NodeCreateParams,\n NodesUpdateParams,\n ArenaRecord,\n Record,\n RecordExpressionContext,\n RecordExpressionEvaluationContext,\n RecordService,\n RecordUpdateOptions,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './record'\n\nexport { ServiceRegistry, ServiceType } from './registry'\nexport type { ServiceTypeMap } from './registry'\n\nexport { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs'\nexport type { SRS, SRSIndex } 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 Survey,\n SurveyCycle,\n SurveyDependency,\n SurveyDependencyGraph,\n SurveyDocImage,\n SurveyDocImageFactoryParams,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileFactoryParams,\n SurveyFileProps,\n SurveyProps,\n SurveyRefData,\n SurveySecurity,\n SurveyService,\n} from './survey'\n\nexport { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy'\nexport type {\n VernacularNameParams,\n TaxonomyFactoryParams,\n TaxonFactoryParams,\n Taxonomy,\n TaxonomyService,\n VernacularNameProps,\n VernacularName,\n TaxonProps,\n Taxon,\n TaxonomyProps,\n TaxonService,\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 { FileProcessorConstructorArgs, MutationOptions, ParsedVersion } 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 DissocFieldValidationOptions,\n FieldValidator,\n Validation,\n ValidationFields,\n ValidationResult,\n ValidationCounts,\n} from './validation'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,aAAa,EACb,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AAK,EACL,cAAc,EACd,OAAO,EACP,UAAU,EACV,KAAK,EACL,QAAQ,GACT,MAAM,SAAS,CAAA;AAIhB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,kBAAkB,GACnB,MAAM,cAAc,CAAA","sourcesContent":["export type { AppInfo } 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 AuthGroup,\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n AuthToken,\n UserAuthTokenPayload,\n UserAuthTokenService,\n UserPrefs,\n UserPrefSurveys,\n UserProps,\n UserAuthRefreshToken,\n UserAuthRefreshTokenProps,\n UserAuthRefreshTokenPayload,\n UserService,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n UserGroup,\n UserGroupProps,\n UserGroupQualifier,\n UserInvitation,\n} from './auth'\n\nexport { CategoryFactory, CategoryImportColumnType, CategoryItemFactory, CategoryLevelFactory } from './category'\nexport type {\n CategoryItemProps,\n Category,\n CategoryItem,\n CategoryLevel,\n CategoryLevelProps,\n CategoryImportSummary,\n CategoryImportSummaryColumn,\n CategoryItemService,\n CategoryLevelService,\n CategoryProps,\n CategoryService,\n} from './category'\n\nexport { Categories, CategoryItems } from './category'\n\nexport { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain'\nexport type {\n Chain,\n ChainProps,\n ChainService,\n ChainNodeDef,\n ChainNodeDefProps,\n ChainNodeDefService,\n ChainNodeDefAggregate,\n ChainNodeDefAggregateProps,\n} from './chain'\n\nexport { TraverseMethod } from './common'\nexport type { ArenaObject, ArenaService, Dictionary, Factory, I18n } from './common'\n\nexport type { FlatDataExportOptions, 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 { DataQuery, DataQuerySummary, DataQuerySummaryProps } 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 ArrayExpression,\n BinaryExpression,\n CallExpression,\n CompoundExpression,\n ConditionalExpression,\n ExpressionContext,\n ExpressionEvaluator,\n ExpressionFunction,\n ExpressionFunctions,\n AnyExpressionNode,\n ExpressionNode,\n ExpressionNodeEvaluatorConstructor,\n MemberExpression,\n IdentifierExpression,\n LiteralExpression,\n SequenceExpression,\n ThisExpression,\n UnaryExpression,\n} from './expression'\n\nexport { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp'\nexport type { ExtraPropDef, ExtraPropDefs } from './extraProp'\n\nexport { PointFactory, Points } from './geo'\nexport type { AreaOfInterest, AreaOfInterestDescriptor, Point } from './geo'\n\nexport { JobBase, JobEventType, JobStatus } from './job'\nexport type { Job, JobContext, JobEvent, JobSerialized, JobTxClient } from './job'\n\nexport { LanguageCode, Languages, LanguagesISO639part2 } from './language'\nexport type { Labels } from './language'\n\nexport type { Logger } from './logger'\n\nexport type { Message } from './message'\nexport { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message'\n\nexport { NodeFactory, NodeKeys, NodeMetaKeys, Nodes, NodeValueFormatter, NodeValues } from './node'\nexport type {\n ArenaRecordNode,\n Node,\n NodeMeta,\n NodePointer,\n NodeRefData,\n NodeService,\n NodesMap,\n NodeValueCode,\n NodeValueCoordinate,\n NodeValueFile,\n NodeValueTaxon,\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 { AreaOfInterestProvider, CategoryItemProvider, TaxonProvider } from './nodeDefExpressionEvaluator'\n\nexport type {\n NodeDef,\n NodeDefLayout,\n NodeDefMeta,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefBoolean,\n NodeDefBooleanProps,\n NodeDefCode,\n NodeDefCodeLayout,\n NodeDefCodeProps,\n NodeDefCoordinate,\n NodeDefCoordinateProps,\n NodeDefDate,\n NodeDefDecimal,\n NodeDefDecimalProps,\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityLayoutChildItem,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n NodeDefFile,\n NodeDefFileProps,\n NodeDefGeo,\n NodeDefGeoProps,\n NodeDefFormHeader,\n NodeDefFormHeaderProps,\n NodeDefInteger,\n NodeDefPropsAdvanced,\n NodeDefTaxon,\n NodeDefTaxonProps,\n NodeDefText,\n NodeDefTextProps,\n NodeDefTextLayout,\n NodeDefTime,\n NodeDefTimeProps,\n NodeDefCountExpression,\n NodeDefExpression,\n NodeDefExpressionFactoryParams,\n NodeDefMap,\n NodeDefService,\n NodeDefValidations,\n} from './nodeDef'\n\nexport {\n NodePointers,\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 AttributeValidatorParams,\n AttributesValidatorParams,\n NodeCreateParams,\n NodesUpdateParams,\n ArenaRecord,\n Record,\n RecordExpressionContext,\n RecordExpressionEvaluationContext,\n RecordService,\n RecordStep,\n RecordUpdateOptions,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './record'\n\nexport { ServiceRegistry, ServiceType } from './registry'\nexport type { ServiceTypeMap } from './registry'\n\nexport { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs'\nexport type { SRS, SRSIndex } 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 Survey,\n SurveyCycle,\n SurveyDependency,\n SurveyDependencyGraph,\n SurveyDocImage,\n SurveyDocImageFactoryParams,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileFactoryParams,\n SurveyFileProps,\n SurveyNodeDefsIndex,\n SurveyProps,\n SurveyRefData,\n SurveySecurity,\n SurveyService,\n} from './survey'\n\nexport { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy'\nexport type {\n VernacularNameParams,\n TaxonomyFactoryParams,\n TaxonFactoryParams,\n Taxonomy,\n TaxonomyService,\n VernacularNameProps,\n VernacularName,\n TaxonProps,\n Taxon,\n TaxonomyProps,\n TaxonService,\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 { FileProcessorConstructorArgs, MutationOptions, ParsedVersion } 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 DissocFieldValidationOptions,\n FieldValidator,\n Validation,\n ValidationFields,\n ValidationResult,\n ValidationCounts,\n} from './validation'\n"]}
@@ -1,5 +1,5 @@
1
1
  export { NodeDefFactory } from './factory';
2
- export { NodeDefCountType, NodeDefType } from './nodeDef';
2
+ export { NodeDefCountType, NodeDefExpressionFactory, NodeDefType } from './nodeDef';
3
3
  export { NodeDefs } from './nodeDefs';
4
4
  export { NodeDefEntityRenderType } from './types/entity';
5
5
  export { NodeDefFileType } from './types/file';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nodeDef/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAa1C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAuBrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAK9C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAQpD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA","sourcesContent":["export { NodeDefFactory } from './factory'\n\nexport type {\n NodeDef,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefMeta,\n NodeDefPropsAdvanced,\n NodeDefExpression,\n NodeDefLayout,\n NodeDefValidations,\n NodeDefMap,\n} from './nodeDef'\nexport { NodeDefCountType, NodeDefType } from './nodeDef'\nexport { NodeDefs } from './nodeDefs'\n\nexport type { NodeDefService } from './service'\n\n// ==== node def types\nexport type { NodeDefBoolean, NodeDefBooleanProps } from './types/boolean'\n\nexport type { NodeDefCode, NodeDefCodeLayout, NodeDefCodeProps } from './types/code'\n\nexport type { NodeDefCoordinate, NodeDefCoordinateProps } from './types/coordinate'\n\nexport type { NodeDefDate } from './types/date'\n\nexport type { NodeDefDecimal, NodeDefDecimalProps } from './types/decimal'\n\nexport type {\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n} from './types/entity'\n\nexport { NodeDefEntityRenderType } from './types/entity'\n\nexport { NodeDefFileType } from './types/file'\nexport type { NodeDefFile, NodeDefFileProps } from './types/file'\n\nexport type { NodeDefGeo, NodeDefGeoProps } from './types/geo'\n\nexport { FormHeaderColor } from './types/formHeader'\nexport type { NodeDefFormHeader, NodeDefFormHeaderProps } from './types/formHeader'\n\nexport type { NodeDefInteger } from './types/integer'\n\nexport type { NodeDefTaxon, NodeDefTaxonProps } from './types/taxon'\n\nexport type { NodeDefText, NodeDefTextProps, NodeDefTextLayout } from './types/text'\nexport { NodeDefTextRenderType, NodeDefTextInputType } from './types/text'\n\nexport type { NodeDefTime, NodeDefTimeProps } from './types/time'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nodeDef/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAe1C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwBrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAK9C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAQpD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA","sourcesContent":["export { NodeDefFactory } from './factory'\n\nexport type {\n NodeDef,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefMeta,\n NodeDefPropsAdvanced,\n NodeDefExpression,\n NodeDefLayout,\n NodeDefValidations,\n NodeDefMap,\n NodeDefCountExpression,\n NodeDefExpressionFactoryParams,\n} from './nodeDef'\nexport { NodeDefCountType, NodeDefExpressionFactory, NodeDefType } from './nodeDef'\nexport { NodeDefs } from './nodeDefs'\n\nexport type { NodeDefService } from './service'\n\n// ==== node def types\nexport type { NodeDefBoolean, NodeDefBooleanProps } from './types/boolean'\n\nexport type { NodeDefCode, NodeDefCodeLayout, NodeDefCodeProps } from './types/code'\n\nexport type { NodeDefCoordinate, NodeDefCoordinateProps } from './types/coordinate'\n\nexport type { NodeDefDate } from './types/date'\n\nexport type { NodeDefDecimal, NodeDefDecimalProps } from './types/decimal'\n\nexport type {\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityLayoutChildItem,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n} from './types/entity'\n\nexport { NodeDefEntityRenderType } from './types/entity'\n\nexport { NodeDefFileType } from './types/file'\nexport type { NodeDefFile, NodeDefFileProps } from './types/file'\n\nexport type { NodeDefGeo, NodeDefGeoProps } from './types/geo'\n\nexport { FormHeaderColor } from './types/formHeader'\nexport type { NodeDefFormHeader, NodeDefFormHeaderProps } from './types/formHeader'\n\nexport type { NodeDefInteger } from './types/integer'\n\nexport type { NodeDefTaxon, NodeDefTaxonProps } from './types/taxon'\n\nexport type { NodeDefText, NodeDefTextProps, NodeDefTextLayout } from './types/text'\nexport { NodeDefTextRenderType, NodeDefTextInputType } from './types/text'\n\nexport type { NodeDefTime, NodeDefTimeProps } from './types/time'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"nodeDef.js","sourceRoot":"","sources":["../../../src/nodeDef/nodeDef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAKzC,MAAM,CAAN,IAAY,WAeX;AAfD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,kBAAkB;IAClB,wCAAyB,CAAA;AAC3B,CAAC,EAfW,WAAW,KAAX,WAAW,QAetB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;AACb,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAoDD,MAAM,CAAC,MAAM,wBAAwB,GAA+D;IAClG,cAAc,EAAE,CAAC,MAAsC,EAAqB,EAAE;QAC5E,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAA;QACnC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,mBAAM,MAAM,EAAG,CAAC,CAAA;QAC9D,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA","sourcesContent":["import { Objects, UUIDs } from '../utils'\nimport { ArenaObject, Factory } from '../common'\nimport { Labels } from '../language'\nimport { ValidationSeverity } from '../validation'\n\nexport enum NodeDefType {\n boolean = 'boolean',\n code = 'code',\n coordinate = 'coordinate',\n date = 'date',\n decimal = 'decimal',\n geo = 'geo',\n entity = 'entity',\n file = 'file',\n integer = 'integer',\n taxon = 'taxon',\n text = 'text',\n time = 'time',\n // layout elements\n formHeader = 'formHeader',\n}\n\nexport enum NodeDefCountType {\n max = 'max',\n min = 'min',\n}\n\nexport interface NodeDefMeta {\n h: string[]\n}\n\nexport interface NodeDefProps {\n cycles?: string[]\n descriptions?: Labels\n key?: boolean\n autoIncrementalKey?: boolean\n labels?: Labels\n multiple?: boolean\n name?: string\n qualifier?: boolean\n readOnly?: boolean\n\n // available only when readOnly is true\n hidden?: boolean\n\n visibleFields?: string[]\n}\n\nexport interface NodeDefLayout {\n hiddenWhenNotRelevant?: boolean\n hiddenInMobile?: boolean\n includedInMultipleEntitySummary?: boolean\n includedInPreviousCycleLink?: boolean\n // code\n codeShown?: boolean\n}\n\nexport interface NodeDefPropsWithLayout<L extends NodeDefLayout> extends NodeDefProps {\n layout?: {\n [cycleKey: string]: L\n }\n}\n\nexport interface NodeDefExpression {\n applyIf?: string\n expression?: string\n messages?: Labels\n severity?: ValidationSeverity\n uuid: string\n}\n\nexport interface NodeDefExpressionFactoryParams {\n applyIf?: string\n expression: string\n severity?: ValidationSeverity\n}\n\nexport const NodeDefExpressionFactory: Factory<NodeDefExpression, NodeDefExpressionFactoryParams> = {\n createInstance: (params: NodeDefExpressionFactoryParams): NodeDefExpression => {\n const result = { uuid: UUIDs.v4() }\n Object.assign(result, Objects.deleteEmptyProps({ ...params }))\n return result\n },\n}\n\nexport type NodeDefCountExpression = string | NodeDefExpression[]\n\nexport interface NodeDefCountValidations {\n max?: NodeDefCountExpression\n min?: NodeDefCountExpression\n}\n\nexport interface NodeDefValidations {\n count?: NodeDefCountValidations\n expressions?: NodeDefExpression[]\n required?: boolean\n /**\n * Conditions making a single attribute required (alternative to `required`, which makes it always required).\n */\n requiredIf?: NodeDefExpression[]\n unique?: boolean\n}\n\nexport interface NodeDefPropsAdvanced {\n applicable?: NodeDefExpression[]\n defaultValues?: NodeDefExpression[]\n defaultValueEvaluatedOneTime?: boolean\n editableIf?: NodeDefExpression[]\n excludedInClone?: boolean\n formula?: NodeDefExpression[]\n validations?: NodeDefValidations\n visibleIf?: NodeDefExpression[]\n // file attribute\n fileNameExpression?: string\n // enumerate entity\n enumeratingItemsExpression?: string\n // code and taxon attribute\n itemsFilter?: string\n\n // Analysis\n script?: string\n chainUuid?: string\n index?: number\n active?: boolean\n aggregateFunctions?: { [key: string]: object }\n\n isBaseUnit?: boolean\n isSampling?: boolean\n hasAreaBasedEstimated?: boolean\n areaBasedEstimatedOf?: string // uuid of area based estimated node def\n}\n\nexport interface NodeDef<T extends NodeDefType, P extends NodeDefProps = NodeDefProps> extends ArenaObject<P> {\n analysis?: boolean\n dateCreated?: string\n dateModified?: string\n deleted?: boolean\n draft?: boolean\n id?: number\n meta: NodeDefMeta\n parentUuid?: string\n propsAdvanced?: NodeDefPropsAdvanced\n propsAdvancedDraft?: NodeDefPropsAdvanced\n published?: boolean\n temporary?: boolean\n type: T\n virtual?: boolean\n}\n\nexport interface NodeDefMap {\n [key: string]: NodeDef<any>\n}\n"]}
1
+ {"version":3,"file":"nodeDef.js","sourceRoot":"","sources":["../../../src/nodeDef/nodeDef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAKzC,MAAM,CAAN,IAAY,WAeX;AAfD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,kBAAkB;IAClB,wCAAyB,CAAA;AAC3B,CAAC,EAfW,WAAW,KAAX,WAAW,QAetB;AAED,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;AACb,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAqDD,MAAM,CAAC,MAAM,wBAAwB,GAA+D;IAClG,cAAc,EAAE,CAAC,MAAsC,EAAqB,EAAE;QAC5E,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,EAAE,CAAA;QACnC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,mBAAM,MAAM,EAAG,CAAC,CAAA;QAC9D,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA","sourcesContent":["import { Objects, UUIDs } from '../utils'\nimport { ArenaObject, Factory } from '../common'\nimport { Labels } from '../language'\nimport { ValidationSeverity } from '../validation'\n\nexport enum NodeDefType {\n boolean = 'boolean',\n code = 'code',\n coordinate = 'coordinate',\n date = 'date',\n decimal = 'decimal',\n geo = 'geo',\n entity = 'entity',\n file = 'file',\n integer = 'integer',\n taxon = 'taxon',\n text = 'text',\n time = 'time',\n // layout elements\n formHeader = 'formHeader',\n}\n\nexport enum NodeDefCountType {\n max = 'max',\n min = 'min',\n}\n\nexport interface NodeDefMeta {\n h: string[]\n}\n\nexport interface NodeDefProps {\n cycles?: string[]\n descriptions?: Labels\n key?: boolean\n autoIncrementalKey?: boolean\n labels?: Labels\n multiple?: boolean\n name?: string\n qualifier?: boolean\n readOnly?: boolean\n\n // available only when readOnly is true\n hidden?: boolean\n\n visibleFields?: string[]\n}\n\nexport interface NodeDefLayout {\n hiddenWhenNotRelevant?: boolean\n hiddenInMobile?: boolean\n includedInMultipleEntitySummary?: boolean\n includedInPreviousCycleLink?: boolean\n // code\n codeShown?: boolean\n}\n\nexport interface NodeDefPropsWithLayout<L extends NodeDefLayout> extends NodeDefProps {\n layout?: {\n [cycleKey: string]: L\n }\n}\n\nexport interface NodeDefExpression {\n applyIf?: string\n expression?: string\n messages?: Labels\n severity?: ValidationSeverity\n uuid: string\n}\n\nexport interface NodeDefExpressionFactoryParams {\n applyIf?: string\n expression?: string\n messages?: Labels\n severity?: ValidationSeverity\n}\n\nexport const NodeDefExpressionFactory: Factory<NodeDefExpression, NodeDefExpressionFactoryParams> = {\n createInstance: (params: NodeDefExpressionFactoryParams): NodeDefExpression => {\n const result = { uuid: UUIDs.v4() }\n Object.assign(result, Objects.deleteEmptyProps({ ...params }))\n return result\n },\n}\n\nexport type NodeDefCountExpression = string | NodeDefExpression[]\n\nexport interface NodeDefCountValidations {\n max?: NodeDefCountExpression\n min?: NodeDefCountExpression\n}\n\nexport interface NodeDefValidations {\n count?: NodeDefCountValidations\n expressions?: NodeDefExpression[]\n required?: boolean\n /**\n * Conditions making a single attribute required (alternative to `required`, which makes it always required).\n */\n requiredIf?: NodeDefExpression[]\n unique?: boolean\n}\n\nexport interface NodeDefPropsAdvanced {\n applicable?: NodeDefExpression[]\n defaultValues?: NodeDefExpression[]\n defaultValueEvaluatedOneTime?: boolean\n editableIf?: NodeDefExpression[]\n excludedInClone?: boolean\n formula?: NodeDefExpression[]\n validations?: NodeDefValidations\n visibleIf?: NodeDefExpression[]\n // file attribute\n fileNameExpression?: string\n // enumerate entity\n enumeratingItemsExpression?: string\n // code and taxon attribute\n itemsFilter?: string\n\n // Analysis\n script?: string\n chainUuid?: string\n index?: number\n active?: boolean\n aggregateFunctions?: { [key: string]: object }\n\n isBaseUnit?: boolean\n isSampling?: boolean\n hasAreaBasedEstimated?: boolean\n areaBasedEstimatedOf?: string // uuid of area based estimated node def\n}\n\nexport interface NodeDef<T extends NodeDefType, P extends NodeDefProps = NodeDefProps> extends ArenaObject<P> {\n analysis?: boolean\n dateCreated?: string\n dateModified?: string\n deleted?: boolean\n draft?: boolean\n id?: number\n meta: NodeDefMeta\n parentUuid?: string\n propsAdvanced?: NodeDefPropsAdvanced\n propsAdvancedDraft?: NodeDefPropsAdvanced\n published?: boolean\n temporary?: boolean\n type: T\n virtual?: boolean\n}\n\nexport interface NodeDefMap {\n [key: string]: NodeDef<any>\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../../src/nodeDef/types/entity.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;IACb,0CAAe,CAAA;AACjB,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC","sourcesContent":["import { NodeDef, NodeDefLayout, NodeDefPropsWithLayout, NodeDefType } from '../nodeDef'\n\nexport interface NodeDefEntityChildPosition {\n h?: number\n i: string\n moved?: boolean\n static?: number\n w?: number\n x: number\n y: number\n}\n\nexport type NodeDefEntityLayoutChildItem = NodeDefEntityChildPosition | string\n\nexport type NodeDefPrintOrientation = 'portrait' | 'landscape'\n\nexport interface NodeDefEntityProps extends NodeDefPropsWithLayout<NodeDefEntityLayout> {\n // Applies only to multiple entities; when true, missing repetitions up to min count are auto-created.\n autoCreateMinCountItems?: boolean\n enumerate?: boolean\n /** When set, printable export uses this orientation for the entity's print section. */\n printOrientation?: NodeDefPrintOrientation\n}\n\nexport enum NodeDefEntityRenderType {\n form = 'form',\n table = 'table',\n}\n\nexport interface NodeDefEntityLayout extends NodeDefLayout {\n columnsNo?: number\n indexChildren?: string[] // sorted children pages uuids\n layoutChildren?: NodeDefEntityLayoutChildItem[]\n pageUuid?: string\n renderType: NodeDefEntityRenderType\n}\n\nexport type NodeDefEntity = NodeDef<NodeDefType.entity, NodeDefEntityProps>\n"]}
1
+ {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../../src/nodeDef/types/entity.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;IACb,0CAAe,CAAA;AACjB,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC","sourcesContent":["import { NodeDef, NodeDefLayout, NodeDefPropsWithLayout, NodeDefType } from '../nodeDef'\n\nexport interface NodeDefEntityChildPosition {\n h?: number\n i: string\n maxH?: number\n minH?: number\n minW?: number\n moved?: boolean\n static?: number\n w?: number\n x: number\n y: number\n}\n\nexport type NodeDefEntityLayoutChildItem = NodeDefEntityChildPosition | string\n\nexport type NodeDefPrintOrientation = 'portrait' | 'landscape'\n\nexport interface NodeDefEntityProps extends NodeDefPropsWithLayout<NodeDefEntityLayout> {\n // Applies only to multiple entities; when true, missing repetitions up to min count are auto-created.\n autoCreateMinCountItems?: boolean\n enumerate?: boolean\n /** When set, printable export uses this orientation for the entity's print section. */\n printOrientation?: NodeDefPrintOrientation\n}\n\nexport enum NodeDefEntityRenderType {\n form = 'form',\n table = 'table',\n}\n\nexport interface NodeDefEntityLayout extends NodeDefLayout {\n columnsNo?: number\n indexChildren?: string[] // sorted children pages uuids\n layoutChildren?: NodeDefEntityLayoutChildItem[]\n pageUuid?: string\n renderType: NodeDefEntityRenderType\n}\n\nexport type NodeDefEntity = NodeDef<NodeDefType.entity, NodeDefEntityProps>\n"]}
@@ -1,5 +1,6 @@
1
1
  export { NodePointers } from './nodePointers';
2
2
  export { RECORD_STEP_DEFAULT } from './record';
3
+ export { RecordStepAnalysisCode, RecordStepCleansingCode, RecordStepEntryCode, RecordStepNames, RecordSteps, RecordStepsList, } from './recordStep';
3
4
  export { Records } from './records';
4
5
  export { RecordCloner } from './recordCloner';
5
6
  export { RecordExpressionEvaluator } from './recordExpressionEvaluator';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/record/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAOnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAGzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA","sourcesContent":["export { NodePointers } from './nodePointers'\n\nexport type { ArenaRecord, Record } from './record'\nexport { RECORD_STEP_DEFAULT } from './record'\n\nexport { Records } from './records'\nexport type { RecordUpdateOptions } from './records'\n\nexport { RecordCloner } from './recordCloner'\nexport { RecordExpressionEvaluator } from './recordExpressionEvaluator'\nexport type { RecordExpressionContext } from './recordExpressionEvaluator'\nexport { RecordFixer } from './recordFixer'\nexport { RecordNodesUpdater, RecordUpdateResult } from './recordNodesUpdater'\nexport type { NodeCreateParams, NodesUpdateParams, RecordExpressionEvaluationContext } from './recordNodesUpdater'\nexport { RecordUpdater } from './recordUpdater'\nexport { RecordValidator } from './recordValidator'\nexport type {\n AttributeValidatorParams,\n AttributesValidatorParams,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './recordValidator'\nexport { RecordValidations } from './recordValidations'\n\nexport { RecordFactory } from './factory'\nexport type { RecordService } from './service'\n\nexport { RecordPrettyPrinter } from './recordPrettyPrinter'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/record/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAG9C,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,eAAe,GAChB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAEvE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE7E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAOnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAGzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA","sourcesContent":["export { NodePointers } from './nodePointers'\n\nexport type { ArenaRecord, Record } from './record'\nexport { RECORD_STEP_DEFAULT } from './record'\n\nexport type { RecordStep } from './recordStep'\nexport {\n RecordStepAnalysisCode,\n RecordStepCleansingCode,\n RecordStepEntryCode,\n RecordStepNames,\n RecordSteps,\n RecordStepsList,\n} from './recordStep'\n\nexport { Records } from './records'\nexport type { RecordUpdateOptions } from './records'\n\nexport { RecordCloner } from './recordCloner'\nexport { RecordExpressionEvaluator } from './recordExpressionEvaluator'\nexport type { RecordExpressionContext } from './recordExpressionEvaluator'\nexport { RecordFixer } from './recordFixer'\nexport { RecordNodesUpdater, RecordUpdateResult } from './recordNodesUpdater'\nexport type { NodeCreateParams, NodesUpdateParams, RecordExpressionEvaluationContext } from './recordNodesUpdater'\nexport { RecordUpdater } from './recordUpdater'\nexport { RecordValidator } from './recordValidator'\nexport type {\n AttributeValidatorParams,\n AttributesValidatorParams,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './recordValidator'\nexport { RecordValidations } from './recordValidations'\n\nexport { RecordFactory } from './factory'\nexport type { RecordService } from './service'\n\nexport { RecordPrettyPrinter } from './recordPrettyPrinter'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/survey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAiB/D,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAMzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA","sourcesContent":["export { NodeDefsFixer } from './nodeDefsFixer'\nexport { SurveyDocImages } from './surveyDocImages'\nexport { SurveyFileFactory, SurveyFileType } from './surveyFileFactory'\nexport { SurveyDocImageFactory } from './surveyDocImageFactory'\nexport type { SurveyFileFactoryParams } from './surveyFileFactory'\nexport type { SurveyDocImageFactoryParams } from './surveyDocImageFactory'\n\nexport type {\n Survey,\n SurveyCycle,\n SurveyDependencyGraph,\n SurveyDependency,\n SurveyDocImage,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileProps,\n SurveyProps,\n SurveySecurity,\n} from './survey'\n\nexport {\n defaultCycle,\n SurveyDependencyType,\n SurveyDocPlace,\n SurveySecurityProp,\n surveyDocImagePropKeys,\n surveySecurityDefaults,\n} from './survey'\n\nexport { Surveys } from './surveys'\n\nexport { SurveyFactory } from './factory'\n\nexport type { SurveyService } from './service'\n\nexport type { SurveyRefData } from './refData'\n\nexport { SurveyRefDataFactory } from './refData'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/survey/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAkB/D,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAMzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA","sourcesContent":["export { NodeDefsFixer } from './nodeDefsFixer'\nexport { SurveyDocImages } from './surveyDocImages'\nexport { SurveyFileFactory, SurveyFileType } from './surveyFileFactory'\nexport { SurveyDocImageFactory } from './surveyDocImageFactory'\nexport type { SurveyFileFactoryParams } from './surveyFileFactory'\nexport type { SurveyDocImageFactoryParams } from './surveyDocImageFactory'\n\nexport type {\n Survey,\n SurveyCycle,\n SurveyDependencyGraph,\n SurveyDependency,\n SurveyDocImage,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileProps,\n SurveyNodeDefsIndex,\n SurveyProps,\n SurveySecurity,\n} from './survey'\n\nexport {\n defaultCycle,\n SurveyDependencyType,\n SurveyDocPlace,\n SurveySecurityProp,\n surveyDocImagePropKeys,\n surveySecurityDefaults,\n} from './survey'\n\nexport { Surveys } from './surveys'\n\nexport { SurveyFactory } from './factory'\n\nexport type { SurveyService } from './service'\n\nexport type { SurveyRefData } from './refData'\n\nexport { SurveyRefDataFactory } from './refData'\n"]}
@@ -13,6 +13,7 @@ export var DateFormats;
13
13
  DateFormats["timeStorage"] = "HH:mm";
14
14
  DateFormats["timeWithSeconds"] = "HH:mm:ss";
15
15
  DateFormats["datetimeDefault"] = "YYYY-MM-DD_HH-mm-ss";
16
+ DateFormats["datetimeExport"] = "YYYY-MM-DD HH:mm:ss";
16
17
  })(DateFormats || (DateFormats = {}));
17
18
  export var UnitOfTime;
18
19
  (function (UnitOfTime) {
@@ -1 +1 @@
1
- {"version":3,"file":"dates.js","sourceRoot":"","sources":["../../../src/utils/dates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OA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AAU,CAAC,KAAK,CAAC,CAAA;AAC5F,MAAM,SAAS,GAAG,CAAC,IAAc,EAAE,KAAa,EAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;AAC9F,MAAM,QAAQ,GAAG,CAAC,IAAc,EAAE,KAAa,EAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAA;AAE5F;;GAEG;AACH,MAAM,iBAAiB,GAAG,GAAW,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAA;AAEtE,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,OAAO;IACP,QAAQ;IACR,WAAW;IACX,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;IACX,sBAAsB;IACtB,yBAAyB;IACzB,WAAW;IACX,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,mBAAmB;IACnB,KAAK;IACL,QAAQ;IACR,iBAAiB;IACjB,GAAG;IACH,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,GAAG;IACH,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,aAAa;IACb,aAAa;IACb,WAAW;IACX,UAAU;IACV,WAAW;IACX,YAAY;IACZ,WAAW;CACZ,CAAA","sourcesContent":["import dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\nimport utc from 'dayjs/plugin/utc'\nimport { Objects } from './_objects'\n\ndayjs.extend(customParseFormat)\ndayjs.extend(utc)\n\nexport enum DateFormats {\n dateDisplay = 'DD/MM/YYYY',\n dateStorage = 'YYYY-MM-DD',\n datetimeDisplay = 'DD/MM/YYYY HH:mm:ss',\n datetimeStorage = 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]', // ISO\n timeStorage = 'HH:mm',\n timeWithSeconds = 'HH:mm:ss',\n datetimeDefault = 'YYYY-MM-DD_HH-mm-ss',\n}\n\nexport enum UnitOfTime {\n years = 'years',\n months = 'months',\n weeks = 'weeks',\n days = 'days',\n hours = 'hours',\n minutes = 'minutes',\n seconds = 'seconds',\n}\n\ntype DateType = Date | number | string\n\nconst format = (date: number | Date | undefined, format: string): string => (date ? dayjs(date).format(format) : '')\n\n/**\n * Like `format`, but renders in UTC instead of the machine's local time zone.\n * Use this when formatting a `Date` produced by `parse`/`parseZone`-style parsing, whose\n * underlying timestamp already encodes the source digits as if they were UTC (see `parse`) -\n * formatting with the local-time `format` above would silently re-shift them by the host's offset.\n */\nconst formatUTC = (date: number | Date | undefined, format: string): string =>\n date ? dayjs.utc(date).format(format) : ''\n\nconst formatForStorage = (date: DateType): string => new Date(date).toISOString()\nconst formatForExpression = (date: DateType): string => format(new Date(date), DateFormats.datetimeDefault)\n\nconst nowFormattedForStorage = (): string => formatForStorage(new Date())\nconst nowFormattedForExpression = (): string => formatForExpression(Date.now())\n\n// ISO date or date time: YYYY-MM-DD[THH:mm[:ss[.SSS]]][Z|±HH:mm]\nconst ISO_OFFSET_REGEX = /(?:Z|[+-]\\d{2}:?\\d{2})$/\nconst ISO_DATE_REGEX = /^(\\d{4})-(\\d{2})-(\\d{2})$/\nconst ISO_TIME_REGEX = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d+)?)?$/\n\nconst invalidDate = (): Date => new Date(Number.NaN)\n\n/**\n * Parses an ISO date (or date time) string; values like 2020-02-30 are not valid (they are not moved to the next month).\n * Date only strings and date times without offset are read as UTC.\n */\nconst parseISOStrict = (dateStr: string): Date => {\n const dateTimeStr = dateStr.replace(ISO_OFFSET_REGEX, '')\n const [datePart, timePart, ...otherParts] = dateTimeStr.split(/[T ]/)\n if (otherParts.length > 0) return invalidDate()\n\n const dateMatch = ISO_DATE_REGEX.exec(datePart)\n if (!dateMatch) return invalidDate()\n const [, year, month, day] = dateMatch\n if (!isValidDate(year, month, day)) return invalidDate()\n\n if (timePart !== undefined) {\n const timeMatch = ISO_TIME_REGEX.exec(timePart)\n if (!timeMatch) return invalidDate()\n const [, hours, minutes, seconds] = timeMatch\n if (!isValidTime(hours, minutes, seconds ?? 0)) return invalidDate()\n }\n return dayjs.utc(dateStr).toDate()\n}\n\nconst parseISO = (dateStr: string): Date | undefined => (dateStr ? dayjs(dateStr).toDate() : undefined)\nconst parse = (\n dateStr: string,\n format: DateFormats,\n { keepTimeZone = true, strict = false } = {}\n): Date | undefined => {\n if (!dateStr) return undefined\n // ISO strings without an explicit offset (e.g. date only) are read as UTC, like the other formats with keepTimeZone\n if (format == DateFormats.datetimeStorage) return parseISOStrict(dateStr)\n // keepTimeZone: the formats don't contain any time zone offset, so the digits are read as UTC\n if (keepTimeZone) return dayjs.utc(dateStr, format, strict).toDate()\n return dayjs(dateStr, format, strict).toDate()\n}\n\nconst isValidDateObject = (date: Date | undefined): boolean => !!date && dayjs(date).isValid()\n\nconst isValidDateInFormat = (dateStr: string, format: DateFormats) => {\n const parsed = parse(dateStr, format, { strict: true })\n return isValidDateObject(parsed)\n}\n\nconst convertDate = (params: {\n dateStr: string\n formatFrom?: DateFormats\n formatTo: DateFormats\n keepTimeZone?: boolean\n}): string | undefined => {\n const { dateStr, formatFrom = DateFormats.dateStorage, formatTo, keepTimeZone = true } = params\n if (Objects.isEmpty(dateStr)) return undefined\n\n const dateParsed = parse(dateStr, formatFrom, { keepTimeZone })\n if (!dateParsed || !dayjs(dateParsed).isValid()) {\n return undefined\n }\n // with keepTimeZone the parsed date encodes the source digits as if they were UTC (see parse/parseZone):\n // format it in UTC too, otherwise the digits would be shifted by the time zone of this machine\n return keepTimeZone ? formatUTC(dateParsed, formatTo) : format(dateParsed, formatTo)\n}\n\n/**\n * Checks if the date is valid. Takes into account leap years\n * (i.e. 2015/2/29 is not valid).\n */\nconst isValidDate = (year: any, month: any, day: any): boolean => {\n if (Objects.isEmpty(year) || Objects.isEmpty(month) || Objects.isEmpty(day)) {\n return false\n }\n\n const date = new Date(year, month - 1, day)\n\n return (\n dayjs(date).isValid() &&\n date.getFullYear() === Number(year) &&\n date.getMonth() + 1 === Number(month) &&\n date.getDate() === Number(day)\n )\n}\n\nconst isValidTime = (hour: any = '', minutes: any = '', seconds: any = 0): boolean => {\n if (Objects.isEmpty(hour) || Objects.isEmpty(minutes)) return false\n if (!(Number(hour) >= 0 && Number(hour) < 24 && Number(minutes) >= 0 && Number(minutes) < 60)) return false\n return Number(seconds) >= 0 && Number(seconds) < 60\n}\n\nconst toDate = (date: DateType): Date | undefined => {\n if (Objects.isEmpty(date)) return undefined\n if (date instanceof Date) return date\n if (typeof date === 'string') return parseISO(date)\n if (typeof date === 'number') return new Date(date)\n return undefined\n}\n\nconst isAfter = (date: DateType, dateToCompare: DateType): boolean => {\n const _date = toDate(date)\n const _dateToCompare = toDate(dateToCompare)\n if (!_date || !_dateToCompare) return false\n return dayjs(_date).isAfter(dayjs(_dateToCompare))\n}\n\nconst isBefore = (date: DateType, dateToCompare: DateType): boolean => {\n const _date = toDate(date)\n const _dateToCompare = toDate(dateToCompare)\n if (!_date || !_dateToCompare) return false\n return dayjs(_date).isBefore(dayjs(_dateToCompare))\n}\n\nconst add = (date: DateType, value: number, unit: UnitOfTime): Date => dayjs(date).add(value, unit).toDate()\nconst addSeconds = (date: DateType, value: number): Date => add(date, value, UnitOfTime.seconds)\nconst addMinutes = (date: DateType, value: number): Date => add(date, value, UnitOfTime.minutes)\nconst addHours = (date: DateType, value: number): Date => add(date, value, UnitOfTime.hours)\nconst addDays = (date: DateType, value: number): Date => add(date, value, UnitOfTime.days)\nconst addWeeks = (date: DateType, value: number): Date => add(date, value, UnitOfTime.weeks)\nconst addMonths = (date: DateType, value: number): Date => add(date, value, UnitOfTime.months)\nconst addYears = (date: DateType, value: number): Date => add(date, value, UnitOfTime.years)\n\nconst diff = (dateA: DateType, dateB: DateType, unit: UnitOfTime, precise?: boolean): number =>\n dayjs(dateA).diff(dayjs(dateB), unit, precise)\nconst diffInSeconds = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.seconds)\nconst diffInMinutes = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.minutes)\nconst diffInHours = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.hours)\nconst diffInDays = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.days)\nconst diffInWeeks = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.weeks)\nconst diffInMonths = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.months)\nconst diffInYears = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.years)\n\nconst sub = (date: DateType, value: number, unit: UnitOfTime): Date => dayjs(date).subtract(value, unit).toDate()\nconst subSeconds = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.seconds)\nconst subMinutes = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.minutes)\nconst subHours = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.hours)\nconst subDays = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.days)\nconst subWeeks = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.weeks)\nconst subMonths = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.months)\nconst subYears = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.years)\n\n/**\n * Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).\n */\nconst getTimezoneOffset = (): number => new Date().getTimezoneOffset()\n\nexport const Dates = {\n isAfter,\n isBefore,\n isValidDate,\n isValidDateInFormat,\n isValidDateObject,\n isValidTime,\n nowFormattedForStorage,\n nowFormattedForExpression,\n convertDate,\n format,\n formatUTC,\n formatForStorage,\n formatForExpression,\n parse,\n parseISO,\n getTimezoneOffset,\n add,\n addSeconds,\n addMinutes,\n addHours,\n addDays,\n addWeeks,\n addMonths,\n addYears,\n sub,\n subSeconds,\n subMinutes,\n subHours,\n subDays,\n subWeeks,\n subMonths,\n subYears,\n diff,\n diffInSeconds,\n diffInMinutes,\n diffInHours,\n diffInDays,\n diffInWeeks,\n diffInMonths,\n diffInYears,\n}\n"]}
1
+ {"version":3,"file":"dates.js","sourceRoot":"","sources":["../../../src/utils/dates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,iBAAiB,MAAM,gCAAgC,CAAA;AAC9D,OAAO,GAAG,MAAM,kBAAkB,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAA;AAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAEjB,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,yCAA0B,CAAA;IAC1B,yCAA0B,CAAA;IAC1B,sDAAuC,CAAA;IACvC,+DAAgD,CAAA;IAChD,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,sDAAuC,CAAA;IACvC,qDAAsC,CAAA;AACxC,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,CAAN,IAAY,UAQX;AARD,WAAY,UAAU;IACpB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;AACrB,CAAC,EARW,UAAU,KAAV,UAAU,QAQrB;AAID,MAAM,MAAM,GAAG,CAAC,IAA+B,EAAE,MAAc,EAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AAEpH;;;;;GAKG;AACH,MAAM,SAAS,GAAG,CAAC,IAA+B,EAAE,MAAc,EAAU,EAAE,CAC5E,IAAI,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ormat from 'dayjs/plugin/customParseFormat'\nimport utc from 'dayjs/plugin/utc'\nimport { Objects } from './_objects'\n\ndayjs.extend(customParseFormat)\ndayjs.extend(utc)\n\nexport enum DateFormats {\n dateDisplay = 'DD/MM/YYYY',\n dateStorage = 'YYYY-MM-DD',\n datetimeDisplay = 'DD/MM/YYYY HH:mm:ss',\n datetimeStorage = 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]', // ISO\n timeStorage = 'HH:mm',\n timeWithSeconds = 'HH:mm:ss',\n datetimeDefault = 'YYYY-MM-DD_HH-mm-ss',\n datetimeExport = 'YYYY-MM-DD HH:mm:ss', // exported files (e.g. CSV)\n}\n\nexport enum UnitOfTime {\n years = 'years',\n months = 'months',\n weeks = 'weeks',\n days = 'days',\n hours = 'hours',\n minutes = 'minutes',\n seconds = 'seconds',\n}\n\ntype DateType = Date | number | string\n\nconst format = (date: number | Date | undefined, format: string): string => (date ? dayjs(date).format(format) : '')\n\n/**\n * Like `format`, but renders in UTC instead of the machine's local time zone.\n * Use this when formatting a `Date` produced by `parse`/`parseZone`-style parsing, whose\n * underlying timestamp already encodes the source digits as if they were UTC (see `parse`) -\n * formatting with the local-time `format` above would silently re-shift them by the host's offset.\n */\nconst formatUTC = (date: number | Date | undefined, format: string): string =>\n date ? dayjs.utc(date).format(format) : ''\n\nconst formatForStorage = (date: DateType): string => new Date(date).toISOString()\nconst formatForExpression = (date: DateType): string => format(new Date(date), DateFormats.datetimeDefault)\n\nconst nowFormattedForStorage = (): string => formatForStorage(new Date())\nconst nowFormattedForExpression = (): string => formatForExpression(Date.now())\n\n// ISO date or date time: YYYY-MM-DD[THH:mm[:ss[.SSS]]][Z|±HH:mm]\nconst ISO_OFFSET_REGEX = /(?:Z|[+-]\\d{2}:?\\d{2})$/\nconst ISO_DATE_REGEX = /^(\\d{4})-(\\d{2})-(\\d{2})$/\nconst ISO_TIME_REGEX = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d+)?)?$/\n\nconst invalidDate = (): Date => new Date(Number.NaN)\n\n/**\n * Parses an ISO date (or date time) string; values like 2020-02-30 are not valid (they are not moved to the next month).\n * Date only strings and date times without offset are read as UTC.\n */\nconst parseISOStrict = (dateStr: string): Date => {\n const dateTimeStr = dateStr.replace(ISO_OFFSET_REGEX, '')\n const [datePart, timePart, ...otherParts] = dateTimeStr.split(/[T ]/)\n if (otherParts.length > 0) return invalidDate()\n\n const dateMatch = ISO_DATE_REGEX.exec(datePart)\n if (!dateMatch) return invalidDate()\n const [, year, month, day] = dateMatch\n if (!isValidDate(year, month, day)) return invalidDate()\n\n if (timePart !== undefined) {\n const timeMatch = ISO_TIME_REGEX.exec(timePart)\n if (!timeMatch) return invalidDate()\n const [, hours, minutes, seconds] = timeMatch\n if (!isValidTime(hours, minutes, seconds ?? 0)) return invalidDate()\n }\n return dayjs.utc(dateStr).toDate()\n}\n\nconst parseISO = (dateStr: string): Date | undefined => (dateStr ? dayjs(dateStr).toDate() : undefined)\nconst parse = (\n dateStr: string,\n format: DateFormats,\n { keepTimeZone = true, strict = false } = {}\n): Date | undefined => {\n if (!dateStr) return undefined\n // ISO strings without an explicit offset (e.g. date only) are read as UTC, like the other formats with keepTimeZone\n if (format == DateFormats.datetimeStorage) return parseISOStrict(dateStr)\n // keepTimeZone: the formats don't contain any time zone offset, so the digits are read as UTC\n if (keepTimeZone) return dayjs.utc(dateStr, format, strict).toDate()\n return dayjs(dateStr, format, strict).toDate()\n}\n\nconst isValidDateObject = (date: Date | undefined): boolean => !!date && dayjs(date).isValid()\n\nconst isValidDateInFormat = (dateStr: string, format: DateFormats) => {\n const parsed = parse(dateStr, format, { strict: true })\n return isValidDateObject(parsed)\n}\n\nconst convertDate = (params: {\n dateStr: string\n formatFrom?: DateFormats\n formatTo: DateFormats\n keepTimeZone?: boolean\n}): string | undefined => {\n const { dateStr, formatFrom = DateFormats.dateStorage, formatTo, keepTimeZone = true } = params\n if (Objects.isEmpty(dateStr)) return undefined\n\n const dateParsed = parse(dateStr, formatFrom, { keepTimeZone })\n if (!dateParsed || !dayjs(dateParsed).isValid()) {\n return undefined\n }\n // with keepTimeZone the parsed date encodes the source digits as if they were UTC (see parse/parseZone):\n // format it in UTC too, otherwise the digits would be shifted by the time zone of this machine\n return keepTimeZone ? formatUTC(dateParsed, formatTo) : format(dateParsed, formatTo)\n}\n\n/**\n * Checks if the date is valid. Takes into account leap years\n * (i.e. 2015/2/29 is not valid).\n */\nconst isValidDate = (year: any, month: any, day: any): boolean => {\n if (Objects.isEmpty(year) || Objects.isEmpty(month) || Objects.isEmpty(day)) {\n return false\n }\n\n const date = new Date(year, month - 1, day)\n\n return (\n dayjs(date).isValid() &&\n date.getFullYear() === Number(year) &&\n date.getMonth() + 1 === Number(month) &&\n date.getDate() === Number(day)\n )\n}\n\nconst isValidTime = (hour: any = '', minutes: any = '', seconds: any = 0): boolean => {\n if (Objects.isEmpty(hour) || Objects.isEmpty(minutes)) return false\n if (!(Number(hour) >= 0 && Number(hour) < 24 && Number(minutes) >= 0 && Number(minutes) < 60)) return false\n return Number(seconds) >= 0 && Number(seconds) < 60\n}\n\nconst toDate = (date: DateType): Date | undefined => {\n if (Objects.isEmpty(date)) return undefined\n if (date instanceof Date) return date\n if (typeof date === 'string') return parseISO(date)\n if (typeof date === 'number') return new Date(date)\n return undefined\n}\n\nconst isAfter = (date: DateType, dateToCompare: DateType): boolean => {\n const _date = toDate(date)\n const _dateToCompare = toDate(dateToCompare)\n if (!_date || !_dateToCompare) return false\n return dayjs(_date).isAfter(dayjs(_dateToCompare))\n}\n\nconst isBefore = (date: DateType, dateToCompare: DateType): boolean => {\n const _date = toDate(date)\n const _dateToCompare = toDate(dateToCompare)\n if (!_date || !_dateToCompare) return false\n return dayjs(_date).isBefore(dayjs(_dateToCompare))\n}\n\nconst add = (date: DateType, value: number, unit: UnitOfTime): Date => dayjs(date).add(value, unit).toDate()\nconst addSeconds = (date: DateType, value: number): Date => add(date, value, UnitOfTime.seconds)\nconst addMinutes = (date: DateType, value: number): Date => add(date, value, UnitOfTime.minutes)\nconst addHours = (date: DateType, value: number): Date => add(date, value, UnitOfTime.hours)\nconst addDays = (date: DateType, value: number): Date => add(date, value, UnitOfTime.days)\nconst addWeeks = (date: DateType, value: number): Date => add(date, value, UnitOfTime.weeks)\nconst addMonths = (date: DateType, value: number): Date => add(date, value, UnitOfTime.months)\nconst addYears = (date: DateType, value: number): Date => add(date, value, UnitOfTime.years)\n\nconst diff = (dateA: DateType, dateB: DateType, unit: UnitOfTime, precise?: boolean): number =>\n dayjs(dateA).diff(dayjs(dateB), unit, precise)\nconst diffInSeconds = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.seconds)\nconst diffInMinutes = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.minutes)\nconst diffInHours = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.hours)\nconst diffInDays = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.days)\nconst diffInWeeks = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.weeks)\nconst diffInMonths = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.months)\nconst diffInYears = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.years)\n\nconst sub = (date: DateType, value: number, unit: UnitOfTime): Date => dayjs(date).subtract(value, unit).toDate()\nconst subSeconds = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.seconds)\nconst subMinutes = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.minutes)\nconst subHours = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.hours)\nconst subDays = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.days)\nconst subWeeks = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.weeks)\nconst subMonths = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.months)\nconst subYears = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.years)\n\n/**\n * Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).\n */\nconst getTimezoneOffset = (): number => new Date().getTimezoneOffset()\n\nexport const Dates = {\n isAfter,\n isBefore,\n isValidDate,\n isValidDateInFormat,\n isValidDateObject,\n isValidTime,\n nowFormattedForStorage,\n nowFormattedForExpression,\n convertDate,\n format,\n formatUTC,\n formatForStorage,\n formatForExpression,\n parse,\n parseISO,\n getTimezoneOffset,\n add,\n addSeconds,\n addMinutes,\n addHours,\n addDays,\n addWeeks,\n addMonths,\n addYears,\n sub,\n subSeconds,\n subMinutes,\n subHours,\n subDays,\n subWeeks,\n subMonths,\n subYears,\n diff,\n diffInSeconds,\n diffInMinutes,\n diffInHours,\n diffInDays,\n diffInWeeks,\n diffInMonths,\n diffInYears,\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { AppInfo } from './app';
2
- export { Authorizer, AuthGroupName, UserStatus, Permission, UserTitle, UserFactory, Users } from './auth';
2
+ export { Authorizer, AuthGroupName, createDefaultAuthGroups, UserStatus, Permission, UserTitle, UserFactory, Users, } from './auth';
3
3
  export type { AuthGroup, User, UserAuthGroup, UserAuthGroupProps, AuthToken, UserAuthTokenPayload, UserAuthTokenService, UserPrefs, UserPrefSurveys, UserProps, UserAuthRefreshToken, UserAuthRefreshTokenProps, UserAuthRefreshTokenPayload, UserService, UserTokenPayload, DownloadAuthTokenPayload, UserGroup, UserGroupProps, UserGroupQualifier, UserInvitation, } from './auth';
4
4
  export { CategoryFactory, CategoryImportColumnType, CategoryItemFactory, CategoryLevelFactory } from './category';
5
5
  export type { CategoryItemProps, Category, CategoryItem, CategoryLevel, CategoryLevelProps, CategoryImportSummary, CategoryImportSummaryColumn, CategoryItemService, CategoryLevelService, CategoryProps, CategoryService, } from './category';
@@ -28,18 +28,18 @@ export type { Message } from './message';
28
28
  export { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message';
29
29
  export { NodeFactory, NodeKeys, NodeMetaKeys, Nodes, NodeValueFormatter, NodeValues } from './node';
30
30
  export type { ArenaRecordNode, Node, NodeMeta, NodePointer, NodeRefData, NodeService, NodesMap, NodeValueCode, NodeValueCoordinate, NodeValueFile, NodeValueTaxon, } from './node';
31
- export { NodeDefCountType, NodeDefType, NodeDefFactory, NodeDefs, NodeDefEntityRenderType, NodeDefFileType, NodeDefTextInputType, NodeDefTextRenderType, FormHeaderColor, } from './nodeDef';
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 { AreaOfInterestProvider, CategoryItemProvider, TaxonProvider } from './nodeDefExpressionEvaluator';
34
- export type { NodeDef, NodeDefLayout, NodeDefMeta, NodeDefProps, NodeDefPropsWithLayout, NodeDefBoolean, NodeDefBooleanProps, NodeDefCode, NodeDefCodeLayout, NodeDefCodeProps, NodeDefCoordinate, NodeDefCoordinateProps, NodeDefDate, NodeDefDecimal, NodeDefDecimalProps, NodeDefEntity, NodeDefEntityChildPosition, NodeDefEntityLayout, NodeDefEntityProps, NodeDefPrintOrientation, NodeDefFile, NodeDefFileProps, NodeDefGeo, NodeDefGeoProps, NodeDefFormHeader, NodeDefFormHeaderProps, NodeDefInteger, NodeDefPropsAdvanced, NodeDefTaxon, NodeDefTaxonProps, NodeDefText, NodeDefTextProps, NodeDefTextLayout, NodeDefTime, NodeDefTimeProps, NodeDefExpression, NodeDefMap, NodeDefService, NodeDefValidations, } from './nodeDef';
35
- export { NodePointers, RecordCloner, RecordFactory, RecordFixer, Records, RECORD_STEP_DEFAULT, RecordExpressionEvaluator, RecordNodesUpdater, RecordPrettyPrinter, RecordUpdater, RecordUpdateResult, RecordValidator, RecordValidations, } from './record';
36
- export type { AttributeValidatorParams, AttributesValidatorParams, NodeCreateParams, NodesUpdateParams, ArenaRecord, Record, RecordExpressionContext, RecordExpressionEvaluationContext, RecordService, RecordUpdateOptions, RecordValidatorParams, SortedAttributesValidatorParams, } from './record';
34
+ export type { NodeDef, NodeDefLayout, NodeDefMeta, NodeDefProps, NodeDefPropsWithLayout, NodeDefBoolean, NodeDefBooleanProps, NodeDefCode, NodeDefCodeLayout, NodeDefCodeProps, NodeDefCoordinate, NodeDefCoordinateProps, NodeDefDate, NodeDefDecimal, NodeDefDecimalProps, NodeDefEntity, NodeDefEntityChildPosition, NodeDefEntityLayout, NodeDefEntityLayoutChildItem, NodeDefEntityProps, NodeDefPrintOrientation, NodeDefFile, NodeDefFileProps, NodeDefGeo, NodeDefGeoProps, NodeDefFormHeader, NodeDefFormHeaderProps, NodeDefInteger, NodeDefPropsAdvanced, NodeDefTaxon, NodeDefTaxonProps, NodeDefText, NodeDefTextProps, NodeDefTextLayout, NodeDefTime, NodeDefTimeProps, NodeDefCountExpression, NodeDefExpression, NodeDefExpressionFactoryParams, NodeDefMap, NodeDefService, NodeDefValidations, } from './nodeDef';
35
+ export { NodePointers, 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 { AttributeValidatorParams, AttributesValidatorParams, NodeCreateParams, NodesUpdateParams, ArenaRecord, Record, RecordExpressionContext, RecordExpressionEvaluationContext, RecordService, RecordStep, RecordUpdateOptions, RecordValidatorParams, SortedAttributesValidatorParams, } from './record';
37
37
  export { ServiceRegistry, ServiceType } from './registry';
38
38
  export type { ServiceTypeMap } from './registry';
39
39
  export { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs';
40
40
  export type { SRS, SRSIndex } from './srs';
41
41
  export { NodeDefsFixer, SurveyDocImages, SurveyDocImageFactory, SurveyDocPlace, SurveyDependencyType, SurveyFactory, SurveyFileFactory, SurveyFileType, SurveyRefDataFactory, SurveySecurityProp, Surveys, surveyDocImagePropKeys, surveySecurityDefaults, defaultCycle, } from './survey';
42
- export type { Survey, SurveyCycle, SurveyDependency, SurveyDependencyGraph, SurveyDocImage, SurveyDocImageFactoryParams, SurveyDocImageProps, SurveyFile, SurveyFileFactoryParams, SurveyFileProps, SurveyProps, SurveyRefData, SurveySecurity, SurveyService, } from './survey';
42
+ export type { Survey, SurveyCycle, SurveyDependency, SurveyDependencyGraph, SurveyDocImage, SurveyDocImageFactoryParams, SurveyDocImageProps, SurveyFile, SurveyFileFactoryParams, SurveyFileProps, SurveyNodeDefsIndex, SurveyProps, SurveyRefData, SurveySecurity, SurveyService, } from './survey';
43
43
  export { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy';
44
44
  export type { VernacularNameParams, TaxonomyFactoryParams, TaxonFactoryParams, Taxonomy, TaxonomyService, VernacularNameProps, VernacularName, TaxonProps, Taxon, TaxonomyProps, TaxonService, } from './taxonomy';
45
45
  export { SurveyBuilder, SurveyObjectBuilders } from './tests/builder/surveyBuilder';
package/dist/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Messages = exports.MessageTargetUserType = exports.MessageStatus = exports.MessagePropsKey = exports.MessageNotificationType = exports.LanguagesISO639part2 = exports.Languages = exports.LanguageCode = exports.JobStatus = exports.JobEventType = exports.JobBase = exports.Points = exports.PointFactory = exports.ExtraPropsDataGenerator = exports.ExtraPropDataType = exports.JavascriptExpressionParser = exports.JavascriptExpressionEvaluator = exports.ExpressionVariable = exports.ExpressionNodeEvaluator = exports.ExpressionNodeType = exports.SystemErrorKeys = exports.SystemError = exports.DataQuerySummaries = exports.DataQueryMode = exports.UniqueFileNamesGenerator = exports.ArenaExportType = exports.ArenaExportInfoFactory = exports.ArenaExportFile = exports.FlatDataExportColumnDataType = exports.FlatDataExportModel = exports.FlatDataFiles = exports.FlatDataExportOption = exports.FlatDataExportDefaultOptions = exports.TraverseMethod = exports.ChainNodeDefFactory = exports.ChainStatusExec = exports.ChainFactory = exports.CategoryItems = exports.Categories = exports.CategoryLevelFactory = exports.CategoryItemFactory = exports.CategoryImportColumnType = exports.CategoryFactory = exports.Users = exports.UserFactory = exports.UserTitle = exports.Permission = exports.UserStatus = exports.AuthGroupName = exports.Authorizer = void 0;
4
- exports.Taxa = exports.defaultCycle = exports.surveySecurityDefaults = exports.surveyDocImagePropKeys = exports.Surveys = exports.SurveySecurityProp = exports.SurveyRefDataFactory = exports.SurveyFileType = exports.SurveyFileFactory = exports.SurveyFactory = exports.SurveyDependencyType = exports.SurveyDocPlace = exports.SurveyDocImageFactory = exports.SurveyDocImages = exports.NodeDefsFixer = exports.SRSFactory = exports.DEFAULT_SRS_INDEX = exports.DEFAULT_SRS = exports.ServiceType = exports.ServiceRegistry = exports.RecordValidations = exports.RecordValidator = exports.RecordUpdateResult = exports.RecordUpdater = exports.RecordPrettyPrinter = exports.RecordNodesUpdater = exports.RecordExpressionEvaluator = exports.RECORD_STEP_DEFAULT = exports.Records = exports.RecordFixer = exports.RecordFactory = exports.RecordCloner = exports.NodePointers = exports.NodeDefExpressionValidator = exports.NodeDefExpressionEvaluator = exports.FormHeaderColor = exports.NodeDefTextRenderType = exports.NodeDefTextInputType = exports.NodeDefFileType = exports.NodeDefEntityRenderType = exports.NodeDefs = exports.NodeDefFactory = exports.NodeDefType = exports.NodeDefCountType = exports.NodeValues = exports.NodeValueFormatter = exports.Nodes = exports.NodeMetaKeys = exports.NodeKeys = exports.NodeFactory = void 0;
5
- exports.ValidatorErrorKeys = exports.Validator = exports.ValidationSeverity = exports.Validations = exports.ValidationResults = exports.ValidationResultFactory = exports.ValidationFactory = exports.FieldValidators = exports.Versions = exports.UUIDs = exports.UnitOfTime = exports.Strings = exports.RetryProcessor = exports.Queue = exports.Promises = exports.Objects = exports.Numbers = exports.FileProcessor = exports.FileNames = exports.Dates = exports.DateFormats = exports.Arrays = exports.RecordNodeBuilders = exports.RecordBuilder = exports.SurveyObjectBuilders = exports.SurveyBuilder = exports.VernacularNameFactory = exports.TaxonGenerator = exports.TaxonFactory = exports.TaxonomyFactory = exports.Taxonomies = void 0;
3
+ exports.MessageTargetUserType = exports.MessageStatus = exports.MessagePropsKey = exports.MessageNotificationType = exports.LanguagesISO639part2 = exports.Languages = exports.LanguageCode = exports.JobStatus = exports.JobEventType = exports.JobBase = exports.Points = exports.PointFactory = exports.ExtraPropsDataGenerator = exports.ExtraPropDataType = exports.JavascriptExpressionParser = exports.JavascriptExpressionEvaluator = exports.ExpressionVariable = exports.ExpressionNodeEvaluator = exports.ExpressionNodeType = exports.SystemErrorKeys = exports.SystemError = exports.DataQuerySummaries = exports.DataQueryMode = exports.UniqueFileNamesGenerator = exports.ArenaExportType = exports.ArenaExportInfoFactory = exports.ArenaExportFile = exports.FlatDataExportColumnDataType = exports.FlatDataExportModel = exports.FlatDataFiles = exports.FlatDataExportOption = exports.FlatDataExportDefaultOptions = exports.TraverseMethod = exports.ChainNodeDefFactory = exports.ChainStatusExec = exports.ChainFactory = exports.CategoryItems = exports.Categories = exports.CategoryLevelFactory = exports.CategoryItemFactory = exports.CategoryImportColumnType = exports.CategoryFactory = exports.Users = exports.UserFactory = exports.UserTitle = exports.Permission = exports.UserStatus = exports.createDefaultAuthGroups = exports.AuthGroupName = exports.Authorizer = void 0;
4
+ exports.SurveyFileFactory = exports.SurveyFactory = exports.SurveyDependencyType = exports.SurveyDocPlace = exports.SurveyDocImageFactory = exports.SurveyDocImages = exports.NodeDefsFixer = exports.SRSFactory = exports.DEFAULT_SRS_INDEX = exports.DEFAULT_SRS = exports.ServiceType = exports.ServiceRegistry = exports.RecordValidations = exports.RecordValidator = exports.RecordUpdateResult = exports.RecordUpdater = exports.RecordPrettyPrinter = exports.RecordNodesUpdater = exports.RecordExpressionEvaluator = exports.RecordStepsList = exports.RecordSteps = exports.RecordStepNames = exports.RecordStepEntryCode = exports.RecordStepCleansingCode = exports.RecordStepAnalysisCode = exports.RECORD_STEP_DEFAULT = exports.Records = exports.RecordFixer = exports.RecordFactory = exports.RecordCloner = exports.NodePointers = exports.NodeDefExpressionValidator = exports.NodeDefExpressionEvaluator = exports.FormHeaderColor = exports.NodeDefTextRenderType = exports.NodeDefTextInputType = exports.NodeDefFileType = exports.NodeDefEntityRenderType = exports.NodeDefs = exports.NodeDefFactory = exports.NodeDefType = exports.NodeDefExpressionFactory = exports.NodeDefCountType = exports.NodeValues = exports.NodeValueFormatter = exports.Nodes = exports.NodeMetaKeys = exports.NodeKeys = exports.NodeFactory = exports.Messages = void 0;
5
+ exports.ValidatorErrorKeys = exports.Validator = exports.ValidationSeverity = exports.Validations = exports.ValidationResults = exports.ValidationResultFactory = exports.ValidationFactory = exports.FieldValidators = exports.Versions = exports.UUIDs = exports.UnitOfTime = exports.Strings = exports.RetryProcessor = exports.Queue = exports.Promises = exports.Objects = exports.Numbers = exports.FileProcessor = exports.FileNames = exports.Dates = exports.DateFormats = exports.Arrays = exports.RecordNodeBuilders = exports.RecordBuilder = exports.SurveyObjectBuilders = exports.SurveyBuilder = exports.VernacularNameFactory = exports.TaxonGenerator = exports.TaxonFactory = exports.TaxonomyFactory = exports.Taxonomies = exports.Taxa = exports.defaultCycle = exports.surveySecurityDefaults = exports.surveyDocImagePropKeys = exports.Surveys = exports.SurveySecurityProp = exports.SurveyRefDataFactory = exports.SurveyFileType = void 0;
6
6
  var auth_1 = require("./auth");
7
7
  Object.defineProperty(exports, "Authorizer", { enumerable: true, get: function () { return auth_1.Authorizer; } });
8
8
  Object.defineProperty(exports, "AuthGroupName", { enumerable: true, get: function () { return auth_1.AuthGroupName; } });
9
+ Object.defineProperty(exports, "createDefaultAuthGroups", { enumerable: true, get: function () { return auth_1.createDefaultAuthGroups; } });
9
10
  Object.defineProperty(exports, "UserStatus", { enumerable: true, get: function () { return auth_1.UserStatus; } });
10
11
  Object.defineProperty(exports, "Permission", { enumerable: true, get: function () { return auth_1.Permission; } });
11
12
  Object.defineProperty(exports, "UserTitle", { enumerable: true, get: function () { return auth_1.UserTitle; } });
@@ -76,6 +77,7 @@ Object.defineProperty(exports, "NodeValueFormatter", { enumerable: true, get: fu
76
77
  Object.defineProperty(exports, "NodeValues", { enumerable: true, get: function () { return node_1.NodeValues; } });
77
78
  var nodeDef_1 = require("./nodeDef");
78
79
  Object.defineProperty(exports, "NodeDefCountType", { enumerable: true, get: function () { return nodeDef_1.NodeDefCountType; } });
80
+ Object.defineProperty(exports, "NodeDefExpressionFactory", { enumerable: true, get: function () { return nodeDef_1.NodeDefExpressionFactory; } });
79
81
  Object.defineProperty(exports, "NodeDefType", { enumerable: true, get: function () { return nodeDef_1.NodeDefType; } });
80
82
  Object.defineProperty(exports, "NodeDefFactory", { enumerable: true, get: function () { return nodeDef_1.NodeDefFactory; } });
81
83
  Object.defineProperty(exports, "NodeDefs", { enumerable: true, get: function () { return nodeDef_1.NodeDefs; } });
@@ -94,6 +96,12 @@ Object.defineProperty(exports, "RecordFactory", { enumerable: true, get: functio
94
96
  Object.defineProperty(exports, "RecordFixer", { enumerable: true, get: function () { return record_1.RecordFixer; } });
95
97
  Object.defineProperty(exports, "Records", { enumerable: true, get: function () { return record_1.Records; } });
96
98
  Object.defineProperty(exports, "RECORD_STEP_DEFAULT", { enumerable: true, get: function () { return record_1.RECORD_STEP_DEFAULT; } });
99
+ Object.defineProperty(exports, "RecordStepAnalysisCode", { enumerable: true, get: function () { return record_1.RecordStepAnalysisCode; } });
100
+ Object.defineProperty(exports, "RecordStepCleansingCode", { enumerable: true, get: function () { return record_1.RecordStepCleansingCode; } });
101
+ Object.defineProperty(exports, "RecordStepEntryCode", { enumerable: true, get: function () { return record_1.RecordStepEntryCode; } });
102
+ Object.defineProperty(exports, "RecordStepNames", { enumerable: true, get: function () { return record_1.RecordStepNames; } });
103
+ Object.defineProperty(exports, "RecordSteps", { enumerable: true, get: function () { return record_1.RecordSteps; } });
104
+ Object.defineProperty(exports, "RecordStepsList", { enumerable: true, get: function () { return record_1.RecordStepsList; } });
97
105
  Object.defineProperty(exports, "RecordExpressionEvaluator", { enumerable: true, get: function () { return record_1.RecordExpressionEvaluator; } });
98
106
  Object.defineProperty(exports, "RecordNodesUpdater", { enumerable: true, get: function () { return record_1.RecordNodesUpdater; } });
99
107
  Object.defineProperty(exports, "RecordPrettyPrinter", { enumerable: true, get: function () { return record_1.RecordPrettyPrinter; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAEA,+BAAyG;AAAhG,kGAAA,UAAU,OAAA;AAAE,qGAAA,aAAa,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,kGAAA,UAAU,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,6FAAA,KAAK,OAAA;AAwBzF,uCAAiH;AAAxG,2GAAA,eAAe,OAAA;AAAE,oHAAA,wBAAwB,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAAE,gHAAA,oBAAoB,OAAA;AAe7F,uCAAsD;AAA7C,sGAAA,UAAU,OAAA;AAAE,yGAAA,aAAa,OAAA;AAElC,iCAA4E;AAAnE,qGAAA,YAAY,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,4GAAA,mBAAmB,OAAA;AAY3D,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,0G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AAA,MAAM,OAAA;AACN,oGAAA,WAAW,OAAA;AACX,8FAAA,KAAK,OAAA;AACL,kGAAA,SAAS,OAAA;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 { AppInfo } from './app'\n\nexport { Authorizer, AuthGroupName, UserStatus, Permission, UserTitle, UserFactory, Users } from './auth'\nexport type {\n AuthGroup,\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n AuthToken,\n UserAuthTokenPayload,\n UserAuthTokenService,\n UserPrefs,\n UserPrefSurveys,\n UserProps,\n UserAuthRefreshToken,\n UserAuthRefreshTokenProps,\n UserAuthRefreshTokenPayload,\n UserService,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n UserGroup,\n UserGroupProps,\n UserGroupQualifier,\n UserInvitation,\n} from './auth'\n\nexport { CategoryFactory, CategoryImportColumnType, CategoryItemFactory, CategoryLevelFactory } from './category'\nexport type {\n CategoryItemProps,\n Category,\n CategoryItem,\n CategoryLevel,\n CategoryLevelProps,\n CategoryImportSummary,\n CategoryImportSummaryColumn,\n CategoryItemService,\n CategoryLevelService,\n CategoryProps,\n CategoryService,\n} from './category'\n\nexport { Categories, CategoryItems } from './category'\n\nexport { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain'\nexport type {\n Chain,\n ChainProps,\n ChainService,\n ChainNodeDef,\n ChainNodeDefProps,\n ChainNodeDefService,\n ChainNodeDefAggregate,\n ChainNodeDefAggregateProps,\n} from './chain'\n\nexport { TraverseMethod } from './common'\nexport type { ArenaObject, ArenaService, Dictionary, Factory, I18n } from './common'\n\nexport type { FlatDataExportOptions, 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 { DataQuery, DataQuerySummary, DataQuerySummaryProps } 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 ArrayExpression,\n BinaryExpression,\n CallExpression,\n CompoundExpression,\n ConditionalExpression,\n ExpressionContext,\n ExpressionEvaluator,\n ExpressionFunction,\n ExpressionFunctions,\n AnyExpressionNode,\n ExpressionNode,\n ExpressionNodeEvaluatorConstructor,\n MemberExpression,\n IdentifierExpression,\n LiteralExpression,\n SequenceExpression,\n ThisExpression,\n UnaryExpression,\n} from './expression'\n\nexport { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp'\nexport type { ExtraPropDef, ExtraPropDefs } from './extraProp'\n\nexport { PointFactory, Points } from './geo'\nexport type { AreaOfInterest, AreaOfInterestDescriptor, Point } from './geo'\n\nexport { JobBase, JobEventType, JobStatus } from './job'\nexport type { Job, JobContext, JobEvent, JobSerialized, JobTxClient } from './job'\n\nexport { LanguageCode, Languages, LanguagesISO639part2 } from './language'\nexport type { Labels } from './language'\n\nexport type { Logger } from './logger'\n\nexport type { Message } from './message'\nexport { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message'\n\nexport { NodeFactory, NodeKeys, NodeMetaKeys, Nodes, NodeValueFormatter, NodeValues } from './node'\nexport type {\n ArenaRecordNode,\n Node,\n NodeMeta,\n NodePointer,\n NodeRefData,\n NodeService,\n NodesMap,\n NodeValueCode,\n NodeValueCoordinate,\n NodeValueFile,\n NodeValueTaxon,\n} from './node'\n\nexport {\n NodeDefCountType,\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 { AreaOfInterestProvider, CategoryItemProvider, TaxonProvider } from './nodeDefExpressionEvaluator'\n\nexport type {\n NodeDef,\n NodeDefLayout,\n NodeDefMeta,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefBoolean,\n NodeDefBooleanProps,\n NodeDefCode,\n NodeDefCodeLayout,\n NodeDefCodeProps,\n NodeDefCoordinate,\n NodeDefCoordinateProps,\n NodeDefDate,\n NodeDefDecimal,\n NodeDefDecimalProps,\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n NodeDefFile,\n NodeDefFileProps,\n NodeDefGeo,\n NodeDefGeoProps,\n NodeDefFormHeader,\n NodeDefFormHeaderProps,\n NodeDefInteger,\n NodeDefPropsAdvanced,\n NodeDefTaxon,\n NodeDefTaxonProps,\n NodeDefText,\n NodeDefTextProps,\n NodeDefTextLayout,\n NodeDefTime,\n NodeDefTimeProps,\n NodeDefExpression,\n NodeDefMap,\n NodeDefService,\n NodeDefValidations,\n} from './nodeDef'\n\nexport {\n NodePointers,\n RecordCloner,\n RecordFactory,\n RecordFixer,\n Records,\n RECORD_STEP_DEFAULT,\n RecordExpressionEvaluator,\n RecordNodesUpdater,\n RecordPrettyPrinter,\n RecordUpdater,\n RecordUpdateResult,\n RecordValidator,\n RecordValidations,\n} from './record'\nexport type {\n AttributeValidatorParams,\n AttributesValidatorParams,\n NodeCreateParams,\n NodesUpdateParams,\n ArenaRecord,\n Record,\n RecordExpressionContext,\n RecordExpressionEvaluationContext,\n RecordService,\n RecordUpdateOptions,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './record'\n\nexport { ServiceRegistry, ServiceType } from './registry'\nexport type { ServiceTypeMap } from './registry'\n\nexport { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs'\nexport type { SRS, SRSIndex } 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 Survey,\n SurveyCycle,\n SurveyDependency,\n SurveyDependencyGraph,\n SurveyDocImage,\n SurveyDocImageFactoryParams,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileFactoryParams,\n SurveyFileProps,\n SurveyProps,\n SurveyRefData,\n SurveySecurity,\n SurveyService,\n} from './survey'\n\nexport { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy'\nexport type {\n VernacularNameParams,\n TaxonomyFactoryParams,\n TaxonFactoryParams,\n Taxonomy,\n TaxonomyService,\n VernacularNameProps,\n VernacularName,\n TaxonProps,\n Taxon,\n TaxonomyProps,\n TaxonService,\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 { FileProcessorConstructorArgs, MutationOptions, ParsedVersion } 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 DissocFieldValidationOptions,\n FieldValidator,\n Validation,\n ValidationFields,\n ValidationResult,\n ValidationCounts,\n} from './validation'\n"]}
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,uCAAiH;AAAxG,2GAAA,eAAe,OAAA;AAAE,oHAAA,wBAAwB,OAAA;AAAE,+GAAA,mBAAmB,OAAA;AAAE,gHAAA,oBAAoB,OAAA;AAe7F,uCAAsD;AAA7C,sGAAA,UAAU,OAAA;AAAE,yGAAA,aAAa,OAAA;AAElC,iCAA4E;AAAnE,qGAAA,YAAY,OAAA;AAAE,wGAAA,eAAe,OAAA;AAAE,4GAAA,mBAAmB,OAAA;AAY3D,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,i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A,aAAa,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AAC5C,+DAAiF;AAAxE,8GAAA,aAAa,OAAA;AAAE,mHAAA,kBAAkB,OAAA;AAE1C,iCAegB;AAdd,+FAAA,MAAM,OAAA;AACN,oGAAA,WAAW,OAAA;AACX,8FAAA,KAAK,OAAA;AACL,kGAAA,SAAS,OAAA;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 { AppInfo } 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 AuthGroup,\n User,\n UserAuthGroup,\n UserAuthGroupProps,\n AuthToken,\n UserAuthTokenPayload,\n UserAuthTokenService,\n UserPrefs,\n UserPrefSurveys,\n UserProps,\n UserAuthRefreshToken,\n UserAuthRefreshTokenProps,\n UserAuthRefreshTokenPayload,\n UserService,\n UserTokenPayload,\n DownloadAuthTokenPayload,\n UserGroup,\n UserGroupProps,\n UserGroupQualifier,\n UserInvitation,\n} from './auth'\n\nexport { CategoryFactory, CategoryImportColumnType, CategoryItemFactory, CategoryLevelFactory } from './category'\nexport type {\n CategoryItemProps,\n Category,\n CategoryItem,\n CategoryLevel,\n CategoryLevelProps,\n CategoryImportSummary,\n CategoryImportSummaryColumn,\n CategoryItemService,\n CategoryLevelService,\n CategoryProps,\n CategoryService,\n} from './category'\n\nexport { Categories, CategoryItems } from './category'\n\nexport { ChainFactory, ChainStatusExec, ChainNodeDefFactory } from './chain'\nexport type {\n Chain,\n ChainProps,\n ChainService,\n ChainNodeDef,\n ChainNodeDefProps,\n ChainNodeDefService,\n ChainNodeDefAggregate,\n ChainNodeDefAggregateProps,\n} from './chain'\n\nexport { TraverseMethod } from './common'\nexport type { ArenaObject, ArenaService, Dictionary, Factory, I18n } from './common'\n\nexport type { FlatDataExportOptions, 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 { DataQuery, DataQuerySummary, DataQuerySummaryProps } 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 ArrayExpression,\n BinaryExpression,\n CallExpression,\n CompoundExpression,\n ConditionalExpression,\n ExpressionContext,\n ExpressionEvaluator,\n ExpressionFunction,\n ExpressionFunctions,\n AnyExpressionNode,\n ExpressionNode,\n ExpressionNodeEvaluatorConstructor,\n MemberExpression,\n IdentifierExpression,\n LiteralExpression,\n SequenceExpression,\n ThisExpression,\n UnaryExpression,\n} from './expression'\n\nexport { ExtraPropDataType, ExtraPropsDataGenerator } from './extraProp'\nexport type { ExtraPropDef, ExtraPropDefs } from './extraProp'\n\nexport { PointFactory, Points } from './geo'\nexport type { AreaOfInterest, AreaOfInterestDescriptor, Point } from './geo'\n\nexport { JobBase, JobEventType, JobStatus } from './job'\nexport type { Job, JobContext, JobEvent, JobSerialized, JobTxClient } from './job'\n\nexport { LanguageCode, Languages, LanguagesISO639part2 } from './language'\nexport type { Labels } from './language'\n\nexport type { Logger } from './logger'\n\nexport type { Message } from './message'\nexport { MessageNotificationType, MessagePropsKey, MessageStatus, MessageTargetUserType, Messages } from './message'\n\nexport { NodeFactory, NodeKeys, NodeMetaKeys, Nodes, NodeValueFormatter, NodeValues } from './node'\nexport type {\n ArenaRecordNode,\n Node,\n NodeMeta,\n NodePointer,\n NodeRefData,\n NodeService,\n NodesMap,\n NodeValueCode,\n NodeValueCoordinate,\n NodeValueFile,\n NodeValueTaxon,\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 { AreaOfInterestProvider, CategoryItemProvider, TaxonProvider } from './nodeDefExpressionEvaluator'\n\nexport type {\n NodeDef,\n NodeDefLayout,\n NodeDefMeta,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefBoolean,\n NodeDefBooleanProps,\n NodeDefCode,\n NodeDefCodeLayout,\n NodeDefCodeProps,\n NodeDefCoordinate,\n NodeDefCoordinateProps,\n NodeDefDate,\n NodeDefDecimal,\n NodeDefDecimalProps,\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityLayoutChildItem,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n NodeDefFile,\n NodeDefFileProps,\n NodeDefGeo,\n NodeDefGeoProps,\n NodeDefFormHeader,\n NodeDefFormHeaderProps,\n NodeDefInteger,\n NodeDefPropsAdvanced,\n NodeDefTaxon,\n NodeDefTaxonProps,\n NodeDefText,\n NodeDefTextProps,\n NodeDefTextLayout,\n NodeDefTime,\n NodeDefTimeProps,\n NodeDefCountExpression,\n NodeDefExpression,\n NodeDefExpressionFactoryParams,\n NodeDefMap,\n NodeDefService,\n NodeDefValidations,\n} from './nodeDef'\n\nexport {\n NodePointers,\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 AttributeValidatorParams,\n AttributesValidatorParams,\n NodeCreateParams,\n NodesUpdateParams,\n ArenaRecord,\n Record,\n RecordExpressionContext,\n RecordExpressionEvaluationContext,\n RecordService,\n RecordStep,\n RecordUpdateOptions,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './record'\n\nexport { ServiceRegistry, ServiceType } from './registry'\nexport type { ServiceTypeMap } from './registry'\n\nexport { DEFAULT_SRS, DEFAULT_SRS_INDEX, SRSFactory } from './srs'\nexport type { SRS, SRSIndex } 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 Survey,\n SurveyCycle,\n SurveyDependency,\n SurveyDependencyGraph,\n SurveyDocImage,\n SurveyDocImageFactoryParams,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileFactoryParams,\n SurveyFileProps,\n SurveyNodeDefsIndex,\n SurveyProps,\n SurveyRefData,\n SurveySecurity,\n SurveyService,\n} from './survey'\n\nexport { Taxa, Taxonomies, TaxonomyFactory, TaxonFactory, TaxonGenerator, VernacularNameFactory } from './taxonomy'\nexport type {\n VernacularNameParams,\n TaxonomyFactoryParams,\n TaxonFactoryParams,\n Taxonomy,\n TaxonomyService,\n VernacularNameProps,\n VernacularName,\n TaxonProps,\n Taxon,\n TaxonomyProps,\n TaxonService,\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 { FileProcessorConstructorArgs, MutationOptions, ParsedVersion } 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 DissocFieldValidationOptions,\n FieldValidator,\n Validation,\n ValidationFields,\n ValidationResult,\n ValidationCounts,\n} from './validation'\n"]}
@@ -1,6 +1,6 @@
1
1
  export { NodeDefFactory } from './factory';
2
- export type { NodeDef, NodeDefProps, NodeDefPropsWithLayout, NodeDefMeta, NodeDefPropsAdvanced, NodeDefExpression, NodeDefLayout, NodeDefValidations, NodeDefMap, } from './nodeDef';
3
- export { NodeDefCountType, NodeDefType } from './nodeDef';
2
+ export type { NodeDef, NodeDefProps, NodeDefPropsWithLayout, NodeDefMeta, NodeDefPropsAdvanced, NodeDefExpression, NodeDefLayout, NodeDefValidations, NodeDefMap, NodeDefCountExpression, NodeDefExpressionFactoryParams, } from './nodeDef';
3
+ export { NodeDefCountType, NodeDefExpressionFactory, NodeDefType } from './nodeDef';
4
4
  export { NodeDefs } from './nodeDefs';
5
5
  export type { NodeDefService } from './service';
6
6
  export type { NodeDefBoolean, NodeDefBooleanProps } from './types/boolean';
@@ -8,7 +8,7 @@ export type { NodeDefCode, NodeDefCodeLayout, NodeDefCodeProps } from './types/c
8
8
  export type { NodeDefCoordinate, NodeDefCoordinateProps } from './types/coordinate';
9
9
  export type { NodeDefDate } from './types/date';
10
10
  export type { NodeDefDecimal, NodeDefDecimalProps } from './types/decimal';
11
- export type { NodeDefEntity, NodeDefEntityChildPosition, NodeDefEntityLayout, NodeDefEntityProps, NodeDefPrintOrientation, } from './types/entity';
11
+ export type { NodeDefEntity, NodeDefEntityChildPosition, NodeDefEntityLayout, NodeDefEntityLayoutChildItem, NodeDefEntityProps, NodeDefPrintOrientation, } from './types/entity';
12
12
  export { NodeDefEntityRenderType } from './types/entity';
13
13
  export { NodeDefFileType } from './types/file';
14
14
  export type { NodeDefFile, NodeDefFileProps } from './types/file';
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NodeDefTextInputType = exports.NodeDefTextRenderType = exports.FormHeaderColor = exports.NodeDefFileType = exports.NodeDefEntityRenderType = exports.NodeDefs = exports.NodeDefType = exports.NodeDefCountType = exports.NodeDefFactory = void 0;
3
+ exports.NodeDefTextInputType = exports.NodeDefTextRenderType = exports.FormHeaderColor = exports.NodeDefFileType = exports.NodeDefEntityRenderType = exports.NodeDefs = exports.NodeDefType = exports.NodeDefExpressionFactory = exports.NodeDefCountType = exports.NodeDefFactory = void 0;
4
4
  var factory_1 = require("./factory");
5
5
  Object.defineProperty(exports, "NodeDefFactory", { enumerable: true, get: function () { return factory_1.NodeDefFactory; } });
6
6
  var nodeDef_1 = require("./nodeDef");
7
7
  Object.defineProperty(exports, "NodeDefCountType", { enumerable: true, get: function () { return nodeDef_1.NodeDefCountType; } });
8
+ Object.defineProperty(exports, "NodeDefExpressionFactory", { enumerable: true, get: function () { return nodeDef_1.NodeDefExpressionFactory; } });
8
9
  Object.defineProperty(exports, "NodeDefType", { enumerable: true, get: function () { return nodeDef_1.NodeDefType; } });
9
10
  var nodeDefs_1 = require("./nodeDefs");
10
11
  Object.defineProperty(exports, "NodeDefs", { enumerable: true, get: function () { return nodeDefs_1.NodeDefs; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodeDef/index.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAAjC,yGAAA,cAAc,OAAA;AAavB,qCAAyD;AAAhD,2GAAA,gBAAgB,OAAA;AAAE,sGAAA,WAAW,OAAA;AACtC,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AAuBjB,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 NodeDef,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefMeta,\n NodeDefPropsAdvanced,\n NodeDefExpression,\n NodeDefLayout,\n NodeDefValidations,\n NodeDefMap,\n} from './nodeDef'\nexport { NodeDefCountType, NodeDefType } from './nodeDef'\nexport { NodeDefs } from './nodeDefs'\n\nexport type { NodeDefService } from './service'\n\n// ==== node def types\nexport type { NodeDefBoolean, NodeDefBooleanProps } from './types/boolean'\n\nexport type { NodeDefCode, NodeDefCodeLayout, NodeDefCodeProps } from './types/code'\n\nexport type { NodeDefCoordinate, NodeDefCoordinateProps } from './types/coordinate'\n\nexport type { NodeDefDate } from './types/date'\n\nexport type { NodeDefDecimal, NodeDefDecimalProps } from './types/decimal'\n\nexport type {\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n} from './types/entity'\n\nexport { NodeDefEntityRenderType } from './types/entity'\n\nexport { NodeDefFileType } from './types/file'\nexport type { NodeDefFile, NodeDefFileProps } from './types/file'\n\nexport type { NodeDefGeo, NodeDefGeoProps } from './types/geo'\n\nexport { FormHeaderColor } from './types/formHeader'\nexport type { NodeDefFormHeader, NodeDefFormHeaderProps } from './types/formHeader'\n\nexport type { NodeDefInteger } from './types/integer'\n\nexport type { NodeDefTaxon, NodeDefTaxonProps } from './types/taxon'\n\nexport type { NodeDefText, NodeDefTextProps, NodeDefTextLayout } from './types/text'\nexport { NodeDefTextRenderType, NodeDefTextInputType } from './types/text'\n\nexport type { NodeDefTime, NodeDefTimeProps } from './types/time'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nodeDef/index.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAAjC,yGAAA,cAAc,OAAA;AAevB,qCAAmF;AAA1E,2GAAA,gBAAgB,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAAE,sGAAA,WAAW,OAAA;AAChE,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AAwBjB,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 NodeDef,\n NodeDefProps,\n NodeDefPropsWithLayout,\n NodeDefMeta,\n NodeDefPropsAdvanced,\n NodeDefExpression,\n NodeDefLayout,\n NodeDefValidations,\n NodeDefMap,\n NodeDefCountExpression,\n NodeDefExpressionFactoryParams,\n} from './nodeDef'\nexport { NodeDefCountType, NodeDefExpressionFactory, NodeDefType } from './nodeDef'\nexport { NodeDefs } from './nodeDefs'\n\nexport type { NodeDefService } from './service'\n\n// ==== node def types\nexport type { NodeDefBoolean, NodeDefBooleanProps } from './types/boolean'\n\nexport type { NodeDefCode, NodeDefCodeLayout, NodeDefCodeProps } from './types/code'\n\nexport type { NodeDefCoordinate, NodeDefCoordinateProps } from './types/coordinate'\n\nexport type { NodeDefDate } from './types/date'\n\nexport type { NodeDefDecimal, NodeDefDecimalProps } from './types/decimal'\n\nexport type {\n NodeDefEntity,\n NodeDefEntityChildPosition,\n NodeDefEntityLayout,\n NodeDefEntityLayoutChildItem,\n NodeDefEntityProps,\n NodeDefPrintOrientation,\n} from './types/entity'\n\nexport { NodeDefEntityRenderType } from './types/entity'\n\nexport { NodeDefFileType } from './types/file'\nexport type { NodeDefFile, NodeDefFileProps } from './types/file'\n\nexport type { NodeDefGeo, NodeDefGeoProps } from './types/geo'\n\nexport { FormHeaderColor } from './types/formHeader'\nexport type { NodeDefFormHeader, NodeDefFormHeaderProps } from './types/formHeader'\n\nexport type { NodeDefInteger } from './types/integer'\n\nexport type { NodeDefTaxon, NodeDefTaxonProps } from './types/taxon'\n\nexport type { NodeDefText, NodeDefTextProps, NodeDefTextLayout } from './types/text'\nexport { NodeDefTextRenderType, NodeDefTextInputType } from './types/text'\n\nexport type { NodeDefTime, NodeDefTimeProps } from './types/time'\n"]}
@@ -57,7 +57,8 @@ export interface NodeDefExpression {
57
57
  }
58
58
  export interface NodeDefExpressionFactoryParams {
59
59
  applyIf?: string;
60
- expression: string;
60
+ expression?: string;
61
+ messages?: Labels;
61
62
  severity?: ValidationSeverity;
62
63
  }
63
64
  export declare const NodeDefExpressionFactory: Factory<NodeDefExpression, NodeDefExpressionFactoryParams>;
@@ -1 +1 @@
1
- {"version":3,"file":"nodeDef.js","sourceRoot":"","sources":["../../src/nodeDef/nodeDef.ts"],"names":[],"mappings":";;;AAAA,oCAAyC;AAKzC,IAAY,WAeX;AAfD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,kBAAkB;IAClB,wCAAyB,CAAA;AAC3B,CAAC,EAfW,WAAW,aAAX,WAAW,GAAX,WAAW,QAetB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;AACb,CAAC,EAHW,gBAAgB,aAAhB,gBAAgB,GAAhB,gBAAgB,QAG3B;AAoDY,QAAA,wBAAwB,GAA+D;IAClG,cAAc,EAAE,CAAC,MAAsC,EAAqB,EAAE;QAC5E,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,aAAK,CAAC,EAAE,EAAE,EAAE,CAAA;QACnC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,eAAO,CAAC,gBAAgB,mBAAM,MAAM,EAAG,CAAC,CAAA;QAC9D,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA","sourcesContent":["import { Objects, UUIDs } from '../utils'\nimport { ArenaObject, Factory } from '../common'\nimport { Labels } from '../language'\nimport { ValidationSeverity } from '../validation'\n\nexport enum NodeDefType {\n boolean = 'boolean',\n code = 'code',\n coordinate = 'coordinate',\n date = 'date',\n decimal = 'decimal',\n geo = 'geo',\n entity = 'entity',\n file = 'file',\n integer = 'integer',\n taxon = 'taxon',\n text = 'text',\n time = 'time',\n // layout elements\n formHeader = 'formHeader',\n}\n\nexport enum NodeDefCountType {\n max = 'max',\n min = 'min',\n}\n\nexport interface NodeDefMeta {\n h: string[]\n}\n\nexport interface NodeDefProps {\n cycles?: string[]\n descriptions?: Labels\n key?: boolean\n autoIncrementalKey?: boolean\n labels?: Labels\n multiple?: boolean\n name?: string\n qualifier?: boolean\n readOnly?: boolean\n\n // available only when readOnly is true\n hidden?: boolean\n\n visibleFields?: string[]\n}\n\nexport interface NodeDefLayout {\n hiddenWhenNotRelevant?: boolean\n hiddenInMobile?: boolean\n includedInMultipleEntitySummary?: boolean\n includedInPreviousCycleLink?: boolean\n // code\n codeShown?: boolean\n}\n\nexport interface NodeDefPropsWithLayout<L extends NodeDefLayout> extends NodeDefProps {\n layout?: {\n [cycleKey: string]: L\n }\n}\n\nexport interface NodeDefExpression {\n applyIf?: string\n expression?: string\n messages?: Labels\n severity?: ValidationSeverity\n uuid: string\n}\n\nexport interface NodeDefExpressionFactoryParams {\n applyIf?: string\n expression: string\n severity?: ValidationSeverity\n}\n\nexport const NodeDefExpressionFactory: Factory<NodeDefExpression, NodeDefExpressionFactoryParams> = {\n createInstance: (params: NodeDefExpressionFactoryParams): NodeDefExpression => {\n const result = { uuid: UUIDs.v4() }\n Object.assign(result, Objects.deleteEmptyProps({ ...params }))\n return result\n },\n}\n\nexport type NodeDefCountExpression = string | NodeDefExpression[]\n\nexport interface NodeDefCountValidations {\n max?: NodeDefCountExpression\n min?: NodeDefCountExpression\n}\n\nexport interface NodeDefValidations {\n count?: NodeDefCountValidations\n expressions?: NodeDefExpression[]\n required?: boolean\n /**\n * Conditions making a single attribute required (alternative to `required`, which makes it always required).\n */\n requiredIf?: NodeDefExpression[]\n unique?: boolean\n}\n\nexport interface NodeDefPropsAdvanced {\n applicable?: NodeDefExpression[]\n defaultValues?: NodeDefExpression[]\n defaultValueEvaluatedOneTime?: boolean\n editableIf?: NodeDefExpression[]\n excludedInClone?: boolean\n formula?: NodeDefExpression[]\n validations?: NodeDefValidations\n visibleIf?: NodeDefExpression[]\n // file attribute\n fileNameExpression?: string\n // enumerate entity\n enumeratingItemsExpression?: string\n // code and taxon attribute\n itemsFilter?: string\n\n // Analysis\n script?: string\n chainUuid?: string\n index?: number\n active?: boolean\n aggregateFunctions?: { [key: string]: object }\n\n isBaseUnit?: boolean\n isSampling?: boolean\n hasAreaBasedEstimated?: boolean\n areaBasedEstimatedOf?: string // uuid of area based estimated node def\n}\n\nexport interface NodeDef<T extends NodeDefType, P extends NodeDefProps = NodeDefProps> extends ArenaObject<P> {\n analysis?: boolean\n dateCreated?: string\n dateModified?: string\n deleted?: boolean\n draft?: boolean\n id?: number\n meta: NodeDefMeta\n parentUuid?: string\n propsAdvanced?: NodeDefPropsAdvanced\n propsAdvancedDraft?: NodeDefPropsAdvanced\n published?: boolean\n temporary?: boolean\n type: T\n virtual?: boolean\n}\n\nexport interface NodeDefMap {\n [key: string]: NodeDef<any>\n}\n"]}
1
+ {"version":3,"file":"nodeDef.js","sourceRoot":"","sources":["../../src/nodeDef/nodeDef.ts"],"names":[],"mappings":";;;AAAA,oCAAyC;AAKzC,IAAY,WAeX;AAfD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,0BAAW,CAAA;IACX,gCAAiB,CAAA;IACjB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,8BAAe,CAAA;IACf,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,kBAAkB;IAClB,wCAAyB,CAAA;AAC3B,CAAC,EAfW,WAAW,aAAX,WAAW,GAAX,WAAW,QAetB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,+BAAW,CAAA;AACb,CAAC,EAHW,gBAAgB,aAAhB,gBAAgB,GAAhB,gBAAgB,QAG3B;AAqDY,QAAA,wBAAwB,GAA+D;IAClG,cAAc,EAAE,CAAC,MAAsC,EAAqB,EAAE;QAC5E,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,aAAK,CAAC,EAAE,EAAE,EAAE,CAAA;QACnC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,eAAO,CAAC,gBAAgB,mBAAM,MAAM,EAAG,CAAC,CAAA;QAC9D,OAAO,MAAM,CAAA;IACf,CAAC;CACF,CAAA","sourcesContent":["import { Objects, UUIDs } from '../utils'\nimport { ArenaObject, Factory } from '../common'\nimport { Labels } from '../language'\nimport { ValidationSeverity } from '../validation'\n\nexport enum NodeDefType {\n boolean = 'boolean',\n code = 'code',\n coordinate = 'coordinate',\n date = 'date',\n decimal = 'decimal',\n geo = 'geo',\n entity = 'entity',\n file = 'file',\n integer = 'integer',\n taxon = 'taxon',\n text = 'text',\n time = 'time',\n // layout elements\n formHeader = 'formHeader',\n}\n\nexport enum NodeDefCountType {\n max = 'max',\n min = 'min',\n}\n\nexport interface NodeDefMeta {\n h: string[]\n}\n\nexport interface NodeDefProps {\n cycles?: string[]\n descriptions?: Labels\n key?: boolean\n autoIncrementalKey?: boolean\n labels?: Labels\n multiple?: boolean\n name?: string\n qualifier?: boolean\n readOnly?: boolean\n\n // available only when readOnly is true\n hidden?: boolean\n\n visibleFields?: string[]\n}\n\nexport interface NodeDefLayout {\n hiddenWhenNotRelevant?: boolean\n hiddenInMobile?: boolean\n includedInMultipleEntitySummary?: boolean\n includedInPreviousCycleLink?: boolean\n // code\n codeShown?: boolean\n}\n\nexport interface NodeDefPropsWithLayout<L extends NodeDefLayout> extends NodeDefProps {\n layout?: {\n [cycleKey: string]: L\n }\n}\n\nexport interface NodeDefExpression {\n applyIf?: string\n expression?: string\n messages?: Labels\n severity?: ValidationSeverity\n uuid: string\n}\n\nexport interface NodeDefExpressionFactoryParams {\n applyIf?: string\n expression?: string\n messages?: Labels\n severity?: ValidationSeverity\n}\n\nexport const NodeDefExpressionFactory: Factory<NodeDefExpression, NodeDefExpressionFactoryParams> = {\n createInstance: (params: NodeDefExpressionFactoryParams): NodeDefExpression => {\n const result = { uuid: UUIDs.v4() }\n Object.assign(result, Objects.deleteEmptyProps({ ...params }))\n return result\n },\n}\n\nexport type NodeDefCountExpression = string | NodeDefExpression[]\n\nexport interface NodeDefCountValidations {\n max?: NodeDefCountExpression\n min?: NodeDefCountExpression\n}\n\nexport interface NodeDefValidations {\n count?: NodeDefCountValidations\n expressions?: NodeDefExpression[]\n required?: boolean\n /**\n * Conditions making a single attribute required (alternative to `required`, which makes it always required).\n */\n requiredIf?: NodeDefExpression[]\n unique?: boolean\n}\n\nexport interface NodeDefPropsAdvanced {\n applicable?: NodeDefExpression[]\n defaultValues?: NodeDefExpression[]\n defaultValueEvaluatedOneTime?: boolean\n editableIf?: NodeDefExpression[]\n excludedInClone?: boolean\n formula?: NodeDefExpression[]\n validations?: NodeDefValidations\n visibleIf?: NodeDefExpression[]\n // file attribute\n fileNameExpression?: string\n // enumerate entity\n enumeratingItemsExpression?: string\n // code and taxon attribute\n itemsFilter?: string\n\n // Analysis\n script?: string\n chainUuid?: string\n index?: number\n active?: boolean\n aggregateFunctions?: { [key: string]: object }\n\n isBaseUnit?: boolean\n isSampling?: boolean\n hasAreaBasedEstimated?: boolean\n areaBasedEstimatedOf?: string // uuid of area based estimated node def\n}\n\nexport interface NodeDef<T extends NodeDefType, P extends NodeDefProps = NodeDefProps> extends ArenaObject<P> {\n analysis?: boolean\n dateCreated?: string\n dateModified?: string\n deleted?: boolean\n draft?: boolean\n id?: number\n meta: NodeDefMeta\n parentUuid?: string\n propsAdvanced?: NodeDefPropsAdvanced\n propsAdvancedDraft?: NodeDefPropsAdvanced\n published?: boolean\n temporary?: boolean\n type: T\n virtual?: boolean\n}\n\nexport interface NodeDefMap {\n [key: string]: NodeDef<any>\n}\n"]}
@@ -2,6 +2,9 @@ import { NodeDef, NodeDefLayout, NodeDefPropsWithLayout, NodeDefType } from '../
2
2
  export interface NodeDefEntityChildPosition {
3
3
  h?: number;
4
4
  i: string;
5
+ maxH?: number;
6
+ minH?: number;
7
+ minW?: number;
5
8
  moved?: boolean;
6
9
  static?: number;
7
10
  w?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/nodeDef/types/entity.ts"],"names":[],"mappings":";;;AAwBA,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;IACb,0CAAe,CAAA;AACjB,CAAC,EAHW,uBAAuB,aAAvB,uBAAuB,GAAvB,uBAAuB,QAGlC","sourcesContent":["import { NodeDef, NodeDefLayout, NodeDefPropsWithLayout, NodeDefType } from '../nodeDef'\n\nexport interface NodeDefEntityChildPosition {\n h?: number\n i: string\n moved?: boolean\n static?: number\n w?: number\n x: number\n y: number\n}\n\nexport type NodeDefEntityLayoutChildItem = NodeDefEntityChildPosition | string\n\nexport type NodeDefPrintOrientation = 'portrait' | 'landscape'\n\nexport interface NodeDefEntityProps extends NodeDefPropsWithLayout<NodeDefEntityLayout> {\n // Applies only to multiple entities; when true, missing repetitions up to min count are auto-created.\n autoCreateMinCountItems?: boolean\n enumerate?: boolean\n /** When set, printable export uses this orientation for the entity's print section. */\n printOrientation?: NodeDefPrintOrientation\n}\n\nexport enum NodeDefEntityRenderType {\n form = 'form',\n table = 'table',\n}\n\nexport interface NodeDefEntityLayout extends NodeDefLayout {\n columnsNo?: number\n indexChildren?: string[] // sorted children pages uuids\n layoutChildren?: NodeDefEntityLayoutChildItem[]\n pageUuid?: string\n renderType: NodeDefEntityRenderType\n}\n\nexport type NodeDefEntity = NodeDef<NodeDefType.entity, NodeDefEntityProps>\n"]}
1
+ {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/nodeDef/types/entity.ts"],"names":[],"mappings":";;;AA2BA,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,wCAAa,CAAA;IACb,0CAAe,CAAA;AACjB,CAAC,EAHW,uBAAuB,aAAvB,uBAAuB,GAAvB,uBAAuB,QAGlC","sourcesContent":["import { NodeDef, NodeDefLayout, NodeDefPropsWithLayout, NodeDefType } from '../nodeDef'\n\nexport interface NodeDefEntityChildPosition {\n h?: number\n i: string\n maxH?: number\n minH?: number\n minW?: number\n moved?: boolean\n static?: number\n w?: number\n x: number\n y: number\n}\n\nexport type NodeDefEntityLayoutChildItem = NodeDefEntityChildPosition | string\n\nexport type NodeDefPrintOrientation = 'portrait' | 'landscape'\n\nexport interface NodeDefEntityProps extends NodeDefPropsWithLayout<NodeDefEntityLayout> {\n // Applies only to multiple entities; when true, missing repetitions up to min count are auto-created.\n autoCreateMinCountItems?: boolean\n enumerate?: boolean\n /** When set, printable export uses this orientation for the entity's print section. */\n printOrientation?: NodeDefPrintOrientation\n}\n\nexport enum NodeDefEntityRenderType {\n form = 'form',\n table = 'table',\n}\n\nexport interface NodeDefEntityLayout extends NodeDefLayout {\n columnsNo?: number\n indexChildren?: string[] // sorted children pages uuids\n layoutChildren?: NodeDefEntityLayoutChildItem[]\n pageUuid?: string\n renderType: NodeDefEntityRenderType\n}\n\nexport type NodeDefEntity = NodeDef<NodeDefType.entity, NodeDefEntityProps>\n"]}
@@ -1,6 +1,8 @@
1
1
  export { NodePointers } from './nodePointers';
2
2
  export type { ArenaRecord, Record } from './record';
3
3
  export { RECORD_STEP_DEFAULT } from './record';
4
+ export type { RecordStep } from './recordStep';
5
+ export { RecordStepAnalysisCode, RecordStepCleansingCode, RecordStepEntryCode, RecordStepNames, RecordSteps, RecordStepsList, } from './recordStep';
4
6
  export { Records } from './records';
5
7
  export type { RecordUpdateOptions } from './records';
6
8
  export { RecordCloner } from './recordCloner';
@@ -1,10 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RecordPrettyPrinter = exports.RecordFactory = exports.RecordValidations = exports.RecordValidator = exports.RecordUpdater = exports.RecordUpdateResult = exports.RecordNodesUpdater = exports.RecordFixer = exports.RecordExpressionEvaluator = exports.RecordCloner = exports.Records = exports.RECORD_STEP_DEFAULT = exports.NodePointers = void 0;
3
+ exports.RecordPrettyPrinter = exports.RecordFactory = exports.RecordValidations = exports.RecordValidator = exports.RecordUpdater = exports.RecordUpdateResult = exports.RecordNodesUpdater = exports.RecordFixer = exports.RecordExpressionEvaluator = exports.RecordCloner = exports.Records = exports.RecordStepsList = exports.RecordSteps = exports.RecordStepNames = exports.RecordStepEntryCode = exports.RecordStepCleansingCode = exports.RecordStepAnalysisCode = exports.RECORD_STEP_DEFAULT = exports.NodePointers = void 0;
4
4
  var nodePointers_1 = require("./nodePointers");
5
5
  Object.defineProperty(exports, "NodePointers", { enumerable: true, get: function () { return nodePointers_1.NodePointers; } });
6
6
  var record_1 = require("./record");
7
7
  Object.defineProperty(exports, "RECORD_STEP_DEFAULT", { enumerable: true, get: function () { return record_1.RECORD_STEP_DEFAULT; } });
8
+ var recordStep_1 = require("./recordStep");
9
+ Object.defineProperty(exports, "RecordStepAnalysisCode", { enumerable: true, get: function () { return recordStep_1.RecordStepAnalysisCode; } });
10
+ Object.defineProperty(exports, "RecordStepCleansingCode", { enumerable: true, get: function () { return recordStep_1.RecordStepCleansingCode; } });
11
+ Object.defineProperty(exports, "RecordStepEntryCode", { enumerable: true, get: function () { return recordStep_1.RecordStepEntryCode; } });
12
+ Object.defineProperty(exports, "RecordStepNames", { enumerable: true, get: function () { return recordStep_1.RecordStepNames; } });
13
+ Object.defineProperty(exports, "RecordSteps", { enumerable: true, get: function () { return recordStep_1.RecordSteps; } });
14
+ Object.defineProperty(exports, "RecordStepsList", { enumerable: true, get: function () { return recordStep_1.RecordStepsList; } });
8
15
  var records_1 = require("./records");
9
16
  Object.defineProperty(exports, "Records", { enumerable: true, get: function () { return records_1.Records; } });
10
17
  var recordCloner_1 = require("./recordCloner");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/record/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AAGrB,mCAA8C;AAArC,6GAAA,mBAAmB,OAAA;AAE5B,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAGhB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA;AAElC,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,2DAA6E;AAApE,wHAAA,kBAAkB,OAAA;AAAE,wHAAA,kBAAkB,OAAA;AAE/C,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AAOxB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAE1B,qCAAyC;AAAhC,wGAAA,aAAa,OAAA;AAGtB,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA","sourcesContent":["export { NodePointers } from './nodePointers'\n\nexport type { ArenaRecord, Record } from './record'\nexport { RECORD_STEP_DEFAULT } from './record'\n\nexport { Records } from './records'\nexport type { RecordUpdateOptions } from './records'\n\nexport { RecordCloner } from './recordCloner'\nexport { RecordExpressionEvaluator } from './recordExpressionEvaluator'\nexport type { RecordExpressionContext } from './recordExpressionEvaluator'\nexport { RecordFixer } from './recordFixer'\nexport { RecordNodesUpdater, RecordUpdateResult } from './recordNodesUpdater'\nexport type { NodeCreateParams, NodesUpdateParams, RecordExpressionEvaluationContext } from './recordNodesUpdater'\nexport { RecordUpdater } from './recordUpdater'\nexport { RecordValidator } from './recordValidator'\nexport type {\n AttributeValidatorParams,\n AttributesValidatorParams,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './recordValidator'\nexport { RecordValidations } from './recordValidations'\n\nexport { RecordFactory } from './factory'\nexport type { RecordService } from './service'\n\nexport { RecordPrettyPrinter } from './recordPrettyPrinter'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/record/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AAGrB,mCAA8C;AAArC,6GAAA,mBAAmB,OAAA;AAG5B,2CAOqB;AANnB,oHAAA,sBAAsB,OAAA;AACtB,qHAAA,uBAAuB,OAAA;AACvB,iHAAA,mBAAmB,OAAA;AACnB,6GAAA,eAAe,OAAA;AACf,yGAAA,WAAW,OAAA;AACX,6GAAA,eAAe,OAAA;AAGjB,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAGhB,+CAA6C;AAApC,4GAAA,YAAY,OAAA;AACrB,yEAAuE;AAA9D,sIAAA,yBAAyB,OAAA;AAElC,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,2DAA6E;AAApE,wHAAA,kBAAkB,OAAA;AAAE,wHAAA,kBAAkB,OAAA;AAE/C,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AAOxB,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAE1B,qCAAyC;AAAhC,wGAAA,aAAa,OAAA;AAGtB,6DAA2D;AAAlD,0HAAA,mBAAmB,OAAA","sourcesContent":["export { NodePointers } from './nodePointers'\n\nexport type { ArenaRecord, Record } from './record'\nexport { RECORD_STEP_DEFAULT } from './record'\n\nexport type { RecordStep } from './recordStep'\nexport {\n RecordStepAnalysisCode,\n RecordStepCleansingCode,\n RecordStepEntryCode,\n RecordStepNames,\n RecordSteps,\n RecordStepsList,\n} from './recordStep'\n\nexport { Records } from './records'\nexport type { RecordUpdateOptions } from './records'\n\nexport { RecordCloner } from './recordCloner'\nexport { RecordExpressionEvaluator } from './recordExpressionEvaluator'\nexport type { RecordExpressionContext } from './recordExpressionEvaluator'\nexport { RecordFixer } from './recordFixer'\nexport { RecordNodesUpdater, RecordUpdateResult } from './recordNodesUpdater'\nexport type { NodeCreateParams, NodesUpdateParams, RecordExpressionEvaluationContext } from './recordNodesUpdater'\nexport { RecordUpdater } from './recordUpdater'\nexport { RecordValidator } from './recordValidator'\nexport type {\n AttributeValidatorParams,\n AttributesValidatorParams,\n RecordValidatorParams,\n SortedAttributesValidatorParams,\n} from './recordValidator'\nexport { RecordValidations } from './recordValidations'\n\nexport { RecordFactory } from './factory'\nexport type { RecordService } from './service'\n\nexport { RecordPrettyPrinter } from './recordPrettyPrinter'\n"]}
@@ -4,7 +4,7 @@ export { SurveyFileFactory, SurveyFileType } from './surveyFileFactory';
4
4
  export { SurveyDocImageFactory } from './surveyDocImageFactory';
5
5
  export type { SurveyFileFactoryParams } from './surveyFileFactory';
6
6
  export type { SurveyDocImageFactoryParams } from './surveyDocImageFactory';
7
- export type { Survey, SurveyCycle, SurveyDependencyGraph, SurveyDependency, SurveyDocImage, SurveyDocImageProps, SurveyFile, SurveyFileProps, SurveyProps, SurveySecurity, } from './survey';
7
+ export type { Survey, SurveyCycle, SurveyDependencyGraph, SurveyDependency, SurveyDocImage, SurveyDocImageProps, SurveyFile, SurveyFileProps, SurveyNodeDefsIndex, SurveyProps, SurveySecurity, } from './survey';
8
8
  export { defaultCycle, SurveyDependencyType, SurveyDocPlace, SurveySecurityProp, surveyDocImagePropKeys, surveySecurityDefaults, } from './survey';
9
9
  export { Surveys } from './surveys';
10
10
  export { SurveyFactory } from './factory';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/survey/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,yDAAuE;AAA9D,sHAAA,iBAAiB,OAAA;AAAE,mHAAA,cAAc,OAAA;AAC1C,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAiB9B,mCAOiB;AANf,sGAAA,YAAY,OAAA;AACZ,8GAAA,oBAAoB,OAAA;AACpB,wGAAA,cAAc,OAAA;AACd,4GAAA,kBAAkB,OAAA;AAClB,gHAAA,sBAAsB,OAAA;AACtB,gHAAA,sBAAsB,OAAA;AAGxB,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAEhB,qCAAyC;AAAhC,wGAAA,aAAa,OAAA;AAMtB,qCAAgD;AAAvC,+GAAA,oBAAoB,OAAA","sourcesContent":["export { NodeDefsFixer } from './nodeDefsFixer'\nexport { SurveyDocImages } from './surveyDocImages'\nexport { SurveyFileFactory, SurveyFileType } from './surveyFileFactory'\nexport { SurveyDocImageFactory } from './surveyDocImageFactory'\nexport type { SurveyFileFactoryParams } from './surveyFileFactory'\nexport type { SurveyDocImageFactoryParams } from './surveyDocImageFactory'\n\nexport type {\n Survey,\n SurveyCycle,\n SurveyDependencyGraph,\n SurveyDependency,\n SurveyDocImage,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileProps,\n SurveyProps,\n SurveySecurity,\n} from './survey'\n\nexport {\n defaultCycle,\n SurveyDependencyType,\n SurveyDocPlace,\n SurveySecurityProp,\n surveyDocImagePropKeys,\n surveySecurityDefaults,\n} from './survey'\n\nexport { Surveys } from './surveys'\n\nexport { SurveyFactory } from './factory'\n\nexport type { SurveyService } from './service'\n\nexport type { SurveyRefData } from './refData'\n\nexport { SurveyRefDataFactory } from './refData'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/survey/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,qDAAmD;AAA1C,kHAAA,eAAe,OAAA;AACxB,yDAAuE;AAA9D,sHAAA,iBAAiB,OAAA;AAAE,mHAAA,cAAc,OAAA;AAC1C,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAkB9B,mCAOiB;AANf,sGAAA,YAAY,OAAA;AACZ,8GAAA,oBAAoB,OAAA;AACpB,wGAAA,cAAc,OAAA;AACd,4GAAA,kBAAkB,OAAA;AAClB,gHAAA,sBAAsB,OAAA;AACtB,gHAAA,sBAAsB,OAAA;AAGxB,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAEhB,qCAAyC;AAAhC,wGAAA,aAAa,OAAA;AAMtB,qCAAgD;AAAvC,+GAAA,oBAAoB,OAAA","sourcesContent":["export { NodeDefsFixer } from './nodeDefsFixer'\nexport { SurveyDocImages } from './surveyDocImages'\nexport { SurveyFileFactory, SurveyFileType } from './surveyFileFactory'\nexport { SurveyDocImageFactory } from './surveyDocImageFactory'\nexport type { SurveyFileFactoryParams } from './surveyFileFactory'\nexport type { SurveyDocImageFactoryParams } from './surveyDocImageFactory'\n\nexport type {\n Survey,\n SurveyCycle,\n SurveyDependencyGraph,\n SurveyDependency,\n SurveyDocImage,\n SurveyDocImageProps,\n SurveyFile,\n SurveyFileProps,\n SurveyNodeDefsIndex,\n SurveyProps,\n SurveySecurity,\n} from './survey'\n\nexport {\n defaultCycle,\n SurveyDependencyType,\n SurveyDocPlace,\n SurveySecurityProp,\n surveyDocImagePropKeys,\n surveySecurityDefaults,\n} from './survey'\n\nexport { Surveys } from './surveys'\n\nexport { SurveyFactory } from './factory'\n\nexport type { SurveyService } from './service'\n\nexport type { SurveyRefData } from './refData'\n\nexport { SurveyRefDataFactory } from './refData'\n"]}
@@ -5,7 +5,8 @@ export declare enum DateFormats {
5
5
  datetimeStorage = "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]",// ISO
6
6
  timeStorage = "HH:mm",
7
7
  timeWithSeconds = "HH:mm:ss",
8
- datetimeDefault = "YYYY-MM-DD_HH-mm-ss"
8
+ datetimeDefault = "YYYY-MM-DD_HH-mm-ss",
9
+ datetimeExport = "YYYY-MM-DD HH:mm:ss"
9
10
  }
10
11
  export declare enum UnitOfTime {
11
12
  years = "years",
@@ -19,6 +19,7 @@ var DateFormats;
19
19
  DateFormats["timeStorage"] = "HH:mm";
20
20
  DateFormats["timeWithSeconds"] = "HH:mm:ss";
21
21
  DateFormats["datetimeDefault"] = "YYYY-MM-DD_HH-mm-ss";
22
+ DateFormats["datetimeExport"] = "YYYY-MM-DD HH:mm:ss";
22
23
  })(DateFormats || (exports.DateFormats = DateFormats = {}));
23
24
  var UnitOfTime;
24
25
  (function (UnitOfTime) {
@@ -1 +1 @@
1
- {"version":3,"file":"dates.js","sourceRoot":"","sources":["../../src/utils/dates.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,uFAA8D;AAC9D,2DAAkC;AAClC,yCAAoC;AAEpC,eAAK,CAAC,MAAM,CAAC,2BAAiB,CAAC,CAAA;AAC/B,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAA;AAEjB,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,yCAA0B,CAAA;IAC1B,yCAA0B,CAAA;IAC1B,sDAAuC,CAAA;IACvC,+DAAgD,CAAA;IAChD,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,sDAAuC,CAAA;AACzC,CAAC,EARW,WAAW,aAAX,WAAW,GAAX,WAAW,QAQtB;AAED,IAAY,UAQX;AARD,WAAY,UAAU;IACpB,6BAAe,CAAA;IACf,+BAAiB,CAAA;I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IACP,QAAQ;IACR,WAAW;IACX,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;IACX,sBAAsB;IACtB,yBAAyB;IACzB,WAAW;IACX,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,mBAAmB;IACnB,KAAK;IACL,QAAQ;IACR,iBAAiB;IACjB,GAAG;IACH,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,GAAG;IACH,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,aAAa;IACb,aAAa;IACb,WAAW;IACX,UAAU;IACV,WAAW;IACX,YAAY;IACZ,WAAW;CACZ,CAAA","sourcesContent":["import dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\nimport utc from 'dayjs/plugin/utc'\nimport { Objects } from './_objects'\n\ndayjs.extend(customParseFormat)\ndayjs.extend(utc)\n\nexport enum DateFormats {\n dateDisplay = 'DD/MM/YYYY',\n dateStorage = 'YYYY-MM-DD',\n datetimeDisplay = 'DD/MM/YYYY HH:mm:ss',\n datetimeStorage = 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]', // ISO\n timeStorage = 'HH:mm',\n timeWithSeconds = 'HH:mm:ss',\n datetimeDefault = 'YYYY-MM-DD_HH-mm-ss',\n}\n\nexport enum UnitOfTime {\n years = 'years',\n months = 'months',\n weeks = 'weeks',\n days = 'days',\n hours = 'hours',\n minutes = 'minutes',\n seconds = 'seconds',\n}\n\ntype DateType = Date | number | string\n\nconst format = (date: number | Date | undefined, format: string): string => (date ? dayjs(date).format(format) : '')\n\n/**\n * Like `format`, but renders in UTC instead of the machine's local time zone.\n * Use this when formatting a `Date` produced by `parse`/`parseZone`-style parsing, whose\n * underlying timestamp already encodes the source digits as if they were UTC (see `parse`) -\n * formatting with the local-time `format` above would silently re-shift them by the host's offset.\n */\nconst formatUTC = (date: number | Date | undefined, format: string): string =>\n date ? dayjs.utc(date).format(format) : ''\n\nconst formatForStorage = (date: DateType): string => new Date(date).toISOString()\nconst formatForExpression = (date: DateType): string => format(new Date(date), DateFormats.datetimeDefault)\n\nconst nowFormattedForStorage = (): string => formatForStorage(new Date())\nconst nowFormattedForExpression = (): string => formatForExpression(Date.now())\n\n// ISO date or date time: YYYY-MM-DD[THH:mm[:ss[.SSS]]][Z|±HH:mm]\nconst ISO_OFFSET_REGEX = /(?:Z|[+-]\\d{2}:?\\d{2})$/\nconst ISO_DATE_REGEX = /^(\\d{4})-(\\d{2})-(\\d{2})$/\nconst ISO_TIME_REGEX = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d+)?)?$/\n\nconst invalidDate = (): Date => new Date(Number.NaN)\n\n/**\n * Parses an ISO date (or date time) string; values like 2020-02-30 are not valid (they are not moved to the next month).\n * Date only strings and date times without offset are read as UTC.\n */\nconst parseISOStrict = (dateStr: string): Date => {\n const dateTimeStr = dateStr.replace(ISO_OFFSET_REGEX, '')\n const [datePart, timePart, ...otherParts] = dateTimeStr.split(/[T ]/)\n if (otherParts.length > 0) return invalidDate()\n\n const dateMatch = ISO_DATE_REGEX.exec(datePart)\n if (!dateMatch) return invalidDate()\n const [, year, month, day] = dateMatch\n if (!isValidDate(year, month, day)) return invalidDate()\n\n if (timePart !== undefined) {\n const timeMatch = ISO_TIME_REGEX.exec(timePart)\n if (!timeMatch) return invalidDate()\n const [, hours, minutes, seconds] = timeMatch\n if (!isValidTime(hours, minutes, seconds ?? 0)) return invalidDate()\n }\n return dayjs.utc(dateStr).toDate()\n}\n\nconst parseISO = (dateStr: string): Date | undefined => (dateStr ? dayjs(dateStr).toDate() : undefined)\nconst parse = (\n dateStr: string,\n format: DateFormats,\n { keepTimeZone = true, strict = false } = {}\n): Date | undefined => {\n if (!dateStr) return undefined\n // ISO strings without an explicit offset (e.g. date only) are read as UTC, like the other formats with keepTimeZone\n if (format == DateFormats.datetimeStorage) return parseISOStrict(dateStr)\n // keepTimeZone: the formats don't contain any time zone offset, so the digits are read as UTC\n if (keepTimeZone) return dayjs.utc(dateStr, format, strict).toDate()\n return dayjs(dateStr, format, strict).toDate()\n}\n\nconst isValidDateObject = (date: Date | undefined): boolean => !!date && dayjs(date).isValid()\n\nconst isValidDateInFormat = (dateStr: string, format: DateFormats) => {\n const parsed = parse(dateStr, format, { strict: true })\n return isValidDateObject(parsed)\n}\n\nconst convertDate = (params: {\n dateStr: string\n formatFrom?: DateFormats\n formatTo: DateFormats\n keepTimeZone?: boolean\n}): string | undefined => {\n const { dateStr, formatFrom = DateFormats.dateStorage, formatTo, keepTimeZone = true } = params\n if (Objects.isEmpty(dateStr)) return undefined\n\n const dateParsed = parse(dateStr, formatFrom, { keepTimeZone })\n if (!dateParsed || !dayjs(dateParsed).isValid()) {\n return undefined\n }\n // with keepTimeZone the parsed date encodes the source digits as if they were UTC (see parse/parseZone):\n // format it in UTC too, otherwise the digits would be shifted by the time zone of this machine\n return keepTimeZone ? formatUTC(dateParsed, formatTo) : format(dateParsed, formatTo)\n}\n\n/**\n * Checks if the date is valid. Takes into account leap years\n * (i.e. 2015/2/29 is not valid).\n */\nconst isValidDate = (year: any, month: any, day: any): boolean => {\n if (Objects.isEmpty(year) || Objects.isEmpty(month) || Objects.isEmpty(day)) {\n return false\n }\n\n const date = new Date(year, month - 1, day)\n\n return (\n dayjs(date).isValid() &&\n date.getFullYear() === Number(year) &&\n date.getMonth() + 1 === Number(month) &&\n date.getDate() === Number(day)\n )\n}\n\nconst isValidTime = (hour: any = '', minutes: any = '', seconds: any = 0): boolean => {\n if (Objects.isEmpty(hour) || Objects.isEmpty(minutes)) return false\n if (!(Number(hour) >= 0 && Number(hour) < 24 && Number(minutes) >= 0 && Number(minutes) < 60)) return false\n return Number(seconds) >= 0 && Number(seconds) < 60\n}\n\nconst toDate = (date: DateType): Date | undefined => {\n if (Objects.isEmpty(date)) return undefined\n if (date instanceof Date) return date\n if (typeof date === 'string') return parseISO(date)\n if (typeof date === 'number') return new Date(date)\n return undefined\n}\n\nconst isAfter = (date: DateType, dateToCompare: DateType): boolean => {\n const _date = toDate(date)\n const _dateToCompare = toDate(dateToCompare)\n if (!_date || !_dateToCompare) return false\n return dayjs(_date).isAfter(dayjs(_dateToCompare))\n}\n\nconst isBefore = (date: DateType, dateToCompare: DateType): boolean => {\n const _date = toDate(date)\n const _dateToCompare = toDate(dateToCompare)\n if (!_date || !_dateToCompare) return false\n return dayjs(_date).isBefore(dayjs(_dateToCompare))\n}\n\nconst add = (date: DateType, value: number, unit: UnitOfTime): Date => dayjs(date).add(value, unit).toDate()\nconst addSeconds = (date: DateType, value: number): Date => add(date, value, UnitOfTime.seconds)\nconst addMinutes = (date: DateType, value: number): Date => add(date, value, UnitOfTime.minutes)\nconst addHours = (date: DateType, value: number): Date => add(date, value, UnitOfTime.hours)\nconst addDays = (date: DateType, value: number): Date => add(date, value, UnitOfTime.days)\nconst addWeeks = (date: DateType, value: number): Date => add(date, value, UnitOfTime.weeks)\nconst addMonths = (date: DateType, value: number): Date => add(date, value, UnitOfTime.months)\nconst addYears = (date: DateType, value: number): Date => add(date, value, UnitOfTime.years)\n\nconst diff = (dateA: DateType, dateB: DateType, unit: UnitOfTime, precise?: boolean): number =>\n dayjs(dateA).diff(dayjs(dateB), unit, precise)\nconst diffInSeconds = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.seconds)\nconst diffInMinutes = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.minutes)\nconst diffInHours = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.hours)\nconst diffInDays = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.days)\nconst diffInWeeks = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.weeks)\nconst diffInMonths = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.months)\nconst diffInYears = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.years)\n\nconst sub = (date: DateType, value: number, unit: UnitOfTime): Date => dayjs(date).subtract(value, unit).toDate()\nconst subSeconds = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.seconds)\nconst subMinutes = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.minutes)\nconst subHours = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.hours)\nconst subDays = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.days)\nconst subWeeks = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.weeks)\nconst subMonths = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.months)\nconst subYears = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.years)\n\n/**\n * Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).\n */\nconst getTimezoneOffset = (): number => new Date().getTimezoneOffset()\n\nexport const Dates = {\n isAfter,\n isBefore,\n isValidDate,\n isValidDateInFormat,\n isValidDateObject,\n isValidTime,\n nowFormattedForStorage,\n nowFormattedForExpression,\n convertDate,\n format,\n formatUTC,\n formatForStorage,\n formatForExpression,\n parse,\n parseISO,\n getTimezoneOffset,\n add,\n addSeconds,\n addMinutes,\n addHours,\n addDays,\n addWeeks,\n addMonths,\n addYears,\n sub,\n subSeconds,\n subMinutes,\n subHours,\n subDays,\n subWeeks,\n subMonths,\n subYears,\n diff,\n diffInSeconds,\n diffInMinutes,\n diffInHours,\n diffInDays,\n diffInWeeks,\n diffInMonths,\n diffInYears,\n}\n"]}
1
+ {"version":3,"file":"dates.js","sourceRoot":"","sources":["../../src/utils/dates.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,uFAA8D;AAC9D,2DAAkC;AAClC,yCAAoC;AAEpC,eAAK,CAAC,MAAM,CAAC,2BAAiB,CAAC,CAAA;AAC/B,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAA;AAEjB,IAAY,WASX;AATD,WAAY,WAAW;IACrB,yCAA0B,CAAA;IAC1B,yCAA0B,CAA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AAG,CAAC,IAAc,EAAE,KAAa,EAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAA;AAE5F;;GAEG;AACH,MAAM,iBAAiB,GAAG,GAAW,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAA;AAEzD,QAAA,KAAK,GAAG;IACnB,OAAO;IACP,QAAQ;IACR,WAAW;IACX,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;IACX,sBAAsB;IACtB,yBAAyB;IACzB,WAAW;IACX,MAAM;IACN,SAAS;IACT,gBAAgB;IAChB,mBAAmB;IACnB,KAAK;IACL,QAAQ;IACR,iBAAiB;IACjB,GAAG;IACH,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,GAAG;IACH,UAAU;IACV,UAAU;IACV,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,IAAI;IACJ,aAAa;IACb,aAAa;IACb,WAAW;IACX,UAAU;IACV,WAAW;IACX,YAAY;IACZ,WAAW;CACZ,CAAA","sourcesContent":["import dayjs from 'dayjs'\nimport customParseFormat from 'dayjs/plugin/customParseFormat'\nimport utc from 'dayjs/plugin/utc'\nimport { Objects } from './_objects'\n\ndayjs.extend(customParseFormat)\ndayjs.extend(utc)\n\nexport enum DateFormats {\n dateDisplay = 'DD/MM/YYYY',\n dateStorage = 'YYYY-MM-DD',\n datetimeDisplay = 'DD/MM/YYYY HH:mm:ss',\n datetimeStorage = 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]', // ISO\n timeStorage = 'HH:mm',\n timeWithSeconds = 'HH:mm:ss',\n datetimeDefault = 'YYYY-MM-DD_HH-mm-ss',\n datetimeExport = 'YYYY-MM-DD HH:mm:ss', // exported files (e.g. CSV)\n}\n\nexport enum UnitOfTime {\n years = 'years',\n months = 'months',\n weeks = 'weeks',\n days = 'days',\n hours = 'hours',\n minutes = 'minutes',\n seconds = 'seconds',\n}\n\ntype DateType = Date | number | string\n\nconst format = (date: number | Date | undefined, format: string): string => (date ? dayjs(date).format(format) : '')\n\n/**\n * Like `format`, but renders in UTC instead of the machine's local time zone.\n * Use this when formatting a `Date` produced by `parse`/`parseZone`-style parsing, whose\n * underlying timestamp already encodes the source digits as if they were UTC (see `parse`) -\n * formatting with the local-time `format` above would silently re-shift them by the host's offset.\n */\nconst formatUTC = (date: number | Date | undefined, format: string): string =>\n date ? dayjs.utc(date).format(format) : ''\n\nconst formatForStorage = (date: DateType): string => new Date(date).toISOString()\nconst formatForExpression = (date: DateType): string => format(new Date(date), DateFormats.datetimeDefault)\n\nconst nowFormattedForStorage = (): string => formatForStorage(new Date())\nconst nowFormattedForExpression = (): string => formatForExpression(Date.now())\n\n// ISO date or date time: YYYY-MM-DD[THH:mm[:ss[.SSS]]][Z|±HH:mm]\nconst ISO_OFFSET_REGEX = /(?:Z|[+-]\\d{2}:?\\d{2})$/\nconst ISO_DATE_REGEX = /^(\\d{4})-(\\d{2})-(\\d{2})$/\nconst ISO_TIME_REGEX = /^(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d+)?)?$/\n\nconst invalidDate = (): Date => new Date(Number.NaN)\n\n/**\n * Parses an ISO date (or date time) string; values like 2020-02-30 are not valid (they are not moved to the next month).\n * Date only strings and date times without offset are read as UTC.\n */\nconst parseISOStrict = (dateStr: string): Date => {\n const dateTimeStr = dateStr.replace(ISO_OFFSET_REGEX, '')\n const [datePart, timePart, ...otherParts] = dateTimeStr.split(/[T ]/)\n if (otherParts.length > 0) return invalidDate()\n\n const dateMatch = ISO_DATE_REGEX.exec(datePart)\n if (!dateMatch) return invalidDate()\n const [, year, month, day] = dateMatch\n if (!isValidDate(year, month, day)) return invalidDate()\n\n if (timePart !== undefined) {\n const timeMatch = ISO_TIME_REGEX.exec(timePart)\n if (!timeMatch) return invalidDate()\n const [, hours, minutes, seconds] = timeMatch\n if (!isValidTime(hours, minutes, seconds ?? 0)) return invalidDate()\n }\n return dayjs.utc(dateStr).toDate()\n}\n\nconst parseISO = (dateStr: string): Date | undefined => (dateStr ? dayjs(dateStr).toDate() : undefined)\nconst parse = (\n dateStr: string,\n format: DateFormats,\n { keepTimeZone = true, strict = false } = {}\n): Date | undefined => {\n if (!dateStr) return undefined\n // ISO strings without an explicit offset (e.g. date only) are read as UTC, like the other formats with keepTimeZone\n if (format == DateFormats.datetimeStorage) return parseISOStrict(dateStr)\n // keepTimeZone: the formats don't contain any time zone offset, so the digits are read as UTC\n if (keepTimeZone) return dayjs.utc(dateStr, format, strict).toDate()\n return dayjs(dateStr, format, strict).toDate()\n}\n\nconst isValidDateObject = (date: Date | undefined): boolean => !!date && dayjs(date).isValid()\n\nconst isValidDateInFormat = (dateStr: string, format: DateFormats) => {\n const parsed = parse(dateStr, format, { strict: true })\n return isValidDateObject(parsed)\n}\n\nconst convertDate = (params: {\n dateStr: string\n formatFrom?: DateFormats\n formatTo: DateFormats\n keepTimeZone?: boolean\n}): string | undefined => {\n const { dateStr, formatFrom = DateFormats.dateStorage, formatTo, keepTimeZone = true } = params\n if (Objects.isEmpty(dateStr)) return undefined\n\n const dateParsed = parse(dateStr, formatFrom, { keepTimeZone })\n if (!dateParsed || !dayjs(dateParsed).isValid()) {\n return undefined\n }\n // with keepTimeZone the parsed date encodes the source digits as if they were UTC (see parse/parseZone):\n // format it in UTC too, otherwise the digits would be shifted by the time zone of this machine\n return keepTimeZone ? formatUTC(dateParsed, formatTo) : format(dateParsed, formatTo)\n}\n\n/**\n * Checks if the date is valid. Takes into account leap years\n * (i.e. 2015/2/29 is not valid).\n */\nconst isValidDate = (year: any, month: any, day: any): boolean => {\n if (Objects.isEmpty(year) || Objects.isEmpty(month) || Objects.isEmpty(day)) {\n return false\n }\n\n const date = new Date(year, month - 1, day)\n\n return (\n dayjs(date).isValid() &&\n date.getFullYear() === Number(year) &&\n date.getMonth() + 1 === Number(month) &&\n date.getDate() === Number(day)\n )\n}\n\nconst isValidTime = (hour: any = '', minutes: any = '', seconds: any = 0): boolean => {\n if (Objects.isEmpty(hour) || Objects.isEmpty(minutes)) return false\n if (!(Number(hour) >= 0 && Number(hour) < 24 && Number(minutes) >= 0 && Number(minutes) < 60)) return false\n return Number(seconds) >= 0 && Number(seconds) < 60\n}\n\nconst toDate = (date: DateType): Date | undefined => {\n if (Objects.isEmpty(date)) return undefined\n if (date instanceof Date) return date\n if (typeof date === 'string') return parseISO(date)\n if (typeof date === 'number') return new Date(date)\n return undefined\n}\n\nconst isAfter = (date: DateType, dateToCompare: DateType): boolean => {\n const _date = toDate(date)\n const _dateToCompare = toDate(dateToCompare)\n if (!_date || !_dateToCompare) return false\n return dayjs(_date).isAfter(dayjs(_dateToCompare))\n}\n\nconst isBefore = (date: DateType, dateToCompare: DateType): boolean => {\n const _date = toDate(date)\n const _dateToCompare = toDate(dateToCompare)\n if (!_date || !_dateToCompare) return false\n return dayjs(_date).isBefore(dayjs(_dateToCompare))\n}\n\nconst add = (date: DateType, value: number, unit: UnitOfTime): Date => dayjs(date).add(value, unit).toDate()\nconst addSeconds = (date: DateType, value: number): Date => add(date, value, UnitOfTime.seconds)\nconst addMinutes = (date: DateType, value: number): Date => add(date, value, UnitOfTime.minutes)\nconst addHours = (date: DateType, value: number): Date => add(date, value, UnitOfTime.hours)\nconst addDays = (date: DateType, value: number): Date => add(date, value, UnitOfTime.days)\nconst addWeeks = (date: DateType, value: number): Date => add(date, value, UnitOfTime.weeks)\nconst addMonths = (date: DateType, value: number): Date => add(date, value, UnitOfTime.months)\nconst addYears = (date: DateType, value: number): Date => add(date, value, UnitOfTime.years)\n\nconst diff = (dateA: DateType, dateB: DateType, unit: UnitOfTime, precise?: boolean): number =>\n dayjs(dateA).diff(dayjs(dateB), unit, precise)\nconst diffInSeconds = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.seconds)\nconst diffInMinutes = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.minutes)\nconst diffInHours = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.hours)\nconst diffInDays = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.days)\nconst diffInWeeks = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.weeks)\nconst diffInMonths = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.months)\nconst diffInYears = (dateA: DateType, dateB: DateType): number => diff(dateA, dateB, UnitOfTime.years)\n\nconst sub = (date: DateType, value: number, unit: UnitOfTime): Date => dayjs(date).subtract(value, unit).toDate()\nconst subSeconds = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.seconds)\nconst subMinutes = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.minutes)\nconst subHours = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.hours)\nconst subDays = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.days)\nconst subWeeks = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.weeks)\nconst subMonths = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.months)\nconst subYears = (date: DateType, value: number): Date => sub(date, value, UnitOfTime.years)\n\n/**\n * Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).\n */\nconst getTimezoneOffset = (): number => new Date().getTimezoneOffset()\n\nexport const Dates = {\n isAfter,\n isBefore,\n isValidDate,\n isValidDateInFormat,\n isValidDateObject,\n isValidTime,\n nowFormattedForStorage,\n nowFormattedForExpression,\n convertDate,\n format,\n formatUTC,\n formatForStorage,\n formatForExpression,\n parse,\n parseISO,\n getTimezoneOffset,\n add,\n addSeconds,\n addMinutes,\n addHours,\n addDays,\n addWeeks,\n addMonths,\n addYears,\n sub,\n subSeconds,\n subMinutes,\n subHours,\n subDays,\n subWeeks,\n subMonths,\n subYears,\n diff,\n diffInSeconds,\n diffInMinutes,\n diffInHours,\n diffInDays,\n diffInWeeks,\n diffInMonths,\n diffInYears,\n}\n"]}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "OpenForis",
5
5
  "email": "openforis.arena@gmail.com"
6
6
  },
7
- "version": "2.22.0",
7
+ "version": "2.24.0",
8
8
  "description": "Arena core module",
9
9
  "repository": {
10
10
  "type": "git",