@mediusinc/mng-commons 5.3.0-rc.1 → 5.3.0-rc.2
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/core/data-list/filter-metadata.model.d.ts +20 -0
- package/core/helpers/number.d.ts +5 -0
- package/core/helpers/type-helpers.d.ts +1 -0
- package/core/index.d.ts +2 -0
- package/core/provide.d.ts +3 -2
- package/core/services/tokens/module-config.token.d.ts +7 -6
- package/esm2022/core/data-list/data-list-params-helpers.mjs +3 -1
- package/esm2022/core/data-list/filter-metadata.model.mjs +2 -0
- package/esm2022/core/helpers/date.mjs +2 -2
- package/esm2022/core/helpers/number.mjs +19 -0
- package/esm2022/core/helpers/type-helpers.mjs +1 -1
- package/esm2022/core/index.mjs +3 -1
- package/esm2022/core/pipes/boolean.pipe.mjs +7 -1
- package/esm2022/core/provide.mjs +4 -3
- package/esm2022/core/services/tokens/module-config.token.mjs +1 -1
- package/esm2022/filter/descriptors/filter-lookup.descriptor.mjs +2 -3
- package/esm2022/filter/descriptors/filter.descriptor.mjs +76 -31
- package/esm2022/filter/models/filter.model.mjs +6 -1
- package/esm2022/form/components/date-range/date-range.component.mjs +45 -14
- package/esm2022/form/components/dropdown/dropdown.component.mjs +77 -93
- package/esm2022/form/components/number-range/number-range.component.mjs +29 -12
- package/esm2022/table/api/descriptors/column.descriptor.mjs +2 -1
- package/esm2022/table/api/descriptors/table.descriptor.mjs +11 -20
- package/esm2022/table/api/models/table-columns.model.mjs +1 -1
- package/esm2022/table/api/models/table.model.mjs +1 -1
- package/esm2022/table/components/column-filter/column-filter.component.mjs +396 -0
- package/esm2022/table/components/filter/filter-active-tag/filter-active-tag.component.mjs +52 -0
- package/esm2022/table/components/filter/filter-form/filter-form.component.mjs +197 -0
- package/esm2022/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.mjs +135 -0
- package/esm2022/table/components/table/table.component.mjs +34 -25
- package/esm2022/table/helpers/filters.mjs +297 -0
- package/esm2022/table/index.mjs +13 -2
- package/esm2022/table/models/filter.model.mjs +2 -0
- package/esm2022/table/pipes/filter-value.pipe.mjs +77 -0
- package/esm2022/table/provide.mjs +19 -0
- package/esm2022/table/services/data-list.service.mjs +1 -1
- package/esm2022/table/services/table-feature-config.token.mjs +3 -0
- package/esm2022/tableview/action/components/editor/injector-context/action-editor-injector-context.component.mjs +2 -2
- package/esm2022/tableview/action/components/localization/data-language-dropdown.component.mjs +2 -2
- package/esm2022/tableview/api/editor/descriptors/field.descriptor.mjs +1 -1
- package/esm2022/tableview/api/editor/models/editor-fields.model.mjs +1 -1
- package/esm2022/tableview/api/tableview/descriptors/tableview.descriptor.mjs +11 -13
- package/esm2022/tableview/editor/components/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +2 -2
- package/esm2022/tableview/tableview/components/tableview/tableview.component.mjs +3 -4
- package/fesm2022/mediusinc-mng-commons-core.mjs +32 -4
- package/fesm2022/mediusinc-mng-commons-core.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-filter.mjs +81 -32
- package/fesm2022/mediusinc-mng-commons-filter.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-form.mjs +149 -117
- package/fesm2022/mediusinc-mng-commons-form.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table-api.mjs +11 -19
- package/fesm2022/mediusinc-mng-commons-table-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-table.mjs +832 -359
- package/fesm2022/mediusinc-mng-commons-table.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs +10 -12
- package/fesm2022/mediusinc-mng-commons-tableview-api.mjs.map +1 -1
- package/fesm2022/mediusinc-mng-commons-tableview.mjs +5 -5
- package/fesm2022/mediusinc-mng-commons-tableview.mjs.map +1 -1
- package/filter/descriptors/filter.descriptor.d.ts +60 -16
- package/filter/models/filter.model.d.ts +4 -0
- package/form/components/date-range/date-range.component.d.ts +9 -3
- package/form/components/dropdown/dropdown.component.d.ts +6 -7
- package/form/components/number-range/number-range.component.d.ts +8 -4
- package/i18n/en.json +32 -0
- package/i18n/sl.json +32 -0
- package/package.json +7 -7
- package/table/api/descriptors/table.descriptor.d.ts +7 -7
- package/table/api/models/table-columns.model.d.ts +3 -3
- package/table/api/models/table.model.d.ts +0 -12
- package/table/components/{column-filter-full/column-filter-full.component.d.ts → column-filter/column-filter.component.d.ts} +23 -38
- package/table/components/filter/filter-active-tag/filter-active-tag.component.d.ts +20 -0
- package/table/components/filter/filter-form/filter-form.component.d.ts +53 -0
- package/table/components/filter/filter-overlay-with-tag/filter-overlay-with-tag.component.d.ts +35 -0
- package/table/components/table/table.component.d.ts +10 -7
- package/table/helpers/filters.d.ts +31 -0
- package/table/index.d.ts +10 -1
- package/table/models/filter.model.d.ts +24 -0
- package/table/pipes/filter-value.pipe.d.ts +19 -0
- package/table/provide.d.ts +8 -0
- package/table/services/data-list.service.d.ts +3 -2
- package/table/services/table-feature-config.token.d.ts +6 -0
- package/tableview/api/editor/descriptors/field.descriptor.d.ts +3 -3
- package/tableview/api/editor/models/editor-fields.model.d.ts +4 -4
- package/tableview/api/tableview/descriptors/tableview.descriptor.d.ts +8 -6
- package/version-info.json +5 -5
- package/esm2022/table/components/column-filter-full/column-filter-full.component.mjs +0 -655
|
@@ -178,7 +178,7 @@ function dateToIsoString(value, type = 'date-time', dateTimeOpts = {}) {
|
|
|
178
178
|
':' +
|
|
179
179
|
padNumber(value.getSeconds());
|
|
180
180
|
if (!dateTimeOpts.noMillis) {
|
|
181
|
-
base += '.' + padNumber(value.getMilliseconds());
|
|
181
|
+
base += '.' + padNumber(value.getMilliseconds(), 3);
|
|
182
182
|
}
|
|
183
183
|
if (!dateTimeOpts.noTimezone) {
|
|
184
184
|
const tzo = -value.getTimezoneOffset(), dif = tzo >= 0 ? '+' : '-';
|
|
@@ -865,10 +865,12 @@ function fromTableLoadToDataListParams(event) {
|
|
|
865
865
|
if (Array.isArray(eventFilter)) {
|
|
866
866
|
filter.value = eventFilter[0].value;
|
|
867
867
|
filter.matchMode = eventFilter[0].matchMode;
|
|
868
|
+
filter.caseSensitive = eventFilter[0].caseSensitive;
|
|
868
869
|
}
|
|
869
870
|
else if (eventFilter !== undefined) {
|
|
870
871
|
filter.value = eventFilter.value;
|
|
871
872
|
filter.matchMode = eventFilter.matchMode;
|
|
873
|
+
filter.caseSensitive = eventFilter.caseSensitive;
|
|
872
874
|
}
|
|
873
875
|
return { ...acc, [key]: filter };
|
|
874
876
|
}, {});
|
|
@@ -2027,6 +2029,25 @@ function toastMessage(messageService, title, message, severity = 'success', icon
|
|
|
2027
2029
|
return notification;
|
|
2028
2030
|
}
|
|
2029
2031
|
|
|
2032
|
+
function fromAngularNumberFormatToFractions(format) {
|
|
2033
|
+
const hasDot = format.indexOf('.') >= 0;
|
|
2034
|
+
const hasDash = format.indexOf('-') >= 0;
|
|
2035
|
+
const [intPart, decPart] = format.split('.');
|
|
2036
|
+
let int = hasDot || (!hasDot && !hasDash) ? +intPart : 1;
|
|
2037
|
+
if (!int || isNaN(int))
|
|
2038
|
+
int = 1;
|
|
2039
|
+
let [fractionsMin, fractionsMax] = !hasDot && !hasDash ? [0, 0] : (hasDot ? decPart : intPart).split('-').map(f => +f);
|
|
2040
|
+
if (isNaN(fractionsMin))
|
|
2041
|
+
fractionsMin = 0;
|
|
2042
|
+
if (fractionsMax == null || isNaN(fractionsMax))
|
|
2043
|
+
fractionsMax = fractionsMin;
|
|
2044
|
+
return {
|
|
2045
|
+
integer: int,
|
|
2046
|
+
fractionsMin: fractionsMin,
|
|
2047
|
+
fractionsMax: fractionsMax
|
|
2048
|
+
};
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2030
2051
|
function removeRouteEmptyPathSegments(path) {
|
|
2031
2052
|
const filteredPath = path.filter(ps => typeof ps === 'string' && ps.length > 0);
|
|
2032
2053
|
return filteredPath.length > 0 ? filteredPath : [''];
|
|
@@ -2219,6 +2240,12 @@ class LogPublisherConsoleService {
|
|
|
2219
2240
|
|
|
2220
2241
|
class BooleanPipe {
|
|
2221
2242
|
transform(value, yes, no, icon = false) {
|
|
2243
|
+
if (typeof value === 'string') {
|
|
2244
|
+
value = value.toLowerCase() === 'true';
|
|
2245
|
+
}
|
|
2246
|
+
else if (typeof value === 'number') {
|
|
2247
|
+
value = value === 1;
|
|
2248
|
+
}
|
|
2222
2249
|
if (typeof value === 'boolean') {
|
|
2223
2250
|
if (icon) {
|
|
2224
2251
|
return value ? yes ?? 'pi pi-check' : no ?? 'pi pi-times';
|
|
@@ -3945,8 +3972,9 @@ class Styles {
|
|
|
3945
3972
|
var CommonsFeatureTypeEnum;
|
|
3946
3973
|
(function (CommonsFeatureTypeEnum) {
|
|
3947
3974
|
CommonsFeatureTypeEnum[CommonsFeatureTypeEnum["Layout"] = 0] = "Layout";
|
|
3948
|
-
CommonsFeatureTypeEnum[CommonsFeatureTypeEnum["
|
|
3949
|
-
CommonsFeatureTypeEnum[CommonsFeatureTypeEnum["
|
|
3975
|
+
CommonsFeatureTypeEnum[CommonsFeatureTypeEnum["Table"] = 1] = "Table";
|
|
3976
|
+
CommonsFeatureTypeEnum[CommonsFeatureTypeEnum["Tableview"] = 2] = "Tableview";
|
|
3977
|
+
CommonsFeatureTypeEnum[CommonsFeatureTypeEnum["DataApiAsClassV1"] = 3] = "DataApiAsClassV1";
|
|
3950
3978
|
})(CommonsFeatureTypeEnum || (CommonsFeatureTypeEnum = {}));
|
|
3951
3979
|
function provideCommons(config, ...features) {
|
|
3952
3980
|
const providers = [
|
|
@@ -4008,5 +4036,5 @@ function provideCommons(config, ...features) {
|
|
|
4008
4036
|
* Generated bundle index. Do not edit.
|
|
4009
4037
|
*/
|
|
4010
4038
|
|
|
4011
|
-
export { ACommonsErrorBase, APermissions, BROWSER_STORAGE_IT, BooleanPipe, COMMONS_INITIALIZER_IT, COMMONS_MODULE_CONFIG_IT, ClassMapPipe, CommonsConfigurationService, CommonsErrorHandler, CommonsFeatureTypeEnum, CommonsHttpError, CommonsInitEventEnum, CommonsInitService, CommonsInternalError, CommonsRouterService, CommonsService, CommonsStorageService, ComponentDirective, DataProvider, DataProviderInst, EnumName, EnumPipe, EnumerateAsyncPipe, EnumeratePipe, ErrorPageComponent, FilterMatchMode, GetterPipe, I18nPropertyPipe, JsonPathPipe, LOG_PUBLISHERS, LogLevelEnum, LogPublisherConsoleService, LoggerService, NotFoundPageComponent, NotificationWrapperComponent, ParametrizePipe, PermissionService, PermissionTypeEnum, Permissions, RouteBuilder, RoutesBuilder, StyleLevelEnum, StyleSizeEnum, Styles, TemplateDirective, TemplatePipe, TypeName, TypeRegistry, adjustRouteMenuLazyChildrenRouterLinks, angularDateFormatHasSeconds, angularDateFormatHasTime, appendRoutePathToBasePath, boolean$Attribute, booleanOrUndefinedAttribute, commonsActionErrorContextToString, commonsErrorToString, commonsInitializerProvider, copyDataListParams, createLazyChildrenRoute, createLazyRoute, createRoute, createRouteRedirect, createRoutes, dataListParamsFilterToUrlQuery, dataListParamsFilterValueToUrlString, dataListParamsFiltersToUrlQuery, dataListParamsSortToUrlQuery, dataListParamsToUrlQuery, dataProviderBase, dataProviderFromClass, dataProviderWithService, dateToIsoString, defineReflectEnumName, defineReflectTypeName, doesUrlMatchRouterLink, errorCauseToString, errorToString, escapeHtml, escapeHtmlAny, findReflectEnumName, findReflectTypeName, findTemplateByName, flattenObjectKeys, fromAngularDateFormatToPrime, fromEnumConstantsAsValueArray, fromEnumValuesAsValueArray, fromSubscribeError, fromTableLoadToDataListParams, fromUrlQueryToDataListParams, getEnumConstantName, getEnumConstantNameFromObject, getEnumConstantNames, getEnumConstantNamesFromObject, getEnumConstantValues, getEnumConstantValuesAsNumber, getEnumConstantValuesAsString, getEnumerationI18nBaseKey, getErrorLogLevel, getErrorName, getHttpErrorResponse, getHttpErrorResponseStatus, getHttpErrorResponseStatusText, getI18n, getI18nAsync, getI18nErrorParams, getI18nForError, getI18nTypeGroupKey, getI18nTypeKeyBasePath, getI18nTypeName, getI18nTypeNameAsync, getI18nTypeParams, getI18nTypeParamsAsync, getI18nTypePropertyKey, getI18nTypeTabKey, getObjectGetters, getObjectProperties, getObjectPropertyByPath, httpErrorResponseToString, isHttpErrorResponse, isPermitted, isRbacPermitted, itemIdToDefined, itemIdToNumber, itemIdToString, mapToDataList, mergeDataListParamsWithDefaults, number$Attribute, objectDeepCopy, objectDeepMerge, permissionGuard, populateI18nParams, populateI18nTypeParams, provideCommons, reflectEnumNameKey, reflectTypeNameExists, reflectTypeNameKey, removeRouteEmptyPathSegments, selectEnumerationI18n, selectI18n, stringify, throwError, toEnumerationI18nEnumerate, toObservable, toastMessage, valueToDefined };
|
|
4039
|
+
export { ACommonsErrorBase, APermissions, BROWSER_STORAGE_IT, BooleanPipe, COMMONS_INITIALIZER_IT, COMMONS_MODULE_CONFIG_IT, ClassMapPipe, CommonsConfigurationService, CommonsErrorHandler, CommonsFeatureTypeEnum, CommonsHttpError, CommonsInitEventEnum, CommonsInitService, CommonsInternalError, CommonsRouterService, CommonsService, CommonsStorageService, ComponentDirective, DataProvider, DataProviderInst, EnumName, EnumPipe, EnumerateAsyncPipe, EnumeratePipe, ErrorPageComponent, FilterMatchMode, GetterPipe, I18nPropertyPipe, JsonPathPipe, LOG_PUBLISHERS, LogLevelEnum, LogPublisherConsoleService, LoggerService, NotFoundPageComponent, NotificationWrapperComponent, ParametrizePipe, PermissionService, PermissionTypeEnum, Permissions, RouteBuilder, RoutesBuilder, StyleLevelEnum, StyleSizeEnum, Styles, TemplateDirective, TemplatePipe, TypeName, TypeRegistry, adjustRouteMenuLazyChildrenRouterLinks, angularDateFormatHasSeconds, angularDateFormatHasTime, appendRoutePathToBasePath, boolean$Attribute, booleanOrUndefinedAttribute, commonsActionErrorContextToString, commonsErrorToString, commonsInitializerProvider, copyDataListParams, createLazyChildrenRoute, createLazyRoute, createRoute, createRouteRedirect, createRoutes, dataListParamsFilterToUrlQuery, dataListParamsFilterValueToUrlString, dataListParamsFiltersToUrlQuery, dataListParamsSortToUrlQuery, dataListParamsToUrlQuery, dataProviderBase, dataProviderFromClass, dataProviderWithService, dateToIsoString, defineReflectEnumName, defineReflectTypeName, doesUrlMatchRouterLink, errorCauseToString, errorToString, escapeHtml, escapeHtmlAny, findReflectEnumName, findReflectTypeName, findTemplateByName, flattenObjectKeys, fromAngularDateFormatToPrime, fromAngularNumberFormatToFractions, fromEnumConstantsAsValueArray, fromEnumValuesAsValueArray, fromSubscribeError, fromTableLoadToDataListParams, fromUrlQueryToDataListParams, getEnumConstantName, getEnumConstantNameFromObject, getEnumConstantNames, getEnumConstantNamesFromObject, getEnumConstantValues, getEnumConstantValuesAsNumber, getEnumConstantValuesAsString, getEnumerationI18nBaseKey, getErrorLogLevel, getErrorName, getHttpErrorResponse, getHttpErrorResponseStatus, getHttpErrorResponseStatusText, getI18n, getI18nAsync, getI18nErrorParams, getI18nForError, getI18nTypeGroupKey, getI18nTypeKeyBasePath, getI18nTypeName, getI18nTypeNameAsync, getI18nTypeParams, getI18nTypeParamsAsync, getI18nTypePropertyKey, getI18nTypeTabKey, getObjectGetters, getObjectProperties, getObjectPropertyByPath, httpErrorResponseToString, isHttpErrorResponse, isPermitted, isRbacPermitted, itemIdToDefined, itemIdToNumber, itemIdToString, mapToDataList, mergeDataListParamsWithDefaults, number$Attribute, objectDeepCopy, objectDeepMerge, permissionGuard, populateI18nParams, populateI18nTypeParams, provideCommons, reflectEnumNameKey, reflectTypeNameExists, reflectTypeNameKey, removeRouteEmptyPathSegments, selectEnumerationI18n, selectI18n, stringify, throwError, toEnumerationI18nEnumerate, toObservable, toastMessage, valueToDefined };
|
|
4012
4040
|
//# sourceMappingURL=mediusinc-mng-commons-core.mjs.map
|