@limetech/lime-crm-building-blocks 1.104.0 → 1.104.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/{lime-query-validation-6be10fa7.js → lime-query-validation-82aa2855.js} +84 -84
  3. package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
  4. package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +44 -43
  5. package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +1 -1
  6. package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +42 -42
  7. package/dist/collection/components/document-picker/document-picker.js +1 -1
  8. package/dist/collection/components/lime-query-builder/lime-query-builder.css +9 -9
  9. package/dist/collection/components/lime-query-builder/lime-query-builder.js +42 -41
  10. package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.css +5 -5
  11. package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +42 -42
  12. package/dist/collection/components/lime-query-builder/lime-query-validation.js +84 -84
  13. package/dist/collection/components/lime-query-builder/order-by/order-by-editor.css +2 -2
  14. package/dist/collection/components/lime-query-builder/response-format/response-format-helpers.js +2 -2
  15. package/dist/components/lime-query-validation.js +84 -84
  16. package/dist/components/limebb-document-picker.js +1 -1
  17. package/dist/components/limebb-lime-query-builder.js +43 -42
  18. package/dist/components/limebb-lime-query-response-format-builder.js +41 -41
  19. package/dist/components/order-by-editor.js +1 -1
  20. package/dist/esm/{lime-query-validation-573223a5.js → lime-query-validation-9e386da8.js} +84 -84
  21. package/dist/esm/limebb-document-picker.entry.js +1 -1
  22. package/dist/esm/limebb-lime-query-builder.entry.js +44 -43
  23. package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +1 -1
  24. package/dist/esm/limebb-lime-query-response-format-builder.entry.js +42 -42
  25. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  26. package/dist/lime-crm-building-blocks/{p-6c7af6bb.entry.js → p-7d2188aa.entry.js} +1 -1
  27. package/dist/lime-crm-building-blocks/p-7fbb6eba.entry.js +1 -0
  28. package/dist/lime-crm-building-blocks/{p-4a82410e.entry.js → p-876701c6.entry.js} +1 -1
  29. package/dist/lime-crm-building-blocks/p-ac9e81c9.entry.js +1 -0
  30. package/dist/lime-crm-building-blocks/p-efa5bcd4.js +1 -0
  31. package/dist/types/components/document-picker/document-picker.d.ts +0 -14
  32. package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +3 -3
  33. package/dist/types/components/lime-query-builder/lime-query-response-format-builder.d.ts +13 -13
  34. package/dist/types/components/lime-query-builder/lime-query-validation.d.ts +17 -17
  35. package/dist/types/components.d.ts +12 -12
  36. package/package.json +1 -1
  37. package/dist/lime-crm-building-blocks/p-96fee7ee.entry.js +0 -1
  38. package/dist/lime-crm-building-blocks/p-fa2da6bc.js +0 -1
  39. package/dist/lime-crm-building-blocks/p-fe6a94a1.entry.js +0 -1
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-ff255a0d.js');
6
6
  const index_esm = require('./index.esm-d785eb6e.js');
7
- const limeQueryValidation = require('./lime-query-validation-6be10fa7.js');
7
+ const limeQueryValidation = require('./lime-query-validation-82aa2855.js');
8
8
  require('./property-resolution-fb42a46b.js');
9
9
 
