@shoper/phoenix_design_system 0.2.0 → 0.2.1

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.
@@ -11,14 +11,14 @@ var v4 = require('../../../../../external/uuid/dist/esm-browser/v4.js');
11
11
  exports.HPortal = class HPortal extends phoenix_light_lit_element.PhoenixLightLitElement {
12
12
  constructor() {
13
13
  super();
14
- this.id = v4['default']();
15
- this.initialChildren = [];
14
+ this._id = v4['default']();
15
+ this._initialChildren = [];
16
16
  this.to = '';
17
17
  this.disabled = false;
18
- this.initialChildren = [...this.children];
18
+ this._initialChildren = [...this.children];
19
19
  }
20
20
  firstUpdated() {
21
- const shouldOpenPortal = this.initialChildren.length > 0 && !this.disabled;
21
+ const shouldOpenPortal = this._initialChildren.length > 0 && !this.disabled;
22
22
  if (shouldOpenPortal) {
23
23
  this.openPortal();
24
24
  }
@@ -39,9 +39,9 @@ exports.HPortal = class HPortal extends phoenix_light_lit_element.PhoenixLightLi
39
39
  const openPortalEvent = new CustomEvent(portal_constants.PORTAL_EVENTS.open, {
40
40
  composed: true,
41
41
  detail: {
42
- portalId: this.id,
42
+ portalId: this._id,
43
43
  to: this.to,
44
- content: [...this.initialChildren]
44
+ content: [...this._initialChildren]
45
45
  }
46
46
  });
47
47
  document.dispatchEvent(openPortalEvent);
@@ -50,7 +50,7 @@ exports.HPortal = class HPortal extends phoenix_light_lit_element.PhoenixLightLi
50
50
  const closePortalEvent = new CustomEvent(portal_constants.PORTAL_EVENTS.close, {
51
51
  composed: true,
52
52
  detail: {
53
- portalId: this.id,
53
+ portalId: this._id,
54
54
  to: this.to
55
55
  }
56
56
  });
@@ -60,11 +60,11 @@ exports.HPortal = class HPortal extends phoenix_light_lit_element.PhoenixLightLi
60
60
  tslib_es6.__decorate([
61
61
  decorators.state(),
62
62
  tslib_es6.__metadata("design:type", Object)
63
- ], exports.HPortal.prototype, "id", void 0);
63
+ ], exports.HPortal.prototype, "_id", void 0);
64
64
  tslib_es6.__decorate([
65
65
  decorators.state(),
66
66
  tslib_es6.__metadata("design:type", Array)
67
- ], exports.HPortal.prototype, "initialChildren", void 0);
67
+ ], exports.HPortal.prototype, "_initialChildren", void 0);
68
68
  tslib_es6.__decorate([
69
69
  decorators.property({ type: String }),
70
70
  tslib_es6.__metadata("design:type", Object)
@@ -11,7 +11,7 @@ var portal_target_error = require('./portal_target_error.js');
11
11
  var HPortalTarget_1;
12
12
  exports.HPortalTarget = HPortalTarget_1 = class HPortalTarget extends phoenix_light_lit_element.PhoenixLightLitElement {
13
13
  constructor() {
14
- super();
14
+ super(...arguments);
15
15
  this.name = '';
16
16
  this._portalElementsMap = {};
17
17
  this.portalElements = ({ detail: { portalId, content, to } }) => {
@@ -71,7 +71,6 @@ tslib_es6.__decorate([
71
71
  tslib_es6.__metadata("design:type", Object)
72
72
  ], exports.HPortalTarget.prototype, "_portalElementsMap", void 0);
73
73
  exports.HPortalTarget = HPortalTarget_1 = tslib_es6.__decorate([
74
- decorators.customElement('h-portal-target'),
75
- tslib_es6.__metadata("design:paramtypes", [])
74
+ decorators.customElement('h-portal-target')
76
75
  ], exports.HPortalTarget);
77
76
  //# sourceMappingURL=portal_target.js.map
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,4CAAgD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
@@ -1,7 +1,7 @@
1
1
  import { PhoenixLightLitElement } from "../../core/phoenix_light_lit_element";
2
2
  export declare class HPortal extends PhoenixLightLitElement {
3
- id: string;
4
- initialChildren: Element[];
3
+ _id: string;
4
+ _initialChildren: Element[];
5
5
  to: string;
6
6
  disabled: boolean;
7
7
  constructor();
@@ -7,14 +7,14 @@ import v4 from '../../../../../external/uuid/dist/esm-browser/v4.js';
7
7
  let HPortal = class HPortal extends PhoenixLightLitElement {
8
8
  constructor() {
9
9
  super();
10
- this.id = v4();
11
- this.initialChildren = [];
10
+ this._id = v4();
11
+ this._initialChildren = [];
12
12
  this.to = '';
13
13
  this.disabled = false;
14
- this.initialChildren = [...this.children];
14
+ this._initialChildren = [...this.children];
15
15
  }
16
16
  firstUpdated() {
17
- const shouldOpenPortal = this.initialChildren.length > 0 && !this.disabled;
17
+ const shouldOpenPortal = this._initialChildren.length > 0 && !this.disabled;
18
18
  if (shouldOpenPortal) {
19
19
  this.openPortal();
20
20
  }
@@ -35,9 +35,9 @@ let HPortal = class HPortal extends PhoenixLightLitElement {
35
35
  const openPortalEvent = new CustomEvent(PORTAL_EVENTS.open, {
36
36
  composed: true,
37
37
  detail: {
38
- portalId: this.id,
38
+ portalId: this._id,
39
39
  to: this.to,
40
- content: [...this.initialChildren]
40
+ content: [...this._initialChildren]
41
41
  }
42
42
  });
43
43
  document.dispatchEvent(openPortalEvent);
@@ -46,7 +46,7 @@ let HPortal = class HPortal extends PhoenixLightLitElement {
46
46
  const closePortalEvent = new CustomEvent(PORTAL_EVENTS.close, {
47
47
  composed: true,
48
48
  detail: {
49
- portalId: this.id,
49
+ portalId: this._id,
50
50
  to: this.to
51
51
  }
52
52
  });
@@ -56,11 +56,11 @@ let HPortal = class HPortal extends PhoenixLightLitElement {
56
56
  __decorate([
57
57
  state(),
58
58
  __metadata("design:type", Object)
59
- ], HPortal.prototype, "id", void 0);
59
+ ], HPortal.prototype, "_id", void 0);
60
60
  __decorate([
61
61
  state(),
62
62
  __metadata("design:type", Array)
63
- ], HPortal.prototype, "initialChildren", void 0);
63
+ ], HPortal.prototype, "_initialChildren", void 0);
64
64
  __decorate([
65
65
  property({ type: String }),
66
66
  __metadata("design:type", Object)
@@ -4,7 +4,6 @@ export declare class HPortalTarget extends PhoenixLightLitElement {
4
4
  static portalTargetsNames: Set<string>;
5
5
  name: string;
6
6
  _portalElementsMap: Record<string, HTMLElement[]>;
7
- constructor();
8
7
  connectedCallback(): void;
9
8
  disconnectedCallback(): void;
10
9
  portalElements: ({ detail: { portalId, content, to } }: CustomEvent<TPortalEventData>) => void;
@@ -7,7 +7,7 @@ import { PortalTargetError } from './portal_target_error.js';
7
7
  var HPortalTarget_1;
8
8
  let HPortalTarget = HPortalTarget_1 = class HPortalTarget extends PhoenixLightLitElement {
9
9
  constructor() {
10
- super();
10
+ super(...arguments);
11
11
  this.name = '';
12
12
  this._portalElementsMap = {};
13
13
  this.portalElements = ({ detail: { portalId, content, to } }) => {
@@ -67,8 +67,7 @@ __decorate([
67
67
  __metadata("design:type", Object)
68
68
  ], HPortalTarget.prototype, "_portalElementsMap", void 0);
69
69
  HPortalTarget = HPortalTarget_1 = __decorate([
70
- customElement('h-portal-target'),
71
- __metadata("design:paramtypes", [])
70
+ customElement('h-portal-target')
72
71
  ], HPortalTarget);
73
72
 
74
73
  export { HPortalTarget };
@@ -1 +1 @@
1
- {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
1
+ {"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,4CAAgD;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@shoper/phoenix_design_system",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "0.2.0",
5
+ "version": "0.2.1",
6
6
  "description": "phoenix design system",
7
7
  "author": "zefirek",
8
8
  "license": "MIT",