@sd-angular/core 1.3.213 → 1.3.214

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 (112) hide show
  1. package/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
  2. package/autocomplete/src/lib/autocomplete.component.d.ts +4 -1
  3. package/bundles/sd-angular-core-autocomplete.umd.js +22 -2
  4. package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
  5. package/bundles/sd-angular-core-autocomplete.umd.min.js +2 -2
  6. package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
  7. package/bundles/sd-angular-core-date-month.umd.js +23 -1
  8. package/bundles/sd-angular-core-date-month.umd.js.map +1 -1
  9. package/bundles/sd-angular-core-date-month.umd.min.js +2 -2
  10. package/bundles/sd-angular-core-date-month.umd.min.js.map +1 -1
  11. package/bundles/sd-angular-core-date-time.umd.js +24 -1
  12. package/bundles/sd-angular-core-date-time.umd.js.map +1 -1
  13. package/bundles/sd-angular-core-date-time.umd.min.js +1 -1
  14. package/bundles/sd-angular-core-date-time.umd.min.js.map +1 -1
  15. package/bundles/sd-angular-core-editor.umd.js +23 -3
  16. package/bundles/sd-angular-core-editor.umd.js.map +1 -1
  17. package/bundles/sd-angular-core-editor.umd.min.js +1 -1
  18. package/bundles/sd-angular-core-editor.umd.min.js.map +1 -1
  19. package/bundles/sd-angular-core-input-currency.umd.js +22 -2
  20. package/bundles/sd-angular-core-input-currency.umd.js.map +1 -1
  21. package/bundles/sd-angular-core-input-currency.umd.min.js +1 -1
  22. package/bundles/sd-angular-core-input-currency.umd.min.js.map +1 -1
  23. package/bundles/sd-angular-core-input-dropdown.umd.js +22 -2
  24. package/bundles/sd-angular-core-input-dropdown.umd.js.map +1 -1
  25. package/bundles/sd-angular-core-input-dropdown.umd.min.js +1 -1
  26. package/bundles/sd-angular-core-input-dropdown.umd.min.js.map +1 -1
  27. package/bundles/sd-angular-core-input-number.umd.js +22 -2
  28. package/bundles/sd-angular-core-input-number.umd.js.map +1 -1
  29. package/bundles/sd-angular-core-input-number.umd.min.js +2 -2
  30. package/bundles/sd-angular-core-input-number.umd.min.js.map +1 -1
  31. package/bundles/sd-angular-core-input.umd.js +33 -3
  32. package/bundles/sd-angular-core-input.umd.js.map +1 -1
  33. package/bundles/sd-angular-core-input.umd.min.js +2 -2
  34. package/bundles/sd-angular-core-input.umd.min.js.map +1 -1
  35. package/bundles/sd-angular-core-select-editor.umd.js +1 -1
  36. package/bundles/sd-angular-core-select-editor.umd.js.map +1 -1
  37. package/bundles/sd-angular-core-select-editor.umd.min.js +2 -2
  38. package/bundles/sd-angular-core-select-editor.umd.min.js.map +1 -1
  39. package/bundles/sd-angular-core-select.umd.js +22 -2
  40. package/bundles/sd-angular-core-select.umd.js.map +1 -1
  41. package/bundles/sd-angular-core-select.umd.min.js +2 -2
  42. package/bundles/sd-angular-core-select.umd.min.js.map +1 -1
  43. package/bundles/sd-angular-core-table.umd.js +95 -77
  44. package/bundles/sd-angular-core-table.umd.js.map +1 -1
  45. package/bundles/sd-angular-core-table.umd.min.js +1 -1
  46. package/bundles/sd-angular-core-table.umd.min.js.map +1 -1
  47. package/bundles/sd-angular-core-textarea.umd.js +22 -2
  48. package/bundles/sd-angular-core-textarea.umd.js.map +1 -1
  49. package/bundles/sd-angular-core-textarea.umd.min.js +1 -1
  50. package/bundles/sd-angular-core-textarea.umd.min.js.map +1 -1
  51. package/date-month/sd-angular-core-date-month.metadata.json +1 -1
  52. package/date-month/src/lib/date-month.component.d.ts +4 -1
  53. package/date-time/sd-angular-core-date-time.metadata.json +1 -1
  54. package/date-time/src/lib/date-time.component.d.ts +4 -1
  55. package/editor/sd-angular-core-editor.metadata.json +1 -1
  56. package/editor/src/lib/editor.component.d.ts +4 -1
  57. package/esm2015/autocomplete/src/lib/autocomplete.component.js +19 -3
  58. package/esm2015/date-month/src/lib/date-month.component.js +20 -2
  59. package/esm2015/date-time/src/lib/date-time.component.js +21 -2
  60. package/esm2015/editor/src/lib/editor.component.js +20 -4
  61. package/esm2015/input/src/lib/input.component.js +28 -3
  62. package/esm2015/input-currency/src/lib/input-currency.component.js +19 -3
  63. package/esm2015/input-dropdown/src/lib/input.component.js +19 -3
  64. package/esm2015/input-number/src/lib/input-number.component.js +19 -3
  65. package/esm2015/select/src/lib/select.component.js +19 -3
  66. package/esm2015/select-editor/src/lib/select-editor.component.js +2 -2
  67. package/esm2015/table/src/lib/components/column-inline-filter/column-inline-filter.component.js +1 -1
  68. package/esm2015/table/src/lib/models/table-column.model.js +1 -1
  69. package/esm2015/table/src/lib/services/table-filter/table-filter.service.js +19 -7
  70. package/esm2015/table/src/lib/table.component.js +5 -2
  71. package/esm2015/textarea/src/lib/textarea.component.js +19 -3
  72. package/fesm2015/sd-angular-core-autocomplete.js +18 -2
  73. package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
  74. package/fesm2015/sd-angular-core-date-month.js +19 -1
  75. package/fesm2015/sd-angular-core-date-month.js.map +1 -1
  76. package/fesm2015/sd-angular-core-date-time.js +20 -1
  77. package/fesm2015/sd-angular-core-date-time.js.map +1 -1
  78. package/fesm2015/sd-angular-core-editor.js +19 -3
  79. package/fesm2015/sd-angular-core-editor.js.map +1 -1
  80. package/fesm2015/sd-angular-core-input-currency.js +18 -2
  81. package/fesm2015/sd-angular-core-input-currency.js.map +1 -1
  82. package/fesm2015/sd-angular-core-input-dropdown.js +18 -2
  83. package/fesm2015/sd-angular-core-input-dropdown.js.map +1 -1
  84. package/fesm2015/sd-angular-core-input-number.js +18 -2
  85. package/fesm2015/sd-angular-core-input-number.js.map +1 -1
  86. package/fesm2015/sd-angular-core-input.js +29 -4
  87. package/fesm2015/sd-angular-core-input.js.map +1 -1
  88. package/fesm2015/sd-angular-core-select-editor.js +1 -1
  89. package/fesm2015/sd-angular-core-select-editor.js.map +1 -1
  90. package/fesm2015/sd-angular-core-select.js +18 -2
  91. package/fesm2015/sd-angular-core-select.js.map +1 -1
  92. package/fesm2015/sd-angular-core-table.js +22 -7
  93. package/fesm2015/sd-angular-core-table.js.map +1 -1
  94. package/fesm2015/sd-angular-core-textarea.js +18 -2
  95. package/fesm2015/sd-angular-core-textarea.js.map +1 -1
  96. package/input/sd-angular-core-input.metadata.json +1 -1
  97. package/input/src/lib/input.component.d.ts +5 -1
  98. package/input-currency/sd-angular-core-input-currency.metadata.json +1 -1
  99. package/input-currency/src/lib/input-currency.component.d.ts +4 -1
  100. package/input-dropdown/sd-angular-core-input-dropdown.metadata.json +1 -1
  101. package/input-dropdown/src/lib/input.component.d.ts +4 -1
  102. package/input-number/sd-angular-core-input-number.metadata.json +1 -1
  103. package/input-number/src/lib/input-number.component.d.ts +4 -1
  104. package/package.json +1 -1
  105. package/{sd-angular-core-1.3.213.tgz → sd-angular-core-1.3.214.tgz} +0 -0
  106. package/select/sd-angular-core-select.metadata.json +1 -1
  107. package/select/src/lib/select.component.d.ts +4 -1
  108. package/select-editor/sd-angular-core-select-editor.metadata.json +1 -1
  109. package/table/sd-angular-core-table.metadata.json +1 -1
  110. package/table/src/lib/models/table-column.model.d.ts +1 -0
  111. package/textarea/sd-angular-core-textarea.metadata.json +1 -1
  112. package/textarea/src/lib/textarea.component.d.ts +4 -1
