@smartsoft001/crud-shell-angular 1.1.595 → 1.1.602

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 (199) hide show
  1. package/bundles/smartsoft001-crud-shell-angular.umd.js +377 -245
  2. package/bundles/smartsoft001-crud-shell-angular.umd.js.map +1 -1
  3. package/esm2015/index.js +3 -1
  4. package/esm2015/lib/+state/crud.actions.js +1 -1
  5. package/esm2015/lib/+state/crud.effects.js +1 -1
  6. package/esm2015/lib/+state/crud.facade.js +1 -1
  7. package/esm2015/lib/+state/crud.reducer.js +1 -1
  8. package/esm2015/lib/+state/crud.selectors.js +1 -1
  9. package/esm2015/lib/components/components.module.js +1 -1
  10. package/esm2015/lib/components/export/export.component.js +1 -1
  11. package/esm2015/lib/components/filter/base/base.component.js +1 -1
  12. package/esm2015/lib/components/filter/check/check.component.js +1 -1
  13. package/esm2015/lib/components/filter/date/date.component.js +1 -1
  14. package/esm2015/lib/components/filter/date-with-edit/date-with-edit.component.js +1 -1
  15. package/esm2015/lib/components/filter/filter.component.js +1 -1
  16. package/esm2015/lib/components/filter/flag/flag.component.js +1 -1
  17. package/esm2015/lib/components/filter/index.js +1 -1
  18. package/esm2015/lib/components/filter/radio/radio.component.js +1 -1
  19. package/esm2015/lib/components/filter/text/text.component.js +1 -1
  20. package/esm2015/lib/components/filters/filters.component.js +1 -1
  21. package/esm2015/lib/components/filters-config/filters-config.component.js +1 -1
  22. package/esm2015/lib/components/group/group.component.js +1 -1
  23. package/esm2015/lib/components/index.js +2 -1
  24. package/esm2015/lib/components/multiselect/multiselect.component.js +1 -1
  25. package/esm2015/lib/crud-full.module.js +10 -3
  26. package/esm2015/lib/crud.config.js +1 -1
  27. package/esm2015/lib/crud.module.js +3 -1
  28. package/esm2015/lib/factories/list-pagination/list-pagination.factory.js +1 -1
  29. package/esm2015/lib/models/index.js +1 -1
  30. package/esm2015/lib/models/interfaces.js +1 -1
  31. package/esm2015/lib/pages/index.js +3 -0
  32. package/esm2015/lib/pages/item/base/base.component.js +41 -0
  33. package/esm2015/lib/pages/item/item.component.js +56 -17
  34. package/esm2015/lib/pages/item/standard/standard.component.js +13 -0
  35. package/esm2015/lib/pages/list/base/base.component.js +30 -0
  36. package/esm2015/lib/pages/list/list.component.js +30 -14
  37. package/esm2015/lib/pages/list/standard/standard.component.js +13 -0
  38. package/esm2015/lib/pipes/form-options/form-options.pipe.js +1 -1
  39. package/esm2015/lib/pipes/index.js +1 -1
  40. package/esm2015/lib/pipes/pipes.module.js +1 -1
  41. package/esm2015/lib/providers/model-possibilities/model-possibilities.provider.js +1 -1
  42. package/esm2015/lib/services/crud/crud.service.js +1 -1
  43. package/esm2015/lib/services/page/page.service.js +48 -0
  44. package/esm2015/lib/services/socket/socket.service.js +1 -1
  45. package/esm2015/smartsoft001-crud-shell-angular.js +6 -3
  46. package/fesm2015/smartsoft001-crud-shell-angular.js +358 -218
  47. package/fesm2015/smartsoft001-crud-shell-angular.js.map +1 -1
  48. package/index.d.ts +2 -0
  49. package/index.d.ts.map +1 -1
  50. package/lib/components/index.d.ts +1 -0
  51. package/lib/components/index.d.ts.map +1 -1
  52. package/lib/crud-full.module.d.ts.map +1 -1
  53. package/lib/crud-full.module.ngfactory.d.ts.map +1 -1
  54. package/lib/crud.module.d.ts.map +1 -1
  55. package/lib/pages/index.d.ts +3 -0
  56. package/lib/pages/index.d.ts.map +1 -0
  57. package/lib/pages/item/base/base.component.d.ts +22 -0
  58. package/lib/pages/item/base/base.component.d.ts.map +1 -0
  59. package/lib/pages/item/item.component.d.ts +17 -7
  60. package/lib/pages/item/item.component.d.ts.map +1 -1
  61. package/lib/pages/item/standard/standard.component.d.ts +5 -0
  62. package/lib/pages/item/standard/standard.component.d.ts.map +1 -0
  63. package/lib/pages/item/standard/standard.component.ngfactory.d.ts.map +1 -0
  64. package/lib/pages/item/standard/standard.component.scss.shim.ngstyle.d.ts.map +1 -0
  65. package/lib/pages/list/base/base.component.d.ts +12 -0
  66. package/lib/pages/list/base/base.component.d.ts.map +1 -0
  67. package/lib/pages/list/list.component.d.ts +12 -5
  68. package/lib/pages/list/list.component.d.ts.map +1 -1
  69. package/lib/pages/list/standard/standard.component.d.ts +5 -0
  70. package/lib/pages/list/standard/standard.component.d.ts.map +1 -0
  71. package/lib/pages/list/standard/standard.component.ngfactory.d.ts.map +1 -0
  72. package/lib/pages/list/standard/standard.component.scss.shim.ngstyle.d.ts.map +1 -0
  73. package/lib/services/page/page.service.d.ts +9 -0
  74. package/lib/services/page/page.service.d.ts.map +1 -0
  75. package/lib/services/page/page.service.ngfactory.d.ts.map +1 -0
  76. package/package.json +10 -10
  77. package/smartsoft001-crud-shell-angular.d.ts +5 -2
  78. package/smartsoft001-crud-shell-angular.d.ts.map +1 -1
  79. package/smartsoft001-crud-shell-angular.metadata.json +1 -1
  80. package/esm2015/index.js.map +0 -1
  81. package/esm2015/index.metadata.json +0 -1
  82. package/esm2015/lib/+state/crud.actions.js.map +0 -1
  83. package/esm2015/lib/+state/crud.actions.metadata.json +0 -1
  84. package/esm2015/lib/+state/crud.effects.js.map +0 -1
  85. package/esm2015/lib/+state/crud.effects.metadata.json +0 -1
  86. package/esm2015/lib/+state/crud.effects.ngfactory.js.map +0 -1
  87. package/esm2015/lib/+state/crud.facade.js.map +0 -1
  88. package/esm2015/lib/+state/crud.facade.metadata.json +0 -1
  89. package/esm2015/lib/+state/crud.facade.ngfactory.js.map +0 -1
  90. package/esm2015/lib/+state/crud.reducer.js.map +0 -1
  91. package/esm2015/lib/+state/crud.reducer.metadata.json +0 -1
  92. package/esm2015/lib/+state/crud.selectors.js.map +0 -1
  93. package/esm2015/lib/+state/crud.selectors.metadata.json +0 -1
  94. package/esm2015/lib/components/components.module.js.map +0 -1
  95. package/esm2015/lib/components/components.module.metadata.json +0 -1
  96. package/esm2015/lib/components/components.module.ngfactory.js.map +0 -1
  97. package/esm2015/lib/components/export/export.component.js.map +0 -1
  98. package/esm2015/lib/components/export/export.component.metadata.json +0 -1
  99. package/esm2015/lib/components/export/export.component.ngfactory.js.map +0 -1
  100. package/esm2015/lib/components/export/export.component.scss.shim.ngstyle.js.map +0 -1
  101. package/esm2015/lib/components/filter/base/base.component.js.map +0 -1
  102. package/esm2015/lib/components/filter/base/base.component.metadata.json +0 -1
  103. package/esm2015/lib/components/filter/check/check.component.js.map +0 -1
  104. package/esm2015/lib/components/filter/check/check.component.metadata.json +0 -1
  105. package/esm2015/lib/components/filter/check/check.component.ngfactory.js.map +0 -1
  106. package/esm2015/lib/components/filter/check/check.component.scss.shim.ngstyle.js.map +0 -1
  107. package/esm2015/lib/components/filter/date/date.component.js.map +0 -1
  108. package/esm2015/lib/components/filter/date/date.component.metadata.json +0 -1
  109. package/esm2015/lib/components/filter/date/date.component.ngfactory.js.map +0 -1
  110. package/esm2015/lib/components/filter/date/date.component.scss.shim.ngstyle.js.map +0 -1
  111. package/esm2015/lib/components/filter/date-with-edit/date-with-edit.component.js.map +0 -1
  112. package/esm2015/lib/components/filter/date-with-edit/date-with-edit.component.metadata.json +0 -1
  113. package/esm2015/lib/components/filter/date-with-edit/date-with-edit.component.ngfactory.js.map +0 -1
  114. package/esm2015/lib/components/filter/date-with-edit/date-with-edit.component.scss.shim.ngstyle.js.map +0 -1
  115. package/esm2015/lib/components/filter/filter.component.js.map +0 -1
  116. package/esm2015/lib/components/filter/filter.component.metadata.json +0 -1
  117. package/esm2015/lib/components/filter/filter.component.ngfactory.js.map +0 -1
  118. package/esm2015/lib/components/filter/filter.component.scss.shim.ngstyle.js.map +0 -1
  119. package/esm2015/lib/components/filter/flag/flag.component.js.map +0 -1
  120. package/esm2015/lib/components/filter/flag/flag.component.metadata.json +0 -1
  121. package/esm2015/lib/components/filter/flag/flag.component.ngfactory.js.map +0 -1
  122. package/esm2015/lib/components/filter/flag/flag.component.scss.shim.ngstyle.js.map +0 -1
  123. package/esm2015/lib/components/filter/index.js.map +0 -1
  124. package/esm2015/lib/components/filter/index.metadata.json +0 -1
  125. package/esm2015/lib/components/filter/radio/radio.component.js.map +0 -1
  126. package/esm2015/lib/components/filter/radio/radio.component.metadata.json +0 -1
  127. package/esm2015/lib/components/filter/radio/radio.component.ngfactory.js.map +0 -1
  128. package/esm2015/lib/components/filter/radio/radio.component.scss.shim.ngstyle.js.map +0 -1
  129. package/esm2015/lib/components/filter/text/text.component.js.map +0 -1
  130. package/esm2015/lib/components/filter/text/text.component.metadata.json +0 -1
  131. package/esm2015/lib/components/filter/text/text.component.ngfactory.js.map +0 -1
  132. package/esm2015/lib/components/filter/text/text.component.scss.shim.ngstyle.js.map +0 -1
  133. package/esm2015/lib/components/filters/filters.component.js.map +0 -1
  134. package/esm2015/lib/components/filters/filters.component.metadata.json +0 -1
  135. package/esm2015/lib/components/filters/filters.component.ngfactory.js.map +0 -1
  136. package/esm2015/lib/components/filters/filters.component.scss.shim.ngstyle.js.map +0 -1
  137. package/esm2015/lib/components/filters-config/filters-config.component.js.map +0 -1
  138. package/esm2015/lib/components/filters-config/filters-config.component.metadata.json +0 -1
  139. package/esm2015/lib/components/filters-config/filters-config.component.ngfactory.js.map +0 -1
  140. package/esm2015/lib/components/filters-config/filters-config.component.scss.shim.ngstyle.js.map +0 -1
  141. package/esm2015/lib/components/group/group.component.js.map +0 -1
  142. package/esm2015/lib/components/group/group.component.metadata.json +0 -1
  143. package/esm2015/lib/components/group/group.component.ngfactory.js.map +0 -1
  144. package/esm2015/lib/components/group/group.component.scss.shim.ngstyle.js.map +0 -1
  145. package/esm2015/lib/components/index.js.map +0 -1
  146. package/esm2015/lib/components/index.metadata.json +0 -1
  147. package/esm2015/lib/components/multiselect/multiselect.component.js.map +0 -1
  148. package/esm2015/lib/components/multiselect/multiselect.component.metadata.json +0 -1
  149. package/esm2015/lib/components/multiselect/multiselect.component.ngfactory.js.map +0 -1
  150. package/esm2015/lib/components/multiselect/multiselect.component.scss.shim.ngstyle.js.map +0 -1
  151. package/esm2015/lib/crud-full.module.js.map +0 -1
  152. package/esm2015/lib/crud-full.module.metadata.json +0 -1
  153. package/esm2015/lib/crud-full.module.ngfactory.js.map +0 -1
  154. package/esm2015/lib/crud.config.js.map +0 -1
  155. package/esm2015/lib/crud.config.metadata.json +0 -1
  156. package/esm2015/lib/crud.config.ngfactory.js.map +0 -1
  157. package/esm2015/lib/crud.module.js.map +0 -1
  158. package/esm2015/lib/crud.module.metadata.json +0 -1
  159. package/esm2015/lib/crud.module.ngfactory.js.map +0 -1
  160. package/esm2015/lib/factories/list-pagination/list-pagination.factory.js.map +0 -1
  161. package/esm2015/lib/factories/list-pagination/list-pagination.factory.metadata.json +0 -1
  162. package/esm2015/lib/factories/list-pagination/list-pagination.factory.ngfactory.js.map +0 -1
  163. package/esm2015/lib/models/index.js.map +0 -1
  164. package/esm2015/lib/models/index.metadata.json +0 -1
  165. package/esm2015/lib/models/interfaces.js.map +0 -1
  166. package/esm2015/lib/models/interfaces.metadata.json +0 -1
  167. package/esm2015/lib/pages/base/base.component.js +0 -54
  168. package/esm2015/lib/pages/base/base.component.js.map +0 -1
  169. package/esm2015/lib/pages/base/base.component.metadata.json +0 -1
  170. package/esm2015/lib/pages/item/item.component.js.map +0 -1
  171. package/esm2015/lib/pages/item/item.component.metadata.json +0 -1
  172. package/esm2015/lib/pages/item/item.component.ngfactory.js.map +0 -1
  173. package/esm2015/lib/pages/item/item.component.scss.shim.ngstyle.js.map +0 -1
  174. package/esm2015/lib/pages/list/list.component.js.map +0 -1
  175. package/esm2015/lib/pages/list/list.component.metadata.json +0 -1
  176. package/esm2015/lib/pages/list/list.component.ngfactory.js.map +0 -1
  177. package/esm2015/lib/pages/list/list.component.scss.shim.ngstyle.js.map +0 -1
  178. package/esm2015/lib/pipes/form-options/form-options.pipe.js.map +0 -1
  179. package/esm2015/lib/pipes/form-options/form-options.pipe.metadata.json +0 -1
  180. package/esm2015/lib/pipes/form-options/form-options.pipe.ngfactory.js.map +0 -1
  181. package/esm2015/lib/pipes/index.js.map +0 -1
  182. package/esm2015/lib/pipes/index.metadata.json +0 -1
  183. package/esm2015/lib/pipes/pipes.module.js.map +0 -1
  184. package/esm2015/lib/pipes/pipes.module.metadata.json +0 -1
  185. package/esm2015/lib/pipes/pipes.module.ngfactory.js.map +0 -1
  186. package/esm2015/lib/providers/model-possibilities/model-possibilities.provider.js.map +0 -1
  187. package/esm2015/lib/providers/model-possibilities/model-possibilities.provider.metadata.json +0 -1
  188. package/esm2015/lib/services/crud/crud.service.js.map +0 -1
  189. package/esm2015/lib/services/crud/crud.service.metadata.json +0 -1
  190. package/esm2015/lib/services/crud/crud.service.ngfactory.js.map +0 -1
  191. package/esm2015/lib/services/socket/socket.service.js.map +0 -1
  192. package/esm2015/lib/services/socket/socket.service.metadata.json +0 -1
  193. package/esm2015/lib/services/socket/socket.service.ngfactory.js.map +0 -1
  194. package/esm2015/smartsoft001-crud-shell-angular.js.map +0 -1
  195. package/esm2015/smartsoft001-crud-shell-angular.metadata.json +0 -1
  196. package/lib/pages/base/base.component.d.ts +0 -11
  197. package/lib/pages/base/base.component.d.ts.map +0 -1
  198. package/lib/pages/item/item.component.scss.shim.ngstyle.d.ts.map +0 -1
  199. package/lib/pages/list/list.component.scss.shim.ngstyle.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@ngrx/store'), require('@angular/core'), require('@smartsoft001/angular'), require('rxjs/operators'), require('@smartsoft001/models'), require('moment'), require('lodash-decorators'), require('@ionic/angular'), require('rxjs'), require('lodash'), require('@angular/forms'), require('@angular/common'), require('reflect-metadata'), require('@angular/common/http'), require('@angular/router'), require('@ngx-translate/core')) :
3
- typeof define === 'function' && define.amd ? define('@smartsoft001/crud-shell-angular', ['exports', '@ngrx/store', '@angular/core', '@smartsoft001/angular', 'rxjs/operators', '@smartsoft001/models', 'moment', 'lodash-decorators', '@ionic/angular', 'rxjs', 'lodash', '@angular/forms', '@angular/common', 'reflect-metadata', '@angular/common/http', '@angular/router', '@ngx-translate/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.smartsoft001 = global.smartsoft001 || {}, global.smartsoft001["crud-shell-angular"] = {}), global.store, global.ng.core, global.angular, global.rxjs.operators, global.models, global.moment, global.lodashDecorators, global.angular$1, global.rxjs, global._, global.ng.forms, global.ng.common, null, global.ng.common.http, global.ng.router, global.core$1));
5
- })(this, (function (exports, store, core, angular, operators, models, moment, lodashDecorators, angular$1, rxjs, _, forms, common, reflectMetadata, http, router, core$1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@ngrx/store'), require('@angular/core'), require('@smartsoft001/angular'), require('rxjs/operators'), require('@smartsoft001/models'), require('moment'), require('lodash-decorators'), require('@ionic/angular'), require('rxjs'), require('lodash'), require('@angular/forms'), require('@angular/common'), require('@angular/common/http'), require('reflect-metadata'), require('@angular/router'), require('@ngx-translate/core')) :
3
+ typeof define === 'function' && define.amd ? define('@smartsoft001/crud-shell-angular', ['exports', '@ngrx/store', '@angular/core', '@smartsoft001/angular', 'rxjs/operators', '@smartsoft001/models', 'moment', 'lodash-decorators', '@ionic/angular', 'rxjs', 'lodash', '@angular/forms', '@angular/common', '@angular/common/http', 'reflect-metadata', '@angular/router', '@ngx-translate/core'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.smartsoft001 = global.smartsoft001 || {}, global.smartsoft001["crud-shell-angular"] = {}), global.store, global.ng.core, global.angular, global.rxjs.operators, global.models, global.moment, global.lodashDecorators, global.angular$1, global.rxjs, global._, global.ng.forms, global.ng.common, global.ng.common.http, null, global.ng.router, global.core$1));
5
+ })(this, (function (exports, store, core, angular, operators, models, moment, lodashDecorators, angular$1, rxjs, _, forms, common, http, reflectMetadata, router, core$1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -1389,6 +1389,78 @@
1389
1389
  { type: core.Injectable }
1390
1390
  ];
1391
1391
 
1392
+ var FormOptionsPipe = /** @class */ (function () {
1393
+ function FormOptionsPipe(modelPossibilitiesProvider) {
1394
+ this.modelPossibilitiesProvider = modelPossibilitiesProvider;
1395
+ }
1396
+ FormOptionsPipe.prototype.transform = function (item, mode, type, uniqueProvider, inputComponents) {
1397
+ if (!mode || !type)
1398
+ return null;
1399
+ var possibilities = {};
1400
+ if (type && this.modelPossibilitiesProvider) {
1401
+ possibilities = this.modelPossibilitiesProvider.get(type);
1402
+ }
1403
+ if (mode === "create") {
1404
+ return {
1405
+ mode: "create",
1406
+ possibilities: possibilities,
1407
+ inputComponents: inputComponents,
1408
+ uniqueProvider: uniqueProvider,
1409
+ model: new type(),
1410
+ };
1411
+ }
1412
+ else {
1413
+ var model_1 = new type();
1414
+ if (item) {
1415
+ Object.keys(item).forEach(function (key) {
1416
+ model_1[key] = item[key];
1417
+ });
1418
+ }
1419
+ return {
1420
+ mode: mode,
1421
+ uniqueProvider: uniqueProvider,
1422
+ possibilities: possibilities,
1423
+ inputComponents: inputComponents,
1424
+ model: model_1,
1425
+ };
1426
+ }
1427
+ };
1428
+ return FormOptionsPipe;
1429
+ }());
1430
+ /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1431
+ FormOptionsPipe.decorators = [
1432
+ { type: core.Pipe, args: [{
1433
+ name: "smartFormOptions",
1434
+ },] }
1435
+ ];
1436
+ /**
1437
+ * @type {function(): !Array<(null|{
1438
+ * type: ?,
1439
+ * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
1440
+ * })>}
1441
+ * @nocollapse
1442
+ */
1443
+ FormOptionsPipe.ctorParameters = function () { return [
1444
+ { type: ICrudModelPossibilitiesProvider, decorators: [{ type: core.Optional }, { type: core.Inject, args: [CRUD_MODEL_POSSIBILITIES_PROVIDER,] }] }
1445
+ ]; };
1446
+
1447
+ var CrudPipesModule = /** @class */ (function () {
1448
+ function CrudPipesModule() {
1449
+ }
1450
+ return CrudPipesModule;
1451
+ }());
1452
+ /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1453
+ CrudPipesModule.decorators = [
1454
+ { type: core.NgModule, args: [{
1455
+ declarations: [
1456
+ FormOptionsPipe
1457
+ ],
1458
+ exports: [
1459
+ FormOptionsPipe
1460
+ ]
1461
+ },] }
1462
+ ];
1463
+
1392
1464
  var CrudService = /** @class */ (function () {
1393
1465
  function CrudService(config, http, socket) {
1394
1466
  this.config = config;
@@ -1692,6 +1764,123 @@
1692
1764
  { type: store.State }
1693
1765
  ]; };
1694
1766
 
1767
+ var CrudListPaginationFactory = /** @class */ (function () {
1768
+ function CrudListPaginationFactory(facade) {
1769
+ this.facade = facade;
1770
+ }
1771
+ CrudListPaginationFactory.prototype.create = function (options) {
1772
+ return __awaiter(this, void 0, void 0, function () {
1773
+ var _this = this;
1774
+ return __generator(this, function (_a) {
1775
+ return [2 /*return*/, {
1776
+ limit: options.limit,
1777
+ loadNextPage: function () {
1778
+ if (!options.provider.getLinks() || !options.provider.getLinks().next)
1779
+ return Promise.resolve(false);
1780
+ return new Promise(function (res) {
1781
+ var sub = _this.facade.loaded$.subscribe(function (l) {
1782
+ if (l) {
1783
+ // if (sub && !sub.closed) sub.unsubscribe();
1784
+ setTimeout(function () {
1785
+ res(options.provider.getLinks() &&
1786
+ options.provider.getLinks().next);
1787
+ });
1788
+ }
1789
+ });
1790
+ _this.facade.read(Object.assign(Object.assign({}, options.provider.getFilter()), { offset: options.provider.getFilter().offset +
1791
+ options.provider.getFilter().limit }));
1792
+ });
1793
+ },
1794
+ loadPrevPage: function () {
1795
+ if (!options.provider.getLinks() || !options.provider.getLinks().prev)
1796
+ return Promise.resolve(false);
1797
+ return new Promise(function (res) {
1798
+ var sub = _this.facade.loaded$.subscribe(function (l) {
1799
+ if (l) {
1800
+ // if (sub && !sub.closed) sub.unsubscribe();
1801
+ setTimeout(function () {
1802
+ res(options.provider.getLinks() &&
1803
+ options.provider.getLinks().prev);
1804
+ });
1805
+ }
1806
+ });
1807
+ _this.facade.read(Object.assign(Object.assign({}, options.provider.getFilter()), { offset: options.provider.getFilter().offset -
1808
+ options.provider.getFilter().limit }));
1809
+ });
1810
+ },
1811
+ page$: this.facade.filter$.pipe(operators.map(function (f) {
1812
+ return (f === null || f === void 0 ? void 0 : f.limit) ? f.offset / f.limit + 1 : 0;
1813
+ })),
1814
+ totalPages$: rxjs.combineLatest(this.facade.filter$, this.facade.totalCount$).pipe(operators.map(function (_a) {
1815
+ var _b = __read(_a, 2), filter = _b[0], totalCount = _b[1];
1816
+ return (filter === null || filter === void 0 ? void 0 : filter.limit) ? Math.ceil(totalCount / filter.limit) : 0;
1817
+ })),
1818
+ }];
1819
+ });
1820
+ });
1821
+ };
1822
+ return CrudListPaginationFactory;
1823
+ }());
1824
+ /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1825
+ CrudListPaginationFactory.decorators = [
1826
+ { type: core.Injectable }
1827
+ ];
1828
+ /**
1829
+ * @type {function(): !Array<(null|{
1830
+ * type: ?,
1831
+ * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
1832
+ * })>}
1833
+ * @nocollapse
1834
+ */
1835
+ CrudListPaginationFactory.ctorParameters = function () { return [
1836
+ { type: CrudFacade }
1837
+ ]; };
1838
+
1839
+ var COMPONENTS = [
1840
+ ExportComponent,
1841
+ FilterComponent,
1842
+ FilterTextComponent,
1843
+ FiltersConfigComponent,
1844
+ FilterDateComponent,
1845
+ FilterDateWithEditComponent,
1846
+ FilterRadioComponent,
1847
+ FiltersComponent,
1848
+ FilterFlagComponent,
1849
+ FilterCheckComponent,
1850
+ MultiselectComponent,
1851
+ GroupComponent
1852
+ ];
1853
+ var CrudComponentsModule = /** @class */ (function () {
1854
+ function CrudComponentsModule() {
1855
+ }
1856
+ return CrudComponentsModule;
1857
+ }());
1858
+ /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1859
+ CrudComponentsModule.decorators = [
1860
+ { type: core.NgModule, args: [{
1861
+ declarations: __spreadArray([], __read(COMPONENTS)),
1862
+ entryComponents: __spreadArray([], __read(COMPONENTS)),
1863
+ imports: [
1864
+ //AuthSharedModule,
1865
+ store.StoreModule,
1866
+ angular.SharedModule,
1867
+ CrudPipesModule,
1868
+ forms.FormsModule,
1869
+ common.CommonModule
1870
+ ],
1871
+ exports: __spreadArray([
1872
+ CrudPipesModule
1873
+ ], __read(COMPONENTS)),
1874
+ providers: [
1875
+ CrudService,
1876
+ CrudEffects,
1877
+ CrudFacade,
1878
+ SocketService,
1879
+ CrudListPaginationFactory,
1880
+ ],
1881
+ },] }
1882
+ ];
1883
+
1695
1884
  var initialState = {
1696
1885
  loaded: false
1697
1886
  };
@@ -1777,95 +1966,13 @@
1777
1966
  };
1778
1967
  }
1779
1968
 
1780
- var FormOptionsPipe = /** @class */ (function () {
1781
- function FormOptionsPipe(modelPossibilitiesProvider) {
1782
- this.modelPossibilitiesProvider = modelPossibilitiesProvider;
1783
- }
1784
- FormOptionsPipe.prototype.transform = function (item, mode, type, uniqueProvider, inputComponents) {
1785
- if (!mode || !type)
1786
- return null;
1787
- var possibilities = {};
1788
- if (type && this.modelPossibilitiesProvider) {
1789
- possibilities = this.modelPossibilitiesProvider.get(type);
1790
- }
1791
- if (mode === "create") {
1792
- return {
1793
- mode: "create",
1794
- possibilities: possibilities,
1795
- inputComponents: inputComponents,
1796
- uniqueProvider: uniqueProvider,
1797
- model: new type(),
1798
- };
1799
- }
1800
- else {
1801
- var model_1 = new type();
1802
- if (item) {
1803
- Object.keys(item).forEach(function (key) {
1804
- model_1[key] = item[key];
1805
- });
1806
- }
1807
- return {
1808
- mode: mode,
1809
- uniqueProvider: uniqueProvider,
1810
- possibilities: possibilities,
1811
- inputComponents: inputComponents,
1812
- model: model_1,
1813
- };
1814
- }
1815
- };
1816
- return FormOptionsPipe;
1817
- }());
1818
- /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1819
- FormOptionsPipe.decorators = [
1820
- { type: core.Pipe, args: [{
1821
- name: "smartFormOptions",
1822
- },] }
1823
- ];
1824
- /**
1825
- * @type {function(): !Array<(null|{
1826
- * type: ?,
1827
- * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
1828
- * })>}
1829
- * @nocollapse
1830
- */
1831
- FormOptionsPipe.ctorParameters = function () { return [
1832
- { type: ICrudModelPossibilitiesProvider, decorators: [{ type: core.Optional }, { type: core.Inject, args: [CRUD_MODEL_POSSIBILITIES_PROVIDER,] }] }
1833
- ]; };
1834
-
1835
- var CrudPipesModule = /** @class */ (function () {
1836
- function CrudPipesModule() {
1837
- }
1838
- return CrudPipesModule;
1839
- }());
1840
- /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1841
- CrudPipesModule.decorators = [
1842
- { type: core.NgModule, args: [{
1843
- declarations: [
1844
- FormOptionsPipe
1845
- ],
1846
- exports: [
1847
- FormOptionsPipe
1848
- ]
1849
- },] }
1850
- ];
1851
-
1852
- var PageBaseComponent = /** @class */ (function (_super) {
1853
- __extends(PageBaseComponent, _super);
1854
- function PageBaseComponent(authService, config) {
1855
- var _this = _super.call(this) || this;
1856
- _this.authService = authService;
1857
- _this.config = config;
1858
- return _this;
1969
+ var PageService = /** @class */ (function () {
1970
+ function PageService(authService, config) {
1971
+ this.authService = authService;
1972
+ this.config = config;
1859
1973
  }
1860
- PageBaseComponent.prototype.ngOnInit = function () {
1861
- return __awaiter(this, void 0, void 0, function () {
1862
- return __generator(this, function (_a) {
1863
- this.checkPermissions(this.config);
1864
- return [2 /*return*/];
1865
- });
1866
- });
1867
- };
1868
- PageBaseComponent.prototype.checkPermissions = function (val) {
1974
+ PageService.prototype.checkPermissions = function () {
1975
+ var val = this.config;
1869
1976
  var modelOptions = models.getModelOptions(val.type);
1870
1977
  if (val.add &&
1871
1978
  modelOptions.create &&
@@ -1886,83 +1993,10 @@
1886
1993
  val.remove = false;
1887
1994
  }
1888
1995
  };
1889
- return PageBaseComponent;
1890
- }(angular.BaseComponent));
1891
- /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1892
- PageBaseComponent.decorators = [
1893
- { type: core.Directive }
1894
- ];
1895
- /**
1896
- * @type {function(): !Array<(null|{
1897
- * type: ?,
1898
- * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
1899
- * })>}
1900
- * @nocollapse
1901
- */
1902
- PageBaseComponent.ctorParameters = function () { return [
1903
- { type: angular.AuthService },
1904
- { type: CrudFullConfig }
1905
- ]; };
1906
-
1907
- var CrudListPaginationFactory = /** @class */ (function () {
1908
- function CrudListPaginationFactory(facade) {
1909
- this.facade = facade;
1910
- }
1911
- CrudListPaginationFactory.prototype.create = function (options) {
1912
- return __awaiter(this, void 0, void 0, function () {
1913
- var _this = this;
1914
- return __generator(this, function (_a) {
1915
- return [2 /*return*/, {
1916
- limit: options.limit,
1917
- loadNextPage: function () {
1918
- if (!options.provider.getLinks() || !options.provider.getLinks().next)
1919
- return Promise.resolve(false);
1920
- return new Promise(function (res) {
1921
- var sub = _this.facade.loaded$.subscribe(function (l) {
1922
- if (l) {
1923
- // if (sub && !sub.closed) sub.unsubscribe();
1924
- setTimeout(function () {
1925
- res(options.provider.getLinks() &&
1926
- options.provider.getLinks().next);
1927
- });
1928
- }
1929
- });
1930
- _this.facade.read(Object.assign(Object.assign({}, options.provider.getFilter()), { offset: options.provider.getFilter().offset +
1931
- options.provider.getFilter().limit }));
1932
- });
1933
- },
1934
- loadPrevPage: function () {
1935
- if (!options.provider.getLinks() || !options.provider.getLinks().prev)
1936
- return Promise.resolve(false);
1937
- return new Promise(function (res) {
1938
- var sub = _this.facade.loaded$.subscribe(function (l) {
1939
- if (l) {
1940
- // if (sub && !sub.closed) sub.unsubscribe();
1941
- setTimeout(function () {
1942
- res(options.provider.getLinks() &&
1943
- options.provider.getLinks().prev);
1944
- });
1945
- }
1946
- });
1947
- _this.facade.read(Object.assign(Object.assign({}, options.provider.getFilter()), { offset: options.provider.getFilter().offset -
1948
- options.provider.getFilter().limit }));
1949
- });
1950
- },
1951
- page$: this.facade.filter$.pipe(operators.map(function (f) {
1952
- return (f === null || f === void 0 ? void 0 : f.limit) ? f.offset / f.limit + 1 : 0;
1953
- })),
1954
- totalPages$: rxjs.combineLatest(this.facade.filter$, this.facade.totalCount$).pipe(operators.map(function (_a) {
1955
- var _b = __read(_a, 2), filter = _b[0], totalCount = _b[1];
1956
- return (filter === null || filter === void 0 ? void 0 : filter.limit) ? Math.ceil(totalCount / filter.limit) : 0;
1957
- })),
1958
- }];
1959
- });
1960
- });
1961
- };
1962
- return CrudListPaginationFactory;
1996
+ return PageService;
1963
1997
  }());
1964
1998
  /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
1965
- CrudListPaginationFactory.decorators = [
1999
+ PageService.decorators = [
1966
2000
  { type: core.Injectable }
1967
2001
  ];
1968
2002
  /**
@@ -1972,14 +2006,15 @@
1972
2006
  * })>}
1973
2007
  * @nocollapse
1974
2008
  */
1975
- CrudListPaginationFactory.ctorParameters = function () { return [
1976
- { type: CrudFacade }
2009
+ PageService.ctorParameters = function () { return [
2010
+ { type: angular.AuthService },
2011
+ { type: CrudFullConfig }
1977
2012
  ]; };
1978
2013
 
1979
- var ListComponent = /** @class */ (function (_super_1) {
1980
- __extends(ListComponent, _super_1);
1981
- function ListComponent(facade, router, dynamicComponentLoader, injector, cd, menuService, hardwareService, paginationFacade, styleService, elementRef, config, authService) {
1982
- var _this = _super_1.call(this, authService, config) || this;
2014
+ var ListComponent = /** @class */ (function (_super) {
2015
+ __extends(ListComponent, _super);
2016
+ function ListComponent(facade, router, dynamicComponentLoader, injector, cd, menuService, hardwareService, paginationFacade, styleService, elementRef, pageService, config, moduleRef, componentFactoryResolver) {
2017
+ var _this = _super.call(this, cd, moduleRef, componentFactoryResolver) || this;
1983
2018
  _this.facade = facade;
1984
2019
  _this.router = router;
1985
2020
  _this.dynamicComponentLoader = dynamicComponentLoader;
@@ -1990,7 +2025,10 @@
1990
2025
  _this.paginationFacade = paginationFacade;
1991
2026
  _this.styleService = styleService;
1992
2027
  _this.elementRef = elementRef;
2028
+ _this.pageService = pageService;
1993
2029
  _this.config = config;
2030
+ _this.moduleRef = moduleRef;
2031
+ _this.componentFactoryResolver = componentFactoryResolver;
1994
2032
  _this.filter$ = _this.facade.filter$.pipe(operators.tap(function (filter) {
1995
2033
  _this.filter = filter;
1996
2034
  }));
@@ -1999,17 +2037,17 @@
1999
2037
  });
2000
2038
  return _this;
2001
2039
  }
2040
+ ListComponent.prototype.refreshProperties = function () {
2041
+ this.baseInstance.listOptions = this.listOptions;
2042
+ };
2002
2043
  ListComponent.prototype.ngOnInit = function () {
2003
- var _super = Object.create(null, {
2004
- ngOnInit: { get: function () { return _super_1.prototype.ngOnInit; } }
2005
- });
2006
2044
  var _a;
2007
2045
  return __awaiter(this, void 0, void 0, function () {
2008
2046
  var endButtons, compiledComponents, _f, _g;
2009
2047
  var _this = this;
2010
2048
  return __generator(this, function (_h) {
2011
2049
  switch (_h.label) {
2012
- case 0: return [4 /*yield*/, _super.ngOnInit.call(this)];
2050
+ case 0: return [4 /*yield*/, this.pageService.checkPermissions()];
2013
2051
  case 1:
2014
2052
  _h.sent();
2015
2053
  this.facade.read({
@@ -2143,6 +2181,7 @@
2143
2181
  this.cd.detectChanges();
2144
2182
  this.initCloseMenu();
2145
2183
  this.initTopComponent(compiledComponents);
2184
+ this.refreshDynamicInstance();
2146
2185
  return [2 /*return*/];
2147
2186
  }
2148
2187
  });
@@ -2267,13 +2306,12 @@
2267
2306
  });
2268
2307
  };
2269
2308
  return ListComponent;
2270
- }(PageBaseComponent));
2309
+ }(angular.CreateDynamicComponent('crud-list-page')));
2271
2310
  /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
2272
2311
  ListComponent.decorators = [
2273
2312
  { type: core.Component, args: [{
2274
2313
  selector: "smart-crud-list-page",
2275
- template: "<smart-page [options]=\"pageOptions\" *ngIf=\"filter$ | async\">\n <div #topTpl></div>\n <smart-crud-filters-config></smart-crud-filters-config>\n <smart-list *ngIf=\"listOptions\" [hidden]=\"config.list?.groups\" [options]=\"listOptions\"></smart-list>\n <smart-crud-group *ngIf=\"config.list?.groups\" [groups]=\"config.list?.groups\" [listOptions]=\"listOptions\">\n </smart-crud-group>\n</smart-page>\n",
2276
- styles: [""]
2314
+ template: "\n <smart-page [options]=\"pageOptions\" *ngIf=\"filter$ | async\">\n <div #topTpl></div>\n <smart-crud-list-standard-page *ngIf=\"template === 'default'\" [listOptions]=\"listOptions\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </smart-crud-list-standard-page>\n <ng-template #contentTpl>\n <ng-content></ng-content>\n </ng-template>\n <div #customTpl></div>\n </smart-page>\n "
2277
2315
  },] }
2278
2316
  ];
2279
2317
  /**
@@ -2294,18 +2332,76 @@
2294
2332
  { type: CrudListPaginationFactory },
2295
2333
  { type: angular.StyleService },
2296
2334
  { type: core.ElementRef },
2335
+ { type: PageService },
2297
2336
  { type: CrudFullConfig },
2298
- { type: angular.AuthService }
2337
+ { type: core.NgModuleRef },
2338
+ { type: core.ComponentFactoryResolver }
2299
2339
  ]; };
2300
2340
  /** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
2301
2341
  ListComponent.propDecorators = {
2302
2342
  topTpl: [{ type: core.ViewChild, args: ["topTpl", { read: core.ViewContainerRef, static: false },] }]
2303
2343
  };
2304
2344
 
2305
- var ItemComponent = /** @class */ (function (_super_1) {
2306
- __extends(ItemComponent, _super_1);
2307
- function ItemComponent(router, activeRoute, facade, service, route, dynamicComponentLoader, translateService, config, location, cd, authService, styleService, elementRef, toastService) {
2308
- var _this = _super_1.call(this, authService, config) || this;
2345
+ var CrudItemPageBaseComponent = /** @class */ (function (_super) {
2346
+ __extends(CrudItemPageBaseComponent, _super);
2347
+ function CrudItemPageBaseComponent(config, facade) {
2348
+ var _this = _super.call(this) || this;
2349
+ _this.config = config;
2350
+ _this.facade = facade;
2351
+ _this.formComponents = new core.QueryList();
2352
+ _this.selected$ = facade.selected$;
2353
+ return _this;
2354
+ }
2355
+ return CrudItemPageBaseComponent;
2356
+ }(angular.BaseComponent));
2357
+ CrudItemPageBaseComponent.smartType = "crud-item-page";
2358
+ /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
2359
+ CrudItemPageBaseComponent.decorators = [
2360
+ { type: core.Directive }
2361
+ ];
2362
+ /**
2363
+ * @type {function(): !Array<(null|{
2364
+ * type: ?,
2365
+ * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
2366
+ * })>}
2367
+ * @nocollapse
2368
+ */
2369
+ CrudItemPageBaseComponent.ctorParameters = function () { return [
2370
+ { type: CrudFullConfig },
2371
+ { type: CrudFacade }
2372
+ ]; };
2373
+ /** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
2374
+ CrudItemPageBaseComponent.propDecorators = {
2375
+ contentTpl: [{ type: core.ViewChild, args: ["contentTpl", { read: core.ViewContainerRef, static: true },] }],
2376
+ formComponents: [{ type: core.ViewChildren, args: [angular.FormComponent, { read: angular.FormComponent },] }],
2377
+ detailsOptions: [{ type: core.Input }],
2378
+ mode: [{ type: core.Input }],
2379
+ uniqueProvider: [{ type: core.Input }],
2380
+ onPartialChange: [{ type: core.Input }],
2381
+ onChange: [{ type: core.Input }],
2382
+ onValidChange: [{ type: core.Input }]
2383
+ };
2384
+
2385
+ var ItemStandardComponent = /** @class */ (function (_super) {
2386
+ __extends(ItemStandardComponent, _super);
2387
+ function ItemStandardComponent() {
2388
+ return _super !== null && _super.apply(this, arguments) || this;
2389
+ }
2390
+ return ItemStandardComponent;
2391
+ }(CrudItemPageBaseComponent));
2392
+ /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
2393
+ ItemStandardComponent.decorators = [
2394
+ { type: core.Component, args: [{
2395
+ selector: "smart-crud-item-standard-page",
2396
+ template: "<ng-container *ngIf=\"mode === 'details'; else editTpl\">\n <smart-details *ngIf=\"detailsOptions\" [options]='detailsOptions'></smart-details>\n</ng-container>\n\n<ng-template #editTpl>\n <smart-form\n [options]=\"\n (selected$ | async)\n | smartFormOptions : mode:config?.type:uniqueProvider : config.inputComponents\n \"\n (valuePartialChange)=\"onPartialChange($event)\"\n (valueChange)=\"onChange($event)\"\n (validChange)=\"onValidChange($event)\"\n ></smart-form>\n</ng-template>\n\n<br/><br/>",
2397
+ styles: [""]
2398
+ },] }
2399
+ ];
2400
+
2401
+ var ItemComponent = /** @class */ (function (_super) {
2402
+ __extends(ItemComponent, _super);
2403
+ function ItemComponent(router, activeRoute, facade, service, route, dynamicComponentLoader, translateService, config, location, cd, authService, styleService, elementRef, toastService, pageService, moduleRef, componentFactoryResolver) {
2404
+ var _this = _super.call(this, cd, moduleRef, componentFactoryResolver) || this;
2309
2405
  _this.router = router;
2310
2406
  _this.activeRoute = activeRoute;
2311
2407
  _this.facade = facade;
@@ -2319,20 +2415,39 @@
2319
2415
  _this.styleService = styleService;
2320
2416
  _this.elementRef = elementRef;
2321
2417
  _this.toastService = toastService;
2418
+ _this.pageService = pageService;
2419
+ _this.moduleRef = moduleRef;
2420
+ _this.componentFactoryResolver = componentFactoryResolver;
2322
2421
  _this.pageOptions = {
2323
2422
  title: "",
2324
2423
  showBackButton: true,
2325
2424
  hideMenuButton: true,
2326
2425
  };
2327
2426
  _this.formValid = false;
2328
- _this.formComponents = new core.QueryList();
2427
+ _this.standardComponents = new core.QueryList();
2329
2428
  _this.selected$ = _this.facade.selected$;
2330
2429
  return _this;
2331
2430
  }
2431
+ Object.defineProperty(ItemComponent.prototype, "mode", {
2432
+ get: function () {
2433
+ return this._mode;
2434
+ },
2435
+ set: function (val) {
2436
+ this._mode = val;
2437
+ this.refreshDynamicInstance();
2438
+ },
2439
+ enumerable: false,
2440
+ configurable: true
2441
+ });
2442
+ ItemComponent.prototype.refreshProperties = function () {
2443
+ this.baseInstance.detailsOptions = this.detailsOptions;
2444
+ this.baseInstance.mode = this.mode;
2445
+ this.baseInstance.uniqueProvider = this.uniqueProvider;
2446
+ this.baseInstance.onPartialChange = this.onPartialChange;
2447
+ this.baseInstance.onChange = this.onChange;
2448
+ this.baseInstance.onValidChange = this.onValidChange;
2449
+ };
2332
2450
  ItemComponent.prototype.ngOnInit = function () {
2333
- var _super = Object.create(null, {
2334
- ngOnInit: { get: function () { return _super_1.prototype.ngOnInit; } }
2335
- });
2336
2451
  return __awaiter(this, void 0, void 0, function () {
2337
2452
  var compiledComponents;
2338
2453
  var _this = this;
@@ -2340,9 +2455,7 @@
2340
2455
  switch (_a.label) {
2341
2456
  case 0:
2342
2457
  this.styleService.init(this.elementRef);
2343
- return [4 /*yield*/, _super.ngOnInit.call(this)];
2344
- case 1:
2345
- _a.sent();
2458
+ this.pageService.checkPermissions();
2346
2459
  if (this.router.routerState.snapshot.url.endsWith("/add")) {
2347
2460
  this.mode = "create";
2348
2461
  }
@@ -2386,7 +2499,7 @@
2386
2499
  }
2387
2500
  });
2388
2501
  }); };
2389
- if (!this.config.details) return [3 /*break*/, 3];
2502
+ if (!this.config.details) return [3 /*break*/, 2];
2390
2503
  return [4 /*yield*/, this.dynamicComponentLoader.getComponentsWithFactories({
2391
2504
  components: __spreadArray(__spreadArray([], __read((this.config.details &&
2392
2505
  this.config.details["components"] &&
@@ -2398,7 +2511,7 @@
2398
2511
  ? [this.config.details["components"].bottom]
2399
2512
  : []))),
2400
2513
  })];
2401
- case 2:
2514
+ case 1:
2402
2515
  compiledComponents = _a.sent();
2403
2516
  this.detailsOptions = {
2404
2517
  type: this.config.type,
@@ -2417,14 +2530,15 @@
2417
2530
  : null,
2418
2531
  },
2419
2532
  };
2420
- _a.label = 3;
2421
- case 3:
2533
+ _a.label = 2;
2534
+ case 2:
2422
2535
  this.initPageOptions();
2423
2536
  this.facade.selected$.pipe(this.takeUntilDestroy).subscribe(function (item) {
2424
2537
  _this.item = item;
2425
2538
  _this.initPageOptions();
2426
2539
  _this.cd.detectChanges();
2427
2540
  });
2541
+ this.refreshDynamicInstance();
2428
2542
  return [2 /*return*/];
2429
2543
  }
2430
2544
  });
@@ -2529,7 +2643,9 @@
2529
2643
  return item.innerHTML;
2530
2644
  };
2531
2645
  ItemComponent.prototype.checkFirstInvalid = function () {
2532
- var form = this.formComponents.first.form;
2646
+ var form = this.template === 'default'
2647
+ ? this.standardComponents.first.formComponents.first.form
2648
+ : this.baseInstance.formComponents.first.form;
2533
2649
  if (form.valid)
2534
2650
  return false;
2535
2651
  var invalidFields = [];
@@ -2561,13 +2677,12 @@
2561
2677
  }
2562
2678
  };
2563
2679
  return ItemComponent;
2564
- }(PageBaseComponent));
2680
+ }(angular.CreateDynamicComponent('crud-item-page')));
2565
2681
  /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
2566
2682
  ItemComponent.decorators = [
2567
2683
  { type: core.Component, args: [{
2568
2684
  selector: "smart-crud-item-page",
2569
- template: "<smart-page [options]=\"pageOptions\">\n\n <ng-container *ngIf=\"mode === 'details'; else editTpl\">\n <smart-details *ngIf=\"detailsOptions\" [options]='detailsOptions'></smart-details>\n </ng-container>\n\n <ng-template #editTpl>\n <smart-form\n [options]=\"\n (selected$ | async)\n | smartFormOptions : mode:config?.type:uniqueProvider : config.inputComponents\n \"\n (valuePartialChange)=\"onPartialChange($event)\"\n (valueChange)=\"onChange($event)\"\n (validChange)=\"onValidChange($event)\"\n ></smart-form>\n </ng-template>\n\n <br/><br/>\n</smart-page>\n",
2570
- styles: [""]
2685
+ template: "\n <smart-page [options]=\"pageOptions\">\n <div #topTpl></div>\n <smart-crud-item-standard-page *ngIf=\"template === 'default'\"\n [detailsOptions]=\"detailsOptions\"\n [mode]=\"mode\"\n [uniqueProvider]=\"uniqueProvider\"\n [onPartialChange]=\"onPartialChange\"\n [onChange]=\"onPartialChange\"\n [onValidChange]=\"onValidChange\"\n >\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </smart-crud-item-standard-page>\n <ng-template #contentTpl>\n <ng-content></ng-content>\n </ng-template>\n <div #customTpl></div>\n </smart-page>\n "
2571
2686
  },] }
2572
2687
  ];
2573
2688
  /**
@@ -2591,62 +2706,68 @@
2591
2706
  { type: angular.AuthService },
2592
2707
  { type: angular.StyleService },
2593
2708
  { type: core.ElementRef },
2594
- { type: angular.ToastService }
2709
+ { type: angular.ToastService },
2710
+ { type: PageService },
2711
+ { type: core.NgModuleRef },
2712
+ { type: core.ComponentFactoryResolver }
2595
2713
  ]; };
2596
2714
  /** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
2597
2715
  ItemComponent.propDecorators = {
2598
- formComponents: [{ type: core.ViewChildren, args: [angular.FormComponent, { read: angular.FormComponent },] }],
2716
+ standardComponents: [{ type: core.ViewChildren, args: [ItemStandardComponent, { read: ItemStandardComponent },] }],
2599
2717
  content: [{ type: core.ViewChild, args: [angular$1.IonContent, { static: true },] }]
2600
2718
  };
2601
2719
 
2602
- var COMPONENTS = [
2603
- ExportComponent,
2604
- FilterComponent,
2605
- FilterTextComponent,
2606
- FiltersConfigComponent,
2607
- FilterDateComponent,
2608
- FilterDateWithEditComponent,
2609
- FilterRadioComponent,
2610
- FiltersComponent,
2611
- FilterFlagComponent,
2612
- FilterCheckComponent,
2613
- MultiselectComponent,
2614
- GroupComponent
2720
+ var CrudListPageBaseComponent = /** @class */ (function (_super) {
2721
+ __extends(CrudListPageBaseComponent, _super);
2722
+ function CrudListPageBaseComponent(config) {
2723
+ var _this = _super.call(this) || this;
2724
+ _this.config = config;
2725
+ return _this;
2726
+ }
2727
+ return CrudListPageBaseComponent;
2728
+ }(angular.BaseComponent));
2729
+ CrudListPageBaseComponent.smartType = "crud-list-page";
2730
+ /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
2731
+ CrudListPageBaseComponent.decorators = [
2732
+ { type: core.Directive }
2615
2733
  ];
2616
- var CrudComponentsModule = /** @class */ (function () {
2617
- function CrudComponentsModule() {
2734
+ /**
2735
+ * @type {function(): !Array<(null|{
2736
+ * type: ?,
2737
+ * decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
2738
+ * })>}
2739
+ * @nocollapse
2740
+ */
2741
+ CrudListPageBaseComponent.ctorParameters = function () { return [
2742
+ { type: CrudFullConfig }
2743
+ ]; };
2744
+ /** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
2745
+ CrudListPageBaseComponent.propDecorators = {
2746
+ contentTpl: [{ type: core.ViewChild, args: ["contentTpl", { read: core.ViewContainerRef, static: true },] }],
2747
+ listOptions: [{ type: core.Input }]
2748
+ };
2749
+
2750
+ var ListStandardComponent = /** @class */ (function (_super) {
2751
+ __extends(ListStandardComponent, _super);
2752
+ function ListStandardComponent() {
2753
+ return _super !== null && _super.apply(this, arguments) || this;
2618
2754
  }
2619
- return CrudComponentsModule;
2620
- }());
2755
+ return ListStandardComponent;
2756
+ }(CrudListPageBaseComponent));
2621
2757
  /** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
2622
- CrudComponentsModule.decorators = [
2623
- { type: core.NgModule, args: [{
2624
- declarations: __spreadArray([], __read(COMPONENTS)),
2625
- entryComponents: __spreadArray([], __read(COMPONENTS)),
2626
- imports: [
2627
- //AuthSharedModule,
2628
- store.StoreModule,
2629
- angular.SharedModule,
2630
- CrudPipesModule,
2631
- forms.FormsModule,
2632
- common.CommonModule
2633
- ],
2634
- exports: __spreadArray([
2635
- CrudPipesModule
2636
- ], __read(COMPONENTS)),
2637
- providers: [
2638
- CrudService,
2639
- CrudEffects,
2640
- CrudFacade,
2641
- SocketService,
2642
- CrudListPaginationFactory,
2643
- ],
2758
+ ListStandardComponent.decorators = [
2759
+ { type: core.Component, args: [{
2760
+ selector: "smart-crud-list-standard-page",
2761
+ template: "<smart-crud-filters-config></smart-crud-filters-config>\n<smart-list *ngIf=\"listOptions\" [hidden]=\"config.list?.groups\" [options]=\"listOptions\"></smart-list>\n<smart-crud-group *ngIf=\"config.list?.groups\" [groups]=\"config.list?.groups\" [listOptions]=\"listOptions\">\n</smart-crud-group>",
2762
+ styles: [""]
2644
2763
  },] }
2645
2764
  ];
2646
2765
 
2647
2766
  var PAGES = [
2648
2767
  ItemComponent,
2649
- ListComponent
2768
+ ListComponent,
2769
+ ListStandardComponent,
2770
+ ItemStandardComponent
2650
2771
  ];
2651
2772
  var CrudFullModule = /** @class */ (function () {
2652
2773
  function CrudFullModule(store, config, effects) {
@@ -2675,9 +2796,12 @@
2675
2796
  common.CommonModule,
2676
2797
  CrudComponentsModule
2677
2798
  ],
2678
- exports: __spreadArray([], __read(PAGES)),
2799
+ exports: __spreadArray(__spreadArray([], __read(PAGES)), [
2800
+ CrudComponentsModule
2801
+ ]),
2679
2802
  providers: [
2680
2803
  CrudService,
2804
+ PageService,
2681
2805
  CrudEffects,
2682
2806
  CrudFacade,
2683
2807
  CrudListPaginationFactory,
@@ -2722,6 +2846,7 @@
2722
2846
  exports: [CrudComponentsModule],
2723
2847
  providers: [
2724
2848
  CrudService,
2849
+ PageService,
2725
2850
  CrudEffects,
2726
2851
  CrudFacade,
2727
2852
  SocketService,
@@ -2770,11 +2895,14 @@
2770
2895
  */
2771
2896
 
2772
2897
  exports.CRUD_MODEL_POSSIBILITIES_PROVIDER = CRUD_MODEL_POSSIBILITIES_PROVIDER;
2898
+ exports.CrudComponentsModule = CrudComponentsModule;
2773
2899
  exports.CrudConfig = CrudConfig;
2774
2900
  exports.CrudCoreModule = CrudCoreModule;
2775
2901
  exports.CrudEffects = CrudEffects;
2776
2902
  exports.CrudFacade = CrudFacade;
2777
2903
  exports.CrudFullConfig = CrudFullConfig;
2904
+ exports.CrudItemPageBaseComponent = CrudItemPageBaseComponent;
2905
+ exports.CrudListPageBaseComponent = CrudListPageBaseComponent;
2778
2906
  exports.CrudListPaginationFactory = CrudListPaginationFactory;
2779
2907
  exports.CrudModule = CrudModule;
2780
2908
  exports.CrudPipesModule = CrudPipesModule;
@@ -2793,6 +2921,7 @@
2793
2921
  exports.GroupComponent = GroupComponent;
2794
2922
  exports.ICrudModelPossibilitiesProvider = ICrudModelPossibilitiesProvider;
2795
2923
  exports.MultiselectComponent = MultiselectComponent;
2924
+ exports.PageService = PageService;
2796
2925
  exports.create = create;
2797
2926
  exports.createFailure = createFailure;
2798
2927
  exports.createMany = createMany;
@@ -2853,8 +2982,11 @@
2853
2982
  exports["ɵq"] = NotSocketService;
2854
2983
  exports["ɵr"] = CrudFullModule;
2855
2984
  exports["ɵs"] = ItemComponent;
2856
- exports["ɵt"] = PageBaseComponent;
2857
- exports["ɵu"] = ListComponent;
2985
+ exports["ɵt"] = ItemStandardComponent;
2986
+ exports["ɵu"] = CrudItemPageBaseComponent;
2987
+ exports["ɵv"] = ListComponent;
2988
+ exports["ɵw"] = ListStandardComponent;
2989
+ exports["ɵx"] = CrudListPageBaseComponent;
2858
2990
 
2859
2991
  Object.defineProperty(exports, '__esModule', { value: true });
2860
2992