@accordproject/template-engine 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common.d.ts +20 -0
- package/dist/Common.js +59 -0
- package/dist/Common.js.map +1 -0
- package/dist/TemplateMarkInterpreter.d.ts +34 -0
- package/dist/TemplateMarkInterpreter.js +432 -0
- package/dist/TemplateMarkInterpreter.js.map +1 -0
- package/dist/TemplateMarkToJavaScriptCompiler.d.ts +19 -0
- package/dist/TemplateMarkToJavaScriptCompiler.js +90 -0
- package/dist/TemplateMarkToJavaScriptCompiler.js.map +1 -0
- package/dist/TemplateMarkToTypeScriptCompiler.d.ts +69 -0
- package/dist/TemplateMarkToTypeScriptCompiler.js +239 -0
- package/dist/TemplateMarkToTypeScriptCompiler.js.map +1 -0
- package/dist/TypeScriptCompilationContext.d.ts +15 -0
- package/dist/TypeScriptCompilationContext.js +45 -0
- package/dist/TypeScriptCompilationContext.js.map +1 -0
- package/dist/TypeScriptRuntime.d.ts +5 -0
- package/dist/TypeScriptRuntime.js +67 -0
- package/dist/TypeScriptRuntime.js.map +1 -0
- package/dist/TypeScriptToJavaScriptCompiler.d.ts +14 -0
- package/dist/TypeScriptToJavaScriptCompiler.js +57 -0
- package/dist/TypeScriptToJavaScriptCompiler.js.map +1 -0
- package/dist/compilers/Clause.d.ts +14 -0
- package/dist/compilers/Clause.js +60 -0
- package/dist/compilers/Clause.js.map +1 -0
- package/dist/compilers/Common.d.ts +66 -0
- package/dist/compilers/Common.js +206 -0
- package/dist/compilers/Common.js.map +1 -0
- package/dist/compilers/Conditional.d.ts +12 -0
- package/dist/compilers/Conditional.js +53 -0
- package/dist/compilers/Conditional.js.map +1 -0
- package/dist/compilers/ContractDefinition.d.ts +8 -0
- package/dist/compilers/ContractDefinition.js +50 -0
- package/dist/compilers/ContractDefinition.js.map +1 -0
- package/dist/compilers/FormattedVariable.d.ts +8 -0
- package/dist/compilers/FormattedVariable.js +46 -0
- package/dist/compilers/FormattedVariable.js.map +1 -0
- package/dist/compilers/Formula.d.ts +8 -0
- package/dist/compilers/Formula.js +41 -0
- package/dist/compilers/Formula.js.map +1 -0
- package/dist/compilers/Join.d.ts +8 -0
- package/dist/compilers/Join.js +39 -0
- package/dist/compilers/Join.js.map +1 -0
- package/dist/compilers/ListBlock.d.ts +11 -0
- package/dist/compilers/ListBlock.js +57 -0
- package/dist/compilers/ListBlock.js.map +1 -0
- package/dist/compilers/NodeCompilers.d.ts +7 -0
- package/dist/compilers/NodeCompilers.js +87 -0
- package/dist/compilers/NodeCompilers.js.map +1 -0
- package/dist/compilers/Optional.d.ts +11 -0
- package/dist/compilers/Optional.js +65 -0
- package/dist/compilers/Optional.js.map +1 -0
- package/dist/compilers/Variable.d.ts +8 -0
- package/dist/compilers/Variable.js +45 -0
- package/dist/compilers/Variable.js.map +1 -0
- package/dist/compilers/With.d.ts +10 -0
- package/dist/compilers/With.js +40 -0
- package/dist/compilers/With.js.map +1 -0
- package/dist/drafting/Boolean/index.d.ts +6 -0
- package/dist/drafting/Boolean/index.js +30 -0
- package/dist/drafting/Boolean/index.js.map +1 -0
- package/dist/drafting/DateTime/index.d.ts +7 -0
- package/dist/drafting/DateTime/index.js +33 -0
- package/dist/drafting/DateTime/index.js.map +1 -0
- package/dist/drafting/Double/format.d.ts +13 -0
- package/dist/drafting/Double/format.js +55 -0
- package/dist/drafting/Double/format.js.map +1 -0
- package/dist/drafting/Double/index.d.ts +7 -0
- package/dist/drafting/Double/index.js +33 -0
- package/dist/drafting/Double/index.js.map +1 -0
- package/dist/drafting/Integer/format.d.ts +13 -0
- package/dist/drafting/Integer/format.js +45 -0
- package/dist/drafting/Integer/format.js.map +1 -0
- package/dist/drafting/Integer/index.d.ts +7 -0
- package/dist/drafting/Integer/index.js +33 -0
- package/dist/drafting/Integer/index.js.map +1 -0
- package/dist/drafting/Long/index.d.ts +7 -0
- package/dist/drafting/Long/index.js +33 -0
- package/dist/drafting/Long/index.js.map +1 -0
- package/dist/drafting/MonetaryAmount/currencycode.d.ts +35 -0
- package/dist/drafting/MonetaryAmount/currencycode.js +53 -0
- package/dist/drafting/MonetaryAmount/currencycode.js.map +1 -0
- package/dist/drafting/MonetaryAmount/index.d.ts +12 -0
- package/dist/drafting/MonetaryAmount/index.js +67 -0
- package/dist/drafting/MonetaryAmount/index.js.map +1 -0
- package/dist/drafting/String/index.d.ts +6 -0
- package/dist/drafting/String/index.js +25 -0
- package/dist/drafting/String/index.js.map +1 -0
- package/dist/drafting/index.d.ts +1 -0
- package/dist/drafting/index.js +36 -0
- package/dist/drafting/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/model-gen/concerto.metamodel@1.0.0.d.ts +173 -0
- package/dist/model-gen/concerto.metamodel@1.0.0.js +5 -0
- package/dist/model-gen/concerto.metamodel@1.0.0.js.map +1 -0
- package/dist/model-gen/concerto@1.0.0.d.ts +18 -0
- package/dist/model-gen/concerto@1.0.0.js +5 -0
- package/dist/model-gen/concerto@1.0.0.js.map +1 -0
- package/dist/model-gen/org.accordproject.ciceromark@0.6.0.d.ts +49 -0
- package/dist/model-gen/org.accordproject.ciceromark@0.6.0.js +5 -0
- package/dist/model-gen/org.accordproject.ciceromark@0.6.0.js.map +1 -0
- package/dist/model-gen/org.accordproject.commonmark@0.5.0.d.ts +89 -0
- package/dist/model-gen/org.accordproject.commonmark@0.5.0.js +5 -0
- package/dist/model-gen/org.accordproject.commonmark@0.5.0.js.map +1 -0
- package/dist/model-gen/org.accordproject.templatemark@0.4.0.d.ts +72 -0
- package/dist/model-gen/org.accordproject.templatemark@0.4.0.js +11 -0
- package/dist/model-gen/org.accordproject.templatemark@0.4.0.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Join = void 0;
|
|
19
|
+
var markdown_common_1 = require("@accordproject/markdown-common");
|
|
20
|
+
var Common_1 = require("./Common");
|
|
21
|
+
var Join = /** @class */ (function (_super) {
|
|
22
|
+
__extends(Join, _super);
|
|
23
|
+
function Join() {
|
|
24
|
+
return _super.call(this, true) || this;
|
|
25
|
+
}
|
|
26
|
+
Join.prototype.generate = function (fw, level, templateMarkNode) {
|
|
27
|
+
(0, Common_1.writeOpenGenerateScope)(fw, level);
|
|
28
|
+
(0, Common_1.writeOpenDataScope)(fw, level, templateMarkNode.name);
|
|
29
|
+
fw.writeLine(level, "const text = Runtime.peek($data).join('".concat(templateMarkNode.separator, "');"));
|
|
30
|
+
(0, Common_1.writeCloseDataScope)(fw, level);
|
|
31
|
+
fw.writeLine(level, "return { $class: '".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Text', text: text } as ").concat((0, Common_1.getTypeScriptType)(markdown_common_1.CommonMarkModel.NAMESPACE + '.Text'), ";"));
|
|
32
|
+
(0, Common_1.writeCloseGenerateScope)(fw, level);
|
|
33
|
+
delete templateMarkNode.nodes; // ignore child nodes, like {{this}}
|
|
34
|
+
};
|
|
35
|
+
Join.TYPE = "".concat(markdown_common_1.TemplateMarkModel.NAMESPACE, ".JoinDefinition");
|
|
36
|
+
return Join;
|
|
37
|
+
}(Common_1.AbstractComplexCompiler));
|
|
38
|
+
exports.Join = Join;
|
|
39
|
+
//# sourceMappingURL=Join.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Join.js","sourceRoot":"","sources":["../../src/compilers/Join.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAcA,kEAAmF;AAEnF,mCAAgK;AAEhK;IAA0B,wBAAuB;IAE7C;eACI,kBAAM,IAAI,CAAC;IACf,CAAC;IACD,uBAAQ,GAAR,UAAS,EAAa,EAAE,KAAY,EAAE,gBAAgC;QAClE,IAAA,+BAAsB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;QACjC,IAAA,2BAAkB,EAAC,EAAE,EAAC,KAAK,EAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACnD,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,iDAA0C,gBAAgB,CAAC,SAAS,QAAK,CAAC,CAAC;QAC/F,IAAA,4BAAmB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;QAC9B,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,4BAAqB,iCAAe,CAAC,SAAS,qCAA2B,IAAA,0BAAiB,EAAC,iCAAe,CAAC,SAAS,GAAG,OAAO,CAAC,MAAG,CAAC,CAAC;QACxJ,IAAA,gCAAuB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;QAClC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC,oCAAoC;IACvE,CAAC;IAZM,SAAI,GAAG,UAAG,mCAAiB,CAAC,SAAS,oBAAiB,CAAC;IAalE,WAAC;CAAA,AAdD,CAA0B,gCAAuB,GAchD;AAdY,oBAAI"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FileWriter } from '@accordproject/concerto-util';
|
|
2
|
+
import { ProcessingFunction } from '../TemplateMarkToTypeScriptCompiler';
|
|
3
|
+
import { IListBlockDefinition, IWithDefinition } from '../model-gen/org.accordproject.templatemark@0.4.0';
|
|
4
|
+
import { AbstractComplexCompiler } from './Common';
|
|
5
|
+
export declare class ListBlock extends AbstractComplexCompiler {
|
|
6
|
+
static TYPE: string;
|
|
7
|
+
constructor();
|
|
8
|
+
enter(fw: FileWriter, level: number, templateMarkNode: IWithDefinition): void;
|
|
9
|
+
generate(fw: FileWriter, level: number, templateMarkNode: IListBlockDefinition, doIt: ProcessingFunction): void;
|
|
10
|
+
exit(fw: FileWriter, level: number): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ListBlock = void 0;
|
|
19
|
+
var markdown_common_1 = require("@accordproject/markdown-common");
|
|
20
|
+
var Common_1 = require("./Common");
|
|
21
|
+
var ListBlock = /** @class */ (function (_super) {
|
|
22
|
+
__extends(ListBlock, _super);
|
|
23
|
+
function ListBlock() {
|
|
24
|
+
return _super.call(this, false) || this;
|
|
25
|
+
}
|
|
26
|
+
ListBlock.prototype.enter = function (fw, level, templateMarkNode) {
|
|
27
|
+
(0, Common_1.writeDebug)(fw, level, templateMarkNode);
|
|
28
|
+
(0, Common_1.writeOpenNodeScope)(fw, level);
|
|
29
|
+
(0, Common_1.writeOpenDataScope)(fw, level, templateMarkNode.name);
|
|
30
|
+
};
|
|
31
|
+
ListBlock.prototype.generate = function (fw, level, templateMarkNode, doIt) {
|
|
32
|
+
var _a, _b, _c, _d;
|
|
33
|
+
if ((_a = templateMarkNode === null || templateMarkNode === void 0 ? void 0 : templateMarkNode.nodes) === null || _a === void 0 ? void 0 : _a[0]) {
|
|
34
|
+
var clone = (0, Common_1.makeCiceroMark)((_b = templateMarkNode === null || templateMarkNode === void 0 ? void 0 : templateMarkNode.nodes) === null || _b === void 0 ? void 0 : _b[0]);
|
|
35
|
+
(0, Common_1.writeOpenGenerateScope)(fw, level);
|
|
36
|
+
fw.writeLine(level, "const result = ".concat(JSON.stringify(clone), " as ").concat((0, Common_1.getTypeScriptType)(templateMarkNode.$class), ";"));
|
|
37
|
+
fw.writeLine(level, 'Runtime.peek($data).forEach( (item:any) => {');
|
|
38
|
+
fw.writeLine(level, 'Runtime.push($data,item);');
|
|
39
|
+
if ((_d = (_c = templateMarkNode.nodes) === null || _c === void 0 ? void 0 : _c[0].nodes) === null || _d === void 0 ? void 0 : _d[0]) {
|
|
40
|
+
doIt(fw, level + 1, templateMarkNode.nodes[0].nodes[0]);
|
|
41
|
+
delete templateMarkNode.nodes; // already handled children ^^^
|
|
42
|
+
}
|
|
43
|
+
fw.writeLine(level, 'Runtime.pop($data);');
|
|
44
|
+
fw.writeLine(level, '});');
|
|
45
|
+
fw.writeLine(level, 'return result;');
|
|
46
|
+
(0, Common_1.writeCloseGenerateScope)(fw, level);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
ListBlock.prototype.exit = function (fw, level) {
|
|
50
|
+
(0, Common_1.writeCloseDataScope)(fw, level);
|
|
51
|
+
(0, Common_1.writeCloseNodeScope)(fw, level);
|
|
52
|
+
};
|
|
53
|
+
ListBlock.TYPE = "".concat(markdown_common_1.TemplateMarkModel.NAMESPACE, ".ListBlockDefinition");
|
|
54
|
+
return ListBlock;
|
|
55
|
+
}(Common_1.AbstractComplexCompiler));
|
|
56
|
+
exports.ListBlock = ListBlock;
|
|
57
|
+
//# sourceMappingURL=ListBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListBlock.js","sourceRoot":"","sources":["../../src/compilers/ListBlock.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAcA,kEAAmE;AAInE,mCAAqO;AAErO;IAA+B,6BAAuB;IAElD;eACI,kBAAM,KAAK,CAAC;IAChB,CAAC;IAED,yBAAK,GAAL,UAAM,EAAa,EAAE,KAAY,EAAC,gBAAgC;QAC9D,IAAA,mBAAU,EAAC,EAAE,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC;QACxC,IAAA,2BAAkB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;QAC7B,IAAA,2BAAkB,EAAC,EAAE,EAAC,KAAK,EAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,4BAAQ,GAAR,UAAS,EAAa,EAAE,KAAY,EAAE,gBAAqC,EAAE,IAAuB;;QAChG,IAAG,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK,0CAAG,CAAC,CAAC,EAAE;YAC7B,IAAM,KAAK,GAAG,IAAA,uBAAc,EAAC,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,KAAK,0CAAG,CAAC,CAAC,CAAU,CAAC;YACpE,IAAA,+BAAsB,EAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YAClC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,yBAAkB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,iBAAO,IAAA,0BAAiB,EAAC,gBAAgB,CAAC,MAAM,CAAC,MAAG,CAAC,CAAC;YACjH,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,8CAA8C,CAAC,CAAC;YACpE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,2BAA2B,CAAC,CAAC;YACjD,IAAG,MAAA,MAAA,gBAAgB,CAAC,KAAK,0CAAG,CAAC,EAAE,KAAK,0CAAG,CAAC,CAAC,EAAE;gBACvC,IAAI,CAAC,EAAE,EAAE,KAAK,GAAC,CAAC,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBACtD,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC,+BAA+B;aACjE;YACD,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,qBAAqB,CAAC,CAAC;YAC3C,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC3B,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;YACtC,IAAA,gCAAuB,EAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SACtC;IACL,CAAC;IAED,wBAAI,GAAJ,UAAK,EAAa,EAAE,KAAY;QAC5B,IAAA,4BAAmB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;QAC9B,IAAA,4BAAmB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAhCM,cAAI,GAAG,UAAG,mCAAiB,CAAC,SAAS,yBAAsB,CAAC;IAiCvE,gBAAC;CAAA,AAlCD,CAA+B,gCAAuB,GAkCrD;AAlCY,8BAAS"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { INodeCompiler } from './Common';
|
|
2
|
+
/**
|
|
3
|
+
* Lookup a node compiler
|
|
4
|
+
* @param {string} fqn the Concerto FQN of the node $class
|
|
5
|
+
* @returns {INodeCompiler} the compiler to use for this node
|
|
6
|
+
*/
|
|
7
|
+
export declare function getCompiler(fqn: string): INodeCompiler;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.getCompiler = void 0;
|
|
17
|
+
var markdown_common_1 = require("@accordproject/markdown-common");
|
|
18
|
+
var Clause_1 = require("./Clause");
|
|
19
|
+
var Common_1 = require("./Common");
|
|
20
|
+
var Conditional_1 = require("./Conditional");
|
|
21
|
+
var ContractDefinition_1 = require("./ContractDefinition");
|
|
22
|
+
var FormattedVariable_1 = require("./FormattedVariable");
|
|
23
|
+
var Formula_1 = require("./Formula");
|
|
24
|
+
var Join_1 = require("./Join");
|
|
25
|
+
var ListBlock_1 = require("./ListBlock");
|
|
26
|
+
var Optional_1 = require("./Optional");
|
|
27
|
+
var Variable_1 = require("./Variable");
|
|
28
|
+
var With_1 = require("./With");
|
|
29
|
+
/**
|
|
30
|
+
* Registry of node compilers
|
|
31
|
+
*/
|
|
32
|
+
var NODE_COMPILERS = {};
|
|
33
|
+
// templatemark
|
|
34
|
+
NODE_COMPILERS[ContractDefinition_1.ContractDefinition.TYPE] = new ContractDefinition_1.ContractDefinition();
|
|
35
|
+
NODE_COMPILERS[Variable_1.Variable.TYPE] = new Variable_1.Variable();
|
|
36
|
+
NODE_COMPILERS[FormattedVariable_1.FormattedVariable.TYPE] = new FormattedVariable_1.FormattedVariable();
|
|
37
|
+
NODE_COMPILERS[Formula_1.Formula.TYPE] = new Formula_1.Formula();
|
|
38
|
+
NODE_COMPILERS[Conditional_1.Conditional.TYPE] = new Conditional_1.Conditional();
|
|
39
|
+
NODE_COMPILERS[Join_1.Join.TYPE] = new Join_1.Join();
|
|
40
|
+
NODE_COMPILERS[With_1.With.TYPE] = new With_1.With();
|
|
41
|
+
NODE_COMPILERS[Clause_1.Clause.TYPE] = new Clause_1.Clause();
|
|
42
|
+
NODE_COMPILERS[Optional_1.Optional.TYPE] = new Optional_1.Optional();
|
|
43
|
+
NODE_COMPILERS[ListBlock_1.ListBlock.TYPE] = new ListBlock_1.ListBlock();
|
|
44
|
+
// ignored
|
|
45
|
+
NODE_COMPILERS["".concat(markdown_common_1.TemplateMarkModel.NAMESPACE, ".Code")] = new Common_1.Ignore();
|
|
46
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Document")] = new Common_1.Ignore();
|
|
47
|
+
// commonmark
|
|
48
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Paragraph")] = new Common_1.PassThrough(false);
|
|
49
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Text")] = new Common_1.PassThrough(true);
|
|
50
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Attribute")] = new Common_1.PassThrough(false);
|
|
51
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".TagInfo")] = new Common_1.PassThrough(false);
|
|
52
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".CodeBlock")] = new Common_1.PassThrough(false);
|
|
53
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Code")] = new Common_1.PassThrough(false);
|
|
54
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".HtmlInline")] = new Common_1.PassThrough(false);
|
|
55
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".HtmlBlock")] = new Common_1.PassThrough(false);
|
|
56
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Emph")] = new Common_1.PassThrough(false);
|
|
57
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Strong")] = new Common_1.PassThrough(false);
|
|
58
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".BlockQuote")] = new Common_1.PassThrough(false);
|
|
59
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Heading")] = new Common_1.PassThrough(false);
|
|
60
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".ThematicBreak")] = new Common_1.PassThrough(false);
|
|
61
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Softbreak")] = new Common_1.PassThrough(false);
|
|
62
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Linebreak")] = new Common_1.PassThrough(false);
|
|
63
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Link")] = new Common_1.PassThrough(false);
|
|
64
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Image")] = new Common_1.PassThrough(false);
|
|
65
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".List")] = new Common_1.PassThrough(false);
|
|
66
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Item")] = new Common_1.PassThrough(false);
|
|
67
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Table")] = new Common_1.PassThrough(false);
|
|
68
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".TableHead")] = new Common_1.PassThrough(false);
|
|
69
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".TableBody")] = new Common_1.PassThrough(false);
|
|
70
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".TableRow")] = new Common_1.PassThrough(false);
|
|
71
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".TableRow")] = new Common_1.PassThrough(false);
|
|
72
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".HeaderCell")] = new Common_1.PassThrough(false);
|
|
73
|
+
NODE_COMPILERS["".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".TableCell")] = new Common_1.PassThrough(false);
|
|
74
|
+
/**
|
|
75
|
+
* Lookup a node compiler
|
|
76
|
+
* @param {string} fqn the Concerto FQN of the node $class
|
|
77
|
+
* @returns {INodeCompiler} the compiler to use for this node
|
|
78
|
+
*/
|
|
79
|
+
function getCompiler(fqn) {
|
|
80
|
+
var compiler = NODE_COMPILERS[fqn];
|
|
81
|
+
if (!compiler) {
|
|
82
|
+
throw new Error("No compiler found for node ".concat(fqn));
|
|
83
|
+
}
|
|
84
|
+
return compiler;
|
|
85
|
+
}
|
|
86
|
+
exports.getCompiler = getCompiler;
|
|
87
|
+
//# sourceMappingURL=NodeCompilers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeCompilers.js","sourceRoot":"","sources":["../../src/compilers/NodeCompilers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAEH,kEAAmF;AAEnF,mCAAkC;AAClC,mCAA8D;AAC9D,6CAA4C;AAC5C,2DAA0D;AAC1D,yDAAwD;AACxD,qCAAoC;AACpC,+BAA8B;AAC9B,yCAAwC;AACxC,uCAAsC;AACtC,uCAAsC;AACtC,+BAA8B;AAE9B;;GAEG;AACH,IAAM,cAAc,GAAgC,EACnD,CAAC;AAEF,eAAe;AACf,cAAc,C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CAAE,CAAC,CAAC;KACxD;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAND,kCAMC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FileWriter } from '@accordproject/concerto-util';
|
|
2
|
+
import { ProcessingFunction } from '../TemplateMarkToTypeScriptCompiler';
|
|
3
|
+
import { IOptionalDefinition } from '../model-gen/org.accordproject.templatemark@0.4.0';
|
|
4
|
+
import { AbstractComplexCompiler } from './Common';
|
|
5
|
+
export declare class Optional extends AbstractComplexCompiler {
|
|
6
|
+
static TYPE: string;
|
|
7
|
+
constructor();
|
|
8
|
+
enter(fw: FileWriter, level: number, templateMarkNode: IOptionalDefinition): void;
|
|
9
|
+
generate(fw: FileWriter, level: number, templateMarkNode: IOptionalDefinition, doIt: ProcessingFunction): void;
|
|
10
|
+
exit(fw: FileWriter, level: number): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Optional = void 0;
|
|
19
|
+
var markdown_common_1 = require("@accordproject/markdown-common");
|
|
20
|
+
var Common_1 = require("./Common");
|
|
21
|
+
var Optional = /** @class */ (function (_super) {
|
|
22
|
+
__extends(Optional, _super);
|
|
23
|
+
function Optional() {
|
|
24
|
+
return _super.call(this, false) || this;
|
|
25
|
+
}
|
|
26
|
+
Optional.prototype.enter = function (fw, level, templateMarkNode) {
|
|
27
|
+
(0, Common_1.writeDebug)(fw, level, templateMarkNode);
|
|
28
|
+
(0, Common_1.writeOpenNodeScope)(fw, level);
|
|
29
|
+
(0, Common_1.writeOpenDataScope)(fw, level, templateMarkNode.name, true); // allow pushing undefined onto the stack
|
|
30
|
+
};
|
|
31
|
+
Optional.prototype.generate = function (fw, level, templateMarkNode, doIt) {
|
|
32
|
+
var clone = (0, Common_1.makeCiceroMark)(templateMarkNode);
|
|
33
|
+
delete clone.nodes;
|
|
34
|
+
delete clone.whenSome; // replaced below
|
|
35
|
+
delete clone.whenNone;
|
|
36
|
+
(0, Common_1.writeOpenGenerateScope)(fw, level);
|
|
37
|
+
fw.writeLine(level, "const result = ".concat(JSON.stringify(clone), " as ").concat((0, Common_1.getTypeScriptType)(templateMarkNode.$class), ";"));
|
|
38
|
+
fw.writeLine(level, 'const hasSome:boolean = !(Runtime.peek($data) === null || Runtime.peek($data) === undefined);');
|
|
39
|
+
fw.writeLine(level, '(result as CiceroMark.IOptional).hasSome = hasSome;');
|
|
40
|
+
fw.writeLine(level, 'if(hasSome) {');
|
|
41
|
+
doIt(fw, level + 1, { $class: "".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Paragraph"), nodes: templateMarkNode.whenSome });
|
|
42
|
+
fw.writeLine(level, '(result as CiceroMark.IOptional).whenSome = $result.nodes[0];');
|
|
43
|
+
fw.writeLine(level, '(result as CiceroMark.IOptional).whenNone = $result.nodes[0];'); // HACK - model needs to be updated
|
|
44
|
+
fw.writeLine(level, 'return result;');
|
|
45
|
+
fw.writeLine(level, '}');
|
|
46
|
+
fw.writeLine(level, 'else {');
|
|
47
|
+
doIt(fw, level + 1, { $class: "".concat(markdown_common_1.CommonMarkModel.NAMESPACE, ".Paragraph"), nodes: templateMarkNode.whenNone });
|
|
48
|
+
fw.writeLine(level, '(result as CiceroMark.IOptional).whenNone = $result.nodes[0];');
|
|
49
|
+
fw.writeLine(level, '(result as CiceroMark.IOptional).whenSome = $result.nodes[0];'); // HACK - model needs to be updated
|
|
50
|
+
fw.writeLine(level, 'return result;');
|
|
51
|
+
fw.writeLine(level, '}');
|
|
52
|
+
(0, Common_1.writeCloseGenerateScope)(fw, level);
|
|
53
|
+
delete templateMarkNode.nodes;
|
|
54
|
+
delete templateMarkNode.whenSome; // already handled
|
|
55
|
+
delete templateMarkNode.whenNone;
|
|
56
|
+
};
|
|
57
|
+
Optional.prototype.exit = function (fw, level) {
|
|
58
|
+
(0, Common_1.writeCloseDataScope)(fw, level);
|
|
59
|
+
(0, Common_1.writeCloseNodeScope)(fw, level);
|
|
60
|
+
};
|
|
61
|
+
Optional.TYPE = "".concat(markdown_common_1.TemplateMarkModel.NAMESPACE, ".OptionalDefinition");
|
|
62
|
+
return Optional;
|
|
63
|
+
}(Common_1.AbstractComplexCompiler));
|
|
64
|
+
exports.Optional = Optional;
|
|
65
|
+
//# sourceMappingURL=Optional.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Optional.js","sourceRoot":"","sources":["../../src/compilers/Optional.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAcA,kEAAmF;AAInF,mCAAqO;AAGrO;IAA8B,4BAAuB;IAEjD;eACI,kBAAM,KAAK,CAAC;IAChB,CAAC;IAED,wBAAK,GAAL,UAAM,EAAa,EAAE,KAAY,EAAC,gBAAoC;QAClE,IAAA,mBAAU,EAAC,EAAE,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC;QACxC,IAAA,2BAAkB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;QAC7B,IAAA,2BAAkB,EAAC,EAAE,EAAC,KAAK,EAAC,gBAAgB,CAAC,IAAI,EAAE,IA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C,CAAC,EAAE,EAAC,MAAM,EAAE,UAAG,iCAAe,CAAC,SAAS,eAAY,EAAE,KAAK,EAAE,gBAAgB,CAAC,QAAQ,EAAC,CAAC,CAAC;QACxG,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,+DAA+D,CAAC,CAAC;QACrF,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,+DAA+D,CAAC,CAAC,CAAE,mCAAmC;QAC1H,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;QACtC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACzB,IAAA,gCAAuB,EAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACnC,OAAO,gBAAgB,CAAC,KAAK,CAAC;QAC9B,OAAQ,gBAAwB,CAAC,QAAQ,CAAC,CAAC,kBAAkB;QAC7D,OAAQ,gBAAwB,CAAC,QAAQ,CAAC;IAC9C,CAAC;IAED,uBAAI,GAAJ,UAAK,EAAa,EAAE,KAAY;QAC5B,IAAA,4BAAmB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;QAC9B,IAAA,4BAAmB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAzCM,aAAI,GAAG,UAAG,mCAAiB,CAAC,SAAS,wBAAqB,CAAC;IA0CtE,eAAC;CAAA,AA3CD,CAA8B,gCAAuB,GA2CpD;AA3CY,4BAAQ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FileWriter } from '@accordproject/concerto-util';
|
|
2
|
+
import { IVariableDefinition } from '../model-gen/org.accordproject.templatemark@0.4.0';
|
|
3
|
+
import { AbstractComplexCompiler } from './Common';
|
|
4
|
+
export declare class Variable extends AbstractComplexCompiler {
|
|
5
|
+
static TYPE: string;
|
|
6
|
+
constructor();
|
|
7
|
+
generate(fw: FileWriter, level: number, templateMarkNode: IVariableDefinition): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.Variable = void 0;
|
|
19
|
+
var markdown_common_1 = require("@accordproject/markdown-common");
|
|
20
|
+
var Common_1 = require("./Common");
|
|
21
|
+
var Variable = /** @class */ (function (_super) {
|
|
22
|
+
__extends(Variable, _super);
|
|
23
|
+
function Variable() {
|
|
24
|
+
return _super.call(this, true) || this;
|
|
25
|
+
}
|
|
26
|
+
Variable.prototype.generate = function (fw, level, templateMarkNode) {
|
|
27
|
+
var clone = (0, Common_1.makeCiceroMark)(templateMarkNode);
|
|
28
|
+
(0, Common_1.writeOpenGenerateScope)(fw, level);
|
|
29
|
+
if (templateMarkNode.name !== 'this') {
|
|
30
|
+
(0, Common_1.writeOpenDataScope)(fw, level, templateMarkNode.name);
|
|
31
|
+
}
|
|
32
|
+
fw.writeLine(level, 'const text = JSON.stringify(Runtime.peek($data)) as string;');
|
|
33
|
+
if (templateMarkNode.name !== 'this') {
|
|
34
|
+
(0, Common_1.writeCloseDataScope)(fw, level);
|
|
35
|
+
}
|
|
36
|
+
fw.writeLine(level, "const variable:any = ".concat(JSON.stringify(clone), ";"));
|
|
37
|
+
fw.writeLine(level, 'variable.value = text;');
|
|
38
|
+
fw.writeLine(level, "return variable as ".concat((0, Common_1.getTypeScriptType)(clone.$class), ";"));
|
|
39
|
+
(0, Common_1.writeCloseGenerateScope)(fw, level);
|
|
40
|
+
};
|
|
41
|
+
Variable.TYPE = "".concat(markdown_common_1.TemplateMarkModel.NAMESPACE, ".VariableDefinition");
|
|
42
|
+
return Variable;
|
|
43
|
+
}(Common_1.AbstractComplexCompiler));
|
|
44
|
+
exports.Variable = Variable;
|
|
45
|
+
//# sourceMappingURL=Variable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Variable.js","sourceRoot":"","sources":["../../src/compilers/Variable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAcA,kEAAmE;AAGnE,mCAAgL;AAEhL;IAA8B,4BAAuB;IAEjD;eACI,kBAAM,IAAI,CAAC;IACf,CAAC;IACD,2BAAQ,GAAR,UAAS,EAAa,EAAE,KAAY,EAAE,gBAAoC;QACtE,IAAM,KAAK,GAAG,IAAA,uBAAc,EAAC,gBAAgB,CAAc,CAAC;QAC5D,IAAA,+BAAsB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;QACjC,IAAG,gBAAgB,CAAC,IAAI,KAAK,MAAM,EAAE;YACjC,IAAA,2BAAkB,EAAC,EAAE,EAAC,KAAK,EAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;SACtD;QACD,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,6DAA6D,CAAC,CAAC;QACnF,IAAG,gBAAgB,CAAC,IAAI,KAAK,MAAM,EAAE;YACjC,IAAA,4BAAmB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;SACjC;QACD,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,+BAAwB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAG,CAAC,CAAC;QACtE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC;QAC9C,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,6BAAsB,IAAA,0BAAiB,EAAC,KAAK,CAAC,MAAM,CAAC,MAAG,CAAC,CAAC;QAC9E,IAAA,gCAAuB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAlBM,aAAI,GAAG,UAAG,mCAAiB,CAAC,SAAS,wBAAqB,CAAC;IAmBtE,eAAC;CAAA,AApBD,CAA8B,gCAAuB,GAoBpD;AApBY,4BAAQ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FileWriter } from '@accordproject/concerto-util';
|
|
2
|
+
import { IWithDefinition } from '../model-gen/org.accordproject.templatemark@0.4.0';
|
|
3
|
+
import { AbstractComplexCompiler } from './Common';
|
|
4
|
+
export declare class With extends AbstractComplexCompiler {
|
|
5
|
+
static TYPE: string;
|
|
6
|
+
constructor();
|
|
7
|
+
enter(fw: FileWriter, level: number, templateMarkNode: IWithDefinition): void;
|
|
8
|
+
generate(fw: FileWriter, level: number, templateMarkNode: IWithDefinition): void;
|
|
9
|
+
exit(fw: FileWriter, level: number): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.With = void 0;
|
|
19
|
+
var markdown_common_1 = require("@accordproject/markdown-common");
|
|
20
|
+
var Common_1 = require("./Common");
|
|
21
|
+
var With = /** @class */ (function (_super) {
|
|
22
|
+
__extends(With, _super);
|
|
23
|
+
function With() {
|
|
24
|
+
return _super.call(this, false) || this;
|
|
25
|
+
}
|
|
26
|
+
With.prototype.enter = function (fw, level, templateMarkNode) {
|
|
27
|
+
(0, Common_1.writeDebug)(fw, level, templateMarkNode);
|
|
28
|
+
(0, Common_1.writeOpenDataScope)(fw, level, templateMarkNode.name);
|
|
29
|
+
};
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
31
|
+
With.prototype.generate = function (fw, level, templateMarkNode) {
|
|
32
|
+
};
|
|
33
|
+
With.prototype.exit = function (fw, level) {
|
|
34
|
+
(0, Common_1.writeCloseDataScope)(fw, level);
|
|
35
|
+
};
|
|
36
|
+
With.TYPE = "".concat(markdown_common_1.TemplateMarkModel.NAMESPACE, ".WithDefinition");
|
|
37
|
+
return With;
|
|
38
|
+
}(Common_1.AbstractComplexCompiler));
|
|
39
|
+
exports.With = With;
|
|
40
|
+
//# sourceMappingURL=With.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"With.js","sourceRoot":"","sources":["../../src/compilers/With.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAcA,kEAAmE;AAEnE,mCAAwG;AAExG;IAA0B,wBAAuB;IAE7C;eACI,kBAAM,KAAK,CAAC;IAChB,CAAC;IAED,oBAAK,GAAL,UAAM,EAAa,EAAE,KAAY,EAAC,gBAAgC;QAC9D,IAAA,mBAAU,EAAC,EAAE,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC;QACxC,IAAA,2BAAkB,EAAC,EAAE,EAAC,KAAK,EAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,mGAAmG;IACnG,uBAAQ,GAAR,UAAS,EAAa,EAAE,KAAY,EAAE,gBAAgC;IACtE,CAAC;IAED,mBAAI,GAAJ,UAAK,EAAa,EAAE,KAAY;QAC5B,IAAA,4BAAmB,EAAC,EAAE,EAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAhBM,SAAI,GAAG,UAAG,mCAAiB,CAAC,SAAS,oBAAiB,CAAC;IAiBlE,WAAC;CAAA,AAlBD,CAA0B,gCAAuB,GAkBhD;AAlBY,oBAAI"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
/**
|
|
17
|
+
* Creates a drafter for Boolean
|
|
18
|
+
* @param {Boolean} value the Boolean
|
|
19
|
+
* @returns {string} the text
|
|
20
|
+
*/
|
|
21
|
+
function booleanDrafter(value) {
|
|
22
|
+
if (value) {
|
|
23
|
+
return 'true';
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return 'false';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = booleanDrafter;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drafting/Boolean/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAEH;;;;GAIG;AACH,SAAwB,cAAc,CAAC,KAAa;IAChD,IAAI,KAAK,EAAE;QACP,OAAO,MAAM,CAAC;KACjB;SAAM;QACH,OAAO,OAAO,CAAC;KAClB;AACL,CAAC;AAND,iCAMC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
16
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
|
+
};
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
var dayjs_1 = __importDefault(require("dayjs"));
|
|
20
|
+
var utc_1 = __importDefault(require("dayjs/plugin/utc"));
|
|
21
|
+
dayjs_1.default.extend(utc_1.default);
|
|
22
|
+
/**
|
|
23
|
+
* Creates a drafter for DateTime
|
|
24
|
+
* @param {string} value the DateTime
|
|
25
|
+
* @param {object} format the the format
|
|
26
|
+
* @returns {string} the text
|
|
27
|
+
*/
|
|
28
|
+
function dateTimeDrafter(value, format) {
|
|
29
|
+
var f = format ? format : 'MM/DD/YYYY';
|
|
30
|
+
return dayjs_1.default.utc(value).format(f);
|
|
31
|
+
}
|
|
32
|
+
exports.default = dateTimeDrafter;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drafting/DateTime/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;AAEH,gDAA0B;AAC1B,yDAAmC;AACnC,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAC;AAElB;;;;;GAKG;AACH,SAAwB,eAAe,CAAC,KAAY,EAAC,MAAa;IAC9D,IAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC;IACzC,OAAO,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtC,CAAC;AAHD,kCAGC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a drafter for Double
|
|
3
|
+
* @param {number} value - the double
|
|
4
|
+
* @returns {string} the text
|
|
5
|
+
*/
|
|
6
|
+
export declare function draftDoubleIEEE(value: number): string;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a drafter for a formatted Double
|
|
9
|
+
* @param {number} value - the Double
|
|
10
|
+
* @param {string} format - the format
|
|
11
|
+
* @returns {object} the parser
|
|
12
|
+
*/
|
|
13
|
+
export declare function draftDoubleFormat(value: number, format: string): string;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License.
|
|
5
|
+
* You may obtain a copy of the License at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
* See the License for the specific language governing permissions and
|
|
13
|
+
* limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.draftDoubleFormat = exports.draftDoubleIEEE = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a drafter for Double
|
|
19
|
+
* @param {number} value - the double
|
|
20
|
+
* @returns {string} the text
|
|
21
|
+
*/
|
|
22
|
+
function draftDoubleIEEE(value) {
|
|
23
|
+
if (Math.floor(value) === value) {
|
|
24
|
+
return (new Number(value)).toFixed(1); // Make sure there is always decimal point
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return '' + value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.draftDoubleIEEE = draftDoubleIEEE;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a drafter for a formatted Double
|
|
33
|
+
* @param {number} value - the Double
|
|
34
|
+
* @param {string} format - the format
|
|
35
|
+
* @returns {object} the parser
|
|
36
|
+
*/
|
|
37
|
+
function draftDoubleFormat(value, format) {
|
|
38
|
+
return format.replace(/0(.)0((.)(0+))?/gi, function (_a, sep1, _b, sep2, digits) {
|
|
39
|
+
var len = digits ? digits.length : 0;
|
|
40
|
+
var vs = value.toFixed(len);
|
|
41
|
+
var res = '';
|
|
42
|
+
if (sep2) {
|
|
43
|
+
var d = vs.substring(vs.length - len);
|
|
44
|
+
res += sep2 + d;
|
|
45
|
+
}
|
|
46
|
+
var i = vs.substring(0, vs.length - (len === 0 ? 0 : len + 1));
|
|
47
|
+
while (i.length > 3) {
|
|
48
|
+
res = sep1 + i.substring(i.length - 3) + res;
|
|
49
|
+
i = i.substring(0, i.length - 3);
|
|
50
|
+
}
|
|
51
|
+
return i + res;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
exports.draftDoubleFormat = draftDoubleFormat;
|
|
55
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0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