@mmlogic/components 0.1.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.
Files changed (159) hide show
  1. package/README.md +221 -0
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  3. package/dist/cjs/format-CDw-zie_.js +82 -0
  4. package/dist/cjs/index-OvnIRO4Y.js +1523 -0
  5. package/dist/cjs/index.cjs.js +32 -0
  6. package/dist/cjs/loader.cjs.js +13 -0
  7. package/dist/cjs/mosterdcomponents.cjs.js +25 -0
  8. package/dist/cjs/mrd-boolean-field_16.cjs.entry.js +1185 -0
  9. package/dist/cjs/mrd-table.cjs.entry.js +322 -0
  10. package/dist/cjs/quill-DmFfnC1f.js +16272 -0
  11. package/dist/collection/collection-manifest.json +29 -0
  12. package/dist/collection/components/mrd-boolean-field/mrd-boolean-field.js +199 -0
  13. package/dist/collection/components/mrd-boolean-field/mrd-boolean-field.scss +77 -0
  14. package/dist/collection/components/mrd-currency-field/mrd-currency-field.js +248 -0
  15. package/dist/collection/components/mrd-currency-field/mrd-currency-field.scss +100 -0
  16. package/dist/collection/components/mrd-date-field/mrd-date-field.js +206 -0
  17. package/dist/collection/components/mrd-date-field/mrd-date-field.scss +66 -0
  18. package/dist/collection/components/mrd-datetime-field/mrd-datetime-field.js +206 -0
  19. package/dist/collection/components/mrd-datetime-field/mrd-datetime-field.scss +66 -0
  20. package/dist/collection/components/mrd-email-field/mrd-email-field.js +230 -0
  21. package/dist/collection/components/mrd-email-field/mrd-email-field.scss +69 -0
  22. package/dist/collection/components/mrd-field/mrd-field.js +187 -0
  23. package/dist/collection/components/mrd-file-field/mrd-file-field.js +273 -0
  24. package/dist/collection/components/mrd-file-field/mrd-file-field.scss +140 -0
  25. package/dist/collection/components/mrd-form/mrd-form.js +245 -0
  26. package/dist/collection/components/mrd-form/mrd-form.scss +116 -0
  27. package/dist/collection/components/mrd-hyperlink-field/mrd-hyperlink-field.js +230 -0
  28. package/dist/collection/components/mrd-hyperlink-field/mrd-hyperlink-field.scss +69 -0
  29. package/dist/collection/components/mrd-image-field/mrd-image-field.js +287 -0
  30. package/dist/collection/components/mrd-image-field/mrd-image-field.scss +166 -0
  31. package/dist/collection/components/mrd-list-field/mrd-list-field.js +311 -0
  32. package/dist/collection/components/mrd-list-field/mrd-list-field.scss +109 -0
  33. package/dist/collection/components/mrd-number-field/mrd-number-field.js +316 -0
  34. package/dist/collection/components/mrd-number-field/mrd-number-field.scss +77 -0
  35. package/dist/collection/components/mrd-relation-field/mrd-relation-field.js +490 -0
  36. package/dist/collection/components/mrd-relation-field/mrd-relation-field.scss +266 -0
  37. package/dist/collection/components/mrd-table/mrd-table.js +522 -0
  38. package/dist/collection/components/mrd-table/mrd-table.scss +158 -0
  39. package/dist/collection/components/mrd-text-field/mrd-text-field.js +227 -0
  40. package/dist/collection/components/mrd-text-field/mrd-text-field.scss +69 -0
  41. package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +267 -0
  42. package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.scss +79 -0
  43. package/dist/collection/components/mrd-time-field/mrd-time-field.js +206 -0
  44. package/dist/collection/components/mrd-time-field/mrd-time-field.scss +66 -0
  45. package/dist/collection/index.js +1 -0
  46. package/dist/collection/types/client-layout.js +30 -0
  47. package/dist/collection/types/index.js +1 -0
  48. package/dist/collection/utils/cell-renderer.js +57 -0
  49. package/dist/collection/utils/format.js +72 -0
  50. package/dist/collection/utils/i18n.js +80 -0
  51. package/dist/collection/utils/validation.js +46 -0
  52. package/dist/components/client-layout.js +1 -0
  53. package/dist/components/format.js +1 -0
  54. package/dist/components/i18n.js +1 -0
  55. package/dist/components/index.d.ts +35 -0
  56. package/dist/components/index.js +1 -0
  57. package/dist/components/mrd-boolean-field.d.ts +11 -0
  58. package/dist/components/mrd-boolean-field.js +1 -0
  59. package/dist/components/mrd-boolean-field2.js +1 -0
  60. package/dist/components/mrd-currency-field.d.ts +11 -0
  61. package/dist/components/mrd-currency-field.js +1 -0
  62. package/dist/components/mrd-currency-field2.js +1 -0
  63. package/dist/components/mrd-date-field.d.ts +11 -0
  64. package/dist/components/mrd-date-field.js +1 -0
  65. package/dist/components/mrd-date-field2.js +1 -0
  66. package/dist/components/mrd-datetime-field.d.ts +11 -0
  67. package/dist/components/mrd-datetime-field.js +1 -0
  68. package/dist/components/mrd-datetime-field2.js +1 -0
  69. package/dist/components/mrd-email-field.d.ts +11 -0
  70. package/dist/components/mrd-email-field.js +1 -0
  71. package/dist/components/mrd-email-field2.js +1 -0
  72. package/dist/components/mrd-field.d.ts +11 -0
  73. package/dist/components/mrd-field.js +1 -0
  74. package/dist/components/mrd-field2.js +1 -0
  75. package/dist/components/mrd-file-field.d.ts +11 -0
  76. package/dist/components/mrd-file-field.js +1 -0
  77. package/dist/components/mrd-file-field2.js +1 -0
  78. package/dist/components/mrd-form.d.ts +11 -0
  79. package/dist/components/mrd-form.js +1 -0
  80. package/dist/components/mrd-hyperlink-field.d.ts +11 -0
  81. package/dist/components/mrd-hyperlink-field.js +1 -0
  82. package/dist/components/mrd-hyperlink-field2.js +1 -0
  83. package/dist/components/mrd-image-field.d.ts +11 -0
  84. package/dist/components/mrd-image-field.js +1 -0
  85. package/dist/components/mrd-image-field2.js +1 -0
  86. package/dist/components/mrd-list-field.d.ts +11 -0
  87. package/dist/components/mrd-list-field.js +1 -0
  88. package/dist/components/mrd-list-field2.js +1 -0
  89. package/dist/components/mrd-number-field.d.ts +11 -0
  90. package/dist/components/mrd-number-field.js +1 -0
  91. package/dist/components/mrd-number-field2.js +1 -0
  92. package/dist/components/mrd-relation-field.d.ts +11 -0
  93. package/dist/components/mrd-relation-field.js +1 -0
  94. package/dist/components/mrd-relation-field2.js +1 -0
  95. package/dist/components/mrd-table.d.ts +11 -0
  96. package/dist/components/mrd-table.js +1 -0
  97. package/dist/components/mrd-text-field.d.ts +11 -0
  98. package/dist/components/mrd-text-field.js +1 -0
  99. package/dist/components/mrd-text-field2.js +1 -0
  100. package/dist/components/mrd-textarea-field.d.ts +11 -0
  101. package/dist/components/mrd-textarea-field.js +1 -0
  102. package/dist/components/mrd-textarea-field2.js +1 -0
  103. package/dist/components/mrd-time-field.d.ts +11 -0
  104. package/dist/components/mrd-time-field.js +1 -0
  105. package/dist/components/mrd-time-field2.js +1 -0
  106. package/dist/components/quill.js +1 -0
  107. package/dist/components/validation.js +1 -0
  108. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  109. package/dist/esm/format-Dt-aHxkM.js +74 -0
  110. package/dist/esm/index-DQ_he8te.js +1514 -0
  111. package/dist/esm/index.js +32 -0
  112. package/dist/esm/loader.js +11 -0
  113. package/dist/esm/mosterdcomponents.js +21 -0
  114. package/dist/esm/mrd-boolean-field_16.entry.js +1168 -0
  115. package/dist/esm/mrd-table.entry.js +320 -0
  116. package/dist/esm/quill-CiuCgGz_.js +16266 -0
  117. package/dist/index.cjs.js +1 -0
  118. package/dist/index.js +1 -0
  119. package/dist/mosterdcomponents/index.esm.js +1 -0
  120. package/dist/mosterdcomponents/mosterdcomponents.css +1 -0
  121. package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -0
  122. package/dist/mosterdcomponents/p-88cd0930.entry.js +1 -0
  123. package/dist/mosterdcomponents/p-926ed331.entry.js +1 -0
  124. package/dist/mosterdcomponents/p-CiuCgGz_.js +1 -0
  125. package/dist/mosterdcomponents/p-DQ_he8te.js +2 -0
  126. package/dist/mosterdcomponents/p-DQuL1Twl.js +1 -0
  127. package/dist/mosterdcomponents/p-Dt-aHxkM.js +1 -0
  128. package/dist/types/components/mrd-boolean-field/mrd-boolean-field.d.ts +22 -0
  129. package/dist/types/components/mrd-currency-field/mrd-currency-field.d.ts +26 -0
  130. package/dist/types/components/mrd-date-field/mrd-date-field.d.ts +21 -0
  131. package/dist/types/components/mrd-datetime-field/mrd-datetime-field.d.ts +21 -0
  132. package/dist/types/components/mrd-email-field/mrd-email-field.d.ts +22 -0
  133. package/dist/types/components/mrd-field/mrd-field.d.ts +23 -0
  134. package/dist/types/components/mrd-file-field/mrd-file-field.d.ts +30 -0
  135. package/dist/types/components/mrd-form/mrd-form.d.ts +24 -0
  136. package/dist/types/components/mrd-hyperlink-field/mrd-hyperlink-field.d.ts +22 -0
  137. package/dist/types/components/mrd-image-field/mrd-image-field.d.ts +31 -0
  138. package/dist/types/components/mrd-list-field/mrd-list-field.d.ts +28 -0
  139. package/dist/types/components/mrd-number-field/mrd-number-field.d.ts +29 -0
  140. package/dist/types/components/mrd-relation-field/mrd-relation-field.d.ts +44 -0
  141. package/dist/types/components/mrd-table/mrd-table.d.ts +72 -0
  142. package/dist/types/components/mrd-text-field/mrd-text-field.d.ts +22 -0
  143. package/dist/types/components/mrd-textarea-field/mrd-textarea-field.d.ts +25 -0
  144. package/dist/types/components/mrd-time-field/mrd-time-field.d.ts +21 -0
  145. package/dist/types/components.d.ts +1609 -0
  146. package/dist/types/index.d.ts +1 -0
  147. package/dist/types/stencil-public-runtime.d.ts +1860 -0
  148. package/dist/types/types/client-layout.d.ts +76 -0
  149. package/dist/types/types/index.d.ts +1 -0
  150. package/dist/types/utils/cell-renderer.d.ts +14 -0
  151. package/dist/types/utils/format.d.ts +7 -0
  152. package/dist/types/utils/i18n.d.ts +1 -0
  153. package/dist/types/utils/validation.d.ts +5 -0
  154. package/loader/cdn.js +1 -0
  155. package/loader/index.cjs.js +1 -0
  156. package/loader/index.d.ts +24 -0
  157. package/loader/index.es2017.js +1 -0
  158. package/loader/index.js +2 -0
  159. package/package.json +54 -0
