Socket
Socket
Sign inDemoInstall

@platform/cell.typesystem

Package Overview
Dependencies
37
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.221 to 0.0.222

2

lib/common/constants.js

@@ -7,2 +7,2 @@ "use strict";

Object.defineProperty(exports, "ERROR", { enumerable: true, get: function () { return constants_1.ERROR; } });
tslib_1.__exportStar(require("./constants.pkg"), exports);
(0, tslib_1.__exportStar)(require("./constants.pkg"), exports);

@@ -6,3 +6,3 @@ "use strict";

name: '@platform/cell.typesystem',
version: '0.0.221',
version: '0.0.222',
};

@@ -9,3 +9,3 @@ "use strict";

this.defaultType = args.defaultType;
this._list = args.errors ? tslib_1.__spreadArray([], args.errors) : [];
this._list = args.errors ? (0, tslib_1.__spreadArray)([], args.errors, true) : [];
}

@@ -12,0 +12,0 @@ Object.defineProperty(ErrorList.prototype, "length", {

@@ -9,5 +9,5 @@ "use strict";

exports.constants = constants;
tslib_1.__exportStar(require("./libs"), exports);
(0, tslib_1.__exportStar)(require("./libs"), exports);
exports.ERROR = constants.ERROR;
var ErrorList_1 = require("./ErrorList");
Object.defineProperty(exports, "ErrorList", { enumerable: true, get: function () { return ErrorList_1.ErrorList; } });

@@ -8,4 +8,4 @@ "use strict";

Object.defineProperty(exports, "Observable", { enumerable: true, get: function () { return rxjs_1.Observable; } });
tslib_1.__exportStar(require("@platform/types"), exports);
tslib_1.__exportStar(require("@platform/cell.types"), exports);
tslib_1.__exportStar(require("../types"), exports);
(0, tslib_1.__exportStar)(require("@platform/types"), exports);
(0, tslib_1.__exportStar)(require("@platform/cell.types"), exports);
(0, tslib_1.__exportStar)(require("../types"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeSystem"), exports);
(0, tslib_1.__exportStar)(require("./TypeSystem"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("@platform/cell.types/lib/types.TypeSystem"), exports);
(0, tslib_1.__exportStar)(require("@platform/cell.types/lib/types.TypeSystem"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeBuilder"), exports);
(0, tslib_1.__exportStar)(require("./TypeBuilder"), exports);

@@ -23,3 +23,3 @@ "use strict";

return this.builders.reduce(function (acc, builder) {
return tslib_1.__spreadArray(tslib_1.__spreadArray([], acc), _this.toTypeDef(builder));
return (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], acc, true), _this.toTypeDef(builder), true);
}, []);

@@ -57,6 +57,6 @@ };

TypeBuilder.prototype.write = function (http) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var defs, typeDefs, saved, exists, errors, save;
var _this = this;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -69,5 +69,5 @@ case 0:

errors = [];
save = function (typeDef) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
save = function (typeDef) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var ns, typename, def, client, error;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -74,0 +74,0 @@ case 0:

@@ -11,3 +11,3 @@ "use strict";

.name(args.name)
.type(common_1.defaultValue(args.type, 'string'))
.type((0, common_1.defaultValue)(args.type, 'string'))
.target(args.target)

@@ -14,0 +14,0 @@ .default(args.default);

@@ -21,3 +21,3 @@ "use strict";

}
var startColumn = common_1.defaultValue(args.startColumn, 0);
var startColumn = (0, common_1.defaultValue)(args.startColumn, 0);
if (typeof startColumn === 'string') {

@@ -64,3 +64,3 @@ if (!common_1.coord.cell.isColumn(startColumn)) {

var options = typeof arg === 'string' || arg === undefined ? { type: arg } : arg;
return TypeBuilderProp_1.TypeBuilderProp.create(tslib_1.__assign(tslib_1.__assign({}, options), { column: column, name: name, onChange: onChange }));
return TypeBuilderProp_1.TypeBuilderProp.create((0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), { column: column, name: name, onChange: onChange }));
};

@@ -67,0 +67,0 @@ var builder = typeof arg === 'function'

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeCache"), exports);
tslib_1.__exportStar(require("./TypeCacheKey"), exports);
tslib_1.__exportStar(require("./TypeCacheCells"), exports);
(0, tslib_1.__exportStar)(require("./TypeCache"), exports);
(0, tslib_1.__exportStar)(require("./TypeCacheKey"), exports);
(0, tslib_1.__exportStar)(require("./TypeCacheCells"), exports);

@@ -31,5 +31,5 @@ "use strict";

}
var getNs = function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var getNs = function (args) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var key, res_1;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -50,5 +50,5 @@ case 0:

}); };
var getColumns = function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var getColumns = function (args) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var key, res_2;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -69,5 +69,5 @@ case 0:

}); };
var getCells = function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var getCells = function (args) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var key, cells, res;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -89,5 +89,5 @@ case 0:

}); };
var res = tslib_1.__assign({ cache: cache, cacheKey: fetchKey }, TypeSystem_fetch_1.fetcher.fromFuncs({ getNs: getNs, getColumns: getColumns, getCells: getCells }));
var res = (0, tslib_1.__assign)({ cache: cache, cacheKey: fetchKey }, TypeSystem_fetch_1.fetcher.fromFuncs({ getNs: getNs, getColumns: getColumns, getCells: getCells }));
return res;
}
exports.wrapFetch = wrapFetch;

@@ -25,5 +25,5 @@ "use strict";

