@umbraco-ui/uui-input-lock 1.8.0-rc.2 → 1.8.2
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/custom-elements.json +2 -2
- package/lib/UUIInputLockEvent.d.ts +6 -0
- package/lib/index.js +14 -2
- package/package.json +6 -6
package/custom-elements.json
CHANGED
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"name": "pristine",
|
|
122
122
|
"description": "Determines wether the form control has been touched or interacted with, this determines wether the validation-status of this form control should be made visible.",
|
|
123
123
|
"type": "boolean",
|
|
124
|
-
"default": "\"
|
|
124
|
+
"default": "\"true\""
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
"name": "required",
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
"attribute": "pristine",
|
|
302
302
|
"description": "Determines wether the form control has been touched or interacted with, this determines wether the validation-status of this form control should be made visible.",
|
|
303
303
|
"type": "boolean",
|
|
304
|
-
"default": "\"
|
|
304
|
+
"default": "\"true\""
|
|
305
305
|
},
|
|
306
306
|
{
|
|
307
307
|
"name": "required",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
|
|
2
|
+
import { UUIInputLockElement } from './uui-input-lock.element';
|
|
3
|
+
export declare class UUIInputLockEvent extends UUIEvent<{}, UUIInputLockElement> {
|
|
4
|
+
static readonly LOCK_CHANGE: string;
|
|
5
|
+
constructor(evName: string, eventInit?: any | null);
|
|
6
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -4,6 +4,17 @@ import { css, html } from 'lit';
|
|
|
4
4
|
import { UUIInputElement } from '@umbraco-ui/uui-input/lib';
|
|
5
5
|
import { iconLock, iconUnlock } from '@umbraco-ui/uui-icon-registry-essential/lib/svgs';
|
|
6
6
|
import { property } from 'lit/decorators.js';
|
|
7
|
+
import { UUIEvent } from '@umbraco-ui/uui-base/lib/events';
|
|
8
|
+
|
|
9
|
+
class UUIInputLockEvent extends UUIEvent {
|
|
10
|
+
constructor(evName, eventInit = {}) {
|
|
11
|
+
super(evName, {
|
|
12
|
+
...{ bubbles: true },
|
|
13
|
+
...eventInit
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
UUIInputLockEvent.LOCK_CHANGE = "lock-change";
|
|
7
18
|
|
|
8
19
|
var __defProp = Object.defineProperty;
|
|
9
20
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -12,8 +23,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
12
23
|
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
24
|
if (decorator = decorators[i])
|
|
14
25
|
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
-
if (kind && result)
|
|
16
|
-
__defProp(target, key, result);
|
|
26
|
+
if (kind && result) __defProp(target, key, result);
|
|
17
27
|
return result;
|
|
18
28
|
};
|
|
19
29
|
let UUIInputLockElement = class extends UUIInputElement {
|
|
@@ -29,6 +39,8 @@ let UUIInputLockElement = class extends UUIInputElement {
|
|
|
29
39
|
}
|
|
30
40
|
_onLockToggle() {
|
|
31
41
|
this.readonly = this.locked = !this.locked;
|
|
42
|
+
this.pristine = false;
|
|
43
|
+
this.dispatchEvent(new UUIInputLockEvent(UUIInputLockEvent.LOCK_CHANGE));
|
|
32
44
|
}
|
|
33
45
|
renderIcon() {
|
|
34
46
|
return this.locked === true ? html`<uui-icon name="lock" .fallback=${iconLock.strings[0]}></uui-icon>` : html`<uui-icon
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-input-lock",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Umbraco",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"custom-elements.json"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@umbraco-ui/uui-base": "1.8.0
|
|
34
|
-
"@umbraco-ui/uui-button": "1.8.0
|
|
35
|
-
"@umbraco-ui/uui-icon": "1.8.0
|
|
36
|
-
"@umbraco-ui/uui-input": "1.8.0
|
|
33
|
+
"@umbraco-ui/uui-base": "1.8.0",
|
|
34
|
+
"@umbraco-ui/uui-button": "1.8.0",
|
|
35
|
+
"@umbraco-ui/uui-icon": "1.8.0",
|
|
36
|
+
"@umbraco-ui/uui-input": "1.8.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://uui.umbraco.com/?path=/story/uui-input-lock",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "ff7f8bf2e837773d2a73d4ca5eb9b67857b3dd8b"
|
|
48
48
|
}
|