tnx-shared 5.3.242 → 5.3.244

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, InjectionToken, Optional, Inject, Injector, Directive, Input, ViewChild, EventEmitter, Component, ContentChildren, TemplateRef, Output, ComponentFactoryResolver, ApplicationRef, ElementRef, isDevMode, ViewChildren, ContentChild, ViewContainerRef, ChangeDetectorRef, Pipe, LOCALE_ID, forwardRef, NgZone, HostListener, ChangeDetectionStrategy, ViewEncapsulation, NgModuleFactory, Compiler, Renderer2, NgModule } from '@angular/core';
2
+ import { Injectable, InjectionToken, Optional, Inject, Injector, Directive, Input, ViewChild, EventEmitter, Component, ContentChildren, TemplateRef, Output, ComponentFactoryResolver, ApplicationRef, ElementRef, isDevMode, ViewChildren, ContentChild, ViewContainerRef, ChangeDetectorRef, Pipe, LOCALE_ID, forwardRef, NgZone, HostListener, ChangeDetectionStrategy, ViewEncapsulation, NgModuleFactory, Compiler, Renderer2, IterableDiffers, NgModule } from '@angular/core';
3
3
  import { Subject, ReplaySubject, forkJoin, from, combineLatest } from 'rxjs';
4
4
  import { takeUntil, catchError, shareReplay, retry, map, mergeMap, debounceTime, distinctUntilChanged, distinct } from 'rxjs/operators';
5
5
  import { __awaiter } from 'tslib';
@@ -15,7 +15,7 @@ import * as i4 from 'angular-oauth2-oidc';
15
15
  import { OAuthService, OAuthModule } from 'angular-oauth2-oidc';
16
16
  import { TranslateService, TranslateModule, TranslateLoader } from '@ngx-translate/core';
17
17
  import * as i1 from 'tn-custom-primeng/api';
18
- import { MessageService, ConfirmationService } from 'tn-custom-primeng/api';
18
+ import { MessageService, ConfirmationService, PrimeTemplate, SharedModule } from 'tn-custom-primeng/api';
19
19
  import * as i3$1 from '@angular/router';
20
20
  import { ActivatedRoute, Router } from '@angular/router';
21
21
  import * as signalR from '@aspnet/signalr';