@@ -876,7 +876,7 @@
876
876
  return __classPrivateFieldGet(_this, _cache)[key];
877
877
  };
878
878
  _defaultConfiguration.set(this, function (args) {
879
- var e_1, _r, e_2, _s, e_3, _t;
879
+ var e_1, _v, e_2, _w, e_3, _x;
880
880
  var _a;
881
881
  var columns = args.columns, externalFilters = args.externalFilters, filterDefs = args.filterDefs;
882
882
  var inlineColumn = {};
@@ -884,43 +884,43 @@
884
884
  var inlineFilterDef = {};
885
885
  try {
886
886
  // Filter column
887
- for (var _u = __values(columns || []), _v = _u.next(); !_v.done; _v = _u.next()) {
888
- var item = _v.value;
887
+ for (var _y = __values(columns || []), _z = _y.next(); !_z.done; _z = _y.next()) {
888
+ var item = _z.value;
889
889
  inlineColumn[item.field] = (_a = item === null || item === void 0 ? void 0 : item.filter) === null || _a === void 0 ? void 0 : _a.defaultShowing;
890
890
  }
891
891
  }
892
892
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
893
893
  finally {
894
894
  try {
895
- if (_v && !_v.done && (_r = _u.return)) _r.call(_u);
895
+ if (_z && !_z.done && (_v = _y.return)) _v.call(_y);
896
896
  }
897
897
  finally { if (e_1) throw e_1.error; }
898
898
  }
899
899
  try {
900
900
  // Filter external
901
- for (var _w = __values(externalFilters || []), _x = _w.next(); !_x.done; _x = _w.next()) {
902
- var item = _x.value;
901
+ for (var _0 = __values(externalFilters || []), _1 = _0.next(); !_1.done; _1 = _0.next()) {
902
+ var item = _1.value;
903
903
  inlineExternal[item.field] = item === null || item === void 0 ? void 0 : item.defaultShowing;
904
904
  }
905
905
  }
906
906
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
907
907
  finally {
908
908
  try {
909
- if (_x && !_x.done && (_s = _w.return)) _s.call(_w);
909
+ if (_1 && !_1.done && (_w = _0.return)) _w.call(_0);
910
910
  }
911
911
  finally { if (e_2) throw e_2.error; }
912
912
  }
913
913
  try {
914
914
  // Filter def
915
- for (var _y = __values(filterDefs || []), _z = _y.next(); !_z.done; _z = _y.next()) {
916
- var item = _z.value;
915
+ for (var _2 = __values(filterDefs || []), _3 = _2.next(); !_3.done; _3 = _2.next()) {
916
+ var item = _3.value;
917
917
  inlineFilterDef[item.sdTableFilterDef] = item === null || item === void 0 ? void 0 : item.defaultShowing;
918
918
  }
919
919
  }
920
920
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
921
921
  finally {
922
922
  try {
923
- if (_z && !_z.done && (_t = _y.return)) _t.call(_y);
923
+ if (_3 && !_3.done && (_x = _2.return)) _x.call(_2);
924
924
  }
925
925
  finally { if (e_3) throw e_3.error; }
926
926
  }
@@ -934,51 +934,55 @@
934
934
  };
935
935
  });
936
936
  _defaultValue.set(this, function (args) {
937
- var e_4, _r, e_5, _s, e_6, _t;
938
- var _a;
937
+ var e_4, _v, e_5, _w, e_6, _x;
938
+ var _a, _b, _c, _d, _e;
939
939
  var columnFilter = {};
940
940
  var externalFilter = {};
941
941
  var filterDef = {};
942
+ var columnOperator = {};
942
943
  var columns = args.columns, externalFilters = args.externalFilters, filterDefs = args.filterDefs;
943
944
  try {
944
945
  // Filter column
945
- for (var _u = __values(columns || []), _v = _u.next(); !_v.done; _v = _u.next()) {
946
- var item = _v.value;
946
+ for (var _y = __values(columns || []), _z = _y.next(); !_z.done; _z = _y.next()) {
947
+ var item = _z.value;
947
948
  columnFilter[item.field] = (_a = item === null || item === void 0 ? void 0 : item.filter) === null || _a === void 0 ? void 0 : _a.default;
949
+ if (((_c = (_b = item === null || item === void 0 ? void 0 : item.filter) === null || _b === void 0 ? void 0 : _b.operator) === null || _c === void 0 ? void 0 : _c.enable) && ((_e = (_d = item === null || item === void 0 ? void 0 : item.filter) === null || _d === void 0 ? void 0 : _d.operator) === null || _e === void 0 ? void 0 : _e.default)) {
950
+ columnOperator[item.field] = item.filter.operator.default;
951
+ }
948
952
  }
949
953
  }
950
954
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
951
955
  finally {
952
956
  try {
953
- if (_v && !_v.done && (_r = _u.return)) _r.call(_u);
957
+ if (_z && !_z.done && (_v = _y.return)) _v.call(_y);
954
958
  }
955
959
  finally { if (e_4) throw e_4.error; }
956
960
  }
957
961
  try {
958
962
  // Filter external
959
- for (var _w = __values(externalFilters || []), _x = _w.next(); !_x.done; _x = _w.next()) {
960
- var item = _x.value;
963
+ for (var _0 = __values(externalFilters || []), _1 = _0.next(); !_1.done; _1 = _0.next()) {
964
+ var item = _1.value;
961
965
  externalFilter[item.field] = item === null || item === void 0 ? void 0 : item.default;
962
966
  }
963
967
  }
964
968
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
965
969
  finally {
966
970
  try {
967
- if (_x && !_x.done && (_s = _w.return)) _s.call(_w);
971
+ if (_1 && !_1.done && (_w = _0.return)) _w.call(_0);
968
972
  }
969
973
  finally { if (e_5) throw e_5.error; }
970
974
  }
971
975
  try {
972
976
  // Filter def
973
- for (var _y = __values(filterDefs || []), _z = _y.next(); !_z.done; _z = _y.next()) {
974
- var item = _z.value;
977
+ for (var _2 = __values(filterDefs || []), _3 = _2.next(); !_3.done; _3 = _2.next()) {
978
+ var item = _3.value;
975
979
  filterDef[item.sdTableFilterDef] = undefined;
976
980
  }
977
981
  }
978
982
  catch (e_6_1) { e_6 = { error: e_6_1 }; }
979
983
  finally {
980
984
  try {
981
- if (_z && !_z.done && (_t = _y.return)) _t.call(_y);
985
+ if (_3 && !_3.done && (_x = _2.return)) _x.call(_2);
982
986
  }
983
987
  finally { if (e_6) throw e_6.error; }
984
988
  }
@@ -989,10 +993,12 @@
989
993
  externalFilter: externalFilter,
990
994
  // Filter def
991
995
  filterDef: filterDef,
996
+ // columnOperator
997
+ columnOperator: columnOperator,
992
998
  };
993
999
  });
994
1000
  _initConfiguration.set(this, function (args, configuration) {
995
- var e_7, _r, e_8, _s, e_9, _t;
1001
+ var e_7, _v, e_8, _w, e_9, _x;
996
1002
  var _a, _b, _c, _d, _e, _f, _g;
997
1003
  var columns = args.columns, externalFilters = args.externalFilters, filterDefs = args.filterDefs;
998
1004
  var inlineColumn = {};
@@ -1000,43 +1006,43 @@
1000
1006
  var inlineFilterDef = {};
1001
1007
  try {
1002
1008
  // Filter column
1003
- for (var _u = __values(columns || []), _v = _u.next(); !_v.done; _v = _u.next()) {
1004
- var item = _v.value;
1009
+ for (var _y = __values(columns || []), _z = _y.next(); !_z.done; _z = _y.next()) {
1010
+ var item = _z.value;
1005
1011
  inlineColumn[item.field] = (_b = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.inlineColumn) === null || _a === void 0 ? void 0 : _a[item.field]) !== null && _b !== void 0 ? _b : (_c = item === null || item === void 0 ? void 0 : item.filter) === null || _c === void 0 ? void 0 : _c.defaultShowing;
1006
1012
  }
1007
1013
  }
1008
1014
  catch (e_7_1) { e_7 = { error: e_7_1 }; }
1009
1015
  finally {
1010
1016
  try {
1011
- if (_v && !_v.done && (_r = _u.return)) _r.call(_u);
1017
+ if (_z && !_z.done && (_v = _y.return)) _v.call(_y);
1012
1018
  }
1013
1019
  finally { if (e_7) throw e_7.error; }
1014
1020
  }
1015
1021
  try {
1016
1022
  // Filter external
1017
- for (var _w = __values(externalFilters || []), _x = _w.next(); !_x.done; _x = _w.next()) {
1018
- var item = _x.value;
1023
+ for (var _0 = __values(externalFilters || []), _1 = _0.next(); !_1.done; _1 = _0.next()) {
1024
+ var item = _1.value;
1019
1025
  inlineExternal[item.field] = (_e = (_d = configuration === null || configuration === void 0 ? void 0 : configuration.inlineExternal) === null || _d === void 0 ? void 0 : _d[item.field]) !== null && _e !== void 0 ? _e : item === null || item === void 0 ? void 0 : item.defaultShowing;
1020
1026
  }
1021
1027
  }
1022
1028
  catch (e_8_1) { e_8 = { error: e_8_1 }; }
1023
1029
  finally {
1024
1030
  try {
1025
- if (_x && !_x.done && (_s = _w.return)) _s.call(_w);
1031
+ if (_1 && !_1.done && (_w = _0.return)) _w.call(_0);
1026
1032
  }
1027
1033
  finally { if (e_8) throw e_8.error; }
1028
1034
  }
1029
1035
  try {
1030
1036
  // Filter def
1031
- for (var _y = __values(filterDefs || []), _z = _y.next(); !_z.done; _z = _y.next()) {
1032
- var item = _z.value;
1037
+ for (var _2 = __values(filterDefs || []), _3 = _2.next(); !_3.done; _3 = _2.next()) {
1038
+ var item = _3.value;
1033
1039
  inlineFilterDef[item.sdTableFilterDef] = (_g = (_f = configuration === null || configuration === void 0 ? void 0 : configuration.inlineFilterDef) === null || _f === void 0 ? void 0 : _f[item.sdTableFilterDef]) !== null && _g !== void 0 ? _g : item === null || item === void 0 ? void 0 : item.defaultShowing;
1034
1040
  }
1035
1041
  }
1036
1042
  catch (e_9_1) { e_9 = { error: e_9_1 }; }
1037
1043
  finally {
1038
1044
  try {
1039
- if (_z && !_z.done && (_t = _y.return)) _t.call(_y);
1045
+ if (_3 && !_3.done && (_x = _2.return)) _x.call(_2);
1040
1046
  }
1041
1047
  finally { if (e_9) throw e_9.error; }
1042
1048
  }
@@ -1050,59 +1056,63 @@
1050
1056
  };
1051
1057
  });
1052
1058
  _initValue.set(this, function (args, value) {
1053
- var e_10, _r, e_11, _s, e_12, _t;
1054
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1059
+ var e_10, _v, e_11, _w, e_12, _x;
1060
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
1055
1061
  var columnFilter = {};
1056
1062
  var externalFilter = {};
1057
1063
  var filterDef = {};
1064
+ var columnOperator = {};
1058
1065
  var columns = args.columns, externalFilters = args.externalFilters, filterDefs = args.filterDefs;
1059
1066
  try {
1060
1067
  // Filter column
1061
- for (var _u = __values(columns || []), _v = _u.next(); !_v.done; _v = _u.next()) {
1062
- var item = _v.value;
1068
+ for (var _y = __values(columns || []), _z = _y.next(); !_z.done; _z = _y.next()) {
1069
+ var item = _z.value;
1063
1070
  columnFilter[item.field] = (_b = (_a = value === null || value === void 0 ? void 0 : value.columnFilter) === null || _a === void 0 ? void 0 : _a[item.field]) !== null && _b !== void 0 ? _b : (_c = item === null || item === void 0 ? void 0 : item.filter) === null || _c === void 0 ? void 0 : _c.default;
1071
+ if (((_e = (_d = item === null || item === void 0 ? void 0 : item.filter) === null || _d === void 0 ? void 0 : _d.operator) === null || _e === void 0 ? void 0 : _e.enable) && ((_g = (_f = item === null || item === void 0 ? void 0 : item.filter) === null || _f === void 0 ? void 0 : _f.operator) === null || _g === void 0 ? void 0 : _g.default)) {
1072
+ columnOperator[item.field] = item.filter.operator.default;
1073
+ }
1064
1074
  }
1065
1075
  }
1066
1076
  catch (e_10_1) { e_10 = { error: e_10_1 }; }
1067
1077
  finally {
1068
1078
  try {
1069
- if (_v && !_v.done && (_r = _u.return)) _r.call(_u);
1079
+ if (_z && !_z.done && (_v = _y.return)) _v.call(_y);
1070
1080
  }
1071
1081
  finally { if (e_10) throw e_10.error; }
1072
1082
  }
1073
1083
  try {
1074
1084
  // Filter external
1075
- for (var _w = __values(externalFilters || []), _x = _w.next(); !_x.done; _x = _w.next()) {
1076
- var item = _x.value;
1085
+ for (var _0 = __values(externalFilters || []), _1 = _0.next(); !_1.done; _1 = _0.next()) {
1086
+ var item = _1.value;
1077
1087
  if (item.type === 'daterange') {
1078
1088
  externalFilter[item.field] = {
1079
- from: (_f = (_e = (_d = value === null || value === void 0 ? void 0 : value.externalFilter) === null || _d === void 0 ? void 0 : _d[item.field]) === null || _e === void 0 ? void 0 : _e.from) !== null && _f !== void 0 ? _f : (_g = item.default) === null || _g === void 0 ? void 0 : _g.from,
1080
- to: (_k = (_j = (_h = value === null || value === void 0 ? void 0 : value.externalFilter) === null || _h === void 0 ? void 0 : _h[item.field]) === null || _j === void 0 ? void 0 : _j.to) !== null && _k !== void 0 ? _k : (_l = item.default) === null || _l === void 0 ? void 0 : _l.to,
1089
+ from: (_k = (_j = (_h = value === null || value === void 0 ? void 0 : value.externalFilter) === null || _h === void 0 ? void 0 : _h[item.field]) === null || _j === void 0 ? void 0 : _j.from) !== null && _k !== void 0 ? _k : (_l = item.default) === null || _l === void 0 ? void 0 : _l.from,
1090
+ to: (_p = (_o = (_m = value === null || value === void 0 ? void 0 : value.externalFilter) === null || _m === void 0 ? void 0 : _m[item.field]) === null || _o === void 0 ? void 0 : _o.to) !== null && _p !== void 0 ? _p : (_q = item.default) === null || _q === void 0 ? void 0 : _q.to,
1081
1091
  };
1082
1092
  }
1083
1093
  else {
1084
- externalFilter[item.field] = (_o = (_m = value === null || value === void 0 ? void 0 : value.externalFilter) === null || _m === void 0 ? void 0 : _m[item.field]) !== null && _o !== void 0 ? _o : item === null || item === void 0 ? void 0 : item.default;
1094
+ externalFilter[item.field] = (_s = (_r = value === null || value === void 0 ? void 0 : value.externalFilter) === null || _r === void 0 ? void 0 : _r[item.field]) !== null && _s !== void 0 ? _s : item === null || item === void 0 ? void 0 : item.default;
1085
1095
  }
1086
1096
  }
1087
1097
  }
1088
1098
  catch (e_11_1) { e_11 = { error: e_11_1 }; }
1089
1099
  finally {
1090
1100
  try {
1091
- if (_x && !_x.done && (_s = _w.return)) _s.call(_w);
1101
+ if (_1 && !_1.done && (_w = _0.return)) _w.call(_0);
1092
1102
  }
1093
1103
  finally { if (e_11) throw e_11.error; }
1094
1104
  }
1095
1105
  try {
1096
1106
  // Filter def
1097
- for (var _y = __values(filterDefs || []), _z = _y.next(); !_z.done; _z = _y.next()) {
1098
- var item = _z.value;
1099
- filterDef[item.sdTableFilterDef] = (_q = (_p = value === null || value === void 0 ? void 0 : value.filterDef) === null || _p === void 0 ? void 0 : _p[item.sdTableFilterDef]) !== null && _q !== void 0 ? _q : undefined;
1107
+ for (var _2 = __values(filterDefs || []), _3 = _2.next(); !_3.done; _3 = _2.next()) {
1108
+ var item = _3.value;
1109
+ filterDef[item.sdTableFilterDef] = (_u = (_t = value === null || value === void 0 ? void 0 : value.filterDef) === null || _t === void 0 ? void 0 : _t[item.sdTableFilterDef]) !== null && _u !== void 0 ? _u : undefined;
1100
1110
  }
1101
1111
  }
1102
1112
  catch (e_12_1) { e_12 = { error: e_12_1 }; }
1103
1113
  finally {
1104
1114
  try {
1105
- if (_z && !_z.done && (_t = _y.return)) _t.call(_y);
1115
+ if (_3 && !_3.done && (_x = _2.return)) _x.call(_2);
1106
1116
  }
1107
1117
  finally { if (e_12) throw e_12.error; }
1108
1118
  }
@@ -1113,6 +1123,8 @@
1113
1123
  externalFilter: externalFilter,
1114
1124
  // Filter def
1115
1125
  filterDef: filterDef,
1126
+ //column Operator
1127
+ columnOperator: columnOperator
1116
1128
  };
1117
1129
  });
1118
1130
  }
@@ -1327,23 +1339,29 @@
1327
1339
  pages: (_m = (_j = (_h = option === null || option === void 0 ? void 0 : option.paginate) === null || _h === void 0 ? void 0 : _h.pages) !== null && _j !== void 0 ? _j : (_l = (_k = _this.tableConfiguration) === null || _k === void 0 ? void 0 : _k.paginate) === null || _l === void 0 ? void 0 : _l.pages) !== null && _m !== void 0 ? _m : (_o = DEFAULT_TABLE_CONFIG.paginate) === null || _o === void 0 ? void 0 : _o.pages,
1328
1340
  showFirstLastButtons: (_q = (_p = option === null || option === void 0 ? void 0 : option.paginate) === null || _p === void 0 ? void 0 : _p.showFirstLastButtons) !== null && _q !== void 0 ? _q : false,
1329
1341
  };
1342
+ var _loop_1 = function (column) {
1343
+ if (((_s = (_r = column.filter) === null || _r === void 0 ? void 0 : _r.operator) === null || _s === void 0 ? void 0 : _s.enable) && !((_v = (_u = (_t = column.filter) === null || _t === void 0 ? void 0 : _t.operator) === null || _u === void 0 ? void 0 : _u.list) === null || _v === void 0 ? void 0 : _v.length)) {
1344
+ if (column.type === 'string') {
1345
+ column.filter.operator.list = ((_y = (_x = (_w = _this.tableConfiguration) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.operator) === null || _y === void 0 ? void 0 : _y.defaultListString) || [];
1346
+ }
1347
+ if (column.type === 'number') {
1348
+ column.filter.operator.list = ((_1 = (_0 = (_z = _this.tableConfiguration) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.operator) === null || _1 === void 0 ? void 0 : _1.defaultListNumber) || [];
1349
+ }
1350
+ if (column.type === 'values' || column.type === 'lazy-values') {
1351
+ column.filter.operator.list = ((_4 = (_3 = (_2 = _this.tableConfiguration) === null || _2 === void 0 ? void 0 : _2.filter) === null || _3 === void 0 ? void 0 : _3.operator) === null || _4 === void 0 ? void 0 : _4.defaultListValues) || [];
1352
+ }
1353
+ if (column.type === 'date' || column.type === 'datetime') {
1354
+ column.filter.operator.list = ((_7 = (_6 = (_5 = _this.tableConfiguration) === null || _5 === void 0 ? void 0 : _5.filter) === null || _6 === void 0 ? void 0 : _6.operator) === null || _7 === void 0 ? void 0 : _7.defaultListDate) || [];
1355
+ }
1356
+ if (column.filter.operator.default && column.filter.operator.list.some(function (el) { return el === column.filter.operator.default; })) {
1357
+ _this.columnOperator[column.field] = column.filter.operator.default;
1358
+ }
1359
+ }
1360
+ };
1330
1361
  try {
1331
1362
  for (var _9 = __values(option.columns || []), _10 = _9.next(); !_10.done; _10 = _9.next()) {
1332
1363
  var column = _10.value;
1333
- if (((_s = (_r = column.filter) === null || _r === void 0 ? void 0 : _r.operator) === null || _s === void 0 ? void 0 : _s.enable) && !((_v = (_u = (_t = column.filter) === null || _t === void 0 ? void 0 : _t.operator) === null || _u === void 0 ? void 0 : _u.list) === null || _v === void 0 ? void 0 : _v.length)) {
1334
- if (column.type === 'string') {
1335
- column.filter.operator.list = ((_y = (_x = (_w = _this.tableConfiguration) === null || _w === void 0 ? void 0 : _w.filter) === null || _x === void 0 ? void 0 : _x.operator) === null || _y === void 0 ? void 0 : _y.defaultListString) || [];
1336
- }
1337
- if (column.type === 'number') {
1338
- column.filter.operator.list = ((_1 = (_0 = (_z = _this.tableConfiguration) === null || _z === void 0 ? void 0 : _z.filter) === null || _0 === void 0 ? void 0 : _0.operator) === null || _1 === void 0 ? void 0 : _1.defaultListNumber) || [];
1339
- }
1340
- if (column.type === 'values' || column.type === 'lazy-values') {
1341
- column.filter.operator.list = ((_4 = (_3 = (_2 = _this.tableConfiguration) === null || _2 === void 0 ? void 0 : _2.filter) === null || _3 === void 0 ? void 0 : _3.operator) === null || _4 === void 0 ? void 0 : _4.defaultListValues) || [];
1342
- }
1343
- if (column.type === 'date' || column.type === 'datetime') {
1344
- column.filter.operator.list = ((_7 = (_6 = (_5 = _this.tableConfiguration) === null || _5 === void 0 ? void 0 : _5.filter) === null || _6 === void 0 ? void 0 : _6.operator) === null || _7 === void 0 ? void 0 : _7.defaultListDate) || [];
1345
- }
1346
- }
1364
+ _loop_1(column);
1347
1365
  }
1348
1366
  }
1349
1367
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
@@ -1391,7 +1409,7 @@
1391
1409
  var e_5, _8;
1392
1410
  var _a, _b, _c, _d, _e, _f;
1393
1411
  var item = tableItem.data;
1394
- var _loop_1 = function (column) {
1412
+ var _loop_2 = function (column) {
1395
1413
  var field = column.field, type = column.type;
1396
1414
  var filterValue = (rawColumnFilter[field] || '').toString().trim().toLowerCase();
1397
1415
  var columnValue = (item[field] || '').toString().trim().toLowerCase();
@@ -1477,7 +1495,7 @@
1477
1495
  try {
1478
1496
  for (var columns_1 = __values(columns), columns_1_1 = columns_1.next(); !columns_1_1.done; columns_1_1 = columns_1.next()) {
1479
1497
  var column = columns_1_1.value;
1480
- var state_1 = _loop_1(column);
1498
+ var state_1 = _loop_2(column);
1481
1499
  if (typeof state_1 === "object")
1482
1500
  return state_1.value;
1483
1501
  }
@@ -1729,7 +1747,7 @@
1729
1747
  items_1 = [];
1730
1748
  promises_1 = [];
1731
1749
  handleData = function () { return __awaiter(_this, void 0, void 0, function () {
1732
- var _u, results, results_1, results_1_1, result, results_2, totalPage, percent, allColumns, allExportedColumns, _loop_2, exportItems_2, exportItems_2_1, item, e_7_1;
1750
+ var _u, results, results_1, results_1_1, result, results_2, totalPage, percent, allColumns, allExportedColumns, _loop_3, exportItems_2, exportItems_2_1, item, e_7_1;
1733
1751
  var e_8, _8, e_7, _9;
1734
1752
  var _this = this;
1735
1753
  return __generator(this, function (_10) {
@@ -1774,7 +1792,7 @@
1774
1792
  this.exportTitle = "Exporting..." + percent + "%";
1775
1793
  allColumns = __classPrivateFieldGet(this, _allColumns).call(this);
1776
1794
  allExportedColumns = __classPrivateFieldGet(this, _allExportedColumns).call(this);
1777
- _loop_2 = function (item) {
1795
+ _loop_3 = function (item) {
1778
1796
  var obj, handle, columns_3, columns_3_1, exportColumn, e_9_1;
1779
1797
  var e_9, _8;
1780
1798
  return __generator(this, function (_9) {
@@ -1913,7 +1931,7 @@
1913
1931
  case 6:
1914
1932
  if (!!exportItems_2_1.done) return [3 /*break*/, 9];
1915
1933
  item = exportItems_2_1.value;
1916
- return [5 /*yield**/, _loop_2(item)];
1934
+ return [5 /*yield**/, _loop_3(item)];
1917
1935
  case 7:
1918
1936
  _10.sent();
1919
1937
  _10.label = 8;
@@ -2164,13 +2182,13 @@
2164
2182
  };
2165
2183
  this.detectChanges = function () { return _this.ref.detectChanges(); };
2166
2184
  _loadValues.set(this, function (columns) { return __awaiter(_this, void 0, void 0, function () {
2167
- var promises, _loop_3, this_1, columns_5, columns_5_1, column, results, _loop_4, this_2, results_3, results_3_1, result;
2185
+ var promises, _loop_4, this_1, columns_5, columns_5_1, column, results, _loop_5, this_2, results_3, results_3_1, result;
2168
2186
  var e_10, _8, e_11, _9;
2169
2187
  return __generator(this, function (_10) {
2170
2188
  switch (_10.label) {
2171
2189
  case 0:
2172
2190
  promises = [];
2173
- _loop_3 = function (column) {
2191
+ _loop_4 = function (column) {
2174
2192
  if (column.type === 'values' && !this_1.cacheValues[column.field]) {
2175
2193
  if (typeof column.option.items === 'function') {
2176
2194
  promises.push(column.option
@@ -2207,7 +2225,7 @@
2207
2225
  try {
2208
2226
  for (columns_5 = __values(columns), columns_5_1 = columns_5.next(); !columns_5_1.done; columns_5_1 = columns_5.next()) {
2209
2227
  column = columns_5_1.value;
2210
- _loop_3(column);
2228
+ _loop_4(column);
2211
2229
  }
2212
2230
  }
2213
2231
  catch (e_10_1) { e_10 = { error: e_10_1 }; }
@@ -2221,7 +2239,7 @@
2221
2239
  return [4 /*yield*/, Promise.all(promises)];
2222
2240
  case 1:
2223
2241
  results = _10.sent();
2224
- _loop_4 = function (result) {
2242
+ _loop_5 = function (result) {
2225
2243
  this_2.cacheValues[result.key] = result.data.map(function (e) {
2226
2244
  var _8;
2227
2245
  return (_8 = {},
@@ -2235,7 +2253,7 @@
2235
2253
  try {
2236
2254
  for (results_3 = __values(results), results_3_1 = results_3.next(); !results_3_1.done; results_3_1 = results_3.next()) {
2237
2255
  result = results_3_1.value;
2238
- _loop_4(result);
2256
+ _loop_5(result);
2239
2257
  }
2240
2258
  }
2241
2259
  catch (e_11_1) { e_11 = { error: e_11_1 }; }
@@ -2251,15 +2269,15 @@
2251
2269
  });
2252
2270
  }); });
2253
2271
  _format.set(this, function (rawItems, columns) { return __awaiter(_this, void 0, void 0, function () {
2254
- var _5, _6, _7, items, _loop_5, this_3, columns_6, columns_6_1, column, e_12_1;
2272
+ var _5, _6, _7, items, _loop_6, this_3, columns_6, columns_6_1, column, e_12_1;
2255
2273
  var e_12, _8;
2256
2274
  var _this = this;
2257
2275
  return __generator(this, function (_9) {
2258
2276
  switch (_9.label) {
2259
2277
  case 0:
2260
2278
  items = rawItems.map(MapToSdTableItem);
2261
- _loop_5 = function (column) {
2262
- var field, cellStyle, click, tooltip, htmlTemplate, transform, _8, views, mapValue_1, values_1, lazyItems, _loop_6, items_2, items_2_1, item, e_13_1;
2279
+ _loop_6 = function (column) {
2280
+ var field, cellStyle, click, tooltip, htmlTemplate, transform, _8, views, mapValue_1, values_1, lazyItems, _loop_7, items_2, items_2_1, item, e_13_1;
2263
2281
  var e_13, _9;
2264
2282
  return __generator(this, function (_10) {
2265
2283
  switch (_10.label) {
@@ -2298,7 +2316,7 @@
2298
2316
  Object.assign(__classPrivateFieldGet(this_3, _cacheObjValues)[field], Array.toObject(lazyItems, column.option.valueField) || {});
2299
2317
  _10.label = 2;
2300
2318
  case 2:
2301
- _loop_6 = function (item) {
2319
+ _loop_7 = function (item) {
2302
2320
  var rowData, value, display, newValue, _8, date, time, val, vals, vals, option;
2303
2321
  return __generator(this, function (_9) {
2304
2322
  switch (_9.label) {
@@ -2402,7 +2420,7 @@
2402
2420
  case 4:
2403
2421
  if (!!items_2_1.done) return [3 /*break*/, 7];
2404
2422
  item = items_2_1.value;
2405
- return [5 /*yield**/, _loop_6(item)];
2423
+ return [5 /*yield**/, _loop_7(item)];
2406
2424
  case 5:
2407
2425
  _10.sent();
2408
2426
  _10.label = 6;
@@ -2433,7 +2451,7 @@
2433
2451
  case 2:
2434
2452
  if (!!columns_6_1.done) return [3 /*break*/, 5];
2435
2453
  column = columns_6_1.value;
2436
- return [5 /*yield**/, _loop_5(column)];
2454
+ return [5 /*yield**/, _loop_6(column)];
2437
2455
  case 3:
2438
2456
  _9.sent();
2439
2457
  _9.label = 4;
@@ -2604,7 +2622,7 @@
2604
2622
  SdTable.decorators = [
2605
2623
  { type: core.Component, args: [{
2606
2624
  selector: 'sd-table',
2607
- template: "<ng-container *ngIf=\"configuration\">\r\n <sd-table-filter\r\n *ngIf=\"!tableOption.filter?.disabled && filterRegister\"\r\n [filterRegister]=\"filterRegister\"\r\n [filter]=\"tableOption?.filter\"\r\n [columns]=\"configuration.firstColumns\"\r\n [externalFilters]=\"tableOption?.filter?.externalFilters\"\r\n [filterDefs]=\"filterDefs\">\r\n </sd-table-filter>\r\n <ng-container *ngIf=\"items | sdGroup : tableOption; $implicit as groupedItems\">\r\n <div class=\"c-container\">\r\n <div class=\"c-loading\" *ngIf=\"isLoading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <ng-container>\r\n <div\r\n class=\"c-table\"\r\n sdScroll\r\n [ngStyle]=\"{\r\n 'max-height': tableOption?.style?.maxHeight,\r\n 'min-height': tableOption?.style?.minHeight\r\n }\">\r\n <table mat-table [dataSource]=\"groupedItems\" [trackBy]=\"trackBy\" matSort [matSortDisabled]=\"!tableOption.sort?.enable\" multiTemplateDataRows>\r\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <ng-container *ngIf=\"sdSubInformation?.templateRef\">\r\n <ng-container *ngIf=\"tableOption?.expand?.always; else useExpandCollapse\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n <ng-template #useExpandCollapse>\r\n <div [@detailExpand]=\"item.isExpanded ? 'expanded' : 'collapsed'\">\r\n <ng-container *ngIf=\"item.isExpanded\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\r\n <th\r\n class=\"p-0\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button\r\n *ngIf=\"!element.isExpanding && !tableOption?.expand?.always\"\r\n mat-icon-button\r\n aria-label=\"Expand & Collapse\"\r\n (click)=\"onExpand(element)\">\r\n <mat-icon *ngIf=\"!element.isExpanded\">expand_more</mat-icon>\r\n <mat-icon *ngIf=\"element.isExpanded\">expand_less</mat-icon>\r\n </button>\r\n <div *ngIf=\"element.isExpanding\" class=\"lds-ring\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th\r\n class=\"text-center px-15\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <ng-container *ngIf=\"items | selectionVisibleSelectAll : tableOption?.selector | async\">\r\n <mat-checkbox\r\n *ngIf=\"!tableOption.selector?.single\"\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"isSelectAll\"\r\n (change)=\"onSelectAll()\">\r\n </mat-checkbox>\r\n </ng-container>\r\n </th>\r\n <td class=\"text-center px-15\" mat-cell *matCellDef=\"let item\" style=\"min-width: 50px; max-width: 50px\">\r\n <ng-container *ngIf=\"item | selectionVisible : tableOption?.selector\">\r\n <mat-checkbox\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"item.meta.selector.isSelected\"\r\n (change)=\"onSelect(item)\"\r\n [disabled]=\"selectedTableItems | selectionDisable : item : tableOption?.selector\">\r\n </mat-checkbox>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\">\r\n <th\r\n class=\"px-8 py-8\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-command [commands]=\"tableOption.commands\" [item]=\"item\"></sd-desktop-command>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdGroup\">\r\n <th mat-header-cell *matHeaderCellDef class=\"px-8 py-8\" [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"!item?.sdGroup ? 1 : configuration.displayedColumns.length\">\r\n <div [innerHtml]=\"item?.sdGroup?.htmlTemplate | safeHtml\"></div>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container\r\n *ngFor=\"let column of configuration.firstColumns;\"\r\n [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n class=\"px-8 py-8 c-th\"\r\n [ngStyle]=\"{ 'min-width': column.width }\"\r\n [attr.rowspan]=\"configuration.multipleHeader && column.type !== 'children-col' ? 2 : 1\"\r\n [attr.colspan]=\"column.type === 'children-col' ? column.children?.length : 1\">\r\n <div>\r\n <div\r\n aria-hidden=\"true\"\r\n mat-sort-header\r\n [disabled]=\"!column.sortable || column.type === 'children-col'\"\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"!tableOption.filter?.disabled && !tableOption.filter?.hideInlineFilter && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n (operatorChange)=\"onOperatorChange(column, $event)\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n *ngIf=\"!item?.sdGroup\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [cellDef]=\"cellDef\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"c-th px-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"!tableOption.filter?.disabled && !tableOption.filter?.hideInlineFilter && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n (operatorChange)=\"onOperatorChange(column, $event)\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [cellDef]=\"cellDef\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\"></tr>\r\n <ng-container *ngIf=\"configuration.secondHeaders?.length\">\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\"></tr>\r\n </ng-container>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: configuration.displayedColumns\"\r\n matRipple\r\n class=\"c-row\"\r\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\r\n\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']\" class=\"c-detail-row\"></tr>\r\n <ng-container *ngIf=\"hasFooter && configuration.displayedFooters?.length\">\r\n <tr mat-footer-row *matFooterRowDef=\"configuration.displayedFooters; sticky: true\"></tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-paginator\">\r\n <div class=\"c-action\">\r\n <sd-button\r\n *ngIf=\"tableOption.reload?.visible\"\r\n class=\"mr-8\"\r\n title=\"T\u1EA3i l\u1EA1i\"\r\n icon=\"refresh\"\r\n size=\"sm\"\r\n (action)=\"reload()\"\r\n [disabled]=\"!items?.length\"\r\n type=\"link\">\r\n </sd-button>\r\n <ng-container *ngIf=\"tableOption.export?.visible && items?.length\">\r\n <ng-container *ngIf=\"isExporting; else unExporting\">\r\n <sd-button class=\"mr-10\" [loading]=\"isExporting\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\" type=\"link\">\r\n </sd-button>\r\n </ng-container>\r\n <ng-template #unExporting>\r\n <sd-button class=\"mr-10\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\" [matMenuTriggerFor]=\"menu\" type=\"link\">\r\n </sd-button>\r\n </ng-template>\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=\"exportExcel()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t excel</span>\r\n </button>\r\n <button mat-menu-item (click)=\"exportCSV()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t CSV</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button\r\n *ngIf=\"popupConfiguration\"\r\n class=\"mr-8\"\r\n [title]=\"'Configure' | sdTranslate\"\r\n icon=\"settings\"\r\n size=\"sm\"\r\n (action)=\"popupConfiguration.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n </div>\r\n <mat-paginator\r\n [class.d-none]=\"tableOption.paginate?.hidden\"\r\n [length]=\"total\"\r\n [pageSize]=\"tableOption.paginate?.pageSize\"\r\n [pageSizeOptions]=\"tableOption.paginate?.pages\"\r\n [showFirstLastButtons]=\"tableOption.paginate?.showFirstLastButtons\"></mat-paginator>\r\n </div>\r\n </div>\r\n <sd-table-quick-action [tableOption]=\"tableOption\" [selectedTableItems]=\"selectedTableItems\" (clear)=\"onClearSelection(groupedItems)\">\r\n </sd-table-quick-action>\r\n <sd-popup-configuration *ngIf=\"tableOption?.key && tableOption.config?.visible\" [tableOption]=\"tableOption\"> </sd-popup-configuration>\r\n </ng-container>\r\n</ng-container>\r\n",
2625
+ template: "<ng-container *ngIf=\"configuration\">\r\n <sd-table-filter\r\n *ngIf=\"!tableOption.filter?.disabled && filterRegister\"\r\n [filterRegister]=\"filterRegister\"\r\n [filter]=\"tableOption?.filter\"\r\n [columns]=\"configuration.firstColumns\"\r\n [externalFilters]=\"tableOption?.filter?.externalFilters\"\r\n [filterDefs]=\"filterDefs\">\r\n </sd-table-filter>\r\n <ng-container *ngIf=\"items | sdGroup : tableOption; $implicit as groupedItems\">\r\n <div class=\"c-container\">\r\n <div class=\"c-loading\" *ngIf=\"isLoading\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n <ng-container>\r\n <div\r\n class=\"c-table\"\r\n sdScroll\r\n [ngStyle]=\"{\r\n 'max-height': tableOption?.style?.maxHeight,\r\n 'min-height': tableOption?.style?.minHeight\r\n }\">\r\n <table mat-table [dataSource]=\"groupedItems\" [trackBy]=\"trackBy\" matSort [matSortDisabled]=\"!tableOption.sort?.enable\" multiTemplateDataRows>\r\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"configuration.displayedColumns.length\">\r\n <ng-container *ngIf=\"sdSubInformation?.templateRef\">\r\n <ng-container *ngIf=\"tableOption?.expand?.always; else useExpandCollapse\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n <ng-template #useExpandCollapse>\r\n <div [@detailExpand]=\"item.isExpanded ? 'expanded' : 'collapsed'\">\r\n <ng-container *ngIf=\"item.isExpanded\">\r\n <ng-container *ngTemplateOutlet=\"sdSubInformation.templateRef; context: { item: item }\"> </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\r\n <th\r\n class=\"p-0\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 1px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button\r\n *ngIf=\"!element.isExpanding && !tableOption?.expand?.always\"\r\n mat-icon-button\r\n aria-label=\"Expand & Collapse\"\r\n (click)=\"onExpand(element)\">\r\n <mat-icon *ngIf=\"!element.isExpanded\">expand_more</mat-icon>\r\n <mat-icon *ngIf=\"element.isExpanded\">expand_less</mat-icon>\r\n </button>\r\n <div *ngIf=\"element.isExpanding\" class=\"lds-ring\">\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n <div></div>\r\n </div>\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdSelection\" sticky>\r\n <th\r\n class=\"text-center px-15\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"min-width: 50px; max-width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\">\r\n <ng-container *ngIf=\"items | selectionVisibleSelectAll : tableOption?.selector | async\">\r\n <mat-checkbox\r\n *ngIf=\"!tableOption.selector?.single\"\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"isSelectAll\"\r\n (change)=\"onSelectAll()\">\r\n </mat-checkbox>\r\n </ng-container>\r\n </th>\r\n <td class=\"text-center px-15\" mat-cell *matCellDef=\"let item\" style=\"min-width: 50px; max-width: 50px\">\r\n <ng-container *ngIf=\"item | selectionVisible : tableOption?.selector\">\r\n <mat-checkbox\r\n class=\"c-selection\"\r\n color=\"primary\"\r\n [(ngModel)]=\"item.meta.selector.isSelected\"\r\n (change)=\"onSelect(item)\"\r\n [disabled]=\"selectedTableItems | selectionDisable : item : tableOption?.selector\">\r\n </mat-checkbox>\r\n </ng-container>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdCommand\" sticky>\r\n <th\r\n class=\"px-8 py-8\"\r\n mat-header-cell\r\n *matHeaderCellDef\r\n style=\"width: 50px\"\r\n [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"px-8\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-command [commands]=\"tableOption.commands\" [item]=\"item\"></sd-desktop-command>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"sdGroup\">\r\n <th mat-header-cell *matHeaderCellDef class=\"px-8 py-8\" [attr.rowspan]=\"configuration.multipleHeader ? 2 : 1\"></th>\r\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"!item?.sdGroup ? 1 : configuration.displayedColumns.length\">\r\n <div [innerHtml]=\"item?.sdGroup?.htmlTemplate | safeHtml\"></div>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef></td>\r\n </ng-container>\r\n <ng-container\r\n *ngFor=\"let column of configuration.firstColumns;\"\r\n [matColumnDef]=\"column.field\"\r\n [sticky]=\"configuration.fixedColumn[column.field]\">\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n class=\"px-8 py-8 c-th\"\r\n [ngStyle]=\"{ 'min-width': column.width }\"\r\n [attr.rowspan]=\"configuration.multipleHeader && column.type !== 'children-col' ? 2 : 1\"\r\n [attr.colspan]=\"column.type === 'children-col' ? column.children?.length : 1\">\r\n <div>\r\n <div\r\n aria-hidden=\"true\"\r\n mat-sort-header\r\n [disabled]=\"!column.sortable || column.type === 'children-col'\"\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"!tableOption.filter?.disabled && !tableOption.filter?.hideInlineFilter && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n (operatorChange)=\"onOperatorChange(column, $event)\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n *ngIf=\"!item?.sdGroup\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [cellDef]=\"cellDef\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <ng-container *ngFor=\"let column of configuration.secondColumns\" [matColumnDef]=\"column.field\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header class=\"c-th px-8\" [ngStyle]=\"{ 'min-width': column.width }\">\r\n <div>\r\n <div\r\n [class.text-right]=\"column.align === 'right' || (!column.align && column.type === 'number')\"\r\n [class.text-center]=\"column.align === 'center'\"\r\n [innerHTML]=\"column.titleHtml || column.title\"></div>\r\n <sd-column-inline-filter\r\n *ngIf=\"!tableOption.filter?.disabled && !tableOption.filter?.hideInlineFilter && columnOperator\"\r\n [value]=\"columnFilter[column.field]\"\r\n [(inlineOperator)]=\"columnOperator[column.field]\"\r\n (operatorChange)=\"onOperatorChange(column, $event)\"\r\n [columnFilter]=\"columnFilter\"\r\n [cacheValues]=\"cacheValues\"\r\n [column]=\"column\"\r\n (filterChange)=\"onFilterChange()\">\r\n </sd-column-inline-filter>\r\n </div>\r\n </th>\r\n <td class=\"c-td px-0\" mat-cell *matCellDef=\"let item\">\r\n <sd-desktop-cell\r\n class=\"d-block px-8\"\r\n [value]=\"item[column.field]\"\r\n [column]=\"column\"\r\n [item]=\"item\"\r\n [cellDef]=\"cellDef\">\r\n </sd-desktop-cell>\r\n </td>\r\n <td mat-footer-cell *matFooterCellDef>\r\n <ng-container *ngIf=\"footerDef[column.field]\">\r\n <ng-container *ngTemplateOutlet=\"footerDef[column.field].templateRef; context: { items: items, column: column }\">\r\n </ng-container>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"configuration.firstHeaders; sticky: true\"></tr>\r\n <ng-container *ngIf=\"configuration.secondHeaders?.length\">\r\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"configuration.secondHeaders; sticky: true\"></tr>\r\n </ng-container>\r\n <tr\r\n mat-row\r\n *matRowDef=\"let row; columns: configuration.displayedColumns\"\r\n matRipple\r\n class=\"c-row\"\r\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\r\n\r\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']\" class=\"c-detail-row\"></tr>\r\n <ng-container *ngIf=\"hasFooter && configuration.displayedFooters?.length\">\r\n <tr mat-footer-row *matFooterRowDef=\"configuration.displayedFooters; sticky: true\"></tr>\r\n </ng-container>\r\n </table>\r\n </div>\r\n </ng-container>\r\n <div class=\"c-paginator\">\r\n <div class=\"c-action\">\r\n <sd-button\r\n *ngIf=\"tableOption.reload?.visible\"\r\n class=\"mr-8\"\r\n title=\"T\u1EA3i l\u1EA1i\"\r\n icon=\"refresh\"\r\n size=\"sm\"\r\n (action)=\"reload()\"\r\n [disabled]=\"!items?.length\"\r\n type=\"link\">\r\n </sd-button>\r\n <ng-container *ngIf=\"tableOption.export?.visible && items?.length\">\r\n <ng-container *ngIf=\"isExporting; else unExporting\">\r\n <sd-button class=\"mr-10\" [loading]=\"isExporting\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\" type=\"link\">\r\n </sd-button>\r\n </ng-container>\r\n <ng-template #unExporting>\r\n <sd-button class=\"mr-10\" [title]=\"exportTitle | sdTranslate\" icon=\"get_app\" size=\"sm\" [matMenuTriggerFor]=\"menu\" type=\"link\">\r\n </sd-button>\r\n </ng-template>\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item (click)=\"exportExcel()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t excel</span>\r\n </button>\r\n <button mat-menu-item (click)=\"exportCSV()\" type=\"button\">\r\n <mat-icon fontSet=\"material-icons-outlined\">file_download</mat-icon>\r\n <span> Xu\u1EA5t CSV</span>\r\n </button>\r\n </mat-menu>\r\n </ng-container>\r\n <sd-button\r\n *ngIf=\"popupConfiguration\"\r\n class=\"mr-8\"\r\n [title]=\"'Configure' | sdTranslate\"\r\n icon=\"settings\"\r\n size=\"sm\"\r\n (action)=\"popupConfiguration.open()\"\r\n type=\"link\">\r\n </sd-button>\r\n </div>\r\n <mat-paginator\r\n [class.d-none]=\"tableOption.paginate?.hidden\"\r\n [length]=\"total\"\r\n [pageSize]=\"tableOption.paginate?.pageSize\"\r\n [pageSizeOptions]=\"tableOption.paginate?.pages\"\r\n [showFirstLastButtons]=\"tableOption.paginate?.showFirstLastButtons\"></mat-paginator>\r\n </div>\r\n </div>\r\n <sd-table-quick-action [tableOption]=\"tableOption\" [selectedTableItems]=\"selectedTableItems\" (clear)=\"onClearSelection(groupedItems)\">\r\n </sd-table-quick-action>\r\n <sd-popup-configuration *ngIf=\"tableOption?.key && tableOption.config?.visible\" [tableOption]=\"tableOption\"> </sd-popup-configuration>\r\n </ng-container>\r\n</ng-container>\r\n",
2608
2626
  changeDetection: core.ChangeDetectionStrategy.OnPush,
2609
2627
  animations: [
2610
2628
  animations.trigger('detailExpand', [