@indigina/ui-kit 1.1.154 → 1.1.156
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/fesm2022/indigina-ui-kit.mjs +23 -8
- package/fesm2022/indigina-ui-kit.mjs.map +1 -1
- package/lib/widgets/kit-grid-management/kit-grid-cell/kit-grid-cell.service.d.ts +1 -1
- package/lib/widgets/kit-grid-management/store/kit-grid.action.d.ts +3 -0
- package/lib/widgets/kit-grid-management/store/kit-grid.model.d.ts +1 -0
- package/lib/widgets/kit-grid-management/store/kit-grid.state.d.ts +2 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -6605,6 +6605,9 @@ class AbstractPayloadAction {
|
|
|
6605
6605
|
class SetGridSkip extends AbstractPayloadAction {
|
|
6606
6606
|
static { this.type = '[Grid] SetSkip'; }
|
|
6607
6607
|
}
|
|
6608
|
+
class SetGridTake extends AbstractPayloadAction {
|
|
6609
|
+
static { this.type = '[Grid] SetTake'; }
|
|
6610
|
+
}
|
|
6608
6611
|
class SetGridSearch extends AbstractPayloadAction {
|
|
6609
6612
|
static { this.type = '[Grid] SetSearch'; }
|
|
6610
6613
|
}
|
|
@@ -6637,6 +6640,11 @@ let KitGridState = class KitGridState {
|
|
|
6637
6640
|
skip: action.payload,
|
|
6638
6641
|
}));
|
|
6639
6642
|
}
|
|
6643
|
+
setGridTake(ctx, action) {
|
|
6644
|
+
ctx.setState(patch({
|
|
6645
|
+
take: action.payload,
|
|
6646
|
+
}));
|
|
6647
|
+
}
|
|
6640
6648
|
setGridSearch(ctx, action) {
|
|
6641
6649
|
ctx.setState(patch({
|
|
6642
6650
|
search: action.payload,
|
|
@@ -6685,6 +6693,9 @@ let KitGridState = class KitGridState {
|
|
|
6685
6693
|
__decorate([
|
|
6686
6694
|
Action(SetGridSkip)
|
|
6687
6695
|
], KitGridState.prototype, "setGridSkip", null);
|
|
6696
|
+
__decorate([
|
|
6697
|
+
Action(SetGridTake)
|
|
6698
|
+
], KitGridState.prototype, "setGridTake", null);
|
|
6688
6699
|
__decorate([
|
|
6689
6700
|
Action(SetGridSearch)
|
|
6690
6701
|
], KitGridState.prototype, "setGridSearch", null);
|
|
@@ -6714,6 +6725,7 @@ KitGridState = __decorate([
|
|
|
6714
6725
|
name: KIT_GRID_STATE_TOKEN,
|
|
6715
6726
|
defaults: {
|
|
6716
6727
|
skip: 0,
|
|
6728
|
+
take: 10,
|
|
6717
6729
|
sort: [],
|
|
6718
6730
|
filter: [],
|
|
6719
6731
|
columns: [],
|
|
@@ -6722,7 +6734,7 @@ KitGridState = __decorate([
|
|
|
6722
6734
|
], KitGridState);
|
|
6723
6735
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: KitGridState, decorators: [{
|
|
6724
6736
|
type: Injectable
|
|
6725
|
-
}], propDecorators: { setGridSkip: [], setGridSearch: [], removeGridSearch: [], setGridSort: [], setGridColumns: [], addGridFilter: [], removeGridFilter: [], updateGridFilter: [], setGridFilters: [] } });
|
|
6737
|
+
}], propDecorators: { setGridSkip: [], setGridTake: [], setGridSearch: [], removeGridSearch: [], setGridSort: [], setGridColumns: [], addGridFilter: [], removeGridFilter: [], updateGridFilter: [], setGridFilters: [] } });
|
|
6726
6738
|
|
|
6727
6739
|
const kitBuildGridColumn = (field, title, type, sortable = true, hidden = false, width, filterType) => ({
|
|
6728
6740
|
field,
|
|
@@ -6755,6 +6767,7 @@ class KitGridUrlStateService {
|
|
|
6755
6767
|
const params = this.activatedRoute.snapshot.queryParams;
|
|
6756
6768
|
return {
|
|
6757
6769
|
skip: params?.skip && Number(params.skip),
|
|
6770
|
+
take: params?.take && Number(params.take),
|
|
6758
6771
|
sort: params?.sort && JSON.parse(params.sort),
|
|
6759
6772
|
filter: params?.filter && JSON.parse(params.filter),
|
|
6760
6773
|
search: params?.search && JSON.parse(params.search),
|
|
@@ -6764,6 +6777,7 @@ class KitGridUrlStateService {
|
|
|
6764
6777
|
setGridStateToUrl(state) {
|
|
6765
6778
|
const queryParams = {
|
|
6766
6779
|
skip: state.skip,
|
|
6780
|
+
take: state.take,
|
|
6767
6781
|
search: state.search,
|
|
6768
6782
|
sort: JSON.stringify(state.sort),
|
|
6769
6783
|
filter: JSON.stringify(state.filter),
|
|
@@ -7432,6 +7446,7 @@ class KitGridViewsComponent {
|
|
|
7432
7446
|
new SetGridFilters(convertFilterStringDate(urlState.filter ?? view?.viewState?.filter ?? [])),
|
|
7433
7447
|
new SetGridColumns(buildGridColumns(this.defaultColumns(), view?.viewState?.columns ?? this.defaultColumns())),
|
|
7434
7448
|
new SetGridSkip(urlState.skip ?? 0),
|
|
7449
|
+
new SetGridTake(urlState.take ?? 10),
|
|
7435
7450
|
new SetGridSearch(urlState.search),
|
|
7436
7451
|
]).subscribe(() => this.viewChanged.emit());
|
|
7437
7452
|
}
|
|
@@ -8131,25 +8146,25 @@ class KitGridCellService {
|
|
|
8131
8146
|
this.dateFormat = KIT_DATE_FORMAT;
|
|
8132
8147
|
this.dateTimeFormat = KIT_DATETIME_FORMAT_LONG;
|
|
8133
8148
|
}
|
|
8134
|
-
createCellValue(columnType, columnField, dataItem, translationMap = {}) {
|
|
8149
|
+
createCellValue(columnType, columnField, dataItem, translationMap = {}, defaultValue = '') {
|
|
8135
8150
|
let value = dataItem[columnField];
|
|
8136
8151
|
if (!value) {
|
|
8137
8152
|
value = this.getNestedGridCellValue(dataItem, columnField);
|
|
8138
8153
|
}
|
|
8139
8154
|
if (columnField in translationMap && value) {
|
|
8140
|
-
return this.translateService.instant(translationMap[columnField](value));
|
|
8155
|
+
return this.translateService.instant(translationMap[columnField](value)) ?? defaultValue;
|
|
8141
8156
|
}
|
|
8142
8157
|
switch (columnType) {
|
|
8143
8158
|
case 'number':
|
|
8144
|
-
return this.decimalPipe.transform(value) ??
|
|
8159
|
+
return this.decimalPipe.transform(value) ?? defaultValue;
|
|
8145
8160
|
case 'date':
|
|
8146
|
-
return this.datePipe.transform(value, this.dateFormat, 'UTC') ??
|
|
8161
|
+
return this.datePipe.transform(value, this.dateFormat, 'UTC') ?? defaultValue;
|
|
8147
8162
|
case 'dateTime':
|
|
8148
|
-
return this.datePipe.transform(value, this.dateTimeFormat, 'UTC') ??
|
|
8163
|
+
return this.datePipe.transform(value, this.dateTimeFormat, 'UTC') ?? defaultValue;
|
|
8149
8164
|
case 'boolean':
|
|
8150
8165
|
return this.translateService.instant(value ? 'common.yes' : 'common.no');
|
|
8151
8166
|
default:
|
|
8152
|
-
return value ||
|
|
8167
|
+
return value || defaultValue;
|
|
8153
8168
|
}
|
|
8154
8169
|
}
|
|
8155
8170
|
getNestedGridCellValue(dataItem, field) {
|
|
@@ -8472,5 +8487,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
8472
8487
|
* Generated bundle index. Do not edit.
|
|
8473
8488
|
*/
|
|
8474
8489
|
|
|
8475
|
-
export { AbstractKitCtaPanelConfirmationComponent, AddGridFilter, KIT_BASE_PATH, KIT_DATETIME_FORMAT_LONG, KIT_DATE_FORMAT, KIT_GRID_STATE_TOKEN, KitAutocompleteComponent, KitAutocompleteDirective, KitAutocompleteModule, KitAvatarComponent, KitAvatarModule, KitAvatarSize, KitBadgeDirective, KitBadgeTheme, KitBreadcrumbsComponent, KitBreadcrumbsModule, KitButtonComponent, KitButtonIconPosition, KitButtonKind, KitButtonModule, KitButtonState, KitButtonType, KitCardComponent, KitCardModule, KitCardTheme, KitCheckboxComponent, KitCheckboxModule, KitCheckboxState, KitCollapsedListComponent, KitCopyTextComponent, KitCopyTextModule, KitCtaPanelAbstractConfirmationComponent, KitCtaPanelAbstractConfirmationModule, KitCtaPanelActionComponent, KitCtaPanelActionModule, KitCtaPanelConfirmationComponent, KitCtaPanelConfirmationModule, KitCtaPanelItemComponent, KitCtaPanelItemModule, KitCtaPanelItemType, KitDataFieldComponent, KitDataFieldState, KitDatepickerComponent, KitDatepickerModule, KitDaterangeComponent, KitDaterangeModule, KitDaterangeType, KitDatetimepickerComponent, KitDatetimepickerModule, KitDialogActionsComponent, KitDialogComponent, KitDialogService, KitDropdownComponent, KitDropdownItemTemplateDirective, KitDropdownModule, KitDropdownSize, KitEmptySectionComponent, KitEntitySectionComponent, KitEntitySectionContainerComponent, KitEntityTitleComponent, KitEntityTitleModule, KitFileCardComponent, KitFileCardMessagesComponent, KitFileCardModule, KitFileUploadComponent, KitFileUploadModule, KitFilterCheckboxComponent, KitFilterLogic, KitFilterOperator, KitFilterType, KitGridCellComponent, KitGridCellService, KitGridCellTemplateDirective, KitGridColumnComponent, KitGridColumnManagerComponent, KitGridComponent, KitGridDetailTemplateDirective, KitGridExportComponent, KitGridFiltersComponent, KitGridModule, KitGridSearchComponent, KitGridSortSettingsMode, KitGridState, KitGridUrlStateService, KitGridViewType, KitGridViewsComponent, KitGridViewsState, KitInputLabelComponent, KitInputLabelModule, KitInputMessageComponent, KitInputMessageModule, KitLoaderComponent, KitLoaderModule, KitLocationStepperComponent, KitLocationStepperModule, KitMultiselectComponent, KitMultiselectModule, KitNavigationMenuComponent, KitNavigationMenuModule, KitNavigationMenuService, KitNavigationMenuSubmenuComponent, KitNavigationTabsComponent, KitNavigationTabsModule, KitNavigationTabsType, KitNoteComponent, KitNoteModule, KitNotificationComponent, KitNotificationService, KitNotificationType, KitNumericTextboxComponent, KitNumericTextboxModule, KitNumericTextboxSize, KitNumericTextboxState, KitPermissionDirective, KitPermissionModule, KitPillComponent, KitPillTheme, KitPillType, KitPopupAlignHorizontal, KitPopupAlignVertical, KitPopupComponent, KitPopupPositionMode, KitProfileMenuComponent, KitQueryParamsName, KitQueryParamsService, KitRadioButtonComponent, KitRadioButtonModule, KitRadioButtonType, KitScrollNavigationComponent, KitScrollNavigationSectionComponent, KitSearchBarComponent, KitSearchBarModule, KitShipmentCard, KitSkeletonAnimation, KitSkeletonComponent, KitSkeletonModule, KitSkeletonShape, KitSortDirection, KitSortableComponent, KitSvgIcon, KitSvgIconComponent, KitSvgIconModule, KitSvgIconType, KitSvgSpriteComponent, KitSvgSpriteModule, KitSwitchComponent, KitSwitchMode, KitSwitchModule, KitSwitchState, KitTabComponent, KitTabContentDirective, KitTabsComponent, KitTabsModule, KitTabsSize, KitTabsType, KitTextLabelComponent, KitTextLabelModule, KitTextLabelState, KitTextareaAutoresizeDirective, KitTextareaComponent, KitTextareaModule, KitTextareaState, KitTextboxComponent, KitTextboxModule, KitTextboxSize, KitTextboxState, KitTileLayoutComponent, KitTileLayoutItemComponent, KitTileLayoutModule, KitTimelineCardComponent, KitTimelineComponent, KitTimelineTheme, KitTimelineType, KitTimepickerComponent, KitTimepickerModule, KitTitleTemplateDirective, KitToastrModule, KitToastrPosition, KitToastrService, KitToastrType, KitToggleComponent, KitToggleModule, KitTooltipDirective, KitTooltipPosition, KitTranslateService, KitTruncateTextComponent, KitUnitsTextboxComponent, KitUnitsTextboxDropdownPosition, KitUnitsTextboxModule, KitUnitsTextboxType, RemoveGridFilter, SetGridColumns, SetGridFilters, SetGridSearch, SetGridSkip, SetGridSort, UpdateGridFilter, buildRandomUUID, kitBuildFilterBooleanOptions, kitBuildFilterListOptions, kitBuildFilters, kitBuildGridColumn, kitBuildGridDataResults, kitBuildOdataFilter, kitBuildSortString, kitDataStateToODataString, kitEncodeViewNameToUrl };
|
|
8490
|
+
export { AbstractKitCtaPanelConfirmationComponent, AddGridFilter, KIT_BASE_PATH, KIT_DATETIME_FORMAT_LONG, KIT_DATE_FORMAT, KIT_GRID_STATE_TOKEN, KitAutocompleteComponent, KitAutocompleteDirective, KitAutocompleteModule, KitAvatarComponent, KitAvatarModule, KitAvatarSize, KitBadgeDirective, KitBadgeTheme, KitBreadcrumbsComponent, KitBreadcrumbsModule, KitButtonComponent, KitButtonIconPosition, KitButtonKind, KitButtonModule, KitButtonState, KitButtonType, KitCardComponent, KitCardModule, KitCardTheme, KitCheckboxComponent, KitCheckboxModule, KitCheckboxState, KitCollapsedListComponent, KitCopyTextComponent, KitCopyTextModule, KitCtaPanelAbstractConfirmationComponent, KitCtaPanelAbstractConfirmationModule, KitCtaPanelActionComponent, KitCtaPanelActionModule, KitCtaPanelConfirmationComponent, KitCtaPanelConfirmationModule, KitCtaPanelItemComponent, KitCtaPanelItemModule, KitCtaPanelItemType, KitDataFieldComponent, KitDataFieldState, KitDatepickerComponent, KitDatepickerModule, KitDaterangeComponent, KitDaterangeModule, KitDaterangeType, KitDatetimepickerComponent, KitDatetimepickerModule, KitDialogActionsComponent, KitDialogComponent, KitDialogService, KitDropdownComponent, KitDropdownItemTemplateDirective, KitDropdownModule, KitDropdownSize, KitEmptySectionComponent, KitEntitySectionComponent, KitEntitySectionContainerComponent, KitEntityTitleComponent, KitEntityTitleModule, KitFileCardComponent, KitFileCardMessagesComponent, KitFileCardModule, KitFileUploadComponent, KitFileUploadModule, KitFilterCheckboxComponent, KitFilterLogic, KitFilterOperator, KitFilterType, KitGridCellComponent, KitGridCellService, KitGridCellTemplateDirective, KitGridColumnComponent, KitGridColumnManagerComponent, KitGridComponent, KitGridDetailTemplateDirective, KitGridExportComponent, KitGridFiltersComponent, KitGridModule, KitGridSearchComponent, KitGridSortSettingsMode, KitGridState, KitGridUrlStateService, KitGridViewType, KitGridViewsComponent, KitGridViewsState, KitInputLabelComponent, KitInputLabelModule, KitInputMessageComponent, KitInputMessageModule, KitLoaderComponent, KitLoaderModule, KitLocationStepperComponent, KitLocationStepperModule, KitMultiselectComponent, KitMultiselectModule, KitNavigationMenuComponent, KitNavigationMenuModule, KitNavigationMenuService, KitNavigationMenuSubmenuComponent, KitNavigationTabsComponent, KitNavigationTabsModule, KitNavigationTabsType, KitNoteComponent, KitNoteModule, KitNotificationComponent, KitNotificationService, KitNotificationType, KitNumericTextboxComponent, KitNumericTextboxModule, KitNumericTextboxSize, KitNumericTextboxState, KitPermissionDirective, KitPermissionModule, KitPillComponent, KitPillTheme, KitPillType, KitPopupAlignHorizontal, KitPopupAlignVertical, KitPopupComponent, KitPopupPositionMode, KitProfileMenuComponent, KitQueryParamsName, KitQueryParamsService, KitRadioButtonComponent, KitRadioButtonModule, KitRadioButtonType, KitScrollNavigationComponent, KitScrollNavigationSectionComponent, KitSearchBarComponent, KitSearchBarModule, KitShipmentCard, KitSkeletonAnimation, KitSkeletonComponent, KitSkeletonModule, KitSkeletonShape, KitSortDirection, KitSortableComponent, KitSvgIcon, KitSvgIconComponent, KitSvgIconModule, KitSvgIconType, KitSvgSpriteComponent, KitSvgSpriteModule, KitSwitchComponent, KitSwitchMode, KitSwitchModule, KitSwitchState, KitTabComponent, KitTabContentDirective, KitTabsComponent, KitTabsModule, KitTabsSize, KitTabsType, KitTextLabelComponent, KitTextLabelModule, KitTextLabelState, KitTextareaAutoresizeDirective, KitTextareaComponent, KitTextareaModule, KitTextareaState, KitTextboxComponent, KitTextboxModule, KitTextboxSize, KitTextboxState, KitTileLayoutComponent, KitTileLayoutItemComponent, KitTileLayoutModule, KitTimelineCardComponent, KitTimelineComponent, KitTimelineTheme, KitTimelineType, KitTimepickerComponent, KitTimepickerModule, KitTitleTemplateDirective, KitToastrModule, KitToastrPosition, KitToastrService, KitToastrType, KitToggleComponent, KitToggleModule, KitTooltipDirective, KitTooltipPosition, KitTranslateService, KitTruncateTextComponent, KitUnitsTextboxComponent, KitUnitsTextboxDropdownPosition, KitUnitsTextboxModule, KitUnitsTextboxType, RemoveGridFilter, SetGridColumns, SetGridFilters, SetGridSearch, SetGridSkip, SetGridSort, SetGridTake, UpdateGridFilter, buildRandomUUID, kitBuildFilterBooleanOptions, kitBuildFilterListOptions, kitBuildFilters, kitBuildGridColumn, kitBuildGridDataResults, kitBuildOdataFilter, kitBuildSortString, kitDataStateToODataString, kitEncodeViewNameToUrl };
|
|
8476
8491
|
//# sourceMappingURL=indigina-ui-kit.mjs.map
|