if (options === void 0) { options = {}; }
return tslib_1.__awaiter(_this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var ns, rowQuery, res;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -42,8 +42,8 @@ case 0:

res = _a.sent();
this.cells = res.cells ? tslib_1.__assign(tslib_1.__assign({}, this.cells), res.cells) : this.cells;
this.total = tslib_1.__assign(tslib_1.__assign({}, this.total), res.total);
this.cells = res.cells ? (0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.cells), res.cells) : this.cells;
this.total = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.total), res.total);
this.error = res.error ? res.error : this.error;
this.rowQueries = this.rowQueries.includes(rowQuery)
? this.rowQueries
: tslib_1.__spreadArray(tslib_1.__spreadArray([], this.rowQueries), [rowQuery]);
: (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], this.rowQueries, true), [rowQuery], false);
return [2, this.toResult({ range: range })];

@@ -69,3 +69,3 @@ }

}, {});
this.cells = tslib_1.__assign(tslib_1.__assign({}, this.cells), diffs);
this.cells = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.cells), diffs);
this.total.rows = -1;

@@ -101,5 +101,5 @@ }

TypeCacheCells.prototype.refreshTotal = function (args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var fetch, ns, skip, res;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -112,3 +112,3 @@ case 0:

res = _a.sent();
this.total = tslib_1.__assign(tslib_1.__assign({}, this.total), res.total);
this.total = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, this.total), res.total);
_a.label = 2;

@@ -115,0 +115,0 @@ case 2: return [2];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeClient"), exports);
(0, tslib_1.__exportStar)(require("./TypeClient"), exports);

@@ -13,5 +13,5 @@ "use strict";

function load(args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var ns, key, value, cache, fetch, errors, ctx;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
ns = common_1.Uri.ns(args.ns, false).toString();

@@ -62,6 +62,6 @@ if (args.cache) {

var error = _a.error;
return (error ? tslib_1.__spreadArray(tslib_1.__spreadArray([], acc), [error]) : acc);
return (error ? (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], acc, true), [error], false) : acc);
}, []);
var errs = common_1.R.uniq(tslib_1.__spreadArray(tslib_1.__spreadArray([], errors.list), columnErrors));
typeDef = tslib_1.__assign(tslib_1.__assign({}, typeDef), { errors: errs });
var errs = common_1.R.uniq((0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], errors.list, true), columnErrors, true));
typeDef = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, typeDef), { errors: errs });
return typeDef;

@@ -71,6 +71,6 @@ }

