@limetech/lime-crm-building-blocks 1.126.4 → 1.127.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/CHANGELOG.md +14 -0
- package/dist/cjs/limebb-component-config.cjs.entry.js +26 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +1 -1
- package/dist/collection/components/component-command-picker/component-config/component-config.js +32 -1
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
- package/dist/components/limebb-component-config.js +1 -1
- package/dist/components/limebb-lime-query-builder.js +1 -1
- package/dist/esm/limebb-component-config.entry.js +26 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-88285dbb.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-885592cc.entry.js → p-a0fb1d65.entry.js} +1 -1
- package/dist/types/components/component-command-picker/component-config/component-config.d.ts +7 -0
- package/dist/types/components.d.ts +20 -0
- package/package.json +3 -3
- package/dist/lime-crm-building-blocks/p-a06a01fc.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.127.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.126.5...v1.127.0) (2026-06-02)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **component-config:** forward sibling picker's tag filter to the rendered config component ([319193d](https://github.com/Lundalogik/lime-crm-building-blocks/commit/319193d0b39ec8ab310c3309cb2369d66782bc02)), closes [#1447](https://github.com/Lundalogik/lime-crm-building-blocks/issues/1447)
|
|
7
|
+
|
|
8
|
+
## [1.126.5](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.126.4...v1.126.5) (2026-06-01)
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
* **lime-query-builder:** stop claiming empty limit means no limit ([bffd99b](https://github.com/Lundalogik/lime-crm-building-blocks/commit/bffd99b5dcb654562f675d4c02fe52a779bfb08a))
|
|
14
|
+
|
|
1
15
|
## [1.126.4](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.126.3...v1.126.4) (2026-05-28)
|
|
2
16
|
|
|
3
17
|
### Bug Fixes
|
|
@@ -70,6 +70,30 @@ const ComponentConfig = class {
|
|
|
70
70
|
return configComponent;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
getSiblingPickerTags() {
|
|
74
|
+
var _a, _b, _c, _d, _e;
|
|
75
|
+
const rootSchema = (_a = this.formInfo) === null || _a === void 0 ? void 0 : _a.rootSchema;
|
|
76
|
+
const dataPath = (_b = this.formInfo) === null || _b === void 0 ? void 0 : _b.schemaPath;
|
|
77
|
+
if (!rootSchema || !dataPath) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const parentDataPath = dataPath.slice(0, -1);
|
|
81
|
+
const parentSchemaPath = parentDataPath.flatMap((segment) => [
|
|
82
|
+
'properties',
|
|
83
|
+
segment,
|
|
84
|
+
]);
|
|
85
|
+
const siblings = get.get(rootSchema, [...parentSchemaPath, 'properties']);
|
|
86
|
+
if (!siblings || typeof siblings !== 'object') {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
for (const key of Object.keys(siblings)) {
|
|
90
|
+
const component = (_d = (_c = siblings[key]) === null || _c === void 0 ? void 0 : _c.lime) === null || _d === void 0 ? void 0 : _d.component;
|
|
91
|
+
if ((component === null || component === void 0 ? void 0 : component.name) === 'limebb-component-picker' &&
|
|
92
|
+
Array.isArray((_e = component === null || component === void 0 ? void 0 : component.props) === null || _e === void 0 ? void 0 : _e.tags)) {
|
|
93
|
+
return component.props.tags;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
73
97
|
render() {
|
|
74
98
|
return [this.renderHeader(), this.renderContent()];
|
|
75
99
|
}
|
|
@@ -102,9 +126,10 @@ const ComponentConfig = class {
|
|
|
102
126
|
}
|
|
103
127
|
renderConfigComponent() {
|
|
104
128
|
var _a, _b;
|
|
129
|
+
const tags = this.getSiblingPickerTags();
|
|
105
130
|
return (index.h(webComponentTemplate.LimeWebComponentTemplate, { class: "config-component", platform: this.platform, context: this.context,
|
|
106
131
|
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
107
|
-
name: (_a = this.configComponent) === null || _a === void 0 ? void 0 : _a.name, props: Object.assign(Object.assign({}, (_b = this.configComponent) === null || _b === void 0 ? void 0 : _b.props), { value: this.value, required: this.required, readonly: this.readonly, disabled: this.disabled, label: this.label, helperText: this.helperText, formInfo: this.formInfo }) }));
|
|
132
|
+
name: (_a = this.configComponent) === null || _a === void 0 ? void 0 : _a.name, props: Object.assign(Object.assign({}, (_b = this.configComponent) === null || _b === void 0 ? void 0 : _b.props), { value: this.value, required: this.required, readonly: this.readonly, disabled: this.disabled, label: this.label, helperText: this.helperText, formInfo: this.formInfo, tags: tags }) }));
|
|
108
133
|
}
|
|
109
134
|
getNameField() {
|
|
110
135
|
if (this.nameField) {
|
|
@@ -296,7 +296,7 @@ const LimeQueryBuilder = class {
|
|
|
296
296
|
if (!this.limetype) {
|
|
297
297
|
return;
|
|
298
298
|
}
|
|
299
|
-
return (index.h("section", { class: "query-options" }, index.h("limel-header", { class: "is-narrow", heading: "Query Options", icon: "ask_question" }), index.h("div", { class: "query-options-controls" }, index.h("limel-input-field", { label: "Limit", type: "number", value: ((_a = this.limit) === null || _a === void 0 ? void 0 : _a.toString()) || '', placeholder: "
|
|
299
|
+
return (index.h("section", { class: "query-options" }, index.h("limel-header", { class: "is-narrow", heading: "Query Options", icon: "ask_question" }), index.h("div", { class: "query-options-controls" }, index.h("limel-input-field", { label: "Limit", type: "number", value: ((_a = this.limit) === null || _a === void 0 ? void 0 : _a.toString()) || '', placeholder: "Enter a number", helperText: "Maximum number of results. When empty, a default limit is applied.", onChange: this.handleLimitChange }), index.h("limebb-lime-query-order-by-editor", { platform: this.platform, context: this.context, limetype: this.limetype, value: this.orderBy, onChange: this.handleOrderByChange }))));
|
|
300
300
|
}
|
|
301
301
|
renderVisualMode() {
|
|
302
302
|
return (index.h("div", { class: "visual-mode" }, this.renderLimetypeSection(), this.renderDescriptionSection(), this.renderResponseFormatSection(), this.renderFilterSection(), this.renderQueryOptionsSection()));
|
package/dist/collection/components/component-command-picker/component-config/component-config.js
CHANGED
|
@@ -6,10 +6,16 @@ import { get } from "lodash-es";
|
|
|
6
6
|
* This component must be used in a limel-form
|
|
7
7
|
* where the Command ID OR component name exists in the same section as the config.
|
|
8
8
|
*
|
|
9
|
+
* If the sibling picker declares a `tags` filter, that array is auto-forwarded
|
|
10
|
+
* to the rendered config component as a `tags` prop. Config components can opt
|
|
11
|
+
* in by accepting `tags` and using it to filter any nested pickers they render,
|
|
12
|
+
* so the inner picker inherits the outer filter without manual wiring.
|
|
13
|
+
*
|
|
9
14
|
* @beta
|
|
10
15
|
*
|
|
11
16
|
* @exampleComponent limebb-example-command-config
|
|
12
17
|
* @exampleComponent limebb-example-component-config
|
|
18
|
+
* @exampleComponent limebb-example-chained-command-config
|
|
13
19
|
*/
|
|
14
20
|
export class ComponentConfig {
|
|
15
21
|
constructor() {
|
|
@@ -70,6 +76,30 @@ export class ComponentConfig {
|
|
|
70
76
|
return configComponent;
|
|
71
77
|
}
|
|
72
78
|
}
|
|
79
|
+
getSiblingPickerTags() {
|
|
80
|
+
var _a, _b, _c, _d, _e;
|
|
81
|
+
const rootSchema = (_a = this.formInfo) === null || _a === void 0 ? void 0 : _a.rootSchema;
|
|
82
|
+
const dataPath = (_b = this.formInfo) === null || _b === void 0 ? void 0 : _b.schemaPath;
|
|
83
|
+
if (!rootSchema || !dataPath) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const parentDataPath = dataPath.slice(0, -1);
|
|
87
|
+
const parentSchemaPath = parentDataPath.flatMap((segment) => [
|
|
88
|
+
'properties',
|
|
89
|
+
segment,
|
|
90
|
+
]);
|
|
91
|
+
const siblings = get(rootSchema, [...parentSchemaPath, 'properties']);
|
|
92
|
+
if (!siblings || typeof siblings !== 'object') {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
for (const key of Object.keys(siblings)) {
|
|
96
|
+
const component = (_d = (_c = siblings[key]) === null || _c === void 0 ? void 0 : _c.lime) === null || _d === void 0 ? void 0 : _d.component;
|
|
97
|
+
if ((component === null || component === void 0 ? void 0 : component.name) === 'limebb-component-picker' &&
|
|
98
|
+
Array.isArray((_e = component === null || component === void 0 ? void 0 : component.props) === null || _e === void 0 ? void 0 : _e.tags)) {
|
|
99
|
+
return component.props.tags;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
73
103
|
render() {
|
|
74
104
|
return [this.renderHeader(), this.renderContent()];
|
|
75
105
|
}
|
|
@@ -102,9 +132,10 @@ export class ComponentConfig {
|
|
|
102
132
|
}
|
|
103
133
|
renderConfigComponent() {
|
|
104
134
|
var _a, _b;
|
|
135
|
+
const tags = this.getSiblingPickerTags();
|
|
105
136
|
return (h(LimeWebComponentTemplate, { class: "config-component", platform: this.platform, context: this.context,
|
|
106
137
|
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
107
|
-
name: (_a = this.configComponent) === null || _a === void 0 ? void 0 : _a.name, props: Object.assign(Object.assign({}, (_b = this.configComponent) === null || _b === void 0 ? void 0 : _b.props), { value: this.value, required: this.required, readonly: this.readonly, disabled: this.disabled, label: this.label, helperText: this.helperText, formInfo: this.formInfo }) }));
|
|
138
|
+
name: (_a = this.configComponent) === null || _a === void 0 ? void 0 : _a.name, props: Object.assign(Object.assign({}, (_b = this.configComponent) === null || _b === void 0 ? void 0 : _b.props), { value: this.value, required: this.required, readonly: this.readonly, disabled: this.disabled, label: this.label, helperText: this.helperText, formInfo: this.formInfo, tags: tags }) }));
|
|
108
139
|
}
|
|
109
140
|
getNameField() {
|
|
110
141
|
if (this.nameField) {
|
|
@@ -317,7 +317,7 @@ export class LimeQueryBuilder {
|
|
|
317
317
|
if (!this.limetype) {
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
320
|
-
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: "
|
|
320
|
+
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: "Enter a number", helperText: "Maximum number of results. When empty, a default limit is applied.", 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 }))));
|
|
321
321
|
}
|
|
322
322
|
renderVisualMode() {
|
|
323
323
|
return (h("div", { class: "visual-mode" }, this.renderLimetypeSection(), this.renderDescriptionSection(), this.renderResponseFormatSection(), this.renderFilterSection(), this.renderQueryOptionsSection()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as o,createEvent as e,h as i,transformTag as n}from"@stencil/core/internal/client";import{L as r}from"./web-component-template.js";import{b as s}from"./index.esm.js";import{g as l}from"./get.js";const c=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=e(this,"change",7),this.value={},this.type="component",this.configViewType="code",this.findConfigComponent=t=>{var o,e;return"component"===this.type?null===(o=this.registry.getAll().find((o=>o.name===t)))||void 0===o?void 0:o.configComponent:"command"===this.type?null===(e=this.commandbus.getAll().find((o=>o.id===t)))||void 0===e?void 0:e.configComponent:void 0},this.handleChangeMode=t=>{t.stopPropagation(),this.configViewType=t.detail.id},this.handleCodeEditorChange=t=>{t.stopPropagation();try{const o=JSON.parse(t.detail);this.change.emit(o)}catch(t){}}}componentWillLoad(){this.configComponent=this.getComponentName()}componentShouldUpdate(t,o,e){return"formInfo"!==e}watchFormInfo(){this.configComponent=this.getComponentName()}watchconfigComponent(t,o){t&&!o&&(this.configViewType="config"),t||(this.configViewType="code")}getComponentName(){var t,o,e;const i=[...null!==(o=null===(t=this.formInfo)||void 0===t?void 0:t.schemaPath.slice(0,-1))&&void 0!==o?o:[],this.getNameField()],n=l(null===(e=this.formInfo)||void 0===e?void 0:e.rootValue,i),r=this.findConfigComponent(n);if(r&&customElements.get(r.name))return r}getSiblingPickerTags(){var t,o,e,i,n;const r=null===(t=this.formInfo)||void 0===t?void 0:t.rootSchema,s=null===(o=this.formInfo)||void 0===o?void 0:o.schemaPath;if(!r||!s)return;const c=s.slice(0,-1).flatMap((t=>["properties",t])),d=l(r,[...c,"properties"]);if(d&&"object"==typeof d)for(const t of Object.keys(d)){const o=null===(i=null===(e=d[t])||void 0===e?void 0:e.lime)||void 0===i?void 0:i.component;if("limebb-component-picker"===(null==o?void 0:o.name)&&Array.isArray(null===(n=null==o?void 0:o.props)||void 0===n?void 0:n.tags))return o.props.tags}}render(){return[this.renderHeader(),this.renderContent()]}renderHeader(){let t=[];return this.configComponent&&(t=[{id:"config",title:"Config",selected:"config"===this.configViewType},{id:"code",title:"Code",selected:"code"===this.configViewType}]),i("limel-header",{icon:"edit_property",heading:this.label,subheading:this.helperText},i("limel-button-group",{slot:"actions",value:t,onChange:this.handleChangeMode}))}renderContent(){return"config"===this.configViewType?this.renderConfigComponent():this.renderCodeEditor()}renderCodeEditor(){return i("limel-code-editor",{value:JSON.stringify(this.value,null,"\t"),language:"json",readonly:this.readonly,lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeEditorChange})}renderConfigComponent(){var t,o;const e=this.getSiblingPickerTags();return i(r,{class:"config-component",platform:this.platform,context:this.context,name:null===(t=this.configComponent)||void 0===t?void 0:t.name,props:Object.assign(Object.assign({},null===(o=this.configComponent)||void 0===o?void 0:o.props),{value:this.value,required:this.required,readonly:this.readonly,disabled:this.disabled,label:this.label,helperText:this.helperText,formInfo:this.formInfo,tags:e})})}getNameField(){return this.nameField?this.nameField:{component:"name",command:"id"}[this.type]}get registry(){return this.platform.get(s.WebComponentRegistry)}get commandbus(){return this.platform.get(s.CommandBus)}static get watchers(){return{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}}static get style(){return":host(*){--header-background-color:rgb(var(--contrast-600));display:flex;flex-direction:column;border:1px dashed rgb(var(--contrast-700));overflow:clip;border-radius:0.75rem;background-color:rgb(var(--contrast-500))}*{box-sizing:border-box}.label{margin-top:1rem;margin-bottom:1rem}.config-component{display:grid;column-gap:1rem;row-gap:1rem;margin:1rem;grid-template-columns:repeat(3, minmax(0, 1fr))}"}},[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]},void 0,{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}]),d=c,m=function(){"undefined"!=typeof customElements&&["limebb-component-config"].forEach((t=>{"limebb-component-config"===t&&(customElements.get(n(t))||customElements.define(n(t),c))}))};export{d as LimebbComponentConfig,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,Host as s,transformTag as o}from"@stencil/core/internal/client";import{L as l}from"./index.esm.js";import{i as a}from"./lime-query-validation.js";import{d as m}from"./lime-query-filter-builder.js";import{d}from"./lime-query-filter-comparison.js";import{e as n,b as u,d as h}from"./lime-query-filter-expression.js";import{d as b}from"./order-by-editor.js";import{d as c}from"./order-by-item.js";import{d as p}from"./response-format-editor.js";import{d as f}from"./response-format-item.js";import{d as y}from"./lime-query-value-input.js";import{d as v}from"./limetype-field.js";import{d as g}from"./property-selector.js";const q=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.change=t(this,"change",7),this.mode="visual",this.codeValue="",this.limetype="",this.handleLimetypeChange=e=>{e.stopPropagation(),this.limetype=e.detail,this.filter=void 0,this.internalResponseFormat={object:{}},this.emitChange()},this.handleFilterChange=e=>{var i;e.stopPropagation(),this.filter=null!==(i=e.detail)&&void 0!==i?i:void 0,this.emitChange()},this.handleResponseFormatChange=e=>{e.stopPropagation(),this.internalResponseFormat=e.detail,this.emitChange()},this.handleLimitChange=e=>{e.stopPropagation();const i=e.detail;this.limit=i?Number.parseInt(i,10):void 0,this.emitChange()},this.handleOrderByChange=e=>{e.stopPropagation(),this.orderBy=e.detail,this.emitChange()},this.handleDescriptionChange=e=>{e.stopPropagation(),this.description=e.detail||void 0,this.emitChange()},this.handleDescriptionBlur=()=>{if(this.description){const e=this.description.trim();e!==this.description&&(this.description=e||void 0,this.emitChange())}},this.handleChange=e=>{e.stopPropagation();const i=e.detail.id;if("visual"===i)try{const e=JSON.parse(this.codeValue);if(!this.checkVisualModeSupport().visualModeSupported)return;this.limetype=e.limetype||"",this.filter=e.filter,this.internalResponseFormat=e.responseFormat,this.limit=e.limit,this.orderBy=e.orderBy,this.description=e["#description"],this.mode="visual",this.change.emit(e)}catch(e){}else"code"===i&&(this.updateCodeValue(),this.mode="code")},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=JSON.parse(this.codeValue);this.change.emit(e)}catch(e){}}}getButtons(){return[{id:"visual",title:"Visual"},{id:"code",title:"Code"}]}get visualModeEnabled(){var e,i,t;return null!==(t=null===(i=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===i?void 0:i.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){if(!this.visualModeEnabled)return this.mode="code",void this.updateCodeValue();this.value&&(this.limetype=this.value.limetype||"",this.filter=this.value.filter,this.internalResponseFormat=this.value.responseFormat,this.limit=this.value.limit,this.orderBy=this.value.orderBy,this.description=this.value["#description"]),this.updateCodeValue(),this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}render(){return r(s,{key:"9a121529165f1691e32b2b156b128977c5b5ba3a"},this.renderHeader(),this.renderContent())}renderContent(){const e=this.checkVisualModeSupport();return this.visualModeEnabled&&"code"!==this.mode?this.renderVisualMode():this.renderCodeMode(e)}emitChange(){"code"!==this.mode&&this.limetype&&this.change.emit(this.buildLimeQuery())}updateCodeValue(){this.codeValue=JSON.stringify(this.limetype?this.buildLimeQuery():this.value||{},null,2)}buildLimeQuery(){const e={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};return this.description&&(e["#description"]=this.description),void 0!==this.limit&&this.limit>0&&(e.limit=this.limit),this.orderBy&&this.orderBy.length>0&&(e.orderBy=this.orderBy),e}checkVisualModeSupport(){if(!this.limetypes)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};let e;if("code"===this.mode&&this.codeValue)try{e=JSON.parse(this.codeValue)}catch(e){return{valid:!1,visualModeSupported:!1,validationErrors:["Invalid JSON"],visualModeLimitations:[]}}else{if(!this.limetype)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};e={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter},void 0!==this.limit&&this.limit>0&&(e.limit=this.limit)}return a(e,this.limetypes,this.activeLimetype,this.visualModeEnabled)}renderModeSwitch(e){const i=!e.visualModeSupported,t=this.getButtons().map((e=>Object.assign(Object.assign({},e),{selected:e.id===this.mode})));return r("limel-button-group",{slot:"actions",onChange:this.handleChange,value:t,disabled:i})}renderCodeEditor(e){return[r("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&r("div",{class:"validation-errors"},r("strong",null,"Invalid Lime Query:"),r("ul",null,e.validationErrors.map((e=>r("li",null,e))))),this.visualModeEnabled&&e.valid&&!e.visualModeSupported&&e.visualModeLimitations.length>0&&r("div",{class:"visual-mode-limitations"},r("strong",null,"Cannot switch to visual mode:"),r("ul",null,e.visualModeLimitations.map((e=>r("li",null,e)))))]}renderLimetypeSection(){return r("limebb-limetype-field",{platform:this.platform,context:this.context,label:"Limetype",value:this.limetype,required:!0,fieldName:"limetype",onChange:this.handleLimetypeChange})}renderDescriptionSection(){if(this.limetype)return r("section",{class:"description"},r("limel-input-field",{label:"Description",type:"textarea",value:this.description||"",placeholder:"Describe what data this query retrieves...",helperText:"Optional: Help AI agents and humans understand the query purpose",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur}))}renderResponseFormatSection(){if(this.limetype)return r("section",{class:"response-format"},r("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalResponseFormat,onChange:this.handleResponseFormatChange}))}renderFilterSection(){if(this.limetype)return r("section",{class:"filter"},r("limel-header",{class:"is-narrow",heading:"Filter Conditions",icon:"-lime-filter"}),r("limebb-lime-query-filter-builder",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.filter,onExpressionChange:this.handleFilterChange}))}renderQueryOptionsSection(){var e;if(this.limetype)return r("section",{class:"query-options"},r("limel-header",{class:"is-narrow",heading:"Query Options",icon:"ask_question"}),r("div",{class:"query-options-controls"},r("limel-input-field",{label:"Limit",type:"number",value:(null===(e=this.limit)||void 0===e?void 0:""+e)||"",placeholder:"No limit",helperText:"Maximum number of results",onChange:this.handleLimitChange}),r("limebb-lime-query-order-by-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.orderBy,onChange:this.handleOrderByChange})))}renderVisualMode(){return r("div",{class:"visual-mode"},this.renderLimetypeSection(),this.renderDescriptionSection(),this.renderResponseFormatSection(),this.renderFilterSection(),this.renderQueryOptionsSection())}renderHeader(){const e=this.checkVisualModeSupport();return r("limel-header",{heading:this.label},this.renderModeControls(e))}renderModeControls(e){if(this.visualModeEnabled)return this.renderModeSwitch(e)}renderCodeMode(e){return r("div",{class:"code-mode"},this.renderCodeEditor(e))}static get style(){return"*,*:before,*:after{box-sizing:border-box}:host(limebb-lime-query-builder){--header-background-color:rgb(var(--contrast-500));--limebb-lime-query-builder-background-color:rgb(var(--contrast-100));--limebb-lime-query-builder-border-radius:0.75rem;--limebb-lime-query-builder-visual-mode-padding:1rem;--limebb-lime-query-builder-group-color:rgb(var(--color-sky-lighter));box-sizing:border-box;width:calc(100% - 1.5rem);margin:0.75rem auto;display:flex;flex-direction:column;border-radius:var(--limebb-lime-query-builder-border-radius);background-color:var(--limebb-lime-query-builder-background-color);box-shadow:var(--shadow-inflated-16)}.visual-mode{display:flex;flex-direction:column;gap:1rem;padding:var(--limebb-lime-query-builder-visual-mode-padding);border:1px solid var(--header-background-color);border-radius:0 0 var(--limebb-lime-query-builder-border-radius) var(--limebb-lime-query-builder-border-radius)}.code-mode{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-mode .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-mode .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .validation-errors ul{margin:0;padding-left:1.5rem}.code-mode .validation-errors li{margin:0.25rem 0}.code-mode .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-mode .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-mode .visual-mode-limitations li{margin:0.25rem 0}section.description,section.filter,section.query-options{display:flex;flex-direction:column;gap:1rem}section h4{margin:0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1000))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.query-options-controls{display:flex;flex-direction:column;gap:1rem}"}},[1,"limebb-lime-query-builder",{platform:[16],context:[16],value:[16],label:[1],activeLimetype:[1,"active-limetype"],limetypes:[32],mode:[32],codeValue:[32],limetype:[32],filter:[32],internalResponseFormat:[32],limit:[32],orderBy:[32],description:[32]}]);!function(e,i,t,r){var s,o=arguments.length,l=o<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,i,t,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(l=(o<3?s(l):o>3?s(i,t,l):s(i,t))||l);o>3&&l&&Object.defineProperty(i,t,l)}([l()],q.prototype,"limetypes",void 0);const x=q,k=function(){"undefined"!=typeof customElements&&["limebb-lime-query-builder","limebb-lime-query-filter-builder","limebb-lime-query-filter-comparison","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not","limebb-lime-query-order-by-editor","limebb-lime-query-order-by-item","limebb-lime-query-response-format-editor","limebb-lime-query-response-format-item","limebb-lime-query-value-input","limebb-limetype-field","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-builder":customElements.get(o(e))||customElements.define(o(e),q);break;case"limebb-lime-query-filter-builder":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||d();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||h();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||u();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||n();break;case"limebb-lime-query-order-by-editor":customElements.get(o(e))||b();break;case"limebb-lime-query-order-by-item":customElements.get(o(e))||c();break;case"limebb-lime-query-response-format-editor":customElements.get(o(e))||p();break;case"limebb-lime-query-response-format-item":customElements.get(o(e))||f();break;case"limebb-lime-query-value-input":customElements.get(o(e))||y();break;case"limebb-limetype-field":customElements.get(o(e))||v();break;case"limebb-property-selector":customElements.get(o(e))||g()}}))};export{x as LimebbLimeQueryBuilder,k as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,Host as s,transformTag as o}from"@stencil/core/internal/client";import{L as l}from"./index.esm.js";import{i as a}from"./lime-query-validation.js";import{d as m}from"./lime-query-filter-builder.js";import{d}from"./lime-query-filter-comparison.js";import{e as n,b as u,d as h}from"./lime-query-filter-expression.js";import{d as b}from"./order-by-editor.js";import{d as c}from"./order-by-item.js";import{d as p}from"./response-format-editor.js";import{d as f}from"./response-format-item.js";import{d as y}from"./lime-query-value-input.js";import{d as v}from"./limetype-field.js";import{d as g}from"./property-selector.js";const q=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.change=t(this,"change",7),this.mode="visual",this.codeValue="",this.limetype="",this.handleLimetypeChange=e=>{e.stopPropagation(),this.limetype=e.detail,this.filter=void 0,this.internalResponseFormat={object:{}},this.emitChange()},this.handleFilterChange=e=>{var i;e.stopPropagation(),this.filter=null!==(i=e.detail)&&void 0!==i?i:void 0,this.emitChange()},this.handleResponseFormatChange=e=>{e.stopPropagation(),this.internalResponseFormat=e.detail,this.emitChange()},this.handleLimitChange=e=>{e.stopPropagation();const i=e.detail;this.limit=i?Number.parseInt(i,10):void 0,this.emitChange()},this.handleOrderByChange=e=>{e.stopPropagation(),this.orderBy=e.detail,this.emitChange()},this.handleDescriptionChange=e=>{e.stopPropagation(),this.description=e.detail||void 0,this.emitChange()},this.handleDescriptionBlur=()=>{if(this.description){const e=this.description.trim();e!==this.description&&(this.description=e||void 0,this.emitChange())}},this.handleChange=e=>{e.stopPropagation();const i=e.detail.id;if("visual"===i)try{const e=JSON.parse(this.codeValue);if(!this.checkVisualModeSupport().visualModeSupported)return;this.limetype=e.limetype||"",this.filter=e.filter,this.internalResponseFormat=e.responseFormat,this.limit=e.limit,this.orderBy=e.orderBy,this.description=e["#description"],this.mode="visual",this.change.emit(e)}catch(e){}else"code"===i&&(this.updateCodeValue(),this.mode="code")},this.handleCodeChange=e=>{e.stopPropagation(),this.codeValue=e.detail;try{const e=JSON.parse(this.codeValue);this.change.emit(e)}catch(e){}}}getButtons(){return[{id:"visual",title:"Visual"},{id:"code",title:"Code"}]}get visualModeEnabled(){var e,i,t;return null!==(t=null===(i=null===(e=this.platform)||void 0===e?void 0:e.isFeatureEnabled)||void 0===i?void 0:i.call(e,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){if(!this.visualModeEnabled)return this.mode="code",void this.updateCodeValue();this.value&&(this.limetype=this.value.limetype||"",this.filter=this.value.filter,this.internalResponseFormat=this.value.responseFormat,this.limit=this.value.limit,this.orderBy=this.value.orderBy,this.description=this.value["#description"]),this.updateCodeValue(),this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}render(){return r(s,{key:"9a121529165f1691e32b2b156b128977c5b5ba3a"},this.renderHeader(),this.renderContent())}renderContent(){const e=this.checkVisualModeSupport();return this.visualModeEnabled&&"code"!==this.mode?this.renderVisualMode():this.renderCodeMode(e)}emitChange(){"code"!==this.mode&&this.limetype&&this.change.emit(this.buildLimeQuery())}updateCodeValue(){this.codeValue=JSON.stringify(this.limetype?this.buildLimeQuery():this.value||{},null,2)}buildLimeQuery(){const e={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};return this.description&&(e["#description"]=this.description),void 0!==this.limit&&this.limit>0&&(e.limit=this.limit),this.orderBy&&this.orderBy.length>0&&(e.orderBy=this.orderBy),e}checkVisualModeSupport(){if(!this.limetypes)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};let e;if("code"===this.mode&&this.codeValue)try{e=JSON.parse(this.codeValue)}catch(e){return{valid:!1,visualModeSupported:!1,validationErrors:["Invalid JSON"],visualModeLimitations:[]}}else{if(!this.limetype)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};e={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter},void 0!==this.limit&&this.limit>0&&(e.limit=this.limit)}return a(e,this.limetypes,this.activeLimetype,this.visualModeEnabled)}renderModeSwitch(e){const i=!e.visualModeSupported,t=this.getButtons().map((e=>Object.assign(Object.assign({},e),{selected:e.id===this.mode})));return r("limel-button-group",{slot:"actions",onChange:this.handleChange,value:t,disabled:i})}renderCodeEditor(e){return[r("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!e.valid&&e.validationErrors.length>0&&r("div",{class:"validation-errors"},r("strong",null,"Invalid Lime Query:"),r("ul",null,e.validationErrors.map((e=>r("li",null,e))))),this.visualModeEnabled&&e.valid&&!e.visualModeSupported&&e.visualModeLimitations.length>0&&r("div",{class:"visual-mode-limitations"},r("strong",null,"Cannot switch to visual mode:"),r("ul",null,e.visualModeLimitations.map((e=>r("li",null,e)))))]}renderLimetypeSection(){return r("limebb-limetype-field",{platform:this.platform,context:this.context,label:"Limetype",value:this.limetype,required:!0,fieldName:"limetype",onChange:this.handleLimetypeChange})}renderDescriptionSection(){if(this.limetype)return r("section",{class:"description"},r("limel-input-field",{label:"Description",type:"textarea",value:this.description||"",placeholder:"Describe what data this query retrieves...",helperText:"Optional: Help AI agents and humans understand the query purpose",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur}))}renderResponseFormatSection(){if(this.limetype)return r("section",{class:"response-format"},r("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalResponseFormat,onChange:this.handleResponseFormatChange}))}renderFilterSection(){if(this.limetype)return r("section",{class:"filter"},r("limel-header",{class:"is-narrow",heading:"Filter Conditions",icon:"-lime-filter"}),r("limebb-lime-query-filter-builder",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.filter,onExpressionChange:this.handleFilterChange}))}renderQueryOptionsSection(){var e;if(this.limetype)return r("section",{class:"query-options"},r("limel-header",{class:"is-narrow",heading:"Query Options",icon:"ask_question"}),r("div",{class:"query-options-controls"},r("limel-input-field",{label:"Limit",type:"number",value:(null===(e=this.limit)||void 0===e?void 0:""+e)||"",placeholder:"Enter a number",helperText:"Maximum number of results. When empty, a default limit is applied.",onChange:this.handleLimitChange}),r("limebb-lime-query-order-by-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.orderBy,onChange:this.handleOrderByChange})))}renderVisualMode(){return r("div",{class:"visual-mode"},this.renderLimetypeSection(),this.renderDescriptionSection(),this.renderResponseFormatSection(),this.renderFilterSection(),this.renderQueryOptionsSection())}renderHeader(){const e=this.checkVisualModeSupport();return r("limel-header",{heading:this.label},this.renderModeControls(e))}renderModeControls(e){if(this.visualModeEnabled)return this.renderModeSwitch(e)}renderCodeMode(e){return r("div",{class:"code-mode"},this.renderCodeEditor(e))}static get style(){return"*,*:before,*:after{box-sizing:border-box}:host(limebb-lime-query-builder){--header-background-color:rgb(var(--contrast-500));--limebb-lime-query-builder-background-color:rgb(var(--contrast-100));--limebb-lime-query-builder-border-radius:0.75rem;--limebb-lime-query-builder-visual-mode-padding:1rem;--limebb-lime-query-builder-group-color:rgb(var(--color-sky-lighter));box-sizing:border-box;width:calc(100% - 1.5rem);margin:0.75rem auto;display:flex;flex-direction:column;border-radius:var(--limebb-lime-query-builder-border-radius);background-color:var(--limebb-lime-query-builder-background-color);box-shadow:var(--shadow-inflated-16)}.visual-mode{display:flex;flex-direction:column;gap:1rem;padding:var(--limebb-lime-query-builder-visual-mode-padding);border:1px solid var(--header-background-color);border-radius:0 0 var(--limebb-lime-query-builder-border-radius) var(--limebb-lime-query-builder-border-radius)}.code-mode{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-mode .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-mode .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .validation-errors ul{margin:0;padding-left:1.5rem}.code-mode .validation-errors li{margin:0.25rem 0}.code-mode .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-mode .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-mode .visual-mode-limitations li{margin:0.25rem 0}section.description,section.filter,section.query-options{display:flex;flex-direction:column;gap:1rem}section h4{margin:0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1000))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.query-options-controls{display:flex;flex-direction:column;gap:1rem}"}},[1,"limebb-lime-query-builder",{platform:[16],context:[16],value:[16],label:[1],activeLimetype:[1,"active-limetype"],limetypes:[32],mode:[32],codeValue:[32],limetype:[32],filter:[32],internalResponseFormat:[32],limit:[32],orderBy:[32],description:[32]}]);!function(e,i,t,r){var s,o=arguments.length,l=o<3?i:null===r?r=Object.getOwnPropertyDescriptor(i,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,i,t,r);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(l=(o<3?s(l):o>3?s(i,t,l):s(i,t))||l);o>3&&l&&Object.defineProperty(i,t,l)}([l()],q.prototype,"limetypes",void 0);const x=q,k=function(){"undefined"!=typeof customElements&&["limebb-lime-query-builder","limebb-lime-query-filter-builder","limebb-lime-query-filter-comparison","limebb-lime-query-filter-expression","limebb-lime-query-filter-group","limebb-lime-query-filter-not","limebb-lime-query-order-by-editor","limebb-lime-query-order-by-item","limebb-lime-query-response-format-editor","limebb-lime-query-response-format-item","limebb-lime-query-value-input","limebb-limetype-field","limebb-property-selector"].forEach((e=>{switch(e){case"limebb-lime-query-builder":customElements.get(o(e))||customElements.define(o(e),q);break;case"limebb-lime-query-filter-builder":customElements.get(o(e))||m();break;case"limebb-lime-query-filter-comparison":customElements.get(o(e))||d();break;case"limebb-lime-query-filter-expression":customElements.get(o(e))||h();break;case"limebb-lime-query-filter-group":customElements.get(o(e))||u();break;case"limebb-lime-query-filter-not":customElements.get(o(e))||n();break;case"limebb-lime-query-order-by-editor":customElements.get(o(e))||b();break;case"limebb-lime-query-order-by-item":customElements.get(o(e))||c();break;case"limebb-lime-query-response-format-editor":customElements.get(o(e))||p();break;case"limebb-lime-query-response-format-item":customElements.get(o(e))||f();break;case"limebb-lime-query-value-input":customElements.get(o(e))||y();break;case"limebb-limetype-field":customElements.get(o(e))||v();break;case"limebb-property-selector":customElements.get(o(e))||g()}}))};export{x as LimebbLimeQueryBuilder,k as defineCustomElement}
|
|
@@ -68,6 +68,30 @@ const ComponentConfig = class {
|
|
|
68
68
|
return configComponent;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
getSiblingPickerTags() {
|
|
72
|
+
var _a, _b, _c, _d, _e;
|
|
73
|
+
const rootSchema = (_a = this.formInfo) === null || _a === void 0 ? void 0 : _a.rootSchema;
|
|
74
|
+
const dataPath = (_b = this.formInfo) === null || _b === void 0 ? void 0 : _b.schemaPath;
|
|
75
|
+
if (!rootSchema || !dataPath) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const parentDataPath = dataPath.slice(0, -1);
|
|
79
|
+
const parentSchemaPath = parentDataPath.flatMap((segment) => [
|
|
80
|
+
'properties',
|
|
81
|
+
segment,
|
|
82
|
+
]);
|
|
83
|
+
const siblings = get(rootSchema, [...parentSchemaPath, 'properties']);
|
|
84
|
+
if (!siblings || typeof siblings !== 'object') {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
for (const key of Object.keys(siblings)) {
|
|
88
|
+
const component = (_d = (_c = siblings[key]) === null || _c === void 0 ? void 0 : _c.lime) === null || _d === void 0 ? void 0 : _d.component;
|
|
89
|
+
if ((component === null || component === void 0 ? void 0 : component.name) === 'limebb-component-picker' &&
|
|
90
|
+
Array.isArray((_e = component === null || component === void 0 ? void 0 : component.props) === null || _e === void 0 ? void 0 : _e.tags)) {
|
|
91
|
+
return component.props.tags;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
71
95
|
render() {
|
|
72
96
|
return [this.renderHeader(), this.renderContent()];
|
|
73
97
|
}
|
|
@@ -100,9 +124,10 @@ const ComponentConfig = class {
|
|
|
100
124
|
}
|
|
101
125
|
renderConfigComponent() {
|
|
102
126
|
var _a, _b;
|
|
127
|
+
const tags = this.getSiblingPickerTags();
|
|
103
128
|
return (h(LimeWebComponentTemplate, { class: "config-component", platform: this.platform, context: this.context,
|
|
104
129
|
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
105
|
-
name: (_a = this.configComponent) === null || _a === void 0 ? void 0 : _a.name, props: Object.assign(Object.assign({}, (_b = this.configComponent) === null || _b === void 0 ? void 0 : _b.props), { value: this.value, required: this.required, readonly: this.readonly, disabled: this.disabled, label: this.label, helperText: this.helperText, formInfo: this.formInfo }) }));
|
|
130
|
+
name: (_a = this.configComponent) === null || _a === void 0 ? void 0 : _a.name, props: Object.assign(Object.assign({}, (_b = this.configComponent) === null || _b === void 0 ? void 0 : _b.props), { value: this.value, required: this.required, readonly: this.readonly, disabled: this.disabled, label: this.label, helperText: this.helperText, formInfo: this.formInfo, tags: tags }) }));
|
|
106
131
|
}
|
|
107
132
|
getNameField() {
|
|
108
133
|
if (this.nameField) {
|
|
@@ -294,7 +294,7 @@ const LimeQueryBuilder = class {
|
|
|
294
294
|
if (!this.limetype) {
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
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: "
|
|
297
|
+
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: "Enter a number", helperText: "Maximum number of results. When empty, a default limit is applied.", 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 }))));
|
|
298
298
|
}
|
|
299
299
|
renderVisualMode() {
|
|
300
300
|
return (h("div", { class: "visual-mode" }, this.renderLimetypeSection(), this.renderDescriptionSection(), this.renderResponseFormatSection(), this.renderFilterSection(), this.renderQueryOptionsSection()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-BIwHMk6j.js";export{s as setNonce}from"./p-BIwHMk6j.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((async e=>(await l(),t(JSON.parse('[["p-885592cc",[[1,"limebb-lime-query-builder",{"platform":[16],"context":[16],"value":[16],"label":[1],"activeLimetype":[1,"active-limetype"],"limetypes":[32],"mode":[32],"codeValue":[32],"limetype":[32],"filter":[32],"internalResponseFormat":[32],"limit":[32],"orderBy":[32],"description":[32]}]]],["p-56a65792",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[513],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":[{"highlightedItemIdChanged":0}]}]]],["p-3252e153",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["p-faa89d77",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":[{"handleItemsChange":0}],"order":[{"handleItemsChange":0}]}]]],["p-5c5788de",[[1,"limebb-lime-query-response-format-builder",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"helperText":[1,"helper-text"],"limetypes":[32],"mode":[32],"codeValue":[32],"internalValue":[32]}]]],["p-c6a913af",[[1,"limebb-document-chips",{"accessibleLabel":[513,"accessible-label"],"files":[16]},null,{"files":[{"onFilesChanged":0}]}]]],["p-cf76665c",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["p-8c8bbbd4",[[17,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":[{"watchOpen":0}],"editorPickerQuery":[{"watchQuery":0}]}]]],["p-bb3f1fa5",[[1,"limebb-data-cells",{"platform":[16],"context":[16],"limeobject":[8],"items":[16],"image":[16],"relativeDates":[4,"relative-dates"]}]]],["p-2cb31064",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["p-c609b5ec",[[1,"limebb-document-picker",{"platform":[16],"context":[16],"items":[16],"label":[513],"helperText":[513,"helper-text"],"invalid":[516],"required":[516],"type":[513]}]]],["p-b2383e7f",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["p-a9ffe56f",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":[{"handleItemsChange":0}]}]]],["p-4e5f55aa",[[1,"limebb-rule-editor",{"platform":[16],"context":[16],"value":[16],"availableContexts":[16],"required":[516],"readonly":[516],"disabled":[516],"label":[513],"helperText":[1,"helper-text"],"issues":[32],"openChipPath":[32]},null,{"value":[{"onValueChange":0}],"availableContexts":[{"onAvailableContextsChange":0}]}]]],["p-8d3fa274",[[257,"limebb-alert-dialog",{"type":[513],"open":[516],"icon":[513],"heading":[513],"subheading":[1]}]]],["p-01ecd249",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["p-1747221f",[[1,"limebb-color-palette-picker",{"value":[513],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"label":[513],"helperText":[1,"helper-text"]}]]],["p-861ac606",[[1,"limebb-color-palette-swatches",{"colors":[16]}]]],["p-a06a01fc",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]},null,{"formInfo":[{"watchFormInfo":0}],"configComponent":[{"watchconfigComponent":0}]}]]],["p-5496f907",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["p-0ee533c9",[[257,"limebb-composer-toolbar",{"platform":[16],"mentions":[516],"textSnippets":[516,"text-snippets"],"internalLinks":[516,"internal-links"],"richText":[516,"rich-text"],"fileInput":[16]}]]],["p-20206710",[[257,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["p-25d8a718",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["p-e79208ba",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[513,"filter-id"],"disabled":[4],"icon":[513],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"format":[16],"config":[32],"filters":[32],"value":[32],"loading":[32],"error":[32],"limetypes":[32]},null,{"filterId":[{"watchFilterId":0}],"propertyName":[{"watchPropertyName":0}],"aggregateOperator":[{"watchAggregateOperator":0}]}]]],["p-1428aa13",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["p-dabb227b",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["p-bec4231f",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["p-32f8477f",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["p-3263f8d5",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["p-625623b7",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["p-5b830c09",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["p-148fe32c",[[257,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["p-de6f4670",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["p-38c2fe60",[[1,"limebb-object-chip",{"limetype":[1],"objectid":[2],"size":[1],"platform":[16],"data":[32]},null,{"limetype":[{"handlePropChange":0}],"objectid":[{"handlePropChange":0}]}]]],["p-6226829d",[[257,"limebb-rule-gate",{"platform":[16],"rule":[16],"scope":[16],"shouldRender":[32]},null,{"rule":[{"onRuleChange":0}],"scope":[{"onScopeChange":0}]}]]],["p-b328389c",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":[{"valueChanged":0}]}]]],["p-184ae23d",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["p-931ef83d",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["p-9bc6a1b7",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["p-fe4811a1",[[1,"limebb-currency-picker",{"platform":[16],"context":[16],"label":[513],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[1]}]]],["p-6cceabf1",[[17,"limebb-document-item",{"platform":[16],"context":[16],"item":[16],"type":[513],"fileTypes":[16]}]]],["p-4446f170",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]],["p-d2a01f51",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":[{"watchOpen":0}]}]]],["p-4f1eca0d",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["p-0c572fe9",[[1,"limebb-live-docs-info"]]],["p-82af1ade",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-7cc615c8",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":[{"valueChanged":0}]}]]],["p-e6374017",[[1,"limebb-rule-chip-popover",{"platform":[16],"context":[16],"refNode":[16],"isNegated":[4,"is-negated"],"metadata":[16],"readonly":[4],"disabled":[4],"isMutable":[4,"is-mutable"]}]]],["p-3fd4e0a1",[[257,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-16d36b76",[[1,"limebb-property-selector",{"platform":[16],"context":[16],"limetype":[1],"value":[1],"label":[1],"required":[4],"helperText":[1,"helper-text"],"limetypes":[32],"isOpen":[32],"navigationPath":[32]}]]],["p-731820f0",[[1,"limebb-lime-query-order-by-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16]}]]],["p-3e4cc2a1",[[1,"limebb-lime-query-filter-builder",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-order-by-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]},null,{"value":[{"handleValueChange":0}]}],[0,"limebb-limetype-field",{"platform":[16],"context":[16],"label":[513],"required":[516],"readonly":[516],"disabled":[516],"value":[513],"helperText":[513,"helper-text"],"invalid":[4],"limetypes":[16],"propertyFields":[16],"fieldName":[1,"field-name"],"formInfo":[16]}]]],["p-6af7d0d2",[[1,"limebb-chat-icon-list",{"item":[16]}],[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-7fee7ef3",[[1,"limebb-lime-query-response-format-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]}],[1,"limebb-lime-query-response-format-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16],"showAliasInput":[32],"showDescriptionInput":[32]}]]],["p-50e5c571",[[1,"limebb-lime-query-filter-expression",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-filter-comparison",{"platform":[16],"context":[16],"label":[513],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]],["p-9f7992b0",[[257,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"file":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["p-7759fc0c",[[1,"limebb-lime-query-value-input",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"propertyPath":[1,"property-path"],"operator":[1],"value":[8],"label":[1],"limetypes":[32],"inputMode":[32]}],[1,"limebb-lime-query-filter-group",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16],"value":[32]}],[1,"limebb-lime-query-filter-not",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]]]'),e))));
|
|
1
|
+
import{p as e,b as t}from"./p-BIwHMk6j.js";export{s as setNonce}from"./p-BIwHMk6j.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((async e=>(await l(),t(JSON.parse('[["p-a0fb1d65",[[1,"limebb-lime-query-builder",{"platform":[16],"context":[16],"value":[16],"label":[1],"activeLimetype":[1,"active-limetype"],"limetypes":[32],"mode":[32],"codeValue":[32],"limetype":[32],"filter":[32],"internalResponseFormat":[32],"limit":[32],"orderBy":[32],"description":[32]}]]],["p-56a65792",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[513],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":[{"highlightedItemIdChanged":0}]}]]],["p-3252e153",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["p-faa89d77",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":[{"handleItemsChange":0}],"order":[{"handleItemsChange":0}]}]]],["p-5c5788de",[[1,"limebb-lime-query-response-format-builder",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"helperText":[1,"helper-text"],"limetypes":[32],"mode":[32],"codeValue":[32],"internalValue":[32]}]]],["p-c6a913af",[[1,"limebb-document-chips",{"accessibleLabel":[513,"accessible-label"],"files":[16]},null,{"files":[{"onFilesChanged":0}]}]]],["p-cf76665c",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["p-8c8bbbd4",[[17,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":[{"watchOpen":0}],"editorPickerQuery":[{"watchQuery":0}]}]]],["p-bb3f1fa5",[[1,"limebb-data-cells",{"platform":[16],"context":[16],"limeobject":[8],"items":[16],"image":[16],"relativeDates":[4,"relative-dates"]}]]],["p-2cb31064",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["p-c609b5ec",[[1,"limebb-document-picker",{"platform":[16],"context":[16],"items":[16],"label":[513],"helperText":[513,"helper-text"],"invalid":[516],"required":[516],"type":[513]}]]],["p-b2383e7f",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["p-a9ffe56f",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":[{"handleItemsChange":0}]}]]],["p-4e5f55aa",[[1,"limebb-rule-editor",{"platform":[16],"context":[16],"value":[16],"availableContexts":[16],"required":[516],"readonly":[516],"disabled":[516],"label":[513],"helperText":[1,"helper-text"],"issues":[32],"openChipPath":[32]},null,{"value":[{"onValueChange":0}],"availableContexts":[{"onAvailableContextsChange":0}]}]]],["p-8d3fa274",[[257,"limebb-alert-dialog",{"type":[513],"open":[516],"icon":[513],"heading":[513],"subheading":[1]}]]],["p-01ecd249",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["p-1747221f",[[1,"limebb-color-palette-picker",{"value":[513],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"label":[513],"helperText":[1,"helper-text"]}]]],["p-861ac606",[[1,"limebb-color-palette-swatches",{"colors":[16]}]]],["p-88285dbb",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]},null,{"formInfo":[{"watchFormInfo":0}],"configComponent":[{"watchconfigComponent":0}]}]]],["p-5496f907",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["p-0ee533c9",[[257,"limebb-composer-toolbar",{"platform":[16],"mentions":[516],"textSnippets":[516,"text-snippets"],"internalLinks":[516,"internal-links"],"richText":[516,"rich-text"],"fileInput":[16]}]]],["p-20206710",[[257,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["p-25d8a718",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["p-e79208ba",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[513,"filter-id"],"disabled":[4],"icon":[513],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"format":[16],"config":[32],"filters":[32],"value":[32],"loading":[32],"error":[32],"limetypes":[32]},null,{"filterId":[{"watchFilterId":0}],"propertyName":[{"watchPropertyName":0}],"aggregateOperator":[{"watchAggregateOperator":0}]}]]],["p-1428aa13",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["p-dabb227b",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["p-bec4231f",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["p-32f8477f",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["p-3263f8d5",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["p-625623b7",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["p-5b830c09",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["p-148fe32c",[[257,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["p-de6f4670",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["p-38c2fe60",[[1,"limebb-object-chip",{"limetype":[1],"objectid":[2],"size":[1],"platform":[16],"data":[32]},null,{"limetype":[{"handlePropChange":0}],"objectid":[{"handlePropChange":0}]}]]],["p-6226829d",[[257,"limebb-rule-gate",{"platform":[16],"rule":[16],"scope":[16],"shouldRender":[32]},null,{"rule":[{"onRuleChange":0}],"scope":[{"onScopeChange":0}]}]]],["p-b328389c",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":[{"valueChanged":0}]}]]],["p-184ae23d",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["p-931ef83d",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["p-9bc6a1b7",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["p-fe4811a1",[[1,"limebb-currency-picker",{"platform":[16],"context":[16],"label":[513],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[1]}]]],["p-6cceabf1",[[17,"limebb-document-item",{"platform":[16],"context":[16],"item":[16],"type":[513],"fileTypes":[16]}]]],["p-4446f170",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]],["p-d2a01f51",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":[{"watchOpen":0}]}]]],["p-4f1eca0d",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["p-0c572fe9",[[1,"limebb-live-docs-info"]]],["p-82af1ade",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-7cc615c8",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":[{"valueChanged":0}]}]]],["p-e6374017",[[1,"limebb-rule-chip-popover",{"platform":[16],"context":[16],"refNode":[16],"isNegated":[4,"is-negated"],"metadata":[16],"readonly":[4],"disabled":[4],"isMutable":[4,"is-mutable"]}]]],["p-3fd4e0a1",[[257,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-16d36b76",[[1,"limebb-property-selector",{"platform":[16],"context":[16],"limetype":[1],"value":[1],"label":[1],"required":[4],"helperText":[1,"helper-text"],"limetypes":[32],"isOpen":[32],"navigationPath":[32]}]]],["p-731820f0",[[1,"limebb-lime-query-order-by-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16]}]]],["p-3e4cc2a1",[[1,"limebb-lime-query-filter-builder",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-order-by-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]},null,{"value":[{"handleValueChange":0}]}],[0,"limebb-limetype-field",{"platform":[16],"context":[16],"label":[513],"required":[516],"readonly":[516],"disabled":[516],"value":[513],"helperText":[513,"helper-text"],"invalid":[4],"limetypes":[16],"propertyFields":[16],"fieldName":[1,"field-name"],"formInfo":[16]}]]],["p-6af7d0d2",[[1,"limebb-chat-icon-list",{"item":[16]}],[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-7fee7ef3",[[1,"limebb-lime-query-response-format-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]}],[1,"limebb-lime-query-response-format-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16],"showAliasInput":[32],"showDescriptionInput":[32]}]]],["p-50e5c571",[[1,"limebb-lime-query-filter-expression",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-filter-comparison",{"platform":[16],"context":[16],"label":[513],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]],["p-9f7992b0",[[257,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"file":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["p-7759fc0c",[[1,"limebb-lime-query-value-input",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"propertyPath":[1,"property-path"],"operator":[1],"value":[8],"label":[1],"limetypes":[32],"inputMode":[32]}],[1,"limebb-lime-query-filter-group",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16],"value":[32]}],[1,"limebb-lime-query-filter-not",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]]]'),e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as i}from"./p-BIwHMk6j.js";import{L as e}from"./p-C_tMNOSt.js";import{b as n}from"./p-ndni-0im.js";import{g as r}from"./p-BsH0YW6Z.js";import"./p-BgAfMcRA.js";import"./p-6PYziigk.js";const s=class{constructor(i){t(this,i),this.change=o(this,"change"),this.value={},this.type="component",this.configViewType="code",this.findConfigComponent=t=>{var o,i;return"component"===this.type?null===(o=this.registry.getAll().find((o=>o.name===t)))||void 0===o?void 0:o.configComponent:"command"===this.type?null===(i=this.commandbus.getAll().find((o=>o.id===t)))||void 0===i?void 0:i.configComponent:void 0},this.handleChangeMode=t=>{t.stopPropagation(),this.configViewType=t.detail.id},this.handleCodeEditorChange=t=>{t.stopPropagation();try{const o=JSON.parse(t.detail);this.change.emit(o)}catch(t){}}}componentWillLoad(){this.configComponent=this.getComponentName()}componentShouldUpdate(t,o,i){return"formInfo"!==i}watchFormInfo(){this.configComponent=this.getComponentName()}watchconfigComponent(t,o){t&&!o&&(this.configViewType="config"),t||(this.configViewType="code")}getComponentName(){var t,o,i;const e=[...null!==(o=null===(t=this.formInfo)||void 0===t?void 0:t.schemaPath.slice(0,-1))&&void 0!==o?o:[],this.getNameField()],n=r(null===(i=this.formInfo)||void 0===i?void 0:i.rootValue,e),s=this.findConfigComponent(n);if(s&&customElements.get(s.name))return s}getSiblingPickerTags(){var t,o,i,e,n;const s=null===(t=this.formInfo)||void 0===t?void 0:t.rootSchema,l=null===(o=this.formInfo)||void 0===o?void 0:o.schemaPath;if(!s||!l)return;const d=l.slice(0,-1).flatMap((t=>["properties",t])),h=r(s,[...d,"properties"]);if(h&&"object"==typeof h)for(const t of Object.keys(h)){const o=null===(e=null===(i=h[t])||void 0===i?void 0:i.lime)||void 0===e?void 0:e.component;if("limebb-component-picker"===(null==o?void 0:o.name)&&Array.isArray(null===(n=null==o?void 0:o.props)||void 0===n?void 0:n.tags))return o.props.tags}}render(){return[this.renderHeader(),this.renderContent()]}renderHeader(){let t=[];return this.configComponent&&(t=[{id:"config",title:"Config",selected:"config"===this.configViewType},{id:"code",title:"Code",selected:"code"===this.configViewType}]),i("limel-header",{icon:"edit_property",heading:this.label,subheading:this.helperText},i("limel-button-group",{slot:"actions",value:t,onChange:this.handleChangeMode}))}renderContent(){return"config"===this.configViewType?this.renderConfigComponent():this.renderCodeEditor()}renderCodeEditor(){return i("limel-code-editor",{value:JSON.stringify(this.value,null,"\t"),language:"json",readonly:this.readonly,lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeEditorChange})}renderConfigComponent(){var t,o;const n=this.getSiblingPickerTags();return i(e,{class:"config-component",platform:this.platform,context:this.context,name:null===(t=this.configComponent)||void 0===t?void 0:t.name,props:Object.assign(Object.assign({},null===(o=this.configComponent)||void 0===o?void 0:o.props),{value:this.value,required:this.required,readonly:this.readonly,disabled:this.disabled,label:this.label,helperText:this.helperText,formInfo:this.formInfo,tags:n})})}getNameField(){return this.nameField?this.nameField:{component:"name",command:"id"}[this.type]}get registry(){return this.platform.get(n.WebComponentRegistry)}get commandbus(){return this.platform.get(n.CommandBus)}static get watchers(){return{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}}};s.style=":host(*){--header-background-color:rgb(var(--contrast-600));display:flex;flex-direction:column;border:1px dashed rgb(var(--contrast-700));overflow:clip;border-radius:0.75rem;background-color:rgb(var(--contrast-500))}*{box-sizing:border-box}.label{margin-top:1rem;margin-bottom:1rem}.config-component{display:grid;column-gap:1rem;row-gap:1rem;margin:1rem;grid-template-columns:repeat(3, minmax(0, 1fr))}";export{s as limebb_component_config}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as e,h as t,H as r}from"./p-BIwHMk6j.js";import{L as s}from"./p-ndni-0im.js";import{i as o}from"./p-VjTMZY3E.js";import"./p-CQUZjrU4.js";const l=class{constructor(t){i(this,t),this.change=e(this,"change"),this.mode="visual",this.codeValue="",this.limetype="",this.handleLimetypeChange=i=>{i.stopPropagation(),this.limetype=i.detail,this.filter=void 0,this.internalResponseFormat={object:{}},this.emitChange()},this.handleFilterChange=i=>{var e;i.stopPropagation(),this.filter=null!==(e=i.detail)&&void 0!==e?e:void 0,this.emitChange()},this.handleResponseFormatChange=i=>{i.stopPropagation(),this.internalResponseFormat=i.detail,this.emitChange()},this.handleLimitChange=i=>{i.stopPropagation();const e=i.detail;this.limit=e?Number.parseInt(e,10):void 0,this.emitChange()},this.handleOrderByChange=i=>{i.stopPropagation(),this.orderBy=i.detail,this.emitChange()},this.handleDescriptionChange=i=>{i.stopPropagation(),this.description=i.detail||void 0,this.emitChange()},this.handleDescriptionBlur=()=>{if(this.description){const i=this.description.trim();i!==this.description&&(this.description=i||void 0,this.emitChange())}},this.handleChange=i=>{i.stopPropagation();const e=i.detail.id;if("visual"===e)try{const i=JSON.parse(this.codeValue);if(!this.checkVisualModeSupport().visualModeSupported)return;this.limetype=i.limetype||"",this.filter=i.filter,this.internalResponseFormat=i.responseFormat,this.limit=i.limit,this.orderBy=i.orderBy,this.description=i["#description"],this.mode="visual",this.change.emit(i)}catch(i){}else"code"===e&&(this.updateCodeValue(),this.mode="code")},this.handleCodeChange=i=>{i.stopPropagation(),this.codeValue=i.detail;try{const i=JSON.parse(this.codeValue);this.change.emit(i)}catch(i){}}}getButtons(){return[{id:"visual",title:"Visual"},{id:"code",title:"Code"}]}get visualModeEnabled(){var i,e,t;return null!==(t=null===(e=null===(i=this.platform)||void 0===i?void 0:i.isFeatureEnabled)||void 0===e?void 0:e.call(i,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){if(!this.visualModeEnabled)return this.mode="code",void this.updateCodeValue();this.value&&(this.limetype=this.value.limetype||"",this.filter=this.value.filter,this.internalResponseFormat=this.value.responseFormat,this.limit=this.value.limit,this.orderBy=this.value.orderBy,this.description=this.value["#description"]),this.updateCodeValue(),this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}render(){return t(r,{key:"9a121529165f1691e32b2b156b128977c5b5ba3a"},this.renderHeader(),this.renderContent())}renderContent(){const i=this.checkVisualModeSupport();return this.visualModeEnabled&&"code"!==this.mode?this.renderVisualMode():this.renderCodeMode(i)}emitChange(){"code"!==this.mode&&this.limetype&&this.change.emit(this.buildLimeQuery())}updateCodeValue(){this.codeValue=this.limetype?JSON.stringify(this.buildLimeQuery(),null,2):JSON.stringify(this.value||{},null,2)}buildLimeQuery(){const i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};return this.description&&(i["#description"]=this.description),void 0!==this.limit&&this.limit>0&&(i.limit=this.limit),this.orderBy&&this.orderBy.length>0&&(i.orderBy=this.orderBy),i}checkVisualModeSupport(){if(!this.limetypes)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};let i;if("code"===this.mode&&this.codeValue)try{i=JSON.parse(this.codeValue)}catch(i){return{valid:!1,visualModeSupported:!1,validationErrors:["Invalid JSON"],visualModeLimitations:[]}}else{if(!this.limetype)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter},void 0!==this.limit&&this.limit>0&&(i.limit=this.limit)}return o(i,this.limetypes,this.activeLimetype,this.visualModeEnabled)}renderModeSwitch(i){const e=!i.visualModeSupported,r=this.getButtons().map((i=>Object.assign(Object.assign({},i),{selected:i.id===this.mode})));return t("limel-button-group",{slot:"actions",onChange:this.handleChange,value:r,disabled:e})}renderCodeEditor(i){return[t("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!i.valid&&i.validationErrors.length>0&&t("div",{class:"validation-errors"},t("strong",null,"Invalid Lime Query:"),t("ul",null,i.validationErrors.map((i=>t("li",null,i))))),this.visualModeEnabled&&i.valid&&!i.visualModeSupported&&i.visualModeLimitations.length>0&&t("div",{class:"visual-mode-limitations"},t("strong",null,"Cannot switch to visual mode:"),t("ul",null,i.visualModeLimitations.map((i=>t("li",null,i)))))]}renderLimetypeSection(){return t("limebb-limetype-field",{platform:this.platform,context:this.context,label:"Limetype",value:this.limetype,required:!0,fieldName:"limetype",onChange:this.handleLimetypeChange})}renderDescriptionSection(){if(this.limetype)return t("section",{class:"description"},t("limel-input-field",{label:"Description",type:"textarea",value:this.description||"",placeholder:"Describe what data this query retrieves...",helperText:"Optional: Help AI agents and humans understand the query purpose",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur}))}renderResponseFormatSection(){if(this.limetype)return t("section",{class:"response-format"},t("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalResponseFormat,onChange:this.handleResponseFormatChange}))}renderFilterSection(){if(this.limetype)return t("section",{class:"filter"},t("limel-header",{class:"is-narrow",heading:"Filter Conditions",icon:"-lime-filter"}),t("limebb-lime-query-filter-builder",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.filter,onExpressionChange:this.handleFilterChange}))}renderQueryOptionsSection(){var i;if(this.limetype)return t("section",{class:"query-options"},t("limel-header",{class:"is-narrow",heading:"Query Options",icon:"ask_question"}),t("div",{class:"query-options-controls"},t("limel-input-field",{label:"Limit",type:"number",value:(null===(i=this.limit)||void 0===i?void 0:i.toString())||"",placeholder:"
|
|
1
|
+
import{r as i,c as e,h as t,H as r}from"./p-BIwHMk6j.js";import{L as s}from"./p-ndni-0im.js";import{i as o}from"./p-VjTMZY3E.js";import"./p-CQUZjrU4.js";const l=class{constructor(t){i(this,t),this.change=e(this,"change"),this.mode="visual",this.codeValue="",this.limetype="",this.handleLimetypeChange=i=>{i.stopPropagation(),this.limetype=i.detail,this.filter=void 0,this.internalResponseFormat={object:{}},this.emitChange()},this.handleFilterChange=i=>{var e;i.stopPropagation(),this.filter=null!==(e=i.detail)&&void 0!==e?e:void 0,this.emitChange()},this.handleResponseFormatChange=i=>{i.stopPropagation(),this.internalResponseFormat=i.detail,this.emitChange()},this.handleLimitChange=i=>{i.stopPropagation();const e=i.detail;this.limit=e?Number.parseInt(e,10):void 0,this.emitChange()},this.handleOrderByChange=i=>{i.stopPropagation(),this.orderBy=i.detail,this.emitChange()},this.handleDescriptionChange=i=>{i.stopPropagation(),this.description=i.detail||void 0,this.emitChange()},this.handleDescriptionBlur=()=>{if(this.description){const i=this.description.trim();i!==this.description&&(this.description=i||void 0,this.emitChange())}},this.handleChange=i=>{i.stopPropagation();const e=i.detail.id;if("visual"===e)try{const i=JSON.parse(this.codeValue);if(!this.checkVisualModeSupport().visualModeSupported)return;this.limetype=i.limetype||"",this.filter=i.filter,this.internalResponseFormat=i.responseFormat,this.limit=i.limit,this.orderBy=i.orderBy,this.description=i["#description"],this.mode="visual",this.change.emit(i)}catch(i){}else"code"===e&&(this.updateCodeValue(),this.mode="code")},this.handleCodeChange=i=>{i.stopPropagation(),this.codeValue=i.detail;try{const i=JSON.parse(this.codeValue);this.change.emit(i)}catch(i){}}}getButtons(){return[{id:"visual",title:"Visual"},{id:"code",title:"Code"}]}get visualModeEnabled(){var i,e,t;return null!==(t=null===(e=null===(i=this.platform)||void 0===i?void 0:i.isFeatureEnabled)||void 0===e?void 0:e.call(i,"useLimeQueryBuilderGuiMode"))&&void 0!==t&&t}componentWillLoad(){if(!this.visualModeEnabled)return this.mode="code",void this.updateCodeValue();this.value&&(this.limetype=this.value.limetype||"",this.filter=this.value.filter,this.internalResponseFormat=this.value.responseFormat,this.limit=this.value.limit,this.orderBy=this.value.orderBy,this.description=this.value["#description"]),this.updateCodeValue(),this.checkVisualModeSupport().visualModeSupported||(this.mode="code")}render(){return t(r,{key:"9a121529165f1691e32b2b156b128977c5b5ba3a"},this.renderHeader(),this.renderContent())}renderContent(){const i=this.checkVisualModeSupport();return this.visualModeEnabled&&"code"!==this.mode?this.renderVisualMode():this.renderCodeMode(i)}emitChange(){"code"!==this.mode&&this.limetype&&this.change.emit(this.buildLimeQuery())}updateCodeValue(){this.codeValue=this.limetype?JSON.stringify(this.buildLimeQuery(),null,2):JSON.stringify(this.value||{},null,2)}buildLimeQuery(){const i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter};return this.description&&(i["#description"]=this.description),void 0!==this.limit&&this.limit>0&&(i.limit=this.limit),this.orderBy&&this.orderBy.length>0&&(i.orderBy=this.orderBy),i}checkVisualModeSupport(){if(!this.limetypes)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};let i;if("code"===this.mode&&this.codeValue)try{i=JSON.parse(this.codeValue)}catch(i){return{valid:!1,visualModeSupported:!1,validationErrors:["Invalid JSON"],visualModeLimitations:[]}}else{if(!this.limetype)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};i={limetype:this.limetype,responseFormat:this.internalResponseFormat||{object:{_id:null}},filter:this.filter},void 0!==this.limit&&this.limit>0&&(i.limit=this.limit)}return o(i,this.limetypes,this.activeLimetype,this.visualModeEnabled)}renderModeSwitch(i){const e=!i.visualModeSupported,r=this.getButtons().map((i=>Object.assign(Object.assign({},i),{selected:i.id===this.mode})));return t("limel-button-group",{slot:"actions",onChange:this.handleChange,value:r,disabled:e})}renderCodeEditor(i){return[t("limel-code-editor",{value:this.codeValue,language:"json",lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeChange}),!i.valid&&i.validationErrors.length>0&&t("div",{class:"validation-errors"},t("strong",null,"Invalid Lime Query:"),t("ul",null,i.validationErrors.map((i=>t("li",null,i))))),this.visualModeEnabled&&i.valid&&!i.visualModeSupported&&i.visualModeLimitations.length>0&&t("div",{class:"visual-mode-limitations"},t("strong",null,"Cannot switch to visual mode:"),t("ul",null,i.visualModeLimitations.map((i=>t("li",null,i)))))]}renderLimetypeSection(){return t("limebb-limetype-field",{platform:this.platform,context:this.context,label:"Limetype",value:this.limetype,required:!0,fieldName:"limetype",onChange:this.handleLimetypeChange})}renderDescriptionSection(){if(this.limetype)return t("section",{class:"description"},t("limel-input-field",{label:"Description",type:"textarea",value:this.description||"",placeholder:"Describe what data this query retrieves...",helperText:"Optional: Help AI agents and humans understand the query purpose",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur}))}renderResponseFormatSection(){if(this.limetype)return t("section",{class:"response-format"},t("limebb-lime-query-response-format-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.internalResponseFormat,onChange:this.handleResponseFormatChange}))}renderFilterSection(){if(this.limetype)return t("section",{class:"filter"},t("limel-header",{class:"is-narrow",heading:"Filter Conditions",icon:"-lime-filter"}),t("limebb-lime-query-filter-builder",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.filter,onExpressionChange:this.handleFilterChange}))}renderQueryOptionsSection(){var i;if(this.limetype)return t("section",{class:"query-options"},t("limel-header",{class:"is-narrow",heading:"Query Options",icon:"ask_question"}),t("div",{class:"query-options-controls"},t("limel-input-field",{label:"Limit",type:"number",value:(null===(i=this.limit)||void 0===i?void 0:i.toString())||"",placeholder:"Enter a number",helperText:"Maximum number of results. When empty, a default limit is applied.",onChange:this.handleLimitChange}),t("limebb-lime-query-order-by-editor",{platform:this.platform,context:this.context,limetype:this.limetype,value:this.orderBy,onChange:this.handleOrderByChange})))}renderVisualMode(){return t("div",{class:"visual-mode"},this.renderLimetypeSection(),this.renderDescriptionSection(),this.renderResponseFormatSection(),this.renderFilterSection(),this.renderQueryOptionsSection())}renderHeader(){const i=this.checkVisualModeSupport();return t("limel-header",{heading:this.label},this.renderModeControls(i))}renderModeControls(i){if(this.visualModeEnabled)return this.renderModeSwitch(i)}renderCodeMode(i){return t("div",{class:"code-mode"},this.renderCodeEditor(i))}};(function(i,e,t,r){var s,o=arguments.length,l=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,e,t,r);else for(var d=i.length-1;d>=0;d--)(s=i[d])&&(l=(o<3?s(l):o>3?s(e,t,l):s(e,t))||l);o>3&&l&&Object.defineProperty(e,t,l)})([s()],l.prototype,"limetypes",void 0),l.style="*,*:before,*:after{box-sizing:border-box}:host(limebb-lime-query-builder){--header-background-color:rgb(var(--contrast-500));--limebb-lime-query-builder-background-color:rgb(var(--contrast-100));--limebb-lime-query-builder-border-radius:0.75rem;--limebb-lime-query-builder-visual-mode-padding:1rem;--limebb-lime-query-builder-group-color:rgb(var(--color-sky-lighter));box-sizing:border-box;width:calc(100% - 1.5rem);margin:0.75rem auto;display:flex;flex-direction:column;border-radius:var(--limebb-lime-query-builder-border-radius);background-color:var(--limebb-lime-query-builder-background-color);box-shadow:var(--shadow-inflated-16)}.visual-mode{display:flex;flex-direction:column;gap:1rem;padding:var(--limebb-lime-query-builder-visual-mode-padding);border:1px solid var(--header-background-color);border-radius:0 0 var(--limebb-lime-query-builder-border-radius) var(--limebb-lime-query-builder-border-radius)}.code-mode{--code-editor-max-height:70vh;display:flex;flex-direction:column;gap:1rem}.code-mode .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-mode .validation-errors strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .validation-errors ul{margin:0;padding-left:1.5rem}.code-mode .validation-errors li{margin:0.25rem 0}.code-mode .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-mode .visual-mode-limitations strong{display:block;margin-bottom:0.5rem;font-weight:600}.code-mode .visual-mode-limitations ul{margin:0;padding-left:1.5rem}.code-mode .visual-mode-limitations li{margin:0.25rem 0}section.description,section.filter,section.query-options{display:flex;flex-direction:column;gap:1rem}section h4{margin:0;font-size:1.125rem;font-weight:600;color:rgb(var(--contrast-1000))}limel-header.is-narrow{--header-top-right-left-border-radius:0;width:calc(100% + var(--limebb-lime-query-builder-visual-mode-padding) * 2);margin-left:calc(var(--limebb-lime-query-builder-visual-mode-padding) * -1)}.query-options-controls{display:flex;flex-direction:column;gap:1rem}";export{l as limebb_lime_query_builder}
|
package/dist/types/components/component-command-picker/component-config/component-config.d.ts
CHANGED
|
@@ -6,10 +6,16 @@ import { EventEmitter } from '../../../stencil-public-runtime';
|
|
|
6
6
|
* This component must be used in a limel-form
|
|
7
7
|
* where the Command ID OR component name exists in the same section as the config.
|
|
8
8
|
*
|
|
9
|
+
* If the sibling picker declares a `tags` filter, that array is auto-forwarded
|
|
10
|
+
* to the rendered config component as a `tags` prop. Config components can opt
|
|
11
|
+
* in by accepting `tags` and using it to filter any nested pickers they render,
|
|
12
|
+
* so the inner picker inherits the outer filter without manual wiring.
|
|
13
|
+
*
|
|
9
14
|
* @beta
|
|
10
15
|
*
|
|
11
16
|
* @exampleComponent limebb-example-command-config
|
|
12
17
|
* @exampleComponent limebb-example-component-config
|
|
18
|
+
* @exampleComponent limebb-example-chained-command-config
|
|
13
19
|
*/
|
|
14
20
|
export declare class ComponentConfig implements LimeWebComponent, FormComponent<Record<string, unknown>> {
|
|
15
21
|
platform: LimeWebComponentPlatform;
|
|
@@ -41,6 +47,7 @@ export declare class ComponentConfig implements LimeWebComponent, FormComponent<
|
|
|
41
47
|
protected watchFormInfo(): void;
|
|
42
48
|
protected watchconfigComponent(newValue: WebComponentMetadata['configComponent'], oldValue: WebComponentMetadata['configComponent']): void;
|
|
43
49
|
private getComponentName;
|
|
50
|
+
private getSiblingPickerTags;
|
|
44
51
|
private findConfigComponent;
|
|
45
52
|
render(): any[];
|
|
46
53
|
private renderHeader;
|
|
@@ -328,9 +328,14 @@ export namespace Components {
|
|
|
328
328
|
/**
|
|
329
329
|
* This component must be used in a limel-form
|
|
330
330
|
* where the Command ID OR component name exists in the same section as the config.
|
|
331
|
+
* If the sibling picker declares a `tags` filter, that array is auto-forwarded
|
|
332
|
+
* to the rendered config component as a `tags` prop. Config components can opt
|
|
333
|
+
* in by accepting `tags` and using it to filter any nested pickers they render,
|
|
334
|
+
* so the inner picker inherits the outer filter without manual wiring.
|
|
331
335
|
* @beta
|
|
332
336
|
* @exampleComponent limebb-example-command-config
|
|
333
337
|
* @exampleComponent limebb-example-component-config
|
|
338
|
+
* @exampleComponent limebb-example-chained-command-config
|
|
334
339
|
*/
|
|
335
340
|
interface LimebbComponentConfig {
|
|
336
341
|
/**
|
|
@@ -3010,9 +3015,14 @@ declare global {
|
|
|
3010
3015
|
/**
|
|
3011
3016
|
* This component must be used in a limel-form
|
|
3012
3017
|
* where the Command ID OR component name exists in the same section as the config.
|
|
3018
|
+
* If the sibling picker declares a `tags` filter, that array is auto-forwarded
|
|
3019
|
+
* to the rendered config component as a `tags` prop. Config components can opt
|
|
3020
|
+
* in by accepting `tags` and using it to filter any nested pickers they render,
|
|
3021
|
+
* so the inner picker inherits the outer filter without manual wiring.
|
|
3013
3022
|
* @beta
|
|
3014
3023
|
* @exampleComponent limebb-example-command-config
|
|
3015
3024
|
* @exampleComponent limebb-example-component-config
|
|
3025
|
+
* @exampleComponent limebb-example-chained-command-config
|
|
3016
3026
|
*/
|
|
3017
3027
|
interface HTMLLimebbComponentConfigElement extends Components.LimebbComponentConfig, HTMLStencilElement {
|
|
3018
3028
|
addEventListener<K extends keyof HTMLLimebbComponentConfigElementEventMap>(type: K, listener: (this: HTMLLimebbComponentConfigElement, ev: LimebbComponentConfigCustomEvent<HTMLLimebbComponentConfigElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -4893,9 +4903,14 @@ declare namespace LocalJSX {
|
|
|
4893
4903
|
/**
|
|
4894
4904
|
* This component must be used in a limel-form
|
|
4895
4905
|
* where the Command ID OR component name exists in the same section as the config.
|
|
4906
|
+
* If the sibling picker declares a `tags` filter, that array is auto-forwarded
|
|
4907
|
+
* to the rendered config component as a `tags` prop. Config components can opt
|
|
4908
|
+
* in by accepting `tags` and using it to filter any nested pickers they render,
|
|
4909
|
+
* so the inner picker inherits the outer filter without manual wiring.
|
|
4896
4910
|
* @beta
|
|
4897
4911
|
* @exampleComponent limebb-example-command-config
|
|
4898
4912
|
* @exampleComponent limebb-example-component-config
|
|
4913
|
+
* @exampleComponent limebb-example-chained-command-config
|
|
4899
4914
|
*/
|
|
4900
4915
|
interface LimebbComponentConfig {
|
|
4901
4916
|
/**
|
|
@@ -7922,9 +7937,14 @@ declare module "@stencil/core" {
|
|
|
7922
7937
|
/**
|
|
7923
7938
|
* This component must be used in a limel-form
|
|
7924
7939
|
* where the Command ID OR component name exists in the same section as the config.
|
|
7940
|
+
* If the sibling picker declares a `tags` filter, that array is auto-forwarded
|
|
7941
|
+
* to the rendered config component as a `tags` prop. Config components can opt
|
|
7942
|
+
* in by accepting `tags` and using it to filter any nested pickers they render,
|
|
7943
|
+
* so the inner picker inherits the outer filter without manual wiring.
|
|
7925
7944
|
* @beta
|
|
7926
7945
|
* @exampleComponent limebb-example-command-config
|
|
7927
7946
|
* @exampleComponent limebb-example-component-config
|
|
7947
|
+
* @exampleComponent limebb-example-chained-command-config
|
|
7928
7948
|
*/
|
|
7929
7949
|
"limebb-component-config": LocalJSX.IntrinsicElements["limebb-component-config"] & JSXBase.HTMLAttributes<HTMLLimebbComponentConfigElement>;
|
|
7930
7950
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-crm-building-blocks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.127.0",
|
|
4
4
|
"description": "A home for shared components meant for use with Lime CRM",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@limetech/eslint-config": "^4.0.1",
|
|
38
|
-
"@limetech/lime-elements": "^39.29.
|
|
38
|
+
"@limetech/lime-elements": "^39.29.2",
|
|
39
39
|
"@limetech/lime-web-components": "^6.24.0",
|
|
40
40
|
"@lundalogik/lime-icons8": "^2.41.0",
|
|
41
|
-
"@lundalogik/limeclient.js": "^1.
|
|
41
|
+
"@lundalogik/limeclient.js": "^1.105.0",
|
|
42
42
|
"@stencil/core": "^4.43.4",
|
|
43
43
|
"@stencil/sass": "^3.1.9",
|
|
44
44
|
"@types/jest": "^29.5.14",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as o,h as i}from"./p-BIwHMk6j.js";import{L as e}from"./p-C_tMNOSt.js";import{b as n}from"./p-ndni-0im.js";import{g as r}from"./p-BsH0YW6Z.js";import"./p-BgAfMcRA.js";import"./p-6PYziigk.js";const s=class{constructor(i){t(this,i),this.change=o(this,"change"),this.value={},this.type="component",this.configViewType="code",this.findConfigComponent=t=>{var o,i;return"component"===this.type?null===(o=this.registry.getAll().find((o=>o.name===t)))||void 0===o?void 0:o.configComponent:"command"===this.type?null===(i=this.commandbus.getAll().find((o=>o.id===t)))||void 0===i?void 0:i.configComponent:void 0},this.handleChangeMode=t=>{t.stopPropagation(),this.configViewType=t.detail.id},this.handleCodeEditorChange=t=>{t.stopPropagation();try{const o=JSON.parse(t.detail);this.change.emit(o)}catch(t){}}}componentWillLoad(){this.configComponent=this.getComponentName()}componentShouldUpdate(t,o,i){return"formInfo"!==i}watchFormInfo(){this.configComponent=this.getComponentName()}watchconfigComponent(t,o){t&&!o&&(this.configViewType="config"),t||(this.configViewType="code")}getComponentName(){var t,o,i;const e=[...null!==(o=null===(t=this.formInfo)||void 0===t?void 0:t.schemaPath.slice(0,-1))&&void 0!==o?o:[],this.getNameField()],n=r(null===(i=this.formInfo)||void 0===i?void 0:i.rootValue,e),s=this.findConfigComponent(n);if(s&&customElements.get(s.name))return s}render(){return[this.renderHeader(),this.renderContent()]}renderHeader(){let t=[];return this.configComponent&&(t=[{id:"config",title:"Config",selected:"config"===this.configViewType},{id:"code",title:"Code",selected:"code"===this.configViewType}]),i("limel-header",{icon:"edit_property",heading:this.label,subheading:this.helperText},i("limel-button-group",{slot:"actions",value:t,onChange:this.handleChangeMode}))}renderContent(){return"config"===this.configViewType?this.renderConfigComponent():this.renderCodeEditor()}renderCodeEditor(){return i("limel-code-editor",{value:JSON.stringify(this.value,null,"\t"),language:"json",readonly:this.readonly,lineNumbers:!0,fold:!0,lint:!0,onChange:this.handleCodeEditorChange})}renderConfigComponent(){var t,o;return i(e,{class:"config-component",platform:this.platform,context:this.context,name:null===(t=this.configComponent)||void 0===t?void 0:t.name,props:Object.assign(Object.assign({},null===(o=this.configComponent)||void 0===o?void 0:o.props),{value:this.value,required:this.required,readonly:this.readonly,disabled:this.disabled,label:this.label,helperText:this.helperText,formInfo:this.formInfo})})}getNameField(){return this.nameField?this.nameField:{component:"name",command:"id"}[this.type]}get registry(){return this.platform.get(n.WebComponentRegistry)}get commandbus(){return this.platform.get(n.CommandBus)}static get watchers(){return{formInfo:[{watchFormInfo:0}],configComponent:[{watchconfigComponent:0}]}}};s.style=":host(*){--header-background-color:rgb(var(--contrast-600));display:flex;flex-direction:column;border:1px dashed rgb(var(--contrast-700));overflow:clip;border-radius:0.75rem;background-color:rgb(var(--contrast-500))}*{box-sizing:border-box}.label{margin-top:1rem;margin-bottom:1rem}.config-component{display:grid;column-gap:1rem;row-gap:1rem;margin:1rem;grid-template-columns:repeat(3, minmax(0, 1fr))}";export{s as limebb_component_config}
|