@mediusinc/mng-commons 0.2.4 → 0.2.8

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.
Files changed (250) hide show
  1. package/assets/i18n/en.json +5 -1
  2. package/assets/i18n/sl.json +6 -2
  3. package/esm2020/lib/api/models/builders/query-param.builder.mjs +1 -1
  4. package/esm2020/lib/api/models/filter-match-type.model.mjs +1 -1
  5. package/esm2020/lib/api/models/filter-param.model.mjs +16 -27
  6. package/esm2020/lib/api/models/mappers.mjs +7 -7
  7. package/esm2020/lib/api/models/query-mode.model.mjs +1 -1
  8. package/esm2020/lib/api/models/query-param.model.mjs +38 -37
  9. package/esm2020/lib/api/models/query-result.model.mjs +14 -13
  10. package/esm2020/lib/api/services/crud-api.abstract.service.mjs +28 -21
  11. package/esm2020/lib/api/utils/medius-rest.util.mjs +11 -7
  12. package/esm2020/lib/api/utils/object-serializer.util.mjs +23 -21
  13. package/esm2020/lib/components/action/action.component.mjs +10 -7
  14. package/esm2020/lib/components/action/dialog/action-dialog.component.mjs +16 -13
  15. package/esm2020/lib/components/action/models/action-confirmation-service.model.mjs +1 -1
  16. package/esm2020/lib/components/action/models/action-execution.model.mjs +1 -1
  17. package/esm2020/lib/components/action/route/action-route.component.mjs +8 -6
  18. package/esm2020/lib/components/form/autocomplete/autocomplete.component.mjs +16 -14
  19. package/esm2020/lib/components/form/dropdown/dropdown.component.mjs +16 -15
  20. package/esm2020/lib/components/form/editor/form-editor.component.mjs +21 -24
  21. package/esm2020/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.mjs +3 -3
  22. package/esm2020/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.mjs +3 -3
  23. package/esm2020/lib/components/form/formly/fields/formly-field-fieldset/formly-field-fieldset.component.mjs +4 -4
  24. package/esm2020/lib/components/form/formly/fields/formly-field-input/formly-field-input.component.mjs +8 -4
  25. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +13 -14
  26. package/esm2020/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +12 -11
  27. package/esm2020/lib/components/form/formly/fields/formly-field-tabs/formly-field-tabs.component.mjs +4 -4
  28. package/esm2020/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.mjs +1 -3
  29. package/esm2020/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.mjs +1 -3
  30. package/esm2020/lib/components/form/models/form-editor.event.mjs +1 -1
  31. package/esm2020/lib/components/layout/breadcrumb.component.mjs +3 -3
  32. package/esm2020/lib/components/layout/footer.component.mjs +3 -3
  33. package/esm2020/lib/components/layout/main-layout.component.mjs +4 -4
  34. package/esm2020/lib/components/layout/menu-item.component.mjs +36 -34
  35. package/esm2020/lib/components/layout/menu.component.mjs +3 -3
  36. package/esm2020/lib/components/layout/services/main-layout.component.service.mjs +4 -1
  37. package/esm2020/lib/components/layout/topbar.component.mjs +5 -4
  38. package/esm2020/lib/components/tableview/index.mjs +2 -1
  39. package/esm2020/lib/components/tableview/models/table.event.mjs +1 -1
  40. package/esm2020/lib/components/tableview/route/tableview-route.abstract.component.mjs +4 -4
  41. package/esm2020/lib/components/tableview/route/tableview-route.component.mjs +33 -0
  42. package/esm2020/lib/components/tableview/services/tableview.component.service.mjs +9 -5
  43. package/esm2020/lib/components/tableview/table/column-filter/column-filter.component.mjs +23 -11
  44. package/esm2020/lib/components/tableview/table/column-value/column-value.component.mjs +1 -1
  45. package/esm2020/lib/components/tableview/table/table.component.mjs +27 -26
  46. package/esm2020/lib/components/tableview/tableview.component.mjs +11 -3
  47. package/esm2020/lib/config/formly.config.mjs +30 -22
  48. package/esm2020/lib/config/models/mng-config.model.mjs +1 -1
  49. package/esm2020/lib/data-providers/base.data-provider.mjs +1 -1
  50. package/esm2020/lib/data-providers/editor.data-provider.mjs +2 -2
  51. package/esm2020/lib/data-providers/lookup.data-provider.mjs +1 -1
  52. package/esm2020/lib/data-providers/tableview.data-provider.mjs +2 -2
  53. package/esm2020/lib/descriptors/action.descriptor.mjs +3 -5
  54. package/esm2020/lib/descriptors/editor.descriptor.mjs +21 -9
  55. package/esm2020/lib/descriptors/field.validator.mjs +1 -1
  56. package/esm2020/lib/descriptors/lookup.descriptor.mjs +1 -1
  57. package/esm2020/lib/descriptors/model.descriptor.mjs +3 -3
  58. package/esm2020/lib/descriptors/table.descriptor.mjs +28 -2
  59. package/esm2020/lib/descriptors/tableview.descriptor.mjs +2 -2
  60. package/esm2020/lib/directives/component.directive.mjs +2 -2
  61. package/esm2020/lib/directives/template.directive.mjs +2 -3
  62. package/esm2020/lib/mng-commons.module.mjs +33 -41
  63. package/esm2020/lib/models/index.mjs +1 -2
  64. package/esm2020/lib/models/user.model.mjs +1 -1
  65. package/esm2020/lib/pipes/boolean.pipe.mjs +1 -1
  66. package/esm2020/lib/pipes/property-path.pipe.mjs +1 -1
  67. package/esm2020/lib/router/index.mjs +2 -0
  68. package/esm2020/lib/router/models/index.mjs +2 -0
  69. package/esm2020/lib/router/models/router.model.mjs +2 -0
  70. package/esm2020/lib/router/route-builder.mjs +293 -0
  71. package/esm2020/lib/services/action.service.mjs +19 -15
  72. package/esm2020/lib/services/commons.service.mjs +28 -36
  73. package/esm2020/lib/services/configuration.service.mjs +3 -4
  74. package/esm2020/lib/services/navigation.service.mjs +2 -2
  75. package/esm2020/lib/services/providers/config-service.provider.mjs +2 -2
  76. package/esm2020/lib/services/providers/formly-config.provider.mjs +1 -1
  77. package/esm2020/lib/services/tokens/browser-storage.token.mjs +1 -1
  78. package/esm2020/lib/types/type.decorator.mjs +1 -1
  79. package/esm2020/lib/types/type.model.mjs +1 -1
  80. package/esm2020/lib/utils/editor-formly.util.mjs +7 -21
  81. package/esm2020/lib/utils/i18n.util.mjs +2 -2
  82. package/esm2020/lib/utils/model.util.mjs +1 -1
  83. package/esm2020/lib/utils/route.util.mjs +24 -0
  84. package/esm2020/lib/utils/toast.util.mjs +3 -2
  85. package/esm2020/lib/utils/type.util.mjs +2 -1
  86. package/esm2020/public-api.mjs +2 -1
  87. package/fesm2015/mediusinc-mng-commons.mjs +3409 -2999
  88. package/fesm2015/mediusinc-mng-commons.mjs.map +1 -1
  89. package/fesm2020/mediusinc-mng-commons.mjs +3395 -2984
  90. package/fesm2020/mediusinc-mng-commons.mjs.map +1 -1
  91. package/lib/api/models/filter-param.model.d.ts +1 -1
  92. package/lib/api/services/crud-api.abstract.service.d.ts +6 -6
  93. package/lib/api/utils/medius-rest.util.d.ts +1 -1
  94. package/lib/api/utils/object-serializer.util.d.ts +5 -5
  95. package/lib/components/action/action.component.d.ts +3 -3
  96. package/lib/components/action/dialog/action-dialog.component.d.ts +9 -8
  97. package/lib/components/action/models/action-execution.model.d.ts +1 -1
  98. package/lib/components/action/route/action-route.component.d.ts +2 -2
  99. package/lib/components/form/autocomplete/autocomplete.component.d.ts +4 -3
  100. package/lib/components/form/dropdown/dropdown.component.d.ts +4 -3
  101. package/lib/components/form/editor/form-editor.component.d.ts +7 -6
  102. package/lib/components/form/formly/fields/formly-field-autocomplete/formly-field-autocomplete.component.d.ts +2 -1
  103. package/lib/components/form/formly/fields/formly-field-dropdown/formly-field-dropdown.component.d.ts +2 -1
  104. package/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.d.ts +1 -1
  105. package/lib/components/form/formly/wrappers/formly-field-wrapper/formly-field-wrapper.component.d.ts +1 -3
  106. package/lib/components/form/formly/wrappers/formly-table-wrapper/formly-table-wrapper.component.d.ts +1 -3
  107. package/lib/components/layout/main-layout.component.d.ts +3 -3
  108. package/lib/components/layout/menu-item.component.d.ts +7 -7
  109. package/lib/components/layout/services/main-layout.component.service.d.ts +1 -1
  110. package/lib/components/layout/topbar.component.d.ts +4 -4
  111. package/lib/components/tableview/index.d.ts +1 -0
  112. package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +4 -3
  113. package/lib/components/tableview/route/tableview-route.component.d.ts +15 -0
  114. package/lib/components/tableview/services/tableview.component.service.d.ts +3 -2
  115. package/lib/components/tableview/table/column-filter/column-filter.component.d.ts +5 -0
  116. package/lib/components/tableview/table/table.component.d.ts +21 -19
  117. package/lib/components/tableview/tableview.component.d.ts +6 -4
  118. package/lib/config/formly.config.d.ts +2 -1
  119. package/lib/descriptors/action.descriptor.d.ts +2 -2
  120. package/lib/descriptors/editor.descriptor.d.ts +9 -7
  121. package/lib/descriptors/lookup.descriptor.d.ts +1 -1
  122. package/lib/descriptors/table.descriptor.d.ts +24 -4
  123. package/lib/descriptors/tableview.descriptor.d.ts +1 -1
  124. package/lib/mng-commons.module.d.ts +46 -44
  125. package/lib/models/index.d.ts +0 -1
  126. package/lib/router/index.d.ts +1 -0
  127. package/lib/router/models/index.d.ts +1 -0
  128. package/lib/router/models/router.model.d.ts +22 -0
  129. package/lib/router/route-builder.d.ts +66 -0
  130. package/lib/services/action.service.d.ts +3 -3
  131. package/lib/services/commons.service.d.ts +6 -6
  132. package/lib/services/navigation.service.d.ts +1 -1
  133. package/lib/services/providers/formly-config.provider.d.ts +1 -1
  134. package/lib/utils/editor-formly.util.d.ts +1 -1
  135. package/lib/utils/model.util.d.ts +1 -1
  136. package/lib/utils/route.util.d.ts +4 -0
  137. package/lib/utils/toast.util.d.ts +1 -1
  138. package/package.json +1 -1
  139. package/public-api.d.ts +1 -0
  140. package/scss/common/layout/_breadcrumb.scss +6 -6
  141. package/scss/common/layout/_config.scss +7 -8
  142. package/scss/common/layout/_exception.scss +13 -12
  143. package/scss/common/layout/_footer.scss +3 -3
  144. package/scss/common/layout/_help.scss +8 -9
  145. package/scss/common/layout/_inlinemenu.scss +3 -3
  146. package/scss/common/layout/_invoice.scss +16 -16
  147. package/scss/common/layout/_landing.scss +57 -60
  148. package/scss/common/layout/_loader.scss +0 -1
  149. package/scss/common/layout/_login.scss +3 -4
  150. package/scss/common/layout/_main.scss +3 -3
  151. package/scss/common/layout/_mixins.scss +28 -20
  152. package/scss/common/layout/_rightmenu.scss +5 -5
  153. package/scss/common/layout/_topbar.scss +7 -5
  154. package/scss/common/layout/_typography.scss +11 -6
  155. package/scss/common/layout/_utils.scss +1 -1
  156. package/scss/common/layout/_widgets.scss +20 -19
  157. package/scss/common/layout/menu/_menu_common.scss +6 -6
  158. package/scss/common/layout/menu/_menu_overlay.scss +1 -1
  159. package/scss/common/layout/menu/_menu_sidebar.scss +6 -5
  160. package/scss/common/layout/menu/_menu_slim.scss +2 -3
  161. package/scss/common/layout/menu/_menu_static.scss +1 -1
  162. package/scss/common/layout/menu/_menu_theme.scss +2 -3
  163. package/scss/common/theme/designer/_colors.scss +11 -12
  164. package/scss/common/theme/designer/_common.scss +4 -3
  165. package/scss/common/theme/designer/_mixins.scss +56 -56
  166. package/scss/common/theme/designer/components/button/_button.scss +32 -20
  167. package/scss/common/theme/designer/components/button/_speeddial.scss +1 -1
  168. package/scss/common/theme/designer/components/button/_splitbutton.scss +2 -1
  169. package/scss/common/theme/designer/components/data/_carousel.scss +1 -1
  170. package/scss/common/theme/designer/components/data/_datatable.scss +5 -5
  171. package/scss/common/theme/designer/components/data/_filter.scss +2 -3
  172. package/scss/common/theme/designer/components/data/_fullcalendar.scss +10 -10
  173. package/scss/common/theme/designer/components/data/_orderlist.scss +2 -2
  174. package/scss/common/theme/designer/components/data/_paginator.scss +1 -1
  175. package/scss/common/theme/designer/components/data/_picklist.scss +1 -1
  176. package/scss/common/theme/designer/components/data/_timeline.scss +3 -6
  177. package/scss/common/theme/designer/components/data/_tree.scss +2 -2
  178. package/scss/common/theme/designer/components/data/_treetable.scss +2 -3
  179. package/scss/common/theme/designer/components/input/_autocomplete.scss +8 -8
  180. package/scss/common/theme/designer/components/input/_calendar.scss +6 -6
  181. package/scss/common/theme/designer/components/input/_cascadeselect.scss +1 -1
  182. package/scss/common/theme/designer/components/input/_checkbox.scss +4 -4
  183. package/scss/common/theme/designer/components/input/_chips.scss +4 -4
  184. package/scss/common/theme/designer/components/input/_colorpicker.scss +2 -2
  185. package/scss/common/theme/designer/components/input/_dropdown.scss +2 -2
  186. package/scss/common/theme/designer/components/input/_editor.scss +7 -7
  187. package/scss/common/theme/designer/components/input/_inputgroup.scss +1 -1
  188. package/scss/common/theme/designer/components/input/_inputmask.scss +1 -1
  189. package/scss/common/theme/designer/components/input/_inputnumber.scss +1 -1
  190. package/scss/common/theme/designer/components/input/_inputswitch.scss +2 -2
  191. package/scss/common/theme/designer/components/input/_inputtext.scss +3 -3
  192. package/scss/common/theme/designer/components/input/_listbox.scss +1 -1
  193. package/scss/common/theme/designer/components/input/_multiselect.scss +5 -6
  194. package/scss/common/theme/designer/components/input/_radiobutton.scss +2 -2
  195. package/scss/common/theme/designer/components/input/_rating.scss +1 -1
  196. package/scss/common/theme/designer/components/input/_selectbutton.scss +1 -1
  197. package/scss/common/theme/designer/components/input/_togglebutton.scss +1 -1
  198. package/scss/common/theme/designer/components/input/_treeselect.scss +2 -2
  199. package/scss/common/theme/designer/components/menu/_contextmenu.scss +3 -2
  200. package/scss/common/theme/designer/components/menu/_dock.scss +4 -4
  201. package/scss/common/theme/designer/components/menu/_megamenu.scss +10 -9
  202. package/scss/common/theme/designer/components/menu/_menu.scss +2 -2
  203. package/scss/common/theme/designer/components/menu/_menubar.scss +12 -11
  204. package/scss/common/theme/designer/components/menu/_panelmenu.scss +1 -2
  205. package/scss/common/theme/designer/components/menu/_slidemenu.scss +3 -2
  206. package/scss/common/theme/designer/components/menu/_steps.scss +1 -2
  207. package/scss/common/theme/designer/components/menu/_tieredmenu.scss +3 -2
  208. package/scss/common/theme/designer/components/messages/_message.scss +1 -1
  209. package/scss/common/theme/designer/components/messages/_toast.scss +1 -2
  210. package/scss/common/theme/designer/components/misc/_avatar.scss +1 -1
  211. package/scss/common/theme/designer/components/misc/_badge.scss +1 -1
  212. package/scss/common/theme/designer/components/misc/_blockui.scss +1 -1
  213. package/scss/common/theme/designer/components/misc/_chip.scss +2 -2
  214. package/scss/common/theme/designer/components/misc/_inplace.scss +0 -1
  215. package/scss/common/theme/designer/components/misc/_scrolltop.scss +1 -1
  216. package/scss/common/theme/designer/components/misc/_skeleton.scss +1 -1
  217. package/scss/common/theme/designer/components/misc/_tag.scss +1 -1
  218. package/scss/common/theme/designer/components/misc/_terminal.scss +8 -8
  219. package/scss/common/theme/designer/components/multimedia/_galleria.scss +1 -1
  220. package/scss/common/theme/designer/components/overlay/_confirmpopup.scss +2 -4
  221. package/scss/common/theme/designer/components/overlay/_dialog.scss +3 -3
  222. package/scss/common/theme/designer/components/overlay/_overlaypanel.scss +2 -4
  223. package/scss/common/theme/designer/components/panel/_accordion.scss +2 -2
  224. package/scss/common/theme/designer/components/panel/_divider.scss +1 -1
  225. package/scss/common/theme/designer/components/panel/_scrollpanel.scss +1 -1
  226. package/scss/common/theme/designer/components/panel/_splitter.scss +1 -1
  227. package/scss/common/theme/extensions/_button.scss +18 -6
  228. package/scss/common/theme/extensions/_orderlist.scss +0 -1
  229. package/scss/common/theme/extensions/_picklist.scss +0 -1
  230. package/scss/common/theme/extensions/_tree.scss +0 -1
  231. package/scss/common/variables/layout/_common.scss +9 -9
  232. package/scss/common/variables/layout/_layout_dark.scss +12 -12
  233. package/scss/common/variables/layout/_layout_light.scss +13 -13
  234. package/scss/common/variables/theme/_theme_dark.scss +76 -76
  235. package/scss/common/variables/theme/_theme_light.scss +80 -80
  236. package/scss/layout/default/_mng-variables-layout-dark.scss +1 -1
  237. package/scss/mng-commons-dark.scss +2 -2
  238. package/scss/mng-commons-light.scss +2 -2
  239. package/scss/mng-overrides/_layout_dialog.scss +4 -3
  240. package/scss/mng-overrides/_layout_forms.scss +1 -1
  241. package/scss/mng-overrides/_layout_radio.scss +1 -1
  242. package/scss/mng-overrides/_theme_datepicker.scss +7 -0
  243. package/scss/mng-overrides/_theme_dialog.scss +0 -1
  244. package/scss/mng-overrides/_theme_dropdown.scss +0 -1
  245. package/scss/mng-overrides/_theme_styles.scss +1 -0
  246. package/scss/mng-overrides/_theme_tableview.scss +6 -6
  247. package/scss/theme/default/_mng-variables-theme-dark.scss +2 -1
  248. package/scss/theme/default/_mng-variables-theme-light.scss +2 -1
  249. package/esm2020/lib/models/router.model.mjs +0 -2
  250. package/lib/models/router.model.d.ts +0 -14
@@ -2,10 +2,10 @@ import { Type } from '@angular/core';
2
2
  import { AbstractControl } from '@angular/forms';
3
3
  import { FormlyFieldConfig } from '@ngx-formly/core';
4
4
  import { Observable } from 'rxjs';
5
- import { ClassType, EnumMemberType } from '../types';
6
- import { ILookupDataProvider, ITableDataProvider } from '../data-providers';
7
- import { ModelDescriptor, TableDescriptor, TableviewDescriptor, FieldValidator, ILookupDescriptor } from './';
8
5
  import { MediusQueryParam, MediusQueryResult } from '../api/models';
6
+ import { ILookupDataProvider, ITableDataProvider } from '../data-providers';
7
+ import { ClassType, EnumMemberType } from '../types';
8
+ import { FieldValidator, ILookupDescriptor, ModelDescriptor, TableDescriptor, TableviewDescriptor } from './';
9
9
  export declare class EditorDescriptor<T> {
10
10
  static readonly defaultGroupName = "_default";
11
11
  private readonly _model;
@@ -54,6 +54,7 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
54
54
  protected _getter?: (item: ET) => T;
55
55
  protected _setter?: (item: ET, value: T) => void;
56
56
  protected _validators: Array<FieldValidator>;
57
+ protected _disabledFunction?: (model: any) => boolean;
57
58
  protected constructor(editor: EditorDescriptor<ET>, property: string);
58
59
  abstract copy(): AFieldDescriptor<T, ET>;
59
60
  get property(): string;
@@ -66,14 +67,15 @@ export declare abstract class AFieldDescriptor<T, ET> extends AGenericFieldDescr
66
67
  get getter(): ((item: ET) => T) | undefined;
67
68
  get setter(): ((item: ET, value: T) => void) | undefined;
68
69
  get validators(): FieldValidator[];
70
+ get disabledFunction(): ((model: any) => boolean) | undefined;
69
71
  withLabel(label: string): this;
70
72
  withPlaceholder(placeholder: string): this;
71
73
  withRequired(required?: boolean): this;
72
- withDisabled(disabled?: boolean): this;
74
+ withDisabled(disabled?: boolean, disabledFunction?: (model: any) => boolean): this;
73
75
  withClassName(className: string): this;
74
76
  withGetter(getter: (item: ET) => T): this;
75
77
  withSetter(setter: (item: ET, value: T) => void): this;
76
- withValidator(name: string, expression: (control: AbstractControl) => boolean, message: (err: any, field: FormlyFieldConfig) => string): this;
78
+ withValidator(name: string, expression: (control: AbstractControl) => boolean, message?: (err: any, field: FormlyFieldConfig) => string): this;
77
79
  protected copyFieldsTo(obj: AFieldDescriptor<T, ET>): void;
78
80
  }
79
81
  export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string | number | boolean | Date, ET> {
@@ -108,8 +110,8 @@ export declare class FieldInputDescriptor<ET> extends AFieldDescriptor<string |
108
110
  get maxLength(): number | undefined;
109
111
  get minLength(): number | undefined;
110
112
  get pattern(): string | RegExp | undefined;
111
- asText(minLength?: number, maxLength?: number, pattern?: string | RegExp): this;
112
- asTextarea(rows?: number): this;
113
+ asText(minLength?: number, maxLength?: number, pattern?: string | RegExp, isEmail?: boolean): this;
114
+ asTextarea(rows?: number, minLength?: number, maxLength?: number, pattern?: string | RegExp): this;
113
115
  asNumber(step?: number, min?: number, max?: number, minFractionDigits?: number, maxFractionDigits?: number): this;
114
116
  asSwitch(): this;
115
117
  asRadio(options: Array<string>): this;
@@ -1,8 +1,8 @@
1
1
  import { Type } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
+ import { MediusQueryParam } from '../api/models';
3
4
  import { ILookupDataProvider } from '../data-providers';
4
5
  import { ClassType } from '../types';
5
- import { MediusQueryParam } from '../api/models';
6
6
  export interface ILookupDescriptor<T> {
7
7
  modelType: ClassType<T> | null;
8
8
  itemsLabelProperty?: string;
@@ -1,10 +1,10 @@
1
1
  import { Type } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { ModelDescriptor } from './model.descriptor';
4
- import { ILookupDescriptor } from './lookup.descriptor';
5
- import { ClassType } from '../types';
6
- import { ILookupDataProvider } from '../data-providers';
7
3
  import { MediusQueryParam } from '../api/models';
4
+ import { ILookupDataProvider } from '../data-providers';
5
+ import { ClassType } from '../types';
6
+ import { ILookupDescriptor } from './lookup.descriptor';
7
+ import { ModelDescriptor } from './model.descriptor';
8
8
  export declare class TableDescriptor<T> {
9
9
  private readonly _model;
10
10
  private _filterDisplay;
@@ -99,12 +99,14 @@ export declare class FilterDescriptor<T> {
99
99
  protected readonly _property: string;
100
100
  protected _filterType: FilterDescriptor.TypeEnum;
101
101
  protected _filterProperty?: string;
102
+ protected _matchModes: string[] | null;
102
103
  protected _placeholder?: string;
103
104
  protected _className: string;
104
105
  constructor(property: string);
105
106
  get property(): string;
106
107
  get filterType(): FilterDescriptor.TypeEnum;
107
108
  get filterProperty(): string | undefined;
109
+ get matchModes(): string[] | null;
108
110
  get placeholder(): string | undefined;
109
111
  get className(): string;
110
112
  asFilterType(filterType: ColumnDescriptor.TypeEnum): this;
@@ -115,6 +117,7 @@ export declare class FilterDescriptor<T> {
115
117
  withFilterProperty(filterProperty: string): this;
116
118
  withPlaceholder(placeholder: string): this;
117
119
  withClassName(className: string): this;
120
+ withMatchModes(matchModes: Array<FilterDescriptor.MatchModeEnum>): this;
118
121
  protected copyFieldsTo(descriptor: FilterDescriptor<T>): void;
119
122
  copy(): FilterDescriptor<T>;
120
123
  }
@@ -126,6 +129,23 @@ export declare namespace FilterDescriptor {
126
129
  Date = 3,
127
130
  Lookup = 4
128
131
  }
132
+ enum MatchModeEnum {
133
+ StartsWith = "startsWith",
134
+ Contains = "contains",
135
+ EndsWith = "endsWith",
136
+ Equals = "equals",
137
+ NotEquals = "notEquals",
138
+ In = "in",
139
+ LessThan = "lt",
140
+ LessThanOrEqualTo = "lte",
141
+ GreaterThan = "gt",
142
+ GreaterThanOrEqualTo = "gte",
143
+ Between = "between",
144
+ DateIs = "dateIs",
145
+ DateIsNot = "dateIsNot",
146
+ DateBefore = "dateBefore",
147
+ DateAfter = "dateAfter"
148
+ }
129
149
  }
130
150
  export declare class FilterLookupDescriptor<T> extends FilterDescriptor<T> implements ILookupDescriptor<T> {
131
151
  private readonly _modelType;
@@ -1,6 +1,6 @@
1
1
  import { AbstractControl } from '@angular/forms';
2
- import { ModelDescriptor, AFieldDescriptor, EditorDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, ColumnDescriptor, TableDescriptor } from './';
3
2
  import { ClassType, EnumMemberType } from '../types';
3
+ import { AFieldDescriptor, ColumnDescriptor, EditorDescriptor, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, ModelDescriptor, TableDescriptor } from './';
4
4
  export declare class TableviewDescriptor<T> {
5
5
  private readonly _model;
6
6
  private _table;
@@ -27,53 +27,55 @@ import * as i22 from "./components/tableview/table/table.component";
27
27
  import * as i23 from "./components/tableview/tableview.component";
28
28
  import * as i24 from "./components/tableview/table/column-value/column-value.component";
29
29
  import * as i25 from "./components/tableview/table/column-filter/column-filter.component";
30
- import * as i26 from "./components/form/editor/form-editor.component";
31
- import * as i27 from "./components/action/action.component";
32
- import * as i28 from "./components/action/dialog/action-dialog.component";
33
- import * as i29 from "./components/action/route/action-route.component";
34
- import * as i30 from "@angular/common";
35
- import * as i31 from "@angular/router";
36
- import * as i32 from "@angular/common/http";
37
- import * as i33 from "@angular/forms";
38
- import * as i34 from "@ngx-translate/core";
39
- import * as i35 from "@ngx-formly/core";
40
- import * as i36 from "primeng/autocomplete";
41
- import * as i37 from "primeng/breadcrumb";
42
- import * as i38 from "primeng/button";
43
- import * as i39 from "primeng/calendar";
44
- import * as i40 from "primeng/card";
45
- import * as i41 from "primeng/checkbox";
46
- import * as i42 from "primeng/chip";
47
- import * as i43 from "primeng/confirmdialog";
48
- import * as i44 from "primeng/confirmpopup";
49
- import * as i45 from "primeng/dialog";
50
- import * as i46 from "primeng/dynamicdialog";
51
- import * as i47 from "primeng/dropdown";
52
- import * as i48 from "primeng/inputnumber";
53
- import * as i49 from "primeng/inputmask";
54
- import * as i50 from "primeng/inputswitch";
55
- import * as i51 from "primeng/inputtext";
56
- import * as i52 from "primeng/inputtextarea";
57
- import * as i53 from "primeng/paginator";
58
- import * as i54 from "primeng/radiobutton";
59
- import * as i55 from "primeng/ripple";
60
- import * as i56 from "primeng/selectbutton";
61
- import * as i57 from "primeng/table";
62
- import * as i58 from "primeng/tag";
63
- import * as i59 from "primeng/toast";
64
- import * as i60 from "primeng/togglebutton";
65
- import * as i61 from "primeng/toolbar";
66
- import * as i62 from "primeng/tooltip";
67
- import * as i63 from "primeng/messages";
68
- import * as i64 from "primeng/progressspinner";
69
- import * as i65 from "primeng/tabview";
70
- import * as i66 from "primeng/fieldset";
71
- import * as i67 from "primeng/multiselect";
72
- import * as i68 from "primeng/skeleton";
30
+ import * as i26 from "./components/tableview/route/tableview-route.component";
31
+ import * as i27 from "./components/form/editor/form-editor.component";
32
+ import * as i28 from "./components/action/action.component";
33
+ import * as i29 from "./components/action/dialog/action-dialog.component";
34
+ import * as i30 from "./components/action/route/action-route.component";
35
+ import * as i31 from "@angular/common";
36
+ import * as i32 from "@angular/router";
37
+ import * as i33 from "@angular/common/http";
38
+ import * as i34 from "@angular/forms";
39
+ import * as i35 from "@ngx-translate/core";
40
+ import * as i36 from "@ngx-formly/core";
41
+ import * as i37 from "primeng/autocomplete";
42
+ import * as i38 from "primeng/breadcrumb";
43
+ import * as i39 from "primeng/button";
44
+ import * as i40 from "primeng/calendar";
45
+ import * as i41 from "primeng/card";
46
+ import * as i42 from "primeng/checkbox";
47
+ import * as i43 from "primeng/chip";
48
+ import * as i44 from "primeng/confirmdialog";
49
+ import * as i45 from "primeng/confirmpopup";
50
+ import * as i46 from "primeng/dialog";
51
+ import * as i47 from "primeng/dynamicdialog";
52
+ import * as i48 from "primeng/dropdown";
53
+ import * as i49 from "primeng/fileupload";
54
+ import * as i50 from "primeng/inputnumber";
55
+ import * as i51 from "primeng/inputmask";
56
+ import * as i52 from "primeng/inputswitch";
57
+ import * as i53 from "primeng/inputtext";
58
+ import * as i54 from "primeng/inputtextarea";
59
+ import * as i55 from "primeng/paginator";
60
+ import * as i56 from "primeng/radiobutton";
61
+ import * as i57 from "primeng/ripple";
62
+ import * as i58 from "primeng/selectbutton";
63
+ import * as i59 from "primeng/table";
64
+ import * as i60 from "primeng/tag";
65
+ import * as i61 from "primeng/toast";
66
+ import * as i62 from "primeng/togglebutton";
67
+ import * as i63 from "primeng/toolbar";
68
+ import * as i64 from "primeng/tooltip";
69
+ import * as i65 from "primeng/messages";
70
+ import * as i66 from "primeng/progressspinner";
71
+ import * as i67 from "primeng/tabview";
72
+ import * as i68 from "primeng/fieldset";
73
+ import * as i69 from "primeng/multiselect";
74
+ import * as i70 from "primeng/skeleton";
73
75
  export declare const primeNgModules: (typeof InputTextModule)[];
74
76
  export declare class MngCommonsModule {
75
77
  static forRoot(config: MngModuleConfig): ModuleWithProviders<MngCommonsModule>;
76
78
  static ɵfac: i0.ɵɵFactoryDeclaration<MngCommonsModule, never>;
77
- static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngBreadcrumbComponent, typeof i6.MngFooterComponent, typeof i7.MngMainLayoutComponent, typeof i8.MngMenuComponent, typeof i9.MngMenuItemComponent, typeof i10.MngTopbarComponent, typeof i11.MngAutocompleteComponent, typeof i12.MngDropdownComponent, typeof i13.MngFormlyFieldWrapperComponent, typeof i14.MngFormlyTableWrapperComponent, typeof i15.MngFormlyFieldInputComponent, typeof i16.MngFormlyFieldDropdownComponent, typeof i17.MngFormlyFieldAutocompleteComponent, typeof i18.MngFormlyFieldTableDialogMultiselectComponent, typeof i19.MngFormlyFieldTableDialogFormComponent, typeof i20.MngFormlyFieldTabsComponent, typeof i21.MngFormlyFieldFieldsetComponent, typeof i22.MngTableComponent, typeof i23.MngTableviewComponent, typeof i24.MngTableColumnValueComponent, typeof i25.MngTableColumnFilterComponent, typeof i26.MngFormEditorComponent, typeof i27.MngActionComponent, typeof i28.MngActionDialogComponent, typeof i29.MngActionRouteComponent], [typeof i30.CommonModule, typeof i31.RouterModule, typeof i32.HttpClientModule, typeof i33.ReactiveFormsModule, typeof i34.TranslateModule, typeof i35.FormlyModule, typeof i36.AutoCompleteModule, typeof i37.BreadcrumbModule, typeof i38.ButtonModule, typeof i39.CalendarModule, typeof i40.CardModule, typeof i41.CheckboxModule, typeof i42.ChipModule, typeof i43.ConfirmDialogModule, typeof i44.ConfirmPopupModule, typeof i45.DialogModule, typeof i46.DynamicDialogModule, typeof i47.DropdownModule, typeof i48.InputNumberModule, typeof i49.InputMaskModule, typeof i50.InputSwitchModule, typeof i51.InputTextModule, typeof i52.InputTextareaModule, typeof i53.PaginatorModule, typeof i54.RadioButtonModule, typeof i55.RippleModule, typeof i56.SelectButtonModule, typeof i57.TableModule, typeof i58.TagModule, typeof i59.ToastModule, typeof i60.ToggleButtonModule, typeof i61.ToolbarModule, typeof i62.TooltipModule, typeof i63.MessagesModule, typeof i64.ProgressSpinnerModule, typeof i65.TabViewModule, typeof i66.FieldsetModule, typeof i67.MultiSelectModule, typeof i68.SkeletonModule], [typeof i36.AutoCompleteModule, typeof i37.BreadcrumbModule, typeof i38.ButtonModule, typeof i39.CalendarModule, typeof i40.CardModule, typeof i41.CheckboxModule, typeof i42.ChipModule, typeof i43.ConfirmDialogModule, typeof i44.ConfirmPopupModule, typeof i45.DialogModule, typeof i46.DynamicDialogModule, typeof i47.DropdownModule, typeof i48.InputNumberModule, typeof i49.InputMaskModule, typeof i50.InputSwitchModule, typeof i51.InputTextModule, typeof i52.InputTextareaModule, typeof i53.PaginatorModule, typeof i54.RadioButtonModule, typeof i55.RippleModule, typeof i56.SelectButtonModule, typeof i57.TableModule, typeof i58.TagModule, typeof i59.ToastModule, typeof i60.ToggleButtonModule, typeof i61.ToolbarModule, typeof i62.TooltipModule, typeof i63.MessagesModule, typeof i64.ProgressSpinnerModule, typeof i65.TabViewModule, typeof i66.FieldsetModule, typeof i67.MultiSelectModule, typeof i68.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngBreadcrumbComponent, typeof i6.MngFooterComponent, typeof i7.MngMainLayoutComponent, typeof i8.MngMenuComponent, typeof i9.MngMenuItemComponent, typeof i10.MngTopbarComponent, typeof i11.MngAutocompleteComponent, typeof i12.MngDropdownComponent, typeof i13.MngFormlyFieldWrapperComponent, typeof i14.MngFormlyTableWrapperComponent, typeof i15.MngFormlyFieldInputComponent, typeof i16.MngFormlyFieldDropdownComponent, typeof i17.MngFormlyFieldAutocompleteComponent, typeof i18.MngFormlyFieldTableDialogMultiselectComponent, typeof i19.MngFormlyFieldTableDialogFormComponent, typeof i20.MngFormlyFieldTabsComponent, typeof i21.MngFormlyFieldFieldsetComponent, typeof i22.MngTableComponent, typeof i23.MngTableviewComponent, typeof i24.MngTableColumnValueComponent, typeof i25.MngTableColumnFilterComponent, typeof i26.MngFormEditorComponent, typeof i27.MngActionComponent, typeof i28.MngActionDialogComponent, typeof i29.MngActionRouteComponent]>;
79
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MngCommonsModule, [typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngBreadcrumbComponent, typeof i6.MngFooterComponent, typeof i7.MngMainLayoutComponent, typeof i8.MngMenuComponent, typeof i9.MngMenuItemComponent, typeof i10.MngTopbarComponent, typeof i11.MngAutocompleteComponent, typeof i12.MngDropdownComponent, typeof i13.MngFormlyFieldWrapperComponent, typeof i14.MngFormlyTableWrapperComponent, typeof i15.MngFormlyFieldInputComponent, typeof i16.MngFormlyFieldDropdownComponent, typeof i17.MngFormlyFieldAutocompleteComponent, typeof i18.MngFormlyFieldTableDialogMultiselectComponent, typeof i19.MngFormlyFieldTableDialogFormComponent, typeof i20.MngFormlyFieldTabsComponent, typeof i21.MngFormlyFieldFieldsetComponent, typeof i22.MngTableComponent, typeof i23.MngTableviewComponent, typeof i24.MngTableColumnValueComponent, typeof i25.MngTableColumnFilterComponent, typeof i26.MngTableviewRouteComponent, typeof i27.MngFormEditorComponent, typeof i28.MngActionComponent, typeof i29.MngActionDialogComponent, typeof i30.MngActionRouteComponent], [typeof i31.CommonModule, typeof i32.RouterModule, typeof i33.HttpClientModule, typeof i34.ReactiveFormsModule, typeof i35.TranslateModule, typeof i36.FormlyModule, typeof i37.AutoCompleteModule, typeof i38.BreadcrumbModule, typeof i39.ButtonModule, typeof i40.CalendarModule, typeof i41.CardModule, typeof i42.CheckboxModule, typeof i43.ChipModule, typeof i44.ConfirmDialogModule, typeof i45.ConfirmPopupModule, typeof i46.DialogModule, typeof i47.DynamicDialogModule, typeof i48.DropdownModule, typeof i49.FileUploadModule, typeof i50.InputNumberModule, typeof i51.InputMaskModule, typeof i52.InputSwitchModule, typeof i53.InputTextModule, typeof i54.InputTextareaModule, typeof i55.PaginatorModule, typeof i56.RadioButtonModule, typeof i57.RippleModule, typeof i58.SelectButtonModule, typeof i59.TableModule, typeof i60.TagModule, typeof i61.ToastModule, typeof i62.ToggleButtonModule, typeof i63.ToolbarModule, typeof i64.TooltipModule, typeof i65.MessagesModule, typeof i66.ProgressSpinnerModule, typeof i67.TabViewModule, typeof i68.FieldsetModule, typeof i69.MultiSelectModule, typeof i70.SkeletonModule], [typeof i37.AutoCompleteModule, typeof i38.BreadcrumbModule, typeof i39.ButtonModule, typeof i40.CalendarModule, typeof i41.CardModule, typeof i42.CheckboxModule, typeof i43.ChipModule, typeof i44.ConfirmDialogModule, typeof i45.ConfirmPopupModule, typeof i46.DialogModule, typeof i47.DynamicDialogModule, typeof i48.DropdownModule, typeof i49.FileUploadModule, typeof i50.InputNumberModule, typeof i51.InputMaskModule, typeof i52.InputSwitchModule, typeof i53.InputTextModule, typeof i54.InputTextareaModule, typeof i55.PaginatorModule, typeof i56.RadioButtonModule, typeof i57.RippleModule, typeof i58.SelectButtonModule, typeof i59.TableModule, typeof i60.TagModule, typeof i61.ToastModule, typeof i62.ToggleButtonModule, typeof i63.ToolbarModule, typeof i64.TooltipModule, typeof i65.MessagesModule, typeof i66.ProgressSpinnerModule, typeof i67.TabViewModule, typeof i68.FieldsetModule, typeof i69.MultiSelectModule, typeof i70.SkeletonModule, typeof i1.MngComponentDirective, typeof i2.MngTemplateDirective, typeof i3.MngPropertyPathPipe, typeof i4.MngBooleanPipe, typeof i5.MngBreadcrumbComponent, typeof i6.MngFooterComponent, typeof i7.MngMainLayoutComponent, typeof i8.MngMenuComponent, typeof i9.MngMenuItemComponent, typeof i10.MngTopbarComponent, typeof i11.MngAutocompleteComponent, typeof i12.MngDropdownComponent, typeof i13.MngFormlyFieldWrapperComponent, typeof i14.MngFormlyTableWrapperComponent, typeof i15.MngFormlyFieldInputComponent, typeof i16.MngFormlyFieldDropdownComponent, typeof i17.MngFormlyFieldAutocompleteComponent, typeof i18.MngFormlyFieldTableDialogMultiselectComponent, typeof i19.MngFormlyFieldTableDialogFormComponent, typeof i20.MngFormlyFieldTabsComponent, typeof i21.MngFormlyFieldFieldsetComponent, typeof i22.MngTableComponent, typeof i23.MngTableviewComponent, typeof i24.MngTableColumnValueComponent, typeof i25.MngTableColumnFilterComponent, typeof i26.MngTableviewRouteComponent, typeof i27.MngFormEditorComponent, typeof i28.MngActionComponent, typeof i29.MngActionDialogComponent, typeof i30.MngActionRouteComponent]>;
78
80
  static ɵinj: i0.ɵɵInjectorDeclaration<MngCommonsModule>;
79
81
  }
@@ -1,2 +1 @@
1
- export * from './router.model';
2
1
  export * from './user.model';
@@ -0,0 +1 @@
1
+ export * from './route-builder';
@@ -0,0 +1 @@
1
+ export * from './router.model';
@@ -0,0 +1,22 @@
1
+ import { Type } from '@angular/core';
2
+ import { ActivatedRouteSnapshot, Data } from '@angular/router';
3
+ import { MenuItem } from 'primeng/api';
4
+ import { TableviewDataProvider } from '../../data-providers';
5
+ import { ActionDescriptor, TableviewDescriptor } from '../../descriptors';
6
+ export declare type BreadcrumbType = string | string[] | MngBreadcrumbMenuItem | MngBreadcrumbMenuItem[] | ((routeUrl: string, route: ActivatedRouteSnapshot) => MngBreadcrumbMenuItem[]);
7
+ export interface MngBreadcrumbMenuItem extends MenuItem {
8
+ isHome?: boolean;
9
+ }
10
+ export interface MngRouterData extends Data {
11
+ breadcrumb?: BreadcrumbType | null;
12
+ pageTitle?: string;
13
+ tableview?: {
14
+ descriptor: TableviewDescriptor<any>;
15
+ dataProvider: TableviewDataProvider<any, any>;
16
+ actions?: Array<ActionDescriptor<any>>;
17
+ };
18
+ topbarComponent?: Type<any>;
19
+ breadcrumbComponent?: Type<any>;
20
+ menuComponent?: Type<any>;
21
+ footerComponent?: Type<any>;
22
+ }
@@ -0,0 +1,66 @@
1
+ import { Type } from '@angular/core';
2
+ import { LoadChildren, Route, Routes } from '@angular/router';
3
+ import { MenuItem } from 'primeng/api';
4
+ import { MngMainLayoutComponent } from '../components/layout';
5
+ import { ITableviewDataProvider } from '../data-providers';
6
+ import { ActionDescriptor, TableviewDescriptor } from '../descriptors';
7
+ import { BreadcrumbType } from './models';
8
+ export declare class RoutesBuilder {
9
+ private readonly layoutRoute?;
10
+ private routes;
11
+ private currentRoute?;
12
+ private constructor();
13
+ static create(): RoutesBuilder;
14
+ static createWithLayout(layoutComponent?: typeof MngMainLayoutComponent): RoutesBuilder;
15
+ addAngularRoute(route: Route): this;
16
+ addRouteRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): this;
17
+ addLazyRoute(path: string, loadChildren: LoadChildren): this;
18
+ addRoute(path: string, component: Type<any>): this;
19
+ addTableviewRoutes<T, S>(path: string, descriptor: TableviewDescriptor<T>, tableviewDataProvider: ITableviewDataProvider<T, S>, actions?: Array<ActionDescriptor<T>>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): this;
20
+ addTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): this;
21
+ addRouteBuilder(routeBuilder: RouteBuilder): this;
22
+ toRoute(): RouteBuilder;
23
+ buildRoutes(): Routes;
24
+ buildMenu(): Array<MenuItem>;
25
+ }
26
+ export declare class RouteBuilder {
27
+ private readonly route;
28
+ private routePath;
29
+ private root?;
30
+ private parent?;
31
+ private children;
32
+ private menuItem?;
33
+ private menuItemChildren;
34
+ private breadcrumb?;
35
+ private pageTitle?;
36
+ private constructor();
37
+ static create(path: string, component: Type<any>): RouteBuilder;
38
+ static createRedirect(path: string, redirectTo: string, pathMatch?: 'full' | 'prefix'): RouteBuilder;
39
+ static createFromRoute(route: Route): RouteBuilder;
40
+ static createTableviewRoutes<T, S>(path: string, descriptor: TableviewDescriptor<T>, tableviewDataProvider: ITableviewDataProvider<T, S>, actions?: Array<ActionDescriptor<T>>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): RouteBuilder;
41
+ static createTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): RouteBuilder;
42
+ private static addActionsSubroutesToTableviewParent;
43
+ withRoot(routesBuilder: RoutesBuilder): this;
44
+ withParent(parent: RouteBuilder): this;
45
+ withBreadcrumb(breadcrumb: BreadcrumbType): this;
46
+ withPageTitle(pageTitle: string): this;
47
+ withRedirectTo(redirectTo: string): this;
48
+ withPathMatch(pathMatch: 'full' | 'prefix'): this;
49
+ withTitle(title: string): this;
50
+ withData(data: any): this;
51
+ withPrimeMenuItem(menuItem: MenuItem): this;
52
+ withMenuItem(icon?: string, label?: string, routerLink?: Array<string>): this;
53
+ withMenuItemChild(label: string, icon?: string, routerLink?: Array<string>): this;
54
+ withMenuItemChildren(routesBuilder: RoutesBuilder): this;
55
+ addChild(path: string, component: Type<any>): RouteBuilder;
56
+ addChildBuilder(routeBuilder: RouteBuilder): this;
57
+ addTableviewRoutes<T, S>(path: string, descriptor: TableviewDescriptor<T>, tableviewDataProvider: ITableviewDataProvider<T, S>, actions?: Array<ActionDescriptor<T>>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): RouteBuilder;
58
+ addTableviewRoutesFromComponent(path: string, component: Type<any>, hasDetails?: boolean, hasEdit?: boolean, hasAdd?: boolean): RouteBuilder;
59
+ toParent(): RouteBuilder;
60
+ toRoot(): RoutesBuilder;
61
+ finish(): RoutesBuilder;
62
+ buildRoute(): Route;
63
+ buildMenu(): Array<MenuItem>;
64
+ private createMenuItem;
65
+ private adjustMenuRouterLinksFromBuilder;
66
+ }
@@ -1,14 +1,14 @@
1
1
  import { Injector } from '@angular/core';
2
2
  import { ActivatedRoute, Router } from '@angular/router';
3
- import { DialogService } from 'primeng/dynamicdialog';
4
- import { ConfirmationService } from 'primeng/api';
5
3
  import { TranslateService } from '@ngx-translate/core';
4
+ import { ConfirmationService } from 'primeng/api';
5
+ import { DialogService } from 'primeng/dynamicdialog';
6
6
  import { Observable } from 'rxjs';
7
7
  import { ActionActivationResult, ActionData, ActionExecContext, ActionRunResult, ActionTriggerResult } from '../components/action/models';
8
- import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors';
9
8
  import { MngTableCellClickEvent } from '../components/tableview/models';
10
9
  import { TableviewComponentService } from '../components/tableview/services';
11
10
  import { IDataProvider, IEditorDataProvider } from '../data-providers';
11
+ import { ActionDescriptor, ActionEditorDescriptor } from '../descriptors';
12
12
  import { IdType } from '../types';
13
13
  import * as i0 from "@angular/core";
14
14
  export declare class MngActionService {
@@ -1,11 +1,11 @@
1
- import { Router } from '@angular/router';
2
1
  import { Title } from '@angular/platform-browser';
3
- import { MenuItem, PrimeNGConfig } from 'primeng/api';
2
+ import { Router } from '@angular/router';
4
3
  import { TranslateService } from '@ngx-translate/core';
4
+ import { MenuItem, PrimeNGConfig } from 'primeng/api';
5
5
  import { Observable } from 'rxjs';
6
- import { MngConfigurationService } from './configuration.service';
7
6
  import { MngModuleConfig } from '../config/models';
8
7
  import { IUser } from '../models';
8
+ import { MngConfigurationService } from './configuration.service';
9
9
  import * as i0 from "@angular/core";
10
10
  export declare class MngCommonsService {
11
11
  private router;
@@ -55,9 +55,9 @@ export declare class MngCommonsService {
55
55
  get breadcrumbs$(): Observable<MenuItem[]>;
56
56
  get colorSchemeIsLight(): boolean;
57
57
  get colorSchemeIsDark(): boolean;
58
- get user(): IUser;
59
- get user$(): Observable<IUser>;
60
- set user(user: IUser);
58
+ get user(): IUser | undefined;
59
+ set user(user: IUser | undefined);
60
+ get user$(): Observable<IUser | undefined>;
61
61
  initialize(): void;
62
62
  menuChangeActiveKey(key: string): void;
63
63
  menuReset(): void;
@@ -1,5 +1,5 @@
1
- import { Router } from '@angular/router';
2
1
  import { Location } from '@angular/common';
2
+ import { Router } from '@angular/router';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class MngNavigationService {
5
5
  private router;
@@ -1,4 +1,4 @@
1
- import { TranslateService } from '@ngx-translate/core';
2
1
  import { ConfigOption } from '@ngx-formly/core';
2
+ import { TranslateService } from '@ngx-translate/core';
3
3
  import { MngModuleConfig } from '../../config/models';
4
4
  export declare function mngFormlyConfigProvider(translate: TranslateService, moduleConfig?: MngModuleConfig): ConfigOption;
@@ -1,5 +1,5 @@
1
1
  import { FormlyFieldConfig } from '@ngx-formly/core';
2
- import { EditorDescriptor, AFieldDescriptor, FieldTabGroupDescriptor, FieldGroupDescriptor } from '../descriptors';
2
+ import { AFieldDescriptor, EditorDescriptor, FieldGroupDescriptor, FieldTabGroupDescriptor } from '../descriptors';
3
3
  export declare class EditorFormlyUtil {
4
4
  static createFormlyConfigFromDescriptor(descriptor: EditorDescriptor<any>): FormlyFieldConfig[];
5
5
  static createFormlyTabType(tabGroups: FieldTabGroupDescriptor<any>[]): FormlyFieldConfig[];
@@ -1,5 +1,5 @@
1
- import { ClassType } from '../types';
2
1
  import { ILookupDescriptor } from '../descriptors';
2
+ import { ClassType } from '../types';
3
3
  export declare class ModelUtil {
4
4
  static findIdAttribute<T>(classType: ClassType<T>): string | null;
5
5
  static findTitleAttribute<T>(classType: ClassType<T>): string | null;
@@ -0,0 +1,4 @@
1
+ export declare class RouteUtil {
2
+ static removeEmptyPathSegments(path: Array<string>): string[];
3
+ static appendPathToBasePath(basePath: Array<string>, path: Array<string>): string[];
4
+ }
@@ -1,6 +1,6 @@
1
1
  import { TranslateService } from '@ngx-translate/core';
2
- import { ActionDescriptor, TableDescriptor } from '../descriptors';
3
2
  import { TableviewComponentService } from '../components/tableview/services';
3
+ import { ActionDescriptor, TableDescriptor } from '../descriptors';
4
4
  export declare class ToastUtil {
5
5
  static tableNotificationError(translationService: TranslateService, table: TableDescriptor<any>, error: any, tableview?: TableviewComponentService<any, any>): void;
6
6
  static actionNotificationSuccess(translationService: TranslateService, action: ActionDescriptor<any>, functionName: string, customTitleKey?: string, customMessageKey?: string, tableview?: TableviewComponentService<any, any>, item?: any): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons",
3
- "version": "0.2.4",
3
+ "version": "0.2.8",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.1.0",
6
6
  "@angular/core": "^13.1.0",
package/public-api.d.ts CHANGED
@@ -22,4 +22,5 @@ export * from './lib/config';
22
22
  export * from './lib/data-providers';
23
23
  export * from './lib/descriptors';
24
24
  export * from './lib/models';
25
+ export * from './lib/router';
25
26
  export * from './lib/types';
@@ -10,10 +10,10 @@
10
10
  ul {
11
11
  li {
12
12
  &.p-breadcrumb-chevron {
13
- margin: 0 .75rem;
13
+ margin: 0 0.75rem;
14
14
 
15
15
  &::before {
16
- content: "\2044";
16
+ content: '\2044';
17
17
  font-weight: bold;
18
18
  font-size: 1.25rem;
19
19
  }
@@ -39,20 +39,20 @@
39
39
 
40
40
  .layout-breadcrumb-right-items {
41
41
  .search-icon {
42
- display:none;
42
+ display: none;
43
43
  align-items: center;
44
44
  justify-content: center;
45
45
  color: $textColor;
46
46
  width: 32px;
47
47
  height: 32px;
48
- margin-right: .5rem;
48
+ margin-right: 0.5rem;
49
49
  }
50
50
 
51
51
  .search-wrapper {
52
52
  transition: transform $animationDuration $animationTimingFunction;
53
53
 
54
54
  .p-input-icon-left {
55
- margin-right: .5rem;
55
+ margin-right: 0.5rem;
56
56
  width: 100%;
57
57
 
58
58
  input {
@@ -68,7 +68,7 @@
68
68
  .layout-breadcrumb-container {
69
69
  .layout-breadcrumb-right-items {
70
70
  .search-icon {
71
- display:flex;
71
+ display: flex;
72
72
  }
73
73
  .search-wrapper {
74
74
  width: 0;
@@ -11,11 +11,11 @@
11
11
  z-index: 999;
12
12
  border-left: 0 none;
13
13
  transform: translateX(100%);
14
- transition: transform .4s cubic-bezier(.05,.74,.2,.99);
14
+ transition: transform 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);
15
15
 
16
16
  &.layout-config-active {
17
17
  transform: translateX(0);
18
- box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12);
18
+ box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12);
19
19
 
20
20
  .layout-config-content {
21
21
  .layout-config-button {
@@ -36,10 +36,9 @@
36
36
  @include flex-wrap(wrap);
37
37
 
38
38
  > div {
39
- padding: .25rem;
39
+ padding: 0.25rem;
40
40
  }
41
41
 
42
-
43
42
  a {
44
43
  width: 2rem;
45
44
  height: 2rem;
@@ -49,15 +48,15 @@
49
48
  @include flex-align-center();
50
49
  @include flex-justify-center();
51
50
  transition: transform $transitionDuration;
52
- box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
51
+ box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
53
52
 
54
53
  i {
55
54
  font-size: 1rem;
56
55
  position: absolute;
57
56
  top: 50%;
58
57
  left: 50%;
59
- margin-left: -.5rem;
60
- margin-top: -.5rem;
58
+ margin-left: -0.5rem;
59
+ margin-top: -0.5rem;
61
60
  color: #ffffff;
62
61
  }
63
62
 
@@ -86,7 +85,7 @@
86
85
  overflow: hidden;
87
86
  cursor: pointer;
88
87
  z-index: 999;
89
- box-shadow: -.25rem 0 1rem rgba(0,0,0,.15);
88
+ box-shadow: -0.25rem 0 1rem rgba(0, 0, 0, 0.15);
90
89
 
91
90
  i {
92
91
  font-size: 2rem;
@@ -12,12 +12,12 @@
12
12
  &.notfound {
13
13
  .exception-panel {
14
14
  h1 {
15
- color: #0F8BFD;
16
- text-shadow: 0px 0px 50px rgba(#0F8BFD, 0.2);
15
+ color: #0f8bfd;
16
+ text-shadow: 0px 0px 50px rgba(#0f8bfd, 0.2);
17
17
  }
18
18
 
19
19
  h3 {
20
- color: darken(#0F8BFD, 30%);
20
+ color: darken(#0f8bfd, 30%);
21
21
  }
22
22
  }
23
23
  }
@@ -25,12 +25,12 @@
25
25
  &.accessdenied {
26
26
  .exception-panel {
27
27
  h1 {
28
- color: #0F8BFD;
29
- text-shadow: 0px 0px 50px rgba(#0F8BFD, 0.2);
28
+ color: #0f8bfd;
29
+ text-shadow: 0px 0px 50px rgba(#0f8bfd, 0.2);
30
30
  }
31
31
 
32
32
  h3 {
33
- color: darken(#0F8BFD, 30%);
33
+ color: darken(#0f8bfd, 30%);
34
34
  }
35
35
  }
36
36
  }
@@ -38,12 +38,12 @@
38
38
  &.error {
39
39
  .exception-panel {
40
40
  h1 {
41
- color: #FC6161;
42
- text-shadow: 0px 0px 50px rgba(#FC6161, 0.2);
41
+ color: #fc6161;
42
+ text-shadow: 0px 0px 50px rgba(#fc6161, 0.2);
43
43
  }
44
44
 
45
45
  h3 {
46
- color: lighten(#FC6161, 10%);
46
+ color: lighten(#fc6161, 10%);
47
47
  max-width: 720px;
48
48
  }
49
49
  }
@@ -77,7 +77,7 @@
77
77
  max-width: 320px;
78
78
  }
79
79
 
80
- button {
80
+ p-button {
81
81
  margin-top: 50px;
82
82
  }
83
83
  }
@@ -103,7 +103,8 @@
103
103
  .exception-body {
104
104
  background-size: auto;
105
105
 
106
- &.accessdenied, &.error {
106
+ &.accessdenied,
107
+ &.error {
107
108
  .exception-panel {
108
109
  h1 {
109
110
  font-size: 70px;
@@ -120,7 +121,7 @@
120
121
  margin-top: 0;
121
122
 
122
123
  h3 {
123
- line-height: .75;
124
+ line-height: 0.75;
124
125
  }
125
126
 
126
127
  button {