@@ -0,0 +1,490 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { t } from "../../utils/i18n";
3
+ import { validateRequired } from "../../utils/validation";
4
+ import { ClientLayoutItemRelationDisplayType } from "../../types";
5
+ export class MrdRelationField {
6
+ constructor() {
7
+ this.name = '';
8
+ this.label = '';
9
+ this.required = false;
10
+ this.disabled = false;
11
+ this.locale = navigator.language;
12
+ this.relatedClass = '';
13
+ this.displayType = ClientLayoutItemRelationDisplayType.SEARCH;
14
+ this.multiple = false;
15
+ this.dropdownValues = [];
16
+ this.value = null;
17
+ this.searchQuery = '';
18
+ this.searchResults = [];
19
+ this.isLoading = false;
20
+ this.selectedItems = [];
21
+ this.showResults = false;
22
+ this.error = '';
23
+ this.highlightedIndex = -1;
24
+ this.searchDebounce = null;
25
+ this.handleKeyDown = (e) => {
26
+ if (!this.showResults || this.searchResults.length === 0) {
27
+ if (e.key === 'Escape') {
28
+ this.showResults = false;
29
+ this.highlightedIndex = -1;
30
+ }
31
+ return;
32
+ }
33
+ if (e.key === 'ArrowDown') {
34
+ e.preventDefault();
35
+ this.highlightedIndex = Math.min(this.highlightedIndex + 1, this.searchResults.length - 1);
36
+ }
37
+ else if (e.key === 'ArrowUp') {
38
+ e.preventDefault();
39
+ this.highlightedIndex = Math.max(this.highlightedIndex - 1, 0);
40
+ }
41
+ else if (e.key === 'Enter') {
42
+ e.preventDefault();
43
+ if (this.highlightedIndex >= 0) {
44
+ this.handleResultSelect(this.searchResults[this.highlightedIndex]);
45
+ }
46
+ }
47
+ else if (e.key === 'Escape') {
48
+ this.showResults = false;
49
+ this.highlightedIndex = -1;
50
+ }
51
+ };
52
+ this.clearSelection = () => {
53
+ this.selectedItems = [];
54
+ this.searchQuery = '';
55
+ this.searchResults = [];
56
+ this.showResults = false;
57
+ this.highlightedIndex = -1;
58
+ this.mrdChange.emit({ name: this.name, value: this.multiple ? [] : null });
59
+ };
60
+ this.handleSearchInput = (e) => {
61
+ const query = e.target.value;
62
+ this.searchQuery = query;
63
+ if (this.searchDebounce)
64
+ clearTimeout(this.searchDebounce);
65
+ if (query.trim().length >= 2) {
66
+ this.isLoading = true;
67
+ this.showResults = true;
68
+ this.searchDebounce = setTimeout(() => {
69
+ this.mrdSearch.emit({ query, relatedClass: this.relatedClass });
70
+ }, 300);
71
+ }
72
+ else {
73
+ this.searchResults = [];
74
+ this.showResults = false;
75
+ this.isLoading = false;
76
+ }
77
+ };
78
+ this.handleResultSelect = (result) => {
79
+ if (this.multiple) {
80
+ if (!this.selectedItems.find(i => i.id === result.id)) {
81
+ this.selectedItems = [...this.selectedItems, result];
82
+ }
83
+ this.searchQuery = '';
84
+ this.searchResults = [];
85
+ this.showResults = false;
86
+ const ids = this.selectedItems.map(i => i.id);
87
+ this.mrdChange.emit({ name: this.name, value: ids });
88
+ }
89
+ else {
90
+ this.selectedItems = [result];
91
+ this.searchQuery = result.label;
92
+ this.showResults = false;
93
+ this.mrdChange.emit({ name: this.name, value: result.id });
94
+ }
95
+ if (this.required && !validateRequired(this.selectedItems)) {
96
+ this.error = t('required', this.locale);
97
+ }
98
+ else {
99
+ this.error = '';
100
+ }
101
+ };
102
+ this.handleRemoveSelected = (id) => {
103
+ this.selectedItems = this.selectedItems.filter(i => i.id !== id);
104
+ const ids = this.selectedItems.map(i => i.id);
105
+ this.mrdChange.emit({ name: this.name, value: this.multiple ? ids : null });
106
+ };
107
+ this.handleDropdownChange = (e) => {
108
+ const val = e.target.value;
109
+ if (this.required && !validateRequired(val)) {
110
+ this.error = t('required', this.locale);
111
+ }
112
+ else {
113
+ this.error = '';
114
+ }
115
+ this.mrdChange.emit({ name: this.name, value: val });
116
+ };
117
+ this.handleBlur = () => {
118
+ var _a, _b;
119
+ setTimeout(() => {
120
+ this.showResults = false;
121
+ this.highlightedIndex = -1;
122
+ }, 200);
123
+ const val = this.multiple ? this.selectedItems.map(i => i.id) : ((_b = (_a = this.selectedItems[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null);
124
+ this.mrdBlur.emit({ name: this.name, value: val });
125
+ };
126
+ }
127
+ async setSearchResults(results) {
128
+ this.searchResults = results;
129
+ this.isLoading = false;
130
+ this.showResults = true;
131
+ this.highlightedIndex = -1;
132
+ }
133
+ async setLoading(loading) {
134
+ this.isLoading = loading;
135
+ }
136
+ render() {
137
+ var _a, _b;
138
+ const hasError = !!this.error;
139
+ if (this.displayType === ClientLayoutItemRelationDisplayType.DROPDOWN) {
140
+ const currentValue = Array.isArray(this.value) ? ((_a = this.value[0]) !== null && _a !== void 0 ? _a : '') : ((_b = this.value) !== null && _b !== void 0 ? _b : '');
141
+ return (h(Host, null, h("div", { class: "mrd-relation-field" }, this.label && (h("label", { class: `mrd-relation-field__label${this.required ? ' mrd-relation-field__label--required' : ''}` }, this.label)), h("select", { class: `mrd-relation-field__select${hasError ? ' mrd-relation-field__select--error' : ''}`, name: this.name, required: this.required, disabled: this.disabled, onChange: this.handleDropdownChange }, h("option", { value: "" }, t('select_placeholder', this.locale)), this.dropdownValues.map(dv => (h("option", { key: dv.value, value: dv.value, selected: dv.value === currentValue }, dv.label)))), hasError && h("span", { class: "mrd-relation-field__error" }, this.error))));
142
+ }
143
+ // SEARCH mode
144
+ const labelEl = this.label && (h("label", { class: `mrd-relation-field__label${this.required ? ' mrd-relation-field__label--required' : ''}` }, this.label));
145
+ // Single selection: show selected value as a badge, hide the search input
146
+ if (!this.multiple && this.selectedItems.length > 0) {
147
+ return (h(Host, null, h("div", { class: "mrd-relation-field" }, labelEl, h("div", { class: `mrd-relation-field__selected-value${hasError ? ' mrd-relation-field__selected-value--error' : ''}` }, h("span", { class: "mrd-relation-field__selected-name" }, this.selectedItems[0].label), h("button", { type: "button", class: "mrd-relation-field__selected-clear", onClick: this.clearSelection, "aria-label": t('remove', this.locale) }, "\u2715")), hasError && h("span", { class: "mrd-relation-field__error" }, this.error))));
148
+ }
149
+ return (h(Host, null, h("div", { class: "mrd-relation-field" }, labelEl, this.multiple && this.selectedItems.length > 0 && (h("div", { class: "mrd-relation-field__tags" }, this.selectedItems.map(item => (h("span", { key: item.id, class: "mrd-relation-field__tag" }, item.label, h("button", { type: "button", class: "mrd-relation-field__tag-remove", onClick: () => this.handleRemoveSelected(item.id), "aria-label": t('remove', this.locale) }, "\u2715")))))), h("div", { class: "mrd-relation-field__search-wrapper" }, h("input", { class: `mrd-relation-field__search${hasError ? ' mrd-relation-field__search--error' : ''}`, type: "text", value: this.searchQuery, placeholder: t('search_placeholder', this.locale), disabled: this.disabled, onInput: this.handleSearchInput, onKeyDown: this.handleKeyDown, onBlur: this.handleBlur }), this.isLoading && (h("span", { class: "mrd-relation-field__spinner", "aria-label": t('loading', this.locale) }))), this.showResults && (h("div", { class: "mrd-relation-field__results" }, this.searchResults.length === 0 && !this.isLoading ? (h("div", { class: "mrd-relation-field__no-results" }, t('no_results', this.locale))) : (this.searchResults.map((result, i) => (h("div", { key: result.id, class: `mrd-relation-field__result-item${i === this.highlightedIndex ? ' mrd-relation-field__result-item--highlighted' : ''}`, onMouseDown: () => this.handleResultSelect(result) }, h("span", { class: "mrd-relation-field__result-label" }, result.label), result.description && (h("span", { class: "mrd-relation-field__result-desc" }, result.description)))))))), hasError && h("span", { class: "mrd-relation-field__error" }, this.error))));
150
+ }
151
+ static get is() { return "mrd-relation-field"; }
152
+ static get encapsulation() { return "scoped"; }
153
+ static get originalStyleUrls() {
154
+ return {
155
+ "$": ["mrd-relation-field.scss"]
156
+ };
157
+ }
158
+ static get styleUrls() {
159
+ return {
160
+ "$": ["mrd-relation-field.css"]
161
+ };
162
+ }
163
+ static get properties() {
164
+ return {
165
+ "name": {
166
+ "type": "string",
167
+ "mutable": false,
168
+ "complexType": {
169
+ "original": "string",
170
+ "resolved": "string",
171
+ "references": {}
172
+ },
173
+ "required": false,
174
+ "optional": false,
175
+ "docs": {
176
+ "tags": [],
177
+ "text": ""
178
+ },
179
+ "getter": false,
180
+ "setter": false,
181
+ "reflect": false,
182
+ "attribute": "name",
183
+ "defaultValue": "''"
184
+ },
185
+ "label": {
186
+ "type": "string",
187
+ "mutable": false,
188
+ "complexType": {
189
+ "original": "string",
190
+ "resolved": "string",
191
+ "references": {}
192
+ },
193
+ "required": false,
194
+ "optional": false,
195
+ "docs": {
196
+ "tags": [],
197
+ "text": ""
198
+ },
199
+ "getter": false,
200
+ "setter": false,
201
+ "reflect": false,
202
+ "attribute": "label",
203
+ "defaultValue": "''"
204
+ },
205
+ "required": {
206
+ "type": "boolean",
207
+ "mutable": false,
208
+ "complexType": {
209
+ "original": "boolean",
210
+ "resolved": "boolean",
211
+ "references": {}
212
+ },
213
+ "required": false,
214
+ "optional": false,
215
+ "docs": {
216
+ "tags": [],
217
+ "text": ""
218
+ },
219
+ "getter": false,
220
+ "setter": false,
221
+ "reflect": false,
222
+ "attribute": "required",
223
+ "defaultValue": "false"
224
+ },
225
+ "disabled": {
226
+ "type": "boolean",
227
+ "mutable": false,
228
+ "complexType": {
229
+ "original": "boolean",
230
+ "resolved": "boolean",
231
+ "references": {}
232
+ },
233
+ "required": false,
234
+ "optional": false,
235
+ "docs": {
236
+ "tags": [],
237
+ "text": ""
238
+ },
239
+ "getter": false,
240
+ "setter": false,
241
+ "reflect": false,
242
+ "attribute": "disabled",
243
+ "defaultValue": "false"
244
+ },
245
+ "locale": {
246
+ "type": "string",
247
+ "mutable": false,
248
+ "complexType": {
249
+ "original": "string",
250
+ "resolved": "string",
251
+ "references": {}
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [],
257
+ "text": ""
258
+ },
259
+ "getter": false,
260
+ "setter": false,
261
+ "reflect": false,
262
+ "attribute": "locale",
263
+ "defaultValue": "navigator.language"
264
+ },
265
+ "relatedClass": {
266
+ "type": "string",
267
+ "mutable": false,
268
+ "complexType": {
269
+ "original": "string",
270
+ "resolved": "string",
271
+ "references": {}
272
+ },
273
+ "required": false,
274
+ "optional": false,
275
+ "docs": {
276
+ "tags": [],
277
+ "text": ""
278
+ },
279
+ "getter": false,
280
+ "setter": false,
281
+ "reflect": false,
282
+ "attribute": "related-class",
283
+ "defaultValue": "''"
284
+ },
285
+ "displayType": {
286
+ "type": "string",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "ClientLayoutItemRelationDisplayType",
290
+ "resolved": "ClientLayoutItemRelationDisplayType.DROPDOWN | ClientLayoutItemRelationDisplayType.SEARCH",
291
+ "references": {
292
+ "ClientLayoutItemRelationDisplayType": {
293
+ "location": "import",
294
+ "path": "../../types",
295
+ "id": "src/types/index.ts::ClientLayoutItemRelationDisplayType",
296
+ "referenceLocation": "ClientLayoutItemRelationDisplayType"
297
+ }
298
+ }
299
+ },
300
+ "required": false,
301
+ "optional": false,
302
+ "docs": {
303
+ "tags": [],
304
+ "text": ""
305
+ },
306
+ "getter": false,
307
+ "setter": false,
308
+ "reflect": false,
309
+ "attribute": "display-type",
310
+ "defaultValue": "ClientLayoutItemRelationDisplayType.SEARCH"
311
+ },
312
+ "multiple": {
313
+ "type": "boolean",
314
+ "mutable": false,
315
+ "complexType": {
316
+ "original": "boolean",
317
+ "resolved": "boolean",
318
+ "references": {}
319
+ },
320
+ "required": false,
321
+ "optional": false,
322
+ "docs": {
323
+ "tags": [],
324
+ "text": ""
325
+ },
326
+ "getter": false,
327
+ "setter": false,
328
+ "reflect": false,
329
+ "attribute": "multiple",
330
+ "defaultValue": "false"
331
+ },
332
+ "dropdownValues": {
333
+ "type": "unknown",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "ClientListValue[]",
337
+ "resolved": "ClientListValue[]",
338
+ "references": {
339
+ "ClientListValue": {
340
+ "location": "import",
341
+ "path": "../../types",
342
+ "id": "src/types/index.ts::ClientListValue",
343
+ "referenceLocation": "ClientListValue"
344
+ }
345
+ }
346
+ },
347
+ "required": false,
348
+ "optional": false,
349
+ "docs": {
350
+ "tags": [],
351
+ "text": ""
352
+ },
353
+ "getter": false,
354
+ "setter": false,
355
+ "defaultValue": "[]"
356
+ },
357
+ "value": {
358
+ "type": "string",
359
+ "mutable": false,
360
+ "complexType": {
361
+ "original": "string | string[] | null",
362
+ "resolved": "null | string | string[]",
363
+ "references": {}
364
+ },
365
+ "required": false,
366
+ "optional": false,
367
+ "docs": {
368
+ "tags": [],
369
+ "text": ""
370
+ },
371
+ "getter": false,
372
+ "setter": false,
373
+ "reflect": false,
374
+ "attribute": "value",
375
+ "defaultValue": "null"
376
+ }
377
+ };
378
+ }
379
+ static get states() {
380
+ return {
381
+ "searchQuery": {},
382
+ "searchResults": {},
383
+ "isLoading": {},
384
+ "selectedItems": {},
385
+ "showResults": {},
386
+ "error": {},
387
+ "highlightedIndex": {}
388
+ };
389
+ }
390
+ static get events() {
391
+ return [{
392
+ "method": "mrdChange",
393
+ "name": "mrdChange",
394
+ "bubbles": true,
395
+ "cancelable": true,
396
+ "composed": true,
397
+ "docs": {
398
+ "tags": [],
399
+ "text": ""
400
+ },
401
+ "complexType": {
402
+ "original": "{ name: string; value: string | string[] | null }",
403
+ "resolved": "{ name: string; value: string | string[] | null; }",
404
+ "references": {}
405
+ }
406
+ }, {
407
+ "method": "mrdBlur",
408
+ "name": "mrdBlur",
409
+ "bubbles": true,
410
+ "cancelable": true,
411
+ "composed": true,
412
+ "docs": {
413
+ "tags": [],
414
+ "text": ""
415
+ },
416
+ "complexType": {
417
+ "original": "{ name: string; value: string | string[] | null }",
418
+ "resolved": "{ name: string; value: string | string[] | null; }",
419
+ "references": {}
420
+ }
421
+ }, {
422
+ "method": "mrdSearch",
423
+ "name": "mrdSearch",
424
+ "bubbles": true,
425
+ "cancelable": true,
426
+ "composed": true,
427
+ "docs": {
428
+ "tags": [],
429
+ "text": ""
430
+ },
431
+ "complexType": {
432
+ "original": "{ query: string; relatedClass: string }",
433
+ "resolved": "{ query: string; relatedClass: string; }",
434
+ "references": {}
435
+ }
436
+ }];
437
+ }
438
+ static get methods() {
439
+ return {
440
+ "setSearchResults": {
441
+ "complexType": {
442
+ "signature": "(results: RelationSearchResult[]) => Promise<void>",
443
+ "parameters": [{
444
+ "name": "results",
445
+ "type": "RelationSearchResult[]",
446
+ "docs": ""
447
+ }],
448
+ "references": {
449
+ "Promise": {
450
+ "location": "global",
451
+ "id": "global::Promise"
452
+ },
453
+ "RelationSearchResult": {
454
+ "location": "import",
455
+ "path": "../../types",
456
+ "id": "src/types/index.ts::RelationSearchResult",
457
+ "referenceLocation": "RelationSearchResult"
458
+ }
459
+ },
460
+ "return": "Promise<void>"
461
+ },
462
+ "docs": {
463
+ "text": "",
464
+ "tags": []
465
+ }
466
+ },
467
+ "setLoading": {
468
+ "complexType": {
469
+ "signature": "(loading: boolean) => Promise<void>",
470
+ "parameters": [{
471
+ "name": "loading",
472
+ "type": "boolean",
473
+ "docs": ""
474
+ }],
475
+ "references": {
476
+ "Promise": {
477
+ "location": "global",
478
+ "id": "global::Promise"
479
+ }
480
+ },
481
+ "return": "Promise<void>"
482
+ },
483
+ "docs": {
484
+ "text": "",
485
+ "tags": []
486
+ }
487
+ }
488
+ };
489
+ }
490
+ }