@aquera/nile-elements 0.1.59 → 0.1.60
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/README.md +3 -0
- package/dist/index.js +2 -2
- package/dist/internal/form.cjs.js +1 -1
- package/dist/internal/form.cjs.js.map +1 -1
- package/dist/internal/form.esm.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +1 -1
- package/dist/src/internal/form.js +3 -3
- package/dist/src/internal/form.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.js +10 -1
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/internal/form.ts +3 -3
- package/src/nile-chip/nile-chip.ts +9 -1
package/package.json
CHANGED
package/src/internal/form.ts
CHANGED
@@ -89,7 +89,7 @@ export class FormControlController implements ReactiveController {
|
|
89
89
|
}
|
90
90
|
|
91
91
|
hostConnected() {
|
92
|
-
const form = this.options
|
92
|
+
const form = this.options?.form(this.host);
|
93
93
|
|
94
94
|
if (form) {
|
95
95
|
this.attachForm(form);
|
@@ -97,7 +97,7 @@ export class FormControlController implements ReactiveController {
|
|
97
97
|
|
98
98
|
// Listen for interactions
|
99
99
|
interactions.set(this.host, []);
|
100
|
-
this.options
|
100
|
+
this.options?.assumeInteractionOn.forEach(event => {
|
101
101
|
this.host.addEventListener(event, this.handleInteraction);
|
102
102
|
});
|
103
103
|
}
|
@@ -107,7 +107,7 @@ export class FormControlController implements ReactiveController {
|
|
107
107
|
|
108
108
|
// Clean up interactions
|
109
109
|
interactions.delete(this.host);
|
110
|
-
this.options
|
110
|
+
this.options?.assumeInteractionOn.forEach(event => {
|
111
111
|
this.host.removeEventListener(event, this.handleInteraction);
|
112
112
|
});
|
113
113
|
}
|
@@ -100,7 +100,15 @@ export class NileChip extends NileElement {
|
|
100
100
|
protected updated(changedProperties: PropertyValues): void {
|
101
101
|
super.updated(changedProperties);
|
102
102
|
if (changedProperties.has('autoCompleteOptions')) {
|
103
|
-
|
103
|
+
let options = this.autoCompleteOptions;
|
104
|
+
if (typeof options === 'string') {
|
105
|
+
try {
|
106
|
+
options = JSON.parse(options);
|
107
|
+
} catch (e) {
|
108
|
+
options = [];
|
109
|
+
}
|
110
|
+
}
|
111
|
+
this.filteredAutoCompleteOptions = Array.isArray(options) ? [...options] : [];
|
104
112
|
if (this.noDuplicates) {
|
105
113
|
this.filteredAutoCompleteOptions =
|
106
114
|
this.filteredAutoCompleteOptions.filter(
|