@datagrok/webcomponents 1.2.5 → 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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/webcomponents",
3
3
  "friendlyName": "WebComponents",
4
- "version": "1.2.5",
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.20",
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",
@@ -0,0 +1,7 @@
1
+ import {PackageFunctions} from './package';
2
+ import * as DG from 'datagrok-api/dg';
3
+
4
+ //tags: init
5
+ export async function init() : Promise<void> {
6
+ await PackageFunctions.init();
7
+ }
package/src/package.ts CHANGED
@@ -6,42 +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
+ export * from './package.g';
13
14
  export const _package = new DG.Package();
14
15
 
15
16
  let inited = false;
16
17
 
17
- //tags: init
18
- export async function init() {
19
- if (inited) return;
20
18
 
21
- customElements.define('dg-viewer', Viewer);
22
- customElements.define('dg-input-form', InputForm);
23
- customElements.define('dg-button', DGButton, {extends: 'button'});
24
- customElements.define('dg-big-button', DGBigButton, {extends: 'button'});
25
- customElements.define('dg-icon-fa', DGIconFA);
26
- customElements.define('dg-toggle-input', DGToggleInput);
27
- customElements.define('dg-combo-popup', DGComboPopup);
28
- customElements.define('dock-spawn-ts', DockSpawnTsWebcomponent);
29
- customElements.define('dg-markdown', DGMarkdown);
30
- customElements.define('dg-validation-icon', ValidationIcon);
31
- inited = true;
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;
32
35
 
33
- await Promise.all([
34
- customElements.whenDefined('dg-viewer'),
35
- customElements.whenDefined('dg-input-form'),
36
- customElements.whenDefined('dg-button'),
37
- customElements.whenDefined('dg-big-button'),
38
- customElements.whenDefined('dg-icon-fa'),
39
- customElements.whenDefined('dg-toggle-input'),
40
- customElements.whenDefined('dg-combo-popup'),
41
- customElements.whenDefined('dock-spawn-ts'),
42
- customElements.whenDefined('dg-markdown'),
43
- customElements.whenDefined('dg-validation-icon'),
44
- ]);
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
+ ]);
45
48
 
46
- console.log('webcomponents registered');
49
+ console.log('webcomponents registered');
50
+ }
47
51
  }
package/src/styles.css ADDED
@@ -0,0 +1,4 @@
1
+ .d4-combo-popup-expanded.right-aligned .d4-combo-drop-down {
2
+ right: -37.5px;
3
+ left: unset !important;
4
+ }
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
  };