@umbraco-ui/uui-input-lock 1.8.0 → 1.9.0-rc.0
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/lib/UUIInputLockEvent.d.ts +6 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +15 -3
- package/package.json +6 -6
|
@@ -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.d.ts
CHANGED
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
|
|
@@ -70,4 +82,4 @@ UUIInputLockElement = __decorateClass([
|
|
|
70
82
|
defineElement("uui-input-lock")
|
|
71
83
|
], UUIInputLockElement);
|
|
72
84
|
|
|
73
|
-
export { UUIInputLockElement };
|
|
85
|
+
export { UUIInputLockElement, UUIInputLockEvent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umbraco-ui/uui-input-lock",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0-rc.0",
|
|
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.
|
|
34
|
-
"@umbraco-ui/uui-button": "1.
|
|
35
|
-
"@umbraco-ui/uui-icon": "1.
|
|
36
|
-
"@umbraco-ui/uui-input": "1.
|
|
33
|
+
"@umbraco-ui/uui-base": "1.9.0-rc.0",
|
|
34
|
+
"@umbraco-ui/uui-button": "1.9.0-rc.0",
|
|
35
|
+
"@umbraco-ui/uui-icon": "1.9.0-rc.0",
|
|
36
|
+
"@umbraco-ui/uui-input": "1.9.0-rc.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": "e3e398e07b6ff9874aa0656cb7767df42f58a4ce"
|
|
48
48
|
}
|