shared.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. "use strict";
  2. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  3. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  4. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  5. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  6. return c > 3 && r && Object.defineProperty(target, key, r), r;
  7. };
  8. var __metadata = (this && this.__metadata) || function (k, v) {
  9. if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
  10. };
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var core_1 = require("@angular/core");
  13. var common_1 = require("@angular/common");
  14. var core_2 = require("@angular/core");
  15. var Header = /** @class */ (function () {
  16. function Header() {
  17. }
  18. Header = __decorate([
  19. core_2.Component({
  20. selector: 'p-header',
  21. template: '<ng-content></ng-content>'
  22. })
  23. ], Header);
  24. return Header;
  25. }());
  26. exports.Header = Header;
  27. var Footer = /** @class */ (function () {
  28. function Footer() {
  29. }
  30. Footer = __decorate([
  31. core_2.Component({
  32. selector: 'p-footer',
  33. template: '<ng-content></ng-content>'
  34. })
  35. ], Footer);
  36. return Footer;
  37. }());
  38. exports.Footer = Footer;
  39. var PrimeTemplate = /** @class */ (function () {
  40. function PrimeTemplate(template) {
  41. this.template = template;
  42. }
  43. PrimeTemplate.prototype.getType = function () {
  44. return this.name;
  45. };
  46. __decorate([
  47. core_1.Input(),
  48. __metadata("design:type", String)
  49. ], PrimeTemplate.prototype, "type", void 0);
  50. __decorate([
  51. core_1.Input('pTemplate'),
  52. __metadata("design:type", String)
  53. ], PrimeTemplate.prototype, "name", void 0);
  54. PrimeTemplate = __decorate([
  55. core_1.Directive({
  56. selector: '[pTemplate]',
  57. host: {}
  58. }),
  59. __metadata("design:paramtypes", [core_1.TemplateRef])
  60. ], PrimeTemplate);
  61. return PrimeTemplate;
  62. }());
  63. exports.PrimeTemplate = PrimeTemplate;
  64. /* Deprecated */
  65. var Column = /** @class */ (function () {
  66. function Column() {
  67. this.filterType = 'text';
  68. this.exportable = true;
  69. this.resizable = true;
  70. this.sortFunction = new core_1.EventEmitter();
  71. }
  72. Column.prototype.ngAfterContentInit = function () {
  73. var _this = this;
  74. this.templates.forEach(function (item) {
  75. switch (item.getType()) {
  76. case 'header':
  77. _this.headerTemplate = item.template;
  78. break;
  79. case 'body':
  80. _this.bodyTemplate = item.template;
  81. break;
  82. case 'footer':
  83. _this.footerTemplate = item.template;
  84. break;
  85. case 'filter':
  86. _this.filterTemplate = item.template;
  87. break;
  88. case 'editor':
  89. _this.editorTemplate = item.template;
  90. break;
  91. default:
  92. _this.bodyTemplate = item.template;
  93. break;
  94. }
  95. });
  96. };
  97. __decorate([
  98. core_1.Input(),
  99. __metadata("design:type", String)
  100. ], Column.prototype, "field", void 0);
  101. __decorate([
  102. core_1.Input(),
  103. __metadata("design:type", String)
  104. ], Column.prototype, "colId", void 0);
  105. __decorate([
  106. core_1.Input(),
  107. __metadata("design:type", String)
  108. ], Column.prototype, "sortField", void 0);
  109. __decorate([
  110. core_1.Input(),
  111. __metadata("design:type", String)
  112. ], Column.prototype, "filterField", void 0);
  113. __decorate([
  114. core_1.Input(),
  115. __metadata("design:type", String)
  116. ], Column.prototype, "header", void 0);
  117. __decorate([
  118. core_1.Input(),
  119. __metadata("design:type", String)
  120. ], Column.prototype, "footer", void 0);
  121. __decorate([
  122. core_1.Input(),
  123. __metadata("design:type", Object)
  124. ], Column.prototype, "sortable", void 0);
  125. __decorate([
  126. core_1.Input(),
  127. __metadata("design:type", Boolean)
  128. ], Column.prototype, "editable", void 0);
  129. __decorate([
  130. core_1.Input(),
  131. __metadata("design:type", Boolean)
  132. ], Column.prototype, "filter", void 0);
  133. __decorate([
  134. core_1.Input(),
  135. __metadata("design:type", String)
  136. ], Column.prototype, "filterMatchMode", void 0);
  137. __decorate([
  138. core_1.Input(),
  139. __metadata("design:type", String)
  140. ], Column.prototype, "filterType", void 0);
  141. __decorate([
  142. core_1.Input(),
  143. __metadata("design:type", Boolean)
  144. ], Column.prototype, "excludeGlobalFilter", void 0);
  145. __decorate([
  146. core_1.Input(),
  147. __metadata("design:type", Number)
  148. ], Column.prototype, "rowspan", void 0);
  149. __decorate([
  150. core_1.Input(),
  151. __metadata("design:type", Number)
  152. ], Column.prototype, "colspan", void 0);
  153. __decorate([
  154. core_1.Input(),
  155. __metadata("design:type", String)
  156. ], Column.prototype, "scope", void 0);
  157. __decorate([
  158. core_1.Input(),
  159. __metadata("design:type", Object)
  160. ], Column.prototype, "style", void 0);
  161. __decorate([
  162. core_1.Input(),
  163. __metadata("design:type", String)
  164. ], Column.prototype, "styleClass", void 0);
  165. __decorate([
  166. core_1.Input(),
  167. __metadata("design:type", Boolean)
  168. ], Column.prototype, "exportable", void 0);
  169. __decorate([
  170. core_1.Input(),
  171. __metadata("design:type", Object)
  172. ], Column.prototype, "headerStyle", void 0);
  173. __decorate([
  174. core_1.Input(),
  175. __metadata("design:type", String)
  176. ], Column.prototype, "headerStyleClass", void 0);
  177. __decorate([
  178. core_1.Input(),
  179. __metadata("design:type", Object)
  180. ], Column.prototype, "bodyStyle", void 0);
  181. __decorate([
  182. core_1.Input(),
  183. __metadata("design:type", String)
  184. ], Column.prototype, "bodyStyleClass", void 0);
  185. __decorate([
  186. core_1.Input(),
  187. __metadata("design:type", Object)
  188. ], Column.prototype, "footerStyle", void 0);
  189. __decorate([
  190. core_1.Input(),
  191. __metadata("design:type", String)
  192. ], Column.prototype, "footerStyleClass", void 0);
  193. __decorate([
  194. core_1.Input(),
  195. __metadata("design:type", Boolean)
  196. ], Column.prototype, "hidden", void 0);
  197. __decorate([
  198. core_1.Input(),
  199. __metadata("design:type", Boolean)
  200. ], Column.prototype, "expander", void 0);
  201. __decorate([
  202. core_1.Input(),
  203. __metadata("design:type", String)
  204. ], Column.prototype, "selectionMode", void 0);
  205. __decorate([
  206. core_1.Input(),
  207. __metadata("design:type", String)
  208. ], Column.prototype, "filterPlaceholder", void 0);
  209. __decorate([
  210. core_1.Input(),
  211. __metadata("design:type", Number)
  212. ], Column.prototype, "filterMaxlength", void 0);
  213. __decorate([
  214. core_1.Input(),
  215. __metadata("design:type", Boolean)
  216. ], Column.prototype, "frozen", void 0);
  217. __decorate([
  218. core_1.Input(),
  219. __metadata("design:type", Boolean)
  220. ], Column.prototype, "resizable", void 0);
  221. __decorate([
  222. core_1.Output(),
  223. __metadata("design:type", core_1.EventEmitter)
  224. ], Column.prototype, "sortFunction", void 0);
  225. __decorate([
  226. core_1.ContentChildren(PrimeTemplate),
  227. __metadata("design:type", core_1.QueryList)
  228. ], Column.prototype, "templates", void 0);
  229. __decorate([
  230. core_1.ContentChild(core_1.TemplateRef, { static: false }),
  231. __metadata("design:type", core_1.TemplateRef)
  232. ], Column.prototype, "template", void 0);
  233. Column = __decorate([
  234. core_2.Component({
  235. selector: 'p-column',
  236. template: ''
  237. })
  238. ], Column);
  239. return Column;
  240. }());
  241. exports.Column = Column;
  242. /* Deprecated */
  243. var Row = /** @class */ (function () {
  244. function Row() {
  245. }
  246. __decorate([
  247. core_1.ContentChildren(Column),
  248. __metadata("design:type", core_1.QueryList)
  249. ], Row.prototype, "columns", void 0);
  250. Row = __decorate([
  251. core_2.Component({
  252. selector: 'p-row',
  253. template: ""
  254. })
  255. ], Row);
  256. return Row;
  257. }());
  258. exports.Row = Row;
  259. /* Deprecated */
  260. var HeaderColumnGroup = /** @class */ (function () {
  261. function HeaderColumnGroup() {
  262. }
  263. __decorate([
  264. core_1.Input(),
  265. __metadata("design:type", Boolean)
  266. ], HeaderColumnGroup.prototype, "frozen", void 0);
  267. __decorate([
  268. core_1.ContentChildren(Row),
  269. __metadata("design:type", core_1.QueryList)
  270. ], HeaderColumnGroup.prototype, "rows", void 0);
  271. HeaderColumnGroup = __decorate([
  272. core_2.Component({
  273. selector: 'p-headerColumnGroup',
  274. template: ""
  275. })
  276. ], HeaderColumnGroup);
  277. return HeaderColumnGroup;
  278. }());
  279. exports.HeaderColumnGroup = HeaderColumnGroup;
  280. /* Deprecated */
  281. var FooterColumnGroup = /** @class */ (function () {
  282. function FooterColumnGroup() {
  283. }
  284. __decorate([
  285. core_1.Input(),
  286. __metadata("design:type", Boolean)
  287. ], FooterColumnGroup.prototype, "frozen", void 0);
  288. __decorate([
  289. core_1.ContentChildren(Row),
  290. __metadata("design:type", core_1.QueryList)
  291. ], FooterColumnGroup.prototype, "rows", void 0);
  292. FooterColumnGroup = __decorate([
  293. core_2.Component({
  294. selector: 'p-footerColumnGroup',
  295. template: ""
  296. })
  297. ], FooterColumnGroup);
  298. return FooterColumnGroup;
  299. }());
  300. exports.FooterColumnGroup = FooterColumnGroup;
  301. var SharedModule = /** @class */ (function () {
  302. function SharedModule() {
  303. }
  304. SharedModule = __decorate([
  305. core_1.NgModule({
  306. imports: [common_1.CommonModule],
  307. exports: [Header, Footer, Column, PrimeTemplate, Row, HeaderColumnGroup, FooterColumnGroup],
  308. declarations: [Header, Footer, Column, PrimeTemplate, Row, HeaderColumnGroup, FooterColumnGroup]
  309. })
  310. ], SharedModule);
  311. return SharedModule;
  312. }());
  313. exports.SharedModule = SharedModule;
  314. //# sourceMappingURL=shared.js.map