@datagrok/webcomponents 1.2.6 → 1.2.7
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/CHANGELOG.md +4 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/package.json +2 -2
- package/src/package.g.ts +7 -0
- package/src/package.ts +32 -29
- package/webpack.config.js +5 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/webcomponents",
|
|
3
3
|
"friendlyName": "WebComponents",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.7",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Andrey Sharapov",
|
|
7
7
|
"email": "andrey.sharapov@softwarecountry.com"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
|
22
22
|
"@typescript-eslint/parser": "^8.8.1",
|
|
23
|
-
"datagrok-tools": "^4.14.
|
|
23
|
+
"datagrok-tools": "^4.14.48",
|
|
24
24
|
"eslint": "^8.57.1",
|
|
25
25
|
"eslint-config-google": "^0.14.0",
|
|
26
26
|
"source-map-loader": "^5.0.0",
|
package/src/package.g.ts
ADDED
package/src/package.ts
CHANGED
|
@@ -6,43 +6,46 @@ import {
|
|
|
6
6
|
InputForm, Viewer, DGBigButton,
|
|
7
7
|
DGButton, DGIconFA,
|
|
8
8
|
DGToggleInput, DGComboPopup, DGMarkdown,
|
|
9
|
-
ValidationIcon
|
|
9
|
+
ValidationIcon,
|
|
10
10
|
} from '@datagrok-libraries/webcomponents';
|
|
11
11
|
import {DockSpawnTsWebcomponent} from '@datagrok-libraries/dock-spawn-dg';
|
|
12
12
|
import './styles.css';
|
|
13
|
-
|
|
13
|
+
export * from './package.g';
|
|
14
14
|
export const _package = new DG.Package();
|
|
15
15
|
|
|
16
16
|
let inited = false;
|
|
17
17
|
|
|
18
|
-
//tags: init
|
|
19
|
-
export async function init() {
|
|
20
|
-
if (inited) return;
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
export class PackageFunctions {
|
|
20
|
+
@grok.decorators.init()
|
|
21
|
+
static async init() {
|
|
22
|
+
if (inited) return;
|
|
23
|
+
|
|
24
|
+
customElements.define('dg-viewer', Viewer);
|
|
25
|
+
customElements.define('dg-input-form', InputForm);
|
|
26
|
+
customElements.define('dg-button', DGButton, {extends: 'button'});
|
|
27
|
+
customElements.define('dg-big-button', DGBigButton, {extends: 'button'});
|
|
28
|
+
customElements.define('dg-icon-fa', DGIconFA);
|
|
29
|
+
customElements.define('dg-toggle-input', DGToggleInput);
|
|
30
|
+
customElements.define('dg-combo-popup', DGComboPopup);
|
|
31
|
+
customElements.define('dock-spawn-ts', DockSpawnTsWebcomponent);
|
|
32
|
+
customElements.define('dg-markdown', DGMarkdown);
|
|
33
|
+
customElements.define('dg-validation-icon', ValidationIcon);
|
|
34
|
+
inited = true;
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
await Promise.all([
|
|
37
|
+
customElements.whenDefined('dg-viewer'),
|
|
38
|
+
customElements.whenDefined('dg-input-form'),
|
|
39
|
+
customElements.whenDefined('dg-button'),
|
|
40
|
+
customElements.whenDefined('dg-big-button'),
|
|
41
|
+
customElements.whenDefined('dg-icon-fa'),
|
|
42
|
+
customElements.whenDefined('dg-toggle-input'),
|
|
43
|
+
customElements.whenDefined('dg-combo-popup'),
|
|
44
|
+
customElements.whenDefined('dock-spawn-ts'),
|
|
45
|
+
customElements.whenDefined('dg-markdown'),
|
|
46
|
+
customElements.whenDefined('dg-validation-icon'),
|
|
47
|
+
]);
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
console.log('webcomponents registered');
|
|
50
|
+
}
|
|
48
51
|
}
|
package/webpack.config.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const packageName = path.parse(require('./package.json').name).name.toLowerCase().replace(/-/g, '');
|
|
3
|
+
const FuncGeneratorPlugin = require('datagrok-tools/plugins/func-gen-plugin');
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
5
6
|
mode: 'production',
|
|
@@ -47,5 +48,8 @@ module.exports = {
|
|
|
47
48
|
optimization: {
|
|
48
49
|
usedExports: true,
|
|
49
50
|
concatenateModules: false,
|
|
50
|
-
}
|
|
51
|
+
},
|
|
52
|
+
plugins: [
|
|
53
|
+
new FuncGeneratorPlugin({outputPath: './src/package.g.ts'}),
|
|
54
|
+
],
|
|
51
55
|
};
|