@aquera/nile-elements 0.0.11 → 0.0.13
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/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.d.ts +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.js +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/enum.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.d.ts +2 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js +52 -15
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.css.js +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.d.ts +4 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js +64 -17
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/document.d.ts +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/document.js +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/icons/svg/document.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +4 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.iife.js +41 -27
- package/dist/internal/enum.cjs.js +1 -1
- package/dist/internal/enum.cjs.js.map +1 -1
- package/dist/internal/enum.esm.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.esm.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.esm.js +11 -11
- package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.css.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.css.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.css.esm.js +3 -0
- package/dist/nile-dialog/nile-dialog.esm.js +14 -4
- package/dist/nile-icon/icons/svg/document.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/document.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/document.esm.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
- package/dist/nile-switcher/nile-switcher.esm.js +7 -6
- package/dist/src/internal/enum.d.ts +3 -0
- package/dist/src/internal/enum.js +3 -0
- package/dist/src/internal/enum.js.map +1 -1
- package/dist/src/nile-content-editor/nile-content-editor.css.js +1 -1
- package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
- package/dist/src/nile-content-editor/nile-content-editor.d.ts +2 -2
- package/dist/src/nile-content-editor/nile-content-editor.js +52 -15
- package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
- package/dist/src/nile-dialog/nile-dialog.css.js +3 -0
- package/dist/src/nile-dialog/nile-dialog.css.js.map +1 -1
- package/dist/src/nile-dialog/nile-dialog.d.ts +4 -0
- package/dist/src/nile-dialog/nile-dialog.js +64 -17
- package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/document.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/document.js +1 -1
- package/dist/src/nile-icon/icons/svg/document.js.map +1 -1
- package/dist/src/nile-switcher/nile-switcher.js +4 -3
- package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/internal/enum.ts +3 -0
- package/src/nile-content-editor/nile-content-editor.css.ts +1 -1
- package/src/nile-content-editor/nile-content-editor.ts +56 -21
- package/src/nile-dialog/nile-dialog.css.ts +3 -0
- package/src/nile-dialog/nile-dialog.ts +82 -24
- package/src/nile-icon/icons/svg/document.ts +1 -1
- package/src/nile-switcher/nile-switcher.ts +4 -2
package/package.json
CHANGED
package/src/internal/enum.ts
CHANGED
@@ -66,6 +66,7 @@ export class NileContentEditor extends NileElement {
|
|
66
66
|
|
67
67
|
connectedCallback() {
|
68
68
|
this.handleOutsideClick = this.handleOutsideClick.bind(this);
|
69
|
+
this.handleClipboardEvent = this.handleClipboardEvent.bind(this);
|
69
70
|
super.connectedCallback();
|
70
71
|
this.emit('nile-init');
|
71
72
|
this.addOpenListeners();
|
@@ -83,10 +84,38 @@ export class NileContentEditor extends NileElement {
|
|
83
84
|
|
84
85
|
addOpenListeners() {
|
85
86
|
window.addEventListener('click', this.handleOutsideClick);
|
87
|
+
window.addEventListener('cut', this.handleClipboardEvent);
|
88
|
+
window.addEventListener('copy', this.handleClipboardEvent);
|
89
|
+
window.addEventListener('paste', this.handleClipboardEvent);
|
86
90
|
}
|
87
91
|
|
88
92
|
removeOpenListeners() {
|
89
93
|
window.removeEventListener('click', this.handleOutsideClick);
|
94
|
+
window.removeEventListener('cut', this.handleClipboardEvent);
|
95
|
+
window.removeEventListener('copy', this.handleClipboardEvent);
|
96
|
+
window.removeEventListener('paste', this.handleClipboardEvent);
|
97
|
+
}
|
98
|
+
|
99
|
+
async handleClipboardEvent(event: Event) {
|
100
|
+
const selectedText = window?.getSelection()?.toString();
|
101
|
+
if (!!selectedText) {
|
102
|
+
switch (event.type) {
|
103
|
+
case 'cut':
|
104
|
+
case 'copy':
|
105
|
+
await navigator.clipboard.writeText(selectedText);
|
106
|
+
document.execCommand(event.type);
|
107
|
+
break;
|
108
|
+
case 'paste':
|
109
|
+
const pastedText = await navigator.clipboard.readText();
|
110
|
+
document.execCommand('insertText', false, pastedText);
|
111
|
+
break;
|
112
|
+
default:
|
113
|
+
break;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
setTimeout(() => {
|
117
|
+
this.emitInputChange();
|
118
|
+
});
|
90
119
|
}
|
91
120
|
|
92
121
|
toggleDropdown(value: boolean) {
|
@@ -110,20 +139,14 @@ export class NileContentEditor extends NileElement {
|
|
110
139
|
this.emit('nile-destroy');
|
111
140
|
}
|
112
141
|
|
113
|
-
handlePaste(event: ClipboardEvent) {
|
114
|
-
event.preventDefault();
|
115
|
-
if (event.clipboardData) {
|
116
|
-
let text = event.clipboardData.getData('text/plain');
|
117
|
-
document.execCommand('insertText', false, text);
|
118
|
-
}
|
119
|
-
this.emitInputChange();
|
120
|
-
}
|
121
|
-
|
122
142
|
private handlekeyDown(event: any) {
|
123
143
|
if (event.code === KeyCode.ENTER && this.type === 'text') {
|
124
144
|
event.preventDefault();
|
125
145
|
return;
|
126
146
|
}
|
147
|
+
if ([KeyCode.CUT, KeyCode.COPY, KeyCode.PASTE].includes(event.code)) {
|
148
|
+
return;
|
149
|
+
}
|
127
150
|
if (event.code === KeyCode.ESCAPE) {
|
128
151
|
event.preventDefault();
|
129
152
|
this.toggleDropdown(false);
|
@@ -133,8 +156,9 @@ export class NileContentEditor extends NileElement {
|
|
133
156
|
const value = this.contentEditor.innerText;
|
134
157
|
this.emitInputChange();
|
135
158
|
if (value.includes(this.tagIdentifier)) {
|
136
|
-
this.
|
159
|
+
this.insertNodes(this.contentEditor, this.contentEditor.childNodes);
|
137
160
|
this.filterOptions();
|
161
|
+
this.toggleDropdown(true);
|
138
162
|
} else {
|
139
163
|
this.toggleDropdown(false);
|
140
164
|
}
|
@@ -176,7 +200,6 @@ export class NileContentEditor extends NileElement {
|
|
176
200
|
emitInputChange(): void {
|
177
201
|
if (this.contentEditor) {
|
178
202
|
let fieldValue = this.contentEditor.innerHTML;
|
179
|
-
|
180
203
|
if (this.contentEditor.innerText !== '') {
|
181
204
|
fieldValue = this.generateValuesFromHTMLTags(fieldValue);
|
182
205
|
}
|
@@ -188,17 +211,29 @@ export class NileContentEditor extends NileElement {
|
|
188
211
|
}
|
189
212
|
}
|
190
213
|
|
191
|
-
insertNodes(parentNode: Node, childNodes: NodeList, autoOptionsTag
|
192
|
-
|
214
|
+
insertNodes(parentNode: Node, childNodes: NodeList, autoOptionsTag?: Node) {
|
215
|
+
[...childNodes].forEach((node: Node, index: number) => {
|
193
216
|
if (node.hasChildNodes()) {
|
194
|
-
|
217
|
+
if (autoOptionsTag) {
|
218
|
+
this.insertNodes(node, node.childNodes, autoOptionsTag);
|
219
|
+
} else {
|
220
|
+
this.insertNodes(node, node.childNodes);
|
221
|
+
}
|
195
222
|
} else {
|
196
223
|
if (node.nodeValue?.includes(this.tagIdentifier)) {
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
224
|
+
if (autoOptionsTag) {
|
225
|
+
parentNode.childNodes[index].nodeValue = node.nodeValue?.replace(
|
226
|
+
this.tagIdentifier + this.filteredValue,
|
227
|
+
''
|
228
|
+
);
|
229
|
+
parentNode.childNodes[index].after(autoOptionsTag);
|
230
|
+
}
|
231
|
+
this.filteredValue =
|
232
|
+
parentNode?.childNodes[index]?.nodeValue
|
233
|
+
?.split(this.tagIdentifier)
|
234
|
+
.slice(1)
|
235
|
+
.join() || '';
|
236
|
+
return;
|
202
237
|
}
|
203
238
|
}
|
204
239
|
});
|
@@ -250,6 +285,7 @@ export class NileContentEditor extends NileElement {
|
|
250
285
|
<nile-popup
|
251
286
|
.active="${live(this.openDropdown)}"
|
252
287
|
sync="width"
|
288
|
+
strategy="fixed"
|
253
289
|
placement="bottom"
|
254
290
|
class=${classMap({
|
255
291
|
dropdown: true,
|
@@ -261,7 +297,7 @@ export class NileContentEditor extends NileElement {
|
|
261
297
|
${this.showLabel && this.labelText
|
262
298
|
? html`<label class="ods-label">${this.labelText} </label> ${this
|
263
299
|
.required
|
264
|
-
? html`<
|
300
|
+
? html`<span class="asterik">*</span>`
|
265
301
|
: ''}`
|
266
302
|
: ''}
|
267
303
|
<div
|
@@ -273,7 +309,6 @@ export class NileContentEditor extends NileElement {
|
|
273
309
|
'text-area': type === 'text-area' ? true : false,
|
274
310
|
})}
|
275
311
|
@keydown=${this.handlekeyDown}
|
276
|
-
@paste=${this.handlePaste}
|
277
312
|
></div>
|
278
313
|
${hasHelpText
|
279
314
|
? html`
|
@@ -30,7 +30,6 @@ import NileElement from '../internal/nile-element';
|
|
30
30
|
*/
|
31
31
|
@customElement('nile-dialog')
|
32
32
|
export class NileDialog extends NileElement {
|
33
|
-
|
34
33
|
static styles: CSSResultGroup = styles;
|
35
34
|
|
36
35
|
private readonly hasSlotController = new HasSlotController(this, 'footer');
|
@@ -61,6 +60,16 @@ export class NileDialog extends NileElement {
|
|
61
60
|
|
62
61
|
@property({ type: Boolean, reflect: true }) preventOverlayClose = false;
|
63
62
|
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Added to resolve conflicts between Angular Material's mat-drawer components.
|
66
|
+
*/
|
67
|
+
private drawerStyle = `
|
68
|
+
<style id="drawer-style">
|
69
|
+
.mat-drawer.mat-drawer-side { z-index: 1; }
|
70
|
+
</style>
|
71
|
+
`;
|
72
|
+
|
64
73
|
connectedCallback() {
|
65
74
|
super.connectedCallback();
|
66
75
|
this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);
|
@@ -74,6 +83,7 @@ export class NileDialog extends NileElement {
|
|
74
83
|
this.addOpenListeners();
|
75
84
|
this.modal.activate();
|
76
85
|
lockBodyScrolling(this);
|
86
|
+
document.head.insertAdjacentHTML('beforeend', this.drawerStyle);
|
77
87
|
}
|
78
88
|
}
|
79
89
|
|
@@ -83,19 +93,20 @@ export class NileDialog extends NileElement {
|
|
83
93
|
}
|
84
94
|
|
85
95
|
private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {
|
86
|
-
|
87
96
|
const nileRequestClose = this.emit('nile-request-close', {
|
88
97
|
cancelable: true,
|
89
|
-
detail: { source }
|
98
|
+
detail: { source },
|
90
99
|
});
|
91
100
|
|
92
|
-
if(source === 'close-button'){
|
101
|
+
if (source === 'close-button') {
|
93
102
|
this.hide();
|
94
103
|
return;
|
95
104
|
}
|
96
105
|
|
97
|
-
if (nileRequestClose.defaultPrevented || this.preventOverlayClose
|
98
|
-
const animation = getAnimation(this, 'dialog.denyClose', {
|
106
|
+
if (nileRequestClose.defaultPrevented || this.preventOverlayClose) {
|
107
|
+
const animation = getAnimation(this, 'dialog.denyClose', {
|
108
|
+
dir: 'right',
|
109
|
+
});
|
99
110
|
animateTo(this.panel, animation.keyframes, animation.options);
|
100
111
|
return;
|
101
112
|
}
|
@@ -121,12 +132,11 @@ export class NileDialog extends NileElement {
|
|
121
132
|
@watch('open', { waitUntilFirstUpdate: true })
|
122
133
|
async handleOpenChange() {
|
123
134
|
if (this.open) {
|
124
|
-
// Show
|
125
135
|
this.emit('nile-show');
|
126
136
|
this.addOpenListeners();
|
127
137
|
this.originalTrigger = document.activeElement as HTMLElement;
|
128
138
|
this.modal.activate();
|
129
|
-
|
139
|
+
document.head.insertAdjacentHTML('beforeend', this.drawerStyle);
|
130
140
|
lockBodyScrolling(this);
|
131
141
|
|
132
142
|
// When the dialog is shown, Safari will attempt to set focus on whatever element has autofocus. This can cause
|
@@ -140,17 +150,24 @@ export class NileDialog extends NileElement {
|
|
140
150
|
autoFocusTarget.removeAttribute('autofocus');
|
141
151
|
}
|
142
152
|
|
143
|
-
await Promise.all([
|
153
|
+
await Promise.all([
|
154
|
+
stopAnimations(this.dialog),
|
155
|
+
stopAnimations(this.overlay),
|
156
|
+
]);
|
144
157
|
this.dialog.hidden = false;
|
145
158
|
|
146
159
|
// Set initial focus
|
147
160
|
requestAnimationFrame(() => {
|
148
|
-
const nileInitialFocus = this.emit('nile-initial-focus', {
|
161
|
+
const nileInitialFocus = this.emit('nile-initial-focus', {
|
162
|
+
cancelable: true,
|
163
|
+
});
|
149
164
|
|
150
165
|
if (!nileInitialFocus.defaultPrevented) {
|
151
166
|
// Set focus to the autofocus target and restore the attribute
|
152
167
|
if (autoFocusTarget) {
|
153
|
-
(autoFocusTarget as HTMLInputElement).focus({
|
168
|
+
(autoFocusTarget as HTMLInputElement).focus({
|
169
|
+
preventScroll: true,
|
170
|
+
});
|
154
171
|
} else {
|
155
172
|
this.panel.focus({ preventScroll: true });
|
156
173
|
}
|
@@ -162,11 +179,19 @@ export class NileDialog extends NileElement {
|
|
162
179
|
}
|
163
180
|
});
|
164
181
|
|
165
|
-
const panelAnimation = getAnimation(this, 'dialog.show', {
|
166
|
-
|
182
|
+
const panelAnimation = getAnimation(this, 'dialog.show', {
|
183
|
+
dir: 'right',
|
184
|
+
});
|
185
|
+
const overlayAnimation = getAnimation(this, 'dialog.overlay.show', {
|
186
|
+
dir: 'right',
|
187
|
+
});
|
167
188
|
await Promise.all([
|
168
189
|
animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),
|
169
|
-
animateTo(
|
190
|
+
animateTo(
|
191
|
+
this.overlay,
|
192
|
+
overlayAnimation.keyframes,
|
193
|
+
overlayAnimation.options
|
194
|
+
),
|
170
195
|
]);
|
171
196
|
|
172
197
|
this.emit('nile-after-show');
|
@@ -176,20 +201,39 @@ export class NileDialog extends NileElement {
|
|
176
201
|
this.removeOpenListeners();
|
177
202
|
this.modal.deactivate();
|
178
203
|
|
179
|
-
await Promise.all([
|
180
|
-
|
181
|
-
|
204
|
+
await Promise.all([
|
205
|
+
stopAnimations(this.dialog),
|
206
|
+
stopAnimations(this.overlay),
|
207
|
+
]);
|
208
|
+
const panelAnimation = getAnimation(this, 'dialog.hide', {
|
209
|
+
dir: 'right',
|
210
|
+
});
|
211
|
+
const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', {
|
212
|
+
dir: 'right',
|
213
|
+
});
|
182
214
|
|
215
|
+
const styleTag = document.getElementById('drawer-style');
|
216
|
+
if (styleTag) {
|
217
|
+
document.head.removeChild(styleTag);
|
218
|
+
}
|
183
219
|
// Animate the overlay and the panel at the same time. Because animation durations might be different, we need to
|
184
220
|
// hide each one individually when the animation finishes, otherwise the first one that finishes will reappear
|
185
221
|
// unexpectedly. We'll unhide them after all animations have completed.
|
186
222
|
await Promise.all([
|
187
|
-
animateTo(
|
223
|
+
animateTo(
|
224
|
+
this.overlay,
|
225
|
+
overlayAnimation.keyframes,
|
226
|
+
overlayAnimation.options
|
227
|
+
).then(() => {
|
188
228
|
this.overlay.hidden = true;
|
189
229
|
}),
|
190
|
-
animateTo(
|
230
|
+
animateTo(
|
231
|
+
this.panel,
|
232
|
+
panelAnimation.keyframes,
|
233
|
+
panelAnimation.options
|
234
|
+
).then(() => {
|
191
235
|
this.panel.hidden = true;
|
192
|
-
})
|
236
|
+
}),
|
193
237
|
]);
|
194
238
|
|
195
239
|
this.dialog.hidden = true;
|
@@ -237,10 +281,15 @@ export class NileDialog extends NileElement {
|
|
237
281
|
class=${classMap({
|
238
282
|
dialog: true,
|
239
283
|
'dialog--open': this.open,
|
240
|
-
'dialog--has-footer': this.hasSlotController.test('footer')
|
284
|
+
'dialog--has-footer': this.hasSlotController.test('footer'),
|
241
285
|
})}
|
242
286
|
>
|
243
|
-
<div
|
287
|
+
<div
|
288
|
+
part="overlay"
|
289
|
+
class="dialog__overlay"
|
290
|
+
@click=${() => this.requestClose('overlay')}
|
291
|
+
tabindex="-1"
|
292
|
+
></div>
|
244
293
|
|
245
294
|
<div
|
246
295
|
part="panel"
|
@@ -256,7 +305,11 @@ export class NileDialog extends NileElement {
|
|
256
305
|
? html`
|
257
306
|
<header part="header" class="dialog__header">
|
258
307
|
<h2 part="title" class="dialog__title" id="title">
|
259
|
-
<slot name="label">
|
308
|
+
<slot name="label">
|
309
|
+
${this.label.length > 0
|
310
|
+
? this.label
|
311
|
+
: String.fromCharCode(65279)}
|
312
|
+
</slot>
|
260
313
|
</h2>
|
261
314
|
<div part="header-actions" class="dialog__header-actions">
|
262
315
|
<slot name="header-actions"></slot>
|
@@ -274,7 +327,12 @@ export class NileDialog extends NileElement {
|
|
274
327
|
`
|
275
328
|
: ''}
|
276
329
|
|
277
|
-
<slot
|
330
|
+
<slot
|
331
|
+
part="body"
|
332
|
+
class="dialog__body ${this.noHeader
|
333
|
+
? 'dialog__body-noheader'
|
334
|
+
: ''}"
|
335
|
+
></slot>
|
278
336
|
|
279
337
|
<footer part="footer" class="dialog__footer">
|
280
338
|
<slot name="footer"></slot>
|
@@ -2,4 +2,4 @@
|
|
2
2
|
* Do not edit directly
|
3
3
|
*/
|
4
4
|
|
5
|
-
export default "
|
5
|
+
export default "PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTMuNzUgNS43MzgyOEMzLjc1IDQuNDk1NjQgNC43NTczNiAzLjQ4ODI4IDYgMy40ODgyOEgxMy4zNzVWNS43MzgyOEMxMy4zNzUgNy44MDkzNSAxNS4wNTM5IDkuNDg4MjggMTcuMTI1IDkuNDg4MjhIMjAuMjVWMTkuNzM4M0MyMC4yNSAyMC45ODA5IDE5LjI0MjYgMjEuOTg4MyAxOCAyMS45ODgzSDZDNC43NTczNiAyMS45ODgzIDMuNzUgMjAuOTgwOSAzLjc1IDE5LjczODNWNS43MzgyOFpNMTkgNy45ODgyOEwxNC44NzUgNC4zODgyOFY1LjczODI4QzE0Ljg3NSA2Ljk4MDkyIDE1Ljg4MjQgNy45ODgyOCAxNy4xMjUgNy45ODgyOEgxOVpNNiAxLjk4ODI4QzMuOTI4OTMgMS45ODgyOCAyLjI1IDMuNjY3MjEgMi4yNSA1LjczODI4VjE5LjczODNDMi4yNSAyMS44MDkzIDMuOTI4OTMgMjMuNDg4MyA2IDIzLjQ4ODNIMThDMjAuMDcxMSAyMy40ODgzIDIxLjc1IDIxLjgwOTMgMjEuNzUgMTkuNzM4M1Y4LjM5NzM3TDE0LjQwNjIgMS45ODgyOEg2Wk02IDE4LjQ4ODNMMTggMTguNDg4M1YxNi45ODgzTDYgMTYuOTg4M0w2IDE4LjQ4ODNaTTE4IDE0LjIzODNMNiAxNC4yMzgzTDYgMTIuNzM4M0wxOCAxMi43MzgzVjE0LjIzODNaTTYgMTAuMjM4M0gxMVY4LjczODI4TDYgOC43MzgyOEw2IDEwLjIzODNaIiBmaWxsPSJibGFjayIvPjwvc3ZnPg==";
|
@@ -98,6 +98,7 @@ export class NileSwitcher extends NileElement {
|
|
98
98
|
placeholder,
|
99
99
|
disabled,
|
100
100
|
required,
|
101
|
+
error,
|
101
102
|
errorMessage,
|
102
103
|
inputType: inputTypeName,
|
103
104
|
} = Input;
|
@@ -108,7 +109,7 @@ export class NileSwitcher extends NileElement {
|
|
108
109
|
.required=${required}
|
109
110
|
.errorMessage=${errorMessage}
|
110
111
|
.placeholder=${placeholder}
|
111
|
-
.error=${
|
112
|
+
.error=${error}
|
112
113
|
@nile-input=${(e: CustomEvent) => {
|
113
114
|
this.handleChange(e, inputType, inputTypeName);
|
114
115
|
}}
|
@@ -138,10 +139,11 @@ export class NileSwitcher extends NileElement {
|
|
138
139
|
}
|
139
140
|
|
140
141
|
renderNileTextArea(Input: switchInputType, inputType: string) {
|
141
|
-
const { value, disabled, inputType: inputTypeName } = Input;
|
142
|
+
const { value, disabled, readonly, inputType: inputTypeName } = Input;
|
142
143
|
return html`<nile-textarea
|
143
144
|
.value=${value}
|
144
145
|
.disabled=${disabled}
|
146
|
+
?readonly=${readonly}
|
145
147
|
@nile-input=${(e: CustomEvent) => {
|
146
148
|
this.handleChange(e, inputType, inputTypeName);
|
147
149
|
}}
|