@@ -44,12 +44,11 @@ import { NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
44
44
  import { OverlayPanelModule } from 'tn-custom-primeng/overlaypanel';
45
45
  import { SidebarModule } from 'tn-custom-primeng/sidebar';
46
46
  import { DialogModule } from 'tn-custom-primeng/dialog';
47
- import { DomHandler } from 'tn-custom-primeng/dom';
47
+ import { DomHandler, ConnectedOverlayScrollHandler } from 'tn-custom-primeng/dom';
48
48
  import { AngularSplitModule } from 'angular-split';
49
49
  import { CurrencyMaskModule } from 'ng2-currency-mask';
50
50
  import { DndModule } from 'ngx-drag-drop';
51
51
  import { AccordionModule } from 'tn-custom-primeng/accordion';
52
- import { AutoCompleteModule } from 'tn-custom-primeng/autocomplete';
53
52
  import { BlockUIModule } from 'tn-custom-primeng/blockui';
54
53
  import { BreadcrumbModule } from 'tn-custom-primeng/breadcrumb';
55
54
  import { ButtonModule } from 'tn-custom-primeng/button';
@@ -86,8 +85,10 @@ import { TreeModule } from 'tn-custom-primeng/tree';
86
85
  import { TriStateCheckboxModule } from 'tn-custom-primeng/tristatecheckbox';
87
86
  import { trigger, transition, style, animate } from '@angular/animations';
88
87
  import { toCanvas } from 'qrcode';
89
- import { nanoid } from 'nanoid';
90
88
  import { DragDropModule } from 'tn-custom-primeng/dragdrop';
89
+ import { RippleModule } from 'tn-custom-primeng/ripple';
90
+ import { UniqueComponentId, ObjectUtils } from 'tn-custom-primeng/utils';
91
+ import { nanoid } from 'nanoid';
91
92
 
92
93
  class ComCtxConstants {
93
94
  }
@@ -37892,7 +37893,7 @@ class EntityPickerDataComponent extends DataListBase {
37892
37893
  EntityPickerDataComponent.decorators = [
37893
37894
  { type: Component, args: [{
37894
37895
  selector: 'app-entity-picker-data',
37895
- template: "<crud-list #crudList [menuButtons]=\"getMenuButtons\" [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"\n [showScrollHorizontal]=\"true\" (onContentInit)=\"onContentInit.emit($event)\" (onReload)=\"_triggerProcessData($event)\"\n (onAdd)=\"_add($event)\" (onRowSelect)=\"handleRowSelect($event)\" (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\"\n (onDelete)=\"_delete($event)\" (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\">\n <ng-template #toolbar let-crudList=\"crudList\" let-selectedItems=\"selectedItems\">\n <button *ngIf=\"!isSingleSelection && model.dataSource.length > 0\" type=\"button\" pButton pRipple\n label=\"L\u1EA5y t\u1EA5t c\u1EA3 ({{model.dataSource.length}})\" icon=\"pi pi-angle-double-right\"\n class=\"p-button-text p-button-success\" (click)=\"pickAll()\"></button>\n <button *ngIf=\"!isSingleSelection && selectedItems.length > 0\" type=\"button\" pButton pRipple\n label=\"L\u1EA5y m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{selectedItems.length}})\" icon=\"pi pi-angle-right\"\n class=\"p-button-text p-button-success\" (click)=\"pickSelected(selectedItems)\"></button>\n <button *ngIf=\"datasourceFieldFilter.length\" type=\"button\" pButton pRipple label=\"T\u00ECm ki\u1EBFm nhi\u1EC1u ng\u01B0\u1EDDi d\u00F9ng\"\n icon=\"pi pi-search\" class=\"p-button-text p-button-primary\" (click)=\"handleAdvansearch()\"></button>\n <button *ngIf=\"datasourceFieldFilter.length && searchData\" type=\"button\" pButton pRipple\n label=\"X\u00F3a danh s\u00E1ch t\u00ECm ki\u1EBFm\" pTooltip=\"X\u00F3a t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng \u1EDF Danh s\u00E1ch t\u00ECm ki\u1EBFm\" icon=\"pi pi-times\"\n class=\"p-button-text p-button-primary\" (click)=\"handleSearch(null)\"></button>\n </ng-template>\n <ng-template let-crudList=\"crudList\" #function let-rowData=\"rowData\">\n <button pButton type=\"button\" class=\"link-or-action p-button-success p-button-text p-button-rounded\"\n icon=\"pi pi-check\" pTooltip=\"Ch\u1ECDn m\u1EE5c n\u00E0y\" tooltipPosition=\"top\" [disabled]=\"rowData.disabled\"\n (click)=\"pickEntity(rowData)\"></button>\n </ng-template>\n</crud-list>\n\n\n<tn-dialog *ngIf=\"showFormAdvancedSearch\" #dialog [styleClass]=\"'address-form'\" [header]=\"'T\u00ECm ki\u1EBFm nhi\u1EC1u ng\u01B0\u1EDDi d\u00F9ng'\"\n [popupSize]=\"popupSizeSearchForm\" [maskClass]=\"setting.maskClass\" (onHide)=\"showFormAdvancedSearch = false\">\n <entity-picker-search-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [parentSetting]=\"setting\"\n [datasourceFieldFilter]=\"datasourceFieldFilter\" [lstDataNotExist]=\"lstDataNotExist\" [model]=\"formModel\"\n (onSearch)=\"handleSearch($event)\" (onCancel)=\"showFormAdvancedSearch = false;\">\n </entity-picker-search-form>\n</tn-dialog>",
37896
+ template: "<crud-list #crudList [menuButtons]=\"getMenuButtons\" [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"\n [showScrollHorizontal]=\"true\" (onContentInit)=\"onContentInit.emit($event)\" (onReload)=\"_triggerProcessData($event)\"\n (onAdd)=\"_add($event)\" (onRowSelect)=\"handleRowSelect($event)\" (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\"\n (onDelete)=\"_delete($event)\" (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\">\n <ng-template #toolbar let-crudList=\"crudList\" let-selectedItems=\"selectedItems\">\n <button *ngIf=\"!model.dataSource.length && setting.hiddenAdvanceSearch\" pButton\n style=\"visibility: hidden\"></button>\n <button *ngIf=\"!isSingleSelection && model.dataSource.length > 0\" type=\"button\" pButton pRipple\n label=\"L\u1EA5y t\u1EA5t c\u1EA3 ({{model.dataSource.length}})\" icon=\"pi pi-angle-double-right\"\n class=\"p-button-text p-button-success\" [disabled]=\"model.loading\" (click)=\"pickAll()\"></button>\n <button *ngIf=\"!isSingleSelection && selectedItems.length > 0\" type=\"button\" pButton pRipple\n label=\"L\u1EA5y m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{selectedItems.length}})\" icon=\"pi pi-angle-right\"\n class=\"p-button-text p-button-success\" [disabled]=\"model.loading\" (click)=\"pickSelected(selectedItems)\"></button>\n <button *ngIf=\"datasourceFieldFilter.length\" type=\"button\" pButton pRipple label=\"T\u00ECm ki\u1EBFm nhi\u1EC1u ng\u01B0\u1EDDi d\u00F9ng\"\n icon=\"pi pi-search\" class=\"p-button-text p-button-primary\" [disabled]=\"model.loading\" (click)=\"handleAdvansearch()\"></button>\n <button *ngIf=\"datasourceFieldFilter.length && searchData\" type=\"button\" pButton pRipple\n label=\"X\u00F3a danh s\u00E1ch t\u00ECm ki\u1EBFm\" pTooltip=\"X\u00F3a t\u1EA5t c\u1EA3 ng\u01B0\u1EDDi d\u00F9ng \u1EDF Danh s\u00E1ch t\u00ECm ki\u1EBFm\" icon=\"pi pi-times\"\n class=\"p-button-text p-button-primary\" [disabled]=\"model.loading\" (click)=\"handleSearch(null)\"></button>\n </ng-template>\n <ng-template let-crudList=\"crudList\" #function let-rowData=\"rowData\">\n <button pButton type=\"button\" class=\"link-or-action p-button-success p-button-text p-button-rounded\"\n icon=\"pi pi-check\" pTooltip=\"Ch\u1ECDn m\u1EE5c n\u00E0y\" tooltipPosition=\"top\" [disabled]=\"rowData.disabled\"\n (click)=\"pickEntity(rowData)\"></button>\n </ng-template>\n</crud-list>\n\n\n<tn-dialog *ngIf=\"showFormAdvancedSearch\" #dialog [styleClass]=\"'address-form'\" [header]=\"'T\u00ECm ki\u1EBFm nhi\u1EC1u ng\u01B0\u1EDDi d\u00F9ng'\"\n [popupSize]=\"popupSizeSearchForm\" [maskClass]=\"setting.maskClass\" (onHide)=\"showFormAdvancedSearch = false\">\n <entity-picker-search-form #formBase [parentModel]=\"model\" [parentContext]=\"context\" [parentSetting]=\"setting\"\n [datasourceFieldFilter]=\"datasourceFieldFilter\" [lstDataNotExist]=\"lstDataNotExist\" [model]=\"formModel\"\n (onSearch)=\"handleSearch($event)\" (onCancel)=\"showFormAdvancedSearch = false;\">\n </entity-picker-search-form>\n</tn-dialog>",
37896
37897
  providers: [ComponentContextService],
37897
37898
  styles: ["::ng-deep app-entity-picker-data .custom-card{padding:.5em!important}"]
37898
37899
  },] }
@@ -38020,6 +38021,7 @@ class EntityPickerSelectedComponent extends DataListBase {
38020
38021
  this._value = this._selectedValue.map(item => item[this.control.valueField]);
38021
38022
  if (this._value.length == 0) {
38022
38023
  this.itemCanDeletes = [];
38024
+ this.model.selectedItems = [];
38023
38025
  }
38024
38026
  }
38025
38027
  else {
@@ -38029,6 +38031,7 @@ class EntityPickerSelectedComponent extends DataListBase {
38029
38031
  else {
38030
38032
  this._value = null;
38031
38033
  this.itemCanDeletes = [];
38034
+ this.model.selectedItems = [];
38032
38035
  }
38033
38036
  }
38034
38037
  modifyGridInfo(gridInfo) {
@@ -38103,7 +38106,7 @@ EntityPickerSelectedComponent.decorators = [
38103
38106
  { type: Component, args: [{
38104
38107
  // tslint:disable-next-line: component-selector
38105
38108
  selector: 'app-entity-picker-selected',
38106
- template: "<crud-list #crudList [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\" [showScrollHorizontal]=\"true\"\n (onContentInit)=\"onContentInit.emit($event)\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"_add($event)\"\n (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\">\n\n <ng-template #toolbar let-crudList=\"crudList\" let-selectedItems=\"selectedItems\">\n <button *ngIf=\"!model.dataSource.length && setting.hiddenAdvanceSearch\" pButton\n style=\"visibility: hidden\"></button>\n <button *ngIf=\"itemCanDeletes.length\" type=\"button\" pButton pRipple\n label=\"B\u1ECF t\u1EA5t c\u1EA3 ({{itemCanDeletes.length}})\" icon=\"pi pi-angle-double-left\"\n class=\"p-button-text p-button-danger\" (click)=\"unPickAll()\"></button>\n <button *ngIf=\"selectedItems.length > 0\" type=\"button\" pButton pRipple\n label=\"B\u1ECF m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{selectedItems.length}})\" icon=\"pi pi-angle-left\"\n class=\"p-button-text p-button-danger\" (click)=\"unPickSelected(selectedItems)\"></button>\n </ng-template>\n\n <ng-template let-crudList=\"crudList\" #function let-rowData=\"rowData\">\n <button *ngIf=\"!rowData.hiddenDelete\" pButton type=\"button\"\n class=\"link-or-action p-button-danger p-button-text p-button-rounded\" icon=\"pi pi-times\"\n pTooltip=\"B\u1ECF ch\u1ECDn m\u1EE5c n\u00E0y\" tooltipPosition=\"top\" (click)=\"unPickEntity(rowData)\"></button>\n </ng-template>\n\n</crud-list>",
38109
+ template: "<crud-list #crudList [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\" [showScrollHorizontal]=\"true\"\n (onContentInit)=\"onContentInit.emit($event)\" (onReload)=\"_triggerProcessData($event)\" (onAdd)=\"_add($event)\"\n (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_unmarkLoading()\">\n\n <ng-template #toolbar let-crudList=\"crudList\" let-selectedItems=\"selectedItems\">\n <button *ngIf=\"!model.dataSource.length && setting.hiddenAdvanceSearch\" pButton\n style=\"visibility: hidden\"></button>\n <button *ngIf=\"itemCanDeletes.length\" type=\"button\" pButton pRipple\n label=\"B\u1ECF t\u1EA5t c\u1EA3 ({{itemCanDeletes.length}})\" icon=\"pi pi-angle-double-left\"\n class=\"p-button-text p-button-danger\" [disabled]=\"model.loading\" (click)=\"unPickAll()\"></button>\n <button *ngIf=\"selectedItems.length > 0\" type=\"button\" pButton pRipple\n label=\"B\u1ECF m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{selectedItems.length}})\" icon=\"pi pi-angle-left\"\n class=\"p-button-text p-button-danger\" [disabled]=\"model.loading\" (click)=\"unPickSelected(selectedItems)\"></button>\n </ng-template>\n\n <ng-template let-crudList=\"crudList\" #function let-rowData=\"rowData\">\n <button *ngIf=\"!rowData.hiddenDelete\" pButton type=\"button\"\n class=\"link-or-action p-button-danger p-button-text p-button-rounded\" icon=\"pi pi-times\"\n pTooltip=\"B\u1ECF ch\u1ECDn m\u1EE5c n\u00E0y\" tooltipPosition=\"top\" (click)=\"unPickEntity(rowData)\"></button>\n </ng-template>\n\n</crud-list>",
38107
38110
  providers: [ComponentContextService],
38108
38111
  styles: ["::ng-deep app-entity-picker-selected .custom-card{padding:.5em .5em 0!important}"]
38109
38112
  },] }
@@ -38800,7 +38803,7 @@ AutoCompletePickerComponent.decorators = [
38800
38803
  { type: Component, args: [{
38801
38804
  // tslint:disable-next-line: component-selector
38802
38805
  selector: 'autocomplete-picker',
38803
- template: "<div class=\"p-inputgroup autocomplete-picker\" *ngIf=\"control\" [class.has-value]=\"hasValue\"\n [class.multiple]=\"control.multiple\" [class.disabled]=\"control.disabled\">\n <div style=\"width: calc(100% - 28px)\" [pTooltip]=\"tooltip\" tooltipPosition=\"top\">\n <p-autoComplete #autoComplete emptyMessage=\"Kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 n\u00E0o\" [ngClass]=\"'custom-autocomplete'\"\n [disabled]=\"disabled\" [placeholder]=\"control.placeholder\" [appendTo]=\"control.appendTo\"\n [suggestions]=\"results\" field=\"label\" [styleClass]=\"control.validators && control.required ? 'rq' : ''\"\n [multiple]=\"control.multiple\" [minLength]=\"2\" [(ngModel)]=\"selectedValueObject\"\n (onFocus)=\"handleFocus($event)\" (onBlur)=\"handleBlur($event)\" (completeMethod)=\"search($event)\"\n (onKeyUp)=\"handleKeyUp($event)\" (onSelect)=\"handleSelect($event)\" (onUnselect)=\"handleUnSelect($event)\">\n </p-autoComplete>\n </div>\n <span *ngIf=\"!control.multiple && !disabled && hasValue\" class=\"icon-clear\" (click)=\"clearValue()\"><i\n class=\"fas fa-times\"></i></span>\n <button class=\"custom-autocomplete-button\" *ngIf=\"control.usePicker\" [disabled]=\"disabled\" tabindex=\"-1\"\n (click)=\"showPickForm()\" pButton [pTooltip]=\"control.title\" icon=\"fas fa-external-link-alt\"\n type=\"button\"></button>\n</div>\n<tn-dialog #dialog *ngIf=\"showFormPicker\" styleClass=\"entity-picker-box-dialog no-padding\" [useDefaultScrollBar]=\"true\"\n [header]=\"control.title | translate\" [popupSize]=\"popupSize\" (onHide)=\"handleHide($event)\">\n <entity-picker-box #entityPickerBox [currentNode]=\"currentNode\" [control]=\"control\" [parentSetting]=\"setting\" [datasourceFieldFilter]=\"datasourceFieldFilter\"\n [advanceData]=\"advanceData\" [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\"\n (onContentLeftInit)=\"handleContentLeftInit($event)\" (onContentRightInit)=\"handleContentRightInit($event)\"\n (onChanged)=\"handleChangeEntity($event)\" (onSelect)=\"handleSelectEntity($event)\"\n (onUnSelect)=\"handleUnSelectEntity($event)\" (onDone)=\"handleHide($event)\"\n (onRowSelect)=\"handleRowSelect($event)\">\n </entity-picker-box>\n <ng-template #footer>\n <button type=\" button\" pButton class=\"p-button-text\" (click)=\"onClickSubmitButton($event, entityPickerBox)\"\n [label]=\"'Ho\u00E0n th\u00E0nh' | translate\" icon=\"pi pi-check\"></button>\n </ng-template>\n</tn-dialog>",
38806
+ template: "<div class=\"p-inputgroup autocomplete-picker\" *ngIf=\"control\" [class.has-value]=\"hasValue\"\n [class.multiple]=\"control.multiple\" [class.disabled]=\"control.disabled\">\n <div style=\"width: calc(100% - 28px)\" [pTooltip]=\"tooltip\" tooltipPosition=\"top\">\n <p-autoComplete #autoComplete emptyMessage=\"Kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 n\u00E0o\" [ngClass]=\"'custom-autocomplete'\"\n [disabled]=\"disabled\" [placeholder]=\"control.placeholder\" [appendTo]=\"control.appendTo\" [maxRowItem]=\"2\"\n [suggestions]=\"results\" field=\"label\" [styleClass]=\"control.validators && control.required ? 'rq' : ''\"\n [multiple]=\"control.multiple\" [minLength]=\"2\" [(ngModel)]=\"selectedValueObject\"\n (onFocus)=\"handleFocus($event)\" (onBlur)=\"handleBlur($event)\" (completeMethod)=\"search($event)\"\n (onKeyUp)=\"handleKeyUp($event)\" (onSelect)=\"handleSelect($event)\" (onUnselect)=\"handleUnSelect($event)\">\n </p-autoComplete>\n </div>\n <span *ngIf=\"!control.multiple && !disabled && hasValue\" class=\"icon-clear\" (click)=\"clearValue()\"><i\n class=\"fas fa-times\"></i></span>\n <button class=\"custom-autocomplete-button\" *ngIf=\"control.usePicker\" [disabled]=\"disabled\" tabindex=\"-1\"\n (click)=\"showPickForm()\" pButton [pTooltip]=\"control.title\" icon=\"fas fa-external-link-alt\"\n type=\"button\"></button>\n</div>\n<tn-dialog #dialog *ngIf=\"showFormPicker\" styleClass=\"entity-picker-box-dialog no-padding\" [useDefaultScrollBar]=\"true\"\n [header]=\"control.title | translate\" [popupSize]=\"popupSize\" (onHide)=\"handleHide($event)\">\n <entity-picker-box #entityPickerBox [currentNode]=\"currentNode\" [control]=\"control\" [parentSetting]=\"setting\" [datasourceFieldFilter]=\"datasourceFieldFilter\"\n [advanceData]=\"advanceData\" [readOnlyValues]=\"readOnlyValues\" [selectedValue]=\"selectedValue\"\n (onContentLeftInit)=\"handleContentLeftInit($event)\" (onContentRightInit)=\"handleContentRightInit($event)\"\n (onChanged)=\"handleChangeEntity($event)\" (onSelect)=\"handleSelectEntity($event)\"\n (onUnSelect)=\"handleUnSelectEntity($event)\" (onDone)=\"handleHide($event)\"\n (onRowSelect)=\"handleRowSelect($event)\">\n </entity-picker-box>\n <ng-template #footer>\n <button type=\" button\" pButton class=\"p-button-text\" (click)=\"onClickSubmitButton($event, entityPickerBox)\"\n [label]=\"'Ho\u00E0n th\u00E0nh' | translate\" icon=\"pi pi-check\"></button>\n </ng-template>\n</tn-dialog>",
38804
38807
  providers: [
38805
38808
  {
38806
38809
  provide: NG_VALUE_ACCESSOR,
@@ -42976,6 +42979,1000 @@ ReferenceTextBoxComponent.propDecorators = {
42976
42979
  onInit: [{ type: Output }]
42977
42980
  };
42978
42981
 
42982
+ const AUTOCOMPLETE_VALUE_ACCESSOR = {
42983
+ provide: NG_VALUE_ACCESSOR,
42984
+ useExisting: forwardRef(() => AutoComplete),
42985
+ multi: true
42986
+ };
42987
+ class AutoComplete {
42988
+ constructor(el, renderer, cd, differs) {
42989
+ this.el = el;
42990
+ this.renderer = renderer;
42991
+ this.cd = cd;
42992
+ this.differs = differs;
42993
+ this.minLength = 1;
42994
+ this.delay = 300;
42995
+ this.type = 'text';
42996
+ this.autoZIndex = true;
42997
+ this.baseZIndex = 0;
42998
+ this.dropdownIcon = "pi pi-chevron-down";
42999
+ this.unique = true;
43000
+ this.completeOnFocus = false;
43001
+ this.completeMethod = new EventEmitter();
43002
+ this.onSelect = new EventEmitter();
43003
+ this.onUnselect = new EventEmitter();
43004
+ this.onFocus = new EventEmitter();
43005
+ this.onBlur = new EventEmitter();
43006
+ this.onDropdownClick = new EventEmitter();
43007
+ this.onClear = new EventEmitter();
43008
+ this.onKeyUp = new EventEmitter();
43009
+ this.onShow = new EventEmitter();
43010
+ this.onHide = new EventEmitter();
43011
+ this.scrollHeight = '200px';
43012
+ this.dropdownMode = 'blank';
43013
+ this.showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
43014
+ this.hideTransitionOptions = '.1s linear';
43015
+ this.autocomplete = 'off';
43016
+ this.onModelChange = () => { };
43017
+ this.onModelTouched = () => { };
43018
+ this.showCountItem = false;
43019
+ this.overlayVisible = false;
43020
+ this.focus = false;
43021
+ this.inputFieldValue = null;
43022
+ this.differ = differs.find([]).create(null);
43023
+ this.listId = UniqueComponentId() + '_list';
43024
+ }
43025
+ set maxRowItem(value) {
43026
+ const rowHeight = 27;
43027
+ const padding = 7;
43028
+ this._maxHeighContainerItem = Math.round(value * 30.5) + 7;
43029
+ this._maxHeighContainerItemStr = this._maxHeighContainerItem.toString() + 'px';
43030
+ }
43031
+ get suggestions() {
43032
+ return this._suggestions;
43033
+ }
43034
+ set suggestions(val) {
43035
+ this._suggestions = val;
43036
+ this.handleSuggestionsChange();
43037
+ }
43038
+ ngAfterViewChecked() {
43039
+ //Use timeouts as since Angular 4.2, AfterViewChecked is broken and not called after panel is updated
43040
+ if (this.suggestionsUpdated && this.overlay && this.overlay.offsetParent) {
43041
+ setTimeout(() => {
43042
+ if (this.overlay) {
43043
+ this.alignOverlay();
43044
+ }
43045
+ }, 1);
43046
+ this.suggestionsUpdated = false;
43047
+ }
43048
+ if (this.highlightOptionChanged) {
43049
+ setTimeout(() => {
43050
+ if (this.overlay) {
43051
+ let listItem = DomHandler.findSingle(this.overlay, 'li.p-highlight');
43052
+ if (listItem) {
43053
+ DomHandler.scrollInView(this.overlay, listItem);
43054
+ }
43055
+ }
43056
+ }, 1);
43057
+ this.highlightOptionChanged = false;
43058
+ }
43059
+ if (this.multiContainerEL) {
43060
+ var lastItemSelected = DomHandler.findSingle(this.multiContainerEL.nativeElement, 'li:first-child');
43061
+ this.multiContainerEL.nativeElement.scrollTop = 10000;
43062
+ let rectParent = this.multiContainerEL.nativeElement.getBoundingClientRect();
43063
+ let rectLastItem = lastItemSelected.getBoundingClientRect();
43064
+ if (rectLastItem.y < rectParent.y) {
43065
+ this.showCountItem = true;
43066
+ }
43067
+ else {
43068
+ this.showCountItem = false;
43069
+ }
43070
+ }
43071
+ const countItem = DomHandler.findSingle(this.multiContainerEL.nativeElement, '.p-autocomplete-countItem');
43072
+ if (this.showCountItem && !countItem) {
43073
+ this.focusInput();
43074
+ }
43075
+ }
43076
+ handleSuggestionsChange() {
43077
+ if (this._suggestions != null && this.loading) {
43078
+ this.highlightOption = null;
43079
+ if (this._suggestions.length) {
43080
+ this.noResults = false;
43081
+ this.show();
43082
+ this.suggestionsUpdated = true;
43083
+ if (this.autoHighlight) {
43084
+ this.highlightOption = this._suggestions[0];
43085
+ }
43086
+ }
43087
+ else {
43088
+ this.noResults = true;
43089
+ if (this.emptyMessage) {
43090
+ this.show();
43091
+ this.suggestionsUpdated = true;
43092
+ }
43093
+ else {
43094
+ this.hide();
43095
+ }
43096
+ }
43097
+ this.loading = false;
43098
+ }
43099
+ }
43100
+ ngAfterContentInit() {
43101
+ this.templates.forEach((item) => {
43102
+ switch (item.getType()) {
43103
+ case 'item':
43104
+ this.itemTemplate = item.template;
43105
+ break;
43106
+ case 'selectedItem':
43107
+ this.selectedItemTemplate = item.template;
43108
+ break;
43109
+ default:
43110
+ this.itemTemplate = item.template;
43111
+ break;
43112
+ }
43113
+ });
43114
+ }
43115
+ writeValue(value) {
43116
+ this.value = value;
43117
+ this.filled = this.value && this.value != '';
43118
+ this.updateInputField();
43119
+ this.cd.markForCheck();
43120
+ }
43121
+ registerOnChange(fn) {
43122
+ this.onModelChange = fn;
43123
+ }
43124
+ registerOnTouched(fn) {
43125
+ this.onModelTouched = fn;
43126
+ }
43127
+ setDisabledState(val) {
43128
+ this.disabled = val;
43129
+ this.cd.markForCheck();
43130
+ }
43131
+ onInput(event) {
43132
+ // When an input element with a placeholder is clicked, the onInput event is invoked in IE.
43133
+ if (!this.inputKeyDown && DomHandler.isIE()) {
43134
+ return;
43135
+ }
43136
+ if (this.timeout) {
43137
+ clearTimeout(this.timeout);
43138
+ }
43139
+ let value = event.target.value;
43140
+ if (!this.multiple && !this.forceSelection) {
43141
+ this.onModelChange(value);
43142
+ }
43143
+ if (value.length === 0 && !this.multiple) {
43144
+ this.hide();
43145
+ this.onClear.emit(event);
43146
+ this.onModelChange(value);
43147
+ }
43148
+ if (value.length >= this.minLength) {
43149
+ this.timeout = setTimeout(() => {
43150
+ this.search(event, value);
43151
+ }, this.delay);
43152
+ }
43153
+ else {
43154
+ this.suggestions = null;
43155
+ this.hide();
43156
+ }
43157
+ this.updateFilledState();
43158
+ this.inputKeyDown = false;
43159
+ }
43160
+ onInputClick(event) {
43161
+ if (this.documentClickListener) {
43162
+ this.inputClick = true;
43163
+ }
43164
+ }
43165
+ search(event, query) {
43166
+ //allow empty string but not undefined or null
43167
+ if (query === undefined || query === null) {
43168
+ return;
43169
+ }
43170
+ this.loading = true;
43171
+ this.completeMethod.emit({
43172
+ originalEvent: event,
43173
+ query: query
43174
+ });
43175
+ }
43176
+ selectItem(option, focus = true) {
43177
+ if (this.forceSelectionUpdateModelTimeout) {
43178
+ clearTimeout(this.forceSelectionUpdateModelTimeout);
43179
+ this.forceSelectionUpdateModelTimeout = null;
43180
+ }
43181
+ if (this.multiple) {
43182
+ this.multiInputEL.nativeElement.value = '';
43183
+ this.value = this.value || [];
43184
+ if (!this.isSelected(option) || !this.unique) {
43185
+ this.value = [...this.value, option];
43186
+ this.onModelChange(this.value);
43187
+ }
43188
+ }
43189
+ else {
43190
+ this.inputEL.nativeElement.value = this.field ? ObjectUtils.resolveFieldData(option, this.field) || '' : option;
43191
+ this.value = option;
43192
+ this.onModelChange(this.value);
43193
+ }
43194
+ this.onSelect.emit(option);
43195
+ this.updateFilledState();
43196
+ if (focus) {
43197
+ this.itemClicked = true;
43198
+ this.focusInput();
43199
+ }
43200
+ }
43201
+ show() {
43202
+ if (this.multiInputEL || this.inputEL) {
43203
+ let hasFocus = this.multiple ?
43204
+ this.multiInputEL.nativeElement.ownerDocument.activeElement == this.multiInputEL.nativeElement :
43205
+ this.inputEL.nativeElement.ownerDocument.activeElement == this.inputEL.nativeElement;
43206
+ if (!this.overlayVisible && hasFocus) {
43207
+ this.overlayVisible = true;
43208
+ }
43209
+ }
43210
+ }
43211
+ onOverlayAnimationStart(event) {
43212
+ switch (event.toState) {
43213
+ case 'visible':
43214
+ this.overlay = event.element;
43215
+ this.appendOverlay();
43216
+ if (this.autoZIndex) {
43217
+ this.overlay.style.zIndex = String(this.baseZIndex + (++DomHandler.zindex));
43218
+ }
43219
+ this.alignOverlay();
43220
+ this.bindDocumentClickListener();
43221
+ this.bindDocumentResizeListener();
43222
+ this.bindScrollListener();
43223
+ this.onShow.emit(event);
43224
+ break;
43225
+ case 'void':
43226
+ this.onOverlayHide();
43227
+ break;
43228
+ }
43229
+ }
43230
+ onOverlayAnimationDone(event) {
43231
+ if (event.toState === 'void') {
43232
+ this._suggestions = null;
43233
+ }
43234
+ }
43235
+ appendOverlay() {
43236
+ if (this.appendTo) {
43237
+ if (this.appendTo === 'body')
43238
+ document.body.appendChild(this.overlay);
43239
+ else
43240
+ DomHandler.appendChild(this.overlay, this.appendTo);
43241
+ if (!this.overlay.style.minWidth) {
43242
+ this.overlay.style.minWidth = DomHandler.getWidth(this.el.nativeElement.children[0]) + 'px';
43243
+ }
43244
+ }
43245
+ }
43246
+ resolveFieldData(value) {
43247
+ return this.field ? ObjectUtils.resolveFieldData(value, this.field) : value;
43248
+ }
43249
+ restoreOverlayAppend() {
43250
+ if (this.overlay && this.appendTo) {
43251
+ this.el.nativeElement.appendChild(this.overlay);
43252
+ }
43253
+ }
43254
+ alignOverlay() {
43255
+ if (this.appendTo)
43256
+ DomHandler.absolutePosition(this.overlay, (this.multiple ? this.multiContainerEL.nativeElement : this.inputEL.nativeElement));
43257
+ else
43258
+ DomHandler.relativePosition(this.overlay, (this.multiple ? this.multiContainerEL.nativeElement : this.inputEL.nativeElement));
43259
+ }
43260
+ hide() {
43261
+ this.overlayVisible = false;
43262
+ this.cd.markForCheck();
43263
+ }
43264
+ handleDropdownClick(event) {
43265
+ if (!this.overlayVisible) {
43266
+ this.focusInput();
43267
+ let queryValue = this.multiple ? this.multiInputEL.nativeElement.value : this.inputEL.nativeElement.value;
43268
+ if (this.dropdownMode === 'blank')
43269
+ this.search(event, '');
43270
+ else if (this.dropdownMode === 'current')
43271
+ this.search(event, queryValue);
43272
+ this.onDropdownClick.emit({
43273
+ originalEvent: event,
43274
+ query: queryValue
43275
+ });
43276
+ }
43277
+ else {
43278
+ this.hide();
43279
+ }
43280
+ }
43281
+ focusInput() {
43282
+ if (this.multiple)
43283
+ this.multiInputEL.nativeElement.focus();
43284
+ else
43285
+ this.inputEL.nativeElement.focus();
43286
+ }
43287
+ removeItem(item) {
43288
+ let itemIndex = DomHandler.index(item);
43289
+ let removedValue = this.value[itemIndex];
43290
+ this.value = this.value.filter((val, i) => i != itemIndex);
43291
+ this.onModelChange(this.value);
43292
+ this.updateFilledState();
43293
+ this.onUnselect.emit(removedValue);
43294
+ }
43295
+ onKeydown(event) {
43296
+ if (this.overlayVisible) {
43297
+ let highlightItemIndex = this.findOptionIndex(this.highlightOption);
43298
+ switch (event.which) {
43299
+ //down
43300
+ case 40:
43301
+ if (highlightItemIndex != -1) {
43302
+ var nextItemIndex = highlightItemIndex + 1;
43303
+ if (nextItemIndex != (this.suggestions.length)) {
43304
+ this.highlightOption = this.suggestions[nextItemIndex];
43305
+ this.highlightOptionChanged = true;
43306
+ }
43307
+ }
43308
+ else {
43309
+ this.highlightOption = this.suggestions[0];
43310
+ }
43311
+ event.preventDefault();
43312
+ break;
43313
+ //up
43314
+ case 38:
43315
+ if (highlightItemIndex > 0) {
43316
+ let prevItemIndex = highlightItemIndex - 1;
43317
+ this.highlightOption = this.suggestions[prevItemIndex];
43318
+ this.highlightOptionChanged = true;
43319
+ }
43320
+ event.preventDefault();
43321
+ break;
43322
+ //enter
43323
+ case 13:
43324
+ if (this.highlightOption) {
43325
+ this.selectItem(this.highlightOption);
43326
+ this.hide();
43327
+ }
43328
+ event.preventDefault();
43329
+ break;
43330
+ //escape
43331
+ case 27:
43332
+ this.hide();
43333
+ event.preventDefault();
43334
+ break;
43335
+ //tab
43336
+ case 9:
43337
+ if (this.highlightOption) {
43338
+ this.selectItem(this.highlightOption);
43339
+ }
43340
+ this.hide();
43341
+ break;
43342
+ }
43343
+ }
43344
+ else {
43345
+ if (event.which === 40 && this.suggestions) {
43346
+ this.search(event, event.target.value);
43347
+ }
43348
+ }
43349
+ if (this.multiple) {
43350
+ switch (event.which) {
43351
+ //backspace
43352
+ case 8:
43353
+ if (this.value && this.value.length && !this.multiInputEL.nativeElement.value) {
43354
+ this.value = [...this.value];
43355
+ const removedValue = this.value.pop();
43356
+ this.onModelChange(this.value);
43357
+ this.updateFilledState();
43358
+ this.onUnselect.emit(removedValue);
43359
+ }
43360
+ break;
43361
+ }
43362
+ }
43363
+ this.inputKeyDown = true;
43364
+ }
43365
+ onKeyup(event) {
43366
+ this.onKeyUp.emit(event);
43367
+ }
43368
+ onInputFocus(event) {
43369
+ if (!this.itemClicked && this.completeOnFocus) {
43370
+ let queryValue = this.multiple ? this.multiInputEL.nativeElement.value : this.inputEL.nativeElement.value;
43371
+ this.search(event, queryValue);
43372
+ }
43373
+ this.focus = true;
43374
+ this.onFocus.emit(event);
43375
+ this.itemClicked = false;
43376
+ }
43377
+ onInputBlur(event) {
43378
+ this.focus = false;
43379
+ this.onModelTouched();
43380
+ this.onBlur.emit(event);
43381
+ }
43382
+ onInputChange(event) {
43383
+ if (this.forceSelection) {
43384
+ let valid = false;
43385
+ let inputValue = event.target.value.trim();
43386
+ if (this.suggestions) {
43387
+ for (let suggestion of this.suggestions) {
43388
+ let itemValue = this.field ? ObjectUtils.resolveFieldData(suggestion, this.field) : suggestion;
43389
+ if (itemValue && inputValue === itemValue.trim()) {
43390
+ valid = true;
43391
+ this.forceSelectionUpdateModelTimeout = setTimeout(() => {
43392
+ this.selectItem(suggestion, false);
43393
+ }, 250);
43394
+ break;
43395
+ }
43396
+ }
43397
+ }
43398
+ if (!valid) {
43399
+ if (this.multiple) {
43400
+ this.multiInputEL.nativeElement.value = '';
43401
+ }
43402
+ else {
43403
+ this.value = null;
43404
+ this.inputEL.nativeElement.value = '';
43405
+ }
43406
+ this.onClear.emit(event);
43407
+ this.onModelChange(this.value);
43408
+ }
43409
+ }
43410
+ }
43411
+ onInputPaste(event) {
43412
+ this.onKeydown(event);
43413
+ }
43414
+ isSelected(val) {
43415
+ let selected = false;
43416
+ if (this.value && this.value.length) {
43417
+ for (let i = 0; i < this.value.length; i++) {
43418
+ if (ObjectUtils.equals(this.value[i], val, this.dataKey)) {
43419
+ selected = true;
43420
+ break;
43421
+ }
43422
+ }
43423
+ }
43424
+ return selected;
43425
+ }
43426
+ findOptionIndex(option) {
43427
+ let index = -1;
43428
+ if (this.suggestions) {
43429
+ for (let i = 0; i < this.suggestions.length; i++) {
43430
+ if (ObjectUtils.equals(option, this.suggestions[i])) {
43431
+ index = i;
43432
+ break;
43433
+ }
43434
+ }
43435
+ }
43436
+ return index;
43437
+ }
43438
+ updateFilledState() {
43439
+ if (this.multiple)
43440
+ this.filled = (this.value && this.value.length) || (this.multiInputEL && this.multiInputEL.nativeElement && this.multiInputEL.nativeElement.value != '');
43441
+ else
43442
+ this.filled = (this.inputFieldValue && this.inputFieldValue != '') || (this.inputEL && this.inputEL.nativeElement && this.inputEL.nativeElement.value != '');
43443
+ ;
43444
+ }
43445
+ updateInputField() {
43446
+ let formattedValue = this.value ? (this.field ? ObjectUtils.resolveFieldData(this.value, this.field) || '' : this.value) : '';
43447
+ this.inputFieldValue = formattedValue;
43448
+ if (this.inputEL && this.inputEL.nativeElement) {
43449
+ this.inputEL.nativeElement.value = formattedValue;
43450
+ }
43451
+ this.updateFilledState();
43452
+ }
43453
+ bindDocumentClickListener() {
43454
+ if (!this.documentClickListener) {
43455
+ const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
43456
+ this.documentClickListener = this.renderer.listen(documentTarget, 'click', (event) => {
43457
+ if (event.which === 3) {
43458
+ return;
43459
+ }
43460
+ if (!this.inputClick && !this.isDropdownClick(event)) {
43461
+ this.hide();
43462
+ }
43463
+ this.inputClick = false;
43464
+ this.cd.markForCheck();
43465
+ });
43466
+ }
43467
+ }
43468
+ isDropdownClick(event) {
43469
+ if (this.dropdown) {
43470
+ let target = event.target;
43471
+ return (target === this.dropdownButton.nativeElement || target.parentNode === this.dropdownButton.nativeElement);
43472
+ }
43473
+ else {
43474
+ return false;
43475
+ }
43476
+ }
43477
+ unbindDocumentClickListener() {
43478
+ if (this.documentClickListener) {
43479
+ this.documentClickListener();
43480
+ this.documentClickListener = null;
43481
+ }
43482
+ }
43483
+ bindDocumentResizeListener() {
43484
+ this.documentResizeListener = this.onWindowResize.bind(this);
43485
+ window.addEventListener('resize', this.documentResizeListener);
43486
+ }
43487
+ unbindDocumentResizeListener() {
43488
+ if (this.documentResizeListener) {
43489
+ window.removeEventListener('resize', this.documentResizeListener);
43490
+ this.documentResizeListener = null;
43491
+ }
43492
+ }
43493
+ onWindowResize() {
43494
+ this.hide();
43495
+ }
43496
+ bindScrollListener() {
43497
+ if (!this.scrollHandler) {
43498
+ this.scrollHandler = new ConnectedOverlayScrollHandler(this.containerEL.nativeElement, () => {
43499
+ if (this.overlayVisible) {
43500
+ this.hide();
43501
+ }
43502
+ });
43503
+ }
43504
+ this.scrollHandler.bindScrollListener();
43505
+ }
43506
+ unbindScrollListener() {
43507
+ if (this.scrollHandler) {
43508
+ this.scrollHandler.unbindScrollListener();
43509
+ }
43510
+ }
43511
+ onOverlayHide() {
43512
+ this.unbindDocumentClickListener();
43513
+ this.unbindDocumentResizeListener();
43514
+ this.unbindScrollListener();
43515
+ this.overlay = null;
43516
+ this.onHide.emit();
43517
+ }
43518
+ ngOnDestroy() {
43519
+ if (this.forceSelectionUpdateModelTimeout) {
43520
+ clearTimeout(this.forceSelectionUpdateModelTimeout);
43521
+ this.forceSelectionUpdateModelTimeout = null;
43522
+ }
43523
+ if (this.scrollHandler) {
43524
+ this.scrollHandler.destroy();
43525
+ this.scrollHandler = null;
43526
+ }
43527
+ this.restoreOverlayAppend();
43528
+ this.onOverlayHide();
43529
+ }
43530
+ showMore() {
43531
+ this._maxHeighContainerItemStrOld = this._maxHeighContainerItemStr;
43532
+ this._maxHeighContainerItemStr = '10000px';
43533
+ this.showCountItem = false;
43534
+ }
43535
+ showLess() {
43536
+ this._maxHeighContainerItemStr = this._maxHeighContainerItemStrOld;
43537
+ this._maxHeighContainerItemStrOld = null;
43538
+ this.showCountItem = true;
43539
+ }
43540
+ }
43541
+ AutoComplete.decorators = [
43542
+ { type: Component, args: [{
43543
+ selector: 'p-autoComplete',
43544
+ template: `
43545
+ <span #container [ngClass]="{'p-autocomplete p-component':true,'p-autocomplete-dd':dropdown,'p-autocomplete-multiple':multiple}" [ngStyle]="style" [class]="styleClass">
43546
+ <input *ngIf="!multiple" #in [attr.type]="type" [attr.id]="inputId" [ngStyle]="inputStyle" [class]="inputStyleClass" [autocomplete]="autocomplete" [attr.required]="required" [attr.name]="name"
43547
+ class="p-autocomplete-input p-inputtext p-component" [ngClass]="{'p-autocomplete-dd-input':dropdown,'p-disabled': disabled}" [value]="inputFieldValue" aria-autocomplete="list" [attr.aria-controls]="listId" role="searchbox" [attr.aria-expanded]="overlayVisible" aria-haspopup="true" [attr.aria-activedescendant]="'p-highlighted-option'"
43548
+ (click)="onInputClick($event)" (input)="onInput($event)" (keydown)="onKeydown($event)" (keyup)="onKeyup($event)" [attr.autofocus]="autofocus" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" (change)="onInputChange($event)" (paste)="onInputPaste($event)"
43549
+ [attr.placeholder]="placeholder" [attr.size]="size" [attr.maxlength]="maxlength" [attr.tabindex]="tabindex" [readonly]="readonly" [disabled]="disabled" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy" [attr.aria-required]="required"
43550
+ ><ul *ngIf="multiple" #multiContainer class="p-autocomplete-multiple-container p-component p-inputtext" [ngClass]="{'p-disabled':disabled,'p-focus':focus}" (click)="multiIn.focus()" [style.max-height]="_maxHeighContainerItemStr">
43551
+ <li #token *ngFor="let val of value" class="p-autocomplete-token" [class.disabled]="val._disabled">
43552
+ <ng-container *ngTemplateOutlet="selectedItemTemplate; context: {$implicit: val}"></ng-container>
43553
+ <span *ngIf="!selectedItemTemplate" class="p-autocomplete-token-label">{{resolveFieldData(val)}}</span>
43554
+ <span *ngIf="!disabled && !val._disabled" class="p-autocomplete-token-icon pi pi-times-circle" (click)="removeItem(token)"></span>
43555
+ </li>
43556
+ <li class="p-autocomplete-token p-autocomplete-countItem" *ngIf="showCountItem && value " (click)="showMore()">Có {{value.length}} bản ghi ...</li>
43557
+ <!-- <ng-container *ngIf="value?.length > 10">
43558
+ <li class="p-autocomplete-token p-autocomplete-countItem" (click)="showMore()">
43559
+ Có {{value.length}} bản ghi ...
43560
+ </li>
43561
+ </ng-container> -->
43562
+ <li class="p-autocomplete-token p-autocomplete-countItem" *ngIf="_maxHeighContainerItemStrOld != null" (click)="showLess()"><span><i class="fas fa-arrow-up"></i></span><span>Thu lại</span></li>
43563
+ <li class="p-autocomplete-input-token">
43564
+ <input #multiIn [attr.type]="type" [attr.id]="inputId" [disabled]="disabled" [attr.placeholder]="(value&&value.length ? null : placeholder)" [attr.tabindex]="tabindex" [attr.maxlength]="maxlength" (input)="onInput($event)" (click)="onInputClick($event)"
43565
+ (keydown)="onKeydown($event)" [readonly]="readonly" (keyup)="onKeyup($event)" [attr.autofocus]="autofocus" (focus)="onInputFocus($event)" (blur)="onInputBlur($event)" (change)="onInputChange($event)" (paste)="onInputPaste($event)" [autocomplete]="autocomplete"
43566
+ [ngStyle]="inputStyle" [class]="inputStyleClass" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy" [attr.aria-required]="required"
43567
+ aria-autocomplete="list" [attr.aria-controls]="listId" role="searchbox" [attr.aria-expanded]="overlayVisible" aria-haspopup="true" [attr.aria-activedescendant]="'p-highlighted-option'">
43568
+ </li>
43569
+ </ul>
43570
+ <i *ngIf="loading" class="p-autocomplete-loader pi pi-spinner pi-spin"></i><button #ddBtn type="button" pButton [icon]="dropdownIcon" class="p-autocomplete-dropdown" [disabled]="disabled" pRipple
43571
+ (click)="handleDropdownClick($event)" *ngIf="dropdown" [attr.tabindex]="tabindex"></button>
43572
+ <div #panel *ngIf="overlayVisible" [ngClass]="['p-autocomplete-panel p-component']" [style.max-height]="scrollHeight" [ngStyle]="panelStyle" [class]="panelStyleClass"
43573
+ [@overlayAnimation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" (@overlayAnimation.start)="onOverlayAnimationStart($event)" (@overlayAnimation.done)="onOverlayAnimationDone($event)" >
43574
+ <ul role="listbox" [attr.id]="listId" class="p-autocomplete-items">
43575
+ <li role="option" *ngFor="let option of suggestions; let idx = index" class="p-autocomplete-item" pRipple [ngClass]="{'p-highlight': (option === highlightOption)}" [id]="highlightOption == option ? 'p-highlighted-option':''" (click)="selectItem(option)">
43576
+ <span *ngIf="!itemTemplate">{{resolveFieldData(option)}}</span>
43577
+ <ng-container *ngTemplateOutlet="itemTemplate; context: {$implicit: option, index: idx}"></ng-container>
43578
+ </li>
43579
+ <li *ngIf="noResults && emptyMessage" class="p-autocomplete-emptymessage p-autocomplete-item">{{emptyMessage}}</li>
43580
+ </ul>
43581
+ </div>
43582
+ </span>
43583
+ `,
43584
+ animations: [
43585
+ trigger('overlayAnimation', [
43586
+ transition(':enter', [
43587
+ style({ opacity: 0, transform: 'scaleY(0.8)' }),
43588
+ animate('{{showTransitionParams}}')
43589
+ ]),
43590
+ transition(':leave', [
43591
+ animate('{{hideTransitionParams}}', style({ opacity: 0 }))
43592
+ ])
43593
+ ])
43594
+ ],
43595
+ host: {
43596
+ '[class.p-inputwrapper-filled]': 'filled',
43597
+ '[class.p-inputwrapper-focus]': 'focus && !disabled'
43598
+ },
43599
+ providers: [AUTOCOMPLETE_VALUE_ACCESSOR],
43600
+ changeDetection: ChangeDetectionStrategy.OnPush,
43601
+ encapsulation: ViewEncapsulation.None,
43602
+ styles: [".p-autocomplete{display:inline-flex;position:relative}.p-autocomplete-loader{position:absolute;top:50%;margin-top:-.5rem}.p-autocomplete-dd .p-autocomplete-input{flex:1 1 auto;width:1%}.p-autocomplete-dd .p-autocomplete-input,.p-autocomplete-dd .p-autocomplete-multiple-container{border-top-right-radius:0;border-bottom-right-radius:0}.p-autocomplete-dd .p-autocomplete-dropdown{border-top-left-radius:0;border-bottom-left-radius:0}.p-autocomplete .p-autocomplete-panel{min-width:100%}.p-autocomplete-panel{position:absolute;overflow:auto}.p-autocomplete-items{margin:0;padding:0;list-style-type:none}.p-autocomplete-item{cursor:pointer;white-space:nowrap;position:relative;overflow:hidden}.p-autocomplete-multiple-container{margin:0;padding:0;list-style-type:none;cursor:text;overflow:hidden;display:flex;align-items:center;flex-wrap:wrap}.p-autocomplete-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto;padding:.125em .5em;margin-right:.125em;border:0;font-size:.9em}.p-autocomplete-token-icon{cursor:pointer}.p-autocomplete-input-token{display:inline-block;vertical-align:middle;list-style-type:none;margin:0 0 0 .125em;padding:.25em .25em .25em 0}.p-autocomplete-input-token input{border:0;width:10em;outline:medium none;background-color:transparent;margin:0;padding:0;box-shadow:none;border-radius:0}.p-fluid .p-autocomplete{display:flex}.p-fluid .p-autocomplete-dd .p-autocomplete-input{width:1%}.p-autocomplete-countItem{background-color:#e1e1e1!important;box-sizing:border-box;display:inline-flex;align-items:center;cursor:pointer}"]
43603
+ },] }
43604
+ ];
43605
+ AutoComplete.ctorParameters = () => [
43606
+ { type: ElementRef },
43607
+ { type: Renderer2 },
43608
+ { type: ChangeDetectorRef },
43609
+ { type: IterableDiffers }
43610
+ ];
43611
+ AutoComplete.propDecorators = {
43612
+ minLength: [{ type: Input }],
43613
+ delay: [{ type: Input }],
43614
+ style: [{ type: Input }],
43615
+ panelStyle: [{ type: Input }],
43616
+ styleClass: [{ type: Input }],
43617
+ panelStyleClass: [{ type: Input }],
43618
+ inputStyle: [{ type: Input }],
43619
+ inputId: [{ type: Input }],
43620
+ inputStyleClass: [{ type: Input }],
43621
+ placeholder: [{ type: Input }],
43622
+ readonly: [{ type: Input }],
43623
+ disabled: [{ type: Input }],
43624
+ maxlength: [{ type: Input }],
43625
+ name: [{ type: Input }],
43626
+ required: [{ type: Input }],
43627
+ size: [{ type: Input }],
43628
+ appendTo: [{ type: Input }],
43629
+ autoHighlight: [{ type: Input }],
43630
+ forceSelection: [{ type: Input }],
43631
+ type: [{ type: Input }],
43632
+ autoZIndex: [{ type: Input }],
43633
+ baseZIndex: [{ type: Input }],
43634
+ ariaLabel: [{ type: Input }],
43635
+ ariaLabelledBy: [{ type: Input }],
43636
+ dropdownIcon: [{ type: Input }],
43637
+ unique: [{ type: Input }],
43638
+ completeOnFocus: [{ type: Input }],
43639
+ completeMethod: [{ type: Output }],
43640
+ onSelect: [{ type: Output }],
43641
+ onUnselect: [{ type: Output }],
43642
+ onFocus: [{ type: Output }],
43643
+ onBlur: [{ type: Output }],
43644
+ onDropdownClick: [{ type: Output }],
43645
+ onClear: [{ type: Output }],
43646
+ onKeyUp: [{ type: Output }],
43647
+ onShow: [{ type: Output }],
43648
+ onHide: [{ type: Output }],
43649
+ field: [{ type: Input }],
43650
+ scrollHeight: [{ type: Input }],
43651
+ dropdown: [{ type: Input }],
43652
+ dropdownMode: [{ type: Input }],
43653
+ multiple: [{ type: Input }],
43654
+ tabindex: [{ type: Input }],
43655
+ dataKey: [{ type: Input }],
43656
+ emptyMessage: [{ type: Input }],
43657
+ showTransitionOptions: [{ type: Input }],
43658
+ hideTransitionOptions: [{ type: Input }],
43659
+ autofocus: [{ type: Input }],
43660
+ autocomplete: [{ type: Input }],
43661
+ maxRowItem: [{ type: Input }],
43662
+ containerEL: [{ type: ViewChild, args: ['container',] }],
43663
+ inputEL: [{ type: ViewChild, args: ['in',] }],
43664
+ multiInputEL: [{ type: ViewChild, args: ['multiIn',] }],
43665
+ multiContainerEL: [{ type: ViewChild, args: ['multiContainer',] }],
43666
+ dropdownButton: [{ type: ViewChild, args: ['ddBtn',] }],
43667
+ templates: [{ type: ContentChildren, args: [PrimeTemplate,] }],
43668
+ suggestions: [{ type: Input }]
43669
+ };
43670
+ class AutoCompleteModule {
43671
+ }
43672
+ AutoCompleteModule.decorators = [
43673
+ { type: NgModule, args: [{
43674
+ imports: [CommonModule, InputTextModule, ButtonModule, SharedModule, RippleModule],
43675
+ exports: [AutoComplete, SharedModule],
43676
+ declarations: [AutoComplete]
43677
+ },] }
43678
+ ];
43679
+
43680
+ /* eslint-disable prefer-const */
43681
+ class HtmlPreviewComponent {
43682
+ constructor(gs, _commonService) {
43683
+ this.gs = gs;
43684
+ this._commonService = _commonService;
43685
+ this.control = new HtmlPreviewControlSchema();
43686
+ this.onChanged = new EventEmitter();
43687
+ this.content = '';
43688
+ this.id = '';
43689
+ this.id = this._commonService.guid();
43690
+ }
43691
+ // ngOnChanges(changes: SimpleChanges) {
43692
+ // if (changes['content']) {
43693
+ // this.renderMath();
43694
+ // }
43695
+ // }
43696
+ writeValue(obj) {
43697
+ if (obj) {
43698
+ this.content = obj;
43699
+ }
43700
+ else {
43701
+ this.content = '';
43702
+ }
43703
+ this.renderMath();
43704
+ }
43705
+ registerOnChange(fn) {
43706
+ this.onChange = fn;
43707
+ }
43708
+ registerOnTouched(fn) {
43709
+ this.onTouched = fn;
43710
+ }
43711
+ renderMath() {
43712
+ this.mathJaxObject = this.gs.nativeGlobal()['MathJax'];
43713
+ if (!this.mathJaxObject && !this.mathContent) {
43714
+ return;
43715
+ }
43716
+ setTimeout(() => {
43717
+ var _a, _b;
43718
+ const $this = this;
43719
+ const autoScrollBottom = !!((_a = $this.control) === null || _a === void 0 ? void 0 : _a.autoScrollBottom);
43720
+ const output = $this.mathContent.nativeElement;
43721
+ let content = ((_b = $this.content) === null || _b === void 0 ? void 0 : _b.trim()) || '';
43722
+ if (!$this.control.isHtml) {
43723
+ content = content.replace(/\n/g, '<br>');
43724
+ }
43725
+ output.innerHTML = content;
43726
+ if ($this.mathJaxObject.texReset) {
43727
+ $this.mathJaxObject.texReset();
43728
+ }
43729
+ if ($this.mathJaxObject.typesetClear) {
43730
+ $this.mathJaxObject.typesetClear();
43731
+ }
43732
+ if ($this.mathJaxObject.typesetPromise) {
43733
+ $this.mathJaxObject.typesetPromise([output]).catch(function (err) {
43734
+ output.innerHTML = '';
43735
+ output.appendChild(document.createTextNode(err.message));
43736
+ console.error(err);
43737
+ }).then(function () {
43738
+ var _a, _b, _c;
43739
+ // Do something after typeset
43740
+ if (autoScrollBottom) {
43741
+ const box = document.querySelector(`#math-preview-box-${$this.id}`);
43742
+ const elem = box.getElementsByClassName('ps--active-y')[0];
43743
+ if (elem) {
43744
+ elem.scrollTop = elem.scrollHeight;
43745
+ }
43746
+ }
43747
+ const value = (_c = (_b = (_a = document.getElementById(`mathPreview-${$this.id}`)) === null || _a === void 0 ? void 0 : _a.innerHTML) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : '';
43748
+ $this.onChange(value);
43749
+ $this.onChanged.emit(value);
43750
+ });
43751
+ }
43752
+ return $this.mathJaxObject.startup.defaultPageReady ? $this.mathJaxObject.startup.defaultPageReady() : $this.mathJaxObject.startup.defaultPageReady;
43753
+ });
43754
+ }
43755
+ loadMathConfig() {
43756
+ var _a, _b, _c;
43757
+ const wd = this.gs.nativeGlobal();
43758
+ wd.MathJax = {
43759
+ 'loader': { load: ['input/asciimath', 'output/chtml', 'ui/menu', 'output/svg', '[mml]/mml3'] },
43760
+ 'tex': {
43761
+ inlineMath: [['$', '$'], ['\\(', '\\)']],
43762
+ processEscapes: true
43763
+ },
43764
+ 'startup': {
43765
+ pageReady: () => this.renderMath()
43766
+ },
43767
+ 'svg': {
43768
+ scale: 1,
43769
+ minScale: .5
43770
+ },
43771
+ 'options': {
43772
+ enableMenu: !!((_a = this.control) === null || _a === void 0 ? void 0 : _a.useMathJaxMenu),
43773
+ menuOptions: {
43774
+ settings: {
43775
+ texHints: true,
43776
+ semantics: false,
43777
+ zoom: 'Double-Click',
43778
+ zscale: '200%',
43779
+ renderer: ((_b = this.control) === null || _b === void 0 ? void 0 : _b.mathJaxType) ? this.control.mathJaxType : 'CHTML',
43780
+ scale: 1,
43781
+ inTabOrder: true,
43782
+ assistiveMml: true,
43783
+ collapsible: false,
43784
+ explorer: false, // true if the expression explorer should be active
43785
+ },
43786
+ annotationTypes: {
43787
+ TeX: ['TeX', 'LaTeX', 'application/x-tex'],
43788
+ StarMath: ['StarMath 5.0'],
43789
+ Maple: ['Maple'],
43790
+ ContentMathML: ['MathML-Content', 'application/mathml-content+xml'],
43791
+ OpenMath: ['OpenMath']
43792
+ }
43793
+ }
43794
+ }
43795
+ };
43796
+ const script = document.createElement('script');
43797
+ if (((_c = this.control) === null || _c === void 0 ? void 0 : _c.mathJaxType) == 'SVG') {
43798
+ script.src = 'assets/vendor/mathjax/tex-mml-svg.js';
43799
+ }
43800
+ else {
43801
+ script.src = 'assets/vendor/mathjax/tex-mml-chtml.js';
43802
+ }
43803
+ script.setAttribute('id', 'MathJax-script');
43804
+ document.head.appendChild(script);
43805
+ }
43806
+ ngOnInit() {
43807
+ this.loadMathConfig();
43808
+ }
43809
+ }
43810
+ HtmlPreviewComponent.decorators = [
43811
+ { type: Component, args: [{
43812
+ selector: 'html-preview',
43813
+ template: "<div class=\"preview-box\" id=\"math-preview-box-{{id}}\" [ngStyle]=\"{'height': control.height + 'px'}\">\n <tn-custom-scrollbar [showScrollHorizontal]=\"true\">\n <div #mathContent id=\"mathPreview-{{id}}\"></div>\n </tn-custom-scrollbar>\n</div>",
43814
+ providers: [
43815
+ ComponentContextService,
43816
+ {
43817
+ provide: NG_VALUE_ACCESSOR,
43818
+ useExisting: forwardRef(() => HtmlPreviewComponent),
43819
+ multi: true
43820
+ },
43821
+ ],
43822
+ styles: ["::ng-deep html-preview .preview-box{border:1px solid #ced4da;padding:10px}"]
43823
+ },] }
43824
+ ];
43825
+ HtmlPreviewComponent.ctorParameters = () => [
43826
+ { type: GlobalService },
43827
+ { type: CommonService }
43828
+ ];
43829
+ HtmlPreviewComponent.propDecorators = {
43830
+ mathContent: [{ type: ViewChild, args: ['mathContent',] }],
43831
+ control: [{ type: Input }],
43832
+ onChanged: [{ type: Output }]
43833
+ };
43834
+
43835
+ class SettingAuthorizeButtonComponent extends DataListBase {
43836
+ constructor(_injector, _basePermissionService, _moduleConfigService) {
43837
+ super(_injector);
43838
+ this._injector = _injector;
43839
+ this._basePermissionService = _basePermissionService;
43840
+ this._moduleConfigService = _moduleConfigService;
43841
+ this.authorizeButtonKey = '';
43842
+ this.dataSource = [];
43843
+ this.appCode = '';
43844
+ }
43845
+ ngOnInit() {
43846
+ this.appCode = this._moduleConfigService.getConfig().appCode;
43847
+ this.setting.baseService = this._basePermissionService;
43848
+ this.customGetData = true;
43849
+ this.setting.hiddenAdvanceSearch = true;
43850
+ this.setting.hiddenHeader = true;
43851
+ this.setting.heightType = HeightType.dynamic;
43852
+ this.setting.hiddenOrderColumn = true;
43853
+ this.setting.hiddenFilterRow = true;
43854
+ this.setting.hiddenSettingWorkflow = true;
43855
+ this.setting.hiddenAuthorizeButton = true;
43856
+ this.setting.hiddenSettingPermission = true;
43857
+ this.setting.fixHeightTypeInDialog = false;
43858
+ this.setting.hiddenCheckbox = false;
43859
+ this.setting.showEditLink = false;
43860
+ this.setting.modelSchemas = [
43861
+ new ModelSchema({
43862
+ field: 'permissionCode',
43863
+ name: 'Mã',
43864
+ }),
43865
+ new ModelSchema({
43866
+ field: 'rawText',
43867
+ name: 'Tên',
43868
+ }),
43869
+ new ModelSchema({
43870
+ field: 'isAuthorize',
43871
+ name: 'Đã tạo quyền',
43872
+ }),
43873
+ new ModelSchema({
43874
+ field: 'ma1',
43875
+ name: 'Mã',
43876
+ }),
43877
+ ];
43878
+ this.setting.cols = [
43879
+ new ColumnSchemaBase({ field: 'permissionCode', sort: false, showEditLink: false }),
43880
+ new ColumnSchemaBase({ field: 'rawText', width: '300px', sort: false }),
43881
+ new ColumnSchemaBase({ field: 'isAuthorize', dataType: DataType.boolean, width: '100px', sort: false }),
43882
+ ];
43883
+ super.ngOnInit();
43884
+ }
43885
+ getDataCustom(gridInfo) {
43886
+ this.model.dataSource = this.dataSource;
43887
+ this.afterGetData();
43888
+ }
43889
+ addBasePermission(rowData) {
43890
+ return __awaiter(this, void 0, void 0, function* () {
43891
+ const insertRes = yield this._basePermissionService.post(rowData);
43892
+ if (insertRes.success) {
43893
+ this._notifierService.showSuccess('Thêm quyền thành công');
43894
+ this.updateDataSource(insertRes.data);
43895
+ return;
43896
+ }
43897
+ this._notifierService.showWarning('Có lỗi trong quá trình xử lý, vui lòng thử lại');
43898
+ });
43899
+ }
43900
+ deleteBasePermission(rowData) {
43901
+ return __awaiter(this, void 0, void 0, function* () {
43902
+ this._notifierService.showConfirm('Xác nhận xóa quyền').then((res) => __awaiter(this, void 0, void 0, function* () {
43903
+ if (!res)
43904
+ return;
43905
+ const deleteRes = yield this._basePermissionService.delete(rowData.id);
43906
+ if (deleteRes.success) {
43907
+ this._notifierService.showSuccess('Xóa quyền thành công');
43908
+ this.updateDataSource(rowData.id, true);
43909
+ return;
43910
+ }
43911
+ this._notifierService.showWarning(deleteRes.message);
43912
+ }));
43913
+ });
43914
+ }
43915
+ updateDataSource(id, isDeleted = false) {
43916
+ const currentRow = this.model.dataSource.find(p => p.id == id);
43917
+ if (!currentRow)
43918
+ return;
43919
+ if (isDeleted) {
43920
+ currentRow.id = this._commonService.guid();
43921
+ }
43922
+ currentRow.isAuthorize = !isDeleted;
43923
+ this.afterGetData();
43924
+ }
43925
+ afterGetData() {
43926
+ return __awaiter(this, void 0, void 0, function* () {
43927
+ this._unmarkLoading();
43928
+ if (!this.model.dataSource.length)
43929
+ return;
43930
+ this.model.dataSource.forEach(item => {
43931
+ item.name = item.rawText;
43932
+ item.code = item.permissionCode;
43933
+ item.moduleCode = this.appCode;
43934
+ });
43935
+ });
43936
+ }
43937
+ ngOnDestroy() {
43938
+ var _a;
43939
+ const buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
43940
+ buttonSetting[_a = this.authorizeButtonKey] || (buttonSetting[_a] = []);
43941
+ this.model.dataSource.forEach(rowData => {
43942
+ var _a;
43943
+ const buttonItem = (_a = buttonSetting[this.authorizeButtonKey]) === null || _a === void 0 ? void 0 : _a.find(p => p.code == rowData.code);
43944
+ if (rowData.isAuthorize && !buttonItem) {
43945
+ buttonSetting[this.authorizeButtonKey].push({
43946
+ id: rowData.id,
43947
+ code: rowData.code,
43948
+ });
43949
+ }
43950
+ else if (!rowData.isAuthorize && buttonItem) {
43951
+ const index = buttonSetting[this.authorizeButtonKey].indexOf(buttonItem);
43952
+ buttonSetting[this.authorizeButtonKey].splice(index, 1);
43953
+ }
43954
+ });
43955
+ sessionStorage.setItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE, JSON.stringify(buttonSetting));
43956
+ }
43957
+ }
43958
+ SettingAuthorizeButtonComponent.decorators = [
43959
+ { type: Component, args: [{
43960
+ selector: 'settings-authorize-button',
43961
+ template: "<crud-list #crudList [menuButtons]=\"getMenuButtons\" [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"\n [hiddenAdd]=\"true\" [hiddenDelete]=\"true\" [hiddenCopyLink]=\"true\" (onReload)=\"_triggerProcessData($event)\"\n (onAdd)=\"_add($event)\" (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\" (onCopyLink)=\"_copyLink($event)\"\n (onCopyLinkMultiple)=\"_copyLinkMultiple()\">\n <ng-template #function let-rowData=\"rowData\">\n <button *ngIf=\"!rowData.isAuthorize\" class=\"p-button-rounded p-button-text p-button-info link-or-action\"\n type=\"button\" pButton icon=\"pi pi-plus\" pTooltip=\"Th\u00EAm m\u1EDBi\" (click)=\"addBasePermission(rowData)\"></button>\n <button *ngIf=\"rowData.isAuthorize\"\n class=\"p-button-rounded p-button-text p-button-danger p-button-info link-or-action\" type=\"button\" pButton\n icon=\"pi pi-trash\" pTooltip=\"X\u00F3a\" (click)=\"deleteBasePermission(rowData)\"></button>\n </ng-template>\n</crud-list>",
43962
+ providers: [ComponentContextService],
43963
+ styles: [""]
43964
+ },] }
43965
+ ];
43966
+ SettingAuthorizeButtonComponent.ctorParameters = () => [
43967
+ { type: Injector },
43968
+ { type: BasePermissionService },
43969
+ { type: ModuleConfigService }
43970
+ ];
43971
+ SettingAuthorizeButtonComponent.propDecorators = {
43972
+ authorizeButtonKey: [{ type: Input }],
43973
+ dataSource: [{ type: Input }]
43974
+ };
43975
+
42979
43976
  class SettingsRowComponent extends ComponentBase {
42980
43977
  constructor(_injector, _domService, _userService) {
42981
43978
  super(_injector);
@@ -43296,147 +44293,6 @@ SettingsWorkflowComponent.propDecorators = {
43296
44293
  parentSetting: [{ type: Input }]
43297
44294
  };
43298
44295
 
43299
- class SettingAuthorizeButtonComponent extends DataListBase {
43300
- constructor(_injector, _basePermissionService, _moduleConfigService) {
43301
- super(_injector);
43302
- this._injector = _injector;
43303
- this._basePermissionService = _basePermissionService;
43304
- this._moduleConfigService = _moduleConfigService;
43305
- this.authorizeButtonKey = '';
43306
- this.dataSource = [];
43307
- this.appCode = '';
43308
- }
43309
- ngOnInit() {
43310
- this.appCode = this._moduleConfigService.getConfig().appCode;
43311
- this.setting.baseService = this._basePermissionService;
43312
- this.customGetData = true;
43313
- this.setting.hiddenAdvanceSearch = true;
43314
- this.setting.hiddenHeader = true;
43315
- this.setting.heightType = HeightType.dynamic;
43316
- this.setting.hiddenOrderColumn = true;
43317
- this.setting.hiddenFilterRow = true;
43318
- this.setting.hiddenSettingWorkflow = true;
43319
- this.setting.hiddenAuthorizeButton = true;
43320
- this.setting.hiddenSettingPermission = true;
43321
- this.setting.fixHeightTypeInDialog = false;
43322
- this.setting.hiddenCheckbox = false;
43323
- this.setting.showEditLink = false;
43324
- this.setting.modelSchemas = [
43325
- new ModelSchema({
43326
- field: 'permissionCode',
43327
- name: 'Mã',
43328
- }),
43329
- new ModelSchema({
43330
- field: 'rawText',
43331
- name: 'Tên',
43332
- }),
43333
- new ModelSchema({
43334
- field: 'isAuthorize',
43335
- name: 'Đã tạo quyền',
43336
- }),
43337
- new ModelSchema({
43338
- field: 'ma1',
43339
- name: 'Mã',
43340
- }),
43341
- ];
43342
- this.setting.cols = [
43343
- new ColumnSchemaBase({ field: 'permissionCode', sort: false, showEditLink: false }),
43344
- new ColumnSchemaBase({ field: 'rawText', width: '300px', sort: false }),
43345
- new ColumnSchemaBase({ field: 'isAuthorize', dataType: DataType.boolean, width: '100px', sort: false }),
43346
- ];
43347
- super.ngOnInit();
43348
- }
43349
- getDataCustom(gridInfo) {
43350
- this.model.dataSource = this.dataSource;
43351
- this.afterGetData();
43352
- }
43353
- addBasePermission(rowData) {
43354
- return __awaiter(this, void 0, void 0, function* () {
43355
- const insertRes = yield this._basePermissionService.post(rowData);
43356
- if (insertRes.success) {
43357
- this._notifierService.showSuccess('Thêm quyền thành công');
43358
- this.updateDataSource(insertRes.data);
43359
- return;
43360
- }
43361
- this._notifierService.showWarning('Có lỗi trong quá trình xử lý, vui lòng thử lại');
43362
- });
43363
- }
43364
- deleteBasePermission(rowData) {
43365
- return __awaiter(this, void 0, void 0, function* () {
43366
- this._notifierService.showConfirm('Xác nhận xóa quyền').then((res) => __awaiter(this, void 0, void 0, function* () {
43367
- if (!res)
43368
- return;
43369
- const deleteRes = yield this._basePermissionService.delete(rowData.id);
43370
- if (deleteRes.success) {
43371
- this._notifierService.showSuccess('Xóa quyền thành công');
43372
- this.updateDataSource(rowData.id, true);
43373
- return;
43374
- }
43375
- this._notifierService.showWarning(deleteRes.message);
43376
- }));
43377
- });
43378
- }
43379
- updateDataSource(id, isDeleted = false) {
43380
- const currentRow = this.model.dataSource.find(p => p.id == id);
43381
- if (!currentRow)
43382
- return;
43383
- if (isDeleted) {
43384
- currentRow.id = this._commonService.guid();
43385
- }
43386
- currentRow.isAuthorize = !isDeleted;
43387
- this.afterGetData();
43388
- }
43389
- afterGetData() {
43390
- return __awaiter(this, void 0, void 0, function* () {
43391
- this._unmarkLoading();
43392
- if (!this.model.dataSource.length)
43393
- return;
43394
- this.model.dataSource.forEach(item => {
43395
- item.name = item.rawText;
43396
- item.code = item.permissionCode;
43397
- item.moduleCode = this.appCode;
43398
- });
43399
- });
43400
- }
43401
- ngOnDestroy() {
43402
- var _a;
43403
- const buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
43404
- buttonSetting[_a = this.authorizeButtonKey] || (buttonSetting[_a] = []);
43405
- this.model.dataSource.forEach(rowData => {
43406
- var _a;
43407
- const buttonItem = (_a = buttonSetting[this.authorizeButtonKey]) === null || _a === void 0 ? void 0 : _a.find(p => p.code == rowData.code);
43408
- if (rowData.isAuthorize && !buttonItem) {
43409
- buttonSetting[this.authorizeButtonKey].push({
43410
- id: rowData.id,
43411
- code: rowData.code,
43412
- });
43413
- }
43414
- else if (!rowData.isAuthorize && buttonItem) {
43415
- const index = buttonSetting[this.authorizeButtonKey].indexOf(buttonItem);
43416
- buttonSetting[this.authorizeButtonKey].splice(index, 1);
43417
- }
43418
- });
43419
- sessionStorage.setItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE, JSON.stringify(buttonSetting));
43420
- }
43421
- }
43422
- SettingAuthorizeButtonComponent.decorators = [
43423
- { type: Component, args: [{
43424
- selector: 'settings-authorize-button',
43425
- template: "<crud-list #crudList [menuButtons]=\"getMenuButtons\" [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"\n [hiddenAdd]=\"true\" [hiddenDelete]=\"true\" [hiddenCopyLink]=\"true\" (onReload)=\"_triggerProcessData($event)\"\n (onAdd)=\"_add($event)\" (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\" (onCopyLink)=\"_copyLink($event)\"\n (onCopyLinkMultiple)=\"_copyLinkMultiple()\">\n <ng-template #function let-rowData=\"rowData\">\n <button *ngIf=\"!rowData.isAuthorize\" class=\"p-button-rounded p-button-text p-button-info link-or-action\"\n type=\"button\" pButton icon=\"pi pi-plus\" pTooltip=\"Th\u00EAm m\u1EDBi\" (click)=\"addBasePermission(rowData)\"></button>\n <button *ngIf=\"rowData.isAuthorize\"\n class=\"p-button-rounded p-button-text p-button-danger p-button-info link-or-action\" type=\"button\" pButton\n icon=\"pi pi-trash\" pTooltip=\"X\u00F3a\" (click)=\"deleteBasePermission(rowData)\"></button>\n </ng-template>\n</crud-list>",
43426
- providers: [ComponentContextService],
43427
- styles: [""]
43428
- },] }
43429
- ];
43430
- SettingAuthorizeButtonComponent.ctorParameters = () => [
43431
- { type: Injector },
43432
- { type: BasePermissionService },
43433
- { type: ModuleConfigService }
43434
- ];
43435
- SettingAuthorizeButtonComponent.propDecorators = {
43436
- authorizeButtonKey: [{ type: Input }],
43437
- dataSource: [{ type: Input }]
43438
- };
43439
-
43440
44296
  class SettingsComponent extends ComponentBase {
43441
44297
  constructor(_injector, _domService, _userService) {
43442
44298
  super(_injector);
@@ -47057,161 +47913,6 @@ FileSizePipe.decorators = [
47057
47913
  },] }
47058
47914
  ];
47059
47915
 
47060
- /* eslint-disable prefer-const */
47061
- class HtmlPreviewComponent {
47062
- constructor(gs, _commonService) {
47063
- this.gs = gs;
47064
- this._commonService = _commonService;
47065
- this.control = new HtmlPreviewControlSchema();
47066
- this.onChanged = new EventEmitter();
47067
- this.content = '';
47068
- this.id = '';
47069
- this.id = this._commonService.guid();
47070
- }
47071
- // ngOnChanges(changes: SimpleChanges) {
47072
- // if (changes['content']) {
47073
- // this.renderMath();
47074
- // }
47075
- // }
47076
- writeValue(obj) {
47077
- if (obj) {
47078
- this.content = obj;
47079
- }
47080
- else {
47081
- this.content = '';
47082
- }
47083
- this.renderMath();
47084
- }
47085
- registerOnChange(fn) {
47086
- this.onChange = fn;
47087
- }
47088
- registerOnTouched(fn) {
47089
- this.onTouched = fn;
47090
- }
47091
- renderMath() {
47092
- this.mathJaxObject = this.gs.nativeGlobal()['MathJax'];
47093
- if (!this.mathJaxObject && !this.mathContent) {
47094
- return;
47095
- }
47096
- setTimeout(() => {
47097
- var _a, _b;
47098
- const $this = this;
47099
- const autoScrollBottom = !!((_a = $this.control) === null || _a === void 0 ? void 0 : _a.autoScrollBottom);
47100
- const output = $this.mathContent.nativeElement;
47101
- let content = ((_b = $this.content) === null || _b === void 0 ? void 0 : _b.trim()) || '';
47102
- if (!$this.control.isHtml) {
47103
- content = content.replace(/\n/g, '<br>');
47104
- }
47105
- output.innerHTML = content;
47106
- if ($this.mathJaxObject.texReset) {
47107
- $this.mathJaxObject.texReset();
47108
- }
47109
- if ($this.mathJaxObject.typesetClear) {
47110
- $this.mathJaxObject.typesetClear();
47111
- }
47112
- if ($this.mathJaxObject.typesetPromise) {
47113
- $this.mathJaxObject.typesetPromise([output]).catch(function (err) {
47114
- output.innerHTML = '';
47115
- output.appendChild(document.createTextNode(err.message));
47116
- console.error(err);
47117
- }).then(function () {
47118
- var _a, _b, _c;
47119
- // Do something after typeset
47120
- if (autoScrollBottom) {
47121
- const box = document.querySelector(`#math-preview-box-${$this.id}`);
47122
- const elem = box.getElementsByClassName('ps--active-y')[0];
47123
- if (elem) {
47124
- elem.scrollTop = elem.scrollHeight;
47125
- }
47126
- }
47127
- const value = (_c = (_b = (_a = document.getElementById(`mathPreview-${$this.id}`)) === null || _a === void 0 ? void 0 : _a.innerHTML) === null || _b === void 0 ? void 0 : _b.trim()) !== null && _c !== void 0 ? _c : '';
47128
- $this.onChange(value);
47129
- $this.onChanged.emit(value);
47130
- });
47131
- }
47132
- return $this.mathJaxObject.startup.defaultPageReady ? $this.mathJaxObject.startup.defaultPageReady() : $this.mathJaxObject.startup.defaultPageReady;
47133
- });
47134
- }
47135
- loadMathConfig() {
47136
- var _a, _b, _c;
47137
- const wd = this.gs.nativeGlobal();
47138
- wd.MathJax = {
47139
- 'loader': { load: ['input/asciimath', 'output/chtml', 'ui/menu', 'output/svg', '[mml]/mml3'] },
47140
- 'tex': {
47141
- inlineMath: [['$', '$'], ['\\(', '\\)']],
47142
- processEscapes: true
47143
- },
47144
- 'startup': {
47145
- pageReady: () => this.renderMath()
47146
- },
47147
- 'svg': {
47148
- scale: 1,
47149
- minScale: .5
47150
- },
47151
- 'options': {
47152
- enableMenu: !!((_a = this.control) === null || _a === void 0 ? void 0 : _a.useMathJaxMenu),
47153
- menuOptions: {
47154
- settings: {
47155
- texHints: true,
47156
- semantics: false,
47157
- zoom: 'Double-Click',
47158
- zscale: '200%',
47159
- renderer: ((_b = this.control) === null || _b === void 0 ? void 0 : _b.mathJaxType) ? this.control.mathJaxType : 'CHTML',
47160
- scale: 1,
47161
- inTabOrder: true,
47162
- assistiveMml: true,
47163
- collapsible: false,
47164
- explorer: false, // true if the expression explorer should be active
47165
- },
47166
- annotationTypes: {
47167
- TeX: ['TeX', 'LaTeX', 'application/x-tex'],
47168
- StarMath: ['StarMath 5.0'],
47169
- Maple: ['Maple'],
47170
- ContentMathML: ['MathML-Content', 'application/mathml-content+xml'],
47171
- OpenMath: ['OpenMath']
47172
- }
47173
- }
47174
- }
47175
- };
47176
- const script = document.createElement('script');
47177
- if (((_c = this.control) === null || _c === void 0 ? void 0 : _c.mathJaxType) == 'SVG') {
47178
- script.src = 'assets/vendor/mathjax/tex-mml-svg.js';
47179
- }
47180
- else {
47181
- script.src = 'assets/vendor/mathjax/tex-mml-chtml.js';
47182
- }
47183
- script.setAttribute('id', 'MathJax-script');
47184
- document.head.appendChild(script);
47185
- }
47186
- ngOnInit() {
47187
- this.loadMathConfig();
47188
- }
47189
- }
47190
- HtmlPreviewComponent.decorators = [
47191
- { type: Component, args: [{
47192
- selector: 'html-preview',
47193
- template: "<div class=\"preview-box\" id=\"math-preview-box-{{id}}\" [ngStyle]=\"{'height': control.height + 'px'}\">\n <tn-custom-scrollbar [showScrollHorizontal]=\"true\">\n <div #mathContent id=\"mathPreview-{{id}}\"></div>\n </tn-custom-scrollbar>\n</div>",
47194
- providers: [
47195
- ComponentContextService,
47196
- {
47197
- provide: NG_VALUE_ACCESSOR,
47198
- useExisting: forwardRef(() => HtmlPreviewComponent),
47199
- multi: true
47200
- },
47201
- ],
47202
- styles: ["::ng-deep html-preview .preview-box{border:1px solid #ced4da;padding:10px}"]
47203
- },] }
47204
- ];
47205
- HtmlPreviewComponent.ctorParameters = () => [
47206
- { type: GlobalService },
47207
- { type: CommonService }
47208
- ];
47209
- HtmlPreviewComponent.propDecorators = {
47210
- mathContent: [{ type: ViewChild, args: ['mathContent',] }],
47211
- control: [{ type: Input }],
47212
- onChanged: [{ type: Output }]
47213
- };
47214
-
47215
47916
  function coreDeclaration() {
47216
47917
  return [
47217
47918
  AddressComponent,
@@ -47371,7 +48072,6 @@ function coreModuleImport() {
47371
48072
  TranslateModule,
47372
48073
  TreeModule,
47373
48074
  ScrollPanelModule,
47374
- AutoCompleteModule,
47375
48075
  PaginatorModule,
47376
48076
  BlockUIModule,
47377
48077
  MenuModule,
@@ -47403,6 +48103,7 @@ function coreModuleImport() {
47403
48103
  StepsModule,
47404
48104
  ProgressSpinnerModule,
47405
48105
  DndModule,
48106
+ AutoCompleteModule,
47406
48107
  DragDropModule
47407
48108
  ];
47408
48109
  }
@@ -47507,5 +48208,5 @@ class Pair {
47507
48208
  * Generated bundle index. Do not edit.
47508
48209
  */
47509
48210
 
47510
- export { AccessDeniedComponent, Action, ActionChoYKienBase, ActionThuHoiBase, ActionUpdateModel, AddressControlSchema, AddressService, AdvanceSearchData, AdvanceSearchSetting, AfterViewCheckedComponent, AnnouncementReadsService, AnnouncementsService, AppComponentBase, AppListService, ApplicationContextService, ApprovalPipe, ArrayPair, AtLeastOneRowTableValidator, AuthenService, AuthorizeDirective, AutoCompleteControlSchema, AutoCompletePickerControlSchema, AutocompleteDatasourceComponent, AvatarUploaderComponent, BaseMenuService, BaseModule, BaseService, BooleanFormatPipe, ButtonAction, ButtonControlSchema, ButtonPermission, ButtonPermissions, ButtonTextActionCongViec, CONFIG_CALENDAR_VIETNAMESE, CalculationEngineService, CanBoHoSoService, CanBo_HoSo_CoCauToChucService, CauHinhWorkflowService, CccdValidator, CellExcel, ChatBoxComponent, ChatSendMessageBoxComponent, CheckBoxListControlSchema, CheckControlVisibleService, CheckDuplicateFieldsValidator, CheckDuplicateValidator, CheckboxControlSchema, ChipsControlSchema, ClientV5Service, CoCauToChucControlSchema, CoCauToChucNewService, CoCauToChucPickerComponent, CoCauToChucPickerControlSchema, CoCauToChucPickerControlSchemaNew, CoCauToChucService, CodeValidator, ColorBlack, ColorControlSchema, ColorPickerControlSchema, ColorWhite, Column, ColumnSchemaBase, ColumnSetting, ColumnSettingDetail, ComCtxConstants, CommandType, CommonDashboardComponent, CommonErrorCode, CommonLibComponent, CommonSearchFormComponent, CommonService, CompareValidator, ComponentBase, ComponentBaseWithButton, ComponentConstants, ComponentContextService, ConditionalBuilderService, CongViecPickerControlSchema, CongViecService, ContainerSchema, ControlTreeNode, ControlType, ConvertMoneyToWordPipe, CoreConfigService, CrudBase, CrudFormComponent, CrudFormCustomFunction, CrudFormData, CrudFormSetting, CrudListComponent, CrudListConfig, CrudListCustomFunction, CrudListData, CrudListHelper, CrudListSetting, CrudService, CustomControlSchema, CustomRouterService, CustomizeUiModel, CustomizeUiService, DanhmucApiService, DataExcel, DataFormBase, DataListBase, DataSourceControlSchema, DataSourceGioiTinh, DataSourcePermissionBase, DataSourceWorkflowCoreStatus, DataType, DateCompareValidator, DateTimeControlSchema, DateTimeRangeControlSchema, DbOrganizationOrganizationService, DbOrganizationPositionService, Deadline, DeadlineType, DhvinhGuardService, DialogModel, DmChucVuService, DmLoaiCongViecService, DomService, DownloadLinkService, DropdownComponent, DropdownControlSchema, DropdownOptions, DummyWorkflowCode, DynamicComponentService, ENUM_DON_VI_HANH_CHINH, EXPLORER_TYPES, EXPORT_VERSION_V4, EXPORT_VERSION_V5, EditFileCommand, EditorControlSchema, EformService, EmailValidator, EntityMedataDataSetting, EntityMetadataService, EntityPickerColumn, EntityPickerControlSchema, EntityWorkflowHistoryService, EntityWorkflowType, EnumActionType, EnumAppSwitcherCode, EnumCanBo, EnumControlPickerType, EnumFileLayout, EnumGetRefType, EnumGioiTinh, EnumHocHamHocVi, EnumLoaiVanBanBase$1 as EnumLoaiVanBanBase, EnumPermissionType, EnumProcessWorkflowType, EnumProperties, EnumStateType, EnumTargetType, EnumTypeSplash, EnumUserRule, EnumUserSource, EnumWFNhomTrangThai, EnumWorkflowCheckboxOption, EnumWorkflowCoreCodeSettingKey, EnumWorkflowHistoryStatus, ErrorType, EventData, EventType, ExactOneValueInTableValidator, ExportAllMode, ExportItem, ExportItemType, ExportItemsMode, ExportManyModel, ExportManyResultModel, ExportModel, ExportService, ExportWithoutTemplateModel, Extension, ExtensionsConst, FILE_TYPES, FederationService, FieldCheckboxCrudList, FieldColExpandCrudList, FieldColReorderCrudList, FieldDefineHasTask, FieldDefineIsTaskFormControl, FieldDefineIsWorkflowControl, FieldFunctionCrudList, FieldIndexInDataSource, FieldOrderCrudList, FieldRowSpan, FieldWorkflowCodeInCrudForm, FileDataService, FileExplorerService, FileExtensions, FileManagerComponent, FileManagerControlSchema, FileManagerMode, FileManagerSetting, FileObjectService, FilePickerDialogComponent, FilePickerSetting, FileType, FileTypeFlag, FileUploadComponent, FileUploadControlSchema, FileUploadMode, FileUploadSetting, FileV4Service, Filter, FolderService, FormControlBase, FormControlBaseWithService, FormSchemaBase, FormSchemaBaseWithService, FormState, Gender, GenerateLinkDownloadDTO, GenericGuardChildService, GenericGuardService, GlobalService, GmailCorrector, GridInfo, GuardService, GuardSvService, HeightType, HighPerformanceService, HighlightPipe, HoSoDoiTacService, HtmlFormatPipe, HtmlPreviewControlSchema, HttpOptions, ImageService, ImageUploaderControlSchema, Include, KeyFieldGetRefType, KeyFilterStateByMenuCongViec, KeyFlashShow, KeyFunctionReload, KeyValueComponent, KeyValueControlSchema, LabelSchema, LabelWFNhomTrangThai, LabelWorkflowCoreStatus, LengthValidator, ListHelperService, LoaiPhieuDeXuat, LocalCacheService, LowerCorrector, LstEmailValidator, MA_THONG_BAO_PHAN_HE, MaActionBatDauQuyTrinh, ManagerType, MaskControlSchema, MasterDataItem, MasterDataPipe, MasterDataService, MenuService, MenuSource, MergeConfigModel, MethodResult, ModelKySoDonVi, ModelSchema, ModuleConfigService, MultiTranslateHttpLoader, MultipleReferenceDataFormatPipe, NameValidator, NotificationObjectType, NotificationService, NotifierService, NotifierType, NumberCompareValidator, NumberOnlyValidator, NumberRangeControlSchema, Operator, OrganizationFormatPipe, OrganizationNameFormatPipe, OrganizationPickerControlSchema, OrganizationService, OrganizationsFormatPipe, PageInfo, PageSetting, Pair, PassportValidator, PasswordValidator, Pattern, PercentControlSchema, PermissionBase, PermissionConstant, PermissionName, PermissionService, PermissionStorage, PermissionTypes, PermissionUtilsComponent, PersonalSetting, PhanQuyenModel, PhoneNumberValidator, PhoneValidator, PopupSize, PositionService, PrintService, PublicFunction, QueryBuilderComponent, QueryBuilderGroupComponent, QueryBuilderRuleComponent, QueryGroup, QueryRule, RELOAD_FILE_LIST, RadioButtonListControlSchema, RandomDataService, RefField, ReferenceDataFormatPipe, ReferenceTextControlSchema, RegexSplitFieldByItem, ReponseResult, RequiredFieldsValidator, RequiredValidator, RowColorOption, RowExcel, SHARE_COMPONENT_ID, SHARE_EVENT, SafeHtmlPipe, SafeStylePipe, SafeUrlPipe, SameValueValidator, ScalarValueValidator, SchemaBase, SecurePipe, ServiceFileUploadComponent, ServiceRequestModel, ServiceRequestModelV5, SessionTypes, SharedFolderType, SignalRService, SimpleDicItem, SimpleDictionary, Sort, SortDirs, SpanControlSchema, SplashComponentComponent, StartupBusinessComponentBase, StateMachinesService, Status, StatusAction, StatusGroup, StatusOption, StatusOrg, StatusUser, StorageService, StorageUpdatedService, StringCompareOption, StringFormatPipe, SummaryPipe, SwitchControlSchema, TBL_DM_COSODAOTAO_CONSTS, TBL_DM_PHONGHOC_CONSTS, TBL_KTX_NGUOITHUE_HOSO, TBL_TS_PHIEUDEXUAT, TBL_TS_TAISANCODINH_CONSTS, TabViewData, TableSchema, TagSeparator, TaiLieuComponent, TaxCodeValidator, TemplateConstant, TemplateControlSchema, TemplateInstanceService, TemplateService, TemplateTextItem, TemplateTextMany, TemplateTextV4Service, TemplateType, TemplateV4Service, TenContainer, TextAlign, TextAreaControlSchema, TextControlSchema, TextControlSchemaWithService, TitleSchema, TnClientCommand, TnClientService, TnComponentConfig, TnCustomScrollbarComponent, TnDatePipe, TnMenu, TnMenuItem, TnReorderableColumnDirective, TnReorderableRowDirective, TnSortIcon, TnSortableColumnDirective, TnTreeTableToggler, TnUser, TnxSharedModule, TopicReloadCongViecV5, TopicReloadCountCongViecV5, TopicReloadNotification, TrangThaiMasterData, TrangThais, TreeDataOption, TreeListBase, TreeNode, TrimCorrector, TrimEndCorrector, TrimStartCorrector, TypeDanhMucAPI, UniqueFieldInTableValidator, UniqueNumberService, UpperCorrector, UserGroupRealService, UserGroupService, UserOnlineDetailsService, UserPickerControlSchema, UserPickerDialogComponent, UserPublicInfo, UserService, UserType, UserV5Service, Validation, ValueType, VanBanPickerControlSchema, ViewContainerRefDirective, VirtualBaseService, WfAction, WfItem, WfMachine, WfSchema, WorkflowConfigAdvance, WorkflowCoreStatusEnum, WorkflowFieldStateCode, WorkflowHistoryService, WorkflowPermissionDetailService, WorkflowService, WorkflowSetting, WorkflowSettingNew, WorkflowSettingsService, WorkflowTargetDefaultValue, WrapPickerControlSchema, addDay, addZero, appendDefaultFilter, clearAll, clone, cloneOld, coreDeclaration, coreModuleImport, coreProvider, dataSourceIcon, dateDiff, fileTypeSource, genQueryFromFilters, getDateFromStringDateVN, getDayOfWeek, getEnvironmentByName, getEnvironmentData, getListMenuByName, getMenuData, getMonday, getStringDate, getStringDateTime, getStringDateVN, getStringDateVNLocal, getTimeSpan, isArray, isBoolean, isDate, isFunction, isLiteralObject, isNumber, isObjectOld, isRegular, isSimpleType, isString, isValidDate, isValidTime, keyUserSurveyLocal, loadRemoteModule, loadRemotePageModule, mapProperty, maximumPageSize, mergeJSON, mergeJSONOld, moduleConfigFunc, monthDiff, multipleSort, romanize, ɵ0$2 as ɵ0, ɵ1$1 as ɵ1, ɵ2$1 as ɵ2, ɵ3, ɵ4, LoggerService as ɵa, DropdownService as ɵb, ImageUploaderComponent as ɵba, CheckBoxListComponent as ɵbb, CoCauToChucPickerListComponent as ɵbc, CoCauToChucPickerListNewComponent as ɵbd, FormBuilderComponent as ɵbe, DatetimePickerComponent as ɵbf, DatetimePickerRangeComponent as ɵbg, EntityPickerBoxComponent as ɵbh, EntityPickerDataComponent as ɵbi, EntityPickerSelectedComponent as ɵbj, EntityPickerComponent as ɵbk, EntityPickerSearchFormComponent as ɵbl, EntityPickerDialogComponent as ɵbm, EntityPickerTreeDataComponent as ɵbn, EntityPickerTreeSelectedComponent as ɵbo, EntityPermissionComponent as ɵbp, EquationEditorComponent as ɵbq, MaskComponent as ɵbr, NumberPickerRangeComponent as ɵbs, PagingNextBackOnlyComponent as ɵbt, RadioButtonListComponent as ɵbu, VanBanPickerComponent as ɵbv, VanBanDenService as ɵbw, VanBanDiService as ɵbx, VanBanPickerDialogComponent as ɵby, VanbanDiPickerComponent as ɵbz, EntityPickerService as ɵc, VanbanDenPickerComponent as ɵca, CongViecPickerComponent as ɵcb, SettingsComponent as ɵcc, SettingsRowComponent as ɵcd, ShareLinkByPermissionComponent as ɵce, TnCheckboxComponent as ɵcf, TnDialogComponent as ɵcg, TnColorPickerComponent as ɵch, TnTinymceComponent as ɵci, TnTabViewComponent as ɵcj, TableDetailFormComponent as ɵck, FileIconPipe as ɵcl, FileSizePipe as ɵcm, QuickAddFormComponent as ɵcn, PreventShiftTabDirective as ɵco, TnTemplateDirective as ɵcp, UserPickerComponent as ɵcq, UserPickerBoxComponent as ɵcr, CoCauToChucTestService as ɵcs, TnAppHelpComponent as ɵct, PathNameService as ɵcu, HelperCurrentPageComponent as ɵcv, TnAppNotificationListComponent as ɵcw, TnAppNotificationComponent as ɵcx, FolderFormComponent as ɵcy, FileFormComponent as ɵcz, ExceptionHandlerService as ɵd, FileViewerComponent as ɵda, FileVersionListComponent as ɵdb, ViewDetailComponent as ɵdc, ReferenceTextBoxComponent as ɵdd, QrCodeGeneratorComponent as ɵde, AddNewsComponent as ɵdf, ArticleService as ɵdg, NewsCategoryService as ɵdh, UniversalLinkProcessorComponent as ɵdi, SignatureDetailComponent as ɵdj, KySoSimDanhSachChuKyComponent as ɵdk, KySoSimChuKyUserService as ɵdl, FileKySoSimComponent as ɵdm, KySoSimSignPDFService as ɵdn, TaiLieuCuaToiComponent as ɵdo, KhaiThacTaiLieuDungChungComponent as ɵdp, DanhMucDungChungService as ɵdq, TnTemplateComponent as ɵdr, DropdownSettingFormComponent as ɵds, CheckReadyComponent as ɵdt, TnAccordionTabComponent as ɵdu, SettingsWorkflowComponent as ɵdv, SettingAuthorizeButtonComponent as ɵdw, BasePermissionService as ɵdx, SettingsWorkflowNo1Component as ɵdy, HtmlPreviewComponent as ɵdz, ListBase as ɵe, ListComponentBase as ɵf, TreeTableComponent as ɵg, NotFoundComponent as ɵh, SendAccessTokenInterceptor as ɵi, LogInterceptor as ɵj, PermissionUtilsInterceptor as ɵk, TraceInterceptor as ɵl, EntityPermissionService as ɵm, ChatService as ɵn, MyDriveService as ɵo, ContentsService as ɵp, StatusExtendsService as ɵq, MessageBoardService as ɵr, FileExplorerNewService as ɵs, FileVersionService as ɵt, FileManagerService as ɵu, DM_ChucVuService as ɵv, RoleService as ɵw, AddressComponent as ɵx, AdvanceSearchComponent as ɵy, AutoCompletePickerComponent as ɵz };
48211
+ export { AccessDeniedComponent, Action, ActionChoYKienBase, ActionThuHoiBase, ActionUpdateModel, AddressControlSchema, AddressService, AdvanceSearchData, AdvanceSearchSetting, AfterViewCheckedComponent, AnnouncementReadsService, AnnouncementsService, AppComponentBase, AppListService, ApplicationContextService, ApprovalPipe, ArrayPair, AtLeastOneRowTableValidator, AuthenService, AuthorizeDirective, AutoCompleteControlSchema, AutoCompletePickerControlSchema, AutocompleteDatasourceComponent, AvatarUploaderComponent, BaseMenuService, BaseModule, BaseService, BooleanFormatPipe, ButtonAction, ButtonControlSchema, ButtonPermission, ButtonPermissions, ButtonTextActionCongViec, CONFIG_CALENDAR_VIETNAMESE, CalculationEngineService, CanBoHoSoService, CanBo_HoSo_CoCauToChucService, CauHinhWorkflowService, CccdValidator, CellExcel, ChatBoxComponent, ChatSendMessageBoxComponent, CheckBoxListControlSchema, CheckControlVisibleService, CheckDuplicateFieldsValidator, CheckDuplicateValidator, CheckboxControlSchema, ChipsControlSchema, ClientV5Service, CoCauToChucControlSchema, CoCauToChucNewService, CoCauToChucPickerComponent, CoCauToChucPickerControlSchema, CoCauToChucPickerControlSchemaNew, CoCauToChucService, CodeValidator, ColorBlack, ColorControlSchema, ColorPickerControlSchema, ColorWhite, Column, ColumnSchemaBase, ColumnSetting, ColumnSettingDetail, ComCtxConstants, CommandType, CommonDashboardComponent, CommonErrorCode, CommonLibComponent, CommonSearchFormComponent, CommonService, CompareValidator, ComponentBase, ComponentBaseWithButton, ComponentConstants, ComponentContextService, ConditionalBuilderService, CongViecPickerControlSchema, CongViecService, ContainerSchema, ControlTreeNode, ControlType, ConvertMoneyToWordPipe, CoreConfigService, CrudBase, CrudFormComponent, CrudFormCustomFunction, CrudFormData, CrudFormSetting, CrudListComponent, CrudListConfig, CrudListCustomFunction, CrudListData, CrudListHelper, CrudListSetting, CrudService, CustomControlSchema, CustomRouterService, CustomizeUiModel, CustomizeUiService, DanhmucApiService, DataExcel, DataFormBase, DataListBase, DataSourceControlSchema, DataSourceGioiTinh, DataSourcePermissionBase, DataSourceWorkflowCoreStatus, DataType, DateCompareValidator, DateTimeControlSchema, DateTimeRangeControlSchema, DbOrganizationOrganizationService, DbOrganizationPositionService, Deadline, DeadlineType, DhvinhGuardService, DialogModel, DmChucVuService, DmLoaiCongViecService, DomService, DownloadLinkService, DropdownComponent, DropdownControlSchema, DropdownOptions, DummyWorkflowCode, DynamicComponentService, ENUM_DON_VI_HANH_CHINH, EXPLORER_TYPES, EXPORT_VERSION_V4, EXPORT_VERSION_V5, EditFileCommand, EditorControlSchema, EformService, EmailValidator, EntityMedataDataSetting, EntityMetadataService, EntityPickerColumn, EntityPickerControlSchema, EntityWorkflowHistoryService, EntityWorkflowType, EnumActionType, EnumAppSwitcherCode, EnumCanBo, EnumControlPickerType, EnumFileLayout, EnumGetRefType, EnumGioiTinh, EnumHocHamHocVi, EnumLoaiVanBanBase$1 as EnumLoaiVanBanBase, EnumPermissionType, EnumProcessWorkflowType, EnumProperties, EnumStateType, EnumTargetType, EnumTypeSplash, EnumUserRule, EnumUserSource, EnumWFNhomTrangThai, EnumWorkflowCheckboxOption, EnumWorkflowCoreCodeSettingKey, EnumWorkflowHistoryStatus, ErrorType, EventData, EventType, ExactOneValueInTableValidator, ExportAllMode, ExportItem, ExportItemType, ExportItemsMode, ExportManyModel, ExportManyResultModel, ExportModel, ExportService, ExportWithoutTemplateModel, Extension, ExtensionsConst, FILE_TYPES, FederationService, FieldCheckboxCrudList, FieldColExpandCrudList, FieldColReorderCrudList, FieldDefineHasTask, FieldDefineIsTaskFormControl, FieldDefineIsWorkflowControl, FieldFunctionCrudList, FieldIndexInDataSource, FieldOrderCrudList, FieldRowSpan, FieldWorkflowCodeInCrudForm, FileDataService, FileExplorerService, FileExtensions, FileManagerComponent, FileManagerControlSchema, FileManagerMode, FileManagerSetting, FileObjectService, FilePickerDialogComponent, FilePickerSetting, FileType, FileTypeFlag, FileUploadComponent, FileUploadControlSchema, FileUploadMode, FileUploadSetting, FileV4Service, Filter, FolderService, FormControlBase, FormControlBaseWithService, FormSchemaBase, FormSchemaBaseWithService, FormState, Gender, GenerateLinkDownloadDTO, GenericGuardChildService, GenericGuardService, GlobalService, GmailCorrector, GridInfo, GuardService, GuardSvService, HeightType, HighPerformanceService, HighlightPipe, HoSoDoiTacService, HtmlFormatPipe, HtmlPreviewControlSchema, HttpOptions, ImageService, ImageUploaderControlSchema, Include, KeyFieldGetRefType, KeyFilterStateByMenuCongViec, KeyFlashShow, KeyFunctionReload, KeyValueComponent, KeyValueControlSchema, LabelSchema, LabelWFNhomTrangThai, LabelWorkflowCoreStatus, LengthValidator, ListHelperService, LoaiPhieuDeXuat, LocalCacheService, LowerCorrector, LstEmailValidator, MA_THONG_BAO_PHAN_HE, MaActionBatDauQuyTrinh, ManagerType, MaskControlSchema, MasterDataItem, MasterDataPipe, MasterDataService, MenuService, MenuSource, MergeConfigModel, MethodResult, ModelKySoDonVi, ModelSchema, ModuleConfigService, MultiTranslateHttpLoader, MultipleReferenceDataFormatPipe, NameValidator, NotificationObjectType, NotificationService, NotifierService, NotifierType, NumberCompareValidator, NumberOnlyValidator, NumberRangeControlSchema, Operator, OrganizationFormatPipe, OrganizationNameFormatPipe, OrganizationPickerControlSchema, OrganizationService, OrganizationsFormatPipe, PageInfo, PageSetting, Pair, PassportValidator, PasswordValidator, Pattern, PercentControlSchema, PermissionBase, PermissionConstant, PermissionName, PermissionService, PermissionStorage, PermissionTypes, PermissionUtilsComponent, PersonalSetting, PhanQuyenModel, PhoneNumberValidator, PhoneValidator, PopupSize, PositionService, PrintService, PublicFunction, QueryBuilderComponent, QueryBuilderGroupComponent, QueryBuilderRuleComponent, QueryGroup, QueryRule, RELOAD_FILE_LIST, RadioButtonListControlSchema, RandomDataService, RefField, ReferenceDataFormatPipe, ReferenceTextControlSchema, RegexSplitFieldByItem, ReponseResult, RequiredFieldsValidator, RequiredValidator, RowColorOption, RowExcel, SHARE_COMPONENT_ID, SHARE_EVENT, SafeHtmlPipe, SafeStylePipe, SafeUrlPipe, SameValueValidator, ScalarValueValidator, SchemaBase, SecurePipe, ServiceFileUploadComponent, ServiceRequestModel, ServiceRequestModelV5, SessionTypes, SharedFolderType, SignalRService, SimpleDicItem, SimpleDictionary, Sort, SortDirs, SpanControlSchema, SplashComponentComponent, StartupBusinessComponentBase, StateMachinesService, Status, StatusAction, StatusGroup, StatusOption, StatusOrg, StatusUser, StorageService, StorageUpdatedService, StringCompareOption, StringFormatPipe, SummaryPipe, SwitchControlSchema, TBL_DM_COSODAOTAO_CONSTS, TBL_DM_PHONGHOC_CONSTS, TBL_KTX_NGUOITHUE_HOSO, TBL_TS_PHIEUDEXUAT, TBL_TS_TAISANCODINH_CONSTS, TabViewData, TableSchema, TagSeparator, TaiLieuComponent, TaxCodeValidator, TemplateConstant, TemplateControlSchema, TemplateInstanceService, TemplateService, TemplateTextItem, TemplateTextMany, TemplateTextV4Service, TemplateType, TemplateV4Service, TenContainer, TextAlign, TextAreaControlSchema, TextControlSchema, TextControlSchemaWithService, TitleSchema, TnClientCommand, TnClientService, TnComponentConfig, TnCustomScrollbarComponent, TnDatePipe, TnMenu, TnMenuItem, TnReorderableColumnDirective, TnReorderableRowDirective, TnSortIcon, TnSortableColumnDirective, TnTreeTableToggler, TnUser, TnxSharedModule, TopicReloadCongViecV5, TopicReloadCountCongViecV5, TopicReloadNotification, TrangThaiMasterData, TrangThais, TreeDataOption, TreeListBase, TreeNode, TrimCorrector, TrimEndCorrector, TrimStartCorrector, TypeDanhMucAPI, UniqueFieldInTableValidator, UniqueNumberService, UpperCorrector, UserGroupRealService, UserGroupService, UserOnlineDetailsService, UserPickerControlSchema, UserPickerDialogComponent, UserPublicInfo, UserService, UserType, UserV5Service, Validation, ValueType, VanBanPickerControlSchema, ViewContainerRefDirective, VirtualBaseService, WfAction, WfItem, WfMachine, WfSchema, WorkflowConfigAdvance, WorkflowCoreStatusEnum, WorkflowFieldStateCode, WorkflowHistoryService, WorkflowPermissionDetailService, WorkflowService, WorkflowSetting, WorkflowSettingNew, WorkflowSettingsService, WorkflowTargetDefaultValue, WrapPickerControlSchema, addDay, addZero, appendDefaultFilter, clearAll, clone, cloneOld, coreDeclaration, coreModuleImport, coreProvider, dataSourceIcon, dateDiff, fileTypeSource, genQueryFromFilters, getDateFromStringDateVN, getDayOfWeek, getEnvironmentByName, getEnvironmentData, getListMenuByName, getMenuData, getMonday, getStringDate, getStringDateTime, getStringDateVN, getStringDateVNLocal, getTimeSpan, isArray, isBoolean, isDate, isFunction, isLiteralObject, isNumber, isObjectOld, isRegular, isSimpleType, isString, isValidDate, isValidTime, keyUserSurveyLocal, loadRemoteModule, loadRemotePageModule, mapProperty, maximumPageSize, mergeJSON, mergeJSONOld, moduleConfigFunc, monthDiff, multipleSort, romanize, ɵ0$2 as ɵ0, ɵ1$1 as ɵ1, ɵ2$1 as ɵ2, ɵ3, ɵ4, LoggerService as ɵa, DropdownService as ɵb, ImageUploaderComponent as ɵba, CheckBoxListComponent as ɵbb, CoCauToChucPickerListComponent as ɵbc, CoCauToChucPickerListNewComponent as ɵbd, FormBuilderComponent as ɵbe, DatetimePickerComponent as ɵbf, DatetimePickerRangeComponent as ɵbg, EntityPickerBoxComponent as ɵbh, EntityPickerDataComponent as ɵbi, EntityPickerSelectedComponent as ɵbj, EntityPickerComponent as ɵbk, EntityPickerSearchFormComponent as ɵbl, EntityPickerDialogComponent as ɵbm, EntityPickerTreeDataComponent as ɵbn, EntityPickerTreeSelectedComponent as ɵbo, EntityPermissionComponent as ɵbp, EquationEditorComponent as ɵbq, MaskComponent as ɵbr, NumberPickerRangeComponent as ɵbs, PagingNextBackOnlyComponent as ɵbt, RadioButtonListComponent as ɵbu, VanBanPickerComponent as ɵbv, VanBanDenService as ɵbw, VanBanDiService as ɵbx, VanBanPickerDialogComponent as ɵby, VanbanDiPickerComponent as ɵbz, EntityPickerService as ɵc, VanbanDenPickerComponent as ɵca, CongViecPickerComponent as ɵcb, SettingsComponent as ɵcc, SettingsRowComponent as ɵcd, ShareLinkByPermissionComponent as ɵce, TnCheckboxComponent as ɵcf, TnDialogComponent as ɵcg, TnColorPickerComponent as ɵch, TnTinymceComponent as ɵci, TnTabViewComponent as ɵcj, TableDetailFormComponent as ɵck, FileIconPipe as ɵcl, FileSizePipe as ɵcm, QuickAddFormComponent as ɵcn, PreventShiftTabDirective as ɵco, TnTemplateDirective as ɵcp, UserPickerComponent as ɵcq, UserPickerBoxComponent as ɵcr, CoCauToChucTestService as ɵcs, TnAppHelpComponent as ɵct, PathNameService as ɵcu, HelperCurrentPageComponent as ɵcv, TnAppNotificationListComponent as ɵcw, TnAppNotificationComponent as ɵcx, FolderFormComponent as ɵcy, FileFormComponent as ɵcz, ExceptionHandlerService as ɵd, FileViewerComponent as ɵda, FileVersionListComponent as ɵdb, ViewDetailComponent as ɵdc, ReferenceTextBoxComponent as ɵdd, QrCodeGeneratorComponent as ɵde, AddNewsComponent as ɵdf, ArticleService as ɵdg, NewsCategoryService as ɵdh, UniversalLinkProcessorComponent as ɵdi, SignatureDetailComponent as ɵdj, KySoSimDanhSachChuKyComponent as ɵdk, KySoSimChuKyUserService as ɵdl, FileKySoSimComponent as ɵdm, KySoSimSignPDFService as ɵdn, TaiLieuCuaToiComponent as ɵdo, KhaiThacTaiLieuDungChungComponent as ɵdp, DanhMucDungChungService as ɵdq, TnTemplateComponent as ɵdr, DropdownSettingFormComponent as ɵds, CheckReadyComponent as ɵdt, TnAccordionTabComponent as ɵdu, SettingsWorkflowComponent as ɵdv, SettingAuthorizeButtonComponent as ɵdw, BasePermissionService as ɵdx, SettingsWorkflowNo1Component as ɵdy, HtmlPreviewComponent as ɵdz, ListBase as ɵe, AUTOCOMPLETE_VALUE_ACCESSOR as ɵea, AutoComplete as ɵeb, AutoCompleteModule as ɵec, ListComponentBase as ɵf, TreeTableComponent as ɵg, NotFoundComponent as ɵh, SendAccessTokenInterceptor as ɵi, LogInterceptor as ɵj, PermissionUtilsInterceptor as ɵk, TraceInterceptor as ɵl, EntityPermissionService as ɵm, ChatService as ɵn, MyDriveService as ɵo, ContentsService as ɵp, StatusExtendsService as ɵq, MessageBoardService as ɵr, FileExplorerNewService as ɵs, FileVersionService as ɵt, FileManagerService as ɵu, DM_ChucVuService as ɵv, RoleService as ɵw, AddressComponent as ɵx, AdvanceSearchComponent as ɵy, AutoCompletePickerComponent as ɵz };
47511
48212
  //# sourceMappingURL=tnx-shared.js.map