ui.diagram.nodes.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /**
  2. * DevExtreme (ui/diagram/ui.diagram.nodes.js)
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
  8. */
  9. "use strict";
  10. function _typeof(obj) {
  11. "@babel/helpers - typeof";
  12. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj) {
  13. return typeof obj
  14. } : function(obj) {
  15. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj
  16. }, _typeof(obj)
  17. }
  18. var _uiDiagram = require("./ui.diagram.items");
  19. var _uiDiagram2 = _interopRequireDefault(_uiDiagram);
  20. function _interopRequireDefault(obj) {
  21. return obj && obj.__esModule ? obj : {
  22. "default": obj
  23. }
  24. }
  25. function _classCallCheck(instance, Constructor) {
  26. if (!(instance instanceof Constructor)) {
  27. throw new TypeError("Cannot call a class as a function")
  28. }
  29. }
  30. function _defineProperties(target, props) {
  31. for (var i = 0; i < props.length; i++) {
  32. var descriptor = props[i];
  33. descriptor.enumerable = descriptor.enumerable || false;
  34. descriptor.configurable = true;
  35. if ("value" in descriptor) {
  36. descriptor.writable = true
  37. }
  38. Object.defineProperty(target, descriptor.key, descriptor)
  39. }
  40. }
  41. function _createClass(Constructor, protoProps, staticProps) {
  42. if (protoProps) {
  43. _defineProperties(Constructor.prototype, protoProps)
  44. }
  45. if (staticProps) {
  46. _defineProperties(Constructor, staticProps)
  47. }
  48. Object.defineProperty(Constructor, "prototype", {
  49. writable: false
  50. });
  51. return Constructor
  52. }
  53. function _inherits(subClass, superClass) {
  54. if ("function" !== typeof superClass && null !== superClass) {
  55. throw new TypeError("Super expression must either be null or a function")
  56. }
  57. subClass.prototype = Object.create(superClass && superClass.prototype, {
  58. constructor: {
  59. value: subClass,
  60. writable: true,
  61. configurable: true
  62. }
  63. });
  64. Object.defineProperty(subClass, "prototype", {
  65. writable: false
  66. });
  67. if (superClass) {
  68. _setPrototypeOf(subClass, superClass)
  69. }
  70. }
  71. function _setPrototypeOf(o, p) {
  72. _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, p) {
  73. o.__proto__ = p;
  74. return o
  75. };
  76. return _setPrototypeOf(o, p)
  77. }
  78. function _createSuper(Derived) {
  79. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  80. return function() {
  81. var result, Super = _getPrototypeOf(Derived);
  82. if (hasNativeReflectConstruct) {
  83. var NewTarget = _getPrototypeOf(this).constructor;
  84. result = Reflect.construct(Super, arguments, NewTarget)
  85. } else {
  86. result = Super.apply(this, arguments)
  87. }
  88. return _possibleConstructorReturn(this, result)
  89. }
  90. }
  91. function _possibleConstructorReturn(self, call) {
  92. if (call && ("object" === _typeof(call) || "function" === typeof call)) {
  93. return call
  94. } else {
  95. if (void 0 !== call) {
  96. throw new TypeError("Derived constructors may only return object or undefined")
  97. }
  98. }
  99. return _assertThisInitialized(self)
  100. }
  101. function _assertThisInitialized(self) {
  102. if (void 0 === self) {
  103. throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
  104. }
  105. return self
  106. }
  107. function _isNativeReflectConstruct() {
  108. if ("undefined" === typeof Reflect || !Reflect.construct) {
  109. return false
  110. }
  111. if (Reflect.construct.sham) {
  112. return false
  113. }
  114. if ("function" === typeof Proxy) {
  115. return true
  116. }
  117. try {
  118. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
  119. return true
  120. } catch (e) {
  121. return false
  122. }
  123. }
  124. function _getPrototypeOf(o) {
  125. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o) {
  126. return o.__proto__ || Object.getPrototypeOf(o)
  127. };
  128. return _getPrototypeOf(o)
  129. }
  130. var NodesOption = function(_ItemsOption) {
  131. _inherits(NodesOption, _ItemsOption);
  132. var _super = _createSuper(NodesOption);
  133. function NodesOption() {
  134. _classCallCheck(this, NodesOption);
  135. return _super.apply(this, arguments)
  136. }
  137. _createClass(NodesOption, [{
  138. key: "_dataSourceChangedHandler",
  139. value: function(newItems, e) {
  140. this._diagramWidget._nodesDataSourceChanged(newItems)
  141. }
  142. }]);
  143. return NodesOption
  144. }(_uiDiagram2.default);
  145. module.exports = NodesOption;