@codenotch/codenotch.react 1.0.81 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -19
- package/dist/components/CodeEditor.d.ts +1 -1
- package/dist/components/CodeEditor.d.ts.map +1 -1
- package/dist/components/CodeEditor.js +66 -64
- package/dist/index.d.ts +86 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +158 -26
- package/dist/models/Codenotch.d.ts +30 -13
- package/dist/models/Codenotch.d.ts.map +1 -1
- package/package.json +46 -44
- package/src/components/CodeEditor.tsx +204 -203
- package/src/index.ts +531 -386
- package/src/models/Codenotch.ts +31 -13
- package/dist/components/Auml.d.ts +0 -46
- package/dist/components/Auml.d.ts.map +0 -1
- package/dist/components/Auml.js +0 -208
- package/dist/models/AppManifestModels.d.ts +0 -46
- package/dist/models/AppManifestModels.d.ts.map +0 -1
- package/dist/models/AppManifestModels.js +0 -2
- package/dist/models/ProjectManifestModels.d.ts +0 -126
- package/dist/models/ProjectManifestModels.d.ts.map +0 -1
- package/dist/models/ProjectManifestModels.js +0 -158
- package/dist/utils/I18nUtils.d.ts +0 -7
- package/dist/utils/I18nUtils.d.ts.map +0 -1
- package/dist/utils/I18nUtils.js +0 -37
- package/src/models/AppManifestModels.ts +0 -54
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProjectManifestParameter = exports.ProjectManifestApi = exports.ProjectManifestApplicationInsight = exports.ProjectManifestScript = exports.ProjectManifestExpressComponent = exports.ProjectManifestHtml = exports.ProjectManifestEmail = exports.ProjectManifestPdf = exports.ProjectManifestApplication = exports.ProjectManifestReactApplication = exports.ProjectManifestProcessStartEvent = exports.ProjectManigestSignal = exports.ProjectManifestProcess = exports.ProjectManifestDatastore = exports.ProjectManifestRole = exports.ProjectManifestDependency = exports.ProjectManifestPostInstallationProcess = exports.ProjectManifest = void 0;
|
|
4
|
-
class ProjectManifest {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.projectName = '';
|
|
7
|
-
this.serviceName = '';
|
|
8
|
-
this.version = '0.0.0';
|
|
9
|
-
this.packages = {};
|
|
10
|
-
this.apis = [];
|
|
11
|
-
this.applications = [];
|
|
12
|
-
this.expressComponents = [];
|
|
13
|
-
this.scripts = [];
|
|
14
|
-
this.pdfs = [];
|
|
15
|
-
this.emails = [];
|
|
16
|
-
this.htmls = [];
|
|
17
|
-
this.processes = [];
|
|
18
|
-
this.tableDataSources = [];
|
|
19
|
-
this.documentDataSources = [];
|
|
20
|
-
this.roles = [];
|
|
21
|
-
this.languages = [];
|
|
22
|
-
this.postInstallationProcesses = [];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.ProjectManifest = ProjectManifest;
|
|
26
|
-
class ProjectManifestPostInstallationProcess {
|
|
27
|
-
constructor() {
|
|
28
|
-
this.processName = '';
|
|
29
|
-
this.startEvent = '';
|
|
30
|
-
}
|
|
31
|
-
;
|
|
32
|
-
;
|
|
33
|
-
}
|
|
34
|
-
exports.ProjectManifestPostInstallationProcess = ProjectManifestPostInstallationProcess;
|
|
35
|
-
class ProjectManifestDependency {
|
|
36
|
-
constructor() {
|
|
37
|
-
this.name = '';
|
|
38
|
-
this.version = '';
|
|
39
|
-
//TODO more options ? optional dependency, auto install, ...
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.ProjectManifestDependency = ProjectManifestDependency;
|
|
43
|
-
class ProjectManifestRole {
|
|
44
|
-
constructor() {
|
|
45
|
-
this.name = '';
|
|
46
|
-
this.description = '';
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.ProjectManifestRole = ProjectManifestRole;
|
|
50
|
-
class ProjectManifestDatastore {
|
|
51
|
-
constructor() {
|
|
52
|
-
this.name = '';
|
|
53
|
-
this.file = '';
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.ProjectManifestDatastore = ProjectManifestDatastore;
|
|
57
|
-
class ProjectManifestProcess {
|
|
58
|
-
constructor() {
|
|
59
|
-
this.processName = '';
|
|
60
|
-
this.file = '';
|
|
61
|
-
this.startEvents = [];
|
|
62
|
-
this.endEvent = {};
|
|
63
|
-
this.signals = [];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.ProjectManifestProcess = ProjectManifestProcess;
|
|
67
|
-
class ProjectManigestSignal {
|
|
68
|
-
constructor() {
|
|
69
|
-
this.signalId = '';
|
|
70
|
-
this.type = '';
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.ProjectManigestSignal = ProjectManigestSignal;
|
|
74
|
-
class ProjectManifestProcessStartEvent {
|
|
75
|
-
constructor() {
|
|
76
|
-
this.nodeId = '';
|
|
77
|
-
this.kind = '';
|
|
78
|
-
this.scope = '';
|
|
79
|
-
this.roles = [];
|
|
80
|
-
this.input = {};
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
exports.ProjectManifestProcessStartEvent = ProjectManifestProcessStartEvent;
|
|
84
|
-
class ProjectManifestReactApplication {
|
|
85
|
-
constructor() {
|
|
86
|
-
this.applicationName = '';
|
|
87
|
-
this.file = '';
|
|
88
|
-
this.scope = '';
|
|
89
|
-
this.roles = [];
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
exports.ProjectManifestReactApplication = ProjectManifestReactApplication;
|
|
93
|
-
class ProjectManifestApplication {
|
|
94
|
-
constructor() {
|
|
95
|
-
this.applicationName = '';
|
|
96
|
-
this.file = '';
|
|
97
|
-
this.scope = '';
|
|
98
|
-
this.roles = [];
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.ProjectManifestApplication = ProjectManifestApplication;
|
|
102
|
-
class ProjectManifestPdf {
|
|
103
|
-
constructor() {
|
|
104
|
-
this.name = '';
|
|
105
|
-
this.file = '';
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
exports.ProjectManifestPdf = ProjectManifestPdf;
|
|
109
|
-
class ProjectManifestEmail {
|
|
110
|
-
constructor() {
|
|
111
|
-
this.name = '';
|
|
112
|
-
this.file = '';
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
exports.ProjectManifestEmail = ProjectManifestEmail;
|
|
116
|
-
class ProjectManifestHtml {
|
|
117
|
-
constructor() {
|
|
118
|
-
this.name = '';
|
|
119
|
-
this.file = '';
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.ProjectManifestHtml = ProjectManifestHtml;
|
|
123
|
-
class ProjectManifestExpressComponent {
|
|
124
|
-
constructor() {
|
|
125
|
-
this.componentName = '';
|
|
126
|
-
this.file = '';
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.ProjectManifestExpressComponent = ProjectManifestExpressComponent;
|
|
130
|
-
class ProjectManifestScript {
|
|
131
|
-
constructor() {
|
|
132
|
-
this.file = '';
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
exports.ProjectManifestScript = ProjectManifestScript;
|
|
136
|
-
class ProjectManifestApplicationInsight {
|
|
137
|
-
constructor() {
|
|
138
|
-
this.key = '';
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
exports.ProjectManifestApplicationInsight = ProjectManifestApplicationInsight;
|
|
142
|
-
class ProjectManifestApi {
|
|
143
|
-
constructor() {
|
|
144
|
-
this.path = '';
|
|
145
|
-
this.method = '';
|
|
146
|
-
this.bpmn = '';
|
|
147
|
-
this.startNode = '';
|
|
148
|
-
this.accept = '';
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
exports.ProjectManifestApi = ProjectManifestApi;
|
|
152
|
-
class ProjectManifestParameter {
|
|
153
|
-
constructor() {
|
|
154
|
-
this.key = '';
|
|
155
|
-
this.value = '';
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
exports.ProjectManifestParameter = ProjectManifestParameter;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"I18nUtils.d.ts","sourceRoot":"","sources":["../../src/utils/I18nUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,aAAa,EAAgB,MAAM,IAAI,CAAC;AAEhE,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,SAAS;WAErB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,GAAG,MAAM;IAOnE,OAAO,CAAC,MAAM,CAAC,UAAU;IAkBzB,OAAO,CAAC,MAAM,CAAC,UAAU;CAsB5B"}
|
package/dist/utils/I18nUtils.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class I18nUtils {
|
|
4
|
-
static compileAuml(auml, env) {
|
|
5
|
-
auml = this.injectI18n(auml, env);
|
|
6
|
-
return auml;
|
|
7
|
-
}
|
|
8
|
-
static revertI18n(i18n) {
|
|
9
|
-
let result = {};
|
|
10
|
-
for (let language in i18n) {
|
|
11
|
-
let translations = i18n[language];
|
|
12
|
-
for (let key in translations) {
|
|
13
|
-
if (!result[key]) {
|
|
14
|
-
result[key] = {};
|
|
15
|
-
}
|
|
16
|
-
result[key][language] = translations[key];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return result;
|
|
20
|
-
}
|
|
21
|
-
static injectI18n(auml, env) {
|
|
22
|
-
let i18n = this.revertI18n(env.i18n ?? {});
|
|
23
|
-
if (Object.keys(i18n).length === 0) {
|
|
24
|
-
// No i18n variables, return original auml
|
|
25
|
-
return auml;
|
|
26
|
-
}
|
|
27
|
-
// Obtain the root tag of the file
|
|
28
|
-
let match = auml.match(/<([^!\r\n\t\f\v> ]+)/);
|
|
29
|
-
if (!match) {
|
|
30
|
-
return auml;
|
|
31
|
-
}
|
|
32
|
-
let rootTag = match[1];
|
|
33
|
-
auml = auml.replace(`</${rootTag}>`, `<${rootTag}.I18n><![CDATA[${JSON.stringify(i18n)}]]></${rootTag}.I18n></${rootTag}>`);
|
|
34
|
-
return auml;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.default = I18nUtils;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export interface ApplicationManifest {
|
|
3
|
-
pwa?: PWAManifest;
|
|
4
|
-
|
|
5
|
-
html?: HTMLManifest;
|
|
6
|
-
|
|
7
|
-
auml?: AUMLManifest;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface HTMLManifest {
|
|
11
|
-
title?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
author?: string;
|
|
14
|
-
keywords?: string;
|
|
15
|
-
charset?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface PWAManifest {
|
|
19
|
-
background_color?: string;
|
|
20
|
-
description?: string;
|
|
21
|
-
dir?: string;
|
|
22
|
-
display?: string;
|
|
23
|
-
icons?: PWAManifestIcon[];
|
|
24
|
-
lang?: string;
|
|
25
|
-
name?: string;
|
|
26
|
-
orientation?: string;
|
|
27
|
-
prefer_related_applications?: boolean;
|
|
28
|
-
related_applications?: PWAManifestRelatedApplications[];
|
|
29
|
-
scope?: string;
|
|
30
|
-
short_name?: string;
|
|
31
|
-
start_url?: string;
|
|
32
|
-
theme_color?: string;
|
|
33
|
-
shortcuts?: string;
|
|
34
|
-
|
|
35
|
-
display_override?: string[];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface PWAManifestIcon {
|
|
39
|
-
src?: string;
|
|
40
|
-
sizes?: string;
|
|
41
|
-
type?: string;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface PWAManifestRelatedApplications {
|
|
45
|
-
platform?: string;
|
|
46
|
-
url?: string;
|
|
47
|
-
id?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface AUMLManifest {
|
|
51
|
-
name?: string;
|
|
52
|
-
description?: string;
|
|
53
|
-
logoURL?: string;
|
|
54
|
-
}
|