@kubex/zinc 1.0.111 → 1.0.112
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/custom-elements.json +32 -1
- package/dist/vscode.html-custom-data.json +1 -0
- package/dist/web-types.json +6 -1
- package/dist/zn.d.ts +25 -0
- package/dist/zn.min.js +285 -283
- package/package.json +1 -1
- package/src/components/inline-edit/inline-edit.component.ts +14 -6
- package/src/components/select/select.component.ts +3 -28
- package/src/internal/conditional.ts +88 -0
|
@@ -13456,6 +13456,13 @@
|
|
|
13456
13456
|
"readonly": true,
|
|
13457
13457
|
"default": "new HasSlotController(this, 'help-text', '[default]')"
|
|
13458
13458
|
},
|
|
13459
|
+
{
|
|
13460
|
+
"kind": "field",
|
|
13461
|
+
"name": "conditionalController",
|
|
13462
|
+
"privacy": "private",
|
|
13463
|
+
"readonly": true,
|
|
13464
|
+
"default": "new ConditionalController(this)"
|
|
13465
|
+
},
|
|
13459
13466
|
{
|
|
13460
13467
|
"kind": "field",
|
|
13461
13468
|
"name": "value",
|
|
@@ -13490,6 +13497,15 @@
|
|
|
13490
13497
|
},
|
|
13491
13498
|
"attribute": "edit-text"
|
|
13492
13499
|
},
|
|
13500
|
+
{
|
|
13501
|
+
"kind": "field",
|
|
13502
|
+
"name": "conditional",
|
|
13503
|
+
"type": {
|
|
13504
|
+
"text": "string"
|
|
13505
|
+
},
|
|
13506
|
+
"default": "''",
|
|
13507
|
+
"attribute": "conditional"
|
|
13508
|
+
},
|
|
13493
13509
|
{
|
|
13494
13510
|
"kind": "field",
|
|
13495
13511
|
"name": "disabled",
|
|
@@ -13922,6 +13938,14 @@
|
|
|
13922
13938
|
},
|
|
13923
13939
|
"fieldName": "editText"
|
|
13924
13940
|
},
|
|
13941
|
+
{
|
|
13942
|
+
"name": "conditional",
|
|
13943
|
+
"type": {
|
|
13944
|
+
"text": "string"
|
|
13945
|
+
},
|
|
13946
|
+
"default": "''",
|
|
13947
|
+
"fieldName": "conditional"
|
|
13948
|
+
},
|
|
13925
13949
|
{
|
|
13926
13950
|
"name": "disabled",
|
|
13927
13951
|
"type": {
|
|
@@ -24797,6 +24821,13 @@
|
|
|
24797
24821
|
"readonly": true,
|
|
24798
24822
|
"default": "new FormControlController(this, { assumeInteractionOn: ['zn-blur', 'zn-input'] })"
|
|
24799
24823
|
},
|
|
24824
|
+
{
|
|
24825
|
+
"kind": "field",
|
|
24826
|
+
"name": "conditionalController",
|
|
24827
|
+
"privacy": "private",
|
|
24828
|
+
"readonly": true,
|
|
24829
|
+
"default": "new ConditionalController(this)"
|
|
24830
|
+
},
|
|
24800
24831
|
{
|
|
24801
24832
|
"kind": "field",
|
|
24802
24833
|
"name": "hasSlotController",
|
|
@@ -33234,7 +33265,7 @@
|
|
|
33234
33265
|
"package": {
|
|
33235
33266
|
"name": "@kubex/zinc",
|
|
33236
33267
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
33237
|
-
"version": "1.0.
|
|
33268
|
+
"version": "1.0.112",
|
|
33238
33269
|
"author": "",
|
|
33239
33270
|
"license": "MIT"
|
|
33240
33271
|
}
|
|
@@ -1537,6 +1537,7 @@
|
|
|
1537
1537
|
{ "name": "name", "values": [] },
|
|
1538
1538
|
{ "name": "placeholder", "values": [] },
|
|
1539
1539
|
{ "name": "edit-text", "values": [] },
|
|
1540
|
+
{ "name": "conditional", "values": [] },
|
|
1540
1541
|
{ "name": "disabled", "values": [] },
|
|
1541
1542
|
{ "name": "inline", "values": [] },
|
|
1542
1543
|
{ "name": "padded", "values": [] },
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@kubex/zinc",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.112",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -3581,6 +3581,10 @@
|
|
|
3581
3581
|
{ "name": "name", "value": { "type": "string" } },
|
|
3582
3582
|
{ "name": "placeholder", "value": { "type": "string" } },
|
|
3583
3583
|
{ "name": "edit-text", "value": { "type": "string" } },
|
|
3584
|
+
{
|
|
3585
|
+
"name": "conditional",
|
|
3586
|
+
"value": { "type": "string", "default": "''" }
|
|
3587
|
+
},
|
|
3584
3588
|
{ "name": "disabled", "value": { "type": "boolean" } },
|
|
3585
3589
|
{ "name": "inline", "value": { "type": "boolean" } },
|
|
3586
3590
|
{ "name": "padded", "value": { "type": "boolean" } },
|
|
@@ -3669,6 +3673,7 @@
|
|
|
3669
3673
|
{ "name": "name", "type": "string" },
|
|
3670
3674
|
{ "name": "placeholder", "type": "string" },
|
|
3671
3675
|
{ "name": "editText", "type": "string" },
|
|
3676
|
+
{ "name": "conditional", "type": "string" },
|
|
3672
3677
|
{ "name": "disabled", "type": "boolean" },
|
|
3673
3678
|
{ "name": "inline", "type": "boolean" },
|
|
3674
3679
|
{ "name": "padded", "type": "boolean" },
|
package/dist/zn.d.ts
CHANGED
|
@@ -2030,6 +2030,28 @@ declare module "internal/animate" {
|
|
|
2030
2030
|
offset?: number | null;
|
|
2031
2031
|
}[];
|
|
2032
2032
|
}
|
|
2033
|
+
declare module "internal/conditional" {
|
|
2034
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2035
|
+
export interface ConditionalHost {
|
|
2036
|
+
conditional: string;
|
|
2037
|
+
disabled: boolean;
|
|
2038
|
+
}
|
|
2039
|
+
/** A reactive controller that disables the host when linked selects have a value. */
|
|
2040
|
+
export class ConditionalController implements ReactiveController {
|
|
2041
|
+
host: ReactiveControllerHost & Element & ConditionalHost;
|
|
2042
|
+
private conditionals;
|
|
2043
|
+
private initiallyDisabled;
|
|
2044
|
+
private readonly handleChange;
|
|
2045
|
+
constructor(host: ReactiveControllerHost & Element & ConditionalHost);
|
|
2046
|
+
/** Call from the host's `firstUpdated()` to parse IDs, find elements, attach listeners, and run the initial check. */
|
|
2047
|
+
setup(): void;
|
|
2048
|
+
hostConnected(): void;
|
|
2049
|
+
hostDisconnected(): void;
|
|
2050
|
+
/** Re-evaluate the conditional state. Call from the host when needed. */
|
|
2051
|
+
check(): void;
|
|
2052
|
+
private checkConditionals;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2033
2055
|
declare module "utilities/animation-registry" {
|
|
2034
2056
|
export interface ElementAnimation {
|
|
2035
2057
|
keyframes: Keyframe[];
|
|
@@ -2177,6 +2199,7 @@ declare module "components/select/select.component" {
|
|
|
2177
2199
|
'zn-tag': typeof ZnChip;
|
|
2178
2200
|
};
|
|
2179
2201
|
protected readonly formControlController: FormControlController;
|
|
2202
|
+
private readonly conditionalController;
|
|
2180
2203
|
private readonly hasSlotController;
|
|
2181
2204
|
private readonly localize;
|
|
2182
2205
|
private typeToSelectString;
|
|
@@ -3786,10 +3809,12 @@ declare module "components/inline-edit/inline-edit.component" {
|
|
|
3786
3809
|
static styles: CSSResultGroup;
|
|
3787
3810
|
private readonly formControlController;
|
|
3788
3811
|
private readonly hasSlotController;
|
|
3812
|
+
private readonly conditionalController;
|
|
3789
3813
|
value: string | string[];
|
|
3790
3814
|
name: string;
|
|
3791
3815
|
placeholder: string;
|
|
3792
3816
|
editText: string;
|
|
3817
|
+
conditional: string;
|
|
3793
3818
|
disabled: boolean;
|
|
3794
3819
|
inline: boolean;
|
|
3795
3820
|
padded: boolean;
|