@datagrok/webcomponents 1.0.0 → 1.2.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/package.json CHANGED
@@ -1,23 +1,27 @@
1
1
  {
2
2
  "name": "@datagrok/webcomponents",
3
3
  "friendlyName": "WebComponents",
4
- "version": "1.0.0",
4
+ "version": "1.2.0",
5
5
  "author": {
6
- "name": "Aufar Zakiev",
7
- "email": "aufar.zakiev@softwarecountry.com"
6
+ "name": "Andrey Sharapov",
7
+ "email": "andrey.sharapov@softwarecountry.com"
8
8
  },
9
9
  "description": "WebComponents runtime code",
10
10
  "dependencies": {
11
- "@datagrok-libraries/dock-spawn-dg": "^0.0.1",
12
- "@datagrok-libraries/utils": "^4.3.12",
13
- "@datagrok-libraries/webcomponents": "^0.0.6",
11
+ "@datagrok-libraries/dock-spawn-dg": "^0.0.3",
12
+ "@datagrok-libraries/utils": "^4.5.0",
13
+ "@datagrok-libraries/webcomponents": "^0.0.7",
14
14
  "cash-dom": "^8.1.4",
15
15
  "css-loader": "^7.1.2",
16
- "datagrok-api": "^1.23.0",
16
+ "datagrok-api": "^1.25.0",
17
17
  "dayjs": "=1.11.10",
18
18
  "style-loader": "^4.0.0"
19
19
  },
20
20
  "devDependencies": {
21
+ "@typescript-eslint/eslint-plugin": "^8.8.1",
22
+ "@typescript-eslint/parser": "^8.8.1",
23
+ "eslint": "^8.57.1",
24
+ "eslint-config-google": "^0.14.0",
21
25
  "source-map-loader": "^5.0.0",
22
26
  "ts-loader": "^9.5.1",
23
27
  "typescript": "^5.6.3",
@@ -30,20 +34,26 @@
30
34
  "release-webcomponents": "webpack && grok publish --release",
31
35
  "build-webcomponents": "webpack",
32
36
  "build": "webpack",
37
+ "lint": "eslint . --ext .ts,.tsx",
38
+ "lint-fix": "eslint . --ext .ts,.tsx --fix",
33
39
  "debug-webcomponents-dev": "webpack && grok publish dev",
34
40
  "release-webcomponents-dev": "webpack && grok publish dev --release",
35
41
  "debug-webcomponents-public": "webpack && grok publish public",
36
42
  "release-webcomponents-public": "webpack && grok publish public --release"
37
43
  },
38
44
  "canEdit": [
39
- "Developers"
45
+ "Administrators"
40
46
  ],
41
47
  "canView": [
42
- "All users"
48
+ "Administrators"
43
49
  ],
44
50
  "repository": {
45
51
  "type": "git",
46
52
  "url": "git@github.com:datagrok-ai/public.git",
47
53
  "directory": "packages/WebComponents"
54
+ },
55
+ "category": "General",
56
+ "meta": {
57
+ "dartium": false
48
58
  }
49
59
  }
@@ -1,7 +1,7 @@
1
- import * as DG from "datagrok-api/dg";
2
- import {runTests, tests, TestContext, initAutoTests as initTests } from '@datagrok-libraries/utils/src/test';
1
+ import * as DG from 'datagrok-api/dg';
2
+ import {runTests, tests, TestContext, initAutoTests as initTests} from '@datagrok-libraries/utils/src/test';
3
3
 
4
- export let _package = new DG.Package();
4
+ export const _package = new DG.Package();
5
5
  export {tests};
6
6
 
7
7
  //name: test
package/src/package.ts CHANGED
@@ -7,14 +7,14 @@ import {
7
7
  DGButton, DGIconFA,
8
8
  DGToggleInput, DGComboPopup, DGMarkdown,
9
9
  } from '@datagrok-libraries/webcomponents';
10
- import {DockSpawnTsWebcomponent} from '@datagrok-libraries/dock-spawn-dg/lib'
10
+ import {DockSpawnTsWebcomponent} from '@datagrok-libraries/dock-spawn-dg';
11
11
 
12
12
  export const _package = new DG.Package();
13
13
 
14
14
  let inited = false;
15
15
 
16
16
  //tags: init
17
- export function init() {
17
+ export async function init() {
18
18
  if (inited) return;
19
19
 
20
20
  customElements.define('dg-viewer', Viewer);
@@ -27,5 +27,18 @@ export function init() {
27
27
  customElements.define('dock-spawn-ts', DockSpawnTsWebcomponent);
28
28
  customElements.define('dg-markdown', DGMarkdown);
29
29
  inited = true;
30
+
31
+ await Promise.all([
32
+ customElements.whenDefined('dg-viewer'),
33
+ customElements.whenDefined('dg-input-form'),
34
+ customElements.whenDefined('dg-button'),
35
+ customElements.whenDefined('dg-big-button'),
36
+ customElements.whenDefined('dg-icon-fa'),
37
+ customElements.whenDefined('dg-toggle-input'),
38
+ customElements.whenDefined('dg-combo-popup'),
39
+ customElements.whenDefined('dock-spawn-ts'),
40
+ customElements.whenDefined('dg-markdown'),
41
+ ]);
42
+
30
43
  console.log('webcomponents registered');
31
44
  }
package/tsconfig.json CHANGED
@@ -6,7 +6,7 @@
6
6
  // "incremental": true, /* Enable incremental compilation */
7
7
  "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8
8
  "module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9
- "lib": ["ES2022", "dom"], /* Specify library files to be included in the compilation. */
9
+ "lib": ["ESNext", "dom", "dom.iterable"], /* Specify library files to be included in the compilation. */
10
10
  // "allowJs": true, /* Allow javascript files to be compiled. */
11
11
  // "checkJs": true, /* Report errors in .js files. */
12
12
  // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
@@ -25,7 +25,7 @@
25
25
  // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
26
26
 
27
27
  /* Strict Type-Checking Options */
28
- "strict": true, /* Enable all strict type-checking options. */
28
+ // "strict": true, /* Enable all strict type-checking options. */
29
29
  // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
30
30
  // "strictNullChecks": true, /* Enable strict null checks. */
31
31
  // "strictFunctionTypes": true, /* Enable strict checking of function types. */
package/webpack.config.js CHANGED
@@ -8,7 +8,7 @@ module.exports = {
8
8
  package: './src/package.ts',
9
9
  },
10
10
  resolve: {
11
- extensions: ['.wasm', '.mjs', '.ts', '.tsx', '.json', '.js'],
11
+ extensions: ['.wasm', '.ts', '.tsx', '.mjs', '.js', '.jsx', '.json'],
12
12
  },
13
13
  module: {
14
14
  rules: [
@@ -18,7 +18,7 @@ module.exports = {
18
18
  use: ['style-loader', 'css-loader'],
19
19
  },
20
20
  {
21
- test: /\.(js|mjs|jsx|ts|tsx)$/,
21
+ test: /\.(ts|tsx|mjs|js|jsx)$/,
22
22
  enforce: 'pre',
23
23
  use: ['source-map-loader'],
24
24
  },