@limetech/lime-crm-building-blocks 1.132.0 → 1.134.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-loader.cjs.entry.js +10 -0
  4. package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +10 -2
  5. package/dist/cjs/limebb-rule-editor.cjs.entry.js +101 -4
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/rule-editor/chip-picker-view.js +9 -2
  8. package/dist/collection/components/rule-editor/rule-arg-filter-editor/rule-arg-filter-editor-metadata.js +10 -0
  9. package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +30 -2
  10. package/dist/collection/components/rule-editor/rule-editor.js +90 -5
  11. package/dist/collection/components/rule-editor/rule-operations.js +15 -2
  12. package/dist/components/limebb-loader.js +1 -1
  13. package/dist/components/limebb-rule-editor.js +1 -1
  14. package/dist/components/rule-chip-popover.js +1 -1
  15. package/dist/esm/lime-crm-building-blocks.js +1 -1
  16. package/dist/esm/limebb-loader.entry.js +10 -0
  17. package/dist/esm/limebb-rule-chip-popover.entry.js +10 -2
  18. package/dist/esm/limebb-rule-editor.entry.js +102 -5
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  21. package/dist/lime-crm-building-blocks/p-49bc396e.entry.js +1 -0
  22. package/dist/lime-crm-building-blocks/p-6cf0a1cd.entry.js +1 -0
  23. package/dist/lime-crm-building-blocks/p-6fc4e731.entry.js +1 -0
  24. package/dist/types/components/rule-editor/chip-picker-view.d.ts +8 -0
  25. package/dist/types/components/rule-editor/rule-arg-filter-editor/rule-arg-filter-editor-metadata.d.ts +4 -0
  26. package/dist/types/components/rule-editor/rule-chip-popover/rule-chip-popover.d.ts +8 -0
  27. package/dist/types/components/rule-editor/rule-editor-views.d.ts +6 -0
  28. package/dist/types/components/rule-editor/rule-editor.d.ts +27 -0
  29. package/dist/types/components/rule-editor/rule-operations.d.ts +8 -0
  30. package/dist/types/components.d.ts +33 -2
  31. package/package.json +2 -2
  32. package/dist/lime-crm-building-blocks/p-4e0d077b.entry.js +0 -1
  33. package/dist/lime-crm-building-blocks/p-55692241.entry.js +0 -1
  34. package/dist/lime-crm-building-blocks/p-b95b94b6.entry.js +0 -1
@@ -1,7 +1,18 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
4
+ r = Reflect.decorate(decorators, target, key, desc);
5
+ else
6
+ for (var i = decorators.length - 1; i >= 0; i--)
7
+ if (d = decorators[i])
8
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
9
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
10
+ };
1
11
  import { h, } from "@stencil/core";
2
- import { PlatformServiceName, } from "@limetech/lime-web-components";
3
- import { deleteNode, replaceNode, updateArgs, } from "./rule-operations";
12
+ import { PlatformServiceName, SelectContext, } from "@limetech/lime-web-components";
13
+ import { deleteNode, getNode, replaceNode, updateArgs, } from "./rule-operations";
4
14
  import { extractGroup, RuleNodeView, } from "./rule-editor-views";
15
+ import { buildChipPath, extractRef } from "./chip-picker-view";
5
16
  import { createPrimitiveOptions, primitiveReadsCovered } from "./view-helpers";
6
17
  /**
7
18
  * Tree editor for {@link Rule}.
@@ -27,6 +38,12 @@ import { createPrimitiveOptions, primitiveReadsCovered } from "./view-helpers";
27
38
  * can't pick a primitive that would silently fail closed at evaluation
28
39
  * time.
29
40
  *
41
+ * `context` may be passed explicitly as a Prop; when it isn't — or when
42
+ * it carries no `limetype` — it resolves from the nearest DOM ancestor
43
+ * that provides it. An explicit Prop with a `limetype` wins, so an empty
44
+ * default (e.g. an admin form's "no selection" context) doesn't shadow a
45
+ * DOM-provided one.
46
+ *
30
47
  * @exampleComponent limebb-example-rule-editor
31
48
  *
32
49
  * @alpha
@@ -36,6 +53,7 @@ export class RuleEditor {
36
53
  constructor() {
37
54
  this.issues = [];
38
55
  this.openChipPath = null;
56
+ this.focusOnOpen = false;
39
57
  this.metadataById = new Map();
40
58
  this.allPrimitiveOptions = [];
41
59
  this.availablePrimitiveOptions = [];
@@ -44,19 +62,27 @@ export class RuleEditor {
44
62
  this.hasLoaded = false;
45
63
  this.handleDelete = (path) => {
46
64
  this.openChipPath = null;
65
+ this.focusOnOpen = false;
47
66
  this.emitIfChanged(deleteNode(this.normalizedValue, path));
48
67
  };
49
68
  this.handleUpdateArgs = (path, args) => {
50
69
  this.emitIfChanged(updateArgs(this.normalizedValue, path, args));
51
70
  };
52
71
  this.handleReplaceNode = (path, replacement) => {
72
+ const autoOpenPath = this.autoOpenPathFor(path, replacement);
73
+ this.focusOnOpen = autoOpenPath !== null;
74
+ if (autoOpenPath !== null) {
75
+ this.openChipPath = autoOpenPath;
76
+ }
53
77
  this.emitIfChanged(replaceNode(this.normalizedValue, path, replacement));
54
78
  };
55
79
  this.handleChipInteract = (path) => {
56
80
  this.openChipPath = path;
81
+ this.focusOnOpen = false;
57
82
  };
58
83
  this.handlePopoverClose = () => {
59
84
  this.openChipPath = null;
85
+ this.focusOnOpen = false;
60
86
  };
61
87
  }
62
88
  componentWillLoad() {
@@ -100,7 +126,7 @@ export class RuleEditor {
100
126
  'rule-editor': true,
101
127
  'rule-editor--disabled': this.disabled,
102
128
  };
103
- return (h("div", { key: 'f1479b58e37918312e4e47031e6fd3e7d6129449', class: containerClasses }, this.renderLabel(), h(RuleNodeView, { key: '3c49ff3c08a6f0b51a4ab6608521d571a2ec1625', node: this.normalizedValue, path: [], ctx: this.createRenderContext() }), this.renderHelperText()));
129
+ return (h("div", { key: '939efeb92282ce6c60bac6e86dcfe1e8386802c6', class: containerClasses }, this.renderLabel(), h(RuleNodeView, { key: 'd0f829aeda9e2552b39f1ed195d486ea76122ed9', node: this.normalizedValue, path: [], ctx: this.createRenderContext() }), this.renderHelperText()));
104
130
  }
105
131
  renderLabel() {
106
132
  if (!this.label) {
@@ -124,9 +150,10 @@ export class RuleEditor {
124
150
  readonly: this.readonly,
125
151
  disabled: this.disabled,
126
152
  platform: this.platform,
127
- context: this.context,
153
+ context: this.effectiveContext,
128
154
  translator: this.translator,
129
155
  openChipPath: this.openChipPath,
156
+ focusOnOpen: this.focusOnOpen,
130
157
  onDelete: this.handleDelete,
131
158
  onUpdateArgs: this.handleUpdateArgs,
132
159
  onReplaceNode: this.handleReplaceNode,
@@ -134,6 +161,46 @@ export class RuleEditor {
134
161
  onPopoverClose: this.handlePopoverClose,
135
162
  };
136
163
  }
164
+ /**
165
+ * Path of a newly added chip whose primitive declares a config
166
+ * component, so its args editor opens immediately on add. The new
167
+ * ref is found by object identity — the picker reuses existing ref
168
+ * objects and only the added chip is a fresh node — so adding a
169
+ * second instance of a primitive already in the group is still
170
+ * detected. Returns `null` unless exactly one ref was added and it
171
+ * has an editor, leaving the open chip untouched for removals,
172
+ * multi-adds, and negation.
173
+ * @param path
174
+ * @param replacement
175
+ */
176
+ autoOpenPathFor(path, replacement) {
177
+ var _a;
178
+ if (replacement.type !== 'all' && replacement.type !== 'any') {
179
+ return null;
180
+ }
181
+ const previous = getNode(this.normalizedValue, path);
182
+ if (previous === undefined ||
183
+ (previous.type !== 'all' && previous.type !== 'any')) {
184
+ return null;
185
+ }
186
+ const previousRefs = new Set(previous.rules
187
+ .map((rule) => { var _a; return (_a = extractRef(rule)) === null || _a === void 0 ? void 0 : _a.ref; })
188
+ .filter((ref) => ref !== undefined));
189
+ const added = replacement.rules
190
+ .map((rule, index) => {
191
+ var _a;
192
+ const ref = (_a = extractRef(rule)) === null || _a === void 0 ? void 0 : _a.ref;
193
+ return ref && !previousRefs.has(ref) ? { ref, index } : null;
194
+ })
195
+ .filter((entry) => entry !== null);
196
+ if (added.length !== 1) {
197
+ return null;
198
+ }
199
+ const [{ ref, index }] = added;
200
+ return ((_a = this.metadataById.get(ref.id)) === null || _a === void 0 ? void 0 : _a.configComponent)
201
+ ? buildChipPath(path, index)
202
+ : null;
203
+ }
137
204
  indexMetadata() {
138
205
  var _a, _b, _c;
139
206
  const metadata = (_c = (_b = (_a = this.ruleRegistry).listMetadata) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : [];
@@ -254,6 +321,16 @@ export class RuleEditor {
254
321
  get contextRegistry() {
255
322
  return this.platform.get(PlatformServiceName.ContextRegistry);
256
323
  }
324
+ get effectiveContext() {
325
+ var _a, _b;
326
+ if ((_a = this.context) === null || _a === void 0 ? void 0 : _a.limetype) {
327
+ return this.context;
328
+ }
329
+ if ((_b = this.resolvedContext) === null || _b === void 0 ? void 0 : _b.limetype) {
330
+ return this.resolvedContext;
331
+ }
332
+ return EMPTY_CONTEXT;
333
+ }
257
334
  static get is() { return "limebb-rule-editor"; }
258
335
  static get encapsulation() { return "shadow"; }
259
336
  static get originalStyleUrls() {
@@ -311,7 +388,7 @@ export class RuleEditor {
311
388
  "optional": false,
312
389
  "docs": {
313
390
  "tags": [],
314
- "text": "The context describing where this component is running.\n\nThe context provides information about the current limetype and record ID\n(if viewing/editing a specific record). Components can use this to load\nrelevant data and understand their operating environment."
391
+ "text": "Evaluation context for the rule. Optional \u2014 when omitted, or when\nit carries no `limetype`, it resolves from the nearest DOM ancestor\nthat provides it."
315
392
  },
316
393
  "getter": false,
317
394
  "setter": false
@@ -481,6 +558,7 @@ export class RuleEditor {
481
558
  }
482
559
  static get states() {
483
560
  return {
561
+ "resolvedContext": {},
484
562
  "issues": {},
485
563
  "openChipPath": {},
486
564
  "availablePrimitiveOptions": {}
@@ -522,6 +600,13 @@ export class RuleEditor {
522
600
  }];
523
601
  }
524
602
  }
603
+ __decorate([
604
+ SelectContext('context')
605
+ ], RuleEditor.prototype, "resolvedContext", void 0);
606
+ const EMPTY_CONTEXT = Object.freeze({
607
+ limetype: null,
608
+ id: null,
609
+ });
525
610
  function normalize(value) {
526
611
  if (!value) {
527
612
  return { type: 'all', rules: [] };
@@ -14,6 +14,9 @@ export function deleteNode(rule, path) {
14
14
  const parentPath = path.slice(0, -1);
15
15
  const key = path.at(-1);
16
16
  const parent = getNode(rule, parentPath);
17
+ if (parent === undefined) {
18
+ return rule;
19
+ }
17
20
  if ((parent.type === 'all' || parent.type === 'any') &&
18
21
  typeof key === 'number') {
19
22
  const rules = [...parent.rules];
@@ -34,7 +37,7 @@ export function deleteNode(rule, path) {
34
37
  */
35
38
  export function updateArgs(rule, path, args) {
36
39
  const node = getNode(rule, path);
37
- if (node.type !== 'ref') {
40
+ if (node === undefined || node.type !== 'ref') {
38
41
  return rule;
39
42
  }
40
43
  return replaceAt(rule, path, Object.assign(Object.assign({}, node), { args }));
@@ -88,9 +91,19 @@ export function pathsEqual(a, b) {
88
91
  export function issuesAt(issues, path) {
89
92
  return issues.filter((issue) => pathsEqual(issue.path, path));
90
93
  }
91
- function getNode(rule, path) {
94
+ /**
95
+ * Resolve the node at `path` by walking each segment from the root.
96
+ * Returns `undefined` when a segment indexes past the end of a
97
+ * combinator's `rules`, so callers must guard the result.
98
+ * @param rule
99
+ * @param path
100
+ */
101
+ export function getNode(rule, path) {
92
102
  let node = rule;
93
103
  for (const key of path) {
104
+ if (node === undefined) {
105
+ return undefined;
106
+ }
94
107
  node = stepIntoNode(node, key);
95
108
  }
96
109
  return node;
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as o,transformTag as i}from"@stencil/core/internal/client";import{H as l,b as n}from"./index.esm.js";import{H as c}from"./highlight-item.handler.js";let s=class{constructor(e){this.itemId=e}};s=function(e,t,o,i){var l,n=arguments.length,c=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(c=(n<3?l(c):n>3?l(t,o,c):l(t,o))||c);return n>3&&c&&Object.defineProperty(t,o,c),c}([l({id:"limebb-feed.highlight-item"})],s);const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.loaded=o(this,"loaded",7)}connectedCallback(){}async componentWillLoad(){const e=new c;this.platform.register(c.SERVICE_NAME,e),this.commandBus.register(s,e),(()=>{this.platform.get(n.RuleRegistry).attachMetadata("limetech.limeobject-matches-filter",{configComponent:{name:"limebb-rule-arg-filter-editor"}})})(),this.loaded.emit()}componentWillUpdate(){}disconnectedCallback(){}get commandBus(){return this.platform.get(n.CommandBus)}},[1,"limebb-loader",{platform:[16],context:[16]}]),m=r,a=function(){"undefined"!=typeof customElements&&["limebb-loader"].forEach((e=>{"limebb-loader"===e&&(customElements.get(i(e))||customElements.define(i(e),r))}))};export{m as LimebbLoader,a as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as o,transformTag as i}from"@stencil/core/internal/client";import{H as l,b as n}from"./index.esm.js";import{H as c}from"./highlight-item.handler.js";let s=class{constructor(e){this.itemId=e}};s=function(e,t,o,i){var l,n=arguments.length,c=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(l=e[s])&&(c=(n<3?l(c):n>3?l(t,o,c):l(t,o))||c);return n>3&&c&&Object.defineProperty(t,o,c),c}([l({id:"limebb-feed.highlight-item"})],s);const r="limetech.limeobject-matches-filter",m=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.loaded=o(this,"loaded",7)}connectedCallback(){}async componentWillLoad(){const e=new c;this.platform.register(c.SERVICE_NAME,e),this.commandBus.register(s,e),(e=>{e.listPrimitives().some((e=>e.id===r))&&e.attachMetadata(r,{configComponent:{name:"limebb-rule-arg-filter-editor"}})})(this.platform.get(n.RuleRegistry)),this.loaded.emit()}componentWillUpdate(){}disconnectedCallback(){}get commandBus(){return this.platform.get(n.CommandBus)}},[1,"limebb-loader",{platform:[16],context:[16]}]),a=m,f=function(){"undefined"!=typeof customElements&&["limebb-loader"].forEach((e=>{"limebb-loader"===e&&(customElements.get(i(e))||customElements.define(i(e),m))}))};export{a as LimebbLoader,f as defineCustomElement}
@@ -1 +1 @@
1
- import{h as e,proxyCustomElement as t,HTMLElement as n,createEvent as r,transformTag as i}from"@stencil/core/internal/client";import{b as l}from"./index.esm.js";import{d as o}from"./rule-chip-popover.js";function s(e,t){return t?{type:"not",rule:e}:e}function u(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}function a(e,t){return e.filter((e=>u(e.path,t)))}function c(e,t){let n=e;for(const e of t)n=h(n,e);return n}function d(e,t,n){if(0===t.length)return n;const[r,...i]=t;if("not"===e.type&&"rule"===r)return Object.assign(Object.assign({},e),{rule:d(e.rule,i,n)});if(("all"===e.type||"any"===e.type)&&"rules"===r){if(0===i.length)return n;const[t,...r]=i;if("number"!=typeof t)return e;const l=[...e.rules];return l[t]=d(l[t],r,n),Object.assign(Object.assign({},e),{rules:l})}return e}function h(e,t){return"not"===e.type&&"rule"===t?e.rule:"all"!==e.type&&"any"!==e.type||"rules"!==t?"all"!==e.type&&"any"!==e.type||"number"!=typeof t?e:e.rules[t]:e}const p={name:"question",color:"rgb(var(--color-glaucous-light))"};function f(e,t){return{"rule-node":!0,["rule-node--"+e]:!0,"rule-node--invalid":t.length>0}}function b(e,t){return[...e.values()].map((e=>({value:e.id,text:e.title?t.get(e.title):e.id,secondaryText:e.description?t.get(e.description):"",icon:e.icon}))).sort(((e,t)=>e.text.localeCompare(t.text)))}function m(e,t){return e.reads.every((e=>t.has(e)))}function v(e){return"__chip__:"+e}function g(e){return"ref"===e.type?{ref:e,isNegated:!1}:"not"===e.type&&"ref"===e.rule.type?{ref:e.rule,isNegated:!0}:null}const _=({groupNode:t,groupPath:n,chipChildren:r,ctx:i})=>{const l=new Map,o=r.map((e=>{const t=v(e.index);l.set(t,e);const n=function(e,t){var n;return null!==(n=e.find((e=>e.value===t)))&&void 0!==n?n:{value:t,text:t,icon:p}}(i.allPrimitiveOptions,e.ref.id);return Object.assign(Object.assign({},n),{text:e.isNegated?"¬ "+n.text:n.text,value:t})})),s=function(e){return t=>Promise.resolve(function(e,t){if(!t)return e;const n=t.toLocaleLowerCase().split(/\s+/);return e.filter((e=>n.every((t=>{var n,r;return e.text.toLocaleLowerCase().includes(t)||(null===(n=e.secondaryText)||void 0===n?void 0:n.toLocaleLowerCase().includes(t))||(null===(r=e.value)||void 0===r?void 0:r.toLocaleLowerCase().includes(t))}))))}(e,t))}(i.availablePrimitiveOptions),u=function(e,t,n){var r;const i=O(t,n);return null===i?null:null!==(r=e.find((e=>e.index===i)))&&void 0!==r?r:null}(r,n,i.openChipPath),a="all"===t.type?"&":"|";return e("limel-popover",{class:"rule-node__chips-popover",open:null!==u,openDirection:"bottom-start",onClose:i.onPopoverClose},e("div",{slot:"trigger",class:"rule-node__chips"},e("limel-picker",{multiple:!0,label:i.translator.get("webclient.rule-editor.rules-label"),value:o,searcher:s,delimiter:a,readonly:i.readonly,disabled:i.disabled,onChange:y(t,n,l,i),onInteract:x(n,l,i)})),e("div",null,function(t,n,r){if(!t)return null;const i=function(e,t){return[...e,"rules",t]}(n,t.index);return e("limebb-rule-chip-popover",{platform:r.platform,context:r.context,refNode:t.ref,isNegated:t.isNegated,metadata:r.metadataById.get(t.ref.id),readonly:r.readonly,disabled:r.disabled,isMutable:r.isMutable,onNegate:C(t,i,r),onUpdateArgs:w(t,i,r),onDeleteChip:j(i,r)})}(u,n,i)))},y=(e,t,n,r)=>i=>{i.stopPropagation();const l=Array.isArray(i.detail)?i.detail:[],o=O(t,r.openChipPath);if(null!==o){const e=v(o);l.every((t=>t.value!==e))&&r.onPopoverClose()}const s=l.flatMap((e=>{if("string"!=typeof e.value)return[];const t=n.get(e.value);return t?[t.isNegated?{type:"not",rule:t.ref}:t.ref]:[{type:"ref",id:e.value}]})),u=e.rules.filter((e=>null===g(e)));r.onReplaceNode(t,Object.assign(Object.assign({},e),{rules:[...s,...u]}))},x=(e,t,n)=>r=>{r.stopPropagation();const i=function(e){if("string"==typeof e)return e;if(e&&"object"==typeof e&&"value"in e){const t=e.value;return"string"==typeof t?t:void 0}}(r.detail),l=i?t.get(i):void 0;l&&n.onChipInteract([...e,"rules",l.index])},C=(e,t,n)=>r=>{r.stopPropagation(),n.onReplaceNode(t,r.detail?{type:"not",rule:e.ref}:e.ref)},w=(e,t,n)=>r=>{r.stopPropagation();const i=e.isNegated?[...t,"rule"]:t;n.onUpdateArgs(i,r.detail)},j=(e,t)=>()=>{t.onDelete(e)};function O(e,t){if(!t||t.length<2)return null;if(!u(function(e){return e.slice(0,-2)}(t),e))return null;const n=t.at(-1);return"number"==typeof n?n:null}const k=({node:t,path:n,isNegated:r,ctx:i})=>{const l=r?[...n,"rule"]:n,o=r?[...a(i.issues,n),...a(i.issues,l)]:a(i.issues,n),s=[],u=[];for(const[e,n]of t.rules.entries()){const t=g(n);t?s.push(Object.assign(Object.assign({},t),{index:e})):u.push({child:n,index:e})}const c=function(e){return[{value:"all",text:e.translator.get("webclient.rule-editor.combinator.all")},{value:"any",text:e.translator.get("webclient.rule-editor.combinator.any")}]}(i),d=c.find((e=>e.value===t.type));return e("div",{class:f(t.type,o),key:N(n)},e("div",{class:"rule-node__header"},e("limel-select",{class:"rule-node__combinator-select",value:d,options:c,disabled:!i.isMutable,onChange:M(t,n,r,i)}),function(t,n,r,i){return i.isMutable?e("div",{class:"rule-node__header-actions"},e("limel-switch",{class:"rule-node__negate-switch",label:i.translator.get("webclient.rule-editor.negate"),value:r,onChange:z(t,n,i)}),e("limel-icon-button",{icon:"trash",label:i.translator.get("webclient.rule-editor.delete"),onClick:()=>i.onDelete(n)})):null}(t,n,r,i)),e("div",{class:"rule-node__body"},e(E,{issues:o}),e(_,{groupNode:t,groupPath:l,chipChildren:s,ctx:i}),function(t,n,r){return 0===t.length?null:e("div",{class:"rule-node__children"},t.map((t=>e(R,{node:t.child,path:[...n,"rules",t.index],ctx:r}))))}(u,l,i),function(t,n,r,i){return i.isMutable?e("div",{class:"rule-node__footer"},e("limel-button",{icon:"add",label:i.translator.get("webclient.rule-editor.add-nested-group"),onClick:A(t,n,r,i)})):null}(t,n,r,i)))};function N(e){return 0===e.length?"root":e.join("/")}function P(e,t,n,r){r.onReplaceNode(t,s(e,n))}const M=(e,t,n,r)=>i=>{i.stopPropagation();const l=i.detail.value;l!==e.type&&P(Object.assign(Object.assign({},e),{type:l}),t,n,r)},A=(e,t,n,r)=>()=>{P(function(e){return Object.assign(Object.assign({},e),{rules:[...e.rules,{type:"all",rules:[]}]})}(e),t,n,r)},z=(e,t,n)=>r=>{r.stopPropagation(),n.onReplaceNode(t,s(e,r.detail))},R=t=>{const{node:n,path:r,ctx:i}=t,l=D(n);return l?e(k,{node:l.node,path:r,isNegated:l.isNegated,ctx:i}):null},V=e=>"not"===e.type&&("all"===e.rule.type||"any"===e.rule.type);function D(e){if("all"===e.type||"any"===e.type)return{node:e,isNegated:!1};if(V(e))return{node:e.rule,isNegated:!0};if("not"===e.type){const t=D(e.rule);if(t)return{node:t.node,isNegated:!t.isNegated}}return null}const E=({issues:t})=>0===t.length?null:t.map((t=>e("div",{class:"rule-node__issue"},t.message))),I=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.change=r(this,"change",7),this.issues=[],this.openChipPath=null,this.metadataById=new Map,this.allPrimitiveOptions=[],this.availablePrimitiveOptions=[],this.reachableSlots=new Set,this.normalizedCache=null,this.hasLoaded=!1,this.handleDelete=e=>{this.openChipPath=null,this.emitIfChanged(function(e,t){if(0===t.length)return{type:"all",rules:[]};const n=t.slice(0,-1),r=t.at(-1),i=c(e,n);if(("all"===i.type||"any"===i.type)&&"number"==typeof r){const t=[...i.rules];return t.splice(r,1),d(e,n,Object.assign(Object.assign({},i),{rules:t}))}return"not"===i.type&&"rule"===r?d(e,n,{type:"all",rules:[]}):e}(this.normalizedValue,e))},this.handleUpdateArgs=(e,t)=>{this.emitIfChanged(function(e,t,n){const r=c(e,t);return"ref"!==r.type?e:d(e,t,Object.assign(Object.assign({},r),{args:n}))}(this.normalizedValue,e,t))},this.handleReplaceNode=(e,t)=>{this.emitIfChanged(function(e,t,n){return d(e,t,n)}(this.normalizedValue,e,t))},this.handleChipInteract=e=>{this.openChipPath=e},this.handlePopoverClose=()=>{this.openChipPath=null}}componentWillLoad(){this.rebuildFromRegistries()}rebuildFromRegistries(){this.computeReachableSlots(),this.indexMetadata(),this.rebuildAvailableOptions(),this.runValidation()}connectedCallback(){this.hasLoaded&&(this.computeReachableSlots(),this.rebuildAvailableOptions(),this.runValidation())}componentDidLoad(){this.hasLoaded=!0,this.emitNormalization()}onValueChange(){this.emitNormalization()||this.runValidation()}onAvailableContextsChange(){this.rebuildFromRegistries()}render(){return e("div",{key:"f1479b58e37918312e4e47031e6fd3e7d6129449",class:{"rule-editor":!0,"rule-editor--disabled":this.disabled}},this.renderLabel(),e(R,{key:"3c49ff3c08a6f0b51a4ab6608521d571a2ec1625",node:this.normalizedValue,path:[],ctx:this.createRenderContext()}),this.renderHelperText())}renderLabel(){return this.label?e("div",{class:"rule-editor__label"},this.label):null}renderHelperText(){return this.helperText?e("div",{class:"rule-editor__helper-text"},this.helperText):null}createRenderContext(){return{issues:this.issues,metadataById:this.metadataById,allPrimitiveOptions:this.allPrimitiveOptions,availablePrimitiveOptions:this.availablePrimitiveOptions,isMutable:!this.readonly&&!this.disabled,readonly:this.readonly,disabled:this.disabled,platform:this.platform,context:this.context,translator:this.translator,openChipPath:this.openChipPath,onDelete:this.handleDelete,onUpdateArgs:this.handleUpdateArgs,onReplaceNode:this.handleReplaceNode,onChipInteract:this.handleChipInteract,onPopoverClose:this.handlePopoverClose}}indexMetadata(){var e,t,n;const r=null!==(n=null===(t=(e=this.ruleRegistry).listMetadata)||void 0===t?void 0:t.call(e))&&void 0!==n?n:[];this.metadataById=new Map(r.map((e=>[e.id,e]))),this.allPrimitiveOptions=b(this.metadataById,this.translator)}rebuildAvailableOptions(){this.availablePrimitiveOptions=b(this.availablePrimitiveMetadata(),this.translator)}availablePrimitiveMetadata(){const e=new Map;for(const[t,n]of this.metadataById)m(n,this.reachableSlots)&&e.set(t,n);return e}computeReachableSlots(){var e;const t=this.contextRegistry,n=t.list().map((e=>e.id)).filter((e=>void 0!==t.get(e,this.host)));this.reachableSlots=new Set([...n,...null!==(e=this.availableContexts)&&void 0!==e?e:[]])}runValidation(){if(!this.value)return void(this.issues=[]);const e=this.ruleRegistry.validate(this.normalizedValue,[...this.reachableSlots]);this.issues=e.ok?[]:e.issues}emitIfChanged(e){e!==this.normalizedValue&&this.change.emit(function(e){return"all"!==e.type&&"any"!==e.type?e:0===e.rules.length?void 0:e}(e))}get normalizedValue(){if(null!==this.normalizedCache&&this.normalizedCache.source===this.value)return this.normalizedCache.normalized;const e=function(e){return e?D(e)?e:{type:"all",rules:[e]}:{type:"all",rules:[]}}(this.value);return this.normalizedCache={source:this.value,normalized:e},e}emitNormalization(){if(!this.value)return!1;const e=this.normalizedValue;return e!==this.value&&(this.change.emit(e),!0)}get ruleRegistry(){return this.platform.get(l.RuleRegistry)}get translator(){return this.platform.get(l.Translate)}get contextRegistry(){return this.platform.get(l.ContextRegistry)}get host(){return this}static get watchers(){return{value:[{onValueChange:0}],availableContexts:[{onAvailableContextsChange:0}]}}static get style(){return":host{display:block}.rule-editor--disabled{opacity:0.6;pointer-events:none}.rule-editor__label{font-size:0.75rem;font-weight:600;color:rgb(var(--contrast-1500));margin-bottom:0.25rem}.rule-editor__helper-text{font-size:0.75rem;color:rgb(var(--contrast-1300));margin-top:0.25rem}.rule-node{border:1px solid rgb(var(--contrast-500));border-radius:0.5rem;margin:0.25rem 0;overflow:hidden;background-color:rgb(var(--contrast-100))}.rule-node--invalid{border-color:rgb(var(--color-red-default))}.rule-node--all>.rule-node__header,.rule-node--any>.rule-node__header{background-color:rgb(var(--contrast-300));padding:0.375rem 0.75rem;border-bottom:1px solid rgb(var(--contrast-500))}.rule-node__header{display:flex;align-items:center;gap:0.5rem}.rule-node__header-actions{margin-left:auto;display:grid;grid-auto-flow:column;grid-gap:0.5rem;padding:0.125rem;align-items:center}.rule-node__combinator-select{min-width:6rem}.rule-node__body{padding:0.75rem;display:flex;flex-direction:column;gap:0.75rem}limel-popover.rule-node__chips-popover{display:contents;--popover-surface-width:min(calc(100vw - 4rem), 50rem)}.rule-node__chips{display:block;width:100%}.rule-node__chips limel-picker{display:block;width:100%}.rule-node__children{display:flex;flex-direction:column;gap:0.5rem}.rule-node__footer{display:flex;justify-content:center}.rule-node__issue{color:rgb(var(--color-red-default));font-size:0.875rem}"}},[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],availablePrimitiveOptions:[32]},void 0,{value:[{onValueChange:0}],availableContexts:[{onAvailableContextsChange:0}]}]),L=I,S=function(){"undefined"!=typeof customElements&&["limebb-rule-editor","limebb-rule-chip-popover"].forEach((e=>{switch(e){case"limebb-rule-editor":customElements.get(i(e))||customElements.define(i(e),I);break;case"limebb-rule-chip-popover":customElements.get(i(e))||o()}}))};export{L as LimebbRuleEditor,S as defineCustomElement}
1
+ import{h as e,proxyCustomElement as t,HTMLElement as n,createEvent as r,transformTag as i}from"@stencil/core/internal/client";import{O as l,b as o}from"./index.esm.js";import{d as s}from"./rule-chip-popover.js";function u(e,t){return t?{type:"not",rule:e}:e}function a(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}function c(e,t){return e.filter((e=>a(e.path,t)))}function d(e,t){let n=e;for(const e of t){if(void 0===n)return;n=f(n,e)}return n}function h(e,t,n){if(0===t.length)return n;const[r,...i]=t;if("not"===e.type&&"rule"===r)return Object.assign(Object.assign({},e),{rule:h(e.rule,i,n)});if(("all"===e.type||"any"===e.type)&&"rules"===r){if(0===i.length)return n;const[t,...r]=i;if("number"!=typeof t)return e;const l=[...e.rules];return l[t]=h(l[t],r,n),Object.assign(Object.assign({},e),{rules:l})}return e}function f(e,t){return"not"===e.type&&"rule"===t?e.rule:"all"!==e.type&&"any"!==e.type||"rules"!==t?"all"!==e.type&&"any"!==e.type||"number"!=typeof t?e:e.rules[t]:e}const p={name:"question",color:"rgb(var(--color-glaucous-light))"};function b(e,t){return{"rule-node":!0,["rule-node--"+e]:!0,"rule-node--invalid":t.length>0}}function v(e,t){return[...e.values()].map((e=>({value:e.id,text:e.title?t.get(e.title):e.id,secondaryText:e.description?t.get(e.description):"",icon:e.icon}))).sort(((e,t)=>e.text.localeCompare(t.text)))}function m(e,t){return e.reads.every((e=>t.has(e)))}function g(e){return"__chip__:"+e}function y(e,t){return[...e,"rules",t]}function _(e){return"ref"===e.type?{ref:e,isNegated:!1}:"not"===e.type&&"ref"===e.rule.type?{ref:e.rule,isNegated:!0}:null}const x=({groupNode:t,groupPath:n,chipChildren:r,ctx:i})=>{const l=new Map,o=r.map((e=>{const t=g(e.index);l.set(t,e);const n=function(e,t){var n;return null!==(n=e.find((e=>e.value===t)))&&void 0!==n?n:{value:t,text:t,icon:p}}(i.allPrimitiveOptions,e.ref.id);return Object.assign(Object.assign({},n),{text:e.isNegated?"¬ "+n.text:n.text,value:t})})),s=function(e){return t=>Promise.resolve(function(e,t){if(!t)return e;const n=t.toLocaleLowerCase().split(/\s+/);return e.filter((e=>n.every((t=>{var n,r;return e.text.toLocaleLowerCase().includes(t)||(null===(n=e.secondaryText)||void 0===n?void 0:n.toLocaleLowerCase().includes(t))||(null===(r=e.value)||void 0===r?void 0:r.toLocaleLowerCase().includes(t))}))))}(e,t))}(i.availablePrimitiveOptions),u=function(e,t,n){var r;const i=N(t,n);return null===i?null:null!==(r=e.find((e=>e.index===i)))&&void 0!==r?r:null}(r,n,i.openChipPath),a="all"===t.type?"&":"|";return e("limel-popover",{class:"rule-node__chips-popover",open:null!==u,openDirection:"bottom-start",onClose:i.onPopoverClose},e("div",{slot:"trigger",class:"rule-node__chips"},e("limel-picker",{multiple:!0,label:i.translator.get("webclient.rule-editor.rules-label"),value:o,searcher:s,delimiter:a,readonly:i.readonly,disabled:i.disabled,onChange:C(t,n,l,i),onInteract:O(n,l,i)})),e("div",null,function(t,n,r){if(!t)return null;const i=y(n,t.index);return e("limebb-rule-chip-popover",{platform:r.platform,context:r.context,refNode:t.ref,isNegated:t.isNegated,metadata:r.metadataById.get(t.ref.id),readonly:r.readonly,disabled:r.disabled,isMutable:r.isMutable,focusOnOpen:r.focusOnOpen,onNegate:j(t,i,r),onUpdateArgs:w(t,i,r),onDeleteChip:k(i,r)})}(u,n,i)))},C=(e,t,n,r)=>i=>{i.stopPropagation();const l=Array.isArray(i.detail)?i.detail:[],o=N(t,r.openChipPath);if(null!==o){const e=g(o);l.every((t=>t.value!==e))&&r.onPopoverClose()}const s=l.flatMap((e=>{if("string"!=typeof e.value)return[];const t=n.get(e.value);return t?[t.isNegated?{type:"not",rule:t.ref}:t.ref]:[{type:"ref",id:e.value}]})),u=e.rules.filter((e=>null===_(e)));r.onReplaceNode(t,Object.assign(Object.assign({},e),{rules:[...s,...u]}))},O=(e,t,n)=>r=>{r.stopPropagation();const i=function(e){if("string"==typeof e)return e;if(e&&"object"==typeof e&&"value"in e){const t=e.value;return"string"==typeof t?t:void 0}}(r.detail),l=i?t.get(i):void 0;l&&n.onChipInteract([...e,"rules",l.index])},j=(e,t,n)=>r=>{r.stopPropagation(),n.onReplaceNode(t,r.detail?{type:"not",rule:e.ref}:e.ref)},w=(e,t,n)=>r=>{r.stopPropagation();const i=e.isNegated?[...t,"rule"]:t;n.onUpdateArgs(i,r.detail)},k=(e,t)=>()=>{t.onDelete(e)};function N(e,t){if(!t||t.length<2)return null;if(!a(function(e){return e.slice(0,-2)}(t),e))return null;const n=t.at(-1);return"number"==typeof n?n:null}const P=({node:t,path:n,isNegated:r,ctx:i})=>{const l=r?[...n,"rule"]:n,o=r?[...c(i.issues,n),...c(i.issues,l)]:c(i.issues,n),s=[],u=[];for(const[e,n]of t.rules.entries()){const t=_(n);t?s.push(Object.assign(Object.assign({},t),{index:e})):u.push({child:n,index:e})}const a=function(e){return[{value:"all",text:e.translator.get("webclient.rule-editor.combinator.all")},{value:"any",text:e.translator.get("webclient.rule-editor.combinator.any")}]}(i),d=a.find((e=>e.value===t.type));return e("div",{class:b(t.type,o),key:R(n)},e("div",{class:"rule-node__header"},e("limel-select",{class:"rule-node__combinator-select",value:d,options:a,disabled:!i.isMutable,onChange:A(t,n,r,i)}),function(t,n,r,i){return i.isMutable?e("div",{class:"rule-node__header-actions"},e("limel-switch",{class:"rule-node__negate-switch",label:i.translator.get("webclient.rule-editor.negate"),value:r,onChange:V(t,n,i)}),e("limel-icon-button",{icon:"trash",label:i.translator.get("webclient.rule-editor.delete"),onClick:()=>i.onDelete(n)})):null}(t,n,r,i)),e("div",{class:"rule-node__body"},e(S,{issues:o}),e(x,{groupNode:t,groupPath:l,chipChildren:s,ctx:i}),function(t,n,r){return 0===t.length?null:e("div",{class:"rule-node__children"},t.map((t=>e(D,{node:t.child,path:[...n,"rules",t.index],ctx:r}))))}(u,l,i),function(t,n,r,i){return i.isMutable?e("div",{class:"rule-node__footer"},e("limel-button",{icon:"add",label:i.translator.get("webclient.rule-editor.add-nested-group"),onClick:z(t,n,r,i)})):null}(t,n,r,i)))};function R(e){return 0===e.length?"root":e.join("/")}function M(e,t,n,r){r.onReplaceNode(t,u(e,n))}const A=(e,t,n,r)=>i=>{i.stopPropagation();const l=i.detail.value;l!==e.type&&M(Object.assign(Object.assign({},e),{type:l}),t,n,r)},z=(e,t,n,r)=>()=>{M(function(e){return Object.assign(Object.assign({},e),{rules:[...e.rules,{type:"all",rules:[]}]})}(e),t,n,r)},V=(e,t,n)=>r=>{r.stopPropagation(),n.onReplaceNode(t,u(e,r.detail))},D=t=>{const{node:n,path:r,ctx:i}=t,l=I(n);return l?e(P,{node:l.node,path:r,isNegated:l.isNegated,ctx:i}):null},E=e=>"not"===e.type&&("all"===e.rule.type||"any"===e.rule.type);function I(e){if("all"===e.type||"any"===e.type)return{node:e,isNegated:!1};if(E(e))return{node:e.rule,isNegated:!0};if("not"===e.type){const t=I(e.rule);if(t)return{node:t.node,isNegated:!t.isNegated}}return null}const S=({issues:t})=>0===t.length?null:t.map((t=>e("div",{class:"rule-node__issue"},t.message)));const L=t(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.change=r(this,"change",7),this.issues=[],this.openChipPath=null,this.focusOnOpen=!1,this.metadataById=new Map,this.allPrimitiveOptions=[],this.availablePrimitiveOptions=[],this.reachableSlots=new Set,this.normalizedCache=null,this.hasLoaded=!1,this.handleDelete=e=>{this.openChipPath=null,this.focusOnOpen=!1,this.emitIfChanged(function(e,t){if(0===t.length)return{type:"all",rules:[]};const n=t.slice(0,-1),r=t.at(-1),i=d(e,n);if(void 0===i)return e;if(("all"===i.type||"any"===i.type)&&"number"==typeof r){const t=[...i.rules];return t.splice(r,1),h(e,n,Object.assign(Object.assign({},i),{rules:t}))}return"not"===i.type&&"rule"===r?h(e,n,{type:"all",rules:[]}):e}(this.normalizedValue,e))},this.handleUpdateArgs=(e,t)=>{this.emitIfChanged(function(e,t,n){const r=d(e,t);return void 0===r||"ref"!==r.type?e:h(e,t,Object.assign(Object.assign({},r),{args:n}))}(this.normalizedValue,e,t))},this.handleReplaceNode=(e,t)=>{const n=this.autoOpenPathFor(e,t);this.focusOnOpen=null!==n,null!==n&&(this.openChipPath=n),this.emitIfChanged(function(e,t,n){return h(e,t,n)}(this.normalizedValue,e,t))},this.handleChipInteract=e=>{this.openChipPath=e,this.focusOnOpen=!1},this.handlePopoverClose=()=>{this.openChipPath=null,this.focusOnOpen=!1}}componentWillLoad(){this.rebuildFromRegistries()}rebuildFromRegistries(){this.computeReachableSlots(),this.indexMetadata(),this.rebuildAvailableOptions(),this.runValidation()}connectedCallback(){this.hasLoaded&&(this.computeReachableSlots(),this.rebuildAvailableOptions(),this.runValidation())}componentDidLoad(){this.hasLoaded=!0,this.emitNormalization()}onValueChange(){this.emitNormalization()||this.runValidation()}onAvailableContextsChange(){this.rebuildFromRegistries()}render(){return e("div",{key:"939efeb92282ce6c60bac6e86dcfe1e8386802c6",class:{"rule-editor":!0,"rule-editor--disabled":this.disabled}},this.renderLabel(),e(D,{key:"d0f829aeda9e2552b39f1ed195d486ea76122ed9",node:this.normalizedValue,path:[],ctx:this.createRenderContext()}),this.renderHelperText())}renderLabel(){return this.label?e("div",{class:"rule-editor__label"},this.label):null}renderHelperText(){return this.helperText?e("div",{class:"rule-editor__helper-text"},this.helperText):null}createRenderContext(){return{issues:this.issues,metadataById:this.metadataById,allPrimitiveOptions:this.allPrimitiveOptions,availablePrimitiveOptions:this.availablePrimitiveOptions,isMutable:!this.readonly&&!this.disabled,readonly:this.readonly,disabled:this.disabled,platform:this.platform,context:this.effectiveContext,translator:this.translator,openChipPath:this.openChipPath,focusOnOpen:this.focusOnOpen,onDelete:this.handleDelete,onUpdateArgs:this.handleUpdateArgs,onReplaceNode:this.handleReplaceNode,onChipInteract:this.handleChipInteract,onPopoverClose:this.handlePopoverClose}}autoOpenPathFor(e,t){var n;if("all"!==t.type&&"any"!==t.type)return null;const r=d(this.normalizedValue,e);if(void 0===r||"all"!==r.type&&"any"!==r.type)return null;const i=new Set(r.rules.map((e=>{var t;return null===(t=_(e))||void 0===t?void 0:t.ref})).filter((e=>void 0!==e))),l=t.rules.map(((e,t)=>{var n;const r=null===(n=_(e))||void 0===n?void 0:n.ref;return r&&!i.has(r)?{ref:r,index:t}:null})).filter((e=>null!==e));if(1!==l.length)return null;const[{ref:o,index:s}]=l;return(null===(n=this.metadataById.get(o.id))||void 0===n?void 0:n.configComponent)?y(e,s):null}indexMetadata(){var e,t,n;const r=null!==(n=null===(t=(e=this.ruleRegistry).listMetadata)||void 0===t?void 0:t.call(e))&&void 0!==n?n:[];this.metadataById=new Map(r.map((e=>[e.id,e]))),this.allPrimitiveOptions=v(this.metadataById,this.translator)}rebuildAvailableOptions(){this.availablePrimitiveOptions=v(this.availablePrimitiveMetadata(),this.translator)}availablePrimitiveMetadata(){const e=new Map;for(const[t,n]of this.metadataById)m(n,this.reachableSlots)&&e.set(t,n);return e}computeReachableSlots(){var e;const t=this.contextRegistry,n=t.list().map((e=>e.id)).filter((e=>void 0!==t.get(e,this.host)));this.reachableSlots=new Set([...n,...null!==(e=this.availableContexts)&&void 0!==e?e:[]])}runValidation(){if(!this.value)return void(this.issues=[]);const e=this.ruleRegistry.validate(this.normalizedValue,[...this.reachableSlots]);this.issues=e.ok?[]:e.issues}emitIfChanged(e){e!==this.normalizedValue&&this.change.emit(function(e){return"all"!==e.type&&"any"!==e.type?e:0===e.rules.length?void 0:e}(e))}get normalizedValue(){if(null!==this.normalizedCache&&this.normalizedCache.source===this.value)return this.normalizedCache.normalized;const e=function(e){return e?I(e)?e:{type:"all",rules:[e]}:{type:"all",rules:[]}}(this.value);return this.normalizedCache={source:this.value,normalized:e},e}emitNormalization(){if(!this.value)return!1;const e=this.normalizedValue;return e!==this.value&&(this.change.emit(e),!0)}get ruleRegistry(){return this.platform.get(o.RuleRegistry)}get translator(){return this.platform.get(o.Translate)}get contextRegistry(){return this.platform.get(o.ContextRegistry)}get effectiveContext(){var e,t;return(null===(e=this.context)||void 0===e?void 0:e.limetype)?this.context:(null===(t=this.resolvedContext)||void 0===t?void 0:t.limetype)?this.resolvedContext:T}get host(){return this}static get watchers(){return{value:[{onValueChange:0}],availableContexts:[{onAvailableContextsChange:0}]}}static get style(){return":host{display:block}.rule-editor--disabled{opacity:0.6;pointer-events:none}.rule-editor__label{font-size:0.75rem;font-weight:600;color:rgb(var(--contrast-1500));margin-bottom:0.25rem}.rule-editor__helper-text{font-size:0.75rem;color:rgb(var(--contrast-1300));margin-top:0.25rem}.rule-node{border:1px solid rgb(var(--contrast-500));border-radius:0.5rem;margin:0.25rem 0;overflow:hidden;background-color:rgb(var(--contrast-100))}.rule-node--invalid{border-color:rgb(var(--color-red-default))}.rule-node--all>.rule-node__header,.rule-node--any>.rule-node__header{background-color:rgb(var(--contrast-300));padding:0.375rem 0.75rem;border-bottom:1px solid rgb(var(--contrast-500))}.rule-node__header{display:flex;align-items:center;gap:0.5rem}.rule-node__header-actions{margin-left:auto;display:grid;grid-auto-flow:column;grid-gap:0.5rem;padding:0.125rem;align-items:center}.rule-node__combinator-select{min-width:6rem}.rule-node__body{padding:0.75rem;display:flex;flex-direction:column;gap:0.75rem}limel-popover.rule-node__chips-popover{display:contents;--popover-surface-width:min(calc(100vw - 4rem), 50rem)}.rule-node__chips{display:block;width:100%}.rule-node__chips limel-picker{display:block;width:100%}.rule-node__children{display:flex;flex-direction:column;gap:0.5rem}.rule-node__footer{display:flex;justify-content:center}.rule-node__issue{color:rgb(var(--color-red-default));font-size:0.875rem}"}},[1,"limebb-rule-editor",{platform:[16],context:[16],value:[16],availableContexts:[16],required:[516],readonly:[516],disabled:[516],label:[513],helperText:[1,"helper-text"],resolvedContext:[32],issues:[32],openChipPath:[32],availablePrimitiveOptions:[32]},void 0,{value:[{onValueChange:0}],availableContexts:[{onAvailableContextsChange:0}]}]);!function(e,t,n,r){var i,l=arguments.length,o=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(l<3?i(o):l>3?i(t,n,o):i(t,n))||o);l>3&&o&&Object.defineProperty(t,n,o)}([l("context")],L.prototype,"resolvedContext",void 0);const T=Object.freeze({limetype:null,id:null}),q=L,F=function(){"undefined"!=typeof customElements&&["limebb-rule-editor","limebb-rule-chip-popover"].forEach((e=>{switch(e){case"limebb-rule-editor":customElements.get(i(e))||customElements.define(i(e),L);break;case"limebb-rule-chip-popover":customElements.get(i(e))||s()}}))};export{q as LimebbRuleEditor,F as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as o,h as i,transformTag as r}from"@stencil/core/internal/client";import{T as s,b as l}from"./index.esm.js";import{L as n}from"./web-component-template.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.negate=o(this,"negate",7),this.updateArgs=o(this,"updateArgs",7),this.deleteChip=o(this,"deleteChip",7),this.isNegated=!1,this.readonly=!1,this.disabled=!1,this.isMutable=!0,this.handleNegateChange=e=>{e.stopPropagation(),this.negate.emit(e.detail)},this.handleArgsChange=e=>{e.stopPropagation(),this.updateArgs.emit(e.detail)},this.handleDelete=()=>{this.deleteChip.emit()}}render(){return i("div",{key:"ca7901be2a99590faddea0c678d149b13b5d564f",class:"popover"},this.renderHeader(),this.renderBody())}renderHeader(){var e,t,o,r;const s=(null===(e=this.metadata)||void 0===e?void 0:e.title)?this.translator.get(this.metadata.title):null!==(o=null===(t=this.refNode)||void 0===t?void 0:t.id)&&void 0!==o?o:"";return i("limel-header",{class:"popover__header is-narrow",heading:s,icon:null===(r=this.metadata)||void 0===r?void 0:r.icon},this.renderHeaderActions())}renderHeaderActions(){return this.isMutable?i("div",{slot:"actions",class:"popover__header-actions"},i("limel-switch",{class:"popover__negate-switch",label:this.translator.get("webclient.rule-editor.negate"),value:this.isNegated,onChange:this.handleNegateChange}),i("limel-icon-button",{class:"popover__delete-button",icon:"trash",label:this.translator.get("webclient.rule-editor.delete"),onClick:this.handleDelete})):null}get translator(){return this.platform.get(l.Translate)}renderBody(){var e,t;const o=null===(e=this.metadata)||void 0===e?void 0:e.configComponent;return o?i("div",{class:"popover__body"},i(n,{platform:this.platform,context:this.context,name:o.name,props:Object.assign(Object.assign({},o.props),{value:null===(t=this.refNode)||void 0===t?void 0:t.args,readonly:this.readonly,disabled:this.disabled,onChange:this.handleArgsChange})})):null}static get style(){return":host{display:block}.popover{display:flex;flex-direction:column;min-width:24rem;background-color:rgb(var(--contrast-100));border:1px solid rgb(var(--contrast-700));border-radius:0.5rem;box-shadow:0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);overflow:hidden}.popover__header{--header-background-color:rgba(var(--contrast-300));padding-right:0.5rem;gap:1rem}.popover__header-actions{display:grid;grid-auto-flow:column;grid-gap:0.75rem;padding:0.25rem;align-items:center}.popover__delete-button{color:rgb(var(--contrast-1100))}.popover__body{padding:1rem}"}},[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"]}]);function d(){"undefined"!=typeof customElements&&["limebb-rule-chip-popover"].forEach((e=>{"limebb-rule-chip-popover"===e&&(customElements.get(r(e))||customElements.define(r(e),a))}))}!function(e,t,o,i){var r,s=arguments.length,l=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,o,i);else for(var n=e.length-1;n>=0;n--)(r=e[n])&&(l=(s<3?r(l):s>3?r(t,o,l):r(t,o))||l);s>3&&l&&Object.defineProperty(t,o,l)}([s("context")],a.prototype,"context",void 0);export{a as R,d}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as o,h as i,transformTag as r}from"@stencil/core/internal/client";import{T as s,b as n}from"./index.esm.js";import{L as l}from"./web-component-template.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.negate=o(this,"negate",7),this.updateArgs=o(this,"updateArgs",7),this.deleteChip=o(this,"deleteChip",7),this.isNegated=!1,this.readonly=!1,this.disabled=!1,this.isMutable=!0,this.focusOnOpen=!1,this.handleNegateChange=e=>{e.stopPropagation(),this.negate.emit(e.detail)},this.handleArgsChange=e=>{e.stopPropagation(),this.updateArgs.emit(e.detail)},this.handleDelete=()=>{this.deleteChip.emit()}}render(){return i("div",{key:"a395bf65b1868b0a440881f2c885c7bd9dc741d4",class:"popover"},this.renderHeader(),this.renderBody())}renderHeader(){var e,t,o,r;const s=(null===(e=this.metadata)||void 0===e?void 0:e.title)?this.translator.get(this.metadata.title):null!==(o=null===(t=this.refNode)||void 0===t?void 0:t.id)&&void 0!==o?o:"";return i("limel-header",{class:"popover__header is-narrow",heading:s,icon:null===(r=this.metadata)||void 0===r?void 0:r.icon},this.renderHeaderActions())}renderHeaderActions(){return this.isMutable?i("div",{slot:"actions",class:"popover__header-actions"},i("limel-switch",{class:"popover__negate-switch",label:this.translator.get("webclient.rule-editor.negate"),value:this.isNegated,onChange:this.handleNegateChange}),i("limel-icon-button",{class:"popover__delete-button",icon:"trash",label:this.translator.get("webclient.rule-editor.delete"),onClick:this.handleDelete})):null}get translator(){return this.platform.get(n.Translate)}renderBody(){var e,t;const o=null===(e=this.metadata)||void 0===e?void 0:e.configComponent;return o?i("div",{class:"popover__body"},i(l,{platform:this.platform,context:this.context,name:o.name,props:Object.assign(Object.assign({},o.props),{value:null===(t=this.refNode)||void 0===t?void 0:t.args,readonly:this.readonly,disabled:this.disabled,focusOnOpen:this.focusOnOpen,onChange:this.handleArgsChange})})):null}static get style(){return":host{display:block}.popover{display:flex;flex-direction:column;min-width:24rem;background-color:rgb(var(--contrast-100));border:1px solid rgb(var(--contrast-700));border-radius:0.5rem;box-shadow:0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);overflow:hidden}.popover__header{--header-background-color:rgba(var(--contrast-300));padding-right:0.5rem;gap:1rem}.popover__header-actions{display:grid;grid-auto-flow:column;grid-gap:0.75rem;padding:0.25rem;align-items:center}.popover__delete-button{color:rgb(var(--contrast-1100))}.popover__body{padding:1rem}"}},[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"],focusOnOpen:[4,"focus-on-open"]}]);function d(){"undefined"!=typeof customElements&&["limebb-rule-chip-popover"].forEach((e=>{"limebb-rule-chip-popover"===e&&(customElements.get(r(e))||customElements.define(r(e),a))}))}!function(e,t,o,i){var r,s=arguments.length,n=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,o,n):r(t,o))||n);s>3&&n&&Object.defineProperty(t,o,n)}([s("context")],a.prototype,"context",void 0);export{a as R,d}
@@ -17,5 +17,5 @@ var patchBrowser = () => {
17
17
 
18
18
  patchBrowser().then(async (options) => {
19
19
  await globalScripts();
20
- return bootstrapLazy(JSON.parse("[[\"limebb-lime-query-builder\",[[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]}]]],[\"limebb-rule-arg-filter-editor\",[[1,\"limebb-rule-arg-filter-editor\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"resolvedContext\":[32]}]]],[\"limebb-feed\",[[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}]}]]],[\"limebb-kanban\",[[1,\"limebb-kanban\",{\"platform\":[16],\"context\":[16],\"groups\":[16]}]]],[\"limebb-chat-list\",[[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}]}]]],[\"limebb-lime-query-response-format-builder\",[[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]}]]],[\"limebb-document-chips\",[[1,\"limebb-document-chips\",{\"accessibleLabel\":[513,\"accessible-label\"],\"files\":[16]},null,{\"files\":[{\"onFilesChanged\":0}]}]]],[\"limebb-limeobject-file-viewer\",[[1,\"limebb-limeobject-file-viewer\",{\"platform\":[16],\"context\":[16],\"property\":[1],\"fileTypes\":[16],\"limeobject\":[32],\"limetype\":[32]}]]],[\"limebb-text-editor\",[[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}]}]]],[\"limebb-data-cells\",[[1,\"limebb-data-cells\",{\"platform\":[16],\"context\":[16],\"limeobject\":[8],\"items\":[16],\"image\":[16],\"relativeDates\":[4,\"relative-dates\"]}]]],[\"limebb-date-range\",[[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]}]]],[\"limebb-document-picker\",[[1,\"limebb-document-picker\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"invalid\":[516],\"required\":[516],\"type\":[513]}]]],[\"limebb-info-tile-currency-format\",[[1,\"limebb-info-tile-currency-format\",{\"platform\":[16],\"context\":[16],\"value\":[16]}]]],[\"limebb-notification-list\",[[1,\"limebb-notification-list\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"loading\":[4],\"lastVisitedTimestamp\":[1,\"last-visited-timestamp\"]},null,{\"items\":[{\"handleItemsChange\":0}]}]]],[\"limebb-rule-editor\",[[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],\"availablePrimitiveOptions\":[32]},null,{\"value\":[{\"onValueChange\":0}],\"availableContexts\":[{\"onAvailableContextsChange\":0}]}]]],[\"limebb-alert-dialog\",[[257,\"limebb-alert-dialog\",{\"type\":[513],\"open\":[516],\"icon\":[513],\"heading\":[513],\"subheading\":[1]}]]],[\"limebb-browser\",[[17,\"limebb-browser\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"layout\":[1],\"filter\":[32]}]]],[\"limebb-color-palette-picker\",[[1,\"limebb-color-palette-picker\",{\"value\":[513],\"required\":[516],\"readonly\":[516],\"invalid\":[516],\"disabled\":[516],\"label\":[513],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-color-palette-swatches\",[[1,\"limebb-color-palette-swatches\",{\"colors\":[16]}]]],[\"limebb-component-config\",[[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}]}]]],[\"limebb-component-picker\",[[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\"]}]]],[\"limebb-composer-toolbar\",[[257,\"limebb-composer-toolbar\",{\"platform\":[16],\"mentions\":[516],\"textSnippets\":[516,\"text-snippets\"],\"internalLinks\":[516,\"internal-links\"],\"richText\":[516,\"rich-text\"],\"fileInput\":[16]}]]],[\"limebb-dashboard-widget\",[[257,\"limebb-dashboard-widget\",{\"heading\":[513],\"subheading\":[513],\"supportingText\":[513,\"supporting-text\"],\"icon\":[513]}]]],[\"limebb-icon-picker\",[[1,\"limebb-icon-picker\",{\"value\":[1],\"required\":[4],\"readonly\":[4],\"invalid\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-info-tile\",[[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}]}]]],[\"limebb-info-tile-date-format\",[[1,\"limebb-info-tile-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-decimal-format\",[[1,\"limebb-info-tile-decimal-format\",{\"value\":[16]}]]],[\"limebb-info-tile-format\",[[1,\"limebb-info-tile-format\",{\"platform\":[16],\"context\":[16],\"type\":[1],\"value\":[16]}]]],[\"limebb-info-tile-relative-date-format\",[[1,\"limebb-info-tile-relative-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-unit-format\",[[1,\"limebb-info-tile-unit-format\",{\"value\":[16]}]]],[\"limebb-loader\",[[1,\"limebb-loader\",{\"platform\":[16],\"context\":[16]}]]],[\"limebb-locale-picker\",[[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]}]]],[\"limebb-mention\",[[257,\"limebb-mention\",{\"limetype\":[1],\"objectid\":[2],\"limeobject\":[32]}]]],[\"limebb-mention-group-counter\",[[1,\"limebb-mention-group-counter\",{\"count\":[2],\"limetype\":[16],\"helperLabel\":[1,\"helper-label\"]}]]],[\"limebb-object-chip\",[[1,\"limebb-object-chip\",{\"limetype\":[1],\"objectid\":[2],\"size\":[1],\"platform\":[16],\"data\":[32]},null,{\"limetype\":[{\"handlePropChange\":0}],\"objectid\":[{\"handlePropChange\":0}]}]]],[\"limebb-rule-gate\",[[257,\"limebb-rule-gate\",{\"platform\":[16],\"rule\":[16],\"scope\":[16],\"shouldRender\":[32]},null,{\"rule\":[{\"onRuleChange\":0}],\"scope\":[{\"onScopeChange\":0}]}]]],[\"limebb-trend-indicator\",[[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}]}]]],[\"limebb-currency-picker\",[[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]}]]],[\"limebb-feed-item-thumbnail-file-info\",[[1,\"limebb-feed-item-thumbnail-file-info\",{\"description\":[1]}]]],[\"limebb-feed-timeline-item\",[[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]}]]],[\"limebb-kanban-group\",[[1,\"limebb-kanban-group\",{\"platform\":[16],\"context\":[16],\"identifier\":[1],\"heading\":[513],\"help\":[1],\"items\":[16],\"summary\":[1],\"loading\":[516],\"totalCount\":[514,\"total-count\"]}]]],[\"limebb-document-item\",[[17,\"limebb-document-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"type\":[513],\"fileTypes\":[16]}]]],[\"limebb-empty-state\",[[1,\"limebb-empty-state\",{\"heading\":[513],\"value\":[513],\"icon\":[16]}]]],[\"limebb-text-editor-picker\",[[1,\"limebb-text-editor-picker\",{\"items\":[16],\"open\":[516],\"isSearching\":[4,\"is-searching\"],\"emptyMessage\":[1,\"empty-message\"]},null,{\"open\":[{\"watchOpen\":0}]}]]],[\"limebb-date-picker\",[[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]}]]],[\"limebb-live-docs-info\",[[1,\"limebb-live-docs-info\"]]],[\"limebb-notification-item\",[[1,\"limebb-notification-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-percentage-visualizer\",[[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}]}]]],[\"limebb-rule-chip-popover\",[[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\"]}]]],[\"limebb-lime-query-filter-builder\",[[1,\"limebb-lime-query-filter-builder\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}]]],[\"limebb-kanban-item\",[[257,\"limebb-kanban-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-property-selector\",[[17,\"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]}]]],[\"limebb-lime-query-order-by-item\",[[1,\"limebb-lime-query-order-by-item\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"item\":[16]}]]],[\"limebb-lime-query-order-by-editor_2\",[[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]}]]],[\"limebb-chat-icon-list_3\",[[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\"]]],[\"limebb-lime-query-response-format-editor_2\",[[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]}]]],[\"limebb-lime-query-filter-comparison_2\",[[2,\"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],\"isOpen\":[32]}]]],[\"limebb-navigation-button_2\",[[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]}]]],[\"limebb-lime-query-filter-comparison-editor_4\",[[17,\"limebb-lime-query-filter-comparison-editor\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-group\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-not\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[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]}]]]]"), options);
20
+ return bootstrapLazy(JSON.parse("[[\"limebb-lime-query-builder\",[[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]}]]],[\"limebb-rule-arg-filter-editor\",[[1,\"limebb-rule-arg-filter-editor\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"resolvedContext\":[32]}]]],[\"limebb-feed\",[[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}]}]]],[\"limebb-kanban\",[[1,\"limebb-kanban\",{\"platform\":[16],\"context\":[16],\"groups\":[16]}]]],[\"limebb-chat-list\",[[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}]}]]],[\"limebb-lime-query-response-format-builder\",[[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]}]]],[\"limebb-document-chips\",[[1,\"limebb-document-chips\",{\"accessibleLabel\":[513,\"accessible-label\"],\"files\":[16]},null,{\"files\":[{\"onFilesChanged\":0}]}]]],[\"limebb-limeobject-file-viewer\",[[1,\"limebb-limeobject-file-viewer\",{\"platform\":[16],\"context\":[16],\"property\":[1],\"fileTypes\":[16],\"limeobject\":[32],\"limetype\":[32]}]]],[\"limebb-text-editor\",[[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}]}]]],[\"limebb-data-cells\",[[1,\"limebb-data-cells\",{\"platform\":[16],\"context\":[16],\"limeobject\":[8],\"items\":[16],\"image\":[16],\"relativeDates\":[4,\"relative-dates\"]}]]],[\"limebb-date-range\",[[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]}]]],[\"limebb-document-picker\",[[1,\"limebb-document-picker\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"label\":[513],\"helperText\":[513,\"helper-text\"],\"invalid\":[516],\"required\":[516],\"type\":[513]}]]],[\"limebb-info-tile-currency-format\",[[1,\"limebb-info-tile-currency-format\",{\"platform\":[16],\"context\":[16],\"value\":[16]}]]],[\"limebb-notification-list\",[[1,\"limebb-notification-list\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"loading\":[4],\"lastVisitedTimestamp\":[1,\"last-visited-timestamp\"]},null,{\"items\":[{\"handleItemsChange\":0}]}]]],[\"limebb-rule-editor\",[[1,\"limebb-rule-editor\",{\"platform\":[16],\"context\":[16],\"value\":[16],\"availableContexts\":[16],\"required\":[516],\"readonly\":[516],\"disabled\":[516],\"label\":[513],\"helperText\":[1,\"helper-text\"],\"resolvedContext\":[32],\"issues\":[32],\"openChipPath\":[32],\"availablePrimitiveOptions\":[32]},null,{\"value\":[{\"onValueChange\":0}],\"availableContexts\":[{\"onAvailableContextsChange\":0}]}]]],[\"limebb-alert-dialog\",[[257,\"limebb-alert-dialog\",{\"type\":[513],\"open\":[516],\"icon\":[513],\"heading\":[513],\"subheading\":[1]}]]],[\"limebb-browser\",[[17,\"limebb-browser\",{\"platform\":[16],\"context\":[16],\"items\":[16],\"layout\":[1],\"filter\":[32]}]]],[\"limebb-color-palette-picker\",[[1,\"limebb-color-palette-picker\",{\"value\":[513],\"required\":[516],\"readonly\":[516],\"invalid\":[516],\"disabled\":[516],\"label\":[513],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-color-palette-swatches\",[[1,\"limebb-color-palette-swatches\",{\"colors\":[16]}]]],[\"limebb-component-config\",[[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}]}]]],[\"limebb-component-picker\",[[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\"]}]]],[\"limebb-composer-toolbar\",[[257,\"limebb-composer-toolbar\",{\"platform\":[16],\"mentions\":[516],\"textSnippets\":[516,\"text-snippets\"],\"internalLinks\":[516,\"internal-links\"],\"richText\":[516,\"rich-text\"],\"fileInput\":[16]}]]],[\"limebb-dashboard-widget\",[[257,\"limebb-dashboard-widget\",{\"heading\":[513],\"subheading\":[513],\"supportingText\":[513,\"supporting-text\"],\"icon\":[513]}]]],[\"limebb-icon-picker\",[[1,\"limebb-icon-picker\",{\"value\":[1],\"required\":[4],\"readonly\":[4],\"invalid\":[4],\"disabled\":[4],\"label\":[1],\"helperText\":[1,\"helper-text\"]}]]],[\"limebb-info-tile\",[[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}]}]]],[\"limebb-info-tile-date-format\",[[1,\"limebb-info-tile-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-decimal-format\",[[1,\"limebb-info-tile-decimal-format\",{\"value\":[16]}]]],[\"limebb-info-tile-format\",[[1,\"limebb-info-tile-format\",{\"platform\":[16],\"context\":[16],\"type\":[1],\"value\":[16]}]]],[\"limebb-info-tile-relative-date-format\",[[1,\"limebb-info-tile-relative-date-format\",{\"value\":[16]}]]],[\"limebb-info-tile-unit-format\",[[1,\"limebb-info-tile-unit-format\",{\"value\":[16]}]]],[\"limebb-loader\",[[1,\"limebb-loader\",{\"platform\":[16],\"context\":[16]}]]],[\"limebb-locale-picker\",[[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]}]]],[\"limebb-mention\",[[257,\"limebb-mention\",{\"limetype\":[1],\"objectid\":[2],\"limeobject\":[32]}]]],[\"limebb-mention-group-counter\",[[1,\"limebb-mention-group-counter\",{\"count\":[2],\"limetype\":[16],\"helperLabel\":[1,\"helper-label\"]}]]],[\"limebb-object-chip\",[[1,\"limebb-object-chip\",{\"limetype\":[1],\"objectid\":[2],\"size\":[1],\"platform\":[16],\"data\":[32]},null,{\"limetype\":[{\"handlePropChange\":0}],\"objectid\":[{\"handlePropChange\":0}]}]]],[\"limebb-rule-gate\",[[257,\"limebb-rule-gate\",{\"platform\":[16],\"rule\":[16],\"scope\":[16],\"shouldRender\":[32]},null,{\"rule\":[{\"onRuleChange\":0}],\"scope\":[{\"onScopeChange\":0}]}]]],[\"limebb-trend-indicator\",[[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}]}]]],[\"limebb-currency-picker\",[[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]}]]],[\"limebb-feed-item-thumbnail-file-info\",[[1,\"limebb-feed-item-thumbnail-file-info\",{\"description\":[1]}]]],[\"limebb-feed-timeline-item\",[[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]}]]],[\"limebb-kanban-group\",[[1,\"limebb-kanban-group\",{\"platform\":[16],\"context\":[16],\"identifier\":[1],\"heading\":[513],\"help\":[1],\"items\":[16],\"summary\":[1],\"loading\":[516],\"totalCount\":[514,\"total-count\"]}]]],[\"limebb-document-item\",[[17,\"limebb-document-item\",{\"platform\":[16],\"context\":[16],\"item\":[16],\"type\":[513],\"fileTypes\":[16]}]]],[\"limebb-empty-state\",[[1,\"limebb-empty-state\",{\"heading\":[513],\"value\":[513],\"icon\":[16]}]]],[\"limebb-text-editor-picker\",[[1,\"limebb-text-editor-picker\",{\"items\":[16],\"open\":[516],\"isSearching\":[4,\"is-searching\"],\"emptyMessage\":[1,\"empty-message\"]},null,{\"open\":[{\"watchOpen\":0}]}]]],[\"limebb-date-picker\",[[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]}]]],[\"limebb-live-docs-info\",[[1,\"limebb-live-docs-info\"]]],[\"limebb-notification-item\",[[1,\"limebb-notification-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-percentage-visualizer\",[[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}]}]]],[\"limebb-rule-chip-popover\",[[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\"],\"focusOnOpen\":[4,\"focus-on-open\"]}]]],[\"limebb-lime-query-filter-builder\",[[1,\"limebb-lime-query-filter-builder\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}]]],[\"limebb-kanban-item\",[[257,\"limebb-kanban-item\",{\"platform\":[16],\"context\":[16],\"item\":[16]}]]],[\"limebb-property-selector\",[[17,\"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]}]]],[\"limebb-lime-query-order-by-item\",[[1,\"limebb-lime-query-order-by-item\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"item\":[16]}]]],[\"limebb-lime-query-order-by-editor_2\",[[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]}]]],[\"limebb-chat-icon-list_3\",[[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\"]]],[\"limebb-lime-query-response-format-editor_2\",[[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]}]]],[\"limebb-lime-query-filter-comparison_2\",[[2,\"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],\"isOpen\":[32]}]]],[\"limebb-navigation-button_2\",[[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]}]]],[\"limebb-lime-query-filter-comparison-editor_4\",[[17,\"limebb-lime-query-filter-comparison-editor\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-group\",{\"platform\":[16],\"context\":[16],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[1,\"limebb-lime-query-filter-not\",{\"platform\":[16],\"context\":[16],\"label\":[1],\"limetype\":[1],\"activeLimetype\":[1,\"active-limetype\"],\"expression\":[16]}],[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]}]]]]"), options);
21
21
  });
@@ -45,9 +45,19 @@ const LIMEOBJECT_MATCHES_FILTER_ID = 'limetech.limeobject-matches-filter';
45
45
  * `limeobject-matches-filter` primitive, so the rule editor renders the
46
46
  * filter builder instead of a raw JSON field.
47
47
  *
48
+ * No-op when the primitive is not registered. `attachMetadata` throws
49
+ * for an unknown id, and this runs at loader time on every surface, so
50
+ * a missing primitive would otherwise block the whole app from loading.
51
+ *
48
52
  * @param registry - the platform's rule registry.
49
53
  */
50
54
  const attachRuleArgFilterEditorMetadata = (registry) => {
55
+ const isRegistered = registry
56
+ .listPrimitives()
57
+ .some((primitive) => primitive.id === LIMEOBJECT_MATCHES_FILTER_ID);
58
+ if (!isRegistered) {
59
+ return;
60
+ }
51
61
  registry.attachMetadata(LIMEOBJECT_MATCHES_FILTER_ID, {
52
62
  configComponent: { name: 'limebb-rule-arg-filter-editor' },
53
63
  });
@@ -24,6 +24,14 @@ const RuleChipPopover = class {
24
24
  this.readonly = false;
25
25
  this.disabled = false;
26
26
  this.isMutable = true;
27
+ /**
28
+ * Forwarded to the embedded config component so it can pull focus
29
+ * when this popover opens. The rule editor sets it only when the chip
30
+ * was just added via the picker, so clicking an existing chip does
31
+ * not steal focus. The component decides when it is ready to receive
32
+ * focus (e.g. after loading its own data).
33
+ */
34
+ this.focusOnOpen = false;
27
35
  this.handleNegateChange = (event) => {
28
36
  event.stopPropagation();
29
37
  this.negate.emit(event.detail);
@@ -37,7 +45,7 @@ const RuleChipPopover = class {
37
45
  };
38
46
  }
39
47
  render() {
40
- return (h("div", { key: 'ca7901be2a99590faddea0c678d149b13b5d564f', class: "popover" }, this.renderHeader(), this.renderBody()));
48
+ return (h("div", { key: 'a395bf65b1868b0a440881f2c885c7bd9dc741d4', class: "popover" }, this.renderHeader(), this.renderBody()));
41
49
  }
42
50
  renderHeader() {
43
51
  var _a, _b, _c, _d;
@@ -61,7 +69,7 @@ const RuleChipPopover = class {
61
69
  if (!configComponent) {
62
70
  return null;
63
71
  }
64
- return (h("div", { class: "popover__body" }, h(LimeWebComponentTemplate, { platform: this.platform, context: this.context, name: configComponent.name, props: Object.assign(Object.assign({}, configComponent.props), { value: (_b = this.refNode) === null || _b === void 0 ? void 0 : _b.args, readonly: this.readonly, disabled: this.disabled, onChange: this.handleArgsChange }) })));
72
+ return (h("div", { class: "popover__body" }, h(LimeWebComponentTemplate, { platform: this.platform, context: this.context, name: configComponent.name, props: Object.assign(Object.assign({}, configComponent.props), { value: (_b = this.refNode) === null || _b === void 0 ? void 0 : _b.args, readonly: this.readonly, disabled: this.disabled, focusOnOpen: this.focusOnOpen, onChange: this.handleArgsChange }) })));
65
73
  }
66
74
  };
67
75
  __decorate([