@stemy/ngx-utils 19.9.55 → 19.9.56
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.
|
@@ -2891,6 +2891,22 @@ function diffEntities(current, incoming) {
|
|
|
2891
2891
|
updated: incoming.filter(item => item.id && currentMap.has(item.id))
|
|
2892
2892
|
};
|
|
2893
2893
|
}
|
|
2894
|
+
function convertTableColumns(columns, titlePrefix = "label") {
|
|
2895
|
+
return Array.isArray(columns) ? columns.reduce((result, column) => {
|
|
2896
|
+
if (!isString(column) || column.length == 0)
|
|
2897
|
+
return result;
|
|
2898
|
+
result[column] = { title: `${titlePrefix}.${column}`, sort: column };
|
|
2899
|
+
return result;
|
|
2900
|
+
}, {}) : Object.keys(columns).reduce((result, key) => {
|
|
2901
|
+
const value = columns[key];
|
|
2902
|
+
const column = !value || isString(value)
|
|
2903
|
+
? { sort: value }
|
|
2904
|
+
: value;
|
|
2905
|
+
column.title = column.title || `${titlePrefix}.${key}`;
|
|
2906
|
+
result[key] = column;
|
|
2907
|
+
return result;
|
|
2908
|
+
}, {});
|
|
2909
|
+
}
|
|
2894
2910
|
|
|
2895
2911
|
class ObservableUtils {
|
|
2896
2912
|
static toSearch(search) {
|
|
@@ -9530,18 +9546,7 @@ class DynamicTableComponent {
|
|
|
9530
9546
|
const orderBy = this.orderBy;
|
|
9531
9547
|
if (changes.columns) {
|
|
9532
9548
|
const columns = changes.columns.currentValue || [];
|
|
9533
|
-
this.columnDefs =
|
|
9534
|
-
if (!ObjectUtils.isString(column) || column.length == 0)
|
|
9535
|
-
return result;
|
|
9536
|
-
result[column] = { title: `${this.titlePrefix}.${column}`, sort: column };
|
|
9537
|
-
return result;
|
|
9538
|
-
}, {}) : Object.keys(columns).reduce((result, key) => {
|
|
9539
|
-
const value = columns[key];
|
|
9540
|
-
result[key] = !value || ObjectUtils.isString(value)
|
|
9541
|
-
? { title: `${this.titlePrefix}.${key}`, sort: value }
|
|
9542
|
-
: value;
|
|
9543
|
-
return result;
|
|
9544
|
-
}, {});
|
|
9549
|
+
this.columnDefs = convertTableColumns(columns, this.titlePrefix);
|
|
9545
9550
|
this.cols = Object.keys(this.columnDefs);
|
|
9546
9551
|
this.cols.forEach(col => {
|
|
9547
9552
|
const column = this.columnDefs[col];
|
|
@@ -11338,5 +11343,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
11338
11343
|
* Generated bundle index. Do not edit.
|
|
11339
11344
|
*/
|
|
11340
11345
|
|
|
11341
|
-
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AsyncMethodTargetDirective, AuthGuard, BASE_CONFIG, BUTTON_TYPE, BackgroundDirective, BaseDialogService, BaseHttpClient, BaseHttpService, BaseToasterService, BtnComponent, BtnDefaultComponent, CONFIG_SERVICE, CacheService, CalendarComponent, CanvasColor, CanvasUtils, ChipsComponent, ChunkPipe, Circle, CloseBtnComponent, CodeEditorComponent, ComponentLoaderDirective, ComponentLoaderService, ConfigService, DIALOG_SERVICE, DatePickerComponent, DateUtils, DragDropEventPlugin, DropListComponent, DropdownBoxComponent, DropdownContentDirective, DropdownDirective, DropdownToggleDirective, DynamicTableCellComponent, DynamicTableComponent, DynamicTableTemplateDirective, EDITOR_TYPES, EPSILON, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, Enum, ErrorHandlerService, EventsService, ExclusionsRenderer, ExtraItemPropertiesPipe, FactoryDependencies, FakeModuleComponent, FileSystemEntry, FileUtils, FilterPipe, FindPipe, ForbiddenZone, FormatNumberPipe, FormatterService, GenericValue, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HitZoneRenderer, HrefSerializer, ICON_MAP, ICON_SERVICE, ICON_TYPE, IConfiguration, IconComponent, IconDefaultComponent, IconDirective, IconService, IncludesPipe, Initializer, InteractiveCanvasComponent, InteractiveCircleComponent, InteractiveItemComponent, InteractiveRectComponent, IsTypePipe, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, OPTIONS_TOKEN, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, Oval, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, RequestBag, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, RulerCanvasRenderer, SCHEMA_SELECTOR, SCRIPT_PARAMS, STATIC_SCHEMAS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShapeGroup, ShiftPipe, SocketClient, SocketService, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, SyncAsyncPipe, TOASTER_SERVICE, TabsComponent, TabsItemDirective, TabsTemplateDirective, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, UploadComponent, ValuedPromise, ValuesPipe, WysiwygComponent, addDate, addPts, cachedFactory, cancelablePromise, checkTransitions, clamp, computedPrevious, convertToDate, convertToDateFormat, createTypedProvider, cssStyles, cssVariables, diffEntities, distance, distanceSq, dividePts, dotProduct, ensurePoint, eqPts, findClosestValidDate, getComponentDef, getCssVariables, getISOWeekNumber, getRoot, getType, impatientPromise, injectOptions, isBrowser, isDate, isDayOfWeekDisabled, isDefined, isEqual, isFunction, isObject, isPoint, isSameDay, isString, isStringWithValue, isZero, lengthOfPt, lengthSq, lerpPts, md5, multiplyPts, negatePt, normalizePt, normalizeRange, overflow, parseSelector, parseValidDate, perpendicular, promiseTimeout, provideEntryComponents, provideOptions, provideWithOptions, rotateDeg, rotateRad, scalePt, selectorMatchesList, stringify, subPts, svgToDataUri, switchClass, toDegrees, toMidnight, toRadians, toStringArray, tripleProduct };
|
|
11346
|
+
export { API_SERVICE, APP_BASE_URL, AUTH_SERVICE, AclService, AjaxRequestHandler, ApiService, ArrayUtils, AsyncMethodBase, AsyncMethodDirective, AsyncMethodTargetDirective, AuthGuard, BASE_CONFIG, BUTTON_TYPE, BackgroundDirective, BaseDialogService, BaseHttpClient, BaseHttpService, BaseToasterService, BtnComponent, BtnDefaultComponent, CONFIG_SERVICE, CacheService, CalendarComponent, CanvasColor, CanvasUtils, ChipsComponent, ChunkPipe, Circle, CloseBtnComponent, CodeEditorComponent, ComponentLoaderDirective, ComponentLoaderService, ConfigService, DIALOG_SERVICE, DatePickerComponent, DateUtils, DragDropEventPlugin, DropListComponent, DropdownBoxComponent, DropdownContentDirective, DropdownDirective, DropdownToggleDirective, DynamicTableCellComponent, DynamicTableComponent, DynamicTableTemplateDirective, EDITOR_TYPES, EPSILON, ERROR_HANDLER, EXPRESS_REQUEST, EntriesPipe, Enum, ErrorHandlerService, EventsService, ExclusionsRenderer, ExtraItemPropertiesPipe, FactoryDependencies, FakeModuleComponent, FileSystemEntry, FileUtils, FilterPipe, FindPipe, ForbiddenZone, FormatNumberPipe, FormatterService, GenericValue, GetOffsetPipe, GetTypePipe, GetValuePipe, GlobalTemplateDirective, GlobalTemplatePipe, GlobalTemplateService, GroupByPipe, HitZoneRenderer, HrefSerializer, ICON_MAP, ICON_SERVICE, ICON_TYPE, IConfiguration, IconComponent, IconDefaultComponent, IconDirective, IconService, IncludesPipe, Initializer, InteractiveCanvasComponent, InteractiveCircleComponent, InteractiveItemComponent, InteractiveRectComponent, IsTypePipe, JoinPipe, KeysPipe, LANGUAGE_SERVICE, LanguageService, LoaderUtils, LocalHttpService, MapPipe, MathUtils, MaxPipe, MinPipe, NgxTemplateOutletDirective, NgxUtilsModule, OPTIONS_TOKEN, ObjectType, ObjectUtils, ObservableUtils, OpenApiService, Oval, PROMISE_SERVICE, PaginationDirective, PaginationItemContext, PaginationItemDirective, PaginationMenuComponent, Point, PopPipe, PromiseService, RESIZE_DELAY, RESIZE_STRATEGY, ROOT_ELEMENT, Rect, ReducePipe, ReflectUtils, RemapPipe, ReplacePipe, RequestBag, ResizeEventPlugin, ResourceIfContext, ResourceIfDirective, ReversePipe, RoundPipe, RulerCanvasRenderer, SCHEMA_SELECTOR, SCRIPT_PARAMS, STATIC_SCHEMAS, SafeHtmlPipe, ScrollEventPlugin, SetUtils, ShapeGroup, ShiftPipe, SocketClient, SocketService, SplitPipe, StateService, StaticAuthService, StaticLanguageService, StickyClassDirective, StickyDirective, StorageMode, StorageService, StringUtils, SyncAsyncPipe, TOASTER_SERVICE, TabsComponent, TabsItemDirective, TabsTemplateDirective, TimerUtils, TranslatePipe, TranslatedUrlSerializer, UniqueUtils, UniversalService, UnorderedListComponent, UnorderedListItemDirective, UnorderedListTemplateDirective, UploadComponent, ValuedPromise, ValuesPipe, WysiwygComponent, addDate, addPts, cachedFactory, cancelablePromise, checkTransitions, clamp, computedPrevious, convertTableColumns, convertToDate, convertToDateFormat, createTypedProvider, cssStyles, cssVariables, diffEntities, distance, distanceSq, dividePts, dotProduct, ensurePoint, eqPts, findClosestValidDate, getComponentDef, getCssVariables, getISOWeekNumber, getRoot, getType, impatientPromise, injectOptions, isBrowser, isDate, isDayOfWeekDisabled, isDefined, isEqual, isFunction, isObject, isPoint, isSameDay, isString, isStringWithValue, isZero, lengthOfPt, lengthSq, lerpPts, md5, multiplyPts, negatePt, normalizePt, normalizeRange, overflow, parseSelector, parseValidDate, perpendicular, promiseTimeout, provideEntryComponents, provideOptions, provideWithOptions, rotateDeg, rotateRad, scalePt, selectorMatchesList, stringify, subPts, svgToDataUri, switchClass, toDegrees, toMidnight, toRadians, toStringArray, tripleProduct };
|
|
11342
11347
|
//# sourceMappingURL=stemy-ngx-utils.mjs.map
|