Skip to content
Snippets Groups Projects
Verified Commit ec0db468 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent fcc71af1
No related branches found
No related tags found
No related merge requests found
Showing
with 92 additions and 26 deletions
...@@ -5,6 +5,12 @@ ...@@ -5,6 +5,12 @@
* @author schukai GmbH * @author schukai GmbH
*/ */
export {
internalSymbol,
internalStateSymbol
}
/** /**
* @private * @private
* @type {symbol} * @type {symbol}
...@@ -21,9 +27,3 @@ const internalSymbol = Symbol('internalData'); ...@@ -21,9 +27,3 @@ const internalSymbol = Symbol('internalData');
*/ */
const internalStateSymbol = Symbol('state'); const internalStateSymbol = Symbol('state');
export {
internalSymbol,
internalStateSymbol
}
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
import {Base} from '../types/base.js'; import {Base} from '../types/base.js';
export {AbstractConstraint}
/** /**
* Constraints are used to define conditions that must be met by the value of a variable. * Constraints are used to define conditions that must be met by the value of a variable.
...@@ -22,7 +23,7 @@ import {Base} from '../types/base.js'; ...@@ -22,7 +23,7 @@ import {Base} from '../types/base.js';
* @memberOf Monster.Constraints * @memberOf Monster.Constraints
* @summary The abstract constraint * @summary The abstract constraint
*/ */
export class AbstractConstraint extends Base { class AbstractConstraint extends Base {
/** /**
* *
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
import {AbstractConstraint} from "./abstract.js"; import {AbstractConstraint} from "./abstract.js";
export {AbstractOperator}
/** /**
* Constraints are used to define conditions that must be met by the value of a variable. * Constraints are used to define conditions that must be met by the value of a variable.
* *
...@@ -18,7 +20,7 @@ import {AbstractConstraint} from "./abstract.js"; ...@@ -18,7 +20,7 @@ import {AbstractConstraint} from "./abstract.js";
* @memberOf Monster.Constraints * @memberOf Monster.Constraints
* @summary The abstract operator constraint * @summary The abstract operator constraint
*/ */
export class AbstractOperator extends AbstractConstraint { class AbstractOperator extends AbstractConstraint {
/** /**
* *
......
...@@ -4,9 +4,10 @@ ...@@ -4,9 +4,10 @@
* @author schukai GmbH * @author schukai GmbH
*/ */
import {AbstractOperator} from "./abstractoperator.js"; import {AbstractOperator} from "./abstractoperator.js";
export {AndOperator}
/** /**
* Constraints are used to define conditions that must be met by the value of a variable. * Constraints are used to define conditions that must be met by the value of a variable.
* *
...@@ -44,7 +45,7 @@ import {AbstractOperator} from "./abstractoperator.js"; ...@@ -44,7 +45,7 @@ import {AbstractOperator} from "./abstractoperator.js";
* @memberOf Monster.Constraints * @memberOf Monster.Constraints
* @summary A and operator constraint * @summary A and operator constraint
*/ */
export class AndOperator extends AbstractOperator { class AndOperator extends AbstractOperator {
/** /**
* this method return a promise containing the result of the check. * this method return a promise containing the result of the check.
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
import {AbstractConstraint} from "./abstract.js"; import {AbstractConstraint} from "./abstract.js";
export {Invalid}
/** /**
* Constraints are used to define conditions that must be met by the value of a variable. * Constraints are used to define conditions that must be met by the value of a variable.
* *
...@@ -34,7 +36,7 @@ import {AbstractConstraint} from "./abstract.js"; ...@@ -34,7 +36,7 @@ import {AbstractConstraint} from "./abstract.js";
* @memberOf Monster.Constraints * @memberOf Monster.Constraints
* @summary A constraint that always invalid * @summary A constraint that always invalid
*/ */
export class Invalid extends AbstractConstraint { class Invalid extends AbstractConstraint {
/** /**
* this method return a rejected promise * this method return a rejected promise
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
import {isArray} from "../types/is.js"; import {isArray} from "../types/is.js";
import {AbstractConstraint} from "./abstract.js"; import {AbstractConstraint} from "./abstract.js";
export {IsArray}
/** /**
* Constraints are used to define conditions that must be met by the value of a variable. * Constraints are used to define conditions that must be met by the value of a variable.
* *
...@@ -38,7 +40,7 @@ import {AbstractConstraint} from "./abstract.js"; ...@@ -38,7 +40,7 @@ import {AbstractConstraint} from "./abstract.js";
* @memberOf Monster.Constraints * @memberOf Monster.Constraints
* @summary A constraint to check if a value is an array * @summary A constraint to check if a value is an array
*/ */
export class IsArray extends AbstractConstraint { class IsArray extends AbstractConstraint {
/** /**
* this method return a promise containing the result of the check. * this method return a promise containing the result of the check.
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
import {isObject} from "../types/is.js"; import {isObject} from "../types/is.js";
import {AbstractConstraint} from "./abstract.js"; import {AbstractConstraint} from "./abstract.js";
export {IsObject}
/** /**
* Constraints are used to define conditions that must be met by the value of a variable. * Constraints are used to define conditions that must be met by the value of a variable.
* *
...@@ -39,7 +41,7 @@ import {AbstractConstraint} from "./abstract.js"; ...@@ -39,7 +41,7 @@ import {AbstractConstraint} from "./abstract.js";
* @memberOf Monster.Constraints * @memberOf Monster.Constraints
* @summary A constraint to check if a value is an object * @summary A constraint to check if a value is an object
*/ */
export class IsObject extends AbstractConstraint { class IsObject extends AbstractConstraint {
/** /**
* this method return a promise containing the result of the check. * this method return a promise containing the result of the check.
......
'use strict';
/**
* Constraints are used to define conditions that must be met by the value of a variable so that the value can be transferred to the system.
*
* @namespace Monster.Constraints
* @memberOf Monster
* @author schukai GmbH
*/
const ns = {};
\ No newline at end of file
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
import {AbstractOperator} from "./abstractoperator.js"; import {AbstractOperator} from "./abstractoperator.js";
export {OrOperator}
/** /**
* Constraints are used to define conditions that must be met by the value of a variable. * Constraints are used to define conditions that must be met by the value of a variable.
* *
...@@ -43,7 +45,7 @@ import {AbstractOperator} from "./abstractoperator.js"; ...@@ -43,7 +45,7 @@ import {AbstractOperator} from "./abstractoperator.js";
* @memberOf Monster.Constraints * @memberOf Monster.Constraints
* @summary A or operator * @summary A or operator
*/ */
export class OrOperator extends AbstractOperator { class OrOperator extends AbstractOperator {
/** /**
* this method return a promise containing the result of the check. * this method return a promise containing the result of the check.
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
import {AbstractConstraint} from "./abstract.js"; import {AbstractConstraint} from "./abstract.js";
export {Valid}
/** /**
* Constraints are used to define conditions that must be met by the value of a variable. * Constraints are used to define conditions that must be met by the value of a variable.
* *
...@@ -34,7 +36,7 @@ import {AbstractConstraint} from "./abstract.js"; ...@@ -34,7 +36,7 @@ import {AbstractConstraint} from "./abstract.js";
* @memberOf Monster.Constraints * @memberOf Monster.Constraints
* @summary A constraint that always valid * @summary A constraint that always valid
*/ */
export class Valid extends AbstractConstraint { class Valid extends AbstractConstraint {
/** /**
* this method return a promise containing the result of the check. * this method return a promise containing the result of the check.
......
...@@ -10,12 +10,13 @@ import {validateString} from "../types/validate.js"; ...@@ -10,12 +10,13 @@ import {validateString} from "../types/validate.js";
import {clone} from "../util/clone.js"; import {clone} from "../util/clone.js";
import {DELIMITER, Pathfinder, WILDCARD} from "./pathfinder.js"; import {DELIMITER, Pathfinder, WILDCARD} from "./pathfinder.js";
export {buildMap, PARENT, assembleParts}
/** /**
* @type {string} * @type {string}
* @memberOf Monster.Data * @memberOf Monster.Data
*/ */
export const PARENT = '^'; const PARENT = '^';
/** /**
...@@ -115,7 +116,7 @@ export const PARENT = '^'; ...@@ -115,7 +116,7 @@ export const PARENT = '^';
* @throws {TypeError} value is neither a string nor a function * @throws {TypeError} value is neither a string nor a function
* @throws {TypeError} the selector callback must return a map * @throws {TypeError} the selector callback must return a map
*/ */
export function buildMap(subject, selector, valueTemplate, keyTemplate, filter) { function buildMap(subject, selector, valueTemplate, keyTemplate, filter) {
return assembleParts(subject, selector, filter, function (v, k, m) { return assembleParts(subject, selector, filter, function (v, k, m) {
k = build(v, keyTemplate, k); k = build(v, keyTemplate, k);
v = build(v, valueTemplate); v = build(v, valueTemplate);
...@@ -124,6 +125,7 @@ export function buildMap(subject, selector, valueTemplate, keyTemplate, filter) ...@@ -124,6 +125,7 @@ export function buildMap(subject, selector, valueTemplate, keyTemplate, filter)
} }
/** /**
* @private * @private
* @param {*} subject * @param {*} subject
...@@ -133,7 +135,7 @@ export function buildMap(subject, selector, valueTemplate, keyTemplate, filter) ...@@ -133,7 +135,7 @@ export function buildMap(subject, selector, valueTemplate, keyTemplate, filter)
* @return {Map} * @return {Map}
* @throws {TypeError} selector is neither a string nor a function * @throws {TypeError} selector is neither a string nor a function
*/ */
export function assembleParts(subject, selector, filter, callback) { function assembleParts(subject, selector, filter, callback) {
const result = new Map(); const result = new Map();
......
...@@ -11,6 +11,7 @@ import {NodeList} from "../types/nodelist.js"; ...@@ -11,6 +11,7 @@ import {NodeList} from "../types/nodelist.js";
import {assembleParts} from "./buildmap.js"; import {assembleParts} from "./buildmap.js";
import {extend} from "./extend.js"; import {extend} from "./extend.js";
export {buildTree}
/** /**
* @private * @private
...@@ -53,7 +54,7 @@ const rootSymbol = Symbol('root'); ...@@ -53,7 +54,7 @@ const rootSymbol = Symbol('root');
* @throws {Error} the object has no value for the specified id * @throws {Error} the object has no value for the specified id
* @since 1.26.0 * @since 1.26.0
*/ */
export function buildTree(subject, selector, idKey, parentIDKey, options) { function buildTree(subject, selector, idKey, parentIDKey, options) {
const nodes = new Map; const nodes = new Map;
......
...@@ -14,6 +14,7 @@ import {validateObject} from "../types/validate.js"; ...@@ -14,6 +14,7 @@ import {validateObject} from "../types/validate.js";
import {extend} from "./extend.js"; import {extend} from "./extend.js";
import {Pathfinder} from "./pathfinder.js"; import {Pathfinder} from "./pathfinder.js";
export {Datasource}
/** /**
* @private * @private
...@@ -49,7 +50,7 @@ const internalDataSymbol = Symbol('internalData'); ...@@ -49,7 +50,7 @@ const internalDataSymbol = Symbol('internalData');
* @memberOf Monster.Data * @memberOf Monster.Data
* @summary The datasource class encapsulates the access to data objects. * @summary The datasource class encapsulates the access to data objects.
*/ */
export class Datasource extends Base { class Datasource extends Base {
/** /**
* *
......
'use strict';
/**
* Namespace for datasources
*
* @namespace Monster.Data.Datasource
* @memberOf Monster.Data
* @author schukai GmbH
*/
const ns = {};
\ No newline at end of file
...@@ -12,6 +12,8 @@ import {Pathfinder} from "../pathfinder.js"; ...@@ -12,6 +12,8 @@ import {Pathfinder} from "../pathfinder.js";
import {Pipe} from "../pipe.js"; import {Pipe} from "../pipe.js";
import {WriteError} from "./restapi/writeerror.js"; import {WriteError} from "./restapi/writeerror.js";
export {RestAPI}
/** /**
* The RestAPI is a class that enables a REST API server. * The RestAPI is a class that enables a REST API server.
* *
...@@ -41,7 +43,7 @@ import {WriteError} from "./restapi/writeerror.js"; ...@@ -41,7 +43,7 @@ import {WriteError} from "./restapi/writeerror.js";
* @memberOf Monster.Data.Datasource * @memberOf Monster.Data.Datasource
* @summary The LocalStorage class encapsulates the access to data objects. * @summary The LocalStorage class encapsulates the access to data objects.
*/ */
export class RestAPI extends Datasource { class RestAPI extends Datasource {
/** /**
* *
......
'use strict';
/**
* Namespace for storages
*
* @namespace Monster.Data.Datasource.RestAPI
* @memberOf Monster.Data.Datasource
* @author schukai GmbH
*/
const ns = {};
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
import {internalSymbol} from "../../../constants.js"; import {internalSymbol} from "../../../constants.js";
import {assignToNamespace, Monster} from '../../../namespace.js'; import {assignToNamespace, Monster} from '../../../namespace.js';
export {WriteError}
/** /**
* Error message for API requests with extension of request and validation. * Error message for API requests with extension of request and validation.
* *
...@@ -15,7 +17,7 @@ import {assignToNamespace, Monster} from '../../../namespace.js'; ...@@ -15,7 +17,7 @@ import {assignToNamespace, Monster} from '../../../namespace.js';
* @memberOf Monster.Data.Datasource.RestAPI * @memberOf Monster.Data.Datasource.RestAPI
* @summary the error is thrown by the rest api in case of error * @summary the error is thrown by the rest api in case of error
*/ */
export class WriteError extends Error { class WriteError extends Error {
/** /**
* *
* @param {string} message * @param {string} message
......
...@@ -9,11 +9,13 @@ import {assignToNamespace, Monster} from '../../namespace.js'; ...@@ -9,11 +9,13 @@ import {assignToNamespace, Monster} from '../../namespace.js';
import {validateString} from "../../types/validate.js"; import {validateString} from "../../types/validate.js";
import {Datasource} from "../datasource.js"; import {Datasource} from "../datasource.js";
export {Storage}
/** /**
* @private * @private
* @type {symbol} * @type {symbol}
*/ */
export const storageObjectSymbol = Symbol('storageObject'); const storageObjectSymbol = Symbol('storageObject');
/** /**
* The class represents a record. * The class represents a record.
...@@ -36,7 +38,7 @@ export const storageObjectSymbol = Symbol('storageObject'); ...@@ -36,7 +38,7 @@ export const storageObjectSymbol = Symbol('storageObject');
* @memberOf Monster.Data.Datasource * @memberOf Monster.Data.Datasource
* @summary The Storage class encapsulates the access to data objects over WebStorageAPI. * @summary The Storage class encapsulates the access to data objects over WebStorageAPI.
*/ */
export class Storage extends Datasource { class Storage extends Datasource {
/** /**
* *
......
...@@ -10,6 +10,8 @@ import {getGlobalObject} from "../../../types/global.js"; ...@@ -10,6 +10,8 @@ import {getGlobalObject} from "../../../types/global.js";
import {Datasource} from "../../datasource.js"; import {Datasource} from "../../datasource.js";
import {Storage, storageObjectSymbol} from "../storage.js"; import {Storage, storageObjectSymbol} from "../storage.js";
export {LocalStorage}
/** /**
* The LocalStorage Datasource provides a data store in the browser localStorage. * The LocalStorage Datasource provides a data store in the browser localStorage.
* *
...@@ -25,7 +27,7 @@ import {Storage, storageObjectSymbol} from "../storage.js"; ...@@ -25,7 +27,7 @@ import {Storage, storageObjectSymbol} from "../storage.js";
* @memberOf Monster.Data.Datasource.Storage * @memberOf Monster.Data.Datasource.Storage
* @summary The LocalStorage class encapsulates the access to data objects. * @summary The LocalStorage class encapsulates the access to data objects.
*/ */
export class LocalStorage extends Storage { class LocalStorage extends Storage {
/** /**
* @throws {Error} this method must be implemented by derived classes. * @throws {Error} this method must be implemented by derived classes.
......
'use strict';
/**
* Namespace for storages
*
* @namespace Monster.Data.Datasource.Storage
* @memberOf Monster.Data.Datasource
* @author schukai GmbH
*/
const ns = {};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment