@sankhyalabs/core 1.0.42 → 1.0.45
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/.eslintignore +1 -1
- package/.eslintrc.cjs +34 -34
- package/README.md +54 -54
- package/dist/dataunit/DataUnit.d.ts +87 -82
- package/dist/dataunit/DataUnit.js +290 -278
- package/dist/dataunit/DataUnit.js.map +1 -1
- package/dist/dataunit/metadata/DataType.d.ts +9 -9
- package/dist/dataunit/metadata/DataType.js +36 -36
- package/dist/dataunit/metadata/UnitMetadata.d.ts +71 -71
- package/dist/dataunit/metadata/UnitMetadata.js +31 -31
- package/dist/dataunit/state/HistReducer.d.ts +10 -10
- package/dist/dataunit/state/HistReducer.js +27 -27
- package/dist/dataunit/state/StateManager.d.ts +57 -57
- package/dist/dataunit/state/StateManager.js +96 -96
- package/dist/dataunit/state/action/DataUnitAction.d.ts +29 -28
- package/dist/dataunit/state/action/DataUnitAction.js +34 -33
- package/dist/dataunit/state/action/DataUnitAction.js.map +1 -1
- package/dist/dataunit/state/slice/AddedRecordsSlice.d.ts +11 -11
- package/dist/dataunit/state/slice/AddedRecordsSlice.js +25 -25
- package/dist/dataunit/state/slice/ChangesSlice.d.ts +12 -12
- package/dist/dataunit/state/slice/ChangesSlice.js +76 -72
- package/dist/dataunit/state/slice/ChangesSlice.js.map +1 -1
- package/dist/dataunit/state/slice/CurrentRecordsSlice.d.ts +11 -11
- package/dist/dataunit/state/slice/CurrentRecordsSlice.js +45 -45
- package/dist/dataunit/state/slice/RecordsSlice.d.ts +10 -10
- package/dist/dataunit/state/slice/RecordsSlice.js +43 -43
- package/dist/dataunit/state/slice/RemovedRecordsSlice.d.ts +9 -9
- package/dist/dataunit/state/slice/RemovedRecordsSlice.js +24 -24
- package/dist/dataunit/state/slice/SelectionSlice.d.ts +11 -11
- package/dist/dataunit/state/slice/SelectionSlice.js +111 -111
- package/dist/dataunit/state/slice/UnitMetadataSlice.d.ts +11 -11
- package/dist/dataunit/state/slice/UnitMetadataSlice.js +20 -20
- package/dist/dataunit/state/slice/WaitingChangesSlice.d.ts +9 -0
- package/dist/dataunit/state/slice/WaitingChangesSlice.js +32 -0
- package/dist/dataunit/state/slice/WaitingChangesSlice.js.map +1 -0
- package/dist/http/AuthorizedServiceCaller.d.ts +11 -11
- package/dist/http/AuthorizedServiceCaller.js +53 -53
- package/dist/http/HttpProvider.d.ts +25 -25
- package/dist/http/HttpProvider.js +73 -73
- package/dist/http/RequestMetadata.d.ts +30 -30
- package/dist/http/RequestMetadata.js +24 -24
- package/dist/http/SkwHttpProvider.d.ts +9 -9
- package/dist/http/SkwHttpProvider.js +66 -66
- package/dist/index.d.ts +16 -16
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/ui/FloatingManager.d.ts +25 -24
- package/dist/ui/FloatingManager.js +124 -122
- package/dist/ui/FloatingManager.js.map +1 -1
- package/dist/utils/ApplicationContext.d.ts +5 -5
- package/dist/utils/ApplicationContext.js +16 -16
- package/dist/utils/CriteriaModel.d.ts +109 -109
- package/dist/utils/CriteriaModel.js +173 -173
- package/dist/utils/CriteriaParameter.d.ts +69 -69
- package/dist/utils/CriteriaParameter.js +82 -82
- package/dist/utils/DateUtils.d.ts +5 -5
- package/dist/utils/DateUtils.js +42 -42
- package/dist/utils/MaskFormatter.d.ts +126 -126
- package/dist/utils/MaskFormatter.js +275 -275
- package/dist/utils/NumberUtils.d.ts +53 -53
- package/dist/utils/NumberUtils.js +141 -141
- package/dist/utils/StringUtils.d.ts +18 -18
- package/dist/utils/StringUtils.js +53 -53
- package/dist/utils/TimeFormatter.d.ts +33 -33
- package/dist/utils/TimeFormatter.js +97 -97
- package/jest.config.ts +16 -16
- package/mock/http/XMLHttpRequest-mock.js +25 -25
- package/package.json +38 -37
- package/scripts/runlink.bat +1 -0
- package/src/dataunit/DataUnit.ts +374 -356
- package/src/dataunit/metadata/DataType.ts +37 -37
- package/src/dataunit/metadata/UnitMetadata.ts +82 -82
- package/src/dataunit/state/HistReducer.ts +33 -33
- package/src/dataunit/state/StateManager.ts +141 -141
- package/src/dataunit/state/action/DataUnitAction.ts +52 -50
- package/src/dataunit/state/slice/AddedRecordsSlice.ts +32 -32
- package/src/dataunit/state/slice/ChangesSlice.ts +95 -90
- package/src/dataunit/state/slice/CurrentRecordsSlice.ts +53 -53
- package/src/dataunit/state/slice/RecordsSlice.ts +56 -56
- package/src/dataunit/state/slice/RemovedRecordsSlice.ts +29 -29
- package/src/dataunit/state/slice/SelectionSlice.ts +130 -130
- package/src/dataunit/state/slice/UnitMetadataSlice.ts +29 -29
- package/src/dataunit/state/slice/WaitingChangesSlice.ts +44 -0
- package/src/http/AuthorizedServiceCaller.ts +58 -58
- package/src/http/HttpProvider.ts +93 -93
- package/src/http/RequestMetadata.ts +41 -41
- package/src/http/SkwHttpProvider.ts +77 -77
- package/src/index.ts +45 -44
- package/src/ui/FloatingManager.ts +167 -165
- package/src/utils/ApplicationContext.ts +18 -18
- package/src/utils/CriteriaModel.ts +207 -207
- package/src/utils/CriteriaParameter.ts +107 -107
- package/src/utils/DateUtils.ts +52 -52
- package/src/utils/MaskFormatter.ts +322 -322
- package/src/utils/NumberUtils.ts +174 -174
- package/src/utils/StringUtils.ts +60 -60
- package/src/utils/TimeFormatter.ts +97 -97
- package/test/http/HttpProvider.spec.ts +34 -34
- package/test/http/SkwHttpProvider.ts.spec.ts +33 -33
- package/test/util/CriteriaModel.spec.ts +231 -231
- package/test/util/CriteriaParameter.spec.ts +51 -51
- package/test/util/MaskFormatter.spec.ts +138 -138
- package/test/util/NumberUtils.spec.ts +156 -156
- package/test/util/StringUtils.spec.ts +43 -43
- package/test/util/TimeFormatter.spec.ts +25 -25
- package/tsconfig.json +15 -15
- package/dist/application/Application.d.ts +0 -8
- package/dist/application/Application.js +0 -19
- package/dist/application/Application.js.map +0 -1
- package/dist/http/data-fetcher/HttpFetcher.d.ts +0 -14
- package/dist/http/data-fetcher/HttpFetcher.js +0 -164
- package/dist/http/data-fetcher/HttpFetcher.js.map +0 -1
- package/dist/http/data-fetcher/default/DefaultGraphQL.d.ts +0 -3
- package/dist/http/data-fetcher/default/DefaultGraphQL.js +0 -18
- package/dist/http/data-fetcher/default/DefaultGraphQL.js.map +0 -1
- package/dist/http/data-fetcher/default/application-config-fetcher.d.ts +0 -6
- package/dist/http/data-fetcher/default/application-config-fetcher.js +0 -21
- package/dist/http/data-fetcher/default/application-config-fetcher.js.map +0 -1
- package/dist/http/data-fetcher/default/data-unit-graphql.d.ts +0 -3
- package/dist/http/data-fetcher/default/data-unit-graphql.js +0 -18
- package/dist/http/data-fetcher/default/data-unit-graphql.js.map +0 -1
- package/dist/http/data-fetcher/default/dataunit-executor.d.ts +0 -10
- package/dist/http/data-fetcher/default/dataunit-executor.js +0 -56
- package/dist/http/data-fetcher/default/dataunit-executor.js.map +0 -1
- package/dist/http/data-fetcher/default/dataunit-fetcher.d.ts +0 -9
- package/dist/http/data-fetcher/default/dataunit-fetcher.js +0 -69
- package/dist/http/data-fetcher/default/dataunit-fetcher.js.map +0 -1
- package/dist/http/data-fetcher/default/form-config-fetcher.d.ts +0 -2
- package/dist/http/data-fetcher/default/form-config-fetcher.js +0 -3
- package/dist/http/data-fetcher/default/form-config-fetcher.js.map +0 -1
- package/dist/http/data-fetcher/default/grid-config-fetcher.d.ts +0 -2
- package/dist/http/data-fetcher/default/grid-config-fetcher.js +0 -3
- package/dist/http/data-fetcher/default/grid-config-fetcher.js.map +0 -1
- package/dist/http/data-fetcher/default/index.d.ts +0 -0
- package/dist/http/data-fetcher/default/index.js +0 -2
- package/dist/http/data-fetcher/default/index.js.map +0 -1
- package/dist/http/data-fetcher/default/sankhya-graphql.d.ts +0 -3
- package/dist/http/data-fetcher/default/sankhya-graphql.js +0 -8
- package/dist/http/data-fetcher/default/sankhya-graphql.js.map +0 -1
- package/dist/http/data-fetcher/graphql/DefaultGraphQl.d.ts +0 -3
- package/dist/http/data-fetcher/graphql/DefaultGraphQl.js +0 -18
- package/dist/http/data-fetcher/graphql/DefaultGraphQl.js.map +0 -1
- package/dist/http/data-fetcher/state/LoadStateManager.d.ts +0 -23
- package/dist/http/data-fetcher/state/LoadStateManager.js +0 -78
- package/dist/http/data-fetcher/state/LoadStateManager.js.map +0 -1
|
@@ -1,166 +1,168 @@
|
|
|
1
|
-
interface FloatingOptions {
|
|
2
|
-
autoClose: boolean;
|
|
3
|
-
top?: string;
|
|
4
|
-
left?: string;
|
|
5
|
-
right?: string;
|
|
6
|
-
bottom?: string;
|
|
7
|
-
innerClickTest?: Function;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
private
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
private static
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
document.addEventListener('
|
|
53
|
-
FloatingManager.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
FloatingManager.applyStyle(content, "
|
|
142
|
-
FloatingManager.applyStyle(content, "
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
FloatingManager.applyStyle(content, "
|
|
156
|
-
FloatingManager.applyStyle(content, "
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
1
|
+
interface FloatingOptions {
|
|
2
|
+
autoClose: boolean;
|
|
3
|
+
top?: string;
|
|
4
|
+
left?: string;
|
|
5
|
+
right?: string;
|
|
6
|
+
bottom?: string;
|
|
7
|
+
innerClickTest?: Function;
|
|
8
|
+
backClickListener?: Function;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class FloatingEntry {
|
|
12
|
+
|
|
13
|
+
private weakRefParent?: WeakRef<HTMLElement>;
|
|
14
|
+
private weakRefContent?: WeakRef<HTMLElement>;
|
|
15
|
+
private strongRefParent?: HTMLElement;
|
|
16
|
+
private strongRefContent?: HTMLElement;
|
|
17
|
+
public options: FloatingOptions;
|
|
18
|
+
|
|
19
|
+
constructor(parent: HTMLElement, content: HTMLElement, opts: FloatingOptions) {
|
|
20
|
+
try{
|
|
21
|
+
this.weakRefParent = new WeakRef(parent);
|
|
22
|
+
this.weakRefContent = new WeakRef(content);
|
|
23
|
+
} catch(error){
|
|
24
|
+
this.strongRefParent = parent;
|
|
25
|
+
this.strongRefContent = content;
|
|
26
|
+
}
|
|
27
|
+
this.options = opts;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public get parent():HTMLElement|undefined{
|
|
31
|
+
if(this.weakRefParent){
|
|
32
|
+
return this.weakRefParent.deref();
|
|
33
|
+
}
|
|
34
|
+
return this.strongRefParent
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public get content():HTMLElement|undefined{
|
|
38
|
+
if(this.weakRefContent){
|
|
39
|
+
return this.weakRefContent.deref();
|
|
40
|
+
}
|
|
41
|
+
return this.strongRefContent;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default class FloatingManager {
|
|
46
|
+
|
|
47
|
+
private static initialized: boolean;
|
|
48
|
+
private static entries: Array<FloatingEntry>;
|
|
49
|
+
|
|
50
|
+
private static init() {
|
|
51
|
+
FloatingManager.entries = [];
|
|
52
|
+
document.addEventListener('mousedown', FloatingManager.handleDocumentEvent);
|
|
53
|
+
document.addEventListener('keydown', FloatingManager.handleKeyboardEvent);
|
|
54
|
+
FloatingManager.initialized = true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
private static innerClick(container: HTMLElement, node: HTMLElement) {
|
|
58
|
+
if (container.contains(node)) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (container.shadowRoot && container.shadowRoot.contains(node)) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private static doClose(id: number, entry: FloatingEntry, target?: HTMLElement, event?:Event) {
|
|
70
|
+
if (!target || entry.options.autoClose) {
|
|
71
|
+
const parent: HTMLElement | undefined = entry.parent;
|
|
72
|
+
const content: HTMLElement | undefined = entry.content;
|
|
73
|
+
|
|
74
|
+
if (parent && content) {
|
|
75
|
+
const innerClickFunction: Function = entry.options.innerClickTest ? entry.options.innerClickTest : FloatingManager.innerClick;
|
|
76
|
+
const backClickFunction: Function = entry.options.backClickListener ? entry.options.backClickListener : () => {};
|
|
77
|
+
if (!target || !innerClickFunction(content, target, event)) {
|
|
78
|
+
content.remove();
|
|
79
|
+
delete FloatingManager.entries[id];
|
|
80
|
+
backClickFunction();
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
delete FloatingManager.entries[id];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private static handleDocumentEvent(event: Event) {
|
|
89
|
+
|
|
90
|
+
FloatingManager.entries.forEach((entry, index) => {
|
|
91
|
+
FloatingManager.doClose(index, entry, event.composedPath()[0] as HTMLElement, event);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
private static handleKeyboardEvent(event: KeyboardEvent) {
|
|
96
|
+
if (event.key === 'Escape') {
|
|
97
|
+
for (let index: number = FloatingManager.entries.length; index >= 0; index--) {
|
|
98
|
+
const entry: FloatingEntry = FloatingManager.entries[index];
|
|
99
|
+
if (entry) {
|
|
100
|
+
FloatingManager.close(index);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
private static applyStyle(element: HTMLElement, propertyName: string, value?: string) {
|
|
108
|
+
if (value) {
|
|
109
|
+
element.style.setProperty(propertyName, value);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
private static getFloatIndex(content: HTMLElement, parent: HTMLElement): number {
|
|
114
|
+
|
|
115
|
+
for (let index: number = 0; index < FloatingManager.entries.length; index++) {
|
|
116
|
+
const entry: FloatingEntry = FloatingManager.entries[index];
|
|
117
|
+
if (entry && content === entry.content && parent === entry.parent) {
|
|
118
|
+
return index;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return -1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
public static isFloating(id: number){
|
|
125
|
+
return FloatingManager.entries[id] !== undefined;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
public static float(content: HTMLElement, parent: HTMLElement, options: FloatingOptions = { autoClose: true }): number {
|
|
129
|
+
|
|
130
|
+
if (!FloatingManager.initialized) {
|
|
131
|
+
FloatingManager.init();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const alreadyFloatingIndex = FloatingManager.getFloatIndex(content, parent);
|
|
135
|
+
|
|
136
|
+
if (alreadyFloatingIndex > -1) {
|
|
137
|
+
return alreadyFloatingIndex;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
content.style.position = 'absolute';
|
|
141
|
+
FloatingManager.applyStyle(content, "top", options.top);
|
|
142
|
+
FloatingManager.applyStyle(content, "left", options.left);
|
|
143
|
+
FloatingManager.applyStyle(content, "right", options.right);
|
|
144
|
+
FloatingManager.applyStyle(content, "bottom", options.bottom);
|
|
145
|
+
|
|
146
|
+
parent.appendChild(content);
|
|
147
|
+
FloatingManager.entries.push(new FloatingEntry(parent, content, options));
|
|
148
|
+
|
|
149
|
+
return FloatingManager.entries.length - 1;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
public static updateFloatPosition(content: HTMLElement, parent: HTMLElement, options: FloatingOptions = { autoClose: true }) {
|
|
153
|
+
const alreadyFloatingIndex = FloatingManager.getFloatIndex(content, parent);
|
|
154
|
+
if (alreadyFloatingIndex > -1) {
|
|
155
|
+
FloatingManager.applyStyle(content, "top", options.top);
|
|
156
|
+
FloatingManager.applyStyle(content, "left", options.left);
|
|
157
|
+
FloatingManager.applyStyle(content, "right", options.right);
|
|
158
|
+
FloatingManager.applyStyle(content, "bottom", options.bottom);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
public static close(id: number) {
|
|
164
|
+
if (FloatingManager.entries[id]) {
|
|
165
|
+
FloatingManager.doClose(id, FloatingManager.entries[id], undefined);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
166
168
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export default class ApplicationContext{
|
|
2
|
-
|
|
3
|
-
public static getContextValue(key: string):any{
|
|
4
|
-
return ApplicationContext.getCtx()[key];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
public static setContextValue(key: string, value: any):any{
|
|
8
|
-
ApplicationContext.getCtx()[key] = value;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
private static getCtx():any{
|
|
12
|
-
let ctx = (window as any).___snkcore___ctx___;
|
|
13
|
-
if(!ctx){
|
|
14
|
-
ctx = {};
|
|
15
|
-
(window as any).___snkcore___ctx___ = ctx;
|
|
16
|
-
}
|
|
17
|
-
return ctx;
|
|
18
|
-
}
|
|
1
|
+
export default class ApplicationContext{
|
|
2
|
+
|
|
3
|
+
public static getContextValue(key: string):any{
|
|
4
|
+
return ApplicationContext.getCtx()[key];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
public static setContextValue(key: string, value: any):any{
|
|
8
|
+
ApplicationContext.getCtx()[key] = value;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
private static getCtx():any{
|
|
12
|
+
let ctx = (window as any).___snkcore___ctx___;
|
|
13
|
+
if(!ctx){
|
|
14
|
+
ctx = {};
|
|
15
|
+
(window as any).___snkcore___ctx___ = ctx;
|
|
16
|
+
}
|
|
17
|
+
return ctx;
|
|
18
|
+
}
|
|
19
19
|
}
|