@kubex/zinc 2.0.2 → 2.0.4
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 +356 -115
- package/dist/vscode.html-custom-data.json +29 -14
- package/dist/web-types.json +67 -45
- package/dist/zn.d.ts +47 -21
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +333 -309
- package/docs/pages/components/form-actions.md +11 -0
- package/package.json +1 -1
- package/scss/_global-spacing.scss +7 -0
- package/scss/_root.scss +1 -5
- package/src/components/button/button.component.ts +2 -2
- package/src/components/button/button.test.ts +7 -0
- package/src/components/chart/chart.component.ts +1 -1
- package/src/components/editor/modules/dialog/dialog.test.ts +1 -1
- package/src/components/expanding-action/expanding-action.component.ts +1 -1
- package/src/components/filter-wrapper/filter-wrapper.component.ts +1 -1
- package/src/components/form-actions/form-actions.component.ts +112 -14
- package/src/components/form-actions/form-actions.scss +37 -1
- package/src/components/form-actions/form-actions.test.ts +137 -0
- package/src/components/inline-edit/inline-edit.component.ts +1 -2
- package/src/components/inline-edit/inline-edit.scss +20 -20
- package/src/components/input/input.component.ts +38 -2
- package/src/components/input/input.scss +96 -33
- package/src/components/input/input.test.ts +1 -1
- package/src/components/key-value/key-value.component.ts +123 -12
- package/src/components/key-value/key-value.scss +13 -0
- package/src/components/key-value/key-value.test.ts +65 -2
- package/src/components/nav-list/nav-list.test.ts +1 -1
- package/src/components/navbar/navbar.component.ts +14 -8
- package/src/components/panel/panel.component.ts +1 -1
- package/src/components/priority-list/priority-list.test.ts +1 -1
- package/src/components/select/select.test.ts +24 -0
- package/src/components/split-pane/split-pane.component.ts +1 -1
- package/src/components/table/table.component.ts +5 -2
- package/src/components/table/table.scss +4 -0
- package/src/components/table/table.test.ts +13 -0
- package/src/components/tabs/tabs.component.ts +2 -2
- package/src/internal/conditional.ts +9 -0
|
@@ -13,17 +13,6 @@
|
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
{
|
|
17
|
-
"name": "zn-action-bar",
|
|
18
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
19
|
-
"attributes": [],
|
|
20
|
-
"references": [
|
|
21
|
-
{
|
|
22
|
-
"name": "Documentation",
|
|
23
|
-
"url": "https://zinc.style/components/action-bar"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
16
|
{
|
|
28
17
|
"name": "zn-alert",
|
|
29
18
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -71,6 +60,17 @@
|
|
|
71
60
|
}
|
|
72
61
|
]
|
|
73
62
|
},
|
|
63
|
+
{
|
|
64
|
+
"name": "zn-action-bar",
|
|
65
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
66
|
+
"attributes": [],
|
|
67
|
+
"references": [
|
|
68
|
+
{
|
|
69
|
+
"name": "Documentation",
|
|
70
|
+
"url": "https://zinc.style/components/action-bar"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
74
|
{
|
|
75
75
|
"name": "zn-animated-button",
|
|
76
76
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -2299,7 +2299,7 @@
|
|
|
2299
2299
|
},
|
|
2300
2300
|
{
|
|
2301
2301
|
"name": "zn-form-actions",
|
|
2302
|
-
"description": "
|
|
2302
|
+
"description": "\n---\n",
|
|
2303
2303
|
"attributes": [
|
|
2304
2304
|
{
|
|
2305
2305
|
"name": "submit-text",
|
|
@@ -2350,6 +2350,11 @@
|
|
|
2350
2350
|
"name": "loading-on-submit",
|
|
2351
2351
|
"description": "Shows the submit button loading and ignores further submits until the console reports the request finished,\nso a slow save such as an upload can't be sent twice. Only for forms the console submits.",
|
|
2352
2352
|
"values": []
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
"name": "hide-until-changed",
|
|
2356
|
+
"description": "Hides the row until the form's values differ from when it loaded or was last saved, and hides it again once\nthey match.",
|
|
2357
|
+
"values": []
|
|
2353
2358
|
}
|
|
2354
2359
|
],
|
|
2355
2360
|
"references": [
|
|
@@ -2771,7 +2776,7 @@
|
|
|
2771
2776
|
},
|
|
2772
2777
|
{
|
|
2773
2778
|
"name": "no-spin-buttons",
|
|
2774
|
-
"description": "Hides the
|
|
2779
|
+
"description": "Hides the increment/decrement buttons on number inputs *",
|
|
2775
2780
|
"values": []
|
|
2776
2781
|
},
|
|
2777
2782
|
{
|
|
@@ -3055,7 +3060,7 @@
|
|
|
3055
3060
|
{ "name": "name", "values": [] },
|
|
3056
3061
|
{
|
|
3057
3062
|
"name": "value",
|
|
3058
|
-
"description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`.",
|
|
3063
|
+
"description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`. With `list`, the names as a JSON array,\nsuch as `[\"10.0.0.0/24\"]`.",
|
|
3059
3064
|
"values": []
|
|
3060
3065
|
},
|
|
3061
3066
|
{ "name": "label", "values": [] },
|
|
@@ -3068,6 +3073,16 @@
|
|
|
3068
3073
|
"description": "Passed to each value input, so its slash menu can insert merge fields.",
|
|
3069
3074
|
"values": []
|
|
3070
3075
|
},
|
|
3076
|
+
{
|
|
3077
|
+
"name": "value-options",
|
|
3078
|
+
"description": "Makes each value a choice instead of free text: a JSON object of option values to labels, such as\n`{\"default\": \"System default\", \"auto\": \"Auto approve\"}`. New rows take the first option.",
|
|
3079
|
+
"values": [{ "name": "Record<string, string>" }]
|
|
3080
|
+
},
|
|
3081
|
+
{
|
|
3082
|
+
"name": "list",
|
|
3083
|
+
"description": "Edits a plain list of names with no values, submitted as a JSON array.",
|
|
3084
|
+
"values": []
|
|
3085
|
+
},
|
|
3071
3086
|
{ "name": "form", "values": [] },
|
|
3072
3087
|
{ "name": "disabled", "values": [] }
|
|
3073
3088
|
],
|
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": "2.0.
|
|
4
|
+
"version": "2.0.4",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,28 +15,6 @@
|
|
|
15
15
|
"events": [],
|
|
16
16
|
"js": { "properties": [], "events": [] }
|
|
17
17
|
},
|
|
18
|
-
{
|
|
19
|
-
"name": "zn-action-bar",
|
|
20
|
-
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
21
|
-
"doc-url": "",
|
|
22
|
-
"attributes": [],
|
|
23
|
-
"slots": [
|
|
24
|
-
{ "name": "", "description": "The default slot." },
|
|
25
|
-
{ "name": "example", "description": "An example slot." }
|
|
26
|
-
],
|
|
27
|
-
"events": [
|
|
28
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
29
|
-
],
|
|
30
|
-
"js": {
|
|
31
|
-
"properties": [],
|
|
32
|
-
"events": [
|
|
33
|
-
{
|
|
34
|
-
"name": "zn-event-name",
|
|
35
|
-
"description": "Emitted as an example."
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
18
|
{
|
|
41
19
|
"name": "zn-alert",
|
|
42
20
|
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -117,6 +95,28 @@
|
|
|
117
95
|
]
|
|
118
96
|
}
|
|
119
97
|
},
|
|
98
|
+
{
|
|
99
|
+
"name": "zn-action-bar",
|
|
100
|
+
"description": "Short summary of the component's intended use.\n\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
101
|
+
"doc-url": "",
|
|
102
|
+
"attributes": [],
|
|
103
|
+
"slots": [
|
|
104
|
+
{ "name": "", "description": "The default slot." },
|
|
105
|
+
{ "name": "example", "description": "An example slot." }
|
|
106
|
+
],
|
|
107
|
+
"events": [
|
|
108
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
109
|
+
],
|
|
110
|
+
"js": {
|
|
111
|
+
"properties": [],
|
|
112
|
+
"events": [
|
|
113
|
+
{
|
|
114
|
+
"name": "zn-event-name",
|
|
115
|
+
"description": "Emitted as an example."
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
120
|
{
|
|
121
121
|
"name": "zn-animated-button",
|
|
122
122
|
"description": "\n\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
|
@@ -5273,7 +5273,7 @@
|
|
|
5273
5273
|
},
|
|
5274
5274
|
{
|
|
5275
5275
|
"name": "zn-form-actions",
|
|
5276
|
-
"description": "
|
|
5276
|
+
"description": "\n\n---\n",
|
|
5277
5277
|
"doc-url": "",
|
|
5278
5278
|
"attributes": [
|
|
5279
5279
|
{
|
|
@@ -5325,20 +5325,14 @@
|
|
|
5325
5325
|
"name": "loading-on-submit",
|
|
5326
5326
|
"description": "Shows the submit button loading and ignores further submits until the console reports the request finished,\nso a slow save such as an upload can't be sent twice. Only for forms the console submits.",
|
|
5327
5327
|
"value": { "type": "boolean", "default": "false" }
|
|
5328
|
-
}
|
|
5329
|
-
],
|
|
5330
|
-
"slots": [
|
|
5331
|
-
{
|
|
5332
|
-
"name": "",
|
|
5333
|
-
"description": "Extra actions, placed before the buttons. `align=\"start\"` on a child moves it to the start of the row; any number can sit on either side. Write them in the order they should be read — the sides are set by CSS ordering, so markup order is what a keyboard follows."
|
|
5334
|
-
}
|
|
5335
|
-
],
|
|
5336
|
-
"events": [
|
|
5328
|
+
},
|
|
5337
5329
|
{
|
|
5338
|
-
"name": "
|
|
5339
|
-
"description": "
|
|
5330
|
+
"name": "hide-until-changed",
|
|
5331
|
+
"description": "Hides the row until the form's values differ from when it loaded or was last saved, and hides it again once\nthey match.",
|
|
5332
|
+
"value": { "type": "boolean", "default": "false" }
|
|
5340
5333
|
}
|
|
5341
5334
|
],
|
|
5335
|
+
"events": [],
|
|
5342
5336
|
"js": {
|
|
5343
5337
|
"properties": [
|
|
5344
5338
|
{
|
|
@@ -5390,14 +5384,14 @@
|
|
|
5390
5384
|
"name": "loadingOnSubmit",
|
|
5391
5385
|
"description": "Shows the submit button loading and ignores further submits until the console reports the request finished,\nso a slow save such as an upload can't be sent twice. Only for forms the console submits.",
|
|
5392
5386
|
"type": "boolean"
|
|
5393
|
-
}
|
|
5394
|
-
],
|
|
5395
|
-
"events": [
|
|
5387
|
+
},
|
|
5396
5388
|
{
|
|
5397
|
-
"name": "
|
|
5398
|
-
"description": "
|
|
5389
|
+
"name": "hideUntilChanged",
|
|
5390
|
+
"description": "Hides the row until the form's values differ from when it loaded or was last saved, and hides it again once\nthey match.",
|
|
5391
|
+
"type": "boolean"
|
|
5399
5392
|
}
|
|
5400
|
-
]
|
|
5393
|
+
],
|
|
5394
|
+
"events": []
|
|
5401
5395
|
}
|
|
5402
5396
|
},
|
|
5403
5397
|
{
|
|
@@ -6211,7 +6205,7 @@
|
|
|
6211
6205
|
},
|
|
6212
6206
|
{
|
|
6213
6207
|
"name": "no-spin-buttons",
|
|
6214
|
-
"description": "Hides the
|
|
6208
|
+
"description": "Hides the increment/decrement buttons on number inputs *",
|
|
6215
6209
|
"value": { "type": "boolean", "default": "false" }
|
|
6216
6210
|
},
|
|
6217
6211
|
{
|
|
@@ -6526,7 +6520,7 @@
|
|
|
6526
6520
|
},
|
|
6527
6521
|
{
|
|
6528
6522
|
"name": "noSpinButtons",
|
|
6529
|
-
"description": "Hides the
|
|
6523
|
+
"description": "Hides the increment/decrement buttons on number inputs *",
|
|
6530
6524
|
"type": "boolean"
|
|
6531
6525
|
},
|
|
6532
6526
|
{
|
|
@@ -6960,7 +6954,7 @@
|
|
|
6960
6954
|
{ "name": "name", "value": { "type": "string", "default": "''" } },
|
|
6961
6955
|
{
|
|
6962
6956
|
"name": "value",
|
|
6963
|
-
"description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`.",
|
|
6957
|
+
"description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`. With `list`, the names as a JSON array,\nsuch as `[\"10.0.0.0/24\"]`.",
|
|
6964
6958
|
"value": { "type": "string", "default": "'{}'" }
|
|
6965
6959
|
},
|
|
6966
6960
|
{ "name": "label", "value": { "type": "string", "default": "''" } },
|
|
@@ -6985,6 +6979,19 @@
|
|
|
6985
6979
|
"description": "Passed to each value input, so its slash menu can insert merge fields.",
|
|
6986
6980
|
"value": { "type": "string", "default": "''" }
|
|
6987
6981
|
},
|
|
6982
|
+
{
|
|
6983
|
+
"name": "value-options",
|
|
6984
|
+
"description": "Makes each value a choice instead of free text: a JSON object of option values to labels, such as\n`{\"default\": \"System default\", \"auto\": \"Auto approve\"}`. New rows take the first option.",
|
|
6985
|
+
"value": {
|
|
6986
|
+
"type": "Record<string, string> | null",
|
|
6987
|
+
"default": "null"
|
|
6988
|
+
}
|
|
6989
|
+
},
|
|
6990
|
+
{
|
|
6991
|
+
"name": "list",
|
|
6992
|
+
"description": "Edits a plain list of names with no values, submitted as a JSON array.",
|
|
6993
|
+
"value": { "type": "boolean", "default": "false" }
|
|
6994
|
+
},
|
|
6988
6995
|
{ "name": "form", "value": { "type": "string", "default": "''" } },
|
|
6989
6996
|
{
|
|
6990
6997
|
"name": "disabled",
|
|
@@ -7012,7 +7019,12 @@
|
|
|
7012
7019
|
{ "name": "name", "type": "string" },
|
|
7013
7020
|
{
|
|
7014
7021
|
"name": "value",
|
|
7015
|
-
"description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`.",
|
|
7022
|
+
"description": "The pairs as a JSON object, such as `{\"1\": \"{{recipient.firstName}}\"}`. With `list`, the names as a JSON array,\nsuch as `[\"10.0.0.0/24\"]`.",
|
|
7023
|
+
"type": "string"
|
|
7024
|
+
},
|
|
7025
|
+
{
|
|
7026
|
+
"name": "defaultValue",
|
|
7027
|
+
"description": "The value a form reset restores, taken from the initial `value` attribute.",
|
|
7016
7028
|
"type": "string"
|
|
7017
7029
|
},
|
|
7018
7030
|
{ "name": "label", "type": "string" },
|
|
@@ -7025,6 +7037,16 @@
|
|
|
7025
7037
|
"description": "Passed to each value input, so its slash menu can insert merge fields.",
|
|
7026
7038
|
"type": "string"
|
|
7027
7039
|
},
|
|
7040
|
+
{
|
|
7041
|
+
"name": "valueOptions",
|
|
7042
|
+
"description": "Makes each value a choice instead of free text: a JSON object of option values to labels, such as\n`{\"default\": \"System default\", \"auto\": \"Auto approve\"}`. New rows take the first option.",
|
|
7043
|
+
"type": "Record<string, string> | null"
|
|
7044
|
+
},
|
|
7045
|
+
{
|
|
7046
|
+
"name": "list",
|
|
7047
|
+
"description": "Edits a plain list of names with no values, submitted as a JSON array.",
|
|
7048
|
+
"type": "boolean"
|
|
7049
|
+
},
|
|
7028
7050
|
{ "name": "form", "type": "string" },
|
|
7029
7051
|
{ "name": "disabled", "type": "boolean" },
|
|
7030
7052
|
{ "name": "validity", "type": "ValidityState" },
|
package/dist/zn.d.ts
CHANGED
|
@@ -2863,7 +2863,7 @@ declare module "components/input/input.component" {
|
|
|
2863
2863
|
passwordToggle: boolean;
|
|
2864
2864
|
/** Determines whether or no the password is currently visible. Only applies to password types **/
|
|
2865
2865
|
passwordVisible: boolean;
|
|
2866
|
-
/** Hides the
|
|
2866
|
+
/** Hides the increment/decrement buttons on number inputs **/
|
|
2867
2867
|
noSpinButtons: boolean;
|
|
2868
2868
|
/**
|
|
2869
2869
|
* The format a colour input writes its value in. Typing a colour in another format, or working in another format's
|
|
@@ -2980,6 +2980,9 @@ declare module "components/input/input.component" {
|
|
|
2980
2980
|
private handleInvalid;
|
|
2981
2981
|
private syncEmailDisplay;
|
|
2982
2982
|
private handleKeyDown;
|
|
2983
|
+
/** Whether the value has reached `limit`; `direction` 1 checks a maximum, -1 a minimum. */
|
|
2984
|
+
private isAtLimit;
|
|
2985
|
+
private handleStep;
|
|
2983
2986
|
private handlePasswordToggle;
|
|
2984
2987
|
private handleColorSwatchClick;
|
|
2985
2988
|
private openColorPanel;
|
|
@@ -3118,7 +3121,9 @@ declare module "internal/conditional" {
|
|
|
3118
3121
|
private conditionals;
|
|
3119
3122
|
private required;
|
|
3120
3123
|
private initiallyDisabled;
|
|
3124
|
+
private forms;
|
|
3121
3125
|
private readonly handleChange;
|
|
3126
|
+
private readonly handleReset;
|
|
3122
3127
|
constructor(host: ReactiveControllerHost & Element & ConditionalHost);
|
|
3123
3128
|
/** Call from the host's `firstUpdated()` to parse IDs, find elements, attach listeners, and run the initial check. */
|
|
3124
3129
|
setup(): void;
|
|
@@ -6342,6 +6347,7 @@ declare module "components/navbar/navbar.component" {
|
|
|
6342
6347
|
private _indicator;
|
|
6343
6348
|
private _indicatorFrame;
|
|
6344
6349
|
private _indicatorTab;
|
|
6350
|
+
private _indicatorStripWidth;
|
|
6345
6351
|
private _indicatorTarget;
|
|
6346
6352
|
private _expandable;
|
|
6347
6353
|
private readonly _lightDomClones;
|
|
@@ -8909,25 +8915,6 @@ declare module "components/form-actions/form-actions.component" {
|
|
|
8909
8915
|
import { type CSSResultGroup } from 'lit';
|
|
8910
8916
|
import ZincElement from "internal/zinc-element";
|
|
8911
8917
|
import ZnButton from "components/button/index";
|
|
8912
|
-
/**
|
|
8913
|
-
* @summary Standard action row for the bottom of a form. Renders a submit button by default; opt in to more
|
|
8914
|
-
* with `with-cancel` and `with-reset`.
|
|
8915
|
-
* @documentation https://zinc.style/components/form-actions
|
|
8916
|
-
* @status experimental
|
|
8917
|
-
* @since 1.0
|
|
8918
|
-
*
|
|
8919
|
-
* @dependency zn-button
|
|
8920
|
-
*
|
|
8921
|
-
* @event zn-cancel - Emitted when the cancel button is clicked.
|
|
8922
|
-
*
|
|
8923
|
-
* @slot - Extra actions, placed before the buttons. `align="start"` on a child moves it to the start of the row; any
|
|
8924
|
-
* number can sit on either side. Write them in the order they should be read — the sides are set by CSS ordering, so
|
|
8925
|
-
* markup order is what a keyboard follows.
|
|
8926
|
-
*
|
|
8927
|
-
* @csspart cancel-button - The cancel button.
|
|
8928
|
-
* @csspart reset-button - The reset button.
|
|
8929
|
-
* @csspart submit-button - The submit button.
|
|
8930
|
-
*/
|
|
8931
8918
|
export default class ZnFormActions extends ZincElement {
|
|
8932
8919
|
static styles: CSSResultGroup;
|
|
8933
8920
|
static dependencies: {
|
|
@@ -8956,10 +8943,27 @@ declare module "components/form-actions/form-actions.component" {
|
|
|
8956
8943
|
* so a slow save such as an upload can't be sent twice. Only for forms the console submits.
|
|
8957
8944
|
*/
|
|
8958
8945
|
loadingOnSubmit: boolean;
|
|
8946
|
+
/**
|
|
8947
|
+
* Hides the row until the form's values differ from when it loaded or was last saved, and hides it again once
|
|
8948
|
+
* they match.
|
|
8949
|
+
*/
|
|
8950
|
+
hideUntilChanged: boolean;
|
|
8959
8951
|
private submitting;
|
|
8960
8952
|
private watchedForm;
|
|
8953
|
+
private changeForm;
|
|
8954
|
+
private baseline;
|
|
8955
|
+
private interacted;
|
|
8961
8956
|
connectedCallback(): void;
|
|
8962
8957
|
disconnectedCallback(): void;
|
|
8958
|
+
/**
|
|
8959
|
+
* The form's values, compared against the baseline. Read from the controls directly, since building FormData runs
|
|
8960
|
+
* zinc controls' formdata handlers, which trim the value being typed.
|
|
8961
|
+
*/
|
|
8962
|
+
private snapshot;
|
|
8963
|
+
private checkForChanges;
|
|
8964
|
+
private markSaved;
|
|
8965
|
+
private refreshBaseline;
|
|
8966
|
+
private handleFormReset;
|
|
8963
8967
|
private handleFormSubmit;
|
|
8964
8968
|
private handleRequested;
|
|
8965
8969
|
private handleDone;
|
|
@@ -15108,6 +15112,8 @@ declare module "components/key-value/key-value.component" {
|
|
|
15108
15112
|
* @since 1.0
|
|
15109
15113
|
*
|
|
15110
15114
|
* @dependency zn-input
|
|
15115
|
+
* @dependency zn-select
|
|
15116
|
+
* @dependency zn-option
|
|
15111
15117
|
* @dependency zn-button
|
|
15112
15118
|
*
|
|
15113
15119
|
* @event zn-change - Emitted when a pair is added, removed or edited.
|
|
@@ -15123,8 +15129,13 @@ declare module "components/key-value/key-value.component" {
|
|
|
15123
15129
|
private readonly hasSlotController;
|
|
15124
15130
|
private readonly formControlController;
|
|
15125
15131
|
name: string;
|
|
15126
|
-
/**
|
|
15132
|
+
/**
|
|
15133
|
+
* The pairs as a JSON object, such as `{"1": "{{recipient.firstName}}"}`. With `list`, the names as a JSON array,
|
|
15134
|
+
* such as `["10.0.0.0/24"]`.
|
|
15135
|
+
*/
|
|
15127
15136
|
value: string;
|
|
15137
|
+
/** The value a form reset restores, taken from the initial `value` attribute. */
|
|
15138
|
+
defaultValue: string;
|
|
15128
15139
|
label: string;
|
|
15129
15140
|
helpText: string;
|
|
15130
15141
|
keyLabel: string;
|
|
@@ -15132,6 +15143,13 @@ declare module "components/key-value/key-value.component" {
|
|
|
15132
15143
|
addText: string;
|
|
15133
15144
|
/** Passed to each value input, so its slash menu can insert merge fields. */
|
|
15134
15145
|
slashItems: string;
|
|
15146
|
+
/**
|
|
15147
|
+
* Makes each value a choice instead of free text: a JSON object of option values to labels, such as
|
|
15148
|
+
* `{"default": "System default", "auto": "Auto approve"}`. New rows take the first option.
|
|
15149
|
+
*/
|
|
15150
|
+
valueOptions: Record<string, string> | null;
|
|
15151
|
+
/** Edits a plain list of names with no values, submitted as a JSON array. */
|
|
15152
|
+
list: boolean;
|
|
15135
15153
|
form: string;
|
|
15136
15154
|
disabled: boolean;
|
|
15137
15155
|
private _rows;
|
|
@@ -15142,10 +15160,18 @@ declare module "components/key-value/key-value.component" {
|
|
|
15142
15160
|
reportValidity(): boolean;
|
|
15143
15161
|
setCustomValidity(): void;
|
|
15144
15162
|
protected willUpdate(changed: PropertyValues): void;
|
|
15163
|
+
private get _defaultValue();
|
|
15164
|
+
private _emptyRow;
|
|
15165
|
+
private _withSpareRow;
|
|
15145
15166
|
private _parse;
|
|
15146
15167
|
private _serialise;
|
|
15147
15168
|
private _update;
|
|
15148
15169
|
private _edit;
|
|
15170
|
+
private get _reduceMotion();
|
|
15171
|
+
private _easing;
|
|
15172
|
+
private _add;
|
|
15173
|
+
private _remove;
|
|
15174
|
+
private _renderValue;
|
|
15149
15175
|
render(): import("lit-html").TemplateResult<1>;
|
|
15150
15176
|
}
|
|
15151
15177
|
}
|