tnx-shared 5.1.455 → 5.1.457
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/tnx-shared.umd.js +97 -4
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/components/common-search-form/common-search-form.component.d.ts +1 -0
- package/components/common-search-form/common-search-form.component.d.ts.map +1 -1
- package/components/tn-accordion-tab/tn-accordion-tab.component.d.ts +23 -0
- package/components/tn-accordion-tab/tn-accordion-tab.component.d.ts.map +1 -0
- package/components/tn-accordion-tab/tn-accordion-tab.component.ngfactory.d.ts.map +1 -0
- package/components/tn-accordion-tab/tn-accordion-tab.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/esm2015/components/common-search-form/common-search-form.component.js +15 -4
- package/esm2015/components/crud/crud-form/crud-form.component.js +2 -2
- package/esm2015/components/tn-accordion-tab/tn-accordion-tab.component.js +80 -0
- package/esm2015/tnx-shared.js +2 -1
- package/esm2015/tnx-shared.module.js +3 -1
- package/fesm2015/tnx-shared.js +95 -5
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.d.ts +1 -0
- package/tnx-shared.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
- package/tnx-shared.module.d.ts +2 -1
- package/tnx-shared.module.d.ts.map +1 -1
- package/tnx-shared.module.ngfactory.d.ts.map +1 -1
|
@@ -14179,7 +14179,7 @@
|
|
|
14179
14179
|
var e_5, _e;
|
|
14180
14180
|
if (isLiteralObject(model)) {
|
|
14181
14181
|
if (model._dropdownvalue != null && model._dropdownvalue !== '') {
|
|
14182
|
-
return model[model._dropdownvalue]
|
|
14182
|
+
return model[model._dropdownvalue] == null ? model['value'] : model[model._dropdownvalue];
|
|
14183
14183
|
}
|
|
14184
14184
|
var data = {};
|
|
14185
14185
|
for (var key in model) {
|
|
@@ -48524,6 +48524,7 @@
|
|
|
48524
48524
|
_this.isOpenFull = false;
|
|
48525
48525
|
_this.isCustomGenerateSearch = false;
|
|
48526
48526
|
_this.isDisableOpenFull = false;
|
|
48527
|
+
_this.searchBoxTooltip = 'Tìm kiếm theo các trường: ';
|
|
48527
48528
|
return _this;
|
|
48528
48529
|
}
|
|
48529
48530
|
CommonSearchFormComponent.prototype.ngOnInit = function () {
|
|
@@ -48542,8 +48543,18 @@
|
|
|
48542
48543
|
this.setting.schema = this.addSearchBox(this.parentSetting.commonSchemas);
|
|
48543
48544
|
}
|
|
48544
48545
|
else {
|
|
48545
|
-
var columnFilters = this.parentSetting.cols.filter(function (p) { return p.allowFilter && !p.field.startsWith('str'); })
|
|
48546
|
-
|
|
48546
|
+
var columnFilters = this.parentSetting.cols.filter(function (p) { return p.allowFilter && !p.field.startsWith('str'); }).sort(function (a, b) {
|
|
48547
|
+
if (a.order < b.order) {
|
|
48548
|
+
return -1;
|
|
48549
|
+
}
|
|
48550
|
+
if (a.order > b.order) {
|
|
48551
|
+
return 1;
|
|
48552
|
+
}
|
|
48553
|
+
return 0;
|
|
48554
|
+
});
|
|
48555
|
+
var lstTextSearchControl = columnFilters.filter(function (p) { return p.fullTextSearch; });
|
|
48556
|
+
this.lstTextControl = lstTextSearchControl.map(function (p) { return p.field; });
|
|
48557
|
+
this.searchBoxTooltip += "" + (lstTextSearchControl.map(function (x) { return x.label; })).join(', ');
|
|
48547
48558
|
this.setting.schema = this.genFormSchema(columnFilters);
|
|
48548
48559
|
}
|
|
48549
48560
|
this.isDisableOpenFull = this.setting.schema.length <= 4 && !this._commonService.isMobile();
|
|
@@ -48740,7 +48751,7 @@
|
|
|
48740
48751
|
CommonSearchFormComponent.decorators = [
|
|
48741
48752
|
{ type: i0.Component, args: [{
|
|
48742
48753
|
selector: 'common-search-form',
|
|
48743
|
-
template: "<div #commonSearchTemplate class=\"p-grid box-common-search\" [ngClass]=\"{'open-full': isOpenFull} \">\n <div class=\"container-control no-label p-md-12 cs-pb-1\">\n <span class=\"label\"></span>\n <div>\n <crud-form #crudForm [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\" [(data)]=\"model.data\"\n (onFormReady)=\"_handleFormReady($event)\">\n <ng-template #keyword>\n <div class=\"search-box\">\n <input type=\"text\" pInputText class=\"link-or-action\" [placeholder]=\"'T\u1EEB kh\u00F3a'\"\n [(ngModel)]=\"keywords\" />\n <div class=\"cs-flex-evenly buttons\">\n <span [pTooltip]=\"'X\u00F3a b\u1ED9 l\u1ECDc'\" tooltipPosition=\"top\" (click)=\"clearFilter()\">\n <i class=\"pi pi-filter-slash\"></i>\n </span>\n <span [pTooltip]=\"'T\u00ECm ki\u1EBFm'\" tooltipPosition=\"top\" (click)=\"handleSearch()\">\n <i class=\"pi pi-search\"></i>\n </span>\n <span *ngIf=\"!isDisableOpenFull\" [pTooltip]=\"isOpenFull ? 'Thu g\u1ECDn' : 'M\u1EDF r\u1ED9ng'\"\n tooltipPosition=\"top\" (click)=\"toggleMenuSearch()\">\n <i [ngClass]=\"isOpenFull ? 'pi pi-caret-up' : 'pi pi-caret-down'\"></i>\n </span>\n </div>\n </div>\n </ng-template>\n </crud-form>\n </div>\n </div>\n</div>",
|
|
48754
|
+
template: "<div #commonSearchTemplate class=\"p-grid box-common-search\" [ngClass]=\"{'open-full': isOpenFull} \">\n <div class=\"container-control no-label p-md-12 cs-pb-1\">\n <span class=\"label\"></span>\n <div>\n <crud-form #crudForm [setting]=\"setting\" [context]=\"context\" [disableCaching]=\"true\" [(data)]=\"model.data\"\n (onFormReady)=\"_handleFormReady($event)\">\n <ng-template #keyword>\n <div class=\"search-box\">\n <input type=\"text\" pInputText class=\"link-or-action\" [placeholder]=\"'T\u1EEB kh\u00F3a'\"\n tooltipStyleClass=\"wrap max-width-300\" tooltipPosition=\"top\" [pTooltip]=\"searchBoxTooltip\"\n [(ngModel)]=\"keywords\" (keyup.esc)=\"handleSearch()\" />\n <div class=\"cs-flex-evenly buttons\">\n <span [pTooltip]=\"'X\u00F3a b\u1ED9 l\u1ECDc'\" tooltipPosition=\"top\" (click)=\"clearFilter()\">\n <i class=\"pi pi-filter-slash\"></i>\n </span>\n <span [pTooltip]=\"'T\u00ECm ki\u1EBFm'\" tooltipPosition=\"top\" (click)=\"handleSearch()\">\n <i class=\"pi pi-search\"></i>\n </span>\n <span *ngIf=\"!isDisableOpenFull\" [pTooltip]=\"isOpenFull ? 'Thu g\u1ECDn' : 'M\u1EDF r\u1ED9ng'\"\n tooltipPosition=\"top\" (click)=\"toggleMenuSearch()\">\n <i [ngClass]=\"isOpenFull ? 'pi pi-caret-up' : 'pi pi-caret-down'\"></i>\n </span>\n </div>\n </div>\n </ng-template>\n </crud-form>\n </div>\n </div>\n</div>",
|
|
48744
48755
|
providers: [ComponentContextService],
|
|
48745
48756
|
styles: [".cs-pb-1{padding-bottom:.25rem!important}.bg-input{position:relative}.bg-input button{position:absolute;top:0;right:0}.pointer-none{pointer-events:none}.cs-flex-evenly{display:flex;align-items:center;justify-content:space-evenly}.box-common-search{position:relative;height:60px;overflow:hidden;transition:all .5s ease-in-out}.box-common-search.open-full{height:auto}.search-box{background:#fff;border:1px solid #d2d2d2;border-radius:5px;display:flex;justify-content:space-between}.search-box:hover{border-color:#397ac3;box-shadow:0 0 0 .2rem #a6d5fa}.search-box input{max-width:270px;box-shadow:none;border:0}.search-box span{cursor:pointer;padding:.5rem}"]
|
|
48746
48757
|
},] }
|
|
@@ -56177,6 +56188,86 @@
|
|
|
56177
56188
|
viewOnly: [{ type: i0.Input }]
|
|
56178
56189
|
};
|
|
56179
56190
|
|
|
56191
|
+
var TnAccordionTabComponent = /** @class */ (function () {
|
|
56192
|
+
function TnAccordionTabComponent(_commonService) {
|
|
56193
|
+
this._commonService = _commonService;
|
|
56194
|
+
this.data = [];
|
|
56195
|
+
this.onOpenedTab = new i0.EventEmitter();
|
|
56196
|
+
this.onClosedTab = new i0.EventEmitter();
|
|
56197
|
+
this.template = {};
|
|
56198
|
+
this.activeIndex = [];
|
|
56199
|
+
}
|
|
56200
|
+
TnAccordionTabComponent.prototype.ngOnInit = function () {
|
|
56201
|
+
var activeIndexes = [];
|
|
56202
|
+
this.data.filter(function (q) { return q.active; }).forEach(function (item) {
|
|
56203
|
+
item.loaded = true;
|
|
56204
|
+
activeIndexes.push(item.index);
|
|
56205
|
+
});
|
|
56206
|
+
this.activeIndex = activeIndexes;
|
|
56207
|
+
};
|
|
56208
|
+
TnAccordionTabComponent.prototype.ngAfterContentInit = function () {
|
|
56209
|
+
var _this = this;
|
|
56210
|
+
this.data.forEach(function (item) {
|
|
56211
|
+
_this.template[item.code] = _this._commonService.findTemplateFromList(_this.children, item.code);
|
|
56212
|
+
});
|
|
56213
|
+
};
|
|
56214
|
+
TnAccordionTabComponent.prototype.onOpenTab = function (evt) {
|
|
56215
|
+
var item = this.data.find(function (x) { return x.index == evt.index; });
|
|
56216
|
+
item.loaded = true;
|
|
56217
|
+
item.expanded = true;
|
|
56218
|
+
item.active = true;
|
|
56219
|
+
this.activeIndex.push(item.index);
|
|
56220
|
+
this.onOpenedTab.emit(item);
|
|
56221
|
+
};
|
|
56222
|
+
TnAccordionTabComponent.prototype.onCloseTab = function (evt) {
|
|
56223
|
+
var item = this.data.find(function (x) { return x.index == evt.index; });
|
|
56224
|
+
item.loaded = true;
|
|
56225
|
+
item.expanded = false;
|
|
56226
|
+
item.active = false;
|
|
56227
|
+
this.activeIndex = this.activeIndex.filter(function (q) { return q != evt.index; });
|
|
56228
|
+
this.onClosedTab.emit(item);
|
|
56229
|
+
};
|
|
56230
|
+
TnAccordionTabComponent.prototype.activeTab = function (item) {
|
|
56231
|
+
this.data.forEach(function (item) {
|
|
56232
|
+
item.expanded = false;
|
|
56233
|
+
item.active = false;
|
|
56234
|
+
});
|
|
56235
|
+
item.expanded = true;
|
|
56236
|
+
item.loaded = true;
|
|
56237
|
+
item.active = true;
|
|
56238
|
+
this.activeIndex = [item.index];
|
|
56239
|
+
};
|
|
56240
|
+
TnAccordionTabComponent.prototype.expandAll = function () {
|
|
56241
|
+
var indexes = [];
|
|
56242
|
+
this.data.forEach(function (item) {
|
|
56243
|
+
item.expanded = true;
|
|
56244
|
+
item.loaded = true;
|
|
56245
|
+
item.active = true;
|
|
56246
|
+
indexes.push(item.index);
|
|
56247
|
+
});
|
|
56248
|
+
this.activeIndex = indexes;
|
|
56249
|
+
};
|
|
56250
|
+
return TnAccordionTabComponent;
|
|
56251
|
+
}());
|
|
56252
|
+
TnAccordionTabComponent.decorators = [
|
|
56253
|
+
{ type: i0.Component, args: [{
|
|
56254
|
+
selector: 'tn-accordion-tab',
|
|
56255
|
+
template: "<div class=\"tn-l-toolbar\">\n <ng-container *ngTemplateOutlet=\"contentBeforeLink\"></ng-container>\n <div class=\"accordion-link\">\n <ul>\n <li *ngFor=\"let item of data\" [ngClass]=\"{'tab-active': item.active}\" [pTooltip]=\"item.header\"\n tooltipPosition=\"top\" (click)=\"activeTab(item)\" class=\"tn-l-custom-paginator\">\n {{item.index + 1}}</li>\n <li [ngClass]=\"{'tab-active': activeIndex && activeIndex.length == data.length}\" (click)=\"expandAll()\"\n class=\"tn-l-custom-paginator\">T\u1EA5t c\u1EA3\n </li>\n </ul>\n </div>\n</div>\n<div class=\"clearfix\"></div>\n<ng-container *ngTemplateOutlet=\"contentBeforeTabList\"></ng-container>\n<div class=\"tn-l-p-accordion-wrapper\">\n <tn-custom-scrollbar #scrollbar class=\"tn-l-p-accordion-scroller tn-scroll-bar --has-border\">\n <p-accordion [(activeIndex)]=\"activeIndex\" (onOpen)=\"onOpenTab($event)\" (onClose)=\"onCloseTab($event)\"\n [multiple]=\"true\">\n <p-accordionTab [selected]=\"item.expanded\" *ngFor=\"let item of data; let i = index\">\n <ng-template pTemplate=\"header\">\n <span class=\"tab-number\" [class.active]=\"item.active\">{{i + 1}}</span> {{item.header}}\n </ng-template>\n <ng-container *ngIf=\"item.loaded\">\n <ng-container *ngTemplateOutlet=\"template[item.code]; context: {$implicit: item}\">\n </ng-container>\n </ng-container>\n </p-accordionTab>\n </p-accordion>\n </tn-custom-scrollbar>\n</div>",
|
|
56256
|
+
styles: [".accordion-link{flex:1 1;text-align:right}.accordion-link ul{padding-left:0;list-style:none;margin-top:0;margin-bottom:0}.accordion-link ul li{border-radius:4px;display:inline-block;padding:6px 12px;line-height:20px;background-color:#a4a5a4;color:#fff;margin-left:.5rem;margin-bottom:.5rem;transition:all .3s ease-out}.accordion-link ul li:hover{cursor:pointer;background-color:#3db762}.accordion-link ul li.tab-active{background-color:#23a349}.tn-l-toolbar{padding:.5rem .5rem 0;display:flex}.hoso-container{max-height:none;height:auto}.tab-number{background:#a4a5a4;color:#fff;margin-right:.5rem;font-size:.9em;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:2px;padding-top:2px}.tab-number.active{background:#23a349}::ng-deep tn-accordion-tab{display:flex;flex-direction:column;height:100%}::ng-deep tn-accordion-tab .p-accordion-header{position:sticky;top:1px;z-index:6}::ng-deep tn-accordion-tab .tn-l-p-accordion-wrapper{display:flex;flex:1;overflow:auto;border-radius:4px;margin-left:.5rem;margin-right:.5rem}::ng-deep tn-accordion-tab .tn-l-p-accordion-wrapper tn-custom-scrollbar{width:100%}::ng-deep tn-accordion-tab .ps__rail-x,::ng-deep tn-accordion-tab .ps__rail-y{z-index:7}::ng-deep tn-accordion-tab .tn-l-toolbar .toolbar{flex:0 0 auto;padding-top:0}@media (max-width:640px){.accordion-link,.toolbar{white-space:nowrap;overflow-x:auto}.tn-l-custom-wrapper{display:block}.accordion-link ul{margin-top:0}.tn-l-toolbar{display:block}}"]
|
|
56257
|
+
},] }
|
|
56258
|
+
];
|
|
56259
|
+
TnAccordionTabComponent.ctorParameters = function () { return [
|
|
56260
|
+
{ type: CommonService }
|
|
56261
|
+
]; };
|
|
56262
|
+
TnAccordionTabComponent.propDecorators = {
|
|
56263
|
+
children: [{ type: i0.ContentChildren, args: [i0.TemplateRef,] }],
|
|
56264
|
+
contentBeforeLink: [{ type: i0.ContentChild, args: ['contentBeforeLink',] }],
|
|
56265
|
+
contentBeforeTabList: [{ type: i0.ContentChild, args: ['contentBeforeTabList',] }],
|
|
56266
|
+
data: [{ type: i0.Input }],
|
|
56267
|
+
onOpenedTab: [{ type: i0.Output }],
|
|
56268
|
+
onClosedTab: [{ type: i0.Output }]
|
|
56269
|
+
};
|
|
56270
|
+
|
|
56180
56271
|
var PipeLine = /** @class */ (function () {
|
|
56181
56272
|
function PipeLine() {
|
|
56182
56273
|
this.intervalLeft = 0;
|
|
@@ -62963,6 +63054,7 @@
|
|
|
62963
63054
|
DropdownSettingFormComponent,
|
|
62964
63055
|
CheckReadyComponent,
|
|
62965
63056
|
WorkflowButtonComponent,
|
|
63057
|
+
TnAccordionTabComponent
|
|
62966
63058
|
];
|
|
62967
63059
|
}
|
|
62968
63060
|
function coreModuleImport() {
|
|
@@ -63711,6 +63803,7 @@
|
|
|
63711
63803
|
exports["ɵfs"] = DropdownSettingFormComponent;
|
|
63712
63804
|
exports["ɵft"] = CheckReadyComponent;
|
|
63713
63805
|
exports["ɵfu"] = WorkflowButtonComponent;
|
|
63806
|
+
exports["ɵfv"] = TnAccordionTabComponent;
|
|
63714
63807
|
exports["ɵg"] = ListComponentBase;
|
|
63715
63808
|
exports["ɵh"] = TreeTableComponent;
|
|
63716
63809
|
exports["ɵi"] = UniversalLinkProcessorComponent;
|