10
10
  /**
@@ -41,7 +41,7 @@ function parseResponseFormat(json) {
41
41
  `Only 'object' and 'aggregates' are allowed.`);
42
42
  }
43
43
  // Must have at least one of object or aggregates
44
- // Note: Empty objects {} are valid (starting point for GUI mode)
44
+ // Note: Empty objects {} are valid (starting point for visual mode)
45
45
  const hasProperties = keys.length > 0;
46
46
  if (hasProperties && !parsed.object && !parsed.aggregates) {
47
47
  throw new Error('Response format must contain at least one of: object, aggregates');
@@ -70,7 +70,7 @@ function getDefaultResponseFormat() {
70
70
  };
71
71
  }
72
72
 
73
- const limeQueryResponseFormatBuilderCss = ":host(limebb-lime-query-response-format-builder){display:block;width:100%}.response-format-builder{display:flex;flex-direction:column}.builder-label{color:rgb(var(--contrast-1100));font-size:1.625rem;line-height:1.25rem;font-weight:300;margin-top:1rem;margin-bottom:0.25rem}.builder-helper-text{margin-top:0px;margin-bottom:0.5rem;font-size:var(--limel-theme-default-font-size);color:rgb(var(--contrast-1100))}.mode-controls{display:flex;justify-content:flex-end;padding:0.5rem}.gui-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .gui-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .gui-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .gui-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .gui-limitations li{margin:0.25rem 0}";
73
+ const limeQueryResponseFormatBuilderCss = ":host(limebb-lime-query-response-format-builder){display:block;width:100%}.response-format-builder{display:flex;flex-direction:column}.builder-label{color:rgb(var(--contrast-1100));font-size:1.625rem;line-height:1.25rem;font-weight:300;margin-top:1rem;margin-bottom:0.25rem}.builder-helper-text{margin-top:0px;margin-bottom:0.5rem;font-size:var(--limel-theme-default-font-size);color:rgb(var(--contrast-1100))}.mode-controls{display:flex;justify-content:flex-end;padding:0.5rem}.visual-mode,.code-mode{display:block}.code-editor-container{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-editor-container .validation-errors{padding:0.75rem 1rem;color:rgb(var(--color-red-default));background-color:rgb(var(--color-red-lighter));border-left:0.25rem solid rgb(var(--color-red-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .validation-errors ul{margin:0;padding-left:1.5rem}.code-editor-container .validation-errors li{margin:0.25rem 0}.code-editor-container .visual-mode-limitations{padding:0.75rem 1rem;color:rgb(var(--color-blue-dark));background-color:rgb(var(--color-blue-lighter));border-left:0.25rem solid rgb(var(--color-blue-default));border-radius:0.25rem;font-size:0.875rem}.code-editor-container .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-editor-container .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-editor-container .visual-mode-limitations li{margin:0.25rem 0}";
74
74
  const LimebbLimeQueryResponseFormatBuilderStyle0 = limeQueryResponseFormatBuilderCss;
75
75
 
76
76
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -95,34 +95,34 @@ const LimeQueryResponseFormatBuilder = class {
95
95
  * Optional helper text for the builder
96
96
  */
97
97
  this.helperText = '';
98
- this.mode = 'gui';
98
+ this.mode = 'visual';
99
99
  this.codeValue = '';