var _a;
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var level, ctx, visited, cache, fetch, errors, ns, cacheKey, loading$, done, fetchedNs, error, errorType, message, message, fetchedColumns, columns, selfRefs, keys, message, _b, error_1;
var _c;
return tslib_1.__generator(this, function (_d) {
return (0, tslib_1.__generator)(this, function (_d) {
switch (_d.label) {

@@ -102,3 +102,3 @@ case 0:

if (!ok && !errs) {
errs = common_1.R.uniq(tslib_1.__spreadArray(tslib_1.__spreadArray([], errors.list), defs.reduce(function (acc, def) { return tslib_1.__spreadArray(tslib_1.__spreadArray([], acc), def.errors); }, [])));
errs = common_1.R.uniq((0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], errors.list, true), defs.reduce(function (acc, def) { return (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], acc, true), def.errors, true); }, []), true));
}

@@ -185,5 +185,5 @@ return ok ? [] : errs;

function readColumns(args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var ns, level, ctx, errors, list, wait, columns, _a, _b, _c;
return tslib_1.__generator(this, function (_d) {
return (0, tslib_1.__generator)(this, function (_d) {
switch (_d.label) {

@@ -213,6 +213,6 @@ case 0:

function readColumn(args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var ns, column, level, ctx, target, type, error, prop, optional, defaultValue, res, union, union, def;
var _a;
return tslib_1.__generator(this, function (_b) {
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {

@@ -222,3 +222,3 @@ case 0:

target = args.def.target;
type = common_1.deleteUndefined(TypeValue_1.TypeValue.parse(args.def.type).type);
type = (0, common_1.deleteUndefined)(TypeValue_1.TypeValue.parse(args.def.type).type);
prop = (args.def.prop || '').trim();

@@ -266,5 +266,5 @@ optional = prop.endsWith('?') ? true : undefined;

function toDefaultDef(args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var ctx, done, fetch_1, def, ref, value, res;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -291,5 +291,5 @@ case 0:

function readUnionRefs(args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var level, ns, column, union, ctx, _loop_1, _i, _a, type;
return tslib_1.__generator(this, function (_b) {
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {

@@ -300,3 +300,3 @@ case 0:

var res_1;
return tslib_1.__generator(this, function (_c) {
return (0, tslib_1.__generator)(this, function (_c) {
switch (_c.label) {

@@ -338,5 +338,5 @@ case 0:

function readRef(args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var ns, column, ref, level, ctx, isColumn, columnUri, nsUri, unknown, msg, msg, loaded, msg, children, def, msg, columnDef, msg, typename, types, type;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -409,3 +409,3 @@ case 0:

});
type = tslib_1.__assign(tslib_1.__assign({}, ref), { typename: typename, types: types });
type = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, ref), { typename: typename, types: types });
return [2, { type: type }];

@@ -428,4 +428,4 @@ }

.filter(function (e) { return common_1.Uri.is.uri(e.type); })
.map(function (e) { return (tslib_1.__assign(tslib_1.__assign({}, e), { uri: common_1.Uri.parse(e.type) })); })
.map(function (e) { return (tslib_1.__assign(tslib_1.__assign({}, e), { kind: e.uri.parts.type })); })
.map(function (e) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, e), { uri: common_1.Uri.parse(e.type) })); })
.map(function (e) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, e), { kind: e.uri.parts.type })); })
.filter(function (_a) {

@@ -432,0 +432,0 @@ var type = _a.type, uri = _a.uri;

@@ -22,7 +22,7 @@ "use strict";

var pkg = toPkg(PKG.name, PKG.version);
return TypeClient_fn_typescript_header_1.toTypescriptHeader({ uri: uri, pkg: pkg });
return (0, TypeClient_fn_typescript_header_1.toTypescriptHeader)({ uri: uri, pkg: pkg });
},
get declaration() {
var imports = options.imports, exports = options.exports;
var header = common_1.defaultValue(options.header, true) ? api.header : undefined;
var header = (0, common_1.defaultValue)(options.header, true) ? api.header : undefined;
var toDeclaration = function (args) {

@@ -70,8 +70,8 @@ var typename = args.typename, priorCode = args.priorCode;

save: function (fs, path) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var errors, lines, text;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {
case 0:
errors = defs.reduce(function (acc, next) { return tslib_1.__spreadArray(tslib_1.__spreadArray([], acc), next.errors); }, []);
errors = defs.reduce(function (acc, next) { return (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], acc, true), next.errors, true); }, []);
if (errors.length > 0) {

@@ -78,0 +78,0 @@ lines = errors.map(function (err, i) { return i + 1 + ") " + err.message; }).join('\n');

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeDefault"), exports);
(0, tslib_1.__exportStar)(require("./TypeDefault"), exports);

@@ -62,5 +62,5 @@ "use strict";

TypeDefault.toValue = function (args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var def, kind, value, def_1, fetch_1, err;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
def = TypeDefault.toTypeDefault(args.def);

@@ -74,6 +74,6 @@ if (!def) {

if (Array.isArray(value)) {
value = tslib_1.__spreadArray([], value);
value = (0, tslib_1.__spreadArray)([], value, true);
}
else if (typeof value === 'object' && value !== null) {
value = tslib_1.__assign({}, value);
value = (0, tslib_1.__assign)({}, value);
}

@@ -96,5 +96,5 @@ return [2, { kind: 'VALUE', value: value }];

TypeDefault.toRefValue = function (args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var def, fetch, path, uri, err, _a, ns, key, query, res, err, cell, props, value, value, PROPS, field, value;
return tslib_1.__generator(this, function (_b) {
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {

@@ -101,0 +101,0 @@ case 0:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeProp"), exports);
(0, tslib_1.__exportStar)(require("./TypeProp"), exports);

@@ -93,3 +93,3 @@ "use strict";

};
var text = write(tslib_1.__assign(tslib_1.__assign({}, args), { written: [] }));
var text = write((0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { written: [] }));
var prepend = function (content) { return (text = content ? content + "\n\n" + text : text); };

@@ -96,0 +96,0 @@ prepend(formatImports(args.imports));

@@ -12,3 +12,3 @@ "use strict";

var error = isValid ? undefined : err + " " + exports.ERROR_TYPENAME + " (given \"" + text + "\")";
return common_1.deleteUndefined({ isValid: isValid, input: text, error: error });
return (0, common_1.deleteUndefined)({ isValid: isValid, input: text, error: error });
};

@@ -36,3 +36,3 @@ if (!text) {

var error = isValid ? undefined : err + " " + exports.ERROR_PROPNAME + " (given \"" + text + "\")";
return common_1.deleteUndefined({ isValid: isValid, input: text, error: error, optional: optional });
return (0, common_1.deleteUndefined)({ isValid: isValid, input: text, error: error, optional: optional });
};

@@ -39,0 +39,0 @@ if (!text) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeScript"), exports);
(0, tslib_1.__exportStar)(require("./TypeScript"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeTarget"), exports);
(0, tslib_1.__exportStar)(require("./TypeTarget"), exports);

@@ -83,3 +83,3 @@ "use strict";

write: function (args) {
var cell = tslib_1.__assign({}, (args.cell || {}));
var cell = (0, tslib_1.__assign)({}, (args.cell || {}));
if (!target.isValid) {

@@ -151,6 +151,6 @@ throw new Error("WRITE: The target '" + target + "' is not valid.");

});
var cell = tslib_1.__assign({}, (args.cell || {}));
var cell = (0, tslib_1.__assign)({}, (args.cell || {}));
var key = common_1.RefLinks.toKey('type');
var value = common_1.RefLinks.toValue(uri, { hash: hash });
var links = tslib_1.__assign(tslib_1.__assign({}, (cell.links || {})), (_a = {}, _a[key] = value, _a));
var links = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, (cell.links || {})), (_a = {}, _a[key] = value, _a));
cell.links = common_1.Squash.object(links);

@@ -161,3 +161,3 @@ return common_1.Squash.cell(cell) || {};

if (args === void 0) { args = {}; }
var cell = tslib_1.__assign({}, (args.cell || {}));
var cell = (0, tslib_1.__assign)({}, (args.cell || {}));
if (!cell.links) {

@@ -164,0 +164,0 @@ return cell;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypeValue"), exports);
(0, tslib_1.__exportStar)(require("./TypeValue"), exports);

@@ -69,3 +69,3 @@ "use strict";

var done = function (input) {
return common_1.deleteUndefined(input || { type: unknown, input: value });
return (0, common_1.deleteUndefined)(input || { type: unknown, input: value });
};

@@ -122,3 +122,3 @@ if (typeof input !== 'string' || !value) {

var isArray = TypeValue.isArray(value) ? true : undefined;
var unknown = common_1.deleteUndefined({ kind: 'UNKNOWN', typename: value, isArray: isArray });
var unknown = (0, common_1.deleteUndefined)({ kind: 'UNKNOWN', typename: value, isArray: isArray });
if (typeof input !== 'string' || !value) {

@@ -134,3 +134,3 @@ return unknown;

var type_1 = { kind: 'VALUE', typename: typename, isArray: isArray };
return common_1.deleteUndefined(type_1);
return (0, common_1.deleteUndefined)(type_1);
}

@@ -145,3 +145,3 @@ }

var type = { kind: 'REF', uri: uri, scope: scope, typename: typename, isArray: isArray, types: [] };
return common_1.deleteUndefined(type);
return (0, common_1.deleteUndefined)(type);
}

@@ -157,3 +157,3 @@ if (value.includes("'") || value.includes("\"")) {

var type = { kind: 'ENUM', typename: typename, isArray: isArray };
return common_1.deleteUndefined(type);
return (0, common_1.deleteUndefined)(type);
});

@@ -171,3 +171,3 @@ if (enums.length === 1) {

var union = { kind: 'UNION', typename: typename, types: enums };
return common_1.deleteUndefined(union);
return (0, common_1.deleteUndefined)(union);
}

@@ -174,0 +174,0 @@ }

@@ -9,5 +9,5 @@ "use strict";

var _this = this;
var getNs = function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var getNs = function (args) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var res, exists, error, message, ns, payload;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -28,5 +28,5 @@ case 0: return [4, http.ns(args.ns).read()];

}); };
var getColumns = function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var getColumns = function (args) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var res, error, columns, payload;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -43,5 +43,5 @@ case 0: return [4, http.ns(args.ns).read({ columns: true })];

}); };
var getCells = function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var getCells = function (args) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var ns, query, res, error, cells, total, rows, payload;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -62,3 +62,3 @@ case 0:

}); };
return fetch_fromFuncs_1.fromFuncs({
return (0, fetch_fromFuncs_1.fromFuncs)({
getNs: getNs,

@@ -71,3 +71,3 @@ getColumns: getColumns,

function formatError(error, getMessage) {
return !error ? undefined : tslib_1.__assign(tslib_1.__assign({}, error), { message: getMessage(error.message) });
return !error ? undefined : (0, tslib_1.__assign)((0, tslib_1.__assign)({}, error), { message: getMessage(error.message) });
}

@@ -24,5 +24,5 @@ "use strict";

};
var getNs = function (args) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var getNs = function (args) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
var key, def, ns;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
before('getNs', args);

@@ -32,19 +32,19 @@ key = common_1.Uri.ns(args.ns).toString();

ns = !def ? undefined : (def.ns || {});
res.count = tslib_1.__assign(tslib_1.__assign({}, res.count), { getNs: res.count.getNs + 1 });
res.count = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, res.count), { getNs: res.count.getNs + 1 });
return [2, { ns: ns }];
});
}); };
var getColumns = function (args) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var getColumns = function (args) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
var def, columns;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
before('getColumns', args);
def = data.defs[args.ns];
columns = def === null || def === void 0 ? void 0 : def.columns;
res.count = tslib_1.__assign(tslib_1.__assign({}, res.count), { getColumns: res.count.getColumns + 1 });
res.count = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, res.count), { getColumns: res.count.getColumns + 1 });
return [2, { columns: columns }];
});
}); };
var getCells = function (args) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var getCells = function (args) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
var rows, total, cells;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
before('getCells', args);

