scheduler.js 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102
  1. "use strict";
  2. var __extends = (this && this.__extends) || (function () {
  3. var extendStatics = Object.setPrototypeOf ||
  4. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  5. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  6. return function (d, b) {
  7. extendStatics(d, b);
  8. function __() { this.constructor = d; }
  9. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  10. };
  11. })();
  12. /*!
  13. * devextreme-angular
  14. * Version: 19.1.16
  15. * Build date: Tue Oct 18 2022
  16. *
  17. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  18. *
  19. * This software may be modified and distributed under the terms
  20. * of the MIT license. See the LICENSE file in the root of the project for details.
  21. *
  22. * https://github.com/DevExpress/devextreme-angular
  23. */
  24. Object.defineProperty(exports, "__esModule", { value: true });
  25. var platform_browser_1 = require("@angular/platform-browser");
  26. var platform_browser_2 = require("@angular/platform-browser");
  27. var core_1 = require("@angular/core");
  28. var scheduler_1 = require("devextreme/ui/scheduler");
  29. var component_1 = require("../core/component");
  30. var template_host_1 = require("../core/template-host");
  31. var integration_1 = require("../core/integration");
  32. var template_1 = require("../core/template");
  33. var nested_option_1 = require("../core/nested-option");
  34. var watcher_helper_1 = require("../core/watcher-helper");
  35. var iterable_differ_helper_1 = require("../core/iterable-differ-helper");
  36. var editing_1 = require("./nested/editing");
  37. var resource_dxi_1 = require("./nested/resource-dxi");
  38. var view_dxi_1 = require("./nested/view-dxi");
  39. var resource_dxi_2 = require("./nested/resource-dxi");
  40. var view_dxi_2 = require("./nested/view-dxi");
  41. /**
  42. * The Scheduler is a widget that represents scheduled data and allows a user to manage and edit it.
  43. */
  44. var DxSchedulerComponent = (function (_super) {
  45. __extends(DxSchedulerComponent, _super);
  46. function DxSchedulerComponent(elementRef, ngZone, templateHost, _watcherHelper, _idh, optionHost, transferState, platformId) {
  47. var _this = _super.call(this, elementRef, ngZone, templateHost, _watcherHelper, transferState, platformId) || this;
  48. _this._watcherHelper = _watcherHelper;
  49. _this._idh = _idh;
  50. _this._createEventEmitters([
  51. { subscribe: 'appointmentAdded', emit: 'onAppointmentAdded' },
  52. { subscribe: 'appointmentAdding', emit: 'onAppointmentAdding' },
  53. { subscribe: 'appointmentClick', emit: 'onAppointmentClick' },
  54. { subscribe: 'appointmentContextMenu', emit: 'onAppointmentContextMenu' },
  55. { subscribe: 'appointmentDblClick', emit: 'onAppointmentDblClick' },
  56. { subscribe: 'appointmentDeleted', emit: 'onAppointmentDeleted' },
  57. { subscribe: 'appointmentDeleting', emit: 'onAppointmentDeleting' },
  58. { subscribe: 'appointmentFormCreated', emit: 'onAppointmentFormCreated' },
  59. { subscribe: 'appointmentFormOpening', emit: 'onAppointmentFormOpening' },
  60. { subscribe: 'appointmentRendered', emit: 'onAppointmentRendered' },
  61. { subscribe: 'appointmentUpdated', emit: 'onAppointmentUpdated' },
  62. { subscribe: 'appointmentUpdating', emit: 'onAppointmentUpdating' },
  63. { subscribe: 'cellClick', emit: 'onCellClick' },
  64. { subscribe: 'cellContextMenu', emit: 'onCellContextMenu' },
  65. { subscribe: 'contentReady', emit: 'onContentReady' },
  66. { subscribe: 'disposing', emit: 'onDisposing' },
  67. { subscribe: 'initialized', emit: 'onInitialized' },
  68. { subscribe: 'optionChanged', emit: 'onOptionChanged' },
  69. { emit: 'accessKeyChange' },
  70. { emit: 'adaptivityEnabledChange' },
  71. { emit: 'allDayExprChange' },
  72. { emit: 'appointmentCollectorTemplateChange' },
  73. { emit: 'appointmentTemplateChange' },
  74. { emit: 'appointmentTooltipTemplateChange' },
  75. { emit: 'cellDurationChange' },
  76. { emit: 'crossScrollingEnabledChange' },
  77. { emit: 'currentDateChange' },
  78. { emit: 'currentViewChange' },
  79. { emit: 'customizeDateNavigatorTextChange' },
  80. { emit: 'dataCellTemplateChange' },
  81. { emit: 'dataSourceChange' },
  82. { emit: 'dateCellTemplateChange' },
  83. { emit: 'dateSerializationFormatChange' },
  84. { emit: 'descriptionExprChange' },
  85. { emit: 'disabledChange' },
  86. { emit: 'dropDownAppointmentTemplateChange' },
  87. { emit: 'editingChange' },
  88. { emit: 'elementAttrChange' },
  89. { emit: 'endDateExprChange' },
  90. { emit: 'endDateTimeZoneExprChange' },
  91. { emit: 'endDayHourChange' },
  92. { emit: 'firstDayOfWeekChange' },
  93. { emit: 'focusStateEnabledChange' },
  94. { emit: 'groupByDateChange' },
  95. { emit: 'groupsChange' },
  96. { emit: 'heightChange' },
  97. { emit: 'hintChange' },
  98. { emit: 'indicatorUpdateIntervalChange' },
  99. { emit: 'maxChange' },
  100. { emit: 'maxAppointmentsPerCellChange' },
  101. { emit: 'minChange' },
  102. { emit: 'noDataTextChange' },
  103. { emit: 'recurrenceEditModeChange' },
  104. { emit: 'recurrenceExceptionExprChange' },
  105. { emit: 'recurrenceRuleExprChange' },
  106. { emit: 'remoteFilteringChange' },
  107. { emit: 'resourceCellTemplateChange' },
  108. { emit: 'resourcesChange' },
  109. { emit: 'rtlEnabledChange' },
  110. { emit: 'selectedCellDataChange' },
  111. { emit: 'shadeUntilCurrentTimeChange' },
  112. { emit: 'showAllDayPanelChange' },
  113. { emit: 'showCurrentTimeIndicatorChange' },
  114. { emit: 'startDateExprChange' },
  115. { emit: 'startDateTimeZoneExprChange' },
  116. { emit: 'startDayHourChange' },
  117. { emit: 'tabIndexChange' },
  118. { emit: 'textExprChange' },
  119. { emit: 'timeCellTemplateChange' },
  120. { emit: 'timeZoneChange' },
  121. { emit: 'useDropDownViewSwitcherChange' },
  122. { emit: 'viewsChange' },
  123. { emit: 'visibleChange' },
  124. { emit: 'widthChange' }
  125. ]);
  126. _this._idh.setHost(_this);
  127. optionHost.setHost(_this);
  128. return _this;
  129. }
  130. Object.defineProperty(DxSchedulerComponent.prototype, "accessKey", {
  131. get: /**
  132. * Specifies the shortcut key that sets focus on the widget.
  133. */
  134. function () {
  135. return this._getOption('accessKey');
  136. },
  137. set: function (value) {
  138. this._setOption('accessKey', value);
  139. },
  140. enumerable: true,
  141. configurable: true
  142. });
  143. Object.defineProperty(DxSchedulerComponent.prototype, "adaptivityEnabled", {
  144. get: /**
  145. * Specifies whether the widget adapts to small screens.
  146. */
  147. function () {
  148. return this._getOption('adaptivityEnabled');
  149. },
  150. set: function (value) {
  151. this._setOption('adaptivityEnabled', value);
  152. },
  153. enumerable: true,
  154. configurable: true
  155. });
  156. Object.defineProperty(DxSchedulerComponent.prototype, "allDayExpr", {
  157. get: /**
  158. * Specifies the name of the data source item field whose value defines whether or not the corresponding appointment is an all-day appointment.
  159. */
  160. function () {
  161. return this._getOption('allDayExpr');
  162. },
  163. set: function (value) {
  164. this._setOption('allDayExpr', value);
  165. },
  166. enumerable: true,
  167. configurable: true
  168. });
  169. Object.defineProperty(DxSchedulerComponent.prototype, "appointmentCollectorTemplate", {
  170. get: /**
  171. * Specifies an appointment collector's custom template.
  172. */
  173. function () {
  174. return this._getOption('appointmentCollectorTemplate');
  175. },
  176. set: function (value) {
  177. this._setOption('appointmentCollectorTemplate', value);
  178. },
  179. enumerable: true,
  180. configurable: true
  181. });
  182. Object.defineProperty(DxSchedulerComponent.prototype, "appointmentTemplate", {
  183. get: /**
  184. * Specifies a custom template for appointments.
  185. */
  186. function () {
  187. return this._getOption('appointmentTemplate');
  188. },
  189. set: function (value) {
  190. this._setOption('appointmentTemplate', value);
  191. },
  192. enumerable: true,
  193. configurable: true
  194. });
  195. Object.defineProperty(DxSchedulerComponent.prototype, "appointmentTooltipTemplate", {
  196. get: /**
  197. * Specifies a custom template for appointment tooltips and appointments in the appointment collector's drop-down list.
  198. */
  199. function () {
  200. return this._getOption('appointmentTooltipTemplate');
  201. },
  202. set: function (value) {
  203. this._setOption('appointmentTooltipTemplate', value);
  204. },
  205. enumerable: true,
  206. configurable: true
  207. });
  208. Object.defineProperty(DxSchedulerComponent.prototype, "cellDuration", {
  209. get: /**
  210. * Specifies cell duration in minutes.
  211. */
  212. function () {
  213. return this._getOption('cellDuration');
  214. },
  215. set: function (value) {
  216. this._setOption('cellDuration', value);
  217. },
  218. enumerable: true,
  219. configurable: true
  220. });
  221. Object.defineProperty(DxSchedulerComponent.prototype, "crossScrollingEnabled", {
  222. get: /**
  223. * Specifies whether or not an end-user can scroll the view in both directions at the same time.
  224. */
  225. function () {
  226. return this._getOption('crossScrollingEnabled');
  227. },
  228. set: function (value) {
  229. this._setOption('crossScrollingEnabled', value);
  230. },
  231. enumerable: true,
  232. configurable: true
  233. });
  234. Object.defineProperty(DxSchedulerComponent.prototype, "currentDate", {
  235. get: /**
  236. * Specifies a date displayed on the current scheduler view by default.
  237. */
  238. function () {
  239. return this._getOption('currentDate');
  240. },
  241. set: function (value) {
  242. this._setOption('currentDate', value);
  243. },
  244. enumerable: true,
  245. configurable: true
  246. });
  247. Object.defineProperty(DxSchedulerComponent.prototype, "currentView", {
  248. get: /**
  249. * Specifies the currently displayed view. Accepts the view's name or type.
  250. */
  251. function () {
  252. return this._getOption('currentView');
  253. },
  254. set: function (value) {
  255. this._setOption('currentView', value);
  256. },
  257. enumerable: true,
  258. configurable: true
  259. });
  260. Object.defineProperty(DxSchedulerComponent.prototype, "customizeDateNavigatorText", {
  261. get: /**
  262. * Customizes the date navigator's text.
  263. */
  264. function () {
  265. return this._getOption('customizeDateNavigatorText');
  266. },
  267. set: function (value) {
  268. this._setOption('customizeDateNavigatorText', value);
  269. },
  270. enumerable: true,
  271. configurable: true
  272. });
  273. Object.defineProperty(DxSchedulerComponent.prototype, "dataCellTemplate", {
  274. get: /**
  275. * Specifies a custom template for table cells.
  276. */
  277. function () {
  278. return this._getOption('dataCellTemplate');
  279. },
  280. set: function (value) {
  281. this._setOption('dataCellTemplate', value);
  282. },
  283. enumerable: true,
  284. configurable: true
  285. });
  286. Object.defineProperty(DxSchedulerComponent.prototype, "dataSource", {
  287. get: /**
  288. * Binds the widget to data.
  289. */
  290. function () {
  291. return this._getOption('dataSource');
  292. },
  293. set: function (value) {
  294. this._setOption('dataSource', value);
  295. },
  296. enumerable: true,
  297. configurable: true
  298. });
  299. Object.defineProperty(DxSchedulerComponent.prototype, "dateCellTemplate", {
  300. get: /**
  301. * Specifies a custom template for day scale items.
  302. */
  303. function () {
  304. return this._getOption('dateCellTemplate');
  305. },
  306. set: function (value) {
  307. this._setOption('dateCellTemplate', value);
  308. },
  309. enumerable: true,
  310. configurable: true
  311. });
  312. Object.defineProperty(DxSchedulerComponent.prototype, "dateSerializationFormat", {
  313. get: /**
  314. * Specifies the date-time values' serialization format. Use it only if you do not specify the dataSource at design time.
  315. */
  316. function () {
  317. return this._getOption('dateSerializationFormat');
  318. },
  319. set: function (value) {
  320. this._setOption('dateSerializationFormat', value);
  321. },
  322. enumerable: true,
  323. configurable: true
  324. });
  325. Object.defineProperty(DxSchedulerComponent.prototype, "descriptionExpr", {
  326. get: /**
  327. * Specifies the name of the data source item field whose value holds the description of the corresponding appointment.
  328. */
  329. function () {
  330. return this._getOption('descriptionExpr');
  331. },
  332. set: function (value) {
  333. this._setOption('descriptionExpr', value);
  334. },
  335. enumerable: true,
  336. configurable: true
  337. });
  338. Object.defineProperty(DxSchedulerComponent.prototype, "disabled", {
  339. get: /**
  340. * Specifies whether the widget responds to user interaction.
  341. */
  342. function () {
  343. return this._getOption('disabled');
  344. },
  345. set: function (value) {
  346. this._setOption('disabled', value);
  347. },
  348. enumerable: true,
  349. configurable: true
  350. });
  351. Object.defineProperty(DxSchedulerComponent.prototype, "dropDownAppointmentTemplate", {
  352. get: /**
  353. * Specifies a custom template for appointments in the appointment collector's drop-down list.
  354. */
  355. function () {
  356. return this._getOption('dropDownAppointmentTemplate');
  357. },
  358. set: function (value) {
  359. this._setOption('dropDownAppointmentTemplate', value);
  360. },
  361. enumerable: true,
  362. configurable: true
  363. });
  364. Object.defineProperty(DxSchedulerComponent.prototype, "editing", {
  365. get: /**
  366. * Specifies which editing operations an end-user can perform on appointments.
  367. */
  368. function () {
  369. return this._getOption('editing');
  370. },
  371. set: function (value) {
  372. this._setOption('editing', value);
  373. },
  374. enumerable: true,
  375. configurable: true
  376. });
  377. Object.defineProperty(DxSchedulerComponent.prototype, "elementAttr", {
  378. get: /**
  379. * Specifies the attributes to be attached to the widget's root element.
  380. */
  381. function () {
  382. return this._getOption('elementAttr');
  383. },
  384. set: function (value) {
  385. this._setOption('elementAttr', value);
  386. },
  387. enumerable: true,
  388. configurable: true
  389. });
  390. Object.defineProperty(DxSchedulerComponent.prototype, "endDateExpr", {
  391. get: /**
  392. * Specifies the name of the data source item field that defines the ending of an appointment.
  393. */
  394. function () {
  395. return this._getOption('endDateExpr');
  396. },
  397. set: function (value) {
  398. this._setOption('endDateExpr', value);
  399. },
  400. enumerable: true,
  401. configurable: true
  402. });
  403. Object.defineProperty(DxSchedulerComponent.prototype, "endDateTimeZoneExpr", {
  404. get: /**
  405. * Specifies the name of the data source item field that defines the timezone of the appointment end date.
  406. */
  407. function () {
  408. return this._getOption('endDateTimeZoneExpr');
  409. },
  410. set: function (value) {
  411. this._setOption('endDateTimeZoneExpr', value);
  412. },
  413. enumerable: true,
  414. configurable: true
  415. });
  416. Object.defineProperty(DxSchedulerComponent.prototype, "endDayHour", {
  417. get: /**
  418. * Specifies the last hour on the time scale. Accepts integer values from 0 to 24.
  419. */
  420. function () {
  421. return this._getOption('endDayHour');
  422. },
  423. set: function (value) {
  424. this._setOption('endDayHour', value);
  425. },
  426. enumerable: true,
  427. configurable: true
  428. });
  429. Object.defineProperty(DxSchedulerComponent.prototype, "firstDayOfWeek", {
  430. get: /**
  431. * Specifies the first day of a week. Does not apply to the agenda view.
  432. */
  433. function () {
  434. return this._getOption('firstDayOfWeek');
  435. },
  436. set: function (value) {
  437. this._setOption('firstDayOfWeek', value);
  438. },
  439. enumerable: true,
  440. configurable: true
  441. });
  442. Object.defineProperty(DxSchedulerComponent.prototype, "focusStateEnabled", {
  443. get: /**
  444. * Specifies whether the widget can be focused using keyboard navigation.
  445. */
  446. function () {
  447. return this._getOption('focusStateEnabled');
  448. },
  449. set: function (value) {
  450. this._setOption('focusStateEnabled', value);
  451. },
  452. enumerable: true,
  453. configurable: true
  454. });
  455. Object.defineProperty(DxSchedulerComponent.prototype, "groupByDate", {
  456. get: /**
  457. * If true, appointments are grouped by date first and then by resource; opposite if false. Applies only if appointments are grouped and groupOrientation is "horizontal".
  458. */
  459. function () {
  460. return this._getOption('groupByDate');
  461. },
  462. set: function (value) {
  463. this._setOption('groupByDate', value);
  464. },
  465. enumerable: true,
  466. configurable: true
  467. });
  468. Object.defineProperty(DxSchedulerComponent.prototype, "groups", {
  469. get: /**
  470. * Specifies the resource kinds by which the scheduler's appointments are grouped in a timetable.
  471. */
  472. function () {
  473. return this._getOption('groups');
  474. },
  475. set: function (value) {
  476. this._setOption('groups', value);
  477. },
  478. enumerable: true,
  479. configurable: true
  480. });
  481. Object.defineProperty(DxSchedulerComponent.prototype, "height", {
  482. get: /**
  483. * Specifies the widget's height.
  484. */
  485. function () {
  486. return this._getOption('height');
  487. },
  488. set: function (value) {
  489. this._setOption('height', value);
  490. },
  491. enumerable: true,
  492. configurable: true
  493. });
  494. Object.defineProperty(DxSchedulerComponent.prototype, "hint", {
  495. get: /**
  496. * Specifies text for a hint that appears when a user pauses on the widget.
  497. */
  498. function () {
  499. return this._getOption('hint');
  500. },
  501. set: function (value) {
  502. this._setOption('hint', value);
  503. },
  504. enumerable: true,
  505. configurable: true
  506. });
  507. Object.defineProperty(DxSchedulerComponent.prototype, "indicatorUpdateInterval", {
  508. get: /**
  509. * Specifies the time interval between when the date-time indicator changes its position, in milliseconds.
  510. */
  511. function () {
  512. return this._getOption('indicatorUpdateInterval');
  513. },
  514. set: function (value) {
  515. this._setOption('indicatorUpdateInterval', value);
  516. },
  517. enumerable: true,
  518. configurable: true
  519. });
  520. Object.defineProperty(DxSchedulerComponent.prototype, "max", {
  521. get: /**
  522. * The latest date the widget allows you to select.
  523. */
  524. function () {
  525. return this._getOption('max');
  526. },
  527. set: function (value) {
  528. this._setOption('max', value);
  529. },
  530. enumerable: true,
  531. configurable: true
  532. });
  533. Object.defineProperty(DxSchedulerComponent.prototype, "maxAppointmentsPerCell", {
  534. get: /**
  535. * Specifies the limit of full-sized appointments displayed per cell. Applies to all views except "agenda".
  536. */
  537. function () {
  538. return this._getOption('maxAppointmentsPerCell');
  539. },
  540. set: function (value) {
  541. this._setOption('maxAppointmentsPerCell', value);
  542. },
  543. enumerable: true,
  544. configurable: true
  545. });
  546. Object.defineProperty(DxSchedulerComponent.prototype, "min", {
  547. get: /**
  548. * The earliest date the widget allows you to select.
  549. */
  550. function () {
  551. return this._getOption('min');
  552. },
  553. set: function (value) {
  554. this._setOption('min', value);
  555. },
  556. enumerable: true,
  557. configurable: true
  558. });
  559. Object.defineProperty(DxSchedulerComponent.prototype, "noDataText", {
  560. get: /**
  561. * The text or HTML markup displayed by the widget if the item collection is empty. Available for the Agenda view only.
  562. */
  563. function () {
  564. return this._getOption('noDataText');
  565. },
  566. set: function (value) {
  567. this._setOption('noDataText', value);
  568. },
  569. enumerable: true,
  570. configurable: true
  571. });
  572. Object.defineProperty(DxSchedulerComponent.prototype, "recurrenceEditMode", {
  573. get: /**
  574. * Specifies the edit mode for recurring appointments.
  575. */
  576. function () {
  577. return this._getOption('recurrenceEditMode');
  578. },
  579. set: function (value) {
  580. this._setOption('recurrenceEditMode', value);
  581. },
  582. enumerable: true,
  583. configurable: true
  584. });
  585. Object.defineProperty(DxSchedulerComponent.prototype, "recurrenceExceptionExpr", {
  586. get: /**
  587. * Specifies the name of the data source item field that defines exceptions for the current recurring appointment.
  588. */
  589. function () {
  590. return this._getOption('recurrenceExceptionExpr');
  591. },
  592. set: function (value) {
  593. this._setOption('recurrenceExceptionExpr', value);
  594. },
  595. enumerable: true,
  596. configurable: true
  597. });
  598. Object.defineProperty(DxSchedulerComponent.prototype, "recurrenceRuleExpr", {
  599. get: /**
  600. * Specifies the name of the data source item field that defines a recurrence rule for generating recurring appointments.
  601. */
  602. function () {
  603. return this._getOption('recurrenceRuleExpr');
  604. },
  605. set: function (value) {
  606. this._setOption('recurrenceRuleExpr', value);
  607. },
  608. enumerable: true,
  609. configurable: true
  610. });
  611. Object.defineProperty(DxSchedulerComponent.prototype, "remoteFiltering", {
  612. get: /**
  613. * Specifies whether filtering is performed on the server or client side.
  614. */
  615. function () {
  616. return this._getOption('remoteFiltering');
  617. },
  618. set: function (value) {
  619. this._setOption('remoteFiltering', value);
  620. },
  621. enumerable: true,
  622. configurable: true
  623. });
  624. Object.defineProperty(DxSchedulerComponent.prototype, "resourceCellTemplate", {
  625. get: /**
  626. * Specifies a custom template for resource headers.
  627. */
  628. function () {
  629. return this._getOption('resourceCellTemplate');
  630. },
  631. set: function (value) {
  632. this._setOption('resourceCellTemplate', value);
  633. },
  634. enumerable: true,
  635. configurable: true
  636. });
  637. Object.defineProperty(DxSchedulerComponent.prototype, "resources", {
  638. get: /**
  639. * Specifies an array of resources available in the scheduler.
  640. */
  641. function () {
  642. return this._getOption('resources');
  643. },
  644. set: function (value) {
  645. this._setOption('resources', value);
  646. },
  647. enumerable: true,
  648. configurable: true
  649. });
  650. Object.defineProperty(DxSchedulerComponent.prototype, "rtlEnabled", {
  651. get: /**
  652. * Switches the widget to a right-to-left representation.
  653. */
  654. function () {
  655. return this._getOption('rtlEnabled');
  656. },
  657. set: function (value) {
  658. this._setOption('rtlEnabled', value);
  659. },
  660. enumerable: true,
  661. configurable: true
  662. });
  663. Object.defineProperty(DxSchedulerComponent.prototype, "selectedCellData", {
  664. get: /**
  665. * Currently selected cells' data.
  666. */
  667. function () {
  668. return this._getOption('selectedCellData');
  669. },
  670. set: function (value) {
  671. this._setOption('selectedCellData', value);
  672. },
  673. enumerable: true,
  674. configurable: true
  675. });
  676. Object.defineProperty(DxSchedulerComponent.prototype, "shadeUntilCurrentTime", {
  677. get: /**
  678. * Specifies whether to apply shading to cover the timetable up to the current time.
  679. */
  680. function () {
  681. return this._getOption('shadeUntilCurrentTime');
  682. },
  683. set: function (value) {
  684. this._setOption('shadeUntilCurrentTime', value);
  685. },
  686. enumerable: true,
  687. configurable: true
  688. });
  689. Object.defineProperty(DxSchedulerComponent.prototype, "showAllDayPanel", {
  690. get: /**
  691. * Specifies the "All-day" panel's visibility. Setting this option to false hides the panel along with the all-day appointments.
  692. */
  693. function () {
  694. return this._getOption('showAllDayPanel');
  695. },
  696. set: function (value) {
  697. this._setOption('showAllDayPanel', value);
  698. },
  699. enumerable: true,
  700. configurable: true
  701. });
  702. Object.defineProperty(DxSchedulerComponent.prototype, "showCurrentTimeIndicator", {
  703. get: /**
  704. * Specifies the current date-time indicator's visibility.
  705. */
  706. function () {
  707. return this._getOption('showCurrentTimeIndicator');
  708. },
  709. set: function (value) {
  710. this._setOption('showCurrentTimeIndicator', value);
  711. },
  712. enumerable: true,
  713. configurable: true
  714. });
  715. Object.defineProperty(DxSchedulerComponent.prototype, "startDateExpr", {
  716. get: /**
  717. * Specifies the name of the data source item field that defines the start of an appointment.
  718. */
  719. function () {
  720. return this._getOption('startDateExpr');
  721. },
  722. set: function (value) {
  723. this._setOption('startDateExpr', value);
  724. },
  725. enumerable: true,
  726. configurable: true
  727. });
  728. Object.defineProperty(DxSchedulerComponent.prototype, "startDateTimeZoneExpr", {
  729. get: /**
  730. * Specifies the name of the data source item field that defines the timezone of the appointment start date.
  731. */
  732. function () {
  733. return this._getOption('startDateTimeZoneExpr');
  734. },
  735. set: function (value) {
  736. this._setOption('startDateTimeZoneExpr', value);
  737. },
  738. enumerable: true,
  739. configurable: true
  740. });
  741. Object.defineProperty(DxSchedulerComponent.prototype, "startDayHour", {
  742. get: /**
  743. * Specifies the first hour on the time scale. Accepts integer values from 0 to 24.
  744. */
  745. function () {
  746. return this._getOption('startDayHour');
  747. },
  748. set: function (value) {
  749. this._setOption('startDayHour', value);
  750. },
  751. enumerable: true,
  752. configurable: true
  753. });
  754. Object.defineProperty(DxSchedulerComponent.prototype, "tabIndex", {
  755. get: /**
  756. * Specifies the number of the element when the Tab key is used for navigating.
  757. */
  758. function () {
  759. return this._getOption('tabIndex');
  760. },
  761. set: function (value) {
  762. this._setOption('tabIndex', value);
  763. },
  764. enumerable: true,
  765. configurable: true
  766. });
  767. Object.defineProperty(DxSchedulerComponent.prototype, "textExpr", {
  768. get: /**
  769. * Specifies the name of the data source item field that holds the subject of an appointment.
  770. */
  771. function () {
  772. return this._getOption('textExpr');
  773. },
  774. set: function (value) {
  775. this._setOption('textExpr', value);
  776. },
  777. enumerable: true,
  778. configurable: true
  779. });
  780. Object.defineProperty(DxSchedulerComponent.prototype, "timeCellTemplate", {
  781. get: /**
  782. * Specifies a custom template for time scale items.
  783. */
  784. function () {
  785. return this._getOption('timeCellTemplate');
  786. },
  787. set: function (value) {
  788. this._setOption('timeCellTemplate', value);
  789. },
  790. enumerable: true,
  791. configurable: true
  792. });
  793. Object.defineProperty(DxSchedulerComponent.prototype, "timeZone", {
  794. get: /**
  795. * Specifies the timezone of the widget.
  796. */
  797. function () {
  798. return this._getOption('timeZone');
  799. },
  800. set: function (value) {
  801. this._setOption('timeZone', value);
  802. },
  803. enumerable: true,
  804. configurable: true
  805. });
  806. Object.defineProperty(DxSchedulerComponent.prototype, "useDropDownViewSwitcher", {
  807. get: /**
  808. * Specifies whether a user can switch views using tabs or a drop-down menu.
  809. */
  810. function () {
  811. return this._getOption('useDropDownViewSwitcher');
  812. },
  813. set: function (value) {
  814. this._setOption('useDropDownViewSwitcher', value);
  815. },
  816. enumerable: true,
  817. configurable: true
  818. });
  819. Object.defineProperty(DxSchedulerComponent.prototype, "views", {
  820. get: /**
  821. * Specifies and configures the views to be available in the view switcher.
  822. */
  823. function () {
  824. return this._getOption('views');
  825. },
  826. set: function (value) {
  827. this._setOption('views', value);
  828. },
  829. enumerable: true,
  830. configurable: true
  831. });
  832. Object.defineProperty(DxSchedulerComponent.prototype, "visible", {
  833. get: /**
  834. * Specifies whether the widget is visible.
  835. */
  836. function () {
  837. return this._getOption('visible');
  838. },
  839. set: function (value) {
  840. this._setOption('visible', value);
  841. },
  842. enumerable: true,
  843. configurable: true
  844. });
  845. Object.defineProperty(DxSchedulerComponent.prototype, "width", {
  846. get: /**
  847. * Specifies the widget's width.
  848. */
  849. function () {
  850. return this._getOption('width');
  851. },
  852. set: function (value) {
  853. this._setOption('width', value);
  854. },
  855. enumerable: true,
  856. configurable: true
  857. });
  858. Object.defineProperty(DxSchedulerComponent.prototype, "resourcesChildren", {
  859. get: function () {
  860. return this._getOption('resources');
  861. },
  862. set: function (value) {
  863. this.setChildren('resources', value);
  864. },
  865. enumerable: true,
  866. configurable: true
  867. });
  868. Object.defineProperty(DxSchedulerComponent.prototype, "viewsChildren", {
  869. get: function () {
  870. return this._getOption('views');
  871. },
  872. set: function (value) {
  873. this.setChildren('views', value);
  874. },
  875. enumerable: true,
  876. configurable: true
  877. });
  878. DxSchedulerComponent.prototype._createInstance = function (element, options) {
  879. return new scheduler_1.default(element, options);
  880. };
  881. DxSchedulerComponent.prototype.ngOnDestroy = function () {
  882. this._destroyWidget();
  883. };
  884. DxSchedulerComponent.prototype.ngOnChanges = function (changes) {
  885. _super.prototype.ngOnChanges.call(this, changes);
  886. this.setupChanges('dataSource', changes);
  887. this.setupChanges('groups', changes);
  888. this.setupChanges('resources', changes);
  889. this.setupChanges('selectedCellData', changes);
  890. this.setupChanges('views', changes);
  891. };
  892. DxSchedulerComponent.prototype.setupChanges = function (prop, changes) {
  893. if (!(prop in this._optionsToUpdate)) {
  894. this._idh.setup(prop, changes);
  895. }
  896. };
  897. DxSchedulerComponent.prototype.ngDoCheck = function () {
  898. this._idh.doCheck('dataSource');
  899. this._idh.doCheck('groups');
  900. this._idh.doCheck('resources');
  901. this._idh.doCheck('selectedCellData');
  902. this._idh.doCheck('views');
  903. this._watcherHelper.checkWatchers();
  904. _super.prototype.ngDoCheck.call(this);
  905. _super.prototype.clearChangedOptions.call(this);
  906. };
  907. DxSchedulerComponent.prototype._setOption = function (name, value) {
  908. var isSetup = this._idh.setupSingle(name, value);
  909. var isChanged = this._idh.getChanges(name, value) !== null;
  910. if (isSetup || isChanged) {
  911. _super.prototype._setOption.call(this, name, value);
  912. }
  913. };
  914. DxSchedulerComponent.decorators = [
  915. { type: core_1.Component, args: [{
  916. selector: 'dx-scheduler',
  917. template: '',
  918. providers: [
  919. template_host_1.DxTemplateHost,
  920. watcher_helper_1.WatcherHelper,
  921. nested_option_1.NestedOptionHost,
  922. iterable_differ_helper_1.IterableDifferHelper
  923. ]
  924. },] },
  925. ];
  926. /** @nocollapse */
  927. DxSchedulerComponent.ctorParameters = function () { return [
  928. { type: core_1.ElementRef, },
  929. { type: core_1.NgZone, },
  930. { type: template_host_1.DxTemplateHost, },
  931. { type: watcher_helper_1.WatcherHelper, },
  932. { type: iterable_differ_helper_1.IterableDifferHelper, },
  933. { type: nested_option_1.NestedOptionHost, },
  934. { type: platform_browser_2.TransferState, },
  935. { type: undefined, decorators: [{ type: core_1.Inject, args: [core_1.PLATFORM_ID,] },] },
  936. ]; };
  937. DxSchedulerComponent.propDecorators = {
  938. "accessKey": [{ type: core_1.Input },],
  939. "adaptivityEnabled": [{ type: core_1.Input },],
  940. "allDayExpr": [{ type: core_1.Input },],
  941. "appointmentCollectorTemplate": [{ type: core_1.Input },],
  942. "appointmentTemplate": [{ type: core_1.Input },],
  943. "appointmentTooltipTemplate": [{ type: core_1.Input },],
  944. "cellDuration": [{ type: core_1.Input },],
  945. "crossScrollingEnabled": [{ type: core_1.Input },],
  946. "currentDate": [{ type: core_1.Input },],
  947. "currentView": [{ type: core_1.Input },],
  948. "customizeDateNavigatorText": [{ type: core_1.Input },],
  949. "dataCellTemplate": [{ type: core_1.Input },],
  950. "dataSource": [{ type: core_1.Input },],
  951. "dateCellTemplate": [{ type: core_1.Input },],
  952. "dateSerializationFormat": [{ type: core_1.Input },],
  953. "descriptionExpr": [{ type: core_1.Input },],
  954. "disabled": [{ type: core_1.Input },],
  955. "dropDownAppointmentTemplate": [{ type: core_1.Input },],
  956. "editing": [{ type: core_1.Input },],
  957. "elementAttr": [{ type: core_1.Input },],
  958. "endDateExpr": [{ type: core_1.Input },],
  959. "endDateTimeZoneExpr": [{ type: core_1.Input },],
  960. "endDayHour": [{ type: core_1.Input },],
  961. "firstDayOfWeek": [{ type: core_1.Input },],
  962. "focusStateEnabled": [{ type: core_1.Input },],
  963. "groupByDate": [{ type: core_1.Input },],
  964. "groups": [{ type: core_1.Input },],
  965. "height": [{ type: core_1.Input },],
  966. "hint": [{ type: core_1.Input },],
  967. "indicatorUpdateInterval": [{ type: core_1.Input },],
  968. "max": [{ type: core_1.Input },],
  969. "maxAppointmentsPerCell": [{ type: core_1.Input },],
  970. "min": [{ type: core_1.Input },],
  971. "noDataText": [{ type: core_1.Input },],
  972. "recurrenceEditMode": [{ type: core_1.Input },],
  973. "recurrenceExceptionExpr": [{ type: core_1.Input },],
  974. "recurrenceRuleExpr": [{ type: core_1.Input },],
  975. "remoteFiltering": [{ type: core_1.Input },],
  976. "resourceCellTemplate": [{ type: core_1.Input },],
  977. "resources": [{ type: core_1.Input },],
  978. "rtlEnabled": [{ type: core_1.Input },],
  979. "selectedCellData": [{ type: core_1.Input },],
  980. "shadeUntilCurrentTime": [{ type: core_1.Input },],
  981. "showAllDayPanel": [{ type: core_1.Input },],
  982. "showCurrentTimeIndicator": [{ type: core_1.Input },],
  983. "startDateExpr": [{ type: core_1.Input },],
  984. "startDateTimeZoneExpr": [{ type: core_1.Input },],
  985. "startDayHour": [{ type: core_1.Input },],
  986. "tabIndex": [{ type: core_1.Input },],
  987. "textExpr": [{ type: core_1.Input },],
  988. "timeCellTemplate": [{ type: core_1.Input },],
  989. "timeZone": [{ type: core_1.Input },],
  990. "useDropDownViewSwitcher": [{ type: core_1.Input },],
  991. "views": [{ type: core_1.Input },],
  992. "visible": [{ type: core_1.Input },],
  993. "width": [{ type: core_1.Input },],
  994. "onAppointmentAdded": [{ type: core_1.Output },],
  995. "onAppointmentAdding": [{ type: core_1.Output },],
  996. "onAppointmentClick": [{ type: core_1.Output },],
  997. "onAppointmentContextMenu": [{ type: core_1.Output },],
  998. "onAppointmentDblClick": [{ type: core_1.Output },],
  999. "onAppointmentDeleted": [{ type: core_1.Output },],
  1000. "onAppointmentDeleting": [{ type: core_1.Output },],
  1001. "onAppointmentFormCreated": [{ type: core_1.Output },],
  1002. "onAppointmentFormOpening": [{ type: core_1.Output },],
  1003. "onAppointmentRendered": [{ type: core_1.Output },],
  1004. "onAppointmentUpdated": [{ type: core_1.Output },],
  1005. "onAppointmentUpdating": [{ type: core_1.Output },],
  1006. "onCellClick": [{ type: core_1.Output },],
  1007. "onCellContextMenu": [{ type: core_1.Output },],
  1008. "onContentReady": [{ type: core_1.Output },],
  1009. "onDisposing": [{ type: core_1.Output },],
  1010. "onInitialized": [{ type: core_1.Output },],
  1011. "onOptionChanged": [{ type: core_1.Output },],
  1012. "accessKeyChange": [{ type: core_1.Output },],
  1013. "adaptivityEnabledChange": [{ type: core_1.Output },],
  1014. "allDayExprChange": [{ type: core_1.Output },],
  1015. "appointmentCollectorTemplateChange": [{ type: core_1.Output },],
  1016. "appointmentTemplateChange": [{ type: core_1.Output },],
  1017. "appointmentTooltipTemplateChange": [{ type: core_1.Output },],
  1018. "cellDurationChange": [{ type: core_1.Output },],
  1019. "crossScrollingEnabledChange": [{ type: core_1.Output },],
  1020. "currentDateChange": [{ type: core_1.Output },],
  1021. "currentViewChange": [{ type: core_1.Output },],
  1022. "customizeDateNavigatorTextChange": [{ type: core_1.Output },],
  1023. "dataCellTemplateChange": [{ type: core_1.Output },],
  1024. "dataSourceChange": [{ type: core_1.Output },],
  1025. "dateCellTemplateChange": [{ type: core_1.Output },],
  1026. "dateSerializationFormatChange": [{ type: core_1.Output },],
  1027. "descriptionExprChange": [{ type: core_1.Output },],
  1028. "disabledChange": [{ type: core_1.Output },],
  1029. "dropDownAppointmentTemplateChange": [{ type: core_1.Output },],
  1030. "editingChange": [{ type: core_1.Output },],
  1031. "elementAttrChange": [{ type: core_1.Output },],
  1032. "endDateExprChange": [{ type: core_1.Output },],
  1033. "endDateTimeZoneExprChange": [{ type: core_1.Output },],
  1034. "endDayHourChange": [{ type: core_1.Output },],
  1035. "firstDayOfWeekChange": [{ type: core_1.Output },],
  1036. "focusStateEnabledChange": [{ type: core_1.Output },],
  1037. "groupByDateChange": [{ type: core_1.Output },],
  1038. "groupsChange": [{ type: core_1.Output },],
  1039. "heightChange": [{ type: core_1.Output },],
  1040. "hintChange": [{ type: core_1.Output },],
  1041. "indicatorUpdateIntervalChange": [{ type: core_1.Output },],
  1042. "maxChange": [{ type: core_1.Output },],
  1043. "maxAppointmentsPerCellChange": [{ type: core_1.Output },],
  1044. "minChange": [{ type: core_1.Output },],
  1045. "noDataTextChange": [{ type: core_1.Output },],
  1046. "recurrenceEditModeChange": [{ type: core_1.Output },],
  1047. "recurrenceExceptionExprChange": [{ type: core_1.Output },],
  1048. "recurrenceRuleExprChange": [{ type: core_1.Output },],
  1049. "remoteFilteringChange": [{ type: core_1.Output },],
  1050. "resourceCellTemplateChange": [{ type: core_1.Output },],
  1051. "resourcesChange": [{ type: core_1.Output },],
  1052. "rtlEnabledChange": [{ type: core_1.Output },],
  1053. "selectedCellDataChange": [{ type: core_1.Output },],
  1054. "shadeUntilCurrentTimeChange": [{ type: core_1.Output },],
  1055. "showAllDayPanelChange": [{ type: core_1.Output },],
  1056. "showCurrentTimeIndicatorChange": [{ type: core_1.Output },],
  1057. "startDateExprChange": [{ type: core_1.Output },],
  1058. "startDateTimeZoneExprChange": [{ type: core_1.Output },],
  1059. "startDayHourChange": [{ type: core_1.Output },],
  1060. "tabIndexChange": [{ type: core_1.Output },],
  1061. "textExprChange": [{ type: core_1.Output },],
  1062. "timeCellTemplateChange": [{ type: core_1.Output },],
  1063. "timeZoneChange": [{ type: core_1.Output },],
  1064. "useDropDownViewSwitcherChange": [{ type: core_1.Output },],
  1065. "viewsChange": [{ type: core_1.Output },],
  1066. "visibleChange": [{ type: core_1.Output },],
  1067. "widthChange": [{ type: core_1.Output },],
  1068. "resourcesChildren": [{ type: core_1.ContentChildren, args: [resource_dxi_2.DxiResourceComponent,] },],
  1069. "viewsChildren": [{ type: core_1.ContentChildren, args: [view_dxi_2.DxiViewComponent,] },],
  1070. };
  1071. return DxSchedulerComponent;
  1072. }(component_1.DxComponent));
  1073. exports.DxSchedulerComponent = DxSchedulerComponent;
  1074. var DxSchedulerModule = (function () {
  1075. function DxSchedulerModule() {
  1076. }
  1077. DxSchedulerModule.decorators = [
  1078. { type: core_1.NgModule, args: [{
  1079. imports: [
  1080. editing_1.DxoEditingModule,
  1081. resource_dxi_1.DxiResourceModule,
  1082. view_dxi_1.DxiViewModule,
  1083. integration_1.DxIntegrationModule,
  1084. template_1.DxTemplateModule,
  1085. platform_browser_1.BrowserTransferStateModule
  1086. ],
  1087. declarations: [
  1088. DxSchedulerComponent
  1089. ],
  1090. exports: [
  1091. DxSchedulerComponent,
  1092. editing_1.DxoEditingModule,
  1093. resource_dxi_1.DxiResourceModule,
  1094. view_dxi_1.DxiViewModule,
  1095. template_1.DxTemplateModule
  1096. ]
  1097. },] },
  1098. ];
  1099. return DxSchedulerModule;
  1100. }());
  1101. exports.DxSchedulerModule = DxSchedulerModule;
  1102. //# sourceMappingURL=scheduler.js.map