@sd-angular/core 1.0.44 → 1.0.47
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/assets/scss/core/toastr.scss +1 -0
- package/bundles/sd-angular-core-grid-material.umd.js +315 -297
- package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
- package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
- package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-notify.umd.js +15 -6
- package/bundles/sd-angular-core-notify.umd.js.map +1 -1
- package/bundles/sd-angular-core-notify.umd.min.js +2 -2
- package/bundles/sd-angular-core-notify.umd.min.js.map +1 -1
- package/bundles/sd-angular-core-popover.umd.js +704 -0
- package/bundles/sd-angular-core-popover.umd.js.map +1 -0
- package/bundles/sd-angular-core-popover.umd.min.js +16 -0
- package/bundles/sd-angular-core-popover.umd.min.js.map +1 -0
- package/bundles/sd-angular-core.umd.js +12 -4
- package/bundles/sd-angular-core.umd.js.map +1 -1
- package/bundles/sd-angular-core.umd.min.js +1 -1
- package/bundles/sd-angular-core.umd.min.js.map +1 -1
- package/esm2015/grid-material/sd-angular-core-grid-material.js +18 -19
- package/esm2015/grid-material/src/lib/components/desktop-cell-children-view/desktop-cell-children-view.component.js +2 -2
- package/esm2015/grid-material/src/lib/grid-material.component.js +20 -21
- package/esm2015/grid-material/src/lib/grid-material.module.js +2 -3
- package/esm2015/grid-material/src/lib/models/grid-column.model.js +1 -1
- package/esm2015/grid-material/src/lib/models/grid.model.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/cell-view.pipe.js +8 -9
- package/esm2015/grid-material/src/lib/pipes/column-badge.pipe.js +1 -1
- package/esm2015/grid-material/src/lib/pipes/column-transform.pipe.js +8 -9
- package/esm2015/grid-material/src/lib/pipes/column-values.pipe.js +35 -12
- package/esm2015/notify/src/lib/notify.service.js +18 -9
- package/esm2015/popover/index.js +2 -0
- package/esm2015/popover/sd-angular-core-popover.js +5 -0
- package/esm2015/popover/src/lib/directives/popover-trigger.directive.js +218 -0
- package/esm2015/popover/src/lib/popover/popover.component.js +122 -0
- package/esm2015/popover/src/lib/popover.model.js +2 -0
- package/esm2015/popover/src/lib/popover.module.js +24 -0
- package/esm2015/popover/src/public-api.js +7 -0
- package/esm2015/public-api.js +2 -1
- package/fesm2015/sd-angular-core-grid-material.js +83 -117
- package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
- package/fesm2015/sd-angular-core-notify.js +17 -8
- package/fesm2015/sd-angular-core-notify.js.map +1 -1
- package/fesm2015/sd-angular-core-popover.js +369 -0
- package/fesm2015/sd-angular-core-popover.js.map +1 -0
- package/fesm2015/sd-angular-core.js +1 -0
- package/fesm2015/sd-angular-core.js.map +1 -1
- package/grid-material/sd-angular-core-grid-material.d.ts +17 -18
- package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
- package/grid-material/src/lib/grid-material.component.d.ts +4 -3
- package/grid-material/src/lib/models/grid-column.model.d.ts +2 -2
- package/grid-material/src/lib/pipes/cell-view.pipe.d.ts +3 -3
- package/grid-material/src/lib/pipes/column-transform.pipe.d.ts +3 -3
- package/grid-material/src/lib/pipes/column-values.pipe.d.ts +2 -4
- package/package.json +1 -1
- package/popover/index.d.ts +1 -0
- package/popover/package.json +12 -0
- package/popover/sd-angular-core-popover.d.ts +4 -0
- package/popover/sd-angular-core-popover.metadata.json +1 -0
- package/popover/src/lib/directives/popover-trigger.directive.d.ts +25 -0
- package/popover/src/lib/popover/popover.component.d.ts +34 -0
- package/popover/src/lib/popover.model.d.ts +1 -0
- package/popover/src/lib/popover.module.d.ts +2 -0
- package/popover/src/public-api.d.ts +3 -0
- package/public-api.d.ts +1 -0
- package/{sd-angular-core-1.0.44.tgz → sd-angular-core-1.0.47.tgz} +0 -0
- package/sd-angular-core.metadata.json +1 -1
- package/esm2015/grid-material/src/lib/services/grid.service.js +0 -59
- package/grid-material/src/lib/services/grid.service.d.ts +0 -19
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { PopoverComponent } from './popover/popover.component';
|
|
4
|
+
import { PopoverTriggerDirective } from './directives/popover-trigger.directive';
|
|
5
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
6
|
+
export class SdPopoverModule {
|
|
7
|
+
}
|
|
8
|
+
SdPopoverModule.decorators = [
|
|
9
|
+
{ type: NgModule, args: [{
|
|
10
|
+
declarations: [
|
|
11
|
+
PopoverComponent,
|
|
12
|
+
PopoverTriggerDirective
|
|
13
|
+
],
|
|
14
|
+
imports: [
|
|
15
|
+
CommonModule,
|
|
16
|
+
A11yModule
|
|
17
|
+
],
|
|
18
|
+
exports: [
|
|
19
|
+
PopoverComponent,
|
|
20
|
+
PopoverTriggerDirective
|
|
21
|
+
]
|
|
22
|
+
},] }
|
|
23
|
+
];
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicG9wb3Zlci5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiQzovVXNlcnMvdXNlci9Eb2N1bWVudHMvbGliLWNvcmUtdWkvcHJvamVjdHMvc2QtY29yZS9wb3BvdmVyLyIsInNvdXJjZXMiOlsic3JjL2xpYi9wb3BvdmVyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUMvRCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSx3Q0FBd0MsQ0FBQztBQUNqRixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFrQ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dWxlIHsgfVxyXG4iXX0=
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of superdev-angular-core
|
|
3
|
+
*/
|
|
4
|
+
export { SdPopoverModule } from './lib/popover.module';
|
|
5
|
+
export * from './lib/popover/popover.component';
|
|
6
|
+
export * from './lib/directives/popover-trigger.directive';
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJDOi9Vc2Vycy91c2VyL0RvY3VtZW50cy9saWItY29yZS11aS9wcm9qZWN0cy9zZC1jb3JlL3BvcG92ZXIvIiwic291cmNlcyI6WyJzcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUV2RCxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsNENBQTRDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2Ygc3VwZXJkZXYtYW5ndWxhci1jb3JlXHJcbiAqL1xyXG5cclxuZXhwb3J0IHsgU2RQb3BvdmVyTW9kdWxlIH0gZnJvbSAnLi9saWIvcG9wb3Zlci5tb2R1bGUnO1xyXG5cclxuZXhwb3J0ICogZnJvbSAnLi9saWIvcG9wb3Zlci9wb3BvdmVyLmNvbXBvbmVudCc7XHJcbmV4cG9ydCAqIGZyb20gJy4vbGliL2RpcmVjdGl2ZXMvcG9wb3Zlci10cmlnZ2VyLmRpcmVjdGl2ZSc7XHJcbiJdfQ==
|
package/esm2015/public-api.js
CHANGED
|
@@ -43,4 +43,5 @@ export * from '@sd-angular/core/switch';
|
|
|
43
43
|
export * from '@sd-angular/core/radio';
|
|
44
44
|
export * from '@sd-angular/core/form';
|
|
45
45
|
export * from '@sd-angular/core/service';
|
|
46
|
-
|
|
46
|
+
export * from '@sd-angular/core/popover';
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiJDOi9Vc2Vycy91c2VyL0RvY3VtZW50cy9saWItY29yZS11aS9wcm9qZWN0cy9zZC1jb3JlL3NyYy8iLCJzb3VyY2VzIjpbInB1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyx5QkFBeUIsQ0FBQztBQUNqQyxPQUFPLHdCQUF3QixDQUFDO0FBQ2hDLE9BQU8sb0NBQW9DLENBQUM7QUFDNUMsT0FBTyx1QkFBdUIsQ0FBQztBQUMvQixPQUFPLDJCQUEyQixDQUFDO0FBQ25DLE9BQU8sMkJBQTJCLENBQUM7QUFDbkMsT0FBTyx1QkFBdUIsQ0FBQztBQUMvQixPQUFPLDhCQUE4QixDQUFDO0FBQ3RDLE9BQU8sNkJBQTZCLENBQUM7QUFDckMsT0FBTyx3QkFBd0IsQ0FBQztBQUNoQyxPQUFPLHdCQUF3QixDQUFDO0FBQ2hDLE9BQU8seUJBQXlCLENBQUM7QUFDakMsT0FBTywrQkFBK0IsQ0FBQztBQUN2QyxPQUFPLGdDQUFnQyxDQUFDO0FBQ3hDLE9BQU8sMEJBQTBCLENBQUM7QUFDbEMsT0FBTyx5QkFBeUIsQ0FBQztBQUNqQyxPQUFPLGtDQUFrQyxDQUFDO0FBRTFDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDdkQsY0FBYyx1QkFBdUIsQ0FBQztBQUV0QyxPQUFPLEVBQUUsV0FBVyxFQUFFLFlBQVksRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ2pFLDBDQUE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G9ydCAqIGZyb20gJ0BzZC1hbmd1bGFyL2NvcmUvZ3JpZCc7XHJcbmV4cG9ydCAqIGZyb20gJ0BzZC1hbmd1bGFyL2NvcmUvdXBsb2FkLWV4Y2VsJztcclxuZXhwb3J0ICogZnJvbSAnQHNkLWFuZ3VsYXIvY29yZS9zd2l0Y2gnO1xyXG5leHBvcnQgKiBmcm9tICdAc2QtYW5ndWxhci9jb3JlL3JhZGlvJztcclxuZXhwb3J0ICogZnJvbSAnQHNkLWFuZ3VsYXIvY29yZS9mb3JtJztcclxuZXhwb3J0ICogZnJvbSAnQHNkLWFuZ3VsYXIvY29yZS9zZXJ2aWNlJztcclxuZXhwb3J0ICogZnJvbSAnQHNkLWFuZ3VsYXIvY29yZS9wb3BvdmVyJztcclxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SdCommonModule } from '@sd-angular/core/common';
|
|
2
|
-
import { Directive, TemplateRef, Input, InjectionToken, EventEmitter, Component, ViewChild, Output, Injectable, ChangeDetectorRef, Inject, Optional, QueryList, ContentChild, ContentChildren,
|
|
2
|
+
import { Directive, TemplateRef, Input, InjectionToken, EventEmitter, Component, ViewChild, Output, Injectable, ChangeDetectorRef, Inject, Optional, Pipe, QueryList, ContentChild, ContentChildren, ChangeDetectionStrategy, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import { __awaiter, __classPrivateFieldGet, __rest, __classPrivateFieldSet } from 'tslib';
|
|
4
4
|
import { MatPaginator, MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
|
|
5
5
|
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
@@ -10,14 +10,14 @@ import { Subject, Subscription, isObservable } from 'rxjs';
|
|
|
10
10
|
import { SdNotifyService } from '@sd-angular/core/notify';
|
|
11
11
|
import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
|
|
12
12
|
import { startWith, debounceTime, map, switchMap } from 'rxjs/operators';
|
|
13
|
-
import hash from 'object-hash';
|
|
13
|
+
import * as hash from 'object-hash';
|
|
14
|
+
import hash__default from 'object-hash';
|
|
14
15
|
import { SdSettingService } from '@sd-angular/core/setting';
|
|
15
16
|
import { DeviceDetectorService } from 'ngx-device-detector';
|
|
16
17
|
import { SdLoadingService } from '@sd-angular/core/loading';
|
|
17
18
|
import { SdTranslateService } from '@sd-angular/core/translate';
|
|
18
19
|
import { SdExportService } from '@sd-angular/core/export';
|
|
19
20
|
import { FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
20
|
-
import { SdUtilityService } from '@sd-angular/core/utility';
|
|
21
21
|
import { SdQuickAction } from '@sd-angular/core/quick-action';
|
|
22
22
|
import { CommonModule, DatePipe, DecimalPipe } from '@angular/common';
|
|
23
23
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
@@ -40,6 +40,7 @@ import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
|
40
40
|
import { MatListModule } from '@angular/material/list';
|
|
41
41
|
import { MatDividerModule } from '@angular/material/divider';
|
|
42
42
|
import { SdSideDrawer } from '@sd-angular/core/side-drawer';
|
|
43
|
+
import { SdUtilityService } from '@sd-angular/core/utility';
|
|
43
44
|
|
|
44
45
|
class SdMaterialCellDefDirective {
|
|
45
46
|
constructor(templateRef) {
|
|
@@ -236,7 +237,7 @@ class SdGridFilterService {
|
|
|
236
237
|
prefix: __classPrivateFieldGet(this, _prefix),
|
|
237
238
|
key
|
|
238
239
|
});
|
|
239
|
-
key =
|
|
240
|
+
key = hash__default({
|
|
240
241
|
prefix: __classPrivateFieldGet(this, _prefix),
|
|
241
242
|
key
|
|
242
243
|
});
|
|
@@ -692,7 +693,7 @@ class SdPopupExport {
|
|
|
692
693
|
if (!((_b = (_a = this.gridOption) === null || _a === void 0 ? void 0 : _a.export) === null || _b === void 0 ? void 0 : _b.key)) {
|
|
693
694
|
return null;
|
|
694
695
|
}
|
|
695
|
-
return
|
|
696
|
+
return hash__default({
|
|
696
697
|
prefix,
|
|
697
698
|
key: (_d = (_c = this.gridOption) === null || _c === void 0 ? void 0 : _c.export) === null || _d === void 0 ? void 0 : _d.key
|
|
698
699
|
});
|
|
@@ -763,7 +764,7 @@ class SdGridConfigurationService {
|
|
|
763
764
|
if (!((_a = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _a === void 0 ? void 0 : _a.key) && !(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)) {
|
|
764
765
|
return null;
|
|
765
766
|
}
|
|
766
|
-
return
|
|
767
|
+
return hash__default({
|
|
767
768
|
prefix,
|
|
768
769
|
key: ((_b = gridOption === null || gridOption === void 0 ? void 0 : gridOption.config) === null || _b === void 0 ? void 0 : _b.key) || !(gridOption === null || gridOption === void 0 ? void 0 : gridOption.key)
|
|
769
770
|
});
|
|
@@ -1101,70 +1102,57 @@ SdGridConfigurationService.ctorParameters = () => [
|
|
|
1101
1102
|
];
|
|
1102
1103
|
|
|
1103
1104
|
var _prefix$1, _cache$1;
|
|
1104
|
-
class
|
|
1105
|
-
constructor(
|
|
1106
|
-
this.utilityService = utilityService;
|
|
1105
|
+
class SdColumnValuesPipe {
|
|
1106
|
+
constructor() {
|
|
1107
1107
|
_prefix$1.set(this, 'a1e67660-8aa2-4c11-b02d-71a32188719f');
|
|
1108
1108
|
_cache$1.set(this, {});
|
|
1109
|
-
this.
|
|
1110
|
-
var _a, _b, _c, _d;
|
|
1109
|
+
this.transform = (value, column) => __awaiter(this, void 0, void 0, function* () {
|
|
1110
|
+
var _a, _b, _c, _d, _e;
|
|
1111
1111
|
if (column.type !== 'values' || !((_a = column.option) === null || _a === void 0 ? void 0 : _a.items) || !((_b = column.option) === null || _b === void 0 ? void 0 : _b.valueField) || !((_c = column.option) === null || _c === void 0 ? void 0 : _c.displayField)) {
|
|
1112
|
-
return
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
if (typeof ((_d = column.option) === null || _d === void 0 ? void 0 : _d.items) === 'function') {
|
|
1125
|
-
items = yield column.option.items();
|
|
1112
|
+
return value;
|
|
1113
|
+
}
|
|
1114
|
+
const { items, valueField, displayField } = column.option;
|
|
1115
|
+
let key;
|
|
1116
|
+
if (typeof (items) === 'function') {
|
|
1117
|
+
key = hash(Object.assign(Object.assign({ prefix: __classPrivateFieldGet(this, _prefix$1) }, column), { value }));
|
|
1118
|
+
if (!__classPrivateFieldGet(this, _cache$1)[key]) {
|
|
1119
|
+
const values = yield items(value, true);
|
|
1120
|
+
__classPrivateFieldGet(this, _cache$1)[key] = {
|
|
1121
|
+
items: values,
|
|
1122
|
+
obj: Array.toObject(values, valueField)
|
|
1123
|
+
};
|
|
1126
1124
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1125
|
+
}
|
|
1126
|
+
else {
|
|
1127
|
+
key = hash(Object.assign({ prefix: __classPrivateFieldGet(this, _prefix$1) }, column));
|
|
1128
|
+
if (!__classPrivateFieldGet(this, _cache$1)[key]) {
|
|
1129
|
+
__classPrivateFieldGet(this, _cache$1)[key] = {
|
|
1130
|
+
items: items || [],
|
|
1131
|
+
obj: Array.toObject(items, valueField)
|
|
1132
|
+
};
|
|
1129
1133
|
}
|
|
1130
|
-
__classPrivateFieldGet(this, _cache$1)[hashKey] = {
|
|
1131
|
-
values: items,
|
|
1132
|
-
obj: this.utilityService.arrayToObject(items, column.option.valueField)
|
|
1133
|
-
};
|
|
1134
1134
|
}
|
|
1135
|
-
return __classPrivateFieldGet(this, _cache$1)[
|
|
1135
|
+
return (_e = (_d = __classPrivateFieldGet(this, _cache$1)[key].obj[value]) === null || _d === void 0 ? void 0 : _d[displayField]) !== null && _e !== void 0 ? _e : value;
|
|
1136
1136
|
});
|
|
1137
|
-
this.getValues = (column, key) => {
|
|
1138
|
-
const hashKey = hash({
|
|
1139
|
-
prefix: __classPrivateFieldGet(this, _prefix$1),
|
|
1140
|
-
field: column.field,
|
|
1141
|
-
key,
|
|
1142
|
-
});
|
|
1143
|
-
return __classPrivateFieldGet(this, _cache$1)[hashKey] || {
|
|
1144
|
-
values: [],
|
|
1145
|
-
obj: {}
|
|
1146
|
-
};
|
|
1147
|
-
};
|
|
1148
1137
|
}
|
|
1149
1138
|
}
|
|
1150
1139
|
_prefix$1 = new WeakMap(), _cache$1 = new WeakMap();
|
|
1151
|
-
|
|
1152
|
-
{ type:
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
{ type: SdUtilityService }
|
|
1140
|
+
SdColumnValuesPipe.decorators = [
|
|
1141
|
+
{ type: Pipe, args: [{
|
|
1142
|
+
name: 'columnValues'
|
|
1143
|
+
},] }
|
|
1156
1144
|
];
|
|
1157
1145
|
|
|
1158
1146
|
var _paginator, _sort, _subscription$1, _optionChanges, _initCellDef, _initFilterDef, _initFooterDef, _filterExportInfo, _initConfiguration, _filterLocal, _getFilter, _load$1, _render, _exportedItems, _allColumns, _allExportedColumns, _onExport, _updateSelectedItems;
|
|
1159
1147
|
class SdGridMaterial {
|
|
1160
|
-
constructor(ref, configuration, gridConfigurationService, exportService, notifyService, translateService,
|
|
1148
|
+
constructor(ref, configuration, gridConfigurationService, exportService, notifyService, translateService, columnValuesPipe) {
|
|
1161
1149
|
this.ref = ref;
|
|
1162
1150
|
this.configuration = configuration;
|
|
1163
1151
|
this.gridConfigurationService = gridConfigurationService;
|
|
1164
1152
|
this.exportService = exportService;
|
|
1165
1153
|
this.notifyService = notifyService;
|
|
1166
1154
|
this.translateService = translateService;
|
|
1167
|
-
this.
|
|
1155
|
+
this.columnValuesPipe = columnValuesPipe;
|
|
1168
1156
|
this.key = v4();
|
|
1169
1157
|
this.localItems = [];
|
|
1170
1158
|
this.items = [];
|
|
@@ -1522,8 +1510,8 @@ class SdGridMaterial {
|
|
|
1522
1510
|
const allExportedColumns = __classPrivateFieldGet(this, _allExportedColumns).call(this);
|
|
1523
1511
|
for (const item of exportItems) {
|
|
1524
1512
|
const obj = {};
|
|
1525
|
-
const handle = (exportColumn) => {
|
|
1526
|
-
var
|
|
1513
|
+
const handle = (exportColumn) => __awaiter(this, void 0, void 0, function* () {
|
|
1514
|
+
var _q, _r;
|
|
1527
1515
|
obj[exportColumn.field] = item[exportColumn.field];
|
|
1528
1516
|
const column = allColumns.find(e => e.field === exportColumn.field);
|
|
1529
1517
|
const exportedColumn = allExportedColumns.find(e => e.field === exportColumn.field);
|
|
@@ -1554,10 +1542,10 @@ class SdGridMaterial {
|
|
|
1554
1542
|
else if (column.type === 'bool') {
|
|
1555
1543
|
// Nếu là bool thì gán bằng giá trị trueValue và falseValue (nếu có), mặc định là TRUE/FALSE
|
|
1556
1544
|
if (item[column.field]) {
|
|
1557
|
-
obj[column.field] = ((
|
|
1545
|
+
obj[column.field] = ((_q = column.option) === null || _q === void 0 ? void 0 : _q.displayOnTrue) || 'True';
|
|
1558
1546
|
}
|
|
1559
1547
|
else {
|
|
1560
|
-
obj[column.field] = ((
|
|
1548
|
+
obj[column.field] = ((_r = column.option) === null || _r === void 0 ? void 0 : _r.displayOnFalse) || 'False';
|
|
1561
1549
|
}
|
|
1562
1550
|
}
|
|
1563
1551
|
else if (column.type === 'date') {
|
|
@@ -1577,20 +1565,16 @@ class SdGridMaterial {
|
|
|
1577
1565
|
}
|
|
1578
1566
|
else if (column.type === 'values') {
|
|
1579
1567
|
// Nếu là values thì lấy giá trị của value được chọn
|
|
1580
|
-
|
|
1581
|
-
if (data.obj[column.option.displayField] !== null && data.obj[column.option.displayField] !== undefined) {
|
|
1582
|
-
obj[column.field] = data.obj[column.option.displayField];
|
|
1583
|
-
}
|
|
1584
|
-
else {
|
|
1585
|
-
obj[column.field] = item[column.field];
|
|
1586
|
-
}
|
|
1568
|
+
obj[column.field] = yield this.columnValuesPipe.transform(item[column.field], column);
|
|
1587
1569
|
}
|
|
1588
1570
|
else {
|
|
1589
1571
|
obj[column.field] = item[column.field];
|
|
1590
1572
|
}
|
|
1591
|
-
};
|
|
1573
|
+
});
|
|
1592
1574
|
// this.gridOption.columns.forEach(handle);
|
|
1593
|
-
columns
|
|
1575
|
+
for (const exportColumn of columns) {
|
|
1576
|
+
yield handle(exportColumn);
|
|
1577
|
+
}
|
|
1594
1578
|
items.push(obj);
|
|
1595
1579
|
}
|
|
1596
1580
|
pageNumber++;
|
|
@@ -1662,7 +1646,7 @@ class SdGridMaterial {
|
|
|
1662
1646
|
this.reload(false);
|
|
1663
1647
|
};
|
|
1664
1648
|
this.onExpand = (rowData) => __awaiter(this, void 0, void 0, function* () {
|
|
1665
|
-
var
|
|
1649
|
+
var _s, _t, _u;
|
|
1666
1650
|
if (rowData.isExpanding) {
|
|
1667
1651
|
return;
|
|
1668
1652
|
}
|
|
@@ -1670,8 +1654,8 @@ class SdGridMaterial {
|
|
|
1670
1654
|
rowData.isExpanded = false;
|
|
1671
1655
|
return;
|
|
1672
1656
|
}
|
|
1673
|
-
const data = (
|
|
1674
|
-
if (!((
|
|
1657
|
+
const data = (_t = (_s = this.gridOption) === null || _s === void 0 ? void 0 : _s.subInformation) === null || _t === void 0 ? void 0 : _t.onExpand(rowData);
|
|
1658
|
+
if (!((_u = this.gridOption.subInformation) === null || _u === void 0 ? void 0 : _u.multiple)) {
|
|
1675
1659
|
this.items.forEach(item => item.isExpanding = item.isExpanded = false);
|
|
1676
1660
|
}
|
|
1677
1661
|
if (data instanceof Promise) {
|
|
@@ -1981,6 +1965,9 @@ class SdGridMaterial {
|
|
|
1981
1965
|
return result;
|
|
1982
1966
|
});
|
|
1983
1967
|
}
|
|
1968
|
+
get isEditing() {
|
|
1969
|
+
return this.items.some(e => e.editorStatus !== undefined);
|
|
1970
|
+
}
|
|
1984
1971
|
}
|
|
1985
1972
|
_paginator = new WeakMap(), _sort = new WeakMap(), _subscription$1 = new WeakMap(), _optionChanges = new WeakMap(), _initCellDef = new WeakMap(), _initFilterDef = new WeakMap(), _initFooterDef = new WeakMap(), _filterExportInfo = new WeakMap(), _initConfiguration = new WeakMap(), _filterLocal = new WeakMap(), _getFilter = new WeakMap(), _load$1 = new WeakMap(), _render = new WeakMap(), _exportedItems = new WeakMap(), _allColumns = new WeakMap(), _allExportedColumns = new WeakMap(), _onExport = new WeakMap(), _updateSelectedItems = new WeakMap();
|
|
1986
1973
|
SdGridMaterial.decorators = [
|
|
@@ -2004,7 +1991,7 @@ SdGridMaterial.ctorParameters = () => [
|
|
|
2004
1991
|
{ type: SdExportService },
|
|
2005
1992
|
{ type: SdNotifyService },
|
|
2006
1993
|
{ type: SdTranslateService },
|
|
2007
|
-
{ type:
|
|
1994
|
+
{ type: SdColumnValuesPipe }
|
|
2008
1995
|
];
|
|
2009
1996
|
SdGridMaterial.propDecorators = {
|
|
2010
1997
|
quickAction: [{ type: ViewChild, args: [SdQuickAction,] }],
|
|
@@ -2148,25 +2135,6 @@ SdCommandTitlePipe.decorators = [
|
|
|
2148
2135
|
},] }
|
|
2149
2136
|
];
|
|
2150
2137
|
|
|
2151
|
-
class SdColumnValuesPipe {
|
|
2152
|
-
constructor(gridService) {
|
|
2153
|
-
this.gridService = gridService;
|
|
2154
|
-
this.transform = (value, column, key) => __awaiter(this, void 0, void 0, function* () {
|
|
2155
|
-
var _a;
|
|
2156
|
-
const data = yield this.gridService.loadValues(column, key);
|
|
2157
|
-
return (_a = data.obj[value]) !== null && _a !== void 0 ? _a : value;
|
|
2158
|
-
});
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
SdColumnValuesPipe.decorators = [
|
|
2162
|
-
{ type: Pipe, args: [{
|
|
2163
|
-
name: 'columnValues'
|
|
2164
|
-
},] }
|
|
2165
|
-
];
|
|
2166
|
-
SdColumnValuesPipe.ctorParameters = () => [
|
|
2167
|
-
{ type: SdGridService }
|
|
2168
|
-
];
|
|
2169
|
-
|
|
2170
2138
|
class SdColumnHtmlTemplatePipe {
|
|
2171
2139
|
constructor(deviceService) {
|
|
2172
2140
|
this.isMobileOrTablet = false;
|
|
@@ -2209,24 +2177,23 @@ SdDesktopCellView.propDecorators = {
|
|
|
2209
2177
|
};
|
|
2210
2178
|
|
|
2211
2179
|
class SdColumnTransformPipe {
|
|
2212
|
-
constructor(
|
|
2213
|
-
this.
|
|
2180
|
+
constructor(columnValuesPipe) {
|
|
2181
|
+
this.columnValuesPipe = columnValuesPipe;
|
|
2214
2182
|
}
|
|
2215
2183
|
transform(value, rowData, column, key) {
|
|
2216
|
-
var _a, _b
|
|
2184
|
+
var _a, _b;
|
|
2217
2185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2218
2186
|
if (column === null || column === void 0 ? void 0 : column.transform) {
|
|
2219
2187
|
return column.transform(value, rowData);
|
|
2220
2188
|
}
|
|
2221
2189
|
if (column.type === 'values') {
|
|
2222
|
-
|
|
2223
|
-
return (_c = (_a = data.obj[value]) === null || _a === void 0 ? void 0 : _a[(_b = column.option) === null || _b === void 0 ? void 0 : _b.displayField]) !== null && _c !== void 0 ? _c : value;
|
|
2190
|
+
return yield this.columnValuesPipe.transform(value, column);
|
|
2224
2191
|
}
|
|
2225
2192
|
if (column.type === 'number' && Number.isNumber(value)) {
|
|
2226
2193
|
return Number.toVNCurrency(value); // this.decimalPipe.transform(value, '1.0-2');
|
|
2227
2194
|
}
|
|
2228
2195
|
if (column.type === 'bool') {
|
|
2229
|
-
return value === true ? (((
|
|
2196
|
+
return value === true ? (((_a = column.option) === null || _a === void 0 ? void 0 : _a.displayOnTrue) || 'True') : (((_b = column.option) === null || _b === void 0 ? void 0 : _b.displayOnFalse) || 'False');
|
|
2230
2197
|
}
|
|
2231
2198
|
return value;
|
|
2232
2199
|
});
|
|
@@ -2238,7 +2205,7 @@ SdColumnTransformPipe.decorators = [
|
|
|
2238
2205
|
},] }
|
|
2239
2206
|
];
|
|
2240
2207
|
SdColumnTransformPipe.ctorParameters = () => [
|
|
2241
|
-
{ type:
|
|
2208
|
+
{ type: SdColumnValuesPipe }
|
|
2242
2209
|
];
|
|
2243
2210
|
|
|
2244
2211
|
class SdFilterExternalPipe {
|
|
@@ -2297,7 +2264,7 @@ class SdDesktopCellChildrenView {
|
|
|
2297
2264
|
SdDesktopCellChildrenView.decorators = [
|
|
2298
2265
|
{ type: Component, args: [{
|
|
2299
2266
|
selector: 'sd-desktop-cell-children-view',
|
|
2300
|
-
template: "<ng-container *ngIf=\"column.children?.length\">\r\n <div class=\"row mx-0\">\r\n <div *ngFor=\"let childColumn of column.children | columnChildrenFilter:item\" class=\"px-2\"\r\n [ngClass]=\"{'col-6': childColumn?.colSpan === 1, 'col-12': !childColumn?.colSpan || childColumn?.colSpan === 2}\">\r\n <span class=\"c-title\">\r\n {{item | columnTitle:childColumn | async}}:\r\n </span>\r\n <ng-container *ngIf=\"childColumn.htmlTemplate;else useDefaultView\">\r\n <div (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\"\r\n style=\"display:inline-block ;overflow-wrap: break-word;\" [ngClass]=\"{'cursor-pointer':childColumn.click}\"\r\n [innerHTML]=\"(item[childColumn.field] | columnHtmlTemplate:item:childColumn) | safeHtml\">\r\n </div>\r\n </ng-container>\r\n <ng-template #useDefaultView>\r\n <span *ngIf=\"childColumn.type === 'string'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] |\r\n columnTransform:item:childColumn | async}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n {{item[childColumn.field] | columnTransform:item:childColumn | async}}</ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'number'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] |\r\n columnTransform:item:childColumn | async}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n {{item[childColumn.field] | columnTransform:item:childColumn | async}}\r\n </ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'datetime'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] |\r\n sdTimeDifferent:'dd/MM/yyyy HH:mm':childColumn.option?.timeDifferent | async}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n <span matTooltipPosition=\"above\"\r\n [matTooltip]=\"item[childColumn.field] | date:'dd/MM/yyyy HH:mm'\">{{item[childColumn.field] |\r\n sdTimeDifferent:'dd/MM/yyyy HH:mm':childColumn.option?.timeDifferent | async}}</span>\r\n </ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'date'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] |\r\n sdTimeDifferent:'dd/MM/yyyy':childColumn.option?.timeDifferent | async}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n <span matTooltipPosition=\"above\"\r\n [matTooltip]=\"item[childColumn.field] | date:'dd/MM/yyyy'\">{{item[childColumn.field] |\r\n sdTimeDifferent:'dd/MM/yyyy':childColumn.option?.timeDifferent | async}}</span>\r\n </ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'time'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] | date:'HH:mm'}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n {{item[childColumn.field] | date:'HH:mm'}}\r\n </ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'bool'\"\r\n (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\">\r\n <strong *ngIf=\"item[childColumn.field]\" class=\"text-success\">{{childColumn.option?.displayOnTrue ||\r\n 'True'}}</strong>\r\n <strong *ngIf=\"!item[childColumn.field]\" class=\"text-danger\">{{childColumn.option?.displayOnFalse ||\r\n 'False'}}</strong>\r\n </span>\r\n <ng-container *ngIf=\"childColumn.type === 'values'\">\r\n <ng-container *ngIf=\"childColumn.transform\">{{item[childColumn.field] | columnTransform:item:childColumn | async}}</ng-container>\r\n <ng-container *ngIf=\"!childColumn.transform\">\r\n <ng-container *ngIf=\"item[childColumn.field] | columnValues:childColumn
|
|
2267
|
+
template: "<ng-container *ngIf=\"column.children?.length\">\r\n <div class=\"row mx-0\">\r\n <div *ngFor=\"let childColumn of column.children | columnChildrenFilter:item\" class=\"px-2\"\r\n [ngClass]=\"{'col-6': childColumn?.colSpan === 1, 'col-12': !childColumn?.colSpan || childColumn?.colSpan === 2}\">\r\n <span class=\"c-title\">\r\n {{item | columnTitle:childColumn | async}}:\r\n </span>\r\n <ng-container *ngIf=\"childColumn.htmlTemplate;else useDefaultView\">\r\n <div (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\"\r\n style=\"display:inline-block ;overflow-wrap: break-word;\" [ngClass]=\"{'cursor-pointer':childColumn.click}\"\r\n [innerHTML]=\"(item[childColumn.field] | columnHtmlTemplate:item:childColumn) | safeHtml\">\r\n </div>\r\n </ng-container>\r\n <ng-template #useDefaultView>\r\n <span *ngIf=\"childColumn.type === 'string'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] |\r\n columnTransform:item:childColumn | async}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n {{item[childColumn.field] | columnTransform:item:childColumn | async}}</ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'number'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] |\r\n columnTransform:item:childColumn | async}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n {{item[childColumn.field] | columnTransform:item:childColumn | async}}\r\n </ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'datetime'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] |\r\n sdTimeDifferent:'dd/MM/yyyy HH:mm':childColumn.option?.timeDifferent | async}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n <span matTooltipPosition=\"above\"\r\n [matTooltip]=\"item[childColumn.field] | date:'dd/MM/yyyy HH:mm'\">{{item[childColumn.field] |\r\n sdTimeDifferent:'dd/MM/yyyy HH:mm':childColumn.option?.timeDifferent | async}}</span>\r\n </ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'date'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] |\r\n sdTimeDifferent:'dd/MM/yyyy':childColumn.option?.timeDifferent | async}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n <span matTooltipPosition=\"above\"\r\n [matTooltip]=\"item[childColumn.field] | date:'dd/MM/yyyy'\">{{item[childColumn.field] |\r\n sdTimeDifferent:'dd/MM/yyyy':childColumn.option?.timeDifferent | async}}</span>\r\n </ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'time'\">\r\n <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] | date:'HH:mm'}}</a>\r\n <ng-container *ngIf=\"!childColumn.click\">\r\n {{item[childColumn.field] | date:'HH:mm'}}\r\n </ng-container>\r\n </span>\r\n <span *ngIf=\"childColumn.type === 'bool'\"\r\n (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\">\r\n <strong *ngIf=\"item[childColumn.field]\" class=\"text-success\">{{childColumn.option?.displayOnTrue ||\r\n 'True'}}</strong>\r\n <strong *ngIf=\"!item[childColumn.field]\" class=\"text-danger\">{{childColumn.option?.displayOnFalse ||\r\n 'False'}}</strong>\r\n </span>\r\n <ng-container *ngIf=\"childColumn.type === 'values'\">\r\n <ng-container *ngIf=\"childColumn.transform\">{{item[childColumn.field] | columnTransform:item:childColumn | async}}</ng-container>\r\n <ng-container *ngIf=\"!childColumn.transform\">\r\n {{item[childColumn.field] | columnValues:childColumn | async}}\r\n <!-- <ng-container *ngIf=\"item[childColumn.field] | columnValues:childColumn | async; $implicit as valueData\">\r\n <div\r\n *ngIf=\"valueData[childColumn.option?.colorField] || valueData[childColumn.option?.backgroundColorField]; else elseNoStatus\"\r\n [ngStyle]=\"{'color':valueData[childColumn.option?.colorField], 'background-color': valueData[childColumn.option?.backgroundColorField]}\">\r\n {{valueData[childColumn.option?.displayField]}}\r\n </div>\r\n <ng-template #elseNoStatus>\r\n {{valueData[childColumn.option?.displayField]}}\r\n </ng-template>\r\n </ng-container> -->\r\n </ng-container>\r\n \r\n </ng-container>\r\n <img *ngIf=\"childColumn.type === 'image'\" [src]=\"item[childColumn.field] | columnTransform:item:childColumn | async\" [width]=\"childColumn.display?.width\"\r\n [height]=\"childColumn.display?.height\" style=\"margin: 5px 0\"\r\n (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\">\r\n </ng-template>\r\n </div>\r\n </div>\r\n</ng-container>",
|
|
2301
2268
|
styles: [".c-title{color:#212529;font-size:13px;font-weight:700;line-height:1.7;margin-right:3px}.c-children{color:#212529;font-size:14px;overflow-wrap:break-word}"]
|
|
2302
2269
|
},] }
|
|
2303
2270
|
];
|
|
@@ -2583,7 +2550,7 @@ class SdSelectionActionFilterPipe {
|
|
|
2583
2550
|
if ('children' in action) {
|
|
2584
2551
|
const children = [];
|
|
2585
2552
|
for (const childAction of action.children) {
|
|
2586
|
-
const key =
|
|
2553
|
+
const key = hash__default(childAction);
|
|
2587
2554
|
if (selectedItems.every(e => e.actions.includes(key))) {
|
|
2588
2555
|
children.push(childAction);
|
|
2589
2556
|
}
|
|
@@ -2593,7 +2560,7 @@ class SdSelectionActionFilterPipe {
|
|
|
2593
2560
|
}
|
|
2594
2561
|
}
|
|
2595
2562
|
else {
|
|
2596
|
-
const key =
|
|
2563
|
+
const key = hash__default(action);
|
|
2597
2564
|
if (selectedItems.every(e => e.actions.includes(key))) {
|
|
2598
2565
|
results.push(action);
|
|
2599
2566
|
}
|
|
@@ -2626,7 +2593,7 @@ class SdSelectionDisablePipe {
|
|
|
2626
2593
|
const availableActions = actions.filter(action => {
|
|
2627
2594
|
if ('children' in action) {
|
|
2628
2595
|
for (const childAction of action.children) {
|
|
2629
|
-
const key =
|
|
2596
|
+
const key = hash__default(childAction);
|
|
2630
2597
|
if (selectedItems.every(e => e.actions.includes(key))) {
|
|
2631
2598
|
return true;
|
|
2632
2599
|
}
|
|
@@ -2634,7 +2601,7 @@ class SdSelectionDisablePipe {
|
|
|
2634
2601
|
return false;
|
|
2635
2602
|
}
|
|
2636
2603
|
else {
|
|
2637
|
-
const key =
|
|
2604
|
+
const key = hash__default(action);
|
|
2638
2605
|
return selectedItems.every(e => e.actions.includes(key));
|
|
2639
2606
|
}
|
|
2640
2607
|
});
|
|
@@ -2642,13 +2609,13 @@ class SdSelectionDisablePipe {
|
|
|
2642
2609
|
for (const action of availableActions) {
|
|
2643
2610
|
if ('children' in action) {
|
|
2644
2611
|
for (const childAction of action.children) {
|
|
2645
|
-
if (rowData.actions.includes(
|
|
2612
|
+
if (rowData.actions.includes(hash__default(childAction))) {
|
|
2646
2613
|
return false;
|
|
2647
2614
|
}
|
|
2648
2615
|
}
|
|
2649
2616
|
}
|
|
2650
2617
|
else {
|
|
2651
|
-
if (rowData.actions.includes(
|
|
2618
|
+
if (rowData.actions.includes(hash__default(action))) {
|
|
2652
2619
|
return false;
|
|
2653
2620
|
}
|
|
2654
2621
|
}
|
|
@@ -2699,7 +2666,7 @@ class SdGeneratedColumnService {
|
|
|
2699
2666
|
if (!(configuration === null || configuration === void 0 ? void 0 : configuration.key)) {
|
|
2700
2667
|
return null;
|
|
2701
2668
|
}
|
|
2702
|
-
const key =
|
|
2669
|
+
const key = hash__default({
|
|
2703
2670
|
prefix: '260f5e94-5865-4425-8ced-b9c083c390dd',
|
|
2704
2671
|
key: configuration.key
|
|
2705
2672
|
});
|
|
@@ -2728,7 +2695,7 @@ class SdGeneratedColumnService {
|
|
|
2728
2695
|
if (!(configuration === null || configuration === void 0 ? void 0 : configuration.systemColumn)) {
|
|
2729
2696
|
return null;
|
|
2730
2697
|
}
|
|
2731
|
-
const key =
|
|
2698
|
+
const key = hash__default({
|
|
2732
2699
|
prefix: '8b8050ca-1f44-4860-bad3-20e646c0d68f',
|
|
2733
2700
|
key: configuration.key
|
|
2734
2701
|
});
|
|
@@ -2926,7 +2893,7 @@ class SdEditorHandlerRowPipe {
|
|
|
2926
2893
|
item.editorHandlerRow = Object.assign(Object.assign({}, item.editorHandlerRow), { visible: false, editable: !status, removable: false, savable: false, cancelable: false });
|
|
2927
2894
|
}
|
|
2928
2895
|
const { sdId, editorHandlerColumn } = item, remain = __rest(item, ["sdId", "editorHandlerColumn"]);
|
|
2929
|
-
item.sdId =
|
|
2896
|
+
item.sdId = hash__default(remain);
|
|
2930
2897
|
return item.editorHandlerRow;
|
|
2931
2898
|
}
|
|
2932
2899
|
}
|
|
@@ -2964,7 +2931,7 @@ class SdEditorHandlerColumnPipe {
|
|
|
2964
2931
|
item.editorHandlerColumn[col.field] = Object.assign(Object.assign({}, item.editorHandlerColumn[col.field]), { visible: __classPrivateFieldGet(this, _visible).call(this, col, item) });
|
|
2965
2932
|
}
|
|
2966
2933
|
const { sdId, editorHandlerColumn } = item, remain = __rest(item, ["sdId", "editorHandlerColumn"]);
|
|
2967
|
-
item.sdId =
|
|
2934
|
+
item.sdId = hash__default(remain);
|
|
2968
2935
|
return true;
|
|
2969
2936
|
}
|
|
2970
2937
|
}
|
|
@@ -3103,7 +3070,7 @@ class SdSelectionVisiblePipe {
|
|
|
3103
3070
|
let flag = false;
|
|
3104
3071
|
for (const childAction of action.children) {
|
|
3105
3072
|
const { hidden } = childAction;
|
|
3106
|
-
const key =
|
|
3073
|
+
const key = hash__default(childAction);
|
|
3107
3074
|
if (typeof (hidden) === 'function') {
|
|
3108
3075
|
if (!hidden(rowData)) {
|
|
3109
3076
|
rowData.actions.push(key);
|
|
@@ -3116,12 +3083,12 @@ class SdSelectionVisiblePipe {
|
|
|
3116
3083
|
}
|
|
3117
3084
|
}
|
|
3118
3085
|
if (flag) {
|
|
3119
|
-
rowData.actions.push(
|
|
3086
|
+
rowData.actions.push(hash__default(action));
|
|
3120
3087
|
}
|
|
3121
3088
|
}
|
|
3122
3089
|
else {
|
|
3123
3090
|
const { hidden } = action;
|
|
3124
|
-
const key =
|
|
3091
|
+
const key = hash__default(action);
|
|
3125
3092
|
if (typeof (hidden) === 'function') {
|
|
3126
3093
|
if (!hidden(rowData)) {
|
|
3127
3094
|
rowData.actions.push(key);
|
|
@@ -3147,7 +3114,7 @@ class SdIdPipe {
|
|
|
3147
3114
|
transform(value, item, column) {
|
|
3148
3115
|
const { sdId, editorHandlerColumn } = item, remain = __rest(item, ["sdId", "editorHandlerColumn"]);
|
|
3149
3116
|
item.editorHandlerColumn = item.editorHandlerColumn || {};
|
|
3150
|
-
item.sdId =
|
|
3117
|
+
item.sdId = hash__default(remain);
|
|
3151
3118
|
item.editorHandlerColumn[column.field] = Object.assign({}, item.editorHandlerColumn[column.field]);
|
|
3152
3119
|
return item.sdId;
|
|
3153
3120
|
}
|
|
@@ -3183,9 +3150,9 @@ SdGridQuickAction.propDecorators = {
|
|
|
3183
3150
|
|
|
3184
3151
|
var _maxSecond, _maxMinute, _maxHour, _maxDay, _maxMonth, _isMobileOrTablet$1;
|
|
3185
3152
|
class SdCellViewPipe {
|
|
3186
|
-
constructor(deviceService, utilityService,
|
|
3153
|
+
constructor(deviceService, utilityService, columnValuesPipe) {
|
|
3187
3154
|
this.utilityService = utilityService;
|
|
3188
|
-
this.
|
|
3155
|
+
this.columnValuesPipe = columnValuesPipe;
|
|
3189
3156
|
_maxSecond.set(this, 60);
|
|
3190
3157
|
_maxMinute.set(this, __classPrivateFieldGet(this, _maxSecond) * 60);
|
|
3191
3158
|
_maxHour.set(this, __classPrivateFieldGet(this, _maxMinute) * 24);
|
|
@@ -3195,7 +3162,7 @@ class SdCellViewPipe {
|
|
|
3195
3162
|
__classPrivateFieldSet(this, _isMobileOrTablet$1, !deviceService.isDesktop());
|
|
3196
3163
|
}
|
|
3197
3164
|
transform(value, rowData, column, gridOption, key) {
|
|
3198
|
-
var _a
|
|
3165
|
+
var _a;
|
|
3199
3166
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3200
3167
|
const { displayOnEmpty } = gridOption;
|
|
3201
3168
|
const { align, click, tooltip, htmlTemplate, transform } = column;
|
|
@@ -3259,8 +3226,7 @@ class SdCellViewPipe {
|
|
|
3259
3226
|
result.display.value = Date.toFormat(value, 'HH:mm');
|
|
3260
3227
|
}
|
|
3261
3228
|
if (column.type === 'values') {
|
|
3262
|
-
|
|
3263
|
-
result.display.value = (_c = (_a = data.obj[value]) === null || _a === void 0 ? void 0 : _a[(_b = column.option) === null || _b === void 0 ? void 0 : _b.displayField]) !== null && _c !== void 0 ? _c : value;
|
|
3229
|
+
result.display.value = yield this.columnValuesPipe.transform(value, column);
|
|
3264
3230
|
}
|
|
3265
3231
|
else if (column.type === 'number' && Number.isNumber(value)) {
|
|
3266
3232
|
result.display.value = Number.toVNCurrency(value);
|
|
@@ -3286,7 +3252,7 @@ class SdCellViewPipe {
|
|
|
3286
3252
|
result.badge = {
|
|
3287
3253
|
type: !(column === null || column === void 0 ? void 0 : column.badgeType) ? 'round' : column.badgeType,
|
|
3288
3254
|
color: column.badge(value, rowData),
|
|
3289
|
-
icon: (
|
|
3255
|
+
icon: (_a = column === null || column === void 0 ? void 0 : column.badgeIcon) === null || _a === void 0 ? void 0 : _a.call(column, value, rowData)
|
|
3290
3256
|
};
|
|
3291
3257
|
}
|
|
3292
3258
|
else if (column.type === 'bool') {
|
|
@@ -3317,7 +3283,7 @@ SdCellViewPipe.decorators = [
|
|
|
3317
3283
|
SdCellViewPipe.ctorParameters = () => [
|
|
3318
3284
|
{ type: DeviceDetectorService },
|
|
3319
3285
|
{ type: SdUtilityService },
|
|
3320
|
-
{ type:
|
|
3286
|
+
{ type: SdColumnValuesPipe }
|
|
3321
3287
|
];
|
|
3322
3288
|
|
|
3323
3289
|
class MatPaginatorIntlCro extends MatPaginatorIntl {
|
|
@@ -3432,10 +3398,10 @@ SdGridMaterialModule.decorators = [
|
|
|
3432
3398
|
DecimalPipe,
|
|
3433
3399
|
SdIdPipe,
|
|
3434
3400
|
CdkColumnDef,
|
|
3435
|
-
SdGridService,
|
|
3436
3401
|
SdGridFilterService,
|
|
3437
3402
|
SdGridConfigurationService,
|
|
3438
3403
|
SdGeneratedColumnService,
|
|
3404
|
+
SdColumnValuesPipe,
|
|
3439
3405
|
{
|
|
3440
3406
|
provide: MatPaginatorIntl, useClass: MatPaginatorIntlCro
|
|
3441
3407
|
}
|
|
@@ -3447,5 +3413,5 @@ SdGridMaterialModule.decorators = [
|
|
|
3447
3413
|
* Generated bundle index. Do not edit.
|
|
3448
3414
|
*/
|
|
3449
3415
|
|
|
3450
|
-
export { SdGridMaterial, SdGridMaterialModule, SdMaterialCellDefDirective, SdMaterialEmptyDataDefDirective, SdMaterialFilterDefDirective, SdMaterialFooterDefDirective, SdMaterialSubInformationDefDirective, MatPaginatorIntlCro as ɵa, SdGridFilter as ɵb, SdCommandTitlePipe as ɵba,
|
|
3416
|
+
export { SdGridMaterial, SdGridMaterialModule, SdMaterialCellDefDirective, SdMaterialEmptyDataDefDirective, SdMaterialFilterDefDirective, SdMaterialFooterDefDirective, SdMaterialSubInformationDefDirective, MatPaginatorIntlCro as ɵa, SdGridFilter as ɵb, SdCommandTitlePipe as ɵba, SdColumnHtmlTemplatePipe as ɵbb, SdColumnTransformPipe as ɵbc, SdColumnTooltipPipe as ɵbd, SdColumnBadgePipe as ɵbe, SdFilterColumnPipe as ɵbf, SdFilterExternalPipe as ɵbg, SdSelectionActionFilterPipe as ɵbh, SdSelectionVisiblePipe as ɵbi, SdSelectionDisablePipe as ɵbj, SdSelectionVisibleSelectAllPipe as ɵbk, SdEditorHandlerRowPipe as ɵbl, SdEditorHandlerColumnPipe as ɵbm, SdEditorValidatePipe as ɵbn, SdIdPipe as ɵbo, SdStyleRowCss as ɵbp, SdCellViewPipe as ɵbq, SdPopupFilter as ɵc, SdGridFilterService as ɵd, SdPopupExport as ɵe, GRID_MATERIAL_CONFIG as ɵg, SdGridConfigurationService as ɵh, SdColumnValuesPipe as ɵi, SdGridQuickAction as ɵj, SdDesktopCell as ɵk, SdDesktopCellEditor as ɵl, SdDesktopEditorValidation as ɵm, SdDesktopCellView as ɵn, SdDesktopCellChildrenView as ɵo, SdDesktopCommand as ɵp, SdColumnInlineFilter as ɵq, SdPopupGridConfiguration as ɵr, SdDynamicColumn as ɵs, SdGeneratedColumnService as ɵt, SdGridConfigurationResultPipe as ɵu, SdColumnChildrenFilterPipe as ɵv, SdColumnTitlePipe as ɵw, SdCommandFilterPipe as ɵx, SdCommandDisablePipe as ɵy, SdCommandIconPipe as ɵz };
|
|
3451
3417
|
//# sourceMappingURL=sd-angular-core-grid-material.js.map
|