@@ -54,7 +54,7 @@ rows = common_1.coord.cell.max.row(Object.keys(data.cells || {})) + 1;

cells = data.cells ? filterCells(args.query, data.cells) : undefined;
res.count = tslib_1.__assign(tslib_1.__assign({}, res.count), { getCells: res.count.getCells + 1 });
res.count = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, res.count), { getCells: res.count.getCells + 1 });
return [2, { cells: cells, total: total }];
});
}); };
var res = tslib_1.__assign(tslib_1.__assign({}, fetch_fromFuncs_1.fromFuncs({ getNs: getNs, getColumns: getColumns, getCells: getCells })), { count: {
var res = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, (0, fetch_fromFuncs_1.fromFuncs)({ getNs: getNs, getColumns: getColumns, getCells: getCells })), { count: {
getNs: 0,

@@ -66,6 +66,6 @@ getColumns: 0,

};
var instance = function (args) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var instance = function (args) { return (0, tslib_1.__awaiter)(void 0, void 0, void 0, function () {
var loaded, typeDef, cells, def;
var _a;
return tslib_1.__generator(this, function (_b) {
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {

@@ -80,3 +80,3 @@ case 0: return [4, TypeClient_1.TypeClient.load({

typeDef = args.getTypeDef ? args.getTypeDef(loaded.defs) : loaded.defs[0];
cells = tslib_1.__assign(tslib_1.__assign({}, (args.cells || {})), util_1.objectToCells(typeDef).rows(0, args.rows || []));
cells = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, (args.cells || {})), (0, util_1.objectToCells)(typeDef).rows(0, args.rows || []));
def = {

@@ -88,3 +88,3 @@ ns: { type: { implements: args.implements } },

cells: cells,
defs: tslib_1.__assign(tslib_1.__assign({}, args.defs), (_a = {}, _a[args.instance] = def, _a)),
defs: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, args.defs), (_a = {}, _a[args.instance] = def, _a)),
})];

@@ -91,0 +91,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./fetch"), exports);
(0, tslib_1.__exportStar)(require("./fetch"), exports);

@@ -13,9 +13,9 @@ "use strict";

this._watching = [];
this.dispose$ = this._dispose$.pipe(operators_1.share());
this.event$ = this._event$.pipe(operators_1.takeUntil(this.dispose$), operators_1.share());
this.dispose$ = this._dispose$.pipe((0, operators_1.share)());
this.event$ = this._event$.pipe((0, operators_1.takeUntil)(this.dispose$), (0, operators_1.share)());
this.event$
.pipe(operators_1.filter(function (e) { return e.type === 'TypedSheet/refs/loaded'; }), operators_1.map(function (e) { return e.payload; }))
.subscribe(function (e) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
.pipe((0, operators_1.filter)(function (e) { return e.type === 'TypedSheet/refs/loaded'; }), (0, operators_1.map)(function (e) { return e.payload; }))
.subscribe(function (e) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var item, sheet, info, type, uri;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -41,3 +41,3 @@ case 0:

}); });
this.changed$ = this.event$.pipe(operators_1.filter(function (e) { return e.type === 'TypedSheet/changed'; }), operators_1.map(function (e) { return e.payload; }), operators_1.filter(function (e) { return Boolean(_this.item(e.sheet)); }), operators_1.share());
this.changed$ = this.event$.pipe((0, operators_1.filter)(function (e) { return e.type === 'TypedSheet/changed'; }), (0, operators_1.map)(function (e) { return e.payload; }), (0, operators_1.filter)(function (e) { return Boolean(_this.item(e.sheet)); }), (0, operators_1.share)());
}

@@ -90,5 +90,5 @@ ChangeMonitor.create = function () {

var stop$ = new rxjs_1.Subject();
sheet.event$.pipe(operators_1.takeUntil(this.dispose$), operators_1.takeUntil(stop$)).subscribe(function (e) { return _this.fire(e); });
sheet.dispose$.pipe(operators_1.takeUntil(this.dispose$)).subscribe(function () { return _this.unwatch(sheet); });
this._watching = tslib_1.__spreadArray(tslib_1.__spreadArray([], this._watching), [{ sheet: sheet, stop$: stop$, refs: [] }]);
sheet.event$.pipe((0, operators_1.takeUntil)(this.dispose$), (0, operators_1.takeUntil)(stop$)).subscribe(function (e) { return _this.fire(e); });
sheet.dispose$.pipe((0, operators_1.takeUntil)(this.dispose$)).subscribe(function () { return _this.unwatch(sheet); });
this._watching = (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], this._watching, true), [{ sheet: sheet, stop$: stop$, refs: [] }], false);
};

@@ -95,0 +95,0 @@ ChangeMonitor.prototype.unwatch = function (sheet) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./ChangeMonitor"), exports);
(0, tslib_1.__exportStar)(require("./ChangeMonitor"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./SheetPool"), exports);
(0, tslib_1.__exportStar)(require("./SheetPool"), exports);

@@ -10,3 +10,3 @@ "use strict";

this._items = {};
this.dispose$ = this._dispose$.pipe(operators_1.share());
this.dispose$ = this._dispose$.pipe((0, operators_1.share)());
}

@@ -64,3 +64,3 @@ SheetPool.prototype.dispose = function () {

this._items[ns] = { sheet: sheet, children: [] };
sheet.dispose$.pipe(operators_1.take(1)).subscribe(function () { return _this.remove(sheet); });
sheet.dispose$.pipe((0, operators_1.take)(1)).subscribe(function () { return _this.remove(sheet); });
if (options.parent) {

@@ -67,0 +67,0 @@ var parent_1 = this._items[this.ns(options.parent)];

@@ -7,2 +7,2 @@ "use strict";

exports.t = t;
tslib_1.__exportStar(require("../../common"), exports);
(0, tslib_1.__exportStar)(require("../../common"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./TypedSheet"), exports);
(0, tslib_1.__exportStar)(require("./TypedSheet"), exports);

@@ -23,3 +23,3 @@ "use strict";

this._data = {};
this.dispose$ = this._dispose$.pipe(operators_1.share());
this.dispose$ = this._dispose$.pipe((0, operators_1.share)());
this.uri = common_1.Uri.ns(args.uri);

@@ -33,3 +33,3 @@ this.implements = common_1.Uri.ns(args.implements);

var dispose$ = this.dispose$;
this.event$ = event$.asObservable().pipe(operators_1.takeUntil(dispose$), operators_1.share());
this.event$ = event$.asObservable().pipe((0, operators_1.takeUntil)(dispose$), (0, operators_1.share)());
this.state = TypedSheetState_1.TypedSheetState.create({ sheet: self, event$: event$, fetch: args.fetch, cache: cache });

@@ -55,6 +55,6 @@ this._ctx = TypedSheet.ctx({ fetch: this.state.fetch, event$: event$, dispose$: dispose$, cache: cache, pool: pool });

load: function (args) {
return TypedSheet.load(tslib_1.__assign(tslib_1.__assign({}, args), { fetch: fetch, cache: cache, event$: event$ }));
return TypedSheet.load((0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { fetch: fetch, cache: cache, event$: event$ }));
},
create: function (args) {
return TypedSheet.create(tslib_1.__assign(tslib_1.__assign({}, args), { fetch: fetch, cache: cache, event$: event$ }));
return TypedSheet.create((0, tslib_1.__assign)((0, tslib_1.__assign)({}, args), { fetch: fetch, cache: cache, event$: event$ }));
},

@@ -66,5 +66,5 @@ },

var _a, _b, _c, _d;
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var fetch, cache, event$, ns, sheetNs, pool, res, err, implementsNs, typeDefs, types, errors;
return tslib_1.__generator(this, function (_e) {
return (0, tslib_1.__generator)(this, function (_e) {
switch (_e.label) {

@@ -117,5 +117,5 @@ case 0:

TypedSheet.create = function (args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var fetch, event$, cache, implementsNs, sheetNs, pool, typeDefs, types, errors;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -195,3 +195,3 @@ case 0:

if (item) {
item.columns = tslib_1.__spreadArray(tslib_1.__spreadArray([], item.columns), columns);
item.columns = (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], item.columns, true), columns, true);
}

@@ -213,5 +213,5 @@ else {

TypedSheet.prototype.info = function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var res, exists, ns;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -218,0 +218,0 @@ case 0:

@@ -22,3 +22,3 @@ "use strict";

common_1.rx.payload(args.ctx.event$, 'TypedSheet/sync')
.pipe(operators_1.filter(function (e) { return _this.isThisSheet(e.changes.uri); }))
.pipe((0, operators_1.filter)(function (e) { return _this.isThisSheet(e.changes.uri); }))
.subscribe(function (e) {

@@ -71,3 +71,3 @@ var keys = Object.keys(e.changes.cells || {});

get: function () {
return tslib_1.__spreadArray([], this._rows);
return (0, tslib_1.__spreadArray)([], this._rows, true);
},

@@ -121,6 +121,6 @@ enumerable: false,

TypedSheetData.prototype.load = function (args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var argRange, query, alreadyLoading, ns, promise;
var _this = this;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
argRange = typeof args === 'string' ? args : args === null || args === void 0 ? void 0 : args.range;

@@ -136,6 +136,6 @@ if (argRange) {

ns = this.uri.toString();
promise = new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
promise = new Promise(function (resolve, reject) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var sheet, _a, total, error, range, min, max, wait;
var _this = this;
return tslib_1.__generator(this, function (_b) {
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {

@@ -181,3 +181,3 @@ case 0:

}); });
this._loading = tslib_1.__spreadArray(tslib_1.__spreadArray([], this._loading), [{ query: query, promise: promise }]);
this._loading = (0, tslib_1.__spreadArray)((0, tslib_1.__spreadArray)([], this._loading, true), [{ query: query, promise: promise }], false);
return [2, promise];

@@ -184,0 +184,0 @@ });

@@ -53,6 +53,6 @@ "use strict";

TypedSheetRefs.prototype.load = function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var promise;
var _this = this;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
if (this.isLoaded) {

@@ -68,5 +68,5 @@ return [2, this];

});
promise = new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
promise = new Promise(function (resolve, reject) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var _a, fetch, cache, event$, pool, linkInfo, link, pooledSheet, def, _b;
return tslib_1.__generator(this, function (_c) {
return (0, tslib_1.__generator)(this, function (_c) {
switch (_c.label) {

@@ -117,5 +117,5 @@ case 0:

if (options === void 0) { options = {}; }
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var typename;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -130,3 +130,3 @@ case 0:

typename = this.typename;
return [2, this.sheet.data(tslib_1.__assign(tslib_1.__assign({}, options), { typename: typename })).load()];
return [2, this.sheet.data((0, tslib_1.__assign)((0, tslib_1.__assign)({}, options), { typename: typename })).load()];
}

@@ -140,5 +140,5 @@ });

TypedSheetRefs.prototype.getCell = function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var ns, key, query, res;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -158,5 +158,5 @@ case 0:

TypedSheetRefs.prototype.getLink = function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var typeDef, data, links, _a, linkKey, link;
return tslib_1.__generator(this, function (_b) {
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {

@@ -176,6 +176,6 @@ case 0:

TypedSheetRefs.prototype.ensureLink = function (input) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var _a, data, links, linkKey, link, _b, payload, isChanged;
var _c;
return tslib_1.__generator(this, function (_d) {
return (0, tslib_1.__generator)(this, function (_d) {
switch (_d.label) {

@@ -201,3 +201,3 @@ case 0:

key: this.parent.cell.key,
to: tslib_1.__assign(tslib_1.__assign({}, data), { links: tslib_1.__assign(tslib_1.__assign({}, links), (_c = {}, _c[linkKey] = this.ns.toString(), _c)) }),
to: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, data), { links: (0, tslib_1.__assign)((0, tslib_1.__assign)({}, links), (_c = {}, _c[linkKey] = this.ns.toString(), _c)) }),
};

@@ -204,0 +204,0 @@ isChanged = !common_1.R.equals(data, payload.to);

@@ -27,14 +27,14 @@ "use strict";

var event$ = this._ctx.event$;
var cellChange$ = event$.pipe(operators_1.filter(function (e) { return e.type === 'TypedSheet/change'; }), operators_1.map(function (e) { return e.payload; }), operators_1.filter(function (e) { return e.kind === 'CELL'; }), operators_1.filter(function (e) { return _this.isThisSheet(e.ns); }), operators_1.filter(function (e) { return _this.isThisRow(e.key); }), operators_1.map(function (_a) {
var cellChange$ = event$.pipe((0, operators_1.filter)(function (e) { return e.type === 'TypedSheet/change'; }), (0, operators_1.map)(function (e) { return e.payload; }), (0, operators_1.filter)(function (e) { return e.kind === 'CELL'; }), (0, operators_1.filter)(function (e) { return _this.isThisSheet(e.ns); }), (0, operators_1.filter)(function (e) { return _this.isThisRow(e.key); }), (0, operators_1.map)(function (_a) {
var to = _a.to, ns = _a.ns, key = _a.key;
return ({ key: key, to: to, uri: common_1.Uri.parse(common_1.Uri.create.cell(ns, key)) });
}), operators_1.filter(function (_a) {
}), (0, operators_1.filter)(function (_a) {
var uri = _a.uri;
return uri.ok && uri.type === 'CELL';
}), operators_1.map(function (e) { return (tslib_1.__assign(tslib_1.__assign({}, e), { uri: e.uri.parts, index: common_1.coord.cell.toRowIndex(e.key) })); }), operators_1.filter(function (e) { return e.index === _this.index; }));
}), (0, operators_1.map)(function (e) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, e), { uri: e.uri.parts, index: common_1.coord.cell.toRowIndex(e.key) })); }), (0, operators_1.filter)(function (e) { return e.index === _this.index; }));
cellChange$
.pipe(operators_1.map(function (e) { return (tslib_1.__assign(tslib_1.__assign({}, e), { columnDef: _this.findColumnByKey(e.uri.key) })); }), operators_1.filter(function (e) { return Boolean(e.columnDef); }), operators_1.map(function (e) { return (tslib_1.__assign(tslib_1.__assign({}, e), { target: TypeSystem_core_1.TypeTarget.parse(e.columnDef.target) })); }), operators_1.filter(function (e) { return e.target.isValid && e.target.isInline; }))
.pipe((0, operators_1.map)(function (e) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, e), { columnDef: _this.findColumnByKey(e.uri.key) })); }), (0, operators_1.filter)(function (e) { return Boolean(e.columnDef); }), (0, operators_1.map)(function (e) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, e), { target: TypeSystem_core_1.TypeTarget.parse(e.columnDef.target) })); }), (0, operators_1.filter)(function (e) { return e.target.isValid && e.target.isInline; }))
.subscribe(function (e) { return _this.setData(e.columnDef, e.to); });
common_1.rx.payload(event$, 'TypedSheet/sync')
.pipe(operators_1.filter(function (e) { return _this.isThisSheet(e.changes.uri); }), operators_1.filter(function (e) { return Boolean(e.changes.cells); }))
.pipe((0, operators_1.filter)(function (e) { return _this.isThisSheet(e.changes.uri); }), (0, operators_1.filter)(function (e) { return Boolean(e.changes.cells); }))
.subscribe(function (e) {

@@ -84,3 +84,3 @@ var data = e.changes.cells || {};

var uri;
return tslib_1.__assign(tslib_1.__assign({}, type), { get uri() {
return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, type), { get uri() {
return (uri || (uri = common_1.Uri.cell(common_1.Uri.create.cell(row_1.ns, "" + type.column + row_1.key))));

@@ -132,6 +132,6 @@ } });

if (options === void 0) { options = {}; }
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var self, props, cacheKey, promise;
var _this = this;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
self = this;

@@ -146,6 +146,6 @@ if (this.isLoaded && !options.force) {

}
promise = new Promise(function (resolve, reject) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
promise = new Promise(function (resolve, reject) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var ns, index, sheet, query;
var _this = this;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -161,5 +161,5 @@ case 0:

.filter(function (columnDef) { return (!props ? true : props.includes(columnDef.prop)); })
.map(function (columnDef) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
.map(function (columnDef) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var res, key;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -166,0 +166,0 @@ case 0: return [4, this._ctx.fetch.getCells({ ns: ns, query: query })];

@@ -12,3 +12,3 @@ "use strict";

this._dispose$ = new common_1.t.Subject();
this.dispose$ = this._dispose$.pipe(operators_1.share());
this.dispose$ = this._dispose$.pipe((0, operators_1.share)());
this.clear = {

@@ -30,3 +30,3 @@ cache: function () {

var uri = sheet.uri.toString();
var from = tslib_1.__assign({}, _this._changes);
var from = (0, tslib_1.__assign)({}, _this._changes);
var to = { uri: uri };

@@ -60,5 +60,5 @@ _this._changes = { uri: uri };

var fetch = TypeSystem_cache_1.TypeCache.wrapFetch(args.fetch, { cache: args.cache });
var getCells = function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var getCells = function (args) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var res, cellChanges, keys, cells_1;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -71,6 +71,6 @@ case 0: return [4, fetch.getCells(args)];

if (keys.length > 0) {
cells_1 = (res.cells = tslib_1.__assign({}, (res.cells || {})));
cells_1 = (res.cells = (0, tslib_1.__assign)({}, (res.cells || {})));
keys
.filter(function (key) { return common_1.Schema.coord.cell.isCell(key) && cells_1[key]; })
.forEach(function (key) { return (cells_1[key] = tslib_1.__assign({}, cellChanges[key].to)); });
.forEach(function (key) { return (cells_1[key] = (0, tslib_1.__assign)({}, cellChanges[key].to)); });
}

@@ -81,6 +81,6 @@ return [2, res];

}); };
var getNs = function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var getNs = function (args) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
var ns;
var _a;
return tslib_1.__generator(this, function (_b) {
return (0, tslib_1.__generator)(this, function (_b) {
ns = (_a = this._changes.ns) === null || _a === void 0 ? void 0 : _a.to;

@@ -90,8 +90,8 @@ return [2, ns ? { ns: ns } : fetch.getNs(args)];

}); };
this.fetch = tslib_1.__assign(tslib_1.__assign({}, fetch), { getCells: getCells, getNs: getNs });
this.event$ = this._event$.pipe(operators_1.takeUntil(this._dispose$), operators_1.share());
this.change$ = this.event$.pipe(operators_1.filter(function (e) { return e.type === 'TypedSheet/change'; }), operators_1.map(function (e) { return e.payload; }), operators_1.filter(function (e) { return _this.isWithinNamespace(e.ns); }), operators_1.share());
this.changed$ = this.event$.pipe(operators_1.filter(function (e) { return e.type === 'TypedSheet/changed'; }), operators_1.map(function (e) { return e.payload; }), operators_1.filter(function (e) { return _this.isWithinNamespace(e.sheet.uri.toString()); }), operators_1.share());
this.fetch = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, fetch), { getCells: getCells, getNs: getNs });
this.event$ = this._event$.pipe((0, operators_1.takeUntil)(this._dispose$), (0, operators_1.share)());
this.change$ = this.event$.pipe((0, operators_1.filter)(function (e) { return e.type === 'TypedSheet/change'; }), (0, operators_1.map)(function (e) { return e.payload; }), (0, operators_1.filter)(function (e) { return _this.isWithinNamespace(e.ns); }), (0, operators_1.share)());
this.changed$ = this.event$.pipe((0, operators_1.filter)(function (e) { return e.type === 'TypedSheet/changed'; }), (0, operators_1.map)(function (e) { return e.payload; }), (0, operators_1.filter)(function (e) { return _this.isWithinNamespace(e.sheet.uri.toString()); }), (0, operators_1.share)());
this.change$
.pipe(operators_1.filter(function (e) { return e.kind === 'CELL'; }), operators_1.map(function (e) { return e; }))
.pipe((0, operators_1.filter)(function (e) { return e.kind === 'CELL'; }), (0, operators_1.map)(function (e) { return e; }))
.subscribe(function (_a) {

@@ -102,3 +102,3 @@ var key = _a.key, to = _a.to;

this.change$
.pipe(operators_1.filter(function (e) { return e.kind === 'NS'; }))
.pipe((0, operators_1.filter)(function (e) { return e.kind === 'NS'; }))
.subscribe(function (_a) {

@@ -109,3 +109,3 @@ var to = _a.to;

common_1.rx.payload(this.event$, 'TypedSheet/sync')
.pipe(operators_1.filter(function (e) { return _this.isThisSheet(e.changes.uri); }), operators_1.delay(0))
.pipe((0, operators_1.filter)(function (e) { return _this.isThisSheet(e.changes.uri); }), (0, operators_1.delay)(0))
.subscribe(function (e) {

@@ -118,6 +118,6 @@ _this.fire({

common_1.rx.payload(this.event$, 'TypedSheet/synced')
.pipe(operators_1.filter(function (e) { return e.sheet === _this._sheet; }))
.pipe((0, operators_1.filter)(function (e) { return e.sheet === _this._sheet; }))
.subscribe(function () { return _this.fireUpdated('SYNC'); });
common_1.rx.payload(this.event$, 'TypedSheet/changed')
.pipe(operators_1.filter(function (e) { return e.sheet === _this._sheet; }))
.pipe((0, operators_1.filter)(function (e) { return e.sheet === _this._sheet; }))
.subscribe(function () { return _this.fireUpdated('CHANGE'); });

@@ -149,6 +149,6 @@ }

var changes = this._changes;
return common_1.deleteUndefined({
return (0, common_1.deleteUndefined)({
uri: this.uri.toString(),
ns: changes.ns ? tslib_1.__assign({}, changes.ns) : undefined,
cells: changes.cells ? tslib_1.__assign({}, changes.cells) : undefined,
ns: changes.ns ? (0, tslib_1.__assign)({}, changes.ns) : undefined,
cells: changes.cells ? (0, tslib_1.__assign)({}, changes.cells) : undefined,
});

@@ -174,5 +174,5 @@ },

TypedSheetState.prototype.getNs = function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var ns;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -188,5 +188,5 @@ case 0:

TypedSheetState.prototype.getCell = function (key) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var cellChanges, ns, query, res;
return tslib_1.__generator(this, function (_a) {
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {

@@ -215,5 +215,5 @@ case 0:

TypedSheetState.prototype.fireNsChanged = function (args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var to, existing, from, _a, change;
return tslib_1.__generator(this, function (_b) {
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {

@@ -241,3 +241,3 @@ case 0:

};
this._changes = tslib_1.__assign(tslib_1.__assign({}, this._changes), { ns: change });
this._changes = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, this._changes), { ns: change });
this.fireChanged({ change: change });

@@ -250,6 +250,6 @@ return [2];

TypedSheetState.prototype.fireCellChanged = function (args) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var to, key, existing, ns, from, _a, change, cells;
var _b;
return tslib_1.__generator(this, function (_c) {
return (0, tslib_1.__generator)(this, function (_c) {
switch (_c.label) {

@@ -281,4 +281,4 @@ case 0:

};
cells = tslib_1.__assign(tslib_1.__assign({}, (this._changes.cells || {})), (_b = {}, _b[key] = change, _b));
this._changes = tslib_1.__assign(tslib_1.__assign({}, this._changes), { cells: cells });
cells = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, (this._changes.cells || {})), (_b = {}, _b[key] = change, _b));
this._changes = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, this._changes), { cells: cells });
this.fireChanged({ change: change });

@@ -285,0 +285,0 @@ return [2];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("../../common/types"), exports);
(0, tslib_1.__exportStar)(require("../../common/types"), exports);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./objectToCells"), exports);
(0, tslib_1.__exportStar)(require("./objectToCells"), exports);

@@ -41,3 +41,3 @@ "use strict";

var cells = {};
(items || []).forEach(function (item, i) { return (cells = tslib_1.__assign(tslib_1.__assign({}, cells), api.row(index + i, item))); });
(items || []).forEach(function (item, i) { return (cells = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, cells), api.row(index + i, item))); });
return cells;

@@ -44,0 +44,0 @@ },

{
"name": "@platform/cell.typesystem",
"version": "0.0.221",
"version": "0.0.222",
"description": "The 'strongly typed sheets' system of the CellOS.",

@@ -15,5 +15,5 @@ "main": "lib/index",

"@platform/cache": "0.3.27",
"@platform/cell.coord": "0.8.284",
"@platform/cell.schema": "0.5.102",
"@platform/cell.types": "0.5.99",
"@platform/cell.coord": "0.8.285",
"@platform/cell.schema": "0.5.103",
"@platform/cell.types": "0.5.100",
"@platform/libs": "0.2.14",

@@ -20,0 +20,0 @@ "@platform/types": "0.5.25",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc