@sankhyalabs/sankhyablocks 5.9.1 → 5.10.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 (124) hide show
  1. package/dist/cjs/{ConfigStorage-91adf3fe.js → ConfigStorage-f68c3607.js} +5 -71
  2. package/dist/cjs/{SnkFormConfigManager-e1a10283.js → SnkFormConfigManager-69df3f74.js} +2 -2
  3. package/dist/cjs/{SnkMessageBuilder-1760d2c9.js → SnkMessageBuilder-cf80308c.js} +6 -1
  4. package/dist/cjs/filter-bar-config-fetcher-a14536bf.js +115 -0
  5. package/dist/cjs/{form-config-fetcher-fa19680a.js → form-config-fetcher-92bc8fe7.js} +2 -65
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/resource-fetcher-2979b54b.js +68 -0
  8. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  9. package/dist/cjs/snk-application.cjs.entry.js +7 -4
  10. package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
  11. package/dist/cjs/{snk-data-unit-f27603c9.js → snk-data-unit-bd271acd.js} +1 -1
  12. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  13. package/dist/cjs/snk-detail-view.cjs.entry.js +8 -5
  14. package/dist/cjs/snk-entity-list.cjs.entry.js +111 -0
  15. package/dist/cjs/snk-filter-bar.cjs.entry.js +4 -2
  16. package/dist/cjs/snk-filter-detail.cjs.entry.js +44 -3
  17. package/dist/cjs/snk-filter-item.cjs.entry.js +9 -4
  18. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +30 -2
  19. package/dist/cjs/snk-filter-modal.cjs.entry.js +26 -3
  20. package/dist/cjs/snk-form-config.cjs.entry.js +2 -1
  21. package/dist/cjs/snk-form.cjs.entry.js +6 -3
  22. package/dist/cjs/snk-grid-config.cjs.entry.js +5 -2
  23. package/dist/cjs/snk-grid.cjs.entry.js +5 -2
  24. package/dist/cjs/{snk-guides-viewer-5f2eb52b.js → snk-guides-viewer-b2d40bc4.js} +1 -1
  25. package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -4
  26. package/dist/collection/collection-manifest.json +1 -0
  27. package/dist/collection/components/snk-crud/snk-crud.js +6 -2
  28. package/dist/collection/components/snk-entity-list/snk-entity-list.css +35 -0
  29. package/dist/collection/components/snk-entity-list/snk-entity-list.js +250 -0
  30. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +45 -4
  31. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +9 -4
  32. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +26 -3
  33. package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +28 -3
  34. package/dist/collection/components/snk-grid/snk-grid.js +6 -2
  35. package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +48 -5
  36. package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
  37. package/dist/collection/lib/message/resources/snk-entity-list.msg.js +3 -0
  38. package/dist/components/ConfigStorage.js +3 -69
  39. package/dist/components/SnkMessageBuilder.js +6 -1
  40. package/dist/components/filter-bar-config-fetcher.js +113 -0
  41. package/dist/components/form-config-fetcher.js +2 -64
  42. package/dist/components/index.d.ts +1 -0
  43. package/dist/components/index.js +1 -0
  44. package/dist/components/resource-fetcher.js +66 -0
  45. package/dist/components/snk-application2.js +1 -1
  46. package/dist/components/snk-entity-list.d.ts +11 -0
  47. package/dist/components/snk-entity-list.js +131 -0
  48. package/dist/components/snk-filter-detail2.js +42 -4
  49. package/dist/components/snk-filter-item2.js +9 -4
  50. package/dist/components/snk-filter-modal-item2.js +28 -3
  51. package/dist/components/snk-filter-modal.js +26 -3
  52. package/dist/esm/{ConfigStorage-ac77ff39.js → ConfigStorage-e6c17998.js} +3 -69
  53. package/dist/esm/{SnkFormConfigManager-40609500.js → SnkFormConfigManager-e60367a0.js} +2 -2
  54. package/dist/esm/{SnkMessageBuilder-4caf8b4f.js → SnkMessageBuilder-1a169545.js} +6 -1
  55. package/dist/esm/filter-bar-config-fetcher-edc48f4b.js +113 -0
  56. package/dist/esm/{form-config-fetcher-018e7e73.js → form-config-fetcher-cac8cd96.js} +2 -64
  57. package/dist/esm/loader.js +1 -1
  58. package/dist/esm/resource-fetcher-02642924.js +66 -0
  59. package/dist/esm/sankhyablocks.js +1 -1
  60. package/dist/esm/snk-application.entry.js +6 -3
  61. package/dist/esm/snk-data-exporter.entry.js +2 -2
  62. package/dist/esm/{snk-data-unit-640399b3.js → snk-data-unit-476024e9.js} +1 -1
  63. package/dist/esm/snk-data-unit.entry.js +2 -2
  64. package/dist/esm/snk-detail-view.entry.js +8 -5
  65. package/dist/esm/snk-entity-list.entry.js +107 -0
  66. package/dist/esm/snk-filter-bar.entry.js +4 -2
  67. package/dist/esm/snk-filter-detail.entry.js +45 -4
  68. package/dist/esm/snk-filter-item.entry.js +9 -4
  69. package/dist/esm/snk-filter-modal-item.entry.js +31 -3
  70. package/dist/esm/snk-filter-modal.entry.js +26 -3
  71. package/dist/esm/snk-form-config.entry.js +2 -1
  72. package/dist/esm/snk-form.entry.js +6 -3
  73. package/dist/esm/snk-grid-config.entry.js +5 -2
  74. package/dist/esm/snk-grid.entry.js +5 -2
  75. package/dist/esm/{snk-guides-viewer-11ca46dc.js → snk-guides-viewer-11a02781.js} +1 -1
  76. package/dist/esm/snk-guides-viewer.entry.js +7 -4
  77. package/dist/sankhyablocks/p-0409d41b.entry.js +1 -0
  78. package/dist/sankhyablocks/p-1c5d5e5c.entry.js +1 -0
  79. package/dist/sankhyablocks/p-1c836fad.entry.js +1 -0
  80. package/dist/sankhyablocks/p-1e6a95f5.entry.js +1 -0
  81. package/dist/sankhyablocks/p-2ea933b2.js +17 -0
  82. package/dist/sankhyablocks/{p-6981c03e.js → p-3e17b147.js} +1 -1
  83. package/dist/sankhyablocks/p-471568c7.entry.js +1 -0
  84. package/dist/sankhyablocks/p-4eae2812.entry.js +1 -0
  85. package/dist/sankhyablocks/p-554e2f83.entry.js +1 -0
  86. package/dist/sankhyablocks/p-587bd851.entry.js +1 -0
  87. package/dist/sankhyablocks/p-656eab86.entry.js +1 -0
  88. package/dist/sankhyablocks/p-6c2c71ca.js +1 -0
  89. package/dist/sankhyablocks/p-79f78e10.js +10 -0
  90. package/dist/sankhyablocks/{p-7f2e267a.js → p-7f0afee1.js} +1 -1
  91. package/dist/sankhyablocks/p-b1c02726.js +1 -0
  92. package/dist/sankhyablocks/{p-e0aa5838.js → p-b25450ab.js} +1 -1
  93. package/dist/sankhyablocks/p-c20dd153.entry.js +1 -0
  94. package/dist/sankhyablocks/{p-29c1889f.js → p-c74fca58.js} +1 -1
  95. package/dist/sankhyablocks/p-c842c6f1.entry.js +1 -0
  96. package/dist/sankhyablocks/{p-4181c36d.entry.js → p-c93aab6a.entry.js} +1 -1
  97. package/dist/sankhyablocks/p-d66bfdef.entry.js +1 -0
  98. package/dist/sankhyablocks/p-e642bf7a.entry.js +1 -0
  99. package/dist/sankhyablocks/{p-57b74971.entry.js → p-f5e607e7.entry.js} +3 -3
  100. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  101. package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +48 -0
  102. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -0
  103. package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +6 -0
  104. package/dist/types/components.d.ts +59 -7
  105. package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +1 -0
  106. package/dist/types/lib/message/resources/snk-entity-list.msg.d.ts +1 -0
  107. package/package.json +1 -1
  108. package/react/components.d.ts +1 -0
  109. package/react/components.js +1 -0
  110. package/react/components.js.map +1 -1
  111. package/dist/sankhyablocks/p-08779202.entry.js +0 -1
  112. package/dist/sankhyablocks/p-0bb49e4a.entry.js +0 -1
  113. package/dist/sankhyablocks/p-0d81236c.js +0 -26
  114. package/dist/sankhyablocks/p-355e7ab0.entry.js +0 -1
  115. package/dist/sankhyablocks/p-3794686e.entry.js +0 -1
  116. package/dist/sankhyablocks/p-52ed2a18.js +0 -1
  117. package/dist/sankhyablocks/p-59705471.entry.js +0 -1
  118. package/dist/sankhyablocks/p-6f0b3cc0.entry.js +0 -1
  119. package/dist/sankhyablocks/p-747ea2c3.entry.js +0 -1
  120. package/dist/sankhyablocks/p-7621806d.entry.js +0 -1
  121. package/dist/sankhyablocks/p-86f75e7a.entry.js +0 -1
  122. package/dist/sankhyablocks/p-9043c45f.entry.js +0 -1
  123. package/dist/sankhyablocks/p-b9fb86fe.entry.js +0 -1
  124. package/dist/sankhyablocks/p-c7ee03cd.entry.js +0 -1
@@ -0,0 +1,111 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-21bd01e1.js');
6
+ const core = require('@sankhyalabs/core');
7
+
8
+ const snkEntityListCss = ".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)}";
9
+
10
+ const SnkEntityList = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.valueChanged = index.createEvent(this, "valueChanged", 7);
14
+ this.saveConfig = index.createEvent(this, "saveConfig", 7);
15
+ this._searchValue = undefined;
16
+ this._ezListSource = [];
17
+ this.config = undefined;
18
+ this.rightListSlotBuilder = undefined;
19
+ this.maxHeightList = "";
20
+ }
21
+ async reloadList() {
22
+ this.loadListSource();
23
+ this.saveConfig.emit(this.config);
24
+ }
25
+ observeConfig() {
26
+ var _a, _b;
27
+ (_b = (_a = this._searchElement) === null || _a === void 0 ? void 0 : _a['clearValue']) === null || _b === void 0 ? void 0 : _b.call(_a);
28
+ }
29
+ ezListChangeListener(evt) {
30
+ var _a, _b, _c, _d;
31
+ (_c = ((_a = this.config.value) !== null && _a !== void 0 ? _a : (_b = this.config.value) === null || _b === void 0 ? void 0 : _b.elements)) === null || _c === void 0 ? void 0 : _c.forEach(value => {
32
+ var _a, _b;
33
+ if (value && value.id === ((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.id)) {
34
+ value.check = (_b = evt.detail) === null || _b === void 0 ? void 0 : _b.check;
35
+ }
36
+ });
37
+ this.saveConfig.emit(this.config);
38
+ this.valueChanged.emit((_d = this.config) === null || _d === void 0 ? void 0 : _d.value);
39
+ }
40
+ loadListSource() {
41
+ var _a, _b, _c, _d, _e, _f, _g, _h;
42
+ this._ezListSource = [];
43
+ (_h = ((_e = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : (_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.elements) !== null && _e !== void 0 ? _e : (_g = (_f = this.config) === null || _f === void 0 ? void 0 : _f.value) === null || _g === void 0 ? void 0 : _g.members)) === null || _h === void 0 ? void 0 : _h.forEach(value => {
44
+ if (value) {
45
+ this._ezListSource.push({
46
+ label: `${value.id} - ${value.label}`,
47
+ check: value.check,
48
+ id: value.id
49
+ });
50
+ }
51
+ });
52
+ }
53
+ componentDidLoad() {
54
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
55
+ let configValue = (_f = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.elements) !== null && _c !== void 0 ? _c : (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.value) === null || _e === void 0 ? void 0 : _e.members) !== null && _f !== void 0 ? _f : (_g = this.config) === null || _g === void 0 ? void 0 : _g.value;
56
+ let configValueArray = [];
57
+ if (Array.isArray(configValue)) {
58
+ configValueArray = configValue;
59
+ }
60
+ else {
61
+ configValueArray.push((_j = (_h = this.config) === null || _h === void 0 ? void 0 : _h.value) === null || _j === void 0 ? void 0 : _j.members);
62
+ }
63
+ this.config.value = configValueArray;
64
+ this._entityName = (_m = (_l = (_k = this.config) === null || _k === void 0 ? void 0 : _k.props) === null || _l === void 0 ? void 0 : _l.searchContext) === null || _m === void 0 ? void 0 : _m.entity;
65
+ this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
66
+ this.loadListSource();
67
+ }
68
+ optionLoader({ mode, argument }) {
69
+ var _a, _b, _c, _d;
70
+ if (this._application === undefined) {
71
+ return;
72
+ }
73
+ const searchOptions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.searchContext) === null || _c === void 0 ? void 0 : _c.searchOptions;
74
+ const options = {
75
+ entityDescription: (_d = this.config) === null || _d === void 0 ? void 0 : _d.label,
76
+ entity: this._entityName,
77
+ searchOptions: searchOptions
78
+ };
79
+ return this._application.executePreparedSearch(mode, argument, options);
80
+ }
81
+ onEzSearchChange(evt) {
82
+ var _a, _b, _c, _d, _e, _f, _g, _h;
83
+ if (evt.detail != undefined && ((_e = ((_c = (_a = this.config.value) !== null && _a !== void 0 ? _a : (_b = this.config.value) === null || _b === void 0 ? void 0 : _b.elements) !== null && _c !== void 0 ? _c : (_d = this.config.value) === null || _d === void 0 ? void 0 : _d.members)) === null || _e === void 0 ? void 0 : _e.find(i => { var _a; return (i === null || i === void 0 ? void 0 : i.id) == ((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); })) === undefined) {
84
+ this.config = Object.assign(Object.assign({}, this.config), { value: [
85
+ ...((_g = (_f = this.config) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : []),
86
+ {
87
+ id: evt.detail.value,
88
+ check: true,
89
+ label: evt.detail.label
90
+ }
91
+ ] });
92
+ this.loadListSource();
93
+ this.saveConfig.emit(this.config);
94
+ this.valueChanged.emit((_h = this.config) === null || _h === void 0 ? void 0 : _h.value);
95
+ }
96
+ }
97
+ getMessage(key, params) {
98
+ var _a;
99
+ return (_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder.getMessage(key, params);
100
+ }
101
+ render() {
102
+ var _a;
103
+ return (index.h(index.Host, null, index.h("ez-search", { ref: elem => this._searchElement = elem, optionLoader: argument => this.optionLoader(argument), value: this._searchValue, label: (_a = this.config) === null || _a === void 0 ? void 0 : _a.label, onEzChange: evt => this.onEzSearchChange(evt) }), index.h("label", { class: "label" }, this.getMessage("snkEntityList.selected")), index.h("div", { style: this.maxHeightList ? { 'max-height': this.maxHeightList } : {}, class: { "snk-entity-list--overflow": !!this.maxHeightList } }, index.h("ez-list", { ref: (el) => this._ezList = el, id: "snkEntityList", listMode: "check", dataSource: this._ezListSource, hoverFeedback: true, itemSlotBuilder: this.rightListSlotBuilder, onEzCheckChange: evt => this.ezListChangeListener(evt) }))));
104
+ }
105
+ static get watchers() { return {
106
+ "config": ["observeConfig"]
107
+ }; }
108
+ };
109
+ SnkEntityList.style = snkEntityListCss;
110
+
111
+ exports.snk_entity_list = SnkEntityList;
@@ -5,13 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-21bd01e1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
8
- const ConfigStorage = require('./ConfigStorage-91adf3fe.js');
8
+ const ConfigStorage = require('./ConfigStorage-f68c3607.js');
9
9
  const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
10
10
  const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
11
11
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
12
- require('./form-config-fetcher-fa19680a.js');
12
+ require('./form-config-fetcher-92bc8fe7.js');
13
13
  require('./DataFetcher-a9d0228f.js');
14
14
  require('./_commonjsHelpers-537d719a.js');
15
+ require('./resource-fetcher-2979b54b.js');
16
+ require('./filter-bar-config-fetcher-a14536bf.js');
15
17
 
16
18
  const buildFilter = (item) => {
17
19
  switch (item.type) {
@@ -6,6 +6,10 @@ const index = require('./index-21bd01e1.js');
6
6
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
7
7
  const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
8
8
  const core = require('@sankhyalabs/core');
9
+ const filterBarConfigFetcher = require('./filter-bar-config-fetcher-a14536bf.js');
10
+ require('./resource-fetcher-2979b54b.js');
11
+ require('./DataFetcher-a9d0228f.js');
12
+ require('./_commonjsHelpers-537d719a.js');
9
13
 
10
14
  const SnkFilterDetail = class {
11
15
  constructor(hostRef) {
@@ -19,10 +23,15 @@ const SnkFilterDetail = class {
19
23
  */
20
24
  async show() {
21
25
  var _a, _b;
22
- (_b = (_a = this._editor)["show"]) === null || _b === void 0 ? void 0 : _b.call(_a);
26
+ (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["show"]) === null || _b === void 0 ? void 0 : _b.call(_a);
27
+ }
28
+ observeConfig() {
29
+ var _a, _b;
30
+ (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["reloadList"]) === null || _b === void 0 ? void 0 : _b.call(_a);
23
31
  }
24
32
  componentDidLoad() {
25
33
  if (this._element) {
34
+ this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
26
35
  core.ElementIDUtils.addIDInfo(this._element);
27
36
  const dataElementIdDoFilterItem = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
28
37
  this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
@@ -45,6 +54,8 @@ const SnkFilterDetail = class {
45
54
  return "snk-filter-number";
46
55
  case filterItemType_enum.FilterItemType.PERSONALIZED:
47
56
  return "snk-filter-personalized";
57
+ case filterItemType_enum.FilterItemType.MULTI_LIST:
58
+ return "snk-entity-list";
48
59
  }
49
60
  return "snk-filter-text";
50
61
  }
@@ -115,18 +126,48 @@ const SnkFilterDetail = class {
115
126
  }
116
127
  /* WARNING: Temporário.*/
117
128
  clear() {
118
- this.changeConfig(Object.assign(Object.assign({}, this.config), { value: undefined }));
129
+ var _a, _b;
130
+ if (filterItemType_enum.FilterItemType.MULTI_LIST === this.config.type) {
131
+ (_a = this.config.value) === null || _a === void 0 ? void 0 : _a.forEach(value => {
132
+ if (!!value)
133
+ value.check = false;
134
+ });
135
+ (_b = this._editor) === null || _b === void 0 ? void 0 : _b['reloadList']();
136
+ }
137
+ else {
138
+ this.changeConfig(Object.assign(Object.assign({}, this.config), { value: undefined }));
139
+ }
119
140
  }
120
141
  onKeyDonwListener(event) {
121
142
  if (event.key === "Enter") {
122
143
  this._applyButton.setFocus().then(() => this.apply());
123
144
  }
124
145
  }
146
+ buildRightSlot(item) {
147
+ return index.h("ez-icon", { iconName: "delete", onClick: () => this.removeValueFromConfig(item) });
148
+ }
149
+ removeValueFromConfig(item) {
150
+ var _a, _b, _c, _d, _e, _f;
151
+ const index = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.findIndex(i => (i === null || i === void 0 ? void 0 : i.id) === item.id);
152
+ (_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.splice(index, 1);
153
+ (_f = (_e = this._editor) === null || _e === void 0 ? void 0 : _e["reloadList"]) === null || _f === void 0 ? void 0 : _f.call(_e);
154
+ }
155
+ saveConfig(newConfig) {
156
+ var _a;
157
+ (_a = this._application) === null || _a === void 0 ? void 0 : _a.getResourceID().then(resourceId => {
158
+ const fetcher = new filterBarConfigFetcher.FilterBarConfigFetcher();
159
+ fetcher.saveEntityListConfig(newConfig, resourceId, this._application.configName);
160
+ this.config = newConfig;
161
+ });
162
+ }
125
163
  render() {
126
164
  const ContentEditor = this.getContentEditor();
127
- return (index.h(index.Host, null, index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), index.h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor, getMessage: this.getMessage }), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), index.h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, index.h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), index.h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
165
+ return (index.h(index.Host, null, index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), index.h(ContentEditor, { maxHeightList: '240px', ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor, getMessage: this.getMessage, onSaveConfig: evt => this.saveConfig(evt.detail), rightListSlotBuilder: item => this.buildRightSlot(item) }), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), index.h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, index.h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), index.h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
128
166
  }
129
167
  get _element() { return index.getElement(this); }
168
+ static get watchers() { return {
169
+ "config": ["observeConfig"]
170
+ }; }
130
171
  };
131
172
 
132
173
  exports.snk_filter_detail = SnkFilterDetail;
@@ -119,6 +119,7 @@ const SnkFilterItem = class {
119
119
  }
120
120
  }
121
121
  getLabel(isTooltipLabel = false) {
122
+ var _a;
122
123
  const { type, value, label, props } = this.config;
123
124
  if (value) {
124
125
  if (type === filterItemType_enum.FilterItemType.BINARY_SELECT) {
@@ -175,16 +176,19 @@ const SnkFilterItem = class {
175
176
  return label;
176
177
  }
177
178
  if (type === filterItemType_enum.FilterItemType.MULTI_LIST) {
178
- const selectedOptions = value.filter(item => item.check);
179
+ const selectedOptions = ((_a = value.elements) !== null && _a !== void 0 ? _a : value).filter(item => item === null || item === void 0 ? void 0 : item.check);
179
180
  const checkedAmount = selectedOptions.length;
181
+ if (checkedAmount === 0) {
182
+ return `${label}`;
183
+ }
180
184
  if (checkedAmount > 1) {
181
185
  if (isTooltipLabel) {
182
- const selectedOptionsDescrptions = selectedOptions.map(item => item.description);
186
+ const selectedOptionsDescrptions = selectedOptions.map(item => item.label);
183
187
  return `${label}: ${selectedOptionsDescrptions.join(',')}`;
184
188
  }
185
189
  return `${label}: ${checkedAmount} ${this.getMessage('snkFilterBar.multiListToltip')}`;
186
190
  }
187
- return `${label}: ${value.description}`;
191
+ return `${label}: ${selectedOptions[0].label}`;
188
192
  }
189
193
  return `${label}: ${value}`;
190
194
  }
@@ -234,8 +238,9 @@ const SnkFilterItem = class {
234
238
  return undefined;
235
239
  }
236
240
  render() {
241
+ var _a, _b, _c, _d;
237
242
  const leftIcon = this.getLeftIconName();
238
- return (index.h(index.Host, Object.assign({}, this.applyTooltip()), index.h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
243
+ return (index.h(index.Host, Object.assign({}, this.applyTooltip()), index.h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: (filterItemType_enum.FilterItemType.MULTI_LIST != this.config.type && this.config.value != undefined) || (((_d = (_c = ((_b = (_a = this.config.value) === null || _a === void 0 ? void 0 : _a.elements) !== null && _b !== void 0 ? _b : this.config.value)) === null || _c === void 0 ? void 0 : _c.filter(value => value === null || value === void 0 ? void 0 : value.check)) === null || _d === void 0 ? void 0 : _d.length) > 0) }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
239
244
  }
240
245
  get _filterItemElement() { return index.getElement(this); }
241
246
  static get watchers() { return {
@@ -7,6 +7,10 @@ const core = require('@sankhyalabs/core');
7
7
  const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
8
8
  const filterType_enum = require('./filter-type.enum-b14ce507.js');
9
9
  const presentationMode = require('./presentationMode-52ec3bdd.js');
10
+ const filterBarConfigFetcher = require('./filter-bar-config-fetcher-a14536bf.js');
11
+ require('./resource-fetcher-2979b54b.js');
12
+ require('./DataFetcher-a9d0228f.js');
13
+ require('./_commonjsHelpers-537d719a.js');
10
14
 
11
15
  const snkFilterModalItemCss = ".grow{flex-grow:1}.gap{gap:4px}";
12
16
 
@@ -17,7 +21,10 @@ const SnkFilterModalItem = class {
17
21
  this.filterItem = undefined;
18
22
  }
19
23
  observeFilterItem(newValue) {
24
+ var _a, _b;
25
+ (_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
20
26
  this.filterChange.emit(newValue);
27
+ this.saveConfig();
21
28
  }
22
29
  getContentEditorConfig() {
23
30
  const variations = { presentationMode: presentationMode.EPresentationMode.MODAL };
@@ -35,13 +42,16 @@ const SnkFilterModalItem = class {
35
42
  case filterItemType_enum.FilterItemType.PERSONALIZED:
36
43
  return { tag: "snk-filter-personalized" };
37
44
  case filterItemType_enum.FilterItemType.MULTI_LIST:
38
- return { tag: "snk-entity-list" };
45
+ return { tag: "snk-entity-list", variations: { maxHeightList: "640px", rightListSlotBuilder: item => this.buildRightSlot(item) } };
39
46
  }
40
47
  return { tag: "snk-filter-text" };
41
48
  }
42
49
  updateFilterValue(newValue) {
43
50
  const isVisble = !this.filterItem.visible ? newValue !== undefined : true;
44
51
  this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: newValue, visible: isVisble });
52
+ if (filterItemType_enum.FilterItemType.MULTI_LIST === this.filterItem.type) {
53
+ this.saveConfig();
54
+ }
45
55
  }
46
56
  canShowDetailModal() {
47
57
  return this.filterItem.filterType !== filterType_enum.FilterType.OTHER_FILTERS && this.filterItem.type !== filterItemType_enum.FilterItemType.BINARY_SELECT;
@@ -51,11 +61,29 @@ const SnkFilterModalItem = class {
51
61
  core.ElementIDUtils.addIDInfo(this._element);
52
62
  const dataElementIdDoFilterItem = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
53
63
  this._idContentEditor = `${dataElementIdDoFilterItem}_${this.filterItem.id}`;
64
+ this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
54
65
  }
55
66
  }
67
+ buildRightSlot(item) {
68
+ return index.h("ez-icon", { iconName: "delete", onClick: () => this.removeValueFromConfig(item) });
69
+ }
70
+ removeValueFromConfig(item) {
71
+ var _a, _b, _c, _d, _e, _f;
72
+ const index = (_b = (_a = this.filterItem) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.findIndex(i => (i === null || i === void 0 ? void 0 : i.id) === item.id);
73
+ (_d = (_c = this.filterItem) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.splice(index, 1);
74
+ (_f = (_e = this._editor) === null || _e === void 0 ? void 0 : _e["reloadList"]) === null || _f === void 0 ? void 0 : _f.call(_e);
75
+ this.saveConfig();
76
+ }
77
+ saveConfig() {
78
+ var _a;
79
+ (_a = this._application) === null || _a === void 0 ? void 0 : _a.getResourceID().then(resourceId => {
80
+ const fetcher = new filterBarConfigFetcher.FilterBarConfigFetcher();
81
+ fetcher.saveEntityListConfig(this.filterItem, resourceId, this._application.configName);
82
+ });
83
+ }
56
84
  render() {
57
85
  const { tag: ContentEditor, variations } = this.getContentEditorConfig();
58
- return (index.h(index.Host, null, index.h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), index.h(ContentEditor, Object.assign({ config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor }, variations)))));
86
+ return (index.h(index.Host, null, index.h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), index.h(ContentEditor, Object.assign({ ref: ref => this._editor = ref, config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor }, variations)))));
59
87
  }
60
88
  get _element() { return index.getElement(this); }
61
89
  static get watchers() { return {
@@ -42,7 +42,15 @@ const SnkFilterModal = class {
42
42
  this.filters = this.filters.map(filter => filter.id === filterConfig.id ? filterConfig : filter);
43
43
  }
44
44
  handleClearFilters(filterList) {
45
- this.filters = this.filters.map(filter => filterList.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: undefined })) : filter);
45
+ this.filters = this.filters.map(filter => filterList.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: filterItemType_enum.FilterItemType.MULTI_LIST === filter.type ? this.uncheckFilterValues(filter.value) : undefined })) : filter);
46
+ }
47
+ uncheckFilterValues(valueList) {
48
+ valueList.forEach(value => {
49
+ if (!!value) {
50
+ value.check = false;
51
+ }
52
+ });
53
+ return valueList;
46
54
  }
47
55
  renderFilterItem(filterItem, fullRow) {
48
56
  return (index.h("snk-filter-modal-item", { class: fullRow ? 'ez-col ez-col--sd-12' : 'ez-col ez-col--sd-6 ez-padding--small', filterItem: filterItem, onFilterChange: (event) => this.handleFilterChange(event.detail) }));
@@ -75,12 +83,27 @@ const SnkFilterModal = class {
75
83
  const fullLine = filters.length === 1;
76
84
  return (index.h("div", { class: "ez-row" }, filters.map((filter) => this.renderFilterItem(filter, fullLine))));
77
85
  }
86
+ getIformedFiltersCount(listItems) {
87
+ let countInformedItens = 0;
88
+ listItems.forEach(item => {
89
+ var _a, _b, _c, _d, _e;
90
+ if (filterItemType_enum.FilterItemType.MULTI_LIST === item.type) {
91
+ countInformedItens += (_e = (_d = (_c = ((_b = (_a = item.value) === null || _a === void 0 ? void 0 : _a.elements) !== null && _b !== void 0 ? _b : item.value)) === null || _c === void 0 ? void 0 : _c.filter(value => value === null || value === void 0 ? void 0 : value.check)) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
92
+ return;
93
+ }
94
+ if (!!item.value) {
95
+ countInformedItens++;
96
+ }
97
+ });
98
+ return countInformedItens;
99
+ }
78
100
  renderCollapsibleFilterBox(label, listItems) {
79
101
  if (!listItems.length)
80
102
  return null;
81
- const appliedFilters = listItems.filter(filterItem => !!filterItem.value).length;
103
+ const appliedFilters = this.getIformedFiltersCount(listItems);
82
104
  const lines = this.mountFiltersLines(listItems);
83
- return (index.h("ez-collapsible-box", { className: "snk-filter__modal-collapsible-box", headerSize: "medium", value: true, label: label }, !!appliedFilters && (index.h("ez-badge", { className: "ez-badge--primary-subtle", slot: "rightSlot", label: appliedFilters })), lines.map(this.renderFilterLine.bind(this)), index.h("div", { class: "ez-flex ez-flex--justify-end grow" }, index.h("ez-button", { className: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => this.handleClearFilters(listItems) }))));
105
+ return (index.h("ez-collapsible-box", { className: "snk-filter__modal-collapsible-box", headerSize: "medium", value: true, label: label }, !!appliedFilters &&
106
+ index.h("ez-badge", { className: "ez-badge--primary-subtle", slot: "rightSlot", label: appliedFilters }), lines.map(this.renderFilterLine.bind(this)), index.h("div", { class: "ez-flex ez-flex--justify-end grow" }, index.h("ez-button", { className: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => this.handleClearFilters(listItems) }))));
84
107
  }
85
108
  componentWillRender() {
86
109
  this._modalTitle = this.getCustomMessage('title');
@@ -7,10 +7,11 @@ const draggable_bundle = require('./draggable.bundle-82a25c06.js');
7
7
  const core = require('@sankhyalabs/core');
8
8
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
9
9
  const constants = require('./constants-3787fa32.js');
10
- const formConfigFetcher = require('./form-config-fetcher-fa19680a.js');
10
+ const formConfigFetcher = require('./form-config-fetcher-92bc8fe7.js');
11
11
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
12
12
  require('./_commonjsHelpers-537d719a.js');
13
13
  require('./DataFetcher-a9d0228f.js');
14
+ require('./resource-fetcher-2979b54b.js');
14
15
 
15
16
  const snkFormConfigCss = ".sc-snk-form-config-h{--snk-form-config--z-index:var(--more-visible, 2);--snk-form-config--background-color:var(--background--xlight, #fff);--snk-form-config__icon--color:var(--text--disable, #AFB6C0);--snk-form-config__label-counter--font-weight:var(--text-weight--extra-small, 200);--snk-form-config__add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__add-group-container--background-color:var(--background--medium, #d2dce9);--snk-form-config__add-group-container--padding:var(--space--small, 6px);--snk-form-config__add-group-content--border:2px dashed var(--color-strokes, #DCE0E8);--snk-form-config__add-group-content--border-radius:var(--border--radius-small, 6px);--snk-form-config__add-group-label--padding:var(--space--large, 24px);--snk-form-config__btn-add-group--padding:var(--space--large, 24px) var(--space--medium, 12px) 0;--snk-form-config__btn-add-group-container--padding:var(--space--medium, 12px);--snk-form-config__btn-add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__btn-add-group-container--border:2px solid var(--color-strokes, #DCE0E8);--snk-form-config__btn-add-group-container--background-color:var(--background--body, #fafcff);display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--snk-form-config--z-index);background-color:var(--snk-form-config--background-color)}.form-config__header-container.sc-snk-form-config{display:flex}.form-config__field-container.sc-snk-form-config{width:32%;padding:6px}.form-config__hide-content.sc-snk-form-config{display:none}ez-icon.sc-snk-form-config .left-icon.sc-snk-form-config{--ez-icon--color:var(--snk-form-config__icon--color)}.ez-box__label-counter.sc-snk-form-config{margin-top:-7px;font-weight:var(--snk-form-config__label-counter--font-weight)}.form-config__btn-options.sc-snk-form-config{--ez-button--min-width:300px;--ez-button--background-color:var(--snk-form-config--background-color)}[data-draggable-parent].sc-snk-form-config{position:relative}.form-config__field-config--selected.sc-snk-form-config{position:static}.form-config__field-config--dragged.sc-snk-form-config .draggable-mirror.sc-snk-form-config{z-index:var(--snk-form-config--z-index)}.form-config__config-options.sc-snk-form-config{position:relative;margin-top:-3px;min-width:100%;z-index:1}.form-config__tab-container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config{position:relative;height:100%;max-height:calc(100vh - 92px)}.form-config__tab-container.sc-snk-form-config .ez-box__container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config .ez-box__container.sc-snk-form-config{align-content:flex-start;height:100%}.form-config__fields-available.sc-snk-form-config [data-draggable-parent].sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:100%;max-height:calc(100% - 122px)}.form-config__tab-content.sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:auto;max-height:calc(100% - 128px)}[data-draggable-element].sc-snk-form-config{cursor:grab}.form-config__actions-button.sc-snk-form-config{--ez-actions-button__btn-action--min-width:235px}.form-config__add-group.sc-snk-form-config{position:relative;min-height:120px;margin-bottom:10px}.form-config__add-group-container.sc-snk-form-config{position:absolute;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box;border-radius:var(--snk-form-config__add-group-container--border-radius);background-color:var(--snk-form-config__add-group-container--background-color);padding:var(--snk-form-config__add-group-container--padding)}.form-config__add-group-content.sc-snk-form-config{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;box-sizing:border-box;border:var(--snk-form-config__add-group-content--border);border-radius:var(--snk-form-config__add-group-content--border-radius)}.form-config__add-group-label.sc-snk-form-config{display:flex;justify-content:center;box-sizing:border-box;padding:var(--snk-form-config__add-group-label--padding)}.form-config__btn-add-group.sc-snk-form-config{position:relative;padding:var(--snk-form-config__btn-add-group--padding)}.form-config__btn-add-group-container.sc-snk-form-config{padding:var(--snk-form-config__btn-add-group-container--padding);border-radius:var(--snk-form-config__btn-add-group-container--border-radius);border:var(--snk-form-config__btn-add-group-container--border);background-color:var(--snk-form-config__btn-add-group-container--background-color)}ez-collapsible-box.draggable-mirror.sc-snk-form-config{display:table;background-color:var(--snk-form-config--background-color)}ez-collapsible-box.sc-snk-form-config{margin-bottom:10px}@media screen and (min-width: 480px){.form-config__field-config--selected.sc-snk-form-config .ez-flex.form-config__config-options.sc-snk-form-config{min-width:calc(300% + 12px)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+2) .ez-flex.form-config__config-options.sc-snk-form-config{transform:translate(calc(100% / 3 * -1))}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+3) .ez-flex.form-config__config-options.sc-snk-form-config{transform:translate(calc(100% / 3 * -2))}}";
16
17
 
@@ -4,11 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-21bd01e1.js');
6
6
  const core = require('@sankhyalabs/core');
7
- const SnkFormConfigManager = require('./SnkFormConfigManager-e1a10283.js');
8
- require('./ConfigStorage-91adf3fe.js');
9
- require('./form-config-fetcher-fa19680a.js');
7
+ const SnkFormConfigManager = require('./SnkFormConfigManager-69df3f74.js');
8
+ require('./ConfigStorage-f68c3607.js');
9
+ require('./form-config-fetcher-92bc8fe7.js');
10
10
  require('./DataFetcher-a9d0228f.js');
11
11
  require('./_commonjsHelpers-537d719a.js');
12
+ require('./resource-fetcher-2979b54b.js');
13
+ require('./filter-bar-config-fetcher-a14536bf.js');
14
+ require('./filter-item-type.enum-aa823a00.js');
12
15
 
13
16
  const snkFormCss = ".sc-snk-form-h{--snk-form__header--min-height:94px;display:block}.snk-form__form--hidden.sc-snk-form{display:none}";
14
17
 
@@ -6,11 +6,14 @@ const index = require('./index-21bd01e1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const CheckMode = require('@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode');
9
- const ConfigStorage = require('./ConfigStorage-91adf3fe.js');
9
+ const ConfigStorage = require('./ConfigStorage-f68c3607.js');
10
10
  const constants = require('./constants-3787fa32.js');
11
- require('./form-config-fetcher-fa19680a.js');
11
+ require('./form-config-fetcher-92bc8fe7.js');
12
12
  require('./DataFetcher-a9d0228f.js');
13
13
  require('./_commonjsHelpers-537d719a.js');
14
+ require('./resource-fetcher-2979b54b.js');
15
+ require('./filter-bar-config-fetcher-a14536bf.js');
16
+ require('./filter-item-type.enum-aa823a00.js');
14
17
 
15
18
  const snkGridConfigCss = ".sc-snk-grid-config-h{--snk-grid-config__footer--padding-top:var(--space--medium, 12px);--snk-grid-config__main--padding-right:var(--space--medium, 12px);--snk-grid-config__tabselector-container--padding:var(--space--medium, 12px);--snk-grid-config__button-close--padding-left:var(--space--medium, 12px);--snk-grid-config__title--color:var(--title--primary, #2B3A54);--snk-grid-config__title--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__title--font-size:var(--title--large, 20px);--snk-grid-config__title--font-weight:var(--text-weight--extra-large, 700);--snk-grid-config__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__subtitle--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-family:var(--font-pattern, \"Roboto\");--snk-grid-config__group--font-size:var(--text--medium, 14px);--snk-grid-config__group--font-weight:var(--text-weight--large, 600);--snk-grid-config__group--padding-bottom:var(--space-small, 6px);--snk-grid-config__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-grid-config__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-grid-config__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-grid-config__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-grid-config__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-grid-config__scrollbar--width:var(--space--medium, 12px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-snk-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-snk-grid-config{padding-right:var(--space--medium)}ez-list.sc-snk-grid-config{height:100%}.height-calc.sc-snk-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-snk-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--snk-grid-config__footer--padding-top)}.hidden.sc-snk-grid-config{display:none}.tabselector-container.sc-snk-grid-config{padding:var(--snk-grid-config__tabselector-container--padding) 0}.button-close.sc-snk-grid-config{padding-left:var(--snk-grid-config__button-close--padding-left)}.title-container.sc-snk-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.title.sc-snk-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-grid-config__title--color);font-size:var(--snk-grid-config__title--font-size);font-family:var(--snk-grid-config__title--font-family);font-weight:var(--snk-grid-config__title--font-weight)}.subtitle.sc-snk-grid-config{color:var(--text--primary);font-size:var(--snk-grid-config__subtitle--font-size);font-family:var(--snk-grid-config__subtitle--font-family)}.grid-config__main.sc-snk-grid-config{overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background);padding-right:var(--snk-grid-config__main--padding-right)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar{width:var(--snk-grid-config__scrollbar--width);max-width:var(--snk-grid-config__scrollbar--width);min-width:var(--snk-grid-config__scrollbar--width);background-color:var(--snk-grid-config__scrollbar--color-background)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-track{background-color:var(--snk-grid-config__scrollbar--color-background);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb{background-color:var(--snk-grid-config__scrollbar--color-default);border-radius:var(--snk-grid-config__scrollbar--border-radius)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:hover,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-grid-config__scrollbar--color-hover)}.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:vertical:active,.grid-config__main.sc-snk-grid-config::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-grid-config__scrollbar--color-clicked)}.group-name.sc-snk-grid-config{font-family:var(--snk-grid-config__group--font-family);font-size:var(--snk-grid-config__group--font-size);font-weight:var(--snk-grid-config__group--font-weight);padding-bottom:var(--snk-grid-config__group--padding-bottom)}";
16
19
 
@@ -6,13 +6,16 @@ const index = require('./index-21bd01e1.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
8
8
  const taskbarElements = require('./taskbar-elements-bc2598f9.js');
9
- const ConfigStorage = require('./ConfigStorage-91adf3fe.js');
9
+ const ConfigStorage = require('./ConfigStorage-f68c3607.js');
10
10
  const index$1 = require('./index-f400b1d6.js');
11
11
  const taskbarProcessor = require('./taskbar-processor-e1e3bbf7.js');
12
12
  const index$2 = require('./index-de79181a.js');
13
- require('./form-config-fetcher-fa19680a.js');
13
+ require('./form-config-fetcher-92bc8fe7.js');
14
14
  require('./DataFetcher-a9d0228f.js');
15
15
  require('./_commonjsHelpers-537d719a.js');
16
+ require('./resource-fetcher-2979b54b.js');
17
+ require('./filter-bar-config-fetcher-a14536bf.js');
18
+ require('./filter-item-type.enum-aa823a00.js');
16
19
 
17
20
  const snkGridCss = ".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:300px}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
18
21
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  const index = require('./index-21bd01e1.js');
4
4
  const core = require('@sankhyalabs/core');
5
- const SnkFormConfigManager = require('./SnkFormConfigManager-e1a10283.js');
5
+ const SnkFormConfigManager = require('./SnkFormConfigManager-69df3f74.js');
6
6
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
7
7
  const taskbarProcessor = require('./taskbar-processor-e1e3bbf7.js');
8
8
  const taskbarElements = require('./taskbar-elements-bc2598f9.js');
@@ -2,14 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-5f2eb52b.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-b2d40bc4.js');
6
6
  require('./index-21bd01e1.js');
7
7
  require('@sankhyalabs/core');
8
- require('./SnkFormConfigManager-e1a10283.js');
9
- require('./ConfigStorage-91adf3fe.js');
10
- require('./form-config-fetcher-fa19680a.js');
8
+ require('./SnkFormConfigManager-69df3f74.js');
9
+ require('./ConfigStorage-f68c3607.js');
10
+ require('./form-config-fetcher-92bc8fe7.js');
11
11
  require('./DataFetcher-a9d0228f.js');
12
12
  require('./_commonjsHelpers-537d719a.js');
13
+ require('./resource-fetcher-2979b54b.js');
14
+ require('./filter-bar-config-fetcher-a14536bf.js');
15
+ require('./filter-item-type.enum-aa823a00.js');
13
16
  require('@sankhyalabs/ezui/dist/collection/utils/form');
14
17
  require('./taskbar-processor-e1e3bbf7.js');
15
18
  require('./taskbar-elements-bc2598f9.js');
@@ -17,6 +17,7 @@
17
17
  "./components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js",
18
18
  "./components/snk-data-exporter/snk-data-exporter.js",
19
19
  "./components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js",
20
+ "./components/snk-entity-list/snk-entity-list.js",
20
21
  "./components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js",
21
22
  "./components/snk-filter-bar/snk-filter-bar.js",
22
23
  "./components/snk-filter-bar/filter-item/snk-filter-detail.js",
@@ -223,12 +223,16 @@ export class SnkCrud {
223
223
  "type": "unknown",
224
224
  "mutable": false,
225
225
  "complexType": {
226
- "original": "IStatusResolver",
227
- "resolved": "IStatusResolver",
226
+ "original": "IStatusResolver | StatusResolverFunction",
227
+ "resolved": "((data: object) => string) | IStatusResolver",
228
228
  "references": {
229
229
  "IStatusResolver": {
230
230
  "location": "import",
231
231
  "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
232
+ },
233
+ "StatusResolverFunction": {
234
+ "location": "import",
235
+ "path": "@sankhyalabs/ezui/dist/types/components/ez-grid/controller/EzGridController"
232
236
  }
233
237
  }
234
238
  },
@@ -0,0 +1,35 @@
1
+ :host {
2
+
3
+ /*@doc Define o tamanho da fonte do label.*/
4
+ --snk-entity-list--label--font-size: var(--text--medium, 14px);
5
+ /*@doc Define a família da fonte do label.*/
6
+ --snk-entity-list--label--font-family: var(--font-pattern, Arial);
7
+ /*@doc Define a cor da fonte do label.*/
8
+ --snk-entity-list--label--color: var(--title--primary, #000);
9
+ /*@doc Define a cor da fonte do label quando desabilitado.*/
10
+ --snk-entity-list--label--disabled--color: var(--text--disable, #AFB6C0);
11
+
12
+ }
13
+
14
+ .label {
15
+ flex-shrink: 1;
16
+ white-space: nowrap;
17
+ overflow: hidden;
18
+ text-overflow: ellipsis;
19
+ color: var(--snk-entity-list--label--color);
20
+ font-size: var(--snk-entity-list--label--font-size);
21
+ font-family: var(--snk-entity-list--label--font-family);
22
+ cursor: default;
23
+ padding-left: var(--space--small);
24
+ padding-bottom: var(--space--extra-small);
25
+ }
26
+
27
+ .snk-entity-list--overflow {
28
+ overflow: auto;
29
+ }
30
+
31
+ .snk-entity-list--overflow::-webkit-scrollbar {
32
+ width: var(--space--small);
33
+ min-width: var(--space--small);
34
+ max-width: var(--space--small);
35
+ }