100
100
  this.handleModeChange = (event) => {
101
101
  event.stopPropagation();
102
102
  const mode = event.detail.id;
103
- if (mode === 'gui') {
104
- this.switchToGui();
103
+ if (mode === 'visual') {
104
+ this.switchToVisualMode();
105
105
  }
106
106
  else if (mode === 'code') {
107
107
  this.switchToCode();
108
108
  }
109
109
  };
110
110
  /**
111
- * Switch from code mode to GUI mode
111
+ * Switch from code mode to visual mode
112
112
  */
113
- this.switchToGui = () => {
113
+ this.switchToVisualMode = () => {
114
114
  // Validate JSON before switching
115
115
  try {
116
116
  const parsed = parseResponseFormat(this.codeValue);
117
- // Check if it's supported in GUI
118
- const support = limeQueryValidation.validateResponseFormatOnly(parsed, this.limetypes, this.limetype, this.guiModeEnabled);
119
- if (!support.guiSupported) {
120
- // Don't switch if GUI can't render this response format
117
+ // Check if it's supported in visual mode
118
+ const support = limeQueryValidation.validateResponseFormatOnly(parsed, this.limetypes, this.limetype, this.visualModeEnabled);
119
+ if (!support.visualModeSupported) {
120
+ // Don't switch if visual mode can't render this response format
121
121
  return;
122
122
  }
123
123
  // Update internal state from parsed value
124
124
  this.internalValue = parsed;
125
- this.mode = 'gui';
125
+ this.mode = 'visual';
126
126
  this.change.emit(parsed);
127
127
  }
128
128
  catch (_a) {
@@ -130,7 +130,7 @@ const LimeQueryResponseFormatBuilder = class {
130
130
  }
131
131
  };
132
132
  /**
133
- * Switch from GUI mode to code mode
133
+ * Switch from visual mode to code mode
134
134
  */
135
135
  this.switchToCode = () => {
136
136
  this.updateCodeValue();
@@ -151,14 +151,14 @@ const LimeQueryResponseFormatBuilder = class {
151
151
  }
152
152
  catch (_a) {
153
153
  // Invalid JSON - don't emit change
154
- // Validation errors will be shown by checkGuiSupport()
154
+ // Validation errors will be shown by checkVisualModeSupport()
155
155
  }
156
156
  };
157
157
  /**
158
- * Handle GUI mode changes
158
+ * Handle visual mode changes
159
159
  * @param event
160
160
  */
161
- this.handleGuiChange = (event) => {
161
+ this.handleVisualModeChange = (event) => {
162
162
  event.stopPropagation();
163
163
  this.internalValue = event.detail;
164
164
  this.updateCodeValue();
@@ -166,9 +166,9 @@ const LimeQueryResponseFormatBuilder = class {
166
166
  };
167
167
  }
168
168
  /**
169
- * Check if GUI mode is enabled via feature flag
169
+ * Check if visual mode is enabled via feature flag
170
170
  */
171
- get guiModeEnabled() {
171
+ get visualModeEnabled() {
172
172
  var _a, _b, _c;
173
173
  return ((_c = (_b = (_a = this.platform) === null || _a === void 0 ? void 0 : _a.isFeatureEnabled) === null || _b === void 0 ? void 0 : _b.call(_a, 'useLimeQueryBuilderGuiMode')) !== null && _c !== void 0 ? _c : false);
174
174
  }
@@ -177,32 +177,32 @@ const LimeQueryResponseFormatBuilder = class {
177
177
  this.internalValue = this.value || getDefaultResponseFormat();
178
178
  // Update code value from internal value
179
179
  this.updateCodeValue();
180
- // Force code mode if GUI is disabled
181
- if (!this.guiModeEnabled) {
180
+ // Force code mode if visual mode is disabled
181
+ if (!this.visualModeEnabled) {
182
182
  this.mode = 'code';
183
183
  return;
184
184
  }
185
- // Check if GUI mode is supported for current value
186
- const support = this.checkGuiSupport();
187
- if (!support.guiSupported) {
185
+ // Check if visual mode is supported for current value
186
+ const support = this.checkVisualModeSupport();
187
+ if (!support.visualModeSupported) {
188
188
  this.mode = 'code';
189
189
  }
190
190
  }
191
191
  componentWillUpdate() {
192
192
  // Sync internal value when prop changes externally
193
- if (this.value && this.mode === 'gui') {
193
+ if (this.value && this.mode === 'visual') {
194
194
  this.internalValue = this.value;
195
195
  }
196
196
  }
197
197
  render() {
198
- const guiSupported = this.checkGuiSupport();
199
- return (index.h("div", { key: '6bc723110dcd545534e93db64a0d6a14963b6bda', class: "response-format-builder" }, this.label && index.h("h1", { key: '405d373ccb5056af3c0e6201ef5ebf819a3b8154', class: "builder-label" }, this.label), this.helperText && (index.h("p", { key: '5fb07f0fcd9e57b7c358957afc13485156bd041f', class: "builder-helper-text" }, this.helperText)), this.guiModeEnabled && (index.h("div", { key: 'd2241f702cfe9e75077542d4d21acb038be0a348', class: "mode-controls" }, this.renderModeSwitch(guiSupported))), !this.guiModeEnabled || this.mode === 'code' ? (index.h("div", { class: "code-mode" }, this.renderCodeEditor(guiSupported))) : (index.h("div", { class: "gui-mode" }, this.renderGuiMode()))));
198
+ const visualModeSupported = this.checkVisualModeSupport();
199
+ return (index.h("div", { key: '7ae23c1366da49b591c0914f49f25c179e4d6712', class: "response-format-builder" }, this.label && index.h("h1", { key: '0cd528a69dd1b05769c678151f0827de15d167a8', class: "builder-label" }, this.label), this.helperText && (index.h("p", { key: 'b636ca0d32b244d051e74ed538cbd11438f29cd1', class: "builder-helper-text" }, this.helperText)), this.visualModeEnabled && (index.h("div", { key: 'dc7248cb27d99aa654b0f1659938c3f2933d89e0', class: "mode-controls" }, this.renderModeSwitch(visualModeSupported))), !this.visualModeEnabled || this.mode === 'code' ? (index.h("div", { class: "code-mode" }, this.renderCodeEditor(visualModeSupported))) : (index.h("div", { class: "visual-mode" }, this.renderVisualMode()))));
200
200
  }
201
201
  renderModeSwitch(support) {
202
- const guiDisabled = !support.guiSupported;
202
+ const visualDisabled = !support.visualModeSupported;
203
203
  const buttons = [
204
204
  {
205
- id: 'gui',
205
+ id: 'visual',
206
206
  title: 'Visual',
207
207
  },
208
208
  {
@@ -210,27 +210,27 @@ const LimeQueryResponseFormatBuilder = class {
210
210
  title: 'Code',
211
211
  },
212
212
  ].map((button) => (Object.assign(Object.assign({}, button), { selected: button.id === this.mode })));
213
- return (index.h("limel-button-group", { value: buttons, disabled: guiDisabled, onChange: this.handleModeChange }));
213
+ return (index.h("limel-button-group", { value: buttons, disabled: visualDisabled, onChange: this.handleModeChange }));
214
214
  }
215
215
  renderCodeEditor(support) {
216
- return (index.h("div", { class: "code-editor-container" }, index.h("limel-code-editor", { value: this.codeValue, language: "json", lineNumbers: true, fold: true, lint: true, onChange: this.handleCodeChange }), !support.valid && support.validationErrors.length > 0 && (index.h("div", { class: "validation-errors" }, index.h("strong", null, "Invalid Response Format:"), index.h("ul", null, support.validationErrors.map((error) => (index.h("li", null, error)))))), this.guiModeEnabled &&
216
+ return (index.h("div", { class: "code-editor-container" }, index.h("limel-code-editor", { value: this.codeValue, language: "json", lineNumbers: true, fold: true, lint: true, onChange: this.handleCodeChange }), !support.valid && support.validationErrors.length > 0 && (index.h("div", { class: "validation-errors" }, index.h("strong", null, "Invalid Response Format:"), index.h("ul", null, support.validationErrors.map((error) => (index.h("li", null, error)))))), this.visualModeEnabled &&
217
217
  support.valid &&
218
- !support.guiSupported &&
219
- support.guiLimitations.length > 0 && (index.h("div", { class: "gui-limitations" }, index.h("strong", null, "Cannot switch to GUI mode:"), index.h("ul", null, support.guiLimitations.map((limitation) => (index.h("li", null, limitation))))))));
218
+ !support.visualModeSupported &&
219
+ support.visualModeLimitations.length > 0 && (index.h("div", { class: "visual-mode-limitations" }, index.h("strong", null, "Cannot switch to visual mode:"), index.h("ul", null, support.visualModeLimitations.map((limitation) => (index.h("li", null, limitation))))))));
220
220
  }
221
- renderGuiMode() {
222
- return (index.h("limebb-lime-query-response-format-editor", { platform: this.platform, context: this.context, limetype: this.limetype, value: this.internalValue, onChange: this.handleGuiChange }));
221
+ renderVisualMode() {
222
+ return (index.h("limebb-lime-query-response-format-editor", { platform: this.platform, context: this.context, limetype: this.limetype, value: this.internalValue, onChange: this.handleVisualModeChange }));
223
223
  }
224
224
  /**
225
- * Check if current value can be rendered in GUI mode
225
+ * Check if current value can be rendered in visual mode
226
226
  */
227
- checkGuiSupport() {
227
+ checkVisualModeSupport() {
228
228
  if (!this.limetypes) {
229
229
  return {
230
230
  valid: false,
231
- guiSupported: false,
231
+ visualModeSupported: false,
232
232
  validationErrors: ['Limetypes not loaded'],
233
- guiLimitations: [],
233
+ visualModeLimitations: [],
234
234
  };
235
235
  }
236
236
  // Try to parse code value if in code mode
@@ -242,16 +242,16 @@ const LimeQueryResponseFormatBuilder = class {
242
242
  catch (error) {
243
243
  return {
244
244
  valid: false,
245
- guiSupported: false,
245
+ visualModeSupported: false,
246
246
  validationErrors: [error.message],
247
- guiLimitations: [],
247
+ visualModeLimitations: [],
248
248
  };
249
249
  }
250
250
  }
251
251
  else {
252
252
  valueToCheck = this.internalValue;
253
253
  }
254
- return limeQueryValidation.validateResponseFormatOnly(valueToCheck, this.limetypes, this.limetype, this.guiModeEnabled);
254
+ return limeQueryValidation.validateResponseFormatOnly(valueToCheck, this.limetypes, this.limetype, this.visualModeEnabled);
255
255
  }
256
256
  /**
257
257
  * Update code value from internal state
@@ -76,7 +76,7 @@ export class DocumentPicker {
76
76
  this.labelId = createRandomString();
77
77
  }
78
78
  render() {
79
- return (h(Host, { key: '28bf6afd1999efc62689bc43b7d63d8c308d3663' }, h("limel-notched-outline", { key: '0b6f3d9f0cc88e9e1b782e3d12e7a08853211be6', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, hasFloatingLabel: true }, h("div", { key: 'a3d64740ca2139a3435884526b9a6195929d8060', slot: "content", role: this.type === 'radio' ? 'radiogroup' : 'group', "aria-labelledby": this.label ? this.labelId : undefined, "aria-describedby": this.helperText ? this.helperTextId : undefined }, this.renderItems())), this.renderHelperLine()));
79
+ return (h(Host, { key: '5e4a9004ed3b81b6c35be868c664e61cb88d490c' }, h("limel-notched-outline", { key: 'ada8928b3ed815896e1ef5fb61f539f0ab77c7af', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, hasFloatingLabel: true }, h("div", { key: '343aeef460a4ea4e0a4a247daf6988f749dc2b49', slot: "content", role: this.type === 'radio' ? 'radiogroup' : 'group', "aria-labelledby": this.label ? this.labelId : undefined, "aria-describedby": this.helperText ? this.helperTextId : undefined }, this.renderItems())), this.renderHelperLine()));
80
80
  }
81
81
  renderItems() {
82
82
  return this.items.map((item) => (h("limebb-document-item", { platform: this.platform, context: this.context, item: item, key: item.id, type: this.type, onInteract: this.handleItemInteract })));
@@ -8,7 +8,7 @@
8
8
  --header-background-color: rgb(var(--contrast-400));
9
9
  --limebb-lime-query-builder-background-color: rgb(var(--contrast-100));
10
10
  --limebb-lime-query-builder-border-radius: 0.75rem;
11
- --limebb-lime-query-builder-gui-mode-padding: 1rem;
11
+ --limebb-lime-query-builder-visual-mode-padding: 1rem;
12
12
  --limebb-lime-query-builder-group-color: rgb(var(--color-sky-lighter));
13
13
  box-sizing: border-box;
14
14
  width: calc(100% - 1.5rem);
@@ -20,11 +20,11 @@
20
20
  box-shadow: var(--shadow-inflated-16);
21
21
  }
22
22
 
23
- .gui-mode {
23
+ .visual-mode {
24
24
  display: flex;
25
25
  flex-direction: column;
26
26
  gap: 1rem;
27
- padding: var(--limebb-lime-query-builder-gui-mode-padding);
27
+ padding: var(--limebb-lime-query-builder-visual-mode-padding);
28
28
  border: 1px solid var(--header-background-color);
29
29
  border-radius: 0 0 var(--limebb-lime-query-builder-border-radius) var(--limebb-lime-query-builder-border-radius);
30
30
  }
@@ -55,7 +55,7 @@
55
55
  .code-mode .validation-errors li {
56
56
  margin: 0.25rem 0;
57
57
  }
58
- .code-mode .gui-limitations {
58
+ .code-mode .visual-mode-limitations {
59
59
  padding: 0.75rem 1rem;
60
60
  color: rgb(var(--color-blue-dark));
61
61
  background-color: rgb(var(--color-blue-lighter));
@@ -63,16 +63,16 @@
63
63
  border-radius: 0.25rem;
64
64
  font-size: 0.875rem;
65
65
  }
66
- .code-mode .gui-limitations strong {
66
+ .code-mode .visual-mode-limitations strong {
67
67
  display: block;
68
68
  margin-bottom: 0.5rem;
69
69
  font-weight: 600;
70
70
  }
71
- .code-mode .gui-limitations ul {
71
+ .code-mode .visual-mode-limitations ul {
72
72
  margin: 0;
73
73
  padding-left: 1.5rem;
74
74
  }
75
- .code-mode .gui-limitations li {
75
+ .code-mode .visual-mode-limitations li {
76
76
  margin: 0.25rem 0;
77
77
  }
78
78
 
@@ -92,8 +92,8 @@ section h4 {
92
92
 
93
93
  limel-header.is-narrow {
94
94
  --header-top-right-left-border-radius: 0;
95
- width: calc(100% + var(--limebb-lime-query-builder-gui-mode-padding) * 2);
96
- margin-left: calc(var(--limebb-lime-query-builder-gui-mode-padding) * -1);
95
+ width: calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);
96
+ margin-left: calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1);
97
97
  }
98
98
 
99
99
  .query-options-controls {
@@ -42,7 +42,7 @@ import { isLimeQuerySupported, } from "./lime-query-validation";
42
42
  */
43
43
  export class LimeQueryBuilder {
44
44
  constructor() {
45
- this.mode = 'gui';
45
+ this.mode = 'visual';
46
46
  this.codeValue = '';
47
47
  this.limetype = '';
48
48
  this.handleLimetypeChange = (event) => {
@@ -81,11 +81,11 @@ export class LimeQueryBuilder {
81
81
  this.handleChange = (event) => {
82
82
  event.stopPropagation();
83
83
  const mode = event.detail.id;
84
- if (mode === 'gui') {
84
+ if (mode === 'visual') {
85
85
  try {
86
86
  const parsed = JSON.parse(this.codeValue);
87
- const support = this.checkGuiSupport();
88
- if (!support.guiSupported) {
87
+ const support = this.checkVisualModeSupport();
88
+ if (!support.visualModeSupported) {
89
89
  return;
90
90
  }
91
91
  this.limetype = parsed.limetype || '';
@@ -93,7 +93,7 @@ export class LimeQueryBuilder {
93
93
  this.internalResponseFormat = parsed.responseFormat;
94
94
  this.limit = parsed.limit;
95
95
  this.orderBy = parsed.orderBy;
96
- this.mode = 'gui';
96
+ this.mode = 'visual';
97
97
  this.change.emit(parsed);
98
98
  }
99
99
  catch (_a) {
@@ -122,19 +122,19 @@ export class LimeQueryBuilder {
122
122
  getButtons() {
123
123
  return [
124
124
  {
125
- id: 'gui',
125
+ id: 'visual',
126
126
  title: 'Visual',
127
127
  },
128
128
  { id: 'code', title: 'Code' },
129
129
  ];
130
130
  }
131
- get guiModeEnabled() {
131
+ get visualModeEnabled() {
132
132
  var _a, _b, _c;
133
133
  return ((_c = (_b = (_a = this.platform) === null || _a === void 0 ? void 0 : _a.isFeatureEnabled) === null || _b === void 0 ? void 0 : _b.call(_a, 'useLimeQueryBuilderGuiMode')) !== null && _c !== void 0 ? _c : false);
134
134
  }
135
135
  componentWillLoad() {
136
- // Force code mode if GUI is disabled
137
- if (!this.guiModeEnabled) {
136
+ // Force code mode if visual mode is disabled
137
+ if (!this.visualModeEnabled) {
138
138
  this.mode = 'code';
139
139
  // Initialize code value from prop
140
140
  this.updateCodeValue();
@@ -149,24 +149,24 @@ export class LimeQueryBuilder {
149
149
  }
150
150
  // Initialize code value from prop
151
151
  this.updateCodeValue();
152
- // Check if GUI mode is supported
153
- const support = this.checkGuiSupport();
154
- if (!support.guiSupported) {
152
+ // Check if visual mode is supported
153
+ const support = this.checkVisualModeSupport();
154
+ if (!support.visualModeSupported) {
155
155
  this.mode = 'code';
156
156
  }
157
157
  }
158
158
  render() {
159
- return (h(Host, { key: '02e7367fbc718a8625c8d49d5e546acca0986ce2' }, this.renderHeader(), this.renderContent()));
159
+ return (h(Host, { key: '4f1481f575b1afdd63a3115761a52a62699d7f84' }, this.renderHeader(), this.renderContent()));
160
160
  }
161
161
  renderContent() {
162
- const guiSupported = this.checkGuiSupport();
163
- const showCodeMode = !this.guiModeEnabled || this.mode === 'code';
162
+ const visualModeSupported = this.checkVisualModeSupport();
163
+ const showCodeMode = !this.visualModeEnabled || this.mode === 'code';
164
164
  return showCodeMode
165
- ? this.renderCodeMode(guiSupported)
166
- : this.renderGuiMode();
165
+ ? this.renderCodeMode(visualModeSupported)
166
+ : this.renderVisualMode();
167
167
  }
168
168
  emitChange() {
169
- // Only emit in GUI mode
169
+ // Only emit in visual mode
170
170
  if (this.mode === 'code') {
171
171
  return;
172
172
  }
@@ -202,14 +202,14 @@ export class LimeQueryBuilder {
202
202
  }
203
203
  return limeQuery;
204
204
  }
205
- checkGuiSupport() {
205
+ checkVisualModeSupport() {
206
206
  if (!this.limetypes) {
207
207
  // Can't validate yet, assume all is good
208
208
  return {
209
209
  valid: true,
210
- guiSupported: true,
210
+ visualModeSupported: true,
211
211
  validationErrors: [],
212
- guiLimitations: [],
212
+ visualModeLimitations: [],
213
213
  };
214
214
  }
215
215
  // When in code mode, validate the parsed code value instead of current state
@@ -221,20 +221,20 @@ export class LimeQueryBuilder {
221
221
  catch (_a) {
222
222
  return {
223
223
  valid: false,
224
- guiSupported: false,
224
+ visualModeSupported: false,
225
225
  validationErrors: ['Invalid JSON'],
226
- guiLimitations: [],
226
+ visualModeLimitations: [],
227
227
  };
228
228
  }
229
229
  }
230
230
  else {
231
- // Build query from current GUI state
231
+ // Build query from current visual state
232
232
  if (!this.limetype) {
233
233
  return {
234
234
  valid: true,
235
- guiSupported: true,
235
+ visualModeSupported: true,
236
236
  validationErrors: [],
237
- guiLimitations: [],
237
+ visualModeLimitations: [],
238
238
  };
239
239
  }
240
240
  const responseFormat = this
@@ -252,23 +252,24 @@ export class LimeQueryBuilder {
252
252
  queryToCheck.limit = this.limit;
253
253
  }
254
254
  }
255
- return isLimeQuerySupported(queryToCheck, this.limetypes, this.activeLimetype, this.guiModeEnabled);
255
+ return isLimeQuerySupported(queryToCheck, this.limetypes, this.activeLimetype, this.visualModeEnabled);
256
256
  }
257
257
  renderModeSwitch(support) {
258
- const guiDisabled = !support.guiSupported;
258
+ const visualDisabled = !support.visualModeSupported;
259
259
  const buttons = this.getButtons().map((button) => (Object.assign(Object.assign({}, button), { selected: button.id === this.mode })));
260
- return (h("limel-button-group", { slot: "actions", onChange: this.handleChange, value: buttons, disabled: guiDisabled }));
260
+ return (h("limel-button-group", { slot: "actions", onChange: this.handleChange, value: buttons, disabled: visualDisabled }));
261
261
  }
262
- renderCodeEditor(guiSupported) {
262
+ renderCodeEditor(visualModeSupported) {
263
263
  return [
264
264
  h("limel-code-editor", { value: this.codeValue, language: "json", lineNumbers: true, fold: true, lint: true, onChange: this.handleCodeChange }),
265
265
  /* Show validation errors (invalid Lime Query) */
266
- !guiSupported.valid && guiSupported.validationErrors.length > 0 && (h("div", { class: "validation-errors" }, h("strong", null, "Invalid Lime Query:"), h("ul", null, guiSupported.validationErrors.map((error) => (h("li", null, error)))))),
267
- /* Show GUI limitations (only when GUI mode is enabled and Lime Query is valid) */
268
- this.guiModeEnabled &&
269
- guiSupported.valid &&
270
- !guiSupported.guiSupported &&
271
- guiSupported.guiLimitations.length > 0 && (h("div", { class: "gui-limitations" }, h("strong", null, "Cannot switch to GUI mode:"), h("ul", null, guiSupported.guiLimitations.map((limitation) => (h("li", null, limitation)))))),
266
+ !visualModeSupported.valid &&
267
+ visualModeSupported.validationErrors.length > 0 && (h("div", { class: "validation-errors" }, h("strong", null, "Invalid Lime Query:"), h("ul", null, visualModeSupported.validationErrors.map((error) => (h("li", null, error)))))),
268
+ /* Show visual mode limitations (only when visual mode is enabled and Lime Query is valid) */
269
+ this.visualModeEnabled &&
270
+ visualModeSupported.valid &&
271
+ !visualModeSupported.visualModeSupported &&
272
+ visualModeSupported.visualModeLimitations.length > 0 && (h("div", { class: "visual-mode-limitations" }, h("strong", null, "Cannot switch to visual mode:"), h("ul", null, visualModeSupported.visualModeLimitations.map((limitation) => (h("li", null, limitation)))))),
272
273
  ];
273
274
  }
274
275
  renderLimetypeSection() {
@@ -293,15 +294,15 @@ export class LimeQueryBuilder {
293
294
  }
294
295
  return (h("section", { class: "query-options" }, h("limel-header", { class: "is-narrow", heading: "Query Options", icon: "ask_question" }), h("div", { class: "query-options-controls" }, h("limel-input-field", { label: "Limit", type: "number", value: ((_a = this.limit) === null || _a === void 0 ? void 0 : _a.toString()) || '', placeholder: "No limit", helperText: "Maximum number of results", onChange: this.handleLimitChange }), h("limebb-lime-query-order-by-editor", { platform: this.platform, context: this.context, limetype: this.limetype, value: this.orderBy, onChange: this.handleOrderByChange }))));
295
296
  }
296
- renderGuiMode() {
297
- return (h("div", { class: "gui-mode" }, this.renderLimetypeSection(), this.renderResponseFormatSection(), this.renderFilterSection(), this.renderQueryOptionsSection()));
297
+ renderVisualMode() {
298
+ return (h("div", { class: "visual-mode" }, this.renderLimetypeSection(), this.renderResponseFormatSection(), this.renderFilterSection(), this.renderQueryOptionsSection()));
298
299
  }
299
300
  renderHeader() {
300
- const guiSupported = this.checkGuiSupport();
301
- return (h("limel-header", { heading: this.label }, this.renderModeControls(guiSupported)));
301
+ const visualModeSupported = this.checkVisualModeSupport();
302
+ return (h("limel-header", { heading: this.label }, this.renderModeControls(visualModeSupported)));
302
303
  }
303
304
  renderModeControls(support) {
304
- if (!this.guiModeEnabled) {
305
+ if (!this.visualModeEnabled) {
305
306
  return;
306
307
  }
307
308
  return this.renderModeSwitch(support);
@@ -30,7 +30,7 @@
30
30
  padding: 0.5rem;
31
31
  }
32
32
 
33
- .gui-mode,
33
+ .visual-mode,
34
34
  .code-mode {
35
35
  display: block;
36
36
  }
@@ -61,7 +61,7 @@
61
61
  .code-editor-container .validation-errors li {
62
62
  margin: 0.25rem 0;
63
63
  }
64
- .code-editor-container .gui-limitations {
64
+ .code-editor-container .visual-mode-limitations {
65
65
  padding: 0.75rem 1rem;
66
66
  color: rgb(var(--color-blue-dark));
67
67
  background-color: rgb(var(--color-blue-lighter));
@@ -69,15 +69,15 @@
69
69
  border-radius: 0.25rem;
70
70
  font-size: 0.875rem;
71
71
  }
72
- .code-editor-container .gui-limitations strong {
72
+ .code-editor-container .visual-mode-limitations strong {
73
73
  display: block;
74
74
  margin-bottom: 0.5rem;
75
75
  font-weight: 600;
76
76
  }
77
- .code-editor-container .gui-limitations ul {
77
+ .code-editor-container .visual-mode-limitations ul {
78
78
  margin: 0;
79
79
  padding-left: 1.5rem;
80
80
  }
81
- .code-editor-container .gui-limitations li {
81
+ .code-editor-container .visual-mode-limitations li {
82
82
  margin: 0.25rem 0;
83
83
  }