@sankhyalabs/sankhyablocks 9.1.0-ms.2 → 9.1.0-ms.3

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.
@@ -45,6 +45,7 @@ import { GuideBuilder } from "./components/snk-crud/subcomponents/GuideBuilder";
45
45
  import { SnkFilterItemConfig } from "./components/snk-filter-bar/filter-item/snk-filter-item";
46
46
  import { ListItem } from "./components/snk-filter-bar/filter-list/snk-filter-list";
47
47
  import { ListGroup } from "@sankhyalabs/ezui/dist/types/components/ez-list/ez-list";
48
+ import { IOption as IOption2 } from "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box";
48
49
  import { IExportResult } from "./components/snk-data-exporter/data/export-result";
49
50
  import { IExportConfig } from "./components/snk-data-exporter/data/export-config";
50
51
  import { IExpressionGroup, IExpressionItem } from "./components/snk-personalized-filter/interfaces/IExpressionItem";
@@ -56,7 +57,6 @@ import { FilterFieldsDataSource, IFilterField, IFilterLink } from "./components/
56
57
  import { IEzPopoverAnchorOptions } from "@sankhyalabs/ezui/dist/types/components/ez-popover/ez-popover";
57
58
  import { SnkFilterItemConfig as SnkFilterItemConfig1 } from "./components/snk-filter-bar/filter-item/snk-filter-item";
58
59
  import { ListItem as ListItem1 } from "./components/snk-filter-bar/filter-list/snk-filter-list";
59
- import { IOption as IOption2 } from "@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box";
60
60
  import { IFormViewField } from "@sankhyalabs/ezui/dist/types/components/ez-form-view/interfaces/IFormViewField";
61
61
  import { FormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
62
62
  import { ICustomEditor as ICustomEditor1 } from "@sankhyalabs/ezui/dist/types/utils/customEditor/interfaces/ICustomEditor";
@@ -868,6 +868,10 @@ export namespace Components {
868
868
  * Método que possibilita alterar como o item da lista vai ser apresentado. Observação: No React ele se transforma em VNode e não HTMLElement.
869
869
  */
870
870
  "rightListSlotBuilder": (item: ListItem, group?: ListGroup) => HTMLElement | string;
871
+ /**
872
+ * Define o valor do componente
873
+ */
874
+ "value": IOption2;
871
875
  }
872
876
  interface SnkExporterEmailSender {
873
877
  "close": () => Promise<IExportResult>;
@@ -3359,6 +3363,10 @@ declare namespace LocalJSX {
3359
3363
  * Método que possibilita alterar como o item da lista vai ser apresentado. Observação: No React ele se transforma em VNode e não HTMLElement.
3360
3364
  */
3361
3365
  "rightListSlotBuilder"?: (item: ListItem, group?: ListGroup) => HTMLElement | string;
3366
+ /**
3367
+ * Define o valor do componente
3368
+ */
3369
+ "value"?: IOption2;
3362
3370
  }
3363
3371
  interface SnkExporterEmailSender {
3364
3372
  "getMessage"?: (key: string, params?: any) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/sankhyablocks",
3
- "version": "9.1.0-ms.2",
3
+ "version": "9.1.0-ms.3",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as l,H as s}from"./p-d8d8169b.js";import{ObjectUtils as o,ApplicationContext as e}from"@sankhyalabs/core";const n=class{constructor(l){i(this,l),this.valueChanged=t(this,"valueChanged",7),this._searchValue=void 0,this._ezListSource=[],this.config=void 0,this.rightListSlotBuilder=void 0,this.maxHeightList=""}async reloadList(){this.loadListSource()}observeConfig(){var i,t;null===(t=null===(i=this._searchElement)||void 0===i?void 0:i.clearValue)||void 0===t||t.call(i)}ezListChangeListener(i){var t,l;const s=o.copy(this.config);null===(t=this.getListConfigValue(s))||void 0===t||t.forEach((t=>{var l,s;t&&t.id===(null===(l=i.detail)||void 0===l?void 0:l.id)&&(t.check=null===(s=i.detail)||void 0===s?void 0:s.check)})),this.config=o.copy(s),this.valueChanged.emit(null===(l=this.config)||void 0===l?void 0:l.value)}loadListSource(){var i;this._ezListSource=[],null===(i=this.getListConfigValue(this.config))||void 0===i||i.forEach((i=>{i&&this._ezListSource.push({label:`${i.id} - ${i.label}`,check:i.check,id:i.id})}))}componentDidLoad(){var i,t,l,s,o;let n=this.getListConfigValue(this.config),a=[];Array.isArray(n)?a=n:a.push(null===(t=null===(i=this.config)||void 0===i?void 0:i.value)||void 0===t?void 0:t.members),this.config.value=a,this._entityName=null===(o=null===(s=null===(l=this.config)||void 0===l?void 0:l.props)||void 0===s?void 0:s.searchContext)||void 0===o?void 0:o.entity,this._application=e.getContextValue("__SNK__APPLICATION__"),this.loadListSource()}optionLoader(i){var t,l,s,o,e,n;const{mode:a,argument:v}=i;if(void 0===this._application)return;const d=null!==(s=null===(l=null===(t=this.config)||void 0===t?void 0:t.props)||void 0===l?void 0:l.searchContext)&&void 0!==s?s:{},r=null===(e=null===(o=this.config)||void 0===o?void 0:o.props)||void 0===e?void 0:e.criteria,h=Object.assign(Object.assign({criteria:r},d),{entityDescription:null===(n=this.config)||void 0===n?void 0:n.label,entity:this._entityName});return this._application.executePreparedSearch(a,v,h)}onEzSearchChange(i){var t,l,s,o;null!=i.detail&&void 0===(null===(t=this.getListConfigValue(this.config))||void 0===t?void 0:t.find((t=>{var l;return(null==t?void 0:t.id)==(null===(l=i.detail)||void 0===l?void 0:l.value)})))&&(this.config=Object.assign(Object.assign({},this.config),{value:[...null!==(s=null===(l=this.config)||void 0===l?void 0:l.value)&&void 0!==s?s:[],{id:i.detail.value,check:!0,label:i.detail.label}]}),this.loadListSource(),this.valueChanged.emit(null===(o=this.config)||void 0===o?void 0:o.value))}getMessage(i,t){var l;return null===(l=this._application)||void 0===l?void 0:l.messagesBuilder.getMessage(i,t)}getListConfigValue(i){var t,l,s,o;return null!==(o=null!==(l=null===(t=i.value)||void 0===t?void 0:t.elements)&&void 0!==l?l:null===(s=null==i?void 0:i.value)||void 0===s?void 0:s.members)&&void 0!==o?o:null==i?void 0:i.value}render(){var i,t,o;const e=1==(null===(i=this.config.props)||void 0===i?void 0:i.useSearchPlus);return l(s,null,l(e?"ez-search-plus":"ez-search",{ref:i=>this._searchElement=i,optionLoader:i=>this.optionLoader(i),value:this._searchValue,label:null===(t=this.config)||void 0===t?void 0:t.label,onEzChange:i=>this.onEzSearchChange(i),suppressEmptyOption:!0}),(null===(o=this._ezListSource)||void 0===o?void 0:o.length)>0&&l("label",{class:"label"},this.getMessage("snkEntityList.selected")),l("div",{style:this.maxHeightList?{"max-height":this.maxHeightList}:{},class:{"snk-entity-list--overflow":!!this.maxHeightList}},l("ez-list",{ref:i=>this._ezList=i,id:"snkEntityList",listMode:"check",dataSource:this._ezListSource,hoverFeedback:!0,itemSlotBuilder:this.rightListSlotBuilder,onEzCheckChange:i=>this.ezListChangeListener(i)})))}static get watchers(){return{config:["observeConfig"]}}};n.style=".sc-snk-entity-list-h{--snk-entity-list--label--font-size:var(--text--medium, 14px);--snk-entity-list--label--font-family:var(--font-pattern, Arial);--snk-entity-list--label--color:var(--title--primary, #000);--snk-entity-list--label--disabled--color:var(--text--disable, #AFB6C0)}.label.sc-snk-entity-list{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--snk-entity-list--label--color);font-size:var(--snk-entity-list--label--font-size);font-family:var(--snk-entity-list--label--font-family);cursor:default;padding-left:var(--space--small);padding-bottom:var(--space--extra-small)}.snk-entity-list--overflow.sc-snk-entity-list{overflow:auto}.snk-entity-list--overflow.sc-snk-entity-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{n as snk_entity_list}