@nanoporetech-digital/components 6.8.1 → 6.8.3
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/CHANGELOG.md +22 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-more-less.cjs.entry.js +27 -28
- package/dist/cjs/nano-more-less.cjs.entry.js.map +1 -1
- package/dist/cjs/{nano-table-a578c5a2.js → nano-table-649ed668.js} +2 -2
- package/dist/cjs/{nano-table-a578c5a2.js.map → nano-table-649ed668.js.map} +1 -1
- package/dist/cjs/nano-table.cjs.entry.js +1 -1
- package/dist/cjs/{table.worker-3a73e248.js → table.worker-ddc8bca9.js} +2 -2
- package/dist/cjs/table.worker-ddc8bca9.js.map +1 -0
- package/dist/collection/components/more-less/more-less.js +32 -30
- package/dist/collection/components/more-less/more-less.js.map +1 -1
- package/dist/components/nano-more-less.js +30 -32
- package/dist/components/nano-more-less.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-more-less.entry.js +27 -28
- package/dist/esm/nano-more-less.entry.js.map +1 -1
- package/dist/esm/{nano-table-92092ea8.js → nano-table-cdb05d5f.js} +2 -2
- package/dist/esm/{nano-table-92092ea8.js.map → nano-table-cdb05d5f.js.map} +1 -1
- package/dist/esm/nano-table.entry.js +1 -1
- package/dist/esm/{table.worker-5e8af93c.js → table.worker-81dca716.js} +2 -2
- package/dist/esm/table.worker-81dca716.js.map +1 -0
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-more-less.entry.js +1 -1
- package/dist/nano-components/nano-more-less.entry.js.map +1 -1
- package/dist/nano-components/{nano-table-92092ea8.js → nano-table-cdb05d5f.js} +2 -2
- package/dist/nano-components/nano-table.entry.js +1 -1
- package/dist/nano-components/{table.worker-5e8af93c.js → table.worker-81dca716.js} +2 -2
- package/dist/types/components/more-less/more-less.d.ts +4 -5
- package/docs-json.json +26 -2
- package/hydrate/index.js +31 -24
- package/package.json +2 -4
- package/dist/cjs/table.worker-3a73e248.js.map +0 -1
- package/dist/esm/table.worker-5e8af93c.js.map +0 -1
- /package/dist/nano-components/{nano-table-92092ea8.js.map → nano-table-cdb05d5f.js.map} +0 -0
- /package/dist/nano-components/{table.worker-5e8af93c.js.map → table.worker-81dca716.js.map} +0 -0
package/hydrate/index.js
CHANGED
@@ -23497,6 +23497,9 @@ const valueToRatio = (value, min, max) => {
|
|
23497
23497
|
* @part button-wrapper - wraps the 'more' / 'less' buttons
|
23498
23498
|
* @part button-wrapper--more - wraps the 'more' button
|
23499
23499
|
* @part button-wrapper--less - wraps the 'less' button
|
23500
|
+
* @part button - default 'more' / 'less' buttons
|
23501
|
+
* @part button--more - the default 'more' button
|
23502
|
+
* @part button--less - the default 'less' button
|
23500
23503
|
*/
|
23501
23504
|
class Rating$1 {
|
23502
23505
|
constructor(hostRef) {
|
@@ -23508,11 +23511,14 @@ class Rating$1 {
|
|
23508
23511
|
this.noHideBtn = false;
|
23509
23512
|
}
|
23510
23513
|
get children() {
|
23511
|
-
|
23512
|
-
|
23513
|
-
|
23514
|
-
|
23515
|
-
|
23514
|
+
let children;
|
23515
|
+
if (this.childrenSelector) {
|
23516
|
+
children = this.host.querySelectorAll(this.childrenSelector);
|
23517
|
+
}
|
23518
|
+
else {
|
23519
|
+
children = this.host.children;
|
23520
|
+
}
|
23521
|
+
return Array.from(children).filter((ele) => !ele.hasAttribute('slot'));
|
23516
23522
|
}
|
23517
23523
|
handleShowHideElements() {
|
23518
23524
|
this.slottedElements.forEach((ele, i) => {
|
@@ -23521,44 +23527,45 @@ class Rating$1 {
|
|
23521
23527
|
ele.style.display = '';
|
23522
23528
|
}
|
23523
23529
|
}
|
23524
|
-
else
|
23525
|
-
|
23530
|
+
else {
|
23531
|
+
if (i >= this.maxToShow) {
|
23532
|
+
ele.style.display = 'none';
|
23533
|
+
}
|
23534
|
+
else {
|
23535
|
+
ele.style.display = '';
|
23536
|
+
}
|
23526
23537
|
}
|
23527
23538
|
});
|
23528
23539
|
}
|
23529
|
-
slotChangeObserver() {
|
23530
|
-
return;
|
23531
|
-
}
|
23532
23540
|
processSlottedContent() {
|
23533
|
-
const
|
23534
|
-
|
23535
|
-
|
23536
|
-
|
23537
|
-
|
23541
|
+
const diff = this.children.length !== this.slottedElements.length ||
|
23542
|
+
!!this.children.filter((x) => !this.slottedElements.includes(x))?.length;
|
23543
|
+
if (diff) {
|
23544
|
+
this.slottedElements = this.children;
|
23545
|
+
}
|
23538
23546
|
}
|
23539
23547
|
handleClick(_e) {
|
23540
23548
|
this.show = !this.show;
|
23541
23549
|
}
|
23542
|
-
componentDidLoad() {
|
23543
|
-
this.slotChangeObserver();
|
23544
|
-
}
|
23545
23550
|
connectedCallback() {
|
23546
23551
|
this.processSlottedContent();
|
23547
23552
|
}
|
23548
|
-
disconnectedCallback() {
|
23549
|
-
}
|
23550
23553
|
render() {
|
23551
|
-
return (hAsync(Host, null, hAsync("slot",
|
23554
|
+
return (hAsync(Host, null, hAsync("slot", { onSlotchange: () => this.processSlottedContent() }), this.slottedElements?.length > this.maxToShow && [
|
23555
|
+
hAsync("div", { style: { display: this.show ? 'none' : 'contents' }, class: "button-wrapper", part: "button-wrapper button-wrapper--less", onClick: (e) => this.handleClick(e) }, hAsync("slot", { name: "less" }, hAsync("button", { part: "button button--less" }, "Show more (+", this.slottedElements.length - this.maxToShow, ")"))),
|
23556
|
+
!this.noHideBtn ? (hAsync("div", { style: { display: this.show ? 'contents' : 'none' }, class: "button-wrapper", part: "button-wrapper button-wrapper--more", onClick: (e) => this.handleClick(e) }, hAsync("slot", { name: "more" }, hAsync("button", { part: "button button--more" }, "Show less (-", this.slottedElements.length - this.maxToShow, ")")))) : (''),
|
23557
|
+
]));
|
23552
23558
|
}
|
23553
23559
|
get host() { return getElement(this); }
|
23554
23560
|
static get watchers() { return {
|
23555
23561
|
"slottedElements": ["handleShowHideElements"],
|
23556
23562
|
"maxToShow": ["handleShowHideElements"],
|
23557
|
-
"show": ["handleShowHideElements"]
|
23563
|
+
"show": ["handleShowHideElements"],
|
23564
|
+
"childrenSelector": ["processSlottedContent"]
|
23558
23565
|
}; }
|
23559
|
-
static get style() { return "
|
23566
|
+
static get style() { return "/*!@:host*/.sc-nano-more-less-h { display: contents; }"; }
|
23560
23567
|
static get cmpMeta() { return {
|
23561
|
-
"$flags$":
|
23568
|
+
"$flags$": 9,
|
23562
23569
|
"$tagName$": "nano-more-less",
|
23563
23570
|
"$members$": {
|
23564
23571
|
"show": [1540],
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nanoporetech-digital/components",
|
3
|
-
"version": "6.8.
|
3
|
+
"version": "6.8.3",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "https://git.oxfordnanolabs.local/Digital/nano-components"
|
@@ -27,10 +27,8 @@
|
|
27
27
|
"build": "run-s themes.prod stencil.prod hashassets",
|
28
28
|
"dev": "run-p themes.dev stencil.dev",
|
29
29
|
"dev.docs": "run-p themes.dev stencil.dev.docs",
|
30
|
-
"dev.legacy": "run-p themes.dev stencil.dev.legacy",
|
31
30
|
"stencil.dev": "stencil build --dev --watch --serve -p 3333",
|
32
31
|
"stencil.prod": "stencil build --stats --prod --config='./stencil.config.prod.ts'",
|
33
|
-
"stencil.dev.legacy": "stencil build --dev --watch --serve --config='./stencil.config.prod.ts'",
|
34
32
|
"stencil.dev.docs": "stencil build --watch --serve -p 3333",
|
35
33
|
"themes.dev": "sass --embed-sources ./src/themes:themes --watch",
|
36
34
|
"themes.prod": "sass --embed-sources ./src/themes:themes --style=compressed",
|
@@ -129,7 +127,7 @@
|
|
129
127
|
"nanopore",
|
130
128
|
"digital"
|
131
129
|
],
|
132
|
-
"gitHead": "
|
130
|
+
"gitHead": "9bad33f93ed74b4d7e9a428ee09623626d428e7f",
|
133
131
|
"volta": {
|
134
132
|
"node": "18.14.0"
|
135
133
|
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"table.worker-3a73e248.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"table.worker-5e8af93c.js","mappings":";;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
File without changes
|
File without changes
|