@sankhyalabs/sankhyablocks 8.2.0-dev.5 → 8.2.0-dev.6

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 (73) hide show
  1. package/dist/cjs/index-f9e81701.js +4 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  4. package/dist/cjs/snk-attach.cjs.entry.js +1 -1
  5. package/dist/cjs/snk-crud.cjs.entry.js +3 -2
  6. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -3
  7. package/dist/cjs/snk-grid.cjs.entry.js +5 -2
  8. package/dist/cjs/{snk-guides-viewer-a7cd6fda.js → snk-guides-viewer-71a7be3a.js} +4 -3
  9. package/dist/cjs/snk-guides-viewer.cjs.entry.js +2 -2
  10. package/dist/cjs/snk-simple-crud.cjs.entry.js +2 -2
  11. package/dist/cjs/snk-taskbar-custom-elements.cjs.entry.js +20 -0
  12. package/dist/cjs/snk-taskbar.cjs.entry.js +69 -4
  13. package/dist/cjs/{taskbar-elements-b98dd6e9.js → taskbar-elements-39949c7a.js} +4 -4
  14. package/dist/collection/collection-manifest.json +1 -0
  15. package/dist/collection/components/snk-crud/snk-crud.js +6 -4
  16. package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +19 -1
  17. package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +20 -2
  18. package/dist/collection/components/snk-grid/snk-grid.js +57 -1
  19. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +1 -1
  20. package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +4 -4
  21. package/dist/collection/components/snk-taskbar/snk-taskbar-custom-elements.js +43 -0
  22. package/dist/collection/components/snk-taskbar/snk-taskbar.css +4 -0
  23. package/dist/collection/components/snk-taskbar/snk-taskbar.js +107 -4
  24. package/dist/components/index.d.ts +1 -0
  25. package/dist/components/index.js +1 -0
  26. package/dist/components/snk-crud.js +5 -3
  27. package/dist/components/snk-detail-view2.js +9 -5
  28. package/dist/components/snk-grid2.js +7 -1
  29. package/dist/components/snk-simple-crud2.js +1 -1
  30. package/dist/components/snk-taskbar-custom-elements.d.ts +11 -0
  31. package/dist/components/snk-taskbar-custom-elements.js +35 -0
  32. package/dist/components/snk-taskbar2.js +78 -8
  33. package/dist/esm/index-a7d3d3f1.js +4 -0
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/sankhyablocks.js +1 -1
  36. package/dist/esm/snk-attach.entry.js +1 -1
  37. package/dist/esm/snk-crud.entry.js +5 -4
  38. package/dist/esm/snk-detail-view.entry.js +4 -3
  39. package/dist/esm/snk-grid.entry.js +5 -2
  40. package/dist/esm/{snk-guides-viewer-cc709b5f.js → snk-guides-viewer-d80999ea.js} +4 -3
  41. package/dist/esm/snk-guides-viewer.entry.js +2 -2
  42. package/dist/esm/snk-simple-crud.entry.js +2 -2
  43. package/dist/esm/snk-taskbar-custom-elements.entry.js +16 -0
  44. package/dist/esm/snk-taskbar.entry.js +69 -4
  45. package/dist/esm/{taskbar-elements-2c761819.js → taskbar-elements-0a6b8b95.js} +4 -4
  46. package/dist/sankhyablocks/p-34604220.entry.js +1 -0
  47. package/dist/sankhyablocks/p-648a7c72.entry.js +1 -0
  48. package/dist/sankhyablocks/p-74559a50.js +1 -0
  49. package/dist/sankhyablocks/p-7b3b7664.entry.js +1 -0
  50. package/dist/sankhyablocks/{p-611aa624.entry.js → p-9d6a8921.entry.js} +1 -1
  51. package/dist/sankhyablocks/p-a5476e72.entry.js +1 -0
  52. package/dist/sankhyablocks/{p-66bb8c20.entry.js → p-af3b56a5.entry.js} +1 -1
  53. package/dist/sankhyablocks/p-b459f27b.entry.js +1 -0
  54. package/dist/sankhyablocks/{p-cfb33a4a.entry.js → p-c74c6b25.entry.js} +1 -1
  55. package/dist/sankhyablocks/{p-a2493d11.js → p-c9841939.js} +1 -1
  56. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  57. package/dist/types/components/snk-crud/snk-crud.d.ts +1 -0
  58. package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +4 -0
  59. package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +4 -0
  60. package/dist/types/components/snk-grid/snk-grid.d.ts +12 -0
  61. package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +2 -2
  62. package/dist/types/components/snk-taskbar/snk-taskbar-custom-elements.d.ts +7 -0
  63. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +23 -0
  64. package/dist/types/components.d.ts +77 -0
  65. package/package.json +1 -1
  66. package/react/components.d.ts +1 -0
  67. package/react/components.js +1 -0
  68. package/react/components.js.map +1 -1
  69. package/dist/sankhyablocks/p-02b89228.entry.js +0 -1
  70. package/dist/sankhyablocks/p-05dbc70e.entry.js +0 -1
  71. package/dist/sankhyablocks/p-787071a8.js +0 -1
  72. package/dist/sankhyablocks/p-d53a9169.entry.js +0 -1
  73. package/dist/sankhyablocks/p-fa523d6b.entry.js +0 -1
@@ -1,5 +1,5 @@
1
- import { h } from '@stencil/core';
2
- import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
1
+ import { h, Host } from '@stencil/core';
2
+ import { ApplicationContext, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
3
3
  import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
4
4
  import { PresentationMode } from '../../lib';
5
5
  import { VIEW_MODE } from '../../lib/utils/constants';
@@ -29,6 +29,7 @@ export class SnkCrud {
29
29
  this.presentationMode = PresentationMode.PRIMARY;
30
30
  this.messagesBuilder = undefined;
31
31
  this.useEnterLikeTab = false;
32
+ this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
32
33
  }
33
34
  /**
34
35
  * Usado para alternar a visão entre GRID e FORM externamente.
@@ -170,7 +171,7 @@ export class SnkCrud {
170
171
  return;
171
172
  }
172
173
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
173
- return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))));
174
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
174
175
  }
175
176
  static get is() { return "snk-crud"; }
176
177
  static get encapsulation() { return "scoped"; }
@@ -416,7 +417,8 @@ export class SnkCrud {
416
417
  "attachmentRegisterKey": {},
417
418
  "_currentViewMode": {},
418
419
  "_canEdit": {},
419
- "_resourceID": {}
420
+ "_resourceID": {},
421
+ "customContainerId": {}
420
422
  };
421
423
  }
422
424
  static get events() {
@@ -24,6 +24,7 @@ export class SnkDetailView {
24
24
  this.messagesBuilder = undefined;
25
25
  this.branchGuide = undefined;
26
26
  this.canEdit = true;
27
+ this.taskbarCustomContainerId = undefined;
27
28
  }
28
29
  observerDataState(newValue, oldValue) {
29
30
  const openInsertion = !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
@@ -193,7 +194,7 @@ export class SnkDetailView {
193
194
  render() {
194
195
  this.updateLabel();
195
196
  //const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
196
- return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
197
+ return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
197
198
  }
198
199
  static get is() { return "snk-detail-view"; }
199
200
  static get encapsulation() { return "scoped"; }
@@ -434,6 +435,23 @@ export class SnkDetailView {
434
435
  "attribute": "can-edit",
435
436
  "reflect": false,
436
437
  "defaultValue": "true"
438
+ },
439
+ "taskbarCustomContainerId": {
440
+ "type": "string",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "string",
444
+ "resolved": "string",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": "Define o identificador do container de elementos customizados da Taskbar."
452
+ },
453
+ "attribute": "taskbar-custom-container-id",
454
+ "reflect": false
437
455
  }
438
456
  };
439
457
  }
@@ -24,6 +24,7 @@ export class SnkGuidesViewer {
24
24
  this.canEdit = true;
25
25
  this.presentationMode = undefined;
26
26
  this.resourceID = undefined;
27
+ this.detailTaskbarCustomContainerId = undefined;
27
28
  this._breadcrumbItems = [];
28
29
  this._guides = undefined;
29
30
  this._formEditorConfigManager = undefined;
@@ -225,7 +226,7 @@ export class SnkGuidesViewer {
225
226
  else {
226
227
  detailBranch = this.selectedGuide;
227
228
  }
228
- content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID }));
229
+ content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId }));
229
230
  }
230
231
  else {
231
232
  const cardId = this.selectedGuide.id;
@@ -296,7 +297,7 @@ export class SnkGuidesViewer {
296
297
  }
297
298
  buildTaskBar() {
298
299
  var _a;
299
- return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID }));
300
+ return h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
300
301
  }
301
302
  render() {
302
303
  var _a, _b;
@@ -584,6 +585,23 @@ export class SnkGuidesViewer {
584
585
  },
585
586
  "attribute": "resource-i-d",
586
587
  "reflect": false
588
+ },
589
+ "detailTaskbarCustomContainerId": {
590
+ "type": "string",
591
+ "mutable": false,
592
+ "complexType": {
593
+ "original": "string",
594
+ "resolved": "string",
595
+ "references": {}
596
+ },
597
+ "required": false,
598
+ "optional": false,
599
+ "docs": {
600
+ "tags": [],
601
+ "text": "Define o identificador do container de elementos customizados da Taskbar da aba de detalhes."
602
+ },
603
+ "attribute": "detail-taskbar-custom-container-id",
604
+ "reflect": false
587
605
  }
588
606
  };
589
607
  }
@@ -40,6 +40,9 @@ export class SnkGrid {
40
40
  this.useEnterLikeTab = false;
41
41
  this.recordsValidator = undefined;
42
42
  this.canEdit = true;
43
+ this.taskbarCustomContainerId = undefined;
44
+ this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
45
+ this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
43
46
  }
44
47
  /**
45
48
  * Exibe a janela de configurações da grade.
@@ -306,7 +309,7 @@ export class SnkGrid {
306
309
  return undefined;
307
310
  }
308
311
  return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
309
- h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID })), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList, resourceID: this.resourceID })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
312
+ h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
310
313
  }
311
314
  static get is() { return "snk-grid"; }
312
315
  static get encapsulation() { return "scoped"; }
@@ -595,6 +598,59 @@ export class SnkGrid {
595
598
  "attribute": "can-edit",
596
599
  "reflect": false,
597
600
  "defaultValue": "true"
601
+ },
602
+ "taskbarCustomContainerId": {
603
+ "type": "string",
604
+ "mutable": false,
605
+ "complexType": {
606
+ "original": "string",
607
+ "resolved": "string",
608
+ "references": {}
609
+ },
610
+ "required": false,
611
+ "optional": false,
612
+ "docs": {
613
+ "tags": [],
614
+ "text": "Define o identificador do container de elementos customizados da Taskbar."
615
+ },
616
+ "attribute": "taskbar-custom-container-id",
617
+ "reflect": false
618
+ },
619
+ "gridHeaderCustomSlotId": {
620
+ "type": "string",
621
+ "mutable": false,
622
+ "complexType": {
623
+ "original": "string",
624
+ "resolved": "string",
625
+ "references": {}
626
+ },
627
+ "required": false,
628
+ "optional": false,
629
+ "docs": {
630
+ "tags": [],
631
+ "text": "Nome do slot de elementos customizados da Taskbar do cabe\u00E7alho da grade."
632
+ },
633
+ "attribute": "grid-header-custom-slot-id",
634
+ "reflect": false,
635
+ "defaultValue": "'GRID_HEADER_CUSTOM_ELEMENTS'"
636
+ },
637
+ "topTaskbarCustomSlotId": {
638
+ "type": "string",
639
+ "mutable": false,
640
+ "complexType": {
641
+ "original": "string",
642
+ "resolved": "string",
643
+ "references": {}
644
+ },
645
+ "required": false,
646
+ "optional": false,
647
+ "docs": {
648
+ "tags": [],
649
+ "text": "Nome do slot de elementos customizados da Taskbar principal do componente."
650
+ },
651
+ "attribute": "top-taskbar-custom-slot-id",
652
+ "reflect": false,
653
+ "defaultValue": "'GRID_TASKBAR_CUSTOM_ELEMENTS'"
598
654
  }
599
655
  };
600
656
  }
@@ -174,7 +174,7 @@ export class SnkSimpleCrud {
174
174
  }
175
175
  render() {
176
176
  var _a;
177
- return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium ez-margin-bottom--large", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), columnfilterDataSource: this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
177
+ return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium ez-margin-bottom--large", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), columnfilterDataSource: this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
178
178
  ? undefined
179
179
  : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig }))))));
180
180
  }
@@ -99,16 +99,16 @@ export const buildElem = (element, className, dataElementId, getTitle, action, i
99
99
  }
100
100
  };
101
101
  function textButton(name, className, dataElementId, text, title, action, isEnabled) {
102
- return h("ez-button", { title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
102
+ return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
103
103
  }
104
104
  function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
105
- return h("ez-button", { title: title, mode: "icon", size: "small", class: className, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
105
+ return h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
106
106
  }
107
107
  function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
108
- return h("ez-button", { title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
108
+ return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
109
109
  }
110
110
  function actionButton(element, className, dataElementId, title, action, isEnabled, actions) {
111
111
  return actions && actions.length > 0
112
- ? h("ez-actions-button", { title: title, size: "small", "data-element-id": dataElementId, arrowActive: true, class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions })
112
+ ? h("ez-actions-button", { key: dataElementId, title: title, size: "small", "data-element-id": dataElementId, arrowActive: true, class: className, enabled: isEnabled(element), onEzAction: (evt) => action(evt.detail.value), actions: actions })
113
113
  : undefined;
114
114
  }
@@ -0,0 +1,43 @@
1
+ import { h, Host } from '@stencil/core';
2
+ export class SnkTaskbarCustomElements {
3
+ constructor() {
4
+ this.slot = 'TASKBAR_CUSTOM_ELEMENTS';
5
+ }
6
+ render() {
7
+ return (h(Host, { slot: this.slot }, h("div", { id: this.slot, class: "taskbar-custom-elements-container" }, h("slot", null))));
8
+ }
9
+ static get is() { return "snk-taskbar-custom-elements"; }
10
+ static get encapsulation() { return "scoped"; }
11
+ static get originalStyleUrls() {
12
+ return {
13
+ "$": ["snk-taskbar.css"]
14
+ };
15
+ }
16
+ static get styleUrls() {
17
+ return {
18
+ "$": ["snk-taskbar.css"]
19
+ };
20
+ }
21
+ static get properties() {
22
+ return {
23
+ "slot": {
24
+ "type": "string",
25
+ "mutable": false,
26
+ "complexType": {
27
+ "original": "string",
28
+ "resolved": "string",
29
+ "references": {}
30
+ },
31
+ "required": false,
32
+ "optional": false,
33
+ "docs": {
34
+ "tags": [],
35
+ "text": "Nome do slot da Taskbar onde os elementos customizados dever\u00E3o aparecer."
36
+ },
37
+ "attribute": "slot",
38
+ "reflect": false,
39
+ "defaultValue": "'TASKBAR_CUSTOM_ELEMENTS'"
40
+ }
41
+ };
42
+ }
43
+ }
@@ -1,3 +1,7 @@
1
1
  :host {
2
2
  display: flex;
3
3
  }
4
+
5
+ .taskbar-custom-elements-container{
6
+ display: none;
7
+ }
@@ -1,10 +1,11 @@
1
1
  import { ApplicationContext, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
2
2
  import { h, Host } from '@stencil/core';
3
3
  import { AuthorizationConfig } from '../snk-configurator/AuthorizationConfig';
4
- import { TaskbarElement, buildElem, AuthorizationElements, buildCustomButton, VisibleWhenForbidden } from './elements/taskbar-elements';
4
+ import { AuthorizationElements, buildCustomButton, buildElem, TaskbarElement, VisibleWhenForbidden, } from './elements/taskbar-elements';
5
5
  import { PresentationMode } from '../../lib/@types';
6
6
  export class SnkTaskbar {
7
7
  constructor() {
8
+ this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
8
9
  this._titleKeyByElement = {
9
10
  [TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
10
11
  [TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
@@ -22,6 +23,11 @@ export class SnkTaskbar {
22
23
  [TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
23
24
  };
24
25
  this._permissions = undefined;
26
+ this._customElements = undefined;
27
+ this._customElementsId = undefined;
28
+ this._slotContainer = undefined;
29
+ this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
30
+ this.customContainerId = undefined;
25
31
  this.configName = undefined;
26
32
  this.resourceID = undefined;
27
33
  this.buttons = undefined;
@@ -162,6 +168,43 @@ export class SnkTaskbar {
162
168
  return true;
163
169
  });
164
170
  }
171
+ appendCustomElementsInTaskbar() {
172
+ this._customElementsId.forEach(id => {
173
+ const elementId = id.replace(this.TASKBAR_ITEM_ID_PREFIX, '');
174
+ const customElement = this._customElements.get(elementId);
175
+ const container = this._element.querySelector(`#${id}`);
176
+ if (container) {
177
+ container === null || container === void 0 ? void 0 : container.appendChild(customElement);
178
+ }
179
+ else {
180
+ this.unlinkCustomElementFromTaskbar(customElement);
181
+ }
182
+ });
183
+ }
184
+ addCustomElementContainer(elem) {
185
+ const elementId = `${this.TASKBAR_ITEM_ID_PREFIX}${elem}`;
186
+ if (!this._customElementsId.includes(elementId)) {
187
+ this._customElementsId.push(elementId);
188
+ }
189
+ return h("span", { key: elementId, id: elementId });
190
+ }
191
+ getCustomElements() {
192
+ var _a, _b;
193
+ this._customElementsId = [];
194
+ this._customElements = new Map();
195
+ this._slotContainer = this.buildSlotContainer();
196
+ const customElementsArray = Array.from((_b = (_a = this._slotContainer) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []);
197
+ customElementsArray.forEach(item => this._customElements.set(item.id, item));
198
+ }
199
+ buildSlotContainer() {
200
+ if (this.customContainerId) {
201
+ const container = document.querySelector(`#${this.customContainerId}`);
202
+ return container === null || container === void 0 ? void 0 : container.querySelector(`#${this.customSlotId}`);
203
+ }
204
+ else {
205
+ return this._element.querySelector(`#${this.customSlotId}`);
206
+ }
207
+ }
165
208
  componentWillLoad() {
166
209
  this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
167
210
  if (this._application) {
@@ -170,6 +213,7 @@ export class SnkTaskbar {
170
213
  else {
171
214
  this._permissions = {};
172
215
  }
216
+ this.getCustomElements();
173
217
  }
174
218
  componentWillRender() {
175
219
  if (this._definitions == undefined && this._permissions) {
@@ -181,12 +225,30 @@ export class SnkTaskbar {
181
225
  const dataInfo = { dataUnit: this.dataUnit };
182
226
  ElementIDUtils.addIDInfo(this._element, null, dataInfo);
183
227
  }
228
+ componentDidRender() {
229
+ this.appendCustomElementsInTaskbar();
230
+ }
231
+ disconnectedCallback() {
232
+ this.unlinkAllCustomElements();
233
+ }
234
+ unlinkAllCustomElements() {
235
+ var _a;
236
+ (_a = this._customElementsId) === null || _a === void 0 ? void 0 : _a.forEach(id => {
237
+ const elementId = id.replace(this.TASKBAR_ITEM_ID_PREFIX, '');
238
+ const customElement = this._customElements.get(elementId);
239
+ this.unlinkCustomElementFromTaskbar(customElement);
240
+ });
241
+ }
242
+ unlinkCustomElementFromTaskbar(customElement) {
243
+ this._slotContainer.appendChild(customElement);
244
+ }
184
245
  render() {
185
246
  if (this._definitions === undefined) {
186
247
  return undefined;
187
248
  }
188
249
  let index = 0;
189
250
  return (h(Host, null, this.removeEmpty(this._definitions.map((elem) => {
251
+ var _a;
190
252
  if (elem === TaskbarElement.DIVIDER) {
191
253
  index = 0;
192
254
  }
@@ -196,11 +258,14 @@ export class SnkTaskbar {
196
258
  if (TaskbarElement[elem]) {
197
259
  return this.getElement(index, TaskbarElement[elem]);
198
260
  }
199
- if (this.customButtons.has(elem)) {
261
+ if ((_a = this.customButtons) === null || _a === void 0 ? void 0 : _a.has(elem)) {
200
262
  return this.getElement(index, this.customButtons.get(elem));
201
263
  }
264
+ if (this._customElements.has(elem)) {
265
+ return this.addCustomElementContainer(elem);
266
+ }
202
267
  return h("slot", { name: elem });
203
- }))));
268
+ })), h("div", { class: "taskbar-custom-elements-container" }, h("slot", { name: this.customSlotId }))));
204
269
  }
205
270
  static get is() { return "snk-taskbar"; }
206
271
  static get encapsulation() { return "scoped"; }
@@ -216,6 +281,41 @@ export class SnkTaskbar {
216
281
  }
217
282
  static get properties() {
218
283
  return {
284
+ "customSlotId": {
285
+ "type": "string",
286
+ "mutable": false,
287
+ "complexType": {
288
+ "original": "string",
289
+ "resolved": "string",
290
+ "references": {}
291
+ },
292
+ "required": false,
293
+ "optional": false,
294
+ "docs": {
295
+ "tags": [],
296
+ "text": "Usado para determinar o identificador do slot que recebe elementos personalizados."
297
+ },
298
+ "attribute": "custom-slot-id",
299
+ "reflect": false,
300
+ "defaultValue": "\"TASKBAR_CUSTOM_ELEMENTS\""
301
+ },
302
+ "customContainerId": {
303
+ "type": "string",
304
+ "mutable": false,
305
+ "complexType": {
306
+ "original": "string",
307
+ "resolved": "string",
308
+ "references": {}
309
+ },
310
+ "required": false,
311
+ "optional": false,
312
+ "docs": {
313
+ "tags": [],
314
+ "text": "Usado para determinar o identificador do container na DOM que \u00E9 responsavel por guardar os elementos personalizados\nque n\u00E3o podem ser passados por slot.\n\nExemplo: Elementos customizados na Taskbar da aba de detalhes."
315
+ },
316
+ "attribute": "custom-container-id",
317
+ "reflect": false
318
+ },
219
319
  "configName": {
220
320
  "type": "string",
221
321
  "mutable": false,
@@ -414,7 +514,10 @@ export class SnkTaskbar {
414
514
  }
415
515
  static get states() {
416
516
  return {
417
- "_permissions": {}
517
+ "_permissions": {},
518
+ "_customElements": {},
519
+ "_customElementsId": {},
520
+ "_slotContainer": {}
418
521
  };
419
522
  }
420
523
  static get events() {
@@ -47,6 +47,7 @@ export { SnkSimpleBar as SnkSimpleBar } from '../types/components/snk-simple-bar
47
47
  export { SnkSimpleCrud as SnkSimpleCrud } from '../types/components/snk-simple-crud/snk-simple-crud';
48
48
  export { SnkTabConfig as SnkTabConfig } from '../types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config';
49
49
  export { SnkTaskbar as SnkTaskbar } from '../types/components/snk-taskbar/snk-taskbar';
50
+ export { SnkTaskbarCustomElements as SnkTaskbarCustomElements } from '../types/components/snk-taskbar/snk-taskbar-custom-elements';
50
51
  export { TestePesquisa as TestePesquisa } from '../types/components/teste-pesquisa/teste-pesquisa';
51
52
 
52
53
  /**
@@ -47,4 +47,5 @@ export { SnkSimpleBar, defineCustomElement as defineCustomElementSnkSimpleBar }
47
47
  export { SnkSimpleCrud, defineCustomElement as defineCustomElementSnkSimpleCrud } from './snk-simple-crud.js';
48
48
  export { SnkTabConfig, defineCustomElement as defineCustomElementSnkTabConfig } from './snk-tab-config.js';
49
49
  export { SnkTaskbar, defineCustomElement as defineCustomElementSnkTaskbar } from './snk-taskbar.js';
50
+ export { SnkTaskbarCustomElements, defineCustomElement as defineCustomElementSnkTaskbarCustomElements } from './snk-taskbar-custom-elements.js';
50
51
  export { TestePesquisa, defineCustomElement as defineCustomElementTestePesquisa } from './teste-pesquisa.js';
@@ -1,5 +1,5 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { StringUtils, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
3
3
  import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
4
4
  import './DataFetcher.js';
5
5
  import './pesquisa-fetcher.js';
@@ -67,6 +67,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
67
67
  this.presentationMode = PresentationMode.PRIMARY;
68
68
  this.messagesBuilder = undefined;
69
69
  this.useEnterLikeTab = false;
70
+ this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
70
71
  }
71
72
  /**
72
73
  * Usado para alternar a visão entre GRID e FORM externamente.
@@ -208,7 +209,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
208
209
  return;
209
210
  }
210
211
  this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
211
- return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))));
212
+ return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID }, h("div", { slot: "SnkConfigContainerSlot" }, h("slot", { name: "SnkConfigContainerSlot" })))), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
212
213
  }
213
214
  get _element() { return this; }
214
215
  static get watchers() { return {
@@ -233,6 +234,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
233
234
  "_currentViewMode": [32],
234
235
  "_canEdit": [32],
235
236
  "_resourceID": [32],
237
+ "customContainerId": [32],
236
238
  "goToView": [64],
237
239
  "openConfigurator": [64],
238
240
  "closeConfigurator": [64],