@shoper/phoenix_design_system 0.21.1 → 0.22.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.
- package/build/cjs/{packages/phoenix/external → external}/classnames/index.js +10 -16
- package/build/{esm/packages/phoenix → cjs}/external/classnames/index.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/input/input.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/switch/switch.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/form/textarea/textarea.js +1 -1
- package/build/cjs/packages/phoenix/src/components/form/textarea/textarea.js.map +1 -1
- package/build/cjs/packages/phoenix/src/components/tabs/tabs.js +1 -1
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js +45 -14
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js.map +1 -1
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js +6 -0
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js.map +1 -1
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js +3 -1
- package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js.map +1 -1
- package/build/esm/{packages/phoenix/external → external}/classnames/index.js +10 -16
- package/build/{cjs/packages/phoenix → esm}/external/classnames/index.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/checkbox/checkbox_control.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/input/input.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/radio/radio.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/switch/switch.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea.js +1 -1
- package/build/esm/packages/phoenix/src/components/form/textarea/textarea.js.map +1 -1
- package/build/esm/packages/phoenix/src/components/tabs/tabs.d.ts +1 -1
- package/build/esm/packages/phoenix/src/components/tabs/tabs.js +1 -1
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.d.ts +8 -1
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js +45 -14
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js.map +1 -1
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.d.ts +1 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js +6 -0
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element_utils.js.map +1 -1
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.d.ts +2 -1
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js +3 -1
- package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_elements_constants.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _commonjsHelpers = require('
|
|
5
|
+
var _commonjsHelpers = require('../../_virtual/_commonjsHelpers.js');
|
|
6
6
|
|
|
7
7
|
/*!
|
|
8
|
-
Copyright (c)
|
|
8
|
+
Copyright (c) 2017 Jed Watson.
|
|
9
9
|
Licensed under the MIT License (MIT), see
|
|
10
10
|
http://jedwatson.github.io/classnames
|
|
11
11
|
*/
|
|
@@ -17,7 +17,7 @@ var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
|
17
17
|
|
|
18
18
|
var hasOwn = {}.hasOwnProperty;
|
|
19
19
|
|
|
20
|
-
function classNames() {
|
|
20
|
+
function classNames () {
|
|
21
21
|
var classes = [];
|
|
22
22
|
|
|
23
23
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -28,22 +28,16 @@ var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
|
28
28
|
|
|
29
29
|
if (argType === 'string' || argType === 'number') {
|
|
30
30
|
classes.push(arg);
|
|
31
|
-
} else if (Array.isArray(arg)) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
classes.push(inner);
|
|
36
|
-
}
|
|
31
|
+
} else if (Array.isArray(arg) && arg.length) {
|
|
32
|
+
var inner = classNames.apply(null, arg);
|
|
33
|
+
if (inner) {
|
|
34
|
+
classes.push(inner);
|
|
37
35
|
}
|
|
38
36
|
} else if (argType === 'object') {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
classes.push(key);
|
|
43
|
-
}
|
|
37
|
+
for (var key in arg) {
|
|
38
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
39
|
+
classes.push(key);
|
|
44
40
|
}
|
|
45
|
-
} else {
|
|
46
|
-
classes.push(arg.toString());
|
|
47
41
|
}
|
|
48
42
|
}
|
|
49
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;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;"}
|
|
@@ -8,7 +8,7 @@ var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element
|
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
9
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
10
10
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
|
-
var index = require('
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var checkbox_constants = require('./checkbox_constants.js');
|
|
13
13
|
|
|
14
14
|
exports.HCheckbox = class HCheckbox extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;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;"}
|
|
@@ -8,7 +8,7 @@ var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_el
|
|
|
8
8
|
var litHtml = require('lit-html');
|
|
9
9
|
var decorators_js = require('@lit/reactive-element/decorators.js');
|
|
10
10
|
var ref_js = require('lit-html/directives/ref.js');
|
|
11
|
-
var index = require('
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var control_props_sync_consumer_controller = require('../controllers/props_synchronizing/control_props_sync_consumer_controller.js');
|
|
13
13
|
var ifDefined_js = require('lit-html/directives/if-defined.js');
|
|
14
14
|
var checkbox_constants = require('./checkbox_constants.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -9,7 +9,7 @@ var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_el
|
|
|
9
9
|
var input_constants = require('./input_constants.js');
|
|
10
10
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
11
11
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
12
|
-
var index = require('
|
|
12
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
13
13
|
|
|
14
14
|
exports.HInput = class HInput extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
15
15
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;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;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -8,7 +8,7 @@ var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element
|
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
9
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
10
10
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
|
-
var index = require('
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var checkbox_constants = require('../checkbox/checkbox_constants.js');
|
|
13
13
|
var radio_constants = require('./radio_constants.js');
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;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;"}
|
|
@@ -8,7 +8,7 @@ var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element
|
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
9
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
10
10
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
|
-
var index = require('
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var checkbox_constants = require('../checkbox/checkbox_constants.js');
|
|
13
13
|
var switch_constants = require('./switch_constants.js');
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;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;"}
|
|
@@ -8,7 +8,7 @@ var phoenix_light_lit_element = require('../../../core/phoenix_light_lit_element
|
|
|
8
8
|
var phoenix_custom_element = require('../../../core/decorators/phoenix_custom_element.js');
|
|
9
9
|
var control_props_sync_controller_constants = require('../controllers/props_synchronizing/control_props_sync_controller_constants.js');
|
|
10
10
|
var control_props_sync_provider_controller = require('../controllers/props_synchronizing/control_props_sync_provider_controller.js');
|
|
11
|
-
var index = require('
|
|
11
|
+
var index = require('../../../../../../external/classnames/index.js');
|
|
12
12
|
var textarea_constants = require('./textarea_constants.js');
|
|
13
13
|
|
|
14
14
|
exports.HTextarea = class HTextarea extends phoenix_light_lit_element.PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA,wBAAwB,+CAAmD;AAC3E;AACA;AACA;AACA;AACA;AACA,oBAAoB,gDAAoD;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;"}
|
|
@@ -66,7 +66,7 @@ exports.HTabs = class HTabs extends phoenix_light_lit_element.PhoenixLightLitEle
|
|
|
66
66
|
_setupEvents() {
|
|
67
67
|
this.addEventListener(tab_constants.TAB_EVENT_NAMES.selected, this._handleTabSelected);
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
allChildrenRendered() {
|
|
70
70
|
const $selectedTab = this.querySelector('h-tab[selected]');
|
|
71
71
|
this._hideNotSelectedAndVisiblePanels();
|
|
72
72
|
if (!$selectedTab)
|
package/build/cjs/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js
CHANGED
|
@@ -13,44 +13,71 @@ class PhoenixLightLitElement extends lit.LitElement {
|
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this._slots = {};
|
|
15
15
|
this.isWebComponentConnected = false;
|
|
16
|
+
this.isWebComponentRendered = false;
|
|
17
|
+
this._childrenForConnectionToWatch = [];
|
|
18
|
+
this._childrenForRenderToWatch = [];
|
|
16
19
|
this._handleComponentConnected = ({ detail }) => {
|
|
17
20
|
const connectedElement = detail.$el.tagName.toLowerCase();
|
|
18
|
-
if (this.
|
|
19
|
-
const elToRemoveIndex = this.
|
|
20
|
-
this.
|
|
21
|
+
if (this._childrenForConnectionToWatch.includes(connectedElement)) {
|
|
22
|
+
const elToRemoveIndex = this._childrenForConnectionToWatch.findIndex((tagName) => tagName === connectedElement);
|
|
23
|
+
this._childrenForConnectionToWatch.splice(elToRemoveIndex, elToRemoveIndex + 1);
|
|
21
24
|
}
|
|
22
|
-
if (!this.
|
|
25
|
+
if (!this._childrenForConnectionToWatch.length) {
|
|
23
26
|
this.allChildrenConnected();
|
|
24
27
|
this.removeEventListener(phoenix_light_lit_elements_constants.PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleComponentConnected);
|
|
25
28
|
}
|
|
26
29
|
};
|
|
30
|
+
this._handleComponentRendered = ({ detail }) => {
|
|
31
|
+
const renderedElement = detail.$el.tagName.toLowerCase();
|
|
32
|
+
if (this._childrenForRenderToWatch.includes(renderedElement)) {
|
|
33
|
+
const elToRemoveIndex = this._childrenForRenderToWatch.findIndex((tagName) => tagName === renderedElement);
|
|
34
|
+
this._childrenForRenderToWatch.splice(elToRemoveIndex, elToRemoveIndex + 1);
|
|
35
|
+
}
|
|
36
|
+
if (!this._childrenForRenderToWatch.length) {
|
|
37
|
+
this.allChildrenRendered();
|
|
38
|
+
this.removeEventListener(phoenix_light_lit_elements_constants.PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered, this._handleComponentConnected);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
this._dispatchLifecycleEvent = (eventName) => {
|
|
42
|
+
this.dispatchEvent(new CustomEvent(eventName, {
|
|
43
|
+
detail: {
|
|
44
|
+
$el: this
|
|
45
|
+
},
|
|
46
|
+
bubbles: true
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
27
49
|
}
|
|
28
50
|
firstUpdated(props) {
|
|
29
51
|
super.firstUpdated(props);
|
|
30
52
|
this._slots = this._assignSlots();
|
|
31
53
|
this.requestUpdate();
|
|
54
|
+
this._dispatchLifecycleEvent(phoenix_light_lit_elements_constants.PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered);
|
|
55
|
+
this.isWebComponentRendered = true;
|
|
32
56
|
}
|
|
33
57
|
_setupChildrenWatch() {
|
|
34
|
-
this.
|
|
35
|
-
|
|
58
|
+
this._childrenForConnectionToWatch = this.childrenToWatch ? this.childrenToWatch : this._getComponentsNamesForConnectionToWatch();
|
|
59
|
+
this._childrenForRenderToWatch = this.childrenToWatch ? this.childrenToWatch : this._getComponentsNamesForRenderedToWatch();
|
|
60
|
+
if (!this._childrenForConnectionToWatch.length)
|
|
36
61
|
this.allChildrenConnected();
|
|
62
|
+
if (!this._childrenForRenderToWatch.length)
|
|
63
|
+
this.allChildrenRendered();
|
|
37
64
|
this.addEventListener(phoenix_light_lit_elements_constants.PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleComponentConnected);
|
|
65
|
+
this.addEventListener(phoenix_light_lit_elements_constants.PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered, this._handleComponentRendered);
|
|
38
66
|
}
|
|
39
|
-
|
|
67
|
+
_getComponentsNamesForConnectionToWatch() {
|
|
40
68
|
return phoenix_light_lit_element_utils.PhoenixLightLitElementUtils.getComponentsForWhichToWaitForConnection([...this.querySelectorAll('*')]).map(($element) => $element.tagName.toLowerCase());
|
|
41
69
|
}
|
|
70
|
+
_getComponentsNamesForRenderedToWatch() {
|
|
71
|
+
return phoenix_light_lit_element_utils.PhoenixLightLitElementUtils.getComponentsForWhichToWaitForRender([...this.querySelectorAll('*')]).map(($element) => $element.tagName.toLowerCase());
|
|
72
|
+
}
|
|
42
73
|
connectedCallback() {
|
|
43
74
|
super.connectedCallback();
|
|
44
|
-
this.
|
|
45
|
-
detail: {
|
|
46
|
-
$el: this
|
|
47
|
-
},
|
|
48
|
-
bubbles: true
|
|
49
|
-
}));
|
|
75
|
+
this._dispatchLifecycleEvent(phoenix_light_lit_elements_constants.PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected);
|
|
50
76
|
this.isWebComponentConnected = true;
|
|
51
77
|
this._setupChildrenWatch();
|
|
52
78
|
}
|
|
53
79
|
allChildrenConnected() { }
|
|
80
|
+
allChildrenRendered() { }
|
|
54
81
|
_assignSlots() {
|
|
55
82
|
return [...this.querySelectorAll(':scope > [slot]')].reduce((acc, $el) => {
|
|
56
83
|
var _a;
|
|
@@ -83,7 +110,11 @@ tslib_es6.__decorate([
|
|
|
83
110
|
tslib_es6.__decorate([
|
|
84
111
|
decorators.property({ type: Boolean }),
|
|
85
112
|
tslib_es6.__metadata("design:type", Object)
|
|
86
|
-
], PhoenixLightLitElement.prototype, "isWebComponentConnected", void 0);
|
|
113
|
+
], PhoenixLightLitElement.prototype, "isWebComponentConnected", void 0);
|
|
114
|
+
tslib_es6.__decorate([
|
|
115
|
+
decorators.property({ type: Boolean }),
|
|
116
|
+
tslib_es6.__metadata("design:type", Object)
|
|
117
|
+
], PhoenixLightLitElement.prototype, "isWebComponentRendered", void 0);
|
|
87
118
|
|
|
88
119
|
exports.PhoenixLightLitElement = PhoenixLightLitElement;
|
|
89
120
|
//# sourceMappingURL=phoenix_light_lit_element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;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;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;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;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;"}
|
|
@@ -11,6 +11,12 @@ class PhoenixLightLitElementUtils {
|
|
|
11
11
|
utilities.WebComponentsUtils.isWebComponentDefined($element) &&
|
|
12
12
|
!$element.isWebComponentConnected));
|
|
13
13
|
}
|
|
14
|
+
static getComponentsForWhichToWaitForRender(components) {
|
|
15
|
+
return components.filter(($element) => (utilities.WebComponentsUtils.isWebComponent($element) && !utilities.WebComponentsUtils.isWebComponentDefined($element)) ||
|
|
16
|
+
(utilities.WebComponentsUtils.isWebComponent($element) &&
|
|
17
|
+
utilities.WebComponentsUtils.isWebComponentDefined($element) &&
|
|
18
|
+
!$element.isWebComponentRendered));
|
|
19
|
+
}
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
exports.PhoenixLightLitElementUtils = PhoenixLightLitElementUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const DEFAULT_SLOT_NAME = 'default';
|
|
6
|
+
const eventPrefix = 'PhoenixLightLitElement';
|
|
6
7
|
const PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES = {
|
|
7
|
-
connected:
|
|
8
|
+
connected: `${eventPrefix}.connected`,
|
|
9
|
+
rendered: `${eventPrefix}.rendered`
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
exports.DEFAULT_SLOT_NAME = DEFAULT_SLOT_NAME;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createCommonjsModule } from '
|
|
1
|
+
import { createCommonjsModule } from '../../_virtual/_commonjsHelpers.js';
|
|
2
2
|
|
|
3
3
|
/*!
|
|
4
|
-
Copyright (c)
|
|
4
|
+
Copyright (c) 2017 Jed Watson.
|
|
5
5
|
Licensed under the MIT License (MIT), see
|
|
6
6
|
http://jedwatson.github.io/classnames
|
|
7
7
|
*/
|
|
@@ -13,7 +13,7 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
13
13
|
|
|
14
14
|
var hasOwn = {}.hasOwnProperty;
|
|
15
15
|
|
|
16
|
-
function classNames() {
|
|
16
|
+
function classNames () {
|
|
17
17
|
var classes = [];
|
|
18
18
|
|
|
19
19
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -24,22 +24,16 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
24
24
|
|
|
25
25
|
if (argType === 'string' || argType === 'number') {
|
|
26
26
|
classes.push(arg);
|
|
27
|
-
} else if (Array.isArray(arg)) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
classes.push(inner);
|
|
32
|
-
}
|
|
27
|
+
} else if (Array.isArray(arg) && arg.length) {
|
|
28
|
+
var inner = classNames.apply(null, arg);
|
|
29
|
+
if (inner) {
|
|
30
|
+
classes.push(inner);
|
|
33
31
|
}
|
|
34
32
|
} else if (argType === 'object') {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
classes.push(key);
|
|
39
|
-
}
|
|
33
|
+
for (var key in arg) {
|
|
34
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
35
|
+
classes.push(key);
|
|
40
36
|
}
|
|
41
|
-
} else {
|
|
42
|
-
classes.push(arg.toString());
|
|
43
37
|
}
|
|
44
38
|
}
|
|
45
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;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;"}
|
|
@@ -4,7 +4,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
|
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
5
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
6
6
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
7
|
-
import classnames from '
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { CHECKBOX_PROPS_TO_SYNC, CHECKBOX_CONTROL_CSS_CLASSES } from './checkbox_constants.js';
|
|
9
9
|
|
|
10
10
|
let HCheckbox = class HCheckbox extends PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;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;"}
|
|
@@ -4,7 +4,7 @@ import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_el
|
|
|
4
4
|
import { html } from 'lit-html';
|
|
5
5
|
import { property } from '@lit/reactive-element/decorators.js';
|
|
6
6
|
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
7
|
-
import classnames from '
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { ControlPropsSyncConsumerController } from '../controllers/props_synchronizing/control_props_sync_consumer_controller.js';
|
|
9
9
|
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
10
10
|
import { CHECKBOX_CONTROL_EVENTS, CHECKBOX_CONTROL_CSS_CLASSES } from './checkbox_constants.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -5,7 +5,7 @@ import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_el
|
|
|
5
5
|
import { INPUT_CONTROL_TYPES, INPUT_PROPS_TO_SYNC, INPUT_CONTROL_CSS_CLASSES } from './input_constants.js';
|
|
6
6
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
7
7
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
8
|
-
import classnames from '
|
|
8
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
9
9
|
|
|
10
10
|
let HInput = class HInput extends PhoenixLightLitElement {
|
|
11
11
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;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;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,7 +4,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
|
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
5
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
6
6
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
7
|
-
import classnames from '
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { CHECKBOX_PROPS_TO_SYNC } from '../checkbox/checkbox_constants.js';
|
|
9
9
|
import { RADIO_CONTROL_CSS_CLASSES } from './radio_constants.js';
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;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;"}
|
|
@@ -4,7 +4,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
|
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
5
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
6
6
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
7
|
-
import classnames from '
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { CHECKBOX_PROPS_TO_SYNC } from '../checkbox/checkbox_constants.js';
|
|
9
9
|
import { SWITCH_CONTROL_CSS_CLASSES } from './switch_constants.js';
|
|
10
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;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;"}
|
|
@@ -4,7 +4,7 @@ import { PhoenixLightLitElement } from '../../../core/phoenix_light_lit_element/
|
|
|
4
4
|
import { phoenixCustomElement } from '../../../core/decorators/phoenix_custom_element.js';
|
|
5
5
|
import { BASE_FORM_CONTROL_PROPS } from '../controllers/props_synchronizing/control_props_sync_controller_constants.js';
|
|
6
6
|
import { ControlPropsSyncProviderController } from '../controllers/props_synchronizing/control_props_sync_provider_controller.js';
|
|
7
|
-
import classnames from '
|
|
7
|
+
import classnames from '../../../../../../external/classnames/index.js';
|
|
8
8
|
import { TEXTAREA_PROPS_TO_SYNC, TEXTAREA_CONTROL_CSS_CLASSES } from './textarea_constants.js';
|
|
9
9
|
|
|
10
10
|
let HTextarea = class HTextarea extends PhoenixLightLitElement {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA,uCAAuC,+CAAmD;AAC1F;AACA;AACA;AACA;AACA;AACA,uBAAuB,gDAAoD;AAC3E;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;"}
|
|
@@ -9,7 +9,7 @@ export declare class HTabs extends PhoenixLightLitElement {
|
|
|
9
9
|
private _getPrevTabIndex;
|
|
10
10
|
private _setupEvents;
|
|
11
11
|
private _handleTabSelected;
|
|
12
|
-
|
|
12
|
+
allChildrenRendered(): void;
|
|
13
13
|
private _hideNotSelectedAndVisiblePanels;
|
|
14
14
|
switchPanel(newPanelName: string): void;
|
|
15
15
|
private _dispatchChangedEvent;
|
|
@@ -62,7 +62,7 @@ let HTabs = class HTabs extends PhoenixLightLitElement {
|
|
|
62
62
|
_setupEvents() {
|
|
63
63
|
this.addEventListener(TAB_EVENT_NAMES.selected, this._handleTabSelected);
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
allChildrenRendered() {
|
|
66
66
|
const $selectedTab = this.querySelector('h-tab[selected]');
|
|
67
67
|
this._hideNotSelectedAndVisiblePanels();
|
|
68
68
|
if (!$selectedTab)
|
package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.d.ts
CHANGED
|
@@ -3,14 +3,21 @@ export declare class PhoenixLightLitElement extends LitElement {
|
|
|
3
3
|
_slots: Record<string, TemplateResult[]>;
|
|
4
4
|
protected childrenToWatch: string[];
|
|
5
5
|
isWebComponentConnected: boolean;
|
|
6
|
+
isWebComponentRendered: boolean;
|
|
7
|
+
private _childrenForConnectionToWatch;
|
|
8
|
+
private _childrenForRenderToWatch;
|
|
6
9
|
firstUpdated(props: PropertyValues): void;
|
|
7
10
|
private _setupChildrenWatch;
|
|
8
|
-
private
|
|
11
|
+
private _getComponentsNamesForConnectionToWatch;
|
|
12
|
+
private _getComponentsNamesForRenderedToWatch;
|
|
9
13
|
private _handleComponentConnected;
|
|
14
|
+
private _handleComponentRendered;
|
|
10
15
|
connectedCallback(): void;
|
|
11
16
|
allChildrenConnected(): void;
|
|
17
|
+
allChildrenRendered(): void;
|
|
12
18
|
private _assignSlots;
|
|
13
19
|
getSlot(name: string): TemplateResult[] | typeof nothing;
|
|
14
20
|
hasSlot(name: string): boolean;
|
|
15
21
|
createRenderRoot(): PhoenixLightLitElement;
|
|
22
|
+
private _dispatchLifecycleEvent;
|
|
16
23
|
}
|
package/build/esm/packages/phoenix/src/core/phoenix_light_lit_element/phoenix_light_lit_element.js
CHANGED
|
@@ -9,44 +9,71 @@ class PhoenixLightLitElement extends LitElement {
|
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this._slots = {};
|
|
11
11
|
this.isWebComponentConnected = false;
|
|
12
|
+
this.isWebComponentRendered = false;
|
|
13
|
+
this._childrenForConnectionToWatch = [];
|
|
14
|
+
this._childrenForRenderToWatch = [];
|
|
12
15
|
this._handleComponentConnected = ({ detail }) => {
|
|
13
16
|
const connectedElement = detail.$el.tagName.toLowerCase();
|
|
14
|
-
if (this.
|
|
15
|
-
const elToRemoveIndex = this.
|
|
16
|
-
this.
|
|
17
|
+
if (this._childrenForConnectionToWatch.includes(connectedElement)) {
|
|
18
|
+
const elToRemoveIndex = this._childrenForConnectionToWatch.findIndex((tagName) => tagName === connectedElement);
|
|
19
|
+
this._childrenForConnectionToWatch.splice(elToRemoveIndex, elToRemoveIndex + 1);
|
|
17
20
|
}
|
|
18
|
-
if (!this.
|
|
21
|
+
if (!this._childrenForConnectionToWatch.length) {
|
|
19
22
|
this.allChildrenConnected();
|
|
20
23
|
this.removeEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleComponentConnected);
|
|
21
24
|
}
|
|
22
25
|
};
|
|
26
|
+
this._handleComponentRendered = ({ detail }) => {
|
|
27
|
+
const renderedElement = detail.$el.tagName.toLowerCase();
|
|
28
|
+
if (this._childrenForRenderToWatch.includes(renderedElement)) {
|
|
29
|
+
const elToRemoveIndex = this._childrenForRenderToWatch.findIndex((tagName) => tagName === renderedElement);
|
|
30
|
+
this._childrenForRenderToWatch.splice(elToRemoveIndex, elToRemoveIndex + 1);
|
|
31
|
+
}
|
|
32
|
+
if (!this._childrenForRenderToWatch.length) {
|
|
33
|
+
this.allChildrenRendered();
|
|
34
|
+
this.removeEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered, this._handleComponentConnected);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
this._dispatchLifecycleEvent = (eventName) => {
|
|
38
|
+
this.dispatchEvent(new CustomEvent(eventName, {
|
|
39
|
+
detail: {
|
|
40
|
+
$el: this
|
|
41
|
+
},
|
|
42
|
+
bubbles: true
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
23
45
|
}
|
|
24
46
|
firstUpdated(props) {
|
|
25
47
|
super.firstUpdated(props);
|
|
26
48
|
this._slots = this._assignSlots();
|
|
27
49
|
this.requestUpdate();
|
|
50
|
+
this._dispatchLifecycleEvent(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered);
|
|
51
|
+
this.isWebComponentRendered = true;
|
|
28
52
|
}
|
|
29
53
|
_setupChildrenWatch() {
|
|
30
|
-
this.
|
|
31
|
-
|
|
54
|
+
this._childrenForConnectionToWatch = this.childrenToWatch ? this.childrenToWatch : this._getComponentsNamesForConnectionToWatch();
|
|
55
|
+
this._childrenForRenderToWatch = this.childrenToWatch ? this.childrenToWatch : this._getComponentsNamesForRenderedToWatch();
|
|
56
|
+
if (!this._childrenForConnectionToWatch.length)
|
|
32
57
|
this.allChildrenConnected();
|
|
58
|
+
if (!this._childrenForRenderToWatch.length)
|
|
59
|
+
this.allChildrenRendered();
|
|
33
60
|
this.addEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected, this._handleComponentConnected);
|
|
61
|
+
this.addEventListener(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.rendered, this._handleComponentRendered);
|
|
34
62
|
}
|
|
35
|
-
|
|
63
|
+
_getComponentsNamesForConnectionToWatch() {
|
|
36
64
|
return PhoenixLightLitElementUtils.getComponentsForWhichToWaitForConnection([...this.querySelectorAll('*')]).map(($element) => $element.tagName.toLowerCase());
|
|
37
65
|
}
|
|
66
|
+
_getComponentsNamesForRenderedToWatch() {
|
|
67
|
+
return PhoenixLightLitElementUtils.getComponentsForWhichToWaitForRender([...this.querySelectorAll('*')]).map(($element) => $element.tagName.toLowerCase());
|
|
68
|
+
}
|
|
38
69
|
connectedCallback() {
|
|
39
70
|
super.connectedCallback();
|
|
40
|
-
this.
|
|
41
|
-
detail: {
|
|
42
|
-
$el: this
|
|
43
|
-
},
|
|
44
|
-
bubbles: true
|
|
45
|
-
}));
|
|
71
|
+
this._dispatchLifecycleEvent(PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES.connected);
|
|
46
72
|
this.isWebComponentConnected = true;
|
|
47
73
|
this._setupChildrenWatch();
|
|
48
74
|
}
|
|
49
75
|
allChildrenConnected() { }
|
|
76
|
+
allChildrenRendered() { }
|
|
50
77
|
_assignSlots() {
|
|
51
78
|
return [...this.querySelectorAll(':scope > [slot]')].reduce((acc, $el) => {
|
|
52
79
|
var _a;
|
|
@@ -79,7 +106,11 @@ __decorate([
|
|
|
79
106
|
__decorate([
|
|
80
107
|
property({ type: Boolean }),
|
|
81
108
|
__metadata("design:type", Object)
|
|
82
|
-
], PhoenixLightLitElement.prototype, "isWebComponentConnected", void 0);
|
|
109
|
+
], PhoenixLightLitElement.prototype, "isWebComponentConnected", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
property({ type: Boolean }),
|
|
112
|
+
__metadata("design:type", Object)
|
|
113
|
+
], PhoenixLightLitElement.prototype, "isWebComponentRendered", void 0);
|
|
83
114
|
|
|
84
115
|
export { PhoenixLightLitElement };
|
|
85
116
|
//# sourceMappingURL=phoenix_light_lit_element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA,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;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,4 +1,5 @@
|
|
|
1
1
|
import { PhoenixLightLitElement } from "./phoenix_light_lit_element";
|
|
2
2
|
export declare class PhoenixLightLitElementUtils {
|
|
3
3
|
static getComponentsForWhichToWaitForConnection(components: PhoenixLightLitElement[]): PhoenixLightLitElement[];
|
|
4
|
+
static getComponentsForWhichToWaitForRender(components: PhoenixLightLitElement[]): PhoenixLightLitElement[];
|
|
4
5
|
}
|
|
@@ -7,6 +7,12 @@ class PhoenixLightLitElementUtils {
|
|
|
7
7
|
WebComponentsUtils.isWebComponentDefined($element) &&
|
|
8
8
|
!$element.isWebComponentConnected));
|
|
9
9
|
}
|
|
10
|
+
static getComponentsForWhichToWaitForRender(components) {
|
|
11
|
+
return components.filter(($element) => (WebComponentsUtils.isWebComponent($element) && !WebComponentsUtils.isWebComponentDefined($element)) ||
|
|
12
|
+
(WebComponentsUtils.isWebComponent($element) &&
|
|
13
|
+
WebComponentsUtils.isWebComponentDefined($element) &&
|
|
14
|
+
!$element.isWebComponentRendered));
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
export { PhoenixLightLitElementUtils };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const DEFAULT_SLOT_NAME = "default";
|
|
2
2
|
export declare const PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES: {
|
|
3
|
-
readonly connected: "connected";
|
|
3
|
+
readonly connected: "PhoenixLightLitElement.connected";
|
|
4
|
+
readonly rendered: "PhoenixLightLitElement.rendered";
|
|
4
5
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const DEFAULT_SLOT_NAME = 'default';
|
|
2
|
+
const eventPrefix = 'PhoenixLightLitElement';
|
|
2
3
|
const PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES = {
|
|
3
|
-
connected:
|
|
4
|
+
connected: `${eventPrefix}.connected`,
|
|
5
|
+
rendered: `${eventPrefix}.rendered`
|
|
4
6
|
};
|
|
5
7
|
|
|
6
8
|
export { DEFAULT_SLOT_NAME, PHOENIX_LIGHT_LIT_ELEMENTS_EVENT_NAMES };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|