@progressive-development/pd-forms 0.7.14-a → 0.7.14-c
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/dist/pd-button-group.d.ts +1 -0
- package/dist/pd-button-group.d.ts.map +1 -1
- package/dist/pd-button-group.js +5 -1
- package/dist/pd-icon-button-select-group.d.ts +2 -0
- package/dist/pd-icon-button-select-group.d.ts.map +1 -1
- package/dist/pd-icon-button-select-group.js +13 -2
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ export declare class PdButtonGroup extends PdBaseUI {
|
|
|
7
7
|
private _selectedButtons;
|
|
8
8
|
static styles: CSSResultGroup;
|
|
9
9
|
willUpdate(changedProps: PropertyValues<this>): void;
|
|
10
|
+
reset(selectedValue: number): void;
|
|
10
11
|
render(): import('lit-html').TemplateResult<1>;
|
|
11
12
|
private onClick;
|
|
12
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pd-button-group.d.ts","sourceRoot":"","sources":["../src/pd-button-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,2BAA2B,CAAC;AAEnC,qBACa,aAAc,SAAQ,QAAQ;IAEzC,UAAU,EAAE,UAAU,EAAE,CAAM;IAG9B,SAAS,EAAE,MAAM,EAAE,CAAM;IAGzB,OAAO,CAAC,gBAAgB,CAAgB;IAExC,OAAgB,MAAM,EAAE,cAAc,CA0CpC;IAEO,UAAU,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"pd-button-group.d.ts","sourceRoot":"","sources":["../src/pd-button-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,2BAA2B,CAAC;AAEnC,qBACa,aAAc,SAAQ,QAAQ;IAEzC,UAAU,EAAE,UAAU,EAAE,CAAM;IAG9B,SAAS,EAAE,MAAM,EAAE,CAAM;IAGzB,OAAO,CAAC,gBAAgB,CAAgB;IAExC,OAAgB,MAAM,EAAE,cAAc,CA0CpC;IAEO,UAAU,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAWtD,KAAK,CAAC,aAAa,EAAE,MAAM;IAIzB,MAAM;IAkBf,OAAO,CAAC,OAAO;CAYhB"}
|
package/dist/pd-button-group.js
CHANGED
|
@@ -20,10 +20,14 @@ let PdButtonGroup = class extends PdBaseUI {
|
|
|
20
20
|
this._selectedButtons = [];
|
|
21
21
|
}
|
|
22
22
|
willUpdate(changedProps) {
|
|
23
|
-
|
|
23
|
+
var _a;
|
|
24
|
+
if (changedProps.has("initValue") && ((_a = this.initValue) == null ? void 0 : _a.length) > 0 && this._selectedButtons.length === 0) {
|
|
24
25
|
this._selectedButtons = [...this.initValue];
|
|
25
26
|
}
|
|
26
27
|
}
|
|
28
|
+
reset(selectedValue) {
|
|
29
|
+
this._selectedButtons = [selectedValue];
|
|
30
|
+
}
|
|
27
31
|
render() {
|
|
28
32
|
return html`
|
|
29
33
|
<div class="button-group">
|
|
@@ -5,8 +5,10 @@ export declare class PdIconButtonSelectGroup extends PdBaseUI {
|
|
|
5
5
|
options: ButtonData[];
|
|
6
6
|
initValue: number;
|
|
7
7
|
private _selectedValue;
|
|
8
|
+
private _buttonGroupEl;
|
|
8
9
|
static styles: CSSResultGroup;
|
|
9
10
|
willUpdate(changedProps: PropertyValues<this>): void;
|
|
11
|
+
reset(selectedValue: number): void;
|
|
10
12
|
render(): import('lit-html').TemplateResult<1> | "";
|
|
11
13
|
private handleSelectionChange;
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pd-icon-button-select-group.d.ts","sourceRoot":"","sources":["../src/pd-icon-button-select-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,wBAAwB,CAAC;AAChC,OAAO,mBAAmB,CAAC;AAE3B,qBACa,uBAAwB,SAAQ,QAAQ;IAEnD,OAAO,EAAE,UAAU,EAAE,CAAM;IAG3B,SAAS,EAAE,MAAM,CAAM;IAGvB,OAAO,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"pd-icon-button-select-group.d.ts","sourceRoot":"","sources":["../src/pd-icon-button-select-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,wBAAwB,CAAC;AAChC,OAAO,mBAAmB,CAAC;AAE3B,qBACa,uBAAwB,SAAQ,QAAQ;IAEnD,OAAO,EAAE,UAAU,EAAE,CAAM;IAG3B,SAAS,EAAE,MAAM,CAAM;IAGvB,OAAO,CAAC,cAAc,CAAc;IAGpC,OAAO,CAAC,cAAc,CAAM;IAE5B,OAAgB,MAAM,EAAE,cAAc,CAcpC;IAEO,UAAU,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAWtD,KAAK,CAAC,aAAa,EAAE,MAAM;IAOzB,MAAM;IAwBf,OAAO,CAAC,qBAAqB;CAe9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css, html } from "lit";
|
|
2
|
-
import { property, state, customElement } from "lit/decorators.js";
|
|
2
|
+
import { property, state, query, customElement } from "lit/decorators.js";
|
|
3
3
|
import { PdBaseUI } from "./pd-base-ui.js";
|
|
4
4
|
import "./pd-icon-panel-button.js";
|
|
5
5
|
import "./pd-button-group.js";
|
|
@@ -18,12 +18,19 @@ let PdIconButtonSelectGroup = class extends PdBaseUI {
|
|
|
18
18
|
super(...arguments);
|
|
19
19
|
this.options = [];
|
|
20
20
|
this.initValue = -1;
|
|
21
|
+
this._selectedValue = -1;
|
|
21
22
|
}
|
|
22
23
|
willUpdate(changedProps) {
|
|
23
|
-
if (changedProps.has("initValue") && this.initValue
|
|
24
|
+
if (changedProps.has("initValue") && this.initValue > 0 && this._selectedValue === -1) {
|
|
24
25
|
this._selectedValue = this.initValue;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
28
|
+
reset(selectedValue) {
|
|
29
|
+
this._selectedValue = selectedValue;
|
|
30
|
+
if (this._buttonGroupEl) {
|
|
31
|
+
this._buttonGroupEl.reset(selectedValue);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
27
34
|
render() {
|
|
28
35
|
if (!this.options || this.options.length === 0) {
|
|
29
36
|
return "";
|
|
@@ -37,6 +44,7 @@ let PdIconButtonSelectGroup = class extends PdBaseUI {
|
|
|
37
44
|
.pdButtonIcon=${(selectedData == null ? void 0 : selectedData.pdIcon) ?? ""}
|
|
38
45
|
>
|
|
39
46
|
<pd-button-group
|
|
47
|
+
id="buttonGroupId"
|
|
40
48
|
class="button-group-style"
|
|
41
49
|
.buttonList=${this.options}
|
|
42
50
|
.initValue=${[this._selectedValue]}
|
|
@@ -84,6 +92,9 @@ __decorateClass([
|
|
|
84
92
|
__decorateClass([
|
|
85
93
|
state()
|
|
86
94
|
], PdIconButtonSelectGroup.prototype, "_selectedValue", 2);
|
|
95
|
+
__decorateClass([
|
|
96
|
+
query("#buttonGroupId")
|
|
97
|
+
], PdIconButtonSelectGroup.prototype, "_buttonGroupEl", 2);
|
|
87
98
|
PdIconButtonSelectGroup = __decorateClass([
|
|
88
99
|
customElement("pd-icon-button-select-group")
|
|
89
100
|
], PdIconButtonSelectGroup);
|
package/package.json
CHANGED