@things-factory/biz-ui 9.2.5 → 10.0.0-beta.10

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.
@@ -8,10 +8,9 @@ import { ScrollbarStyles, CommonButtonStyles } from '@operato/styles'
8
8
  import { client, CustomAlert, PageView, store } from '@things-factory/shell'
9
9
  import gql from 'graphql-tag'
10
10
  import { css, html } from 'lit'
11
- import { connect } from 'pwa-helpers/connect-mixin'
12
11
  import '../components/connect-contact-points-popup'
13
12
 
14
- class BizplaceList extends connect(store)(localize(i18next)(PageView)) {
13
+ class BizplaceList extends localize(i18next)(PageView) {
15
14
  static get properties() {
16
15
  return {
17
16
  companyId: String,
@@ -382,10 +381,36 @@ class BizplaceList extends connect(store)(localize(i18next)(PageView)) {
382
381
  return { header: headerSetting, data: data }
383
382
  }
384
383
 
385
- stateChanged(state) {
386
- if (JSON.parse(this.active)) {
387
- this.companyId = state && state.route && state.route.resourceId
384
+ private _unsubscribe?: () => void
385
+
386
+
387
+ connectedCallback() {
388
+
389
+ super.connectedCallback()
390
+
391
+ this._applyState()
392
+
393
+ this._unsubscribe = store.subscribe(() => this._applyState())
394
+
395
+ }
396
+
397
+
398
+ disconnectedCallback() {
399
+
400
+ super.disconnectedCallback()
401
+
402
+ this._unsubscribe?.()
403
+
404
+ }
405
+
406
+
407
+ private _applyState() {
408
+
409
+ const __state__ = store.getState() as any
410
+ if (JSON.parse(this.active)) {
411
+ this.companyId = __state__ && __state__.route && __state__.route.resourceId
388
412
  }
413
+
389
414
  }
390
415
 
391
416
  showToast(message) {
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@things-factory/biz-ui",
3
- "version": "9.2.5",
3
+ "version": "10.0.0-beta.10",
4
4
  "main": "dist-server/index.js",
5
- "browser": "client/index.js",
5
+ "browser": "client/index.ts",
6
6
  "things-factory": true,
7
7
  "author": "",
8
8
  "description": "User interface for company, bizplace, partner, so on.",
@@ -24,15 +24,15 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
25
25
  },
26
26
  "dependencies": {
27
- "@operato/data-grist": "^9.0.0",
28
- "@operato/layout": "^9.0.0",
29
- "@operato/styles": "^9.0.0",
30
- "@things-factory/biz-base": "^9.2.5",
31
- "@things-factory/code-base": "^9.2.5",
32
- "@things-factory/form-ui": "^9.1.13",
33
- "@things-factory/i18n-base": "^9.2.5",
34
- "@things-factory/import-ui": "^9.2.5",
35
- "@things-factory/shell": "^9.2.5"
27
+ "@operato/data-grist": "^10.0.0-beta.1",
28
+ "@operato/layout": "^10.0.0-beta.1",
29
+ "@operato/styles": "^10.0.0-beta.1",
30
+ "@things-factory/biz-base": "^10.0.0-beta.10",
31
+ "@things-factory/code-base": "^10.0.0-beta.10",
32
+ "@things-factory/form-ui": "^10.0.0-beta.5",
33
+ "@things-factory/i18n-base": "^10.0.0-beta.10",
34
+ "@things-factory/import-ui": "^10.0.0-beta.10",
35
+ "@things-factory/shell": "^10.0.0-beta.10"
36
36
  },
37
- "gitHead": "d3622f475ae3bab84322d31b064cc4cda20f7062"
37
+ "gitHead": "95acadd39e9a0ff3b2f34d9f7082142395903179"
38
38
  }
File without changes
File without changes
File without changes
File without changes