keevo-components 1.8.529 → 1.8.531
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/api/services/image.cutter.service.mjs +2 -2
- package/esm2022/lib/components/keevo-components.module.mjs +14 -7
- package/esm2022/lib/components/kv-avatar/kv-avatar.component.mjs +2 -2
- package/esm2022/lib/components/kv-button/kv-button.component.mjs +4 -3
- package/esm2022/lib/components/kv-buttons/kv-button-popup/kv-button-popup.component.mjs +2 -2
- package/esm2022/lib/components/kv-card-selection/kv-card-selection.component.mjs +3 -3
- package/esm2022/lib/components/kv-carousel/kv-carousel.component.mjs +3 -3
- package/esm2022/lib/components/kv-chart/kv-chart.component.mjs +2 -2
- package/esm2022/lib/components/kv-file-upload/kv-file-upload.component.mjs +7 -19
- package/esm2022/lib/components/kv-home-card/kv-home-card.component.mjs +1 -1
- package/esm2022/lib/components/kv-icon/kv-icon.component.mjs +31 -0
- package/esm2022/lib/components/kv-icon/kv-icon.module.mjs +24 -0
- package/esm2022/lib/components/kv-inputs/kv-check/kv-check.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-dropdown/kv-dropdown.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-editor/kv-editor.component.mjs +5 -5
- package/esm2022/lib/components/kv-inputs/kv-input-calendar/kv-input-calendar.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-input-mask/kv-input-mask.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-input-number/kv-input-number.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-input-password/kv-input-password.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-input-text/kv-input-text.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-input-text-checkbox/kv-input-text-checkbox.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-input-textarea/kv-input-textarea.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-input-time/kv-input-time.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-multi-select/kv-multi-select.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-radio-group/kv-radio-group.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-switch/kv-switch.component.mjs +2 -2
- package/esm2022/lib/components/kv-inputs/kv-tree-multi-select/kv-tree-multi-select.component.mjs +2 -2
- package/esm2022/lib/components/kv-layout/dropdown-master/dropdown-master.component.mjs +5 -4
- package/esm2022/lib/components/kv-layout/kv-layout.module.mjs +22 -4
- package/esm2022/lib/components/kv-layout/layout/kv-layout.component.mjs +115 -51
- package/esm2022/lib/components/kv-layout/top-icons/top-icons.component.mjs +18 -0
- package/esm2022/lib/components/kv-modal/kv-modal.component.mjs +1 -1
- package/esm2022/lib/components/kv-orgchart/kv-orgchart.component.mjs +1 -1
- package/esm2022/lib/components/kv-page-form/kv-page-form.component.mjs +1 -1
- package/esm2022/lib/components/kv-page-stepper/kv-page-stepper.component.mjs +6 -8
- package/esm2022/lib/components/kv-page-stepper/kv-page-stepper.module.mjs +8 -4
- package/esm2022/lib/components/kv-pick-list/kv-pick-list.component.mjs +3 -15
- package/esm2022/lib/components/kv-stepper/kv-stepper.component.mjs +5 -7
- package/esm2022/lib/components/kv-stepper/kv-stepper.module.mjs +11 -4
- package/esm2022/lib/components/kv-table/kv-table.component.mjs +1 -1
- package/esm2022/lib/components/kv-table-edit/kv-table-edit.component.mjs +1 -1
- package/esm2022/lib/components/kv-table-expandable/kv-table-expandable.component.mjs +1 -1
- package/esm2022/lib/components/kv-tree-table/kv-tree-table.component.mjs +1 -1
- package/esm2022/lib/components/kv-workspace/empresa/kv-workspace-empresa.component.mjs +4 -44
- package/esm2022/lib/components/kv-workspace/kv-workspace.module.mjs +12 -4
- package/esm2022/lib/components/kv-workspace/master/kv-workspace-master.component.mjs +20 -5
- package/esm2022/lib/components/kv-workspace/workspace/kv-workspace.component.mjs +29 -17
- package/esm2022/public-api.mjs +6 -1
- package/fesm2022/keevo-components.mjs +394 -270
- package/fesm2022/keevo-components.mjs.map +1 -1
- package/lib/components/keevo-components.module.d.ts +3 -2
- package/lib/components/kv-button/kv-button.component.d.ts +3 -2
- package/lib/components/kv-icon/kv-icon.component.d.ts +15 -0
- package/lib/components/kv-icon/kv-icon.module.d.ts +8 -0
- package/lib/components/kv-layout/kv-layout.module.d.ts +7 -4
- package/lib/components/kv-layout/layout/kv-layout.component.d.ts +48 -34
- package/lib/components/kv-layout/top-icons/top-icons.component.d.ts +15 -0
- package/lib/components/kv-page-stepper/kv-page-stepper.module.d.ts +2 -1
- package/lib/components/kv-pick-list/kv-pick-list.component.d.ts +1 -5
- package/lib/components/kv-stepper/kv-stepper.module.d.ts +2 -1
- package/lib/components/kv-table/kv-table.component.d.ts +1 -1
- package/lib/components/kv-table-expandable/kv-table-expandable.component.d.ts +1 -1
- package/lib/components/kv-workspace/empresa/kv-workspace-empresa.component.d.ts +2 -9
- package/lib/components/kv-workspace/kv-workspace.module.d.ts +3 -1
- package/lib/components/kv-workspace/master/kv-workspace-master.component.d.ts +8 -1
- package/lib/components/kv-workspace/workspace/kv-workspace.component.d.ts +13 -5
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
- package/src/assets/images/LogoEvo.png +0 -0
- package/src/assets/images/LogoPequenaEvo.png +0 -0
- package/src/assets/images/background.png +0 -0
- package/src/assets/images/keepass-logo.png +0 -0
- package/src/assets/images/keepass-logo.svg +74 -0
- package/src/assets/images/keevo-logo.png +0 -0
- package/src/assets/images/logokeevo_2.png +0 -0
- package/src/lib/components/keevo-components-styles.scss +59 -3
- package/src/lib/components/kv-button/kv-button.component.scss +145 -0
|
@@ -253,7 +253,7 @@ export class KvTreetableComponent {
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
256
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreetableComponent, selector: "kv-tree-table", inputs: { disableRowNodeSticky: { classPropertyName: "disableRowNodeSticky", publicName: "disableRowNodeSticky", isSignal: false, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, gridLines: { classPropertyName: "gridLines", publicName: "gridLines", isSignal: false, isRequired: false, transformFunction: null }, tableCaptalized: { classPropertyName: "tableCaptalized", publicName: "tableCaptalized", isSignal: false, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: false, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: false, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: false, isRequired: false, transformFunction: null }, treeTableDraggable: { classPropertyName: "treeTableDraggable", publicName: "treeTableDraggable", isSignal: false, isRequired: false, transformFunction: null }, transferArrayItem: { classPropertyName: "transferArrayItem", publicName: "transferArrayItem", isSignal: false, isRequired: false, transformFunction: null }, ordenacao: { classPropertyName: "ordenacao", publicName: "ordenacao", isSignal: false, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: false, isRequired: false, transformFunction: null }, textoEmptyMessage: { classPropertyName: "textoEmptyMessage", publicName: "textoEmptyMessage", isSignal: false, isRequired: false, transformFunction: null }, childrenRecoil: { classPropertyName: "childrenRecoil", publicName: "childrenRecoil", isSignal: false, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: false, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, indFullPage: { classPropertyName: "indFullPage", publicName: "indFullPage", isSignal: false, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, isLoadingSkeleton: { classPropertyName: "isLoadingSkeleton", publicName: "isLoadingSkeleton", isSignal: true, isRequired: false, transformFunction: null }, pageLinksOptions: { classPropertyName: "pageLinksOptions", publicName: "pageLinksOptions", isSignal: false, isRequired: false, transformFunction: null }, pageLinks: { classPropertyName: "pageLinks", publicName: "pageLinks", isSignal: false, isRequired: false, transformFunction: null }, showFirstLastIcon: { classPropertyName: "showFirstLastIcon", publicName: "showFirstLastIcon", isSignal: false, isRequired: false, transformFunction: null }, selectionKeys: { classPropertyName: "selectionKeys", publicName: "selectionKeys", isSignal: true, isRequired: false, transformFunction: null }, _templates: { classPropertyName: "_templates", publicName: "templates", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { dataSource: "dataSourceChange", onFilter: "onFilter", onPaginate: "onPaginate", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onDropItem: "onDropItem", selectionKeys: "selectionKeysChange" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "kvTreeTable", first: true, predicate: ["kvTreeTable"], descendants: true, isSignal: true }, { propertyName: "pTreeTable", first: true, predicate: TreeTable, descendants: true }, { propertyName: "inputBusca", first: true, predicate: ["inputBusca"], descendants: true }], ngImport: i0, template: "<div class=\"kv-treetable-container\" #kvTreeTable>\r\n <p-treeTable\r\n #tt\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n [value]=\"dataSource()\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 15, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela() > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela() > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [selectionKeys]=\"selectionKeys()\"\r\n (selectionKeysChange)=\"selectionKeys.set($event)\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [scrollHeight]=\"scrollHeight\"\r\n >\r\n @if(config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0 p-1\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if(config.title) {\r\n <div class=\"text-md font-bold my-3\">{{ config.title }}</div>\r\n } @if(config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">{{ config.subtitle }}</div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela() < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n @if(config.enableFilter) {\r\n\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo()(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [size]=\"'small'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n } @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n @if($index == 0 && config.enableSelect) {\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n }\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span class=\"text-xs\">{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\" />\r\n } @if(col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0 || config.actionsPai) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span class=\"text-xs\">{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0 || config.actionsPai) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n @if(isLoadingSkeleton()) { @for(skeletonRow of\r\n dataSource(); track $index) {\r\n <tr>\r\n @for(col of columns; track $index){\r\n <td>\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center w-full\"\r\n >\r\n @if($index == 0) {\r\n <p-treeTableToggler [rowNode]=\"rowNode\" />\r\n }\r\n <div class=\"flex flex-column w-full\">\r\n <p-skeleton height=\"1rem\" />\r\n </div>\r\n </div>\r\n </td>\r\n }\r\n <td>\r\n <div class=\"flex justify-content-center\">\r\n <p-skeleton [style]=\"{ height: '1.5rem', width: '1.5rem' }\" />\r\n </div>\r\n </td>\r\n </tr>\r\n } } @else { @if(treeTableDraggable) {\r\n <tr\r\n cdkDrag\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n class=\"draggable-cell\"\r\n [style.position]=\"\r\n !disableRowNodeSticky && rowNode.level !== 0 ? 'sticky' : null\r\n \"\r\n >\r\n <!-- [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \" -->\r\n\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n @if($index == 0) {\r\n <div class=\"w-full-h-full flex align-items-center\">\r\n <span\r\n class=\"material-symbols-outlined drag-icon\"\r\n style=\"\r\n cursor: grab;\r\n font-size: 25px;\r\n color: #6b7280;\r\n opacity: 0.9;\r\n \"\r\n cdkDragHandle\r\n >\r\n drag_indicator\r\n </span>\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox()(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n display: isSelectEnabled()(rowData, rowNode)\r\n ? 'block'\r\n : 'none',\r\n 'margin-left': config.visibleCheckboxFunction\r\n ? '-34px'\r\n : '0px'\r\n }\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-row align-items-center w-full\">\r\n @if (col.template && validateShowTemplate()(rowNode, col)) {\r\n <span class=\"w-full\">\r\n @if(getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n }\r\n </span>\r\n } @else {\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n (col.boolean || col.centralize) && 'justify-content-center'\r\n }} gap-2 w-full\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n } @if(col.boolean) {\r\n <i\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1rem; font-weight: 700\"\r\n ></i>\r\n\r\n } @else {\r\n <div class=\"flex flex-column\">\r\n <span class=\"m-0 text-xs\">{{ rowData[col.field] }}</span>\r\n\r\n @if(col.subtitle) {\r\n\r\n <p class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </td>\r\n } @if((config.actions?.length ?? 0 > 0) || config.actionsPai) {\r\n <td\r\n style=\"border-left: none; text-align: center; width: 0\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n @if((config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition()(rowNode)) {\r\n <div class=\"flex align-items-center justify-content-center\">\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 20px; padding: 0.1rem\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal()(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n } @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end align-items-center\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [type]=\"'text'\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n [disabled]=\"getOrExecute(actionPai.disabled, rowData) || false\"\r\n [pTooltip]=\"getOrExecute(actionPai.tooltip, rowData)\"\r\n [tooltipPosition]=\"'left'\"\r\n />\r\n\r\n } }\r\n </div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n } @else {\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n @if($index == 0) {\r\n <div class=\"w-full-h-full flex align-items-center\">\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox()(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n display: isSelectEnabled()(rowData, rowNode)\r\n ? 'block'\r\n : 'none',\r\n 'margin-left': config.visibleCheckboxFunction\r\n ? '-34px'\r\n : '0px'\r\n }\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-row align-items-center w-full\">\r\n @if (col.template && validateShowTemplate()(rowNode, col)) {\r\n <span class=\"w-full\">\r\n @if(getCustomTemplate(col.template.name)) {\r\n\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n }\r\n </span>\r\n } @else {\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n (col.boolean || col.centralize) && 'justify-content-center'\r\n }} gap-2 w-full\"\r\n >\r\n @if(col.tagColor) {\r\n\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n } @if(col.boolean) {\r\n\r\n <i\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1rem; font-weight: 700\"\r\n ></i>\r\n } @else {\r\n <div class=\"flex flex-column\">\r\n <span class=\"m-0 text-xs\">{{ rowData[col.field] }}</span>\r\n\r\n @if(col.subtitle) {\r\n\r\n <p class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </td>\r\n } @if((config.actions?.length ?? 0 > 0) || config.actionsPai) {\r\n <td style=\"border-left: none; text-align: center; width: 0\">\r\n @if((config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition()(rowNode)) {\r\n <div>\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 20px; padding: 0.1rem\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal()(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n } @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [type]=\"'text'\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n [disabled]=\"getOrExecute(actionPai.disabled, rowData) || false\"\r\n [pTooltip]=\"getOrExecute(actionPai.tooltip, rowData)\"\r\n [tooltipPosition]=\"'left'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n } }\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n class=\"text-sm\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.2rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-treetable .p-paginator{scale:.75}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea;padding:.3rem}:host ::ng-deep .treetabledraggable .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler{width:1rem;height:1rem}.tag{width:5px;height:20px;border-radius:.25rem}:host ::ng-deep .draggable-cell .drag-icon{visibility:hidden}:host ::ng-deep .draggable-cell:hover .drag-icon{visibility:visible}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.65rem;height:.65rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}:host{height:100%}::ng-deep .kv-treetable-container,::ng-deep p-treeTable{height:100%}::ng-deep p-treeTable .p-treetable{display:flex;flex-direction:column;height:100%}::ng-deep table{height:auto!important}::ng-deep p-treeTable .p-treetable .p-treetable-wrapper,::ng-deep p-treeTable{height:100%}::ng-deep .p-treetable .p-treetable-wrapper::-webkit-scrollbar{width:6px}::ng-deep .p-treetable .p-treetable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-treetable .p-treetable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-treetable .p-treetable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-treetable .p-treetable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i5.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i6.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i8.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: i9.TreeTable, selector: "p-treeTable", inputs: ["columns", "style", "styleClass", "tableStyle", "tableStyleClass", "autoLayout", "lazy", "lazyLoadOnInit", "paginator", "rows", "first", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "customSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "compareSelectionBy", "rowHover", "loading", "loadingIcon", "showLoader", "scrollable", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "frozenColumns", "resizableColumns", "columnResizeMode", "reorderableColumns", "contextMenu", "rowTrackBy", "filters", "globalFilterFields", "filterDelay", "filterMode", "filterLocale", "paginatorLocale", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "value", "virtualRowHeight", "selectionKeys"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i9.TreeTableToggler, selector: "p-treeTableToggler", inputs: ["rowNode"] }, { kind: "directive", type: i9.TTSortableColumn, selector: "[ttSortableColumn]", inputs: ["ttSortableColumn", "ttSortableColumnDisabled"] }, { kind: "component", type: i9.TTSortIcon, selector: "p-treeTableSortIcon", inputs: ["field", "ariaLabelDesc", "ariaLabelAsc"] }, { kind: "directive", type: i9.TTRow, selector: "[ttRow]", inputs: ["ttRow"] }, { kind: "component", type: i9.TTCheckbox, selector: "p-treeTableCheckbox", inputs: ["disabled", "value"] }, { kind: "component", type: i9.TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox" }, { kind: "component", type: i10.KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "label", "disabled"], outputs: ["onClick"] }] }); }
|
|
256
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: KvTreetableComponent, selector: "kv-tree-table", inputs: { disableRowNodeSticky: { classPropertyName: "disableRowNodeSticky", publicName: "disableRowNodeSticky", isSignal: false, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: false, isRequired: false, transformFunction: null }, gridLines: { classPropertyName: "gridLines", publicName: "gridLines", isSignal: false, isRequired: false, transformFunction: null }, tableCaptalized: { classPropertyName: "tableCaptalized", publicName: "tableCaptalized", isSignal: false, isRequired: false, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: false, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: false, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: false, isRequired: false, transformFunction: null }, treeTableDraggable: { classPropertyName: "treeTableDraggable", publicName: "treeTableDraggable", isSignal: false, isRequired: false, transformFunction: null }, transferArrayItem: { classPropertyName: "transferArrayItem", publicName: "transferArrayItem", isSignal: false, isRequired: false, transformFunction: null }, ordenacao: { classPropertyName: "ordenacao", publicName: "ordenacao", isSignal: false, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: false, isRequired: false, transformFunction: null }, textoEmptyMessage: { classPropertyName: "textoEmptyMessage", publicName: "textoEmptyMessage", isSignal: false, isRequired: false, transformFunction: null }, childrenRecoil: { classPropertyName: "childrenRecoil", publicName: "childrenRecoil", isSignal: false, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: false, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, indFullPage: { classPropertyName: "indFullPage", publicName: "indFullPage", isSignal: false, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, isLoadingSkeleton: { classPropertyName: "isLoadingSkeleton", publicName: "isLoadingSkeleton", isSignal: true, isRequired: false, transformFunction: null }, pageLinksOptions: { classPropertyName: "pageLinksOptions", publicName: "pageLinksOptions", isSignal: false, isRequired: false, transformFunction: null }, pageLinks: { classPropertyName: "pageLinks", publicName: "pageLinks", isSignal: false, isRequired: false, transformFunction: null }, showFirstLastIcon: { classPropertyName: "showFirstLastIcon", publicName: "showFirstLastIcon", isSignal: false, isRequired: false, transformFunction: null }, selectionKeys: { classPropertyName: "selectionKeys", publicName: "selectionKeys", isSignal: true, isRequired: false, transformFunction: null }, _templates: { classPropertyName: "_templates", publicName: "templates", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { dataSource: "dataSourceChange", onFilter: "onFilter", onPaginate: "onPaginate", onActiveItem: "onActiveItem", onActiveItemLote: "onActiveItemLote", doubleClickEvent: "doubleClickEvent", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onDropItem: "onDropItem", selectionKeys: "selectionKeysChange" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], viewQueries: [{ propertyName: "kvTreeTable", first: true, predicate: ["kvTreeTable"], descendants: true, isSignal: true }, { propertyName: "pTreeTable", first: true, predicate: TreeTable, descendants: true }, { propertyName: "inputBusca", first: true, predicate: ["inputBusca"], descendants: true }], ngImport: i0, template: "<div class=\"kv-treetable-container\" #kvTreeTable>\r\n <p-treeTable\r\n #tt\r\n cdkDropList\r\n class=\"example-list\"\r\n (cdkDropListDropped)=\"drop($event)\"\r\n [value]=\"dataSource()\"\r\n [columns]=\"config.columns\"\r\n [resizableColumns]=\"true\"\r\n [tableStyle]=\"{ 'min-width': '50rem' }\"\r\n [resizableColumns]=\"true\"\r\n [paginator]=\"paginator\"\r\n [rows]=\"rows\"\r\n [totalRecords]=\"totalRecords\"\r\n [rowsPerPageOptions]=\"[5, 10, 15, 25, 50]\"\r\n [showFirstLastIcon]=\"tamanhoTela() > 960 ? true : false\"\r\n [pageLinks]=\"tamanhoTela() > 960 ? 2 : 1\"\r\n [styleClass]=\"gridLines ? 'p-treetable-gridlines' : ''\"\r\n [(selection)]=\"selectedItems\"\r\n [selectionKeys]=\"selectionKeys()\"\r\n (selectionKeysChange)=\"selectionKeys.set($event)\"\r\n [lazy]=\"config.lazy\"\r\n (onLazyLoad)=\"paginate($event)\"\r\n (onNodeSelect)=\"onNodeSelected($event)\"\r\n (onNodeUnselect)=\"onNodeUnselected($event)\"\r\n [showCurrentPageReport]=\"true\"\r\n currentPageReportTemplate=\"{first} - {last} de {totalRecords}\"\r\n [scrollHeight]=\"scrollHeight\"\r\n >\r\n @if(config.enableCation) {\r\n <ng-template pTemplate=\"caption\">\r\n <div\r\n class=\"flex flex-row flex-wrap justify-content-between align-items-center grid formgrid p-fluid col-12 m-0 p-1\"\r\n style=\"background-color: #eaeaea\"\r\n >\r\n <div class=\"col-12 flex flex-column\">\r\n @if(config.title) {\r\n <div class=\"text-md font-bold my-3\">{{ config.title }}</div>\r\n } @if(config.subtitle) {\r\n <div class=\"text-sm mb-4 font-medium\">{{ config.subtitle }}</div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"flex flex-row align-items-center col-10 p-0 md:col-6 lg:col-4 justify-content-center {{\r\n tamanhoTela() < 768 ? '' : 'input-search'\r\n }}\"\r\n >\r\n @if(config.enableFilter) {\r\n\r\n <span class=\"p-input-icon-left\">\r\n <i class=\"pi pi-search\"></i>\r\n\r\n <input\r\n pInputText\r\n pAutoFocus\r\n [autofocus]=\"true\"\r\n type=\"text\"\r\n (input)=\"onGlobalFilter(tt, $event)\"\r\n placeholder=\"Pesquisar...\"\r\n class=\"h-2rem\"\r\n #inputBusca\r\n />\r\n </span>\r\n }\r\n </div>\r\n\r\n <div class=\"flex flex-row col-1 justify-content-end p-0\">\r\n <div class=\"flex flex-row gap-2 btns-options\">\r\n @for (action of config.actionsLote; track $index) {\r\n @if((selectedItems.length > 0 || action.showAcoesLote) &&\r\n exibirCampo()(action, this.action)) {\r\n <kv-button\r\n (onClick)=\"action?.command(); activeItemLote(selectedItems)\"\r\n [pTooltip]=\"getOrExecute(action.tooltip, selectedItems)\"\r\n [tooltipPosition]=\"'bottom'\"\r\n [size]=\"'small'\"\r\n [disabled]=\"getOrExecute(action.disabled, selectedItems) || false\"\r\n [icon]=\"getOrExecute(action.icon, selectedItems)\"\r\n [severity]=\"action.severity || 'tertiary'\"\r\n />\r\n } }\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n } @if(showHeader){\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for(col of columns; track $index){\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div>\r\n <div [ngClass]=\"{ flex: $index == 0, 'gap-3': $index == 0 }\">\r\n @if($index == 0 && config.enableSelect) {\r\n <p-treeTableHeaderCheckbox\r\n (click)=\"activeItemLote(selectedItems)\"\r\n />\r\n }\r\n\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span class=\"text-xs\">{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\" />\r\n } @if(col.headerTooltip) {\r\n <span\r\n class=\"material-symbols-outlined flex align-items-center\"\r\n [pTooltip]=\"col.headerTooltip\"\r\n >\r\n info\r\n </span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </th>\r\n @if (config.actions?.length ?? 0 > 0 || config.actionsPai) {\r\n <th [style.width]=\"5\"></th>\r\n } }\r\n </tr>\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n @for (col of columns; track $index) {\r\n <th\r\n [ttSortableColumn]=\"col.field\"\r\n [ttSortableColumnDisabled]=\"col.sortable === false\"\r\n [style.width]=\"col.width\"\r\n >\r\n <div class=\"flex flex-row align-items-center {{ align(col) }}\">\r\n <span class=\"text-xs\">{{ col.header }}</span>\r\n\r\n @if(col.sortable) {\r\n <p-treeTableSortIcon [field]=\"col.field\" class=\"pb-1\" />\r\n }\r\n </div>\r\n </th>\r\n } @if (config.actions?.length ?? 0 > 0 || config.actionsPai) {\r\n <th [style.width]=\"5\"></th>\r\n }\r\n </tr>\r\n </ng-template>\r\n }\r\n\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-rowNode\r\n let-rowData=\"rowData\"\r\n let-columns=\"columns\"\r\n >\r\n @if(isLoadingSkeleton()) { @for(skeletonRow of\r\n dataSource(); track $index) {\r\n <tr>\r\n @for(col of columns; track $index){\r\n <td>\r\n <div\r\n class=\"flex flex-row align-items-center justify-content-center w-full\"\r\n >\r\n @if($index == 0) {\r\n <p-treeTableToggler [rowNode]=\"rowNode\" />\r\n }\r\n <div class=\"flex flex-column w-full\">\r\n <p-skeleton height=\"1rem\" />\r\n </div>\r\n </div>\r\n </td>\r\n }\r\n <td>\r\n <div class=\"flex justify-content-center\">\r\n <p-skeleton [style]=\"{ height: '1.5rem', width: '1.5rem' }\" />\r\n </div>\r\n </td>\r\n </tr>\r\n } } @else { @if(treeTableDraggable) {\r\n <tr\r\n cdkDrag\r\n cdkDragLockAxis=\"y\"\r\n [cdkDragData]=\"rowNode\"\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n class=\"draggable-cell\"\r\n [style.position]=\"\r\n !disableRowNodeSticky && rowNode.level !== 0 ? 'sticky' : null\r\n \"\r\n >\r\n <!-- [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \" -->\r\n\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n @if($index == 0) {\r\n <div class=\"w-full-h-full flex align-items-center\">\r\n <span\r\n class=\"material-symbols-outlined drag-icon\"\r\n style=\"\r\n cursor: grab;\r\n font-size: 25px;\r\n color: #6b7280;\r\n opacity: 0.9;\r\n \"\r\n cdkDragHandle\r\n >\r\n drag_indicator\r\n </span>\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox()(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n display: isSelectEnabled()(rowData, rowNode)\r\n ? 'block'\r\n : 'none',\r\n 'margin-left': config.visibleCheckboxFunction\r\n ? '-34px'\r\n : '0px'\r\n }\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-row align-items-center w-full\">\r\n @if (col.template && validateShowTemplate()(rowNode, col)) {\r\n <span class=\"w-full\">\r\n @if(getCustomTemplate(col.template.name)) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n }\r\n </span>\r\n } @else {\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n (col.boolean || col.centralize) && 'justify-content-center'\r\n }} gap-2 w-full\"\r\n >\r\n @if(col.tagColor) {\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n } @if(col.boolean) {\r\n <i\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1rem; font-weight: 700\"\r\n ></i>\r\n\r\n } @else {\r\n <div class=\"flex flex-column\">\r\n <span class=\"m-0 text-xs\">{{ rowData[col.field] }}</span>\r\n\r\n @if(col.subtitle) {\r\n\r\n <p class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </td>\r\n } @if((config.actions?.length ?? 0 > 0) || config.actionsPai) {\r\n <td\r\n style=\"border-left: none; text-align: center; width: 0\"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"rowNode.level === 0 ? 'none' : ''\"\r\n >\r\n @if((config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition()(rowNode)) {\r\n <div class=\"flex align-items-center justify-content-center\">\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 20px; padding: 0.1rem\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal()(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n } @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end align-items-center\">\r\n @for (actionPai of config.actionsPai; track $index) {\r\n @if(getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [type]=\"'text'\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n [disabled]=\"getOrExecute(actionPai.disabled, rowData) || false\"\r\n [pTooltip]=\"getOrExecute(actionPai.tooltip, rowData)\"\r\n [tooltipPosition]=\"'left'\"\r\n />\r\n\r\n } }\r\n </div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n } @else {\r\n <tr\r\n [ttRow]=\"rowNode\"\r\n (dblclick)=\"doubleClick($event, rowData)\"\r\n [ngClass]=\"{ capitalize: tableCaptalized }\"\r\n >\r\n @for(col of columns; track $index){\r\n <td\r\n [style.position]=\"rowNode.level !== 0 ? 'sticky' : null\"\r\n [style.left.px]=\"\r\n childrenRecoil && rowNode.level !== 0 ? rowNode.level * 30 : null\r\n \"\r\n [style.borderRight]=\"rowNode.level === 0 ? 'none' : ''\"\r\n [style.borderLeft]=\"\r\n rowNode.level === 0 && col.field != config.columns[0].field\r\n ? 'none'\r\n : ''\r\n \"\r\n >\r\n <div class=\"flex flex-row {{ align(col) }}\">\r\n @if($index == 0) {\r\n <div class=\"w-full-h-full flex align-items-center\">\r\n <p-treeTableToggler class=\"hiddenVisible\" [rowNode]=\"rowNode\" />\r\n\r\n @if(config.enableSelect) {\r\n <p-treeTableCheckbox\r\n [disabled]=\"isDisabledCheckbox()(rowData, rowNode)\"\r\n (click)=\"activeItemLote(selectedItems)\"\r\n [value]=\"rowNode\"\r\n [ngStyle]=\"{\r\n display: isSelectEnabled()(rowData, rowNode)\r\n ? 'block'\r\n : 'none',\r\n 'margin-left': config.visibleCheckboxFunction\r\n ? '-34px'\r\n : '0px'\r\n }\"\r\n />\r\n }\r\n </div>\r\n }\r\n\r\n <div class=\"flex flex-row align-items-center w-full\">\r\n @if (col.template && validateShowTemplate()(rowNode, col)) {\r\n <span class=\"w-full\">\r\n @if(getCustomTemplate(col.template.name)) {\r\n\r\n <ng-container\r\n [ngTemplateOutlet]=\"getCustomTemplate(col.template.name)\"\r\n [ngTemplateOutletContext]=\"{ $implicit: rowData }\"\r\n >\r\n </ng-container>\r\n }\r\n </span>\r\n } @else {\r\n <div\r\n class=\"flex flex-row align-items-center {{\r\n (col.boolean || col.centralize) && 'justify-content-center'\r\n }} gap-2 w-full\"\r\n >\r\n @if(col.tagColor) {\r\n\r\n <div\r\n class=\"tag\"\r\n [pTooltip]=\"\r\n col.tooltipTag &&\r\n col.tooltipTag(rowData, col, rowData[col.field])\r\n \"\r\n [style.background-color]=\"\r\n col.tagColor(rowData, col, rowData[col.field])\r\n \"\r\n ></div>\r\n\r\n } @if(col.boolean) {\r\n\r\n <i\r\n class=\"pi {{\r\n rowData[col.field] ? 'pi-check text-green-300' : ''\r\n }}\"\r\n style=\"font-size: 1rem; font-weight: 700\"\r\n ></i>\r\n } @else {\r\n <div class=\"flex flex-column\">\r\n <span class=\"m-0 text-xs\">{{ rowData[col.field] }}</span>\r\n\r\n @if(col.subtitle) {\r\n\r\n <p class=\"m-0 text-xs font-semibold\">\r\n {{ rowData[col.subtitle] }}\r\n </p>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </td>\r\n } @if((config.actions?.length ?? 0 > 0) || config.actionsPai) {\r\n <td style=\"border-left: none; text-align: center; width: 0\">\r\n @if((config.actions?.length ?? 0 > 0) &&\r\n validateActionPosition()(rowNode)) {\r\n <div>\r\n <span\r\n class=\"material-symbols-outlined cursor-pointer icon-more-horiz\"\r\n style=\"font-size: 20px; padding: 0.1rem\"\r\n (click)=\"menu.toggle($event); activeItem(rowData)\"\r\n >\r\n more_horiz\r\n </span>\r\n\r\n @for(action of config.actions; track $index) {\r\n {{ criarMenusModal()(rowData) }}\r\n }\r\n\r\n <p-menu\r\n #menu\r\n [popup]=\"true\"\r\n [model]=\"menuItems\"\r\n appendTo=\"body\"\r\n ></p-menu>\r\n </div>\r\n } @if(config.actionsPai?.length ?? 0 > 0 && rowNode.level == 0){\r\n <div class=\"flex justify-content-end\">\r\n @for (actionPai of config.actionsPai; track $index) { @if\r\n (getOrExecute(actionPai.visible, rowData) ?? true) {\r\n <kv-button\r\n (onClick)=\"activeItem(rowData); actionPai.command($event)\"\r\n [type]=\"'text'\"\r\n [icon]=\"actionPai.icon\"\r\n [severity]=\"actionPai.severity || 'tertiary'\"\r\n [disabled]=\"getOrExecute(actionPai.disabled, rowData) || false\"\r\n [pTooltip]=\"getOrExecute(actionPai.tooltip, rowData)\"\r\n [tooltipPosition]=\"'left'\"\r\n />\r\n } }\r\n </div>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n } }\r\n </ng-template>\r\n\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr>\r\n <td\r\n [attr.colspan]=\"config.columns.length + 1\"\r\n style=\"text-align: center\"\r\n class=\"text-sm\"\r\n >\r\n {{ textoEmptyMessage }}\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-treeTable>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";::ng-deep .p-treetable .p-treetable-tbody>tr>td{padding:.2rem}::ng-deep .p-treetable .p-treetable-header{padding:0rem}span{font-size:14px}:host ::ng-deep .p-treetable table{table-layout:auto!important}::ng-deep .p-checkbox .p-checkbox-box{width:1.125rem;height:1.125rem}::ng-deep .p-checkbox{display:flex;align-items:center}::ng-deep .p-treetable .p-paginator{scale:.75}.icon-more-horiz{font-weight:700}.icon-more-horiz:hover,.icon-more-horiz:focus{color:#5e5e5e;transition:color .3s,transform .3s;background-color:#eaeaea;border-radius:50%}::ng-deep .p-treetable .p-treetable-thead>tr>th{background-color:#eaeaea;padding:.3rem}:host ::ng-deep .treetabledraggable .p-treetable .p-treetable-tbody>tr>td .p-treetable-toggler{width:1rem;height:1rem}.tag{width:5px;height:20px;border-radius:.25rem}:host ::ng-deep .draggable-cell .drag-icon{visibility:hidden}:host ::ng-deep .draggable-cell:hover .drag-icon{visibility:visible}.cdk-drag-preview{display:flex;align-items:center;justify-content:space-between;border-radius:10px!important}.cdk-drop-list-dragging{cursor:grabbing}:host ::ng-deep .cdk-drop-list-dragging .cdk-drag{transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .cdk-drag-animating{transition:transform .3s cubic-bezier(0,0,.2,1)}::ng-deep svg.p-icon{width:.65rem;height:.65rem}::ng-deep .p-checkbox .p-checkbox-box.p-highlight{border-color:#004172;background:#004172}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:hover{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:active{background-color:#002542}::ng-deep .p-checkbox .p-checkbox-box.p-highlight:disabled{background-color:#002542;opacity:.4;cursor:auto}:host{height:100%}::ng-deep .kv-treetable-container,::ng-deep p-treeTable{height:100%}::ng-deep p-treeTable .p-treetable{display:flex;flex-direction:column;height:100%}::ng-deep table{height:auto!important}::ng-deep p-treeTable .p-treetable .p-treetable-wrapper,::ng-deep p-treeTable{height:100%}::ng-deep .p-treetable .p-treetable-wrapper::-webkit-scrollbar{width:6px}::ng-deep .p-treetable .p-treetable-wrapper::-webkit-scrollbar:hover{background-color:#dededebf}::ng-deep .p-treetable .p-treetable-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}::ng-deep .p-treetable .p-treetable-wrapper:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:#00000080}::ng-deep .p-treetable .p-treetable-wrapper::-webkit-scrollbar-track{border-left:2px solid white;background-color:#dededebf}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3.AutoFocus, selector: "[pAutoFocus]", inputs: ["autofocus"] }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "directive", type: i5.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "component", type: i6.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaLabel", "ariaLabelledBy", "id", "tabindex"], outputs: ["onShow", "onHide", "onBlur", "onFocus"] }, { kind: "directive", type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i8.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "style", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: i9.TreeTable, selector: "p-treeTable", inputs: ["columns", "style", "styleClass", "tableStyle", "tableStyleClass", "autoLayout", "lazy", "lazyLoadOnInit", "paginator", "rows", "first", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "customSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "compareSelectionBy", "rowHover", "loading", "loadingIcon", "showLoader", "scrollable", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "frozenColumns", "resizableColumns", "columnResizeMode", "reorderableColumns", "contextMenu", "rowTrackBy", "filters", "globalFilterFields", "filterDelay", "filterMode", "filterLocale", "paginatorLocale", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "value", "virtualRowHeight", "selectionKeys"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i9.TreeTableToggler, selector: "p-treeTableToggler", inputs: ["rowNode"] }, { kind: "directive", type: i9.TTSortableColumn, selector: "[ttSortableColumn]", inputs: ["ttSortableColumn", "ttSortableColumnDisabled"] }, { kind: "component", type: i9.TTSortIcon, selector: "p-treeTableSortIcon", inputs: ["field", "ariaLabelDesc", "ariaLabelAsc"] }, { kind: "directive", type: i9.TTRow, selector: "[ttRow]", inputs: ["ttRow"] }, { kind: "component", type: i9.TTCheckbox, selector: "p-treeTableCheckbox", inputs: ["disabled", "value"] }, { kind: "component", type: i9.TTHeaderCheckbox, selector: "p-treeTableHeaderCheckbox" }, { kind: "component", type: i10.KvButtonComponent, selector: "kv-button", inputs: ["fullWidth", "type", "loading", "severity", "size", "icon", "iconPosition", "label", "disabled"], outputs: ["onClick"] }] }); }
|
|
257
257
|
}
|
|
258
258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvTreetableComponent, decorators: [{
|
|
259
259
|
type: Component,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "../../kv-
|
|
3
|
+
import * as i1 from "../../kv-icon/kv-icon.component";
|
|
4
4
|
export class WorkspaceEmpresaComponent {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.empresas = [];
|
|
@@ -8,56 +8,16 @@ export class WorkspaceEmpresaComponent {
|
|
|
8
8
|
this.onEmpresaSelecionada = new EventEmitter();
|
|
9
9
|
this.onPaginate = new EventEmitter();
|
|
10
10
|
}
|
|
11
|
-
ngOnInit() {
|
|
12
|
-
this.configTable();
|
|
13
|
-
}
|
|
14
|
-
activeItem(e) {
|
|
15
|
-
this.empresaSelecionada = e;
|
|
16
|
-
}
|
|
17
|
-
configTable() {
|
|
18
|
-
this.tableConfig = {
|
|
19
|
-
lazy: true,
|
|
20
|
-
columns: [
|
|
21
|
-
{ position: 0, field: 'codigopessoa', header: 'Código', width: '', centralize: false, sortable: false },
|
|
22
|
-
{ position: 1, field: 'cpfcnpj', header: 'CPF/CNPJ', width: '', centralize: false, sortable: false, pipe: 'cpfcnpj' },
|
|
23
|
-
{ position: 2, field: 'razaosocial', header: 'Razão social', width: '50%', centralize: false, sortable: false },
|
|
24
|
-
],
|
|
25
|
-
actions: [
|
|
26
|
-
{
|
|
27
|
-
label: 'Acessar',
|
|
28
|
-
icon: 'login',
|
|
29
|
-
tooltip: 'Acessar Empresa',
|
|
30
|
-
command: () => {
|
|
31
|
-
this.selecionarEmpresa(this.empresaSelecionada);
|
|
32
|
-
},
|
|
33
|
-
disabled: () => {
|
|
34
|
-
return false;
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
actionsLote: [],
|
|
39
|
-
enableCation: true,
|
|
40
|
-
enableFilter: true,
|
|
41
|
-
enableSelect: false,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
doubleClick(e) {
|
|
45
|
-
this.empresaSelecionada = e.rowData;
|
|
46
|
-
this.selecionarEmpresa(this.empresaSelecionada);
|
|
47
|
-
}
|
|
48
|
-
paginate(event) {
|
|
49
|
-
this.onPaginate.emit(event);
|
|
50
|
-
}
|
|
51
11
|
selecionarEmpresa(empresa) {
|
|
52
12
|
this.empresaSelecionada = empresa;
|
|
53
13
|
this.onEmpresaSelecionada.emit(this.empresaSelecionada);
|
|
54
14
|
}
|
|
55
15
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: WorkspaceEmpresaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
56
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
16
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: WorkspaceEmpresaComponent, selector: "kv-workspace-empresa", inputs: { empresas: "empresas", empresaSelecionada: "empresaSelecionada", totalEmpresas: "totalEmpresas" }, outputs: { onEmpresaSelecionada: "onEmpresaSelecionada", onPaginate: "onPaginate" }, ngImport: i0, template: "<div class=\"flex flex-column px-2 overflow-y-auto max-h-24rem cards-container gap-1\">\r\n\r\n @for(empresa of empresas; track $index) {\r\n <div\r\n class=\"grid formgrid flex-row flex-nowrap p-fluid gap-2 p-0 m-0 align-items-center option-box px-1\"\r\n (onClick)=\"selecionarEmpresa(empresa)\"\r\n >\r\n <span class=\"p-0 col-3 my-2 text-xs text-truncate text-no-wrap\">{{\r\n empresa.cpfcnpj\r\n }}</span>\r\n <span class=\"p-0 col-8 text-xs text-truncate text-no-wrap\">{{\r\n empresa.razaosocial\r\n }}</span>\r\n\r\n <div class=\"p-0 col flex justify-content-end\">\r\n <div class=\" icon-box\">\r\n <kv-icon\r\n [size]=\"'small'\"\r\n [name]=\"'arrow_forward_ios'\"\r\n ></kv-icon>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".text-no-wrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.option-box{border-bottom:solid 1px #eeeeee;transition:all .2s}.option-box:hover{cursor:pointer;background-color:rgba(var(--kv-color-system),.05)}.option-box:active{background-color:rgba(var(--kv-color-system),.125)}.icon-box{border:1px solid rgba(var(--kv-color-system),.1);border-radius:.5rem;padding:.25rem}.icon-box:hover{cursor:pointer;opacity:.8}\n", ":host{overflow:hidden}.cards-container{overflow-x:hidden;transition:all .2s}.cards-container::-webkit-scrollbar{width:6px}.cards-container::-webkit-scrollbar:hover{background-color:rgba(var(--kv-secondary-color),.75)}.cards-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}.cards-container:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:rgba(var(--kv-secondary-color),.75)}.cards-container::-webkit-scrollbar-track{border-left:2px solid white;background-color:rgba(var(--kv-secondary-color),.15)}.voltar-box{display:flex;flex-direction:row;align-items:center;gap:.5rem;cursor:pointer;padding:.5rem;transition:all .2s}.voltar-box:hover{opacity:.8}.voltar-box:active{opacity:.9}.link{color:rgba(var(--kv-secondary-color),.9);text-decoration:none;cursor:pointer}.link:active{color:rgba(var(--kv-secondary-color),1)}\n"], dependencies: [{ kind: "component", type: i1.KvIconComponent, selector: "kv-icon", inputs: ["name", "size", "numNotifications", "img", "clickable"], outputs: ["onClick"] }] }); }
|
|
57
17
|
}
|
|
58
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: WorkspaceEmpresaComponent, decorators: [{
|
|
59
19
|
type: Component,
|
|
60
|
-
args: [{ selector: 'kv-workspace-empresa', template: "<
|
|
20
|
+
args: [{ selector: 'kv-workspace-empresa', template: "<div class=\"flex flex-column px-2 overflow-y-auto max-h-24rem cards-container gap-1\">\r\n\r\n @for(empresa of empresas; track $index) {\r\n <div\r\n class=\"grid formgrid flex-row flex-nowrap p-fluid gap-2 p-0 m-0 align-items-center option-box px-1\"\r\n (onClick)=\"selecionarEmpresa(empresa)\"\r\n >\r\n <span class=\"p-0 col-3 my-2 text-xs text-truncate text-no-wrap\">{{\r\n empresa.cpfcnpj\r\n }}</span>\r\n <span class=\"p-0 col-8 text-xs text-truncate text-no-wrap\">{{\r\n empresa.razaosocial\r\n }}</span>\r\n\r\n <div class=\"p-0 col flex justify-content-end\">\r\n <div class=\" icon-box\">\r\n <kv-icon\r\n [size]=\"'small'\"\r\n [name]=\"'arrow_forward_ios'\"\r\n ></kv-icon>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".text-no-wrap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.option-box{border-bottom:solid 1px #eeeeee;transition:all .2s}.option-box:hover{cursor:pointer;background-color:rgba(var(--kv-color-system),.05)}.option-box:active{background-color:rgba(var(--kv-color-system),.125)}.icon-box{border:1px solid rgba(var(--kv-color-system),.1);border-radius:.5rem;padding:.25rem}.icon-box:hover{cursor:pointer;opacity:.8}\n", ":host{overflow:hidden}.cards-container{overflow-x:hidden;transition:all .2s}.cards-container::-webkit-scrollbar{width:6px}.cards-container::-webkit-scrollbar:hover{background-color:rgba(var(--kv-secondary-color),.75)}.cards-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}.cards-container:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:rgba(var(--kv-secondary-color),.75)}.cards-container::-webkit-scrollbar-track{border-left:2px solid white;background-color:rgba(var(--kv-secondary-color),.15)}.voltar-box{display:flex;flex-direction:row;align-items:center;gap:.5rem;cursor:pointer;padding:.5rem;transition:all .2s}.voltar-box:hover{opacity:.8}.voltar-box:active{opacity:.9}.link{color:rgba(var(--kv-secondary-color),.9);text-decoration:none;cursor:pointer}.link:active{color:rgba(var(--kv-secondary-color),1)}\n"] }]
|
|
61
21
|
}], ctorParameters: () => [], propDecorators: { empresas: [{
|
|
62
22
|
type: Input
|
|
63
23
|
}], empresaSelecionada: [{
|
|
@@ -69,4 +29,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
69
29
|
}], onPaginate: [{
|
|
70
30
|
type: Output
|
|
71
31
|
}] } });
|
|
72
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3Ytd29ya3NwYWNlLWVtcHJlc2EuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2Vldm8tY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMva3Ytd29ya3NwYWNlL2VtcHJlc2Eva3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@@ import { PrimeNgModule } from '../../api/modules/primeng.module';
|
|
|
11
11
|
import { KvButtonsModule } from '../kv-buttons/kv-button.module';
|
|
12
12
|
import { KvTableModule } from '../kv-table/kv-table.module';
|
|
13
13
|
import { KvButtonModule } from "../kv-button/kv-button.module";
|
|
14
|
+
import { KvInputsModule } from '../kv-inputs/kv-inputs.module';
|
|
15
|
+
import { KvIconModule } from "../kv-icon/kv-icon.module";
|
|
14
16
|
import * as i0 from "@angular/core";
|
|
15
17
|
export class KvWorkspaceModule {
|
|
16
18
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvWorkspaceModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -25,7 +27,9 @@ export class KvWorkspaceModule {
|
|
|
25
27
|
FormsModule,
|
|
26
28
|
KvButtonsModule,
|
|
27
29
|
KvTableModule,
|
|
28
|
-
KvButtonModule
|
|
30
|
+
KvButtonModule,
|
|
31
|
+
KvInputsModule,
|
|
32
|
+
KvIconModule], exports: [WorkspaceComponent] }); }
|
|
29
33
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvWorkspaceModule, imports: [CommonModule,
|
|
30
34
|
PrimeNgModule,
|
|
31
35
|
ReactiveFormsModule,
|
|
@@ -34,7 +38,9 @@ export class KvWorkspaceModule {
|
|
|
34
38
|
FormsModule,
|
|
35
39
|
KvButtonsModule,
|
|
36
40
|
KvTableModule,
|
|
37
|
-
KvButtonModule
|
|
41
|
+
KvButtonModule,
|
|
42
|
+
KvInputsModule,
|
|
43
|
+
KvIconModule] }); }
|
|
38
44
|
}
|
|
39
45
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: KvWorkspaceModule, decorators: [{
|
|
40
46
|
type: NgModule,
|
|
@@ -57,8 +63,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
57
63
|
FormsModule,
|
|
58
64
|
KvButtonsModule,
|
|
59
65
|
KvTableModule,
|
|
60
|
-
KvButtonModule
|
|
66
|
+
KvButtonModule,
|
|
67
|
+
KvInputsModule,
|
|
68
|
+
KvIconModule
|
|
61
69
|
]
|
|
62
70
|
}]
|
|
63
71
|
}] });
|
|
64
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3Ytd29ya3NwYWNlLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2tlZXZvLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2t2LXdvcmtzcGFjZS9rdi13b3Jrc3BhY2UubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQzFELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUUvQyxPQUFPLEVBQ0gsV0FBVyxFQUNYLG1CQUFtQixFQUN0QixNQUFNLGdCQUFnQixDQUFDO0FBRXhCLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFFaEUsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sb0NBQW9DLENBQUM7QUFDM0UsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sb0NBQW9DLENBQUM7QUFDeEUsT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sMENBQTBDLENBQUM7QUFDckYsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sd0NBQXdDLENB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yTW9kdWxlLFxyXG4gICAgICAgIEF1dG9Db21wbGV0ZU1vZHVsZSxcclxuICAgICAgICBGb3Jtc01vZHVsZSxcclxuICAgICAgICBLdkJ1dHRvbnNNb2R1bGUsXHJcbiAgICAgICAgS3ZUYWJsZU1vZHVsZSxcclxuICAgICAgICBLdkJ1dHRvbk1vZHVsZSxcclxuICAgICAgICBLdklucHV0c01vZHVsZSxcclxuICAgICAgICBLdkljb25Nb2R1bGVcclxuICAgIF1cclxufSlcclxuZXhwb3J0IGNsYXNzIEt2V29ya3NwYWNlTW9kdWxlIHsgfVxyXG4iXX0=
|
|
@@ -1,13 +1,28 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
1
|
+
import { Component, computed, EventEmitter, inject, input, Input, Output, signal } from '@angular/core';
|
|
2
|
+
import { CpfCnpjPipe } from '../../../api/pipes/cpfcnpj.pipe';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "../../kv-table/kv-table.component";
|
|
4
4
|
export class WorkspaceMasterComponent {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.dataSource = [];
|
|
7
7
|
this.onMasterSelecionada = new EventEmitter();
|
|
8
|
+
this.emptyText = input('Nenhum resultado encontrado');
|
|
9
|
+
this.widthScreen = signal(window.innerWidth);
|
|
10
|
+
this.cpfCnpjPipe = inject(CpfCnpjPipe);
|
|
11
|
+
this.isEmpresa = computed(() => (cpfCnpj) => {
|
|
12
|
+
return cpfCnpj.length > 11;
|
|
13
|
+
});
|
|
14
|
+
this.transformRazaoSocial = computed(() => (razaosocial) => {
|
|
15
|
+
return razaosocial.length > 72 ? `${razaosocial.substring(0, 72)}...` : razaosocial;
|
|
16
|
+
});
|
|
17
|
+
this.transformCpfCnpj = computed(() => (cpfCnpj) => {
|
|
18
|
+
return this.cpfCnpjPipe.transform(cpfCnpj);
|
|
19
|
+
});
|
|
8
20
|
}
|
|
9
21
|
ngOnInit() {
|
|
10
22
|
this.configTable();
|
|
23
|
+
window.addEventListener('resize', () => {
|
|
24
|
+
this.widthScreen.set(window.innerWidth);
|
|
25
|
+
});
|
|
11
26
|
}
|
|
12
27
|
activeItem(e) {
|
|
13
28
|
this.masterSelecionada = e;
|
|
@@ -48,11 +63,11 @@ export class WorkspaceMasterComponent {
|
|
|
48
63
|
this.onMasterSelecionada.emit(this.masterSelecionada);
|
|
49
64
|
}
|
|
50
65
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: WorkspaceMasterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
51
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
66
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.8", type: WorkspaceMasterComponent, selector: "kv-workspace-master", inputs: { masters: { classPropertyName: "masters", publicName: "masters", isSignal: false, isRequired: false, transformFunction: null }, masterSelecionada: { classPropertyName: "masterSelecionada", publicName: "masterSelecionada", isSignal: false, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onMasterSelecionada: "onMasterSelecionada" }, ngImport: i0, template: "<div\r\n class=\"grid m-0 border-round-lg gap-2 p-2 {{\r\n (this.masters.length > 6 || this.widthScreen() < 992) &&\r\n 'overflow-y-auto'\r\n }} max-h-24rem cards-container\"\r\n>\r\n @for(master of this.masters; track $index) {\r\n <div\r\n class=\"{{\r\n $index % 2 == 0 ? 'sm:col-6 col-12' : 'sm:col col-12'\r\n }} p-0 card-option\"\r\n (click)=\"selecionarMaster(master)\"\r\n >\r\n <div class=\"flex flex-column p-3 gap-1\">\r\n <div class=\"flex flex-row align-items-center gap-1 font-semibold mb-2\">\r\n <span class=\"material-symbols-outlined text-md\"> article </span>\r\n <span class=\"text-sm\">{{ master.idmaster }}</span>\r\n </div>\r\n\r\n <span style=\"word-break: break-word font-medium\" class=\"text-sm\">{{\r\n transformRazaoSocial()(master.nome)\r\n }}</span>\r\n\r\n <div class=\"flex flex-row align-items-center gap-1 font-semibold\">\r\n <span class=\"text-xs\">{{\r\n isEmpresa()(master.cpfcnpj) ? \"CNPJ:\" : \"CPF:\"\r\n }}</span>\r\n <span class=\"text-xs\">{{ transformCpfCnpj()(master.cpfcnpj) }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n } @if(this.masters.length == 0) {\r\n <p>{{ emptyText() }}</p>\r\n }\r\n</div>\r\n", styles: [".card-option{background-color:#fff;border-radius:.5rem;border:1px solid #eaeaea;height:7.5rem;overflow:hidden;transition:all .2s ease-in-out;cursor:pointer}.card-option:hover{border:1px solid #581999;background-color:#d0b3dd4d}.card-option:hover span{color:#581999}.card-option:active{background-color:#d0b3dd99}span{color:#64748b}\n", ":host{overflow:hidden}.cards-container{overflow-x:hidden;transition:all .2s}.cards-container::-webkit-scrollbar{width:6px}.cards-container::-webkit-scrollbar:hover{background-color:rgba(var(--kv-secondary-color),.75)}.cards-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}.cards-container:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:rgba(var(--kv-secondary-color),.75)}.cards-container::-webkit-scrollbar-track{border-left:2px solid white;background-color:rgba(var(--kv-secondary-color),.15)}.voltar-box{display:flex;flex-direction:row;align-items:center;gap:.5rem;cursor:pointer;padding:.5rem;transition:all .2s}.voltar-box:hover{opacity:.8}.voltar-box:active{opacity:.9}.link{color:rgba(var(--kv-secondary-color),.9);text-decoration:none;cursor:pointer}.link:active{color:rgba(var(--kv-secondary-color),1)}\n"] }); }
|
|
52
67
|
}
|
|
53
68
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: WorkspaceMasterComponent, decorators: [{
|
|
54
69
|
type: Component,
|
|
55
|
-
args: [{ selector: 'kv-workspace-master', template: "<
|
|
70
|
+
args: [{ selector: 'kv-workspace-master', template: "<div\r\n class=\"grid m-0 border-round-lg gap-2 p-2 {{\r\n (this.masters.length > 6 || this.widthScreen() < 992) &&\r\n 'overflow-y-auto'\r\n }} max-h-24rem cards-container\"\r\n>\r\n @for(master of this.masters; track $index) {\r\n <div\r\n class=\"{{\r\n $index % 2 == 0 ? 'sm:col-6 col-12' : 'sm:col col-12'\r\n }} p-0 card-option\"\r\n (click)=\"selecionarMaster(master)\"\r\n >\r\n <div class=\"flex flex-column p-3 gap-1\">\r\n <div class=\"flex flex-row align-items-center gap-1 font-semibold mb-2\">\r\n <span class=\"material-symbols-outlined text-md\"> article </span>\r\n <span class=\"text-sm\">{{ master.idmaster }}</span>\r\n </div>\r\n\r\n <span style=\"word-break: break-word font-medium\" class=\"text-sm\">{{\r\n transformRazaoSocial()(master.nome)\r\n }}</span>\r\n\r\n <div class=\"flex flex-row align-items-center gap-1 font-semibold\">\r\n <span class=\"text-xs\">{{\r\n isEmpresa()(master.cpfcnpj) ? \"CNPJ:\" : \"CPF:\"\r\n }}</span>\r\n <span class=\"text-xs\">{{ transformCpfCnpj()(master.cpfcnpj) }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n } @if(this.masters.length == 0) {\r\n <p>{{ emptyText() }}</p>\r\n }\r\n</div>\r\n", styles: [".card-option{background-color:#fff;border-radius:.5rem;border:1px solid #eaeaea;height:7.5rem;overflow:hidden;transition:all .2s ease-in-out;cursor:pointer}.card-option:hover{border:1px solid #581999;background-color:#d0b3dd4d}.card-option:hover span{color:#581999}.card-option:active{background-color:#d0b3dd99}span{color:#64748b}\n", ":host{overflow:hidden}.cards-container{overflow-x:hidden;transition:all .2s}.cards-container::-webkit-scrollbar{width:6px}.cards-container::-webkit-scrollbar:hover{background-color:rgba(var(--kv-secondary-color),.75)}.cards-container::-webkit-scrollbar-thumb{border-radius:4px;background-color:transparent}.cards-container:hover::-webkit-scrollbar-thumb{border-left:2px solid white;background-color:rgba(var(--kv-secondary-color),.75)}.cards-container::-webkit-scrollbar-track{border-left:2px solid white;background-color:rgba(var(--kv-secondary-color),.15)}.voltar-box{display:flex;flex-direction:row;align-items:center;gap:.5rem;cursor:pointer;padding:.5rem;transition:all .2s}.voltar-box:hover{opacity:.8}.voltar-box:active{opacity:.9}.link{color:rgba(var(--kv-secondary-color),.9);text-decoration:none;cursor:pointer}.link:active{color:rgba(var(--kv-secondary-color),1)}\n"] }]
|
|
56
71
|
}], ctorParameters: () => [], propDecorators: { masters: [{
|
|
57
72
|
type: Input
|
|
58
73
|
}], masterSelecionada: [{
|
|
@@ -60,4 +75,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
|
|
|
60
75
|
}], onMasterSelecionada: [{
|
|
61
76
|
type: Output
|
|
62
77
|
}] } });
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia3Ytd29ya3NwYWNlLW1hc3Rlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9rZWV2by1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9rdi13b3Jrc3BhY2UvbWFzdGVyL2t2LXdvcmtzcGFjZS1tYXN0ZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2Vldm8tY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMva3Ytd29ya3NwYWNlL21hc3Rlci9rdi13b3Jrc3BhY2UtbWFzdGVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsUUFBUSxFQUNSLFlBQVksRUFDWixNQUFNLEVBQ04sS0FBSyxFQUNMLEtBQUssRUFFTCxNQUFNLEVBQ04sTUFBTSxFQUNQLE1BQU0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