@aj-shadow/z-abs-complayer-bootstrap-client 0.0.0-aj-beta.221

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 (189) hide show
  1. package/.gitattributes +26 -0
  2. package/LICENSE.txt +96 -0
  3. package/README.md +5 -0
  4. package/npm-shrinkwrap.json +13 -0
  5. package/package.json +10 -0
  6. package/project/client/_build/Bundle-CompLayer-Bootstrap-client.bld +30 -0
  7. package/project/client/_build/Client-CompLayer-Bootstrap-client-jsx.bld +10 -0
  8. package/project/client/_build/Client-CompLayer-Bootstrap-client.bld +10 -0
  9. package/project/client/_build/Client-css-CompLayer-Bootstrap-bundle.bld +9 -0
  10. package/project/client/_build/server-css-font-CompLayer-Bootstrap-rc.bld +9 -0
  11. package/project/client/_build/z-abs-complayer-bootstrap-client.prj +43 -0
  12. package/project/client/breadcrump.jsx +63 -0
  13. package/project/client/button-new.jsx +141 -0
  14. package/project/client/button-text.jsx +142 -0
  15. package/project/client/button.jsx +140 -0
  16. package/project/client/core-components/button.jsx +139 -0
  17. package/project/client/core-components/original/dropdown.js +165 -0
  18. package/project/client/core-components/original/modal.js +358 -0
  19. package/project/client/core-components/original/popover.js +125 -0
  20. package/project/client/core-components/original/tooltip.js +677 -0
  21. package/project/client/css/breadcrump.css +28 -0
  22. package/project/client/css/button.css +139 -0
  23. package/project/client/css/group-popup.css +12 -0
  24. package/project/client/css/icons/icon-inline.css +4 -0
  25. package/project/client/css/icons/icon-markup.css +8 -0
  26. package/project/client/css/middle_button.css +12 -0
  27. package/project/client/css/mini_button.css +85 -0
  28. package/project/client/css/modal.css +4 -0
  29. package/project/client/css/original/bootstrap.css +6031 -0
  30. package/project/client/css/panel-dark.css +19 -0
  31. package/project/client/css/panel-light.css +19 -0
  32. package/project/client/css/popup.css +39 -0
  33. package/project/client/css/realtime-width.css +19 -0
  34. package/project/client/css/realtime-zoom.css +29 -0
  35. package/project/client/css/same_as_parent.css +12 -0
  36. package/project/client/css/scroll-list.css +47 -0
  37. package/project/client/css/tab-dark.css +85 -0
  38. package/project/client/css/tab-light.css +83 -0
  39. package/project/client/group.jsx +96 -0
  40. package/project/client/icons/file-icons.js +29 -0
  41. package/project/client/icons/folder-icons.js +34 -0
  42. package/project/client/icons-inline/const.js +15 -0
  43. package/project/client/icons-inline/icon-align.jsx +32 -0
  44. package/project/client/icons-inline/icon-checkbox.jsx +38 -0
  45. package/project/client/icons-inline/icon-communication-address.jsx +29 -0
  46. package/project/client/icons-inline/icon-communication-info.jsx +28 -0
  47. package/project/client/icons-inline/icon-communication-instance.jsx +28 -0
  48. package/project/client/icons-inline/icon-communication-ip.jsx +30 -0
  49. package/project/client/icons-inline/icon-communication-stack.jsx +28 -0
  50. package/project/client/icons-inline/icon-communication-transport.jsx +28 -0
  51. package/project/client/icons-inline/icon-communication.jsx +28 -0
  52. package/project/client/icons-inline/icon-con-connection-events.jsx +29 -0
  53. package/project/client/icons-inline/icon-con-message-events.jsx +29 -0
  54. package/project/client/icons-inline/icon-con-messages.jsx +46 -0
  55. package/project/client/icons-inline/icon-con-server-events.jsx +29 -0
  56. package/project/client/icons-inline/icon-debug-breakpoints-deactivate.jsx +28 -0
  57. package/project/client/icons-inline/icon-debug-breakpoints-remove.jsx +27 -0
  58. package/project/client/icons-inline/icon-debug-continue.jsx +27 -0
  59. package/project/client/icons-inline/icon-debug-enter.jsx +29 -0
  60. package/project/client/icons-inline/icon-debug-gui.jsx +36 -0
  61. package/project/client/icons-inline/icon-debug-ip.jsx +28 -0
  62. package/project/client/icons-inline/icon-debug-leave.jsx +29 -0
  63. package/project/client/icons-inline/icon-debug-pause.jsx +28 -0
  64. package/project/client/icons-inline/icon-debug-step-in.jsx +30 -0
  65. package/project/client/icons-inline/icon-debug-step-out.jsx +30 -0
  66. package/project/client/icons-inline/icon-debug-step-over.jsx +30 -0
  67. package/project/client/icons-inline/icon-debug-step.jsx +32 -0
  68. package/project/client/icons-inline/icon-doc-docs.jsx +31 -0
  69. package/project/client/icons-inline/icon-doc-documentation.jsx +32 -0
  70. package/project/client/icons-inline/icon-doc-education.jsx +32 -0
  71. package/project/client/icons-inline/icon-doc-markup-preview.jsx +30 -0
  72. package/project/client/icons-inline/icon-doc-markup.jsx +31 -0
  73. package/project/client/icons-inline/icon-doc-navigation-preview.jsx +33 -0
  74. package/project/client/icons-inline/icon-doc-navigation.jsx +34 -0
  75. package/project/client/icons-inline/icon-doc-video.jsx +47 -0
  76. package/project/client/icons-inline/icon-doc-workshop.jsx +32 -0
  77. package/project/client/icons-inline/icon-empty-line.jsx +27 -0
  78. package/project/client/icons-inline/icon-execution-as-service.jsx +34 -0
  79. package/project/client/icons-inline/icon-execution-clear.jsx +30 -0
  80. package/project/client/icons-inline/icon-execution-gui-slow.jsx +38 -0
  81. package/project/client/icons-inline/icon-execution-ip-slow.jsx +31 -0
  82. package/project/client/icons-inline/icon-execution-logs.jsx +32 -0
  83. package/project/client/icons-inline/icon-execution-play-slow.jsx +28 -0
  84. package/project/client/icons-inline/icon-execution-play.jsx +27 -0
  85. package/project/client/icons-inline/icon-execution-stop.jsx +27 -0
  86. package/project/client/icons-inline/icon-file-add.jsx +31 -0
  87. package/project/client/icons-inline/icon-file-delete.jsx +30 -0
  88. package/project/client/icons-inline/icon-file-new.jsx +27 -0
  89. package/project/client/icons-inline/icon-file-property.jsx +39 -0
  90. package/project/client/icons-inline/icon-file-save.jsx +30 -0
  91. package/project/client/icons-inline/icon-file-search.jsx +33 -0
  92. package/project/client/icons-inline/icon-files-save.jsx +35 -0
  93. package/project/client/icons-inline/icon-filter-hide.jsx +30 -0
  94. package/project/client/icons-inline/icon-filter-show.jsx +31 -0
  95. package/project/client/icons-inline/icon-filter.jsx +52 -0
  96. package/project/client/icons-inline/icon-folder-add.jsx +31 -0
  97. package/project/client/icons-inline/icon-folder-delete.jsx +30 -0
  98. package/project/client/icons-inline/icon-folder-new.jsx +27 -0
  99. package/project/client/icons-inline/icon-folder-property.jsx +39 -0
  100. package/project/client/icons-inline/icon-gui-event-action.jsx +29 -0
  101. package/project/client/icons-inline/icon-gui-event-function.jsx +27 -0
  102. package/project/client/icons-inline/icon-gui-event-info.jsx +29 -0
  103. package/project/client/icons-inline/icon-gui-event-instance.jsx +29 -0
  104. package/project/client/icons-inline/icon-gui-event-object.jsx +40 -0
  105. package/project/client/icons-inline/icon-gui-event-stack.jsx +37 -0
  106. package/project/client/icons-inline/icon-gui-events.jsx +34 -0
  107. package/project/client/icons-inline/icon-guid.jsx +24 -0
  108. package/project/client/icons-inline/icon-line-first.jsx +33 -0
  109. package/project/client/icons-inline/icon-line-last.jsx +31 -0
  110. package/project/client/icons-inline/icon-line-next-block.jsx +30 -0
  111. package/project/client/icons-inline/icon-line-next-line.jsx +30 -0
  112. package/project/client/icons-inline/icon-line-previous-block.jsx +30 -0
  113. package/project/client/icons-inline/icon-line-previous-line.jsx +29 -0
  114. package/project/client/icons-inline/icon-link.jsx +29 -0
  115. package/project/client/icons-inline/icon-markup-close.jsx +29 -0
  116. package/project/client/icons-inline/icon-markup-copy.jsx +28 -0
  117. package/project/client/icons-inline/icon-markup-help.jsx +28 -0
  118. package/project/client/icons-inline/icon-markup-open.jsx +30 -0
  119. package/project/client/icons-inline/icon-markup-save.jsx +29 -0
  120. package/project/client/icons-inline/icon-mode-dark.jsx +28 -0
  121. package/project/client/icons-inline/icon-mode-light.jsx +28 -0
  122. package/project/client/icons-inline/icon-not-implemented.jsx +28 -0
  123. package/project/client/icons-inline/icon-phase-data.jsx +26 -0
  124. package/project/client/icons-inline/icon-phase-execution.jsx +26 -0
  125. package/project/client/icons-inline/icon-phase-none.jsx +26 -0
  126. package/project/client/icons-inline/icon-phase-postcondition.jsx +26 -0
  127. package/project/client/icons-inline/icon-phase-precondition.jsx +26 -0
  128. package/project/client/icons-inline/icon-project-save.jsx +30 -0
  129. package/project/client/icons-inline/icon-repo.jsx +33 -0
  130. package/project/client/icons-inline/icon-resize-horizontal-decrease.jsx +30 -0
  131. package/project/client/icons-inline/icon-resize-horizontal-increase.jsx +31 -0
  132. package/project/client/icons-inline/icon-scroll-auto.jsx +37 -0
  133. package/project/client/icons-inline/icon-stack-event-info.jsx +27 -0
  134. package/project/client/icons-inline/icon-stack-event-instance.jsx +27 -0
  135. package/project/client/icons-inline/icon-stack-event-stack.jsx +27 -0
  136. package/project/client/icons-inline/icon-stack-events.jsx +32 -0
  137. package/project/client/icons-inline/icon-stage-create-static-ip-address.jsx +32 -0
  138. package/project/client/icons-inline/icon-stage-delete-static-ip-address.jsx +27 -0
  139. package/project/client/icons-inline/icon-stage-host.jsx +40 -0
  140. package/project/client/icons-inline/icon-stage-ping.jsx +29 -0
  141. package/project/client/icons-inline/icon-stage.jsx +37 -0
  142. package/project/client/icons-inline/icon-state-event-executed.jsx +25 -0
  143. package/project/client/icons-inline/icon-state-event-not-executed.jsx +25 -0
  144. package/project/client/icons-inline/icon-zoom-in.jsx +30 -0
  145. package/project/client/icons-inline/icon-zoom-out.jsx +30 -0
  146. package/project/client/icons-inline/icon.jsx +229 -0
  147. package/project/client/icons-inline/inner-icons/inner-icon-connection.jsx +27 -0
  148. package/project/client/icons-inline/inner-icons/inner-icon-file-delete.jsx +26 -0
  149. package/project/client/icons-inline/inner-icons/inner-icon-file-save.jsx +28 -0
  150. package/project/client/icons-inline/inner-icons/inner-icon-file.jsx +26 -0
  151. package/project/client/icons-inline/inner-icons/inner-icon-folder.jsx +28 -0
  152. package/project/client/icons-inline/inner-icons/inner-icon-gui.jsx +28 -0
  153. package/project/client/icons-inline/inner-icons/inner-icon-info-type.jsx +30 -0
  154. package/project/client/icons-inline/inner-icons/inner-icon-instance-type.jsx +32 -0
  155. package/project/client/icons-inline/inner-icons/inner-icon-item.jsx +27 -0
  156. package/project/client/icons-inline/inner-icons/inner-icon-message.jsx +26 -0
  157. package/project/client/icons-inline/inner-icons/inner-icon-project.jsx +29 -0
  158. package/project/client/icons-inline/inner-icons/inner-icon-server.jsx +27 -0
  159. package/project/client/icons-inline/inner-icons/inner-icon-stack-event.jsx +31 -0
  160. package/project/client/icons-inline/inner-icons/inner-icon-stack-type.jsx +31 -0
  161. package/project/client/icons-inline/inner-icons/inner-icon-state-event.jsx +38 -0
  162. package/project/client/image.jsx +80 -0
  163. package/project/client/marked-textarea.jsx +156 -0
  164. package/project/client/modal-body.jsx +27 -0
  165. package/project/client/modal-footer.jsx +27 -0
  166. package/project/client/modal-header.jsx +40 -0
  167. package/project/client/modal.jsx +71 -0
  168. package/project/client/popover.jsx +129 -0
  169. package/project/client/realtime-components/realtime-button.jsx +50 -0
  170. package/project/client/realtime-components/realtime-press-down-button.jsx +66 -0
  171. package/project/client/realtime-components/realtime-width/realtime-button-width-decrease.jsx +32 -0
  172. package/project/client/realtime-components/realtime-width/realtime-button-width-increase.jsx +32 -0
  173. package/project/client/realtime-components/realtime-width/realtime-width-const.js +12 -0
  174. package/project/client/realtime-components/realtime-width/realtime-width-display.jsx +26 -0
  175. package/project/client/realtime-components/realtime-width.jsx +52 -0
  176. package/project/client/realtime-components/realtime-zoom/realtime-button-zoom-in.jsx +42 -0
  177. package/project/client/realtime-components/realtime-zoom/realtime-button-zoom-out.jsx +42 -0
  178. package/project/client/realtime-components/realtime-zoom/realtime-zoom-const.js +10 -0
  179. package/project/client/realtime-components/realtime-zoom/realtime-zoom-display.jsx +27 -0
  180. package/project/client/realtime-components/realtime-zoom.jsx +52 -0
  181. package/project/client/scroll-list/scroll-list-cache.js +32 -0
  182. package/project/client/scroll-list/scroll-list-frame.js +358 -0
  183. package/project/client/scroll-list/scroll-list-node.js +107 -0
  184. package/project/client/scroll-list/scroll-list-template-data.js +13 -0
  185. package/project/client/scroll-list/scroll-list-zero-height.js +40 -0
  186. package/project/client/scroll-list/scroll-list.js +123 -0
  187. package/project/client/tab.jsx +30 -0
  188. package/project/client/tabs.jsx +191 -0
  189. package/project/z-abs-complayer-bootstrap-client.tree +204 -0
@@ -0,0 +1,358 @@
1
+
2
+ 'use strict';
3
+
4
+
5
+ class ScrollListFrame {
6
+ constructor(scrollList, scrollLeft) {
7
+ this.scrollList = scrollList;
8
+ this.scrollLeft = scrollLeft;
9
+
10
+ this.previousIndexFirst = 0;
11
+ this.previousIndexLast = 0;
12
+ this.zoom = 1.0;
13
+
14
+ this.contentTotalHeight = 0.0;
15
+ this.contentVisibleHeight = 0.0;
16
+ this.contentScrollHeight = 0.0;
17
+
18
+ this.contentVisibleHeightZoom = 0.0;
19
+ this.contentVisibleHeightDivSize = 0.0;
20
+ this.contentVisibleZoomDiffVisibleDivScrollHeight = 0.0;
21
+
22
+ this.contentTotalHeightChanged = true;
23
+ this.contentVisibleHeightChanged = true;
24
+ this.contentScrollPos = 0.0;
25
+ this.pendingScroll = false;
26
+
27
+ this.mouseDownPosition = 0.0;
28
+ this.mouseScrollPosition = 0.0;
29
+ this.mouseDown = false;
30
+ this.delta = 0.0;
31
+
32
+ this.listDivFrame = document.createElement('div');
33
+ this.listDivFrame.classList.add('scroll_list_frame');
34
+ this.listDivView = this.listDivFrame.appendChild(document.createElement('div'));
35
+ this.listDivView.classList.add('scroll_list_view');
36
+ this.listDivViewContent = this.listDivView.appendChild(document.createElement('div'));
37
+ this.listDivViewContent.classList.add('scroll_list_content');
38
+
39
+ this.listDivHide = this.listDivFrame.appendChild(document.createElement('div'));
40
+ this.listDivHide.classList.add('scroll_list_hide');
41
+
42
+ this.listDivScroller = this.listDivFrame.appendChild(document.createElement('div'));
43
+ this.listDivScroller.classList.add('scroll_list_scroller');
44
+ this.listDivFake = this.listDivScroller.appendChild(document.createElement('div'));
45
+ this.listDivFake.classList.add('scroll_list_fake');
46
+
47
+ this.boundMousedown = this._Mousedown.bind(this);
48
+ this.boundMousedup = this._Mouseup.bind(this);
49
+ this.boundMousemove = this._Mousemove.bind(this);
50
+ this.boundMousemoveView = this._MousemoveView.bind(this);
51
+ this.boundWheel = this._wheel.bind(this);
52
+ this.listDivHide.addEventListener('mousedown', this.boundMousedown, {capture: true, passive: true});
53
+ document.addEventListener('mouseup', this.boundMousedup, {capture: true, passive: true});
54
+ this.listDivView.addEventListener('wheel', this.boundWheel, {capture: true, passive: true});
55
+ if(this.scrollLeft) {
56
+ this.boundScroll = this._scrollHorizontal.bind(this);
57
+ this.listDivView.addEventListener('scroll', this.boundScroll, {capture: true, passive: true});
58
+ }
59
+ this.resizeObserver = new ResizeObserver((entries) => {
60
+ for(let i = 0; i < entries.length; ++i) {
61
+ const entry = entries[i];
62
+ if(this.listDivView === entry.target) {
63
+ this.contentVisibleHeightChanged = true;
64
+ if(0 !== entry.contentRect.height) {
65
+ this.contentVisibleHeight = entry.contentRect.height;
66
+ this.contentVisibleHeightZoom = this.contentVisibleHeight / this.zoom;
67
+ this.contentVisibleHeightDivSize = 0 !== this.contentVisibleHeight ? this.contentScrollHeight / this.contentVisibleHeight : 0;
68
+ this.contentVisibleZoomDiffVisibleDivScrollHeight = 0 !== this.contentScrollHeight ? (this.contentVisibleHeightZoom - this.contentVisibleHeight) / this.contentScrollHeight : 0;
69
+ }
70
+ else {
71
+ this.contentVisibleHeight = 0.0;
72
+ this.contentVisibleHeightZoom = 0.0;
73
+ this.contentVisibleHeightDivSize = 0;
74
+ this.contentVisibleZoomDiffVisibleDivScrollHeight = 0;
75
+ }
76
+ this.scrollList.requestRealtimeFrame(false, true);
77
+ return;
78
+ }
79
+ }
80
+ });
81
+ this.resizeObserver.observe(this.listDivView);
82
+ }
83
+
84
+ exit() {
85
+ this.listDivView.removeEventListener('wheel', this.boundWheel, {capture: true, passive: true});
86
+ document.removeEventListener('mouseup', this.boundMousedup, {capture: true, passive: true});
87
+ this.listDivHide.removeEventListener('mousedown', this.boundMousedown, {capture: true, passive: true});
88
+ if(this.scrollLeft) {
89
+ this.listDivHide.removeEventListener('scroll', this.boundScroll, {capture: true, passive: true});
90
+ }
91
+ this.resizeObserver.unobserve(this.listDivView);
92
+ }
93
+
94
+ clear() {
95
+ for(let i = this.previousIndexFirst; i <= this.previousIndexLast; ++i) {
96
+ const node = this.scrollList.allNodes[i];
97
+ if(node.visible(this.scrollList.scrollListTemplateData)) {
98
+ this.listDivViewContent.removeChild(node.getElement(this.scrollList, i));
99
+ node.removeElement(this.scrollList, i);
100
+ }
101
+ }
102
+ this.previousIndexFirst = 0;
103
+ this.previousIndexLast = 0;
104
+ }
105
+
106
+ _scroll(delta) {
107
+ const update = 0.0 === this.delta && 0.0 !== delta;
108
+ this.delta += delta;
109
+ if(update) {
110
+ this.scrollList.funcRenderRealtime([false, true]);
111
+ }
112
+ }
113
+
114
+ _Mousedown(e) {
115
+ this.mouseDown = true;
116
+ if(this.scrollList.autoScroll) {
117
+ this.scrollList.setAutoScroll(false);
118
+ }
119
+
120
+ this.mouseDownPosition = e.screenY;
121
+ this.mouseScrollPosition = this.contentScrollPos;
122
+ document.body.style.userSelect = "none";
123
+ this.listDivHide.addEventListener('mousemove', this.boundMousemove, {capture: true, passive: true});
124
+ document.addEventListener('mousemove', this.boundMousemoveView, {capture: true, passive: true});
125
+ }
126
+
127
+ _Mouseup(e) {
128
+ if(this.mouseDown) {
129
+ this.mouseDown = false;
130
+ document.body.style.userSelect = "auto";
131
+ }
132
+ }
133
+
134
+ _MousemoveView(e) {
135
+ if(this.mouseDown) {
136
+ this._Mousemove(e);
137
+ }
138
+ }
139
+
140
+ _Mousemove(e) {
141
+ if(1 !== e.buttons) {
142
+ document.removeEventListener('mousemove', this.boundMousemoveView, {capture: true, passive: true});
143
+ this.listDivHide.removeEventListener('mousemove', this.boundMousemove, {capture: true, passive: true});
144
+ return;
145
+ }
146
+ if(this.mouseDown) {
147
+ const delta = e.altKey ? (e.screenY - this.mouseDownPosition) / this.contentVisibleHeightDivSize : e.screenY - this.mouseDownPosition;
148
+ if(delta > 0.0) {
149
+ if(this.contentScrollPos === this.contentScrollHeight) {
150
+ return;
151
+ }
152
+ }
153
+ else {
154
+ if(0 === this.contentScrollPos) {
155
+ return;
156
+ }
157
+ }
158
+ this._scroll(delta);
159
+ this.mouseDownPosition = e.screenY;
160
+ }
161
+ }
162
+
163
+ _wheel(e) {
164
+ if(!e.ctrlKey) {
165
+ if(0 !== this.contentTotalHeight) {
166
+ const deltaStep = !e.altKey ? 100 : 1;
167
+ let delta = 0;
168
+ if(e.deltaY > 0.0) {
169
+ if(this.contentScrollPos === this.contentScrollHeight) {
170
+ return;
171
+ }
172
+ delta = deltaStep / this.contentVisibleHeightDivSize;
173
+ if(this.contentScrollPos + delta >= this.contentTotalHeight) {
174
+ this.contentScrollPos = this.contentTotalHeight;
175
+ }
176
+ }
177
+ else {
178
+ if(0 === this.contentScrollPos) {
179
+ return;
180
+ }
181
+ delta = -deltaStep / this.contentVisibleHeightDivSize;
182
+ if(this.contentScrollPos - delta <= 0) {
183
+ this.contentScrollPos = 0;
184
+ }
185
+ }
186
+ if(this.scrollList.autoScroll) {
187
+ this.scrollList.setAutoScroll(false);
188
+ }
189
+ this._scroll(delta);
190
+ }
191
+ }
192
+ }
193
+
194
+ _scrollHorizontal(e) {
195
+ if(this.mouseDown) {
196
+ if(e.target.scrollLeft !== e.target.dataset.lastScrollLeft) {
197
+ e.target.dataset.lastScrollLeft = e.target.scrollLeft;
198
+ }
199
+ else if(e.currentTarget) {
200
+ this.scrollLeft(e.currentTarget.scrollLeft);
201
+ }
202
+ }
203
+ }
204
+
205
+ _findindex(pos) {
206
+ const allNodes = this.scrollList.allNodes;
207
+ let left = 0;
208
+ let right = allNodes.length - 1;
209
+ let mid = 0;
210
+ while(left <= right) {
211
+ mid = (left + right) >> 1;
212
+ const node = allNodes[mid];
213
+ if(node.getStartPos(this.scrollList.scrollListTemplateData) <= pos && (node.getStopPos(this.scrollList.scrollListTemplateData) >= pos)) {
214
+ return mid;
215
+ }
216
+ else if(node.getStartPos(this.scrollList.scrollListTemplateData) < pos && (node.getStopPos(this.scrollList.scrollListTemplateData) < pos)) {
217
+ left = mid + 1;
218
+ }
219
+ else {
220
+ right = mid - 1;
221
+ }
222
+ }
223
+ return mid;
224
+ }
225
+
226
+ realtimeFrameCalculate(size) {
227
+ if(this.contentTotalHeight !== size) {
228
+ this.contentTotalHeightChanged = true;
229
+ this.contentTotalHeight = size;
230
+ }
231
+ if(this.contentTotalHeightChanged || this.contentVisibleHeightChanged) {
232
+ this.contentScrollHeight = Math.max(this.contentTotalHeight - this.contentVisibleHeight, 0.0);
233
+ this.contentVisibleHeightDivSize = 0 !== this.contentVisibleHeight ? this.contentScrollHeight / this.contentVisibleHeight : 0;
234
+ this.contentVisibleZoomDiffVisibleDivScrollHeight = 0 !== this.contentScrollHeight ? (this.contentVisibleHeightZoom - this.contentVisibleHeight) / this.contentScrollHeight : 0;
235
+ }
236
+ this.mouseScrollPosition += this.delta * this.contentVisibleHeightDivSize;
237
+ if(this.mouseScrollPosition <= 0) {
238
+ this.contentScrollPos = 0;
239
+ this.mouseScrollPosition = 0;
240
+ }
241
+ else if(this.mouseScrollPosition >= this.contentScrollHeight) {
242
+ this.contentScrollPos = this.contentScrollHeight;
243
+ this.mouseScrollPosition = this.contentScrollHeight;
244
+ }
245
+ else {
246
+ this.contentScrollPos = this.mouseScrollPosition;
247
+ }
248
+ this.delta = 0.0;
249
+ }
250
+
251
+ setZoom(zoom) {
252
+ this.zoom = zoom;
253
+ this.contentVisibleHeightZoom = this.contentVisibleHeight / this.zoom;
254
+ this.contentVisibleZoomDiffVisibleDivScrollHeight = 0 !== this.contentScrollHeight ? (this.contentVisibleHeightZoom - this.contentVisibleHeight) / this.contentScrollHeight : 0;
255
+ }
256
+
257
+ realtimeFrameRender(pos, force) {
258
+ if(!this.pendingScroll) {
259
+ const allNodes = this.scrollList.allNodes;
260
+ let lastPos = 0;
261
+ let firstPos = 0;
262
+ if(this.zoom === 1.0) {
263
+ firstPos = pos;
264
+ lastPos = pos + this.contentVisibleHeight;
265
+ }
266
+ else if(this.zoom < 1.0) {
267
+ const deltaDiff = this.contentVisibleZoomDiffVisibleDivScrollHeight * pos;
268
+ firstPos = Math.max(pos - deltaDiff, 0);
269
+ lastPos = pos + this.contentVisibleHeightZoom;
270
+ }
271
+ else if(this.zoom > 1.0) {
272
+ const deltaDiff = this.contentVisibleZoomDiffVisibleDivScrollHeight * pos;
273
+ firstPos = Math.max(pos - deltaDiff, 0);
274
+ lastPos = pos + this.contentVisibleHeight;
275
+ }
276
+ const indexFirst = this._findindex(firstPos);
277
+ const indexLast = this._findindex(lastPos);
278
+ if(force || (this.previousIndexFirst !== indexFirst || this.previousIndexLast !== indexLast)) {
279
+ for(let i = this.previousIndexFirst; i < indexFirst; ++i) {
280
+ const node = allNodes[i];
281
+ if(node.rendered(this.scrollList, i)) {
282
+ this.listDivViewContent.removeChild(node.getElement(this.scrollList, i));
283
+ node.removeElement(this.scrollList, i, force);
284
+ }
285
+ }
286
+ for(let i = indexLast + 1; i <= this.previousIndexLast; ++i) {
287
+ const node = allNodes[i];
288
+ if(node.rendered(this.scrollList, i)) {
289
+ this.listDivViewContent.removeChild(node.getElement(this.scrollList, i));
290
+ node.removeElement(this.scrollList, i, force);
291
+ }
292
+ }
293
+ let previousNodeIndex = -1;
294
+ for(let i = indexFirst; i <= indexLast; ++i) {
295
+ const node = allNodes[i];
296
+ if(node.rendered(this.scrollList, i)) {
297
+ if(!node.visible(this.scrollList.scrollListTemplateData)) {
298
+ this.listDivViewContent.removeChild(node.getElement(this.scrollList, i));
299
+ node.removeElement(this.scrollList, i, force);
300
+ }
301
+ else {
302
+ if(force) {
303
+ const oldElement = node.getElement(this.scrollList, i);
304
+ node.removeElement(this.scrollList, i, force);
305
+ const newElement = node.createElement(this.scrollList, i);
306
+ this.listDivViewContent.replaceChild(newElement, oldElement);
307
+ }
308
+ previousNodeIndex = i;
309
+ }
310
+ }
311
+ else {
312
+ if(node.visible(this.scrollList.scrollListTemplateData)) {
313
+ const element = node.createElement(this.scrollList, i);
314
+ if(-1 !== previousNodeIndex) {
315
+ node.getElement(this.scrollList, previousNodeIndex).after(element);
316
+ }
317
+ else {
318
+ this.listDivViewContent.prepend(element);
319
+ }
320
+ previousNodeIndex = i;
321
+ }
322
+ }
323
+ }
324
+ this.previousIndexFirst = indexFirst;
325
+ this.previousIndexLast = indexLast;
326
+ const translatY = Math.floor((allNodes[indexFirst].getStartPos(this.scrollList.scrollListTemplateData) - firstPos) * this.zoom);
327
+ this.listDivViewContent.setAttribute('style', `transform:translateY(${translatY}px) scale(${this.zoom});`);
328
+ }
329
+ if(this.contentTotalHeightChanged || force || this.contentVisibleHeightChanged) {
330
+ this.contentTotalHeightChanged = false;
331
+ this.listDivFake.setAttribute('style', `height:${this.contentTotalHeight}px;`);
332
+ this.contentVisibleHeightChanged = false;
333
+ this.listDivScroller.setAttribute('style', `height:${this.contentVisibleHeight}px;`);
334
+ if(this.scrollList.autoScroll) {
335
+ this.mouseScrollPosition = this.contentScrollHeight;
336
+ this.contentScrollPos = this.contentScrollHeight;
337
+ this.pendingScroll = true;
338
+ setTimeout(() => {
339
+ this.listDivScroller.scrollTop = this.contentScrollPos;
340
+ this.pendingScroll = false;
341
+ });
342
+ }
343
+ else {
344
+ if(this.listDivScroller.scrollTop !== this.contentScrollPos) {
345
+ this.pendingScroll = true;
346
+ setTimeout(() => {
347
+ this.listDivScroller.scrollTop = this.contentScrollPos;
348
+ this.pendingScroll = false;
349
+ });
350
+ }
351
+ }
352
+ }
353
+ }
354
+ }
355
+ }
356
+
357
+
358
+ module.exports = ScrollListFrame;
@@ -0,0 +1,107 @@
1
+
2
+ 'use strict';
3
+
4
+
5
+ class ScrollListNode {
6
+ #BUILD_DEBUG_START
7
+ static ddmGroup = null;
8
+
9
+ static {
10
+ ScrollListNode.ddmGroup = ddm.addGroup('ScrollListNode');
11
+ }
12
+ #BUILD_DEBUG_STOP
13
+
14
+ constructor(bufferData) {
15
+ this.bufferData = bufferData;
16
+ #BUILD_DEBUG_START
17
+ ddm.register(this, ScrollListNode.ddmGroup);
18
+ #BUILD_DEBUG_STOP
19
+ }
20
+
21
+ rendered(scrollList, index) {
22
+ return scrollList.createdNodes.has(index);
23
+ }
24
+
25
+ visible(scrollListTemplateData) {
26
+ return 0 !== this.getHeight(scrollListTemplateData);
27
+ }
28
+
29
+ setInit(scrollListTemplateData, startPos, templateId) {
30
+ const height = scrollListTemplateData.templates[templateId].calculateHeight(this.bufferData);
31
+ scrollListTemplateData.dataScrollListNode.storeRenderData(this.bufferData, startPos, height, templateId);
32
+ }
33
+
34
+ getStartPos(scrollListTemplateData) {
35
+ return scrollListTemplateData.dataScrollListNode.restoreRenderDataStartPos(this.bufferData);
36
+ }
37
+
38
+ setStartPos(scrollListTemplateData, startPos) {
39
+ scrollListTemplateData.dataScrollListNode.storeRenderDataStartPos(this.bufferData, startPos);
40
+ return startPos;
41
+ }
42
+
43
+ getHeight(scrollListTemplateData) {
44
+ return scrollListTemplateData.dataScrollListNode.restoreRenderDataHeight(this.bufferData);
45
+ }
46
+
47
+ setHeight(scrollListTemplateData, height) {
48
+ scrollListTemplateData.dataScrollListNode.storeRenderDataHeight(this.bufferData, height);
49
+ return height;
50
+ }
51
+
52
+ getStopPos(scrollListTemplateData) {
53
+ return this.getStartPos(scrollListTemplateData) + this.getHeight(scrollListTemplateData);
54
+ }
55
+
56
+ getTemplateId(scrollListTemplateData) {
57
+ return scrollListTemplateData.dataScrollListNode.restoreRenderDataTemplateId(this.bufferData);
58
+ }
59
+
60
+ calculateHeight(scrollListTemplateData) {
61
+ const templateId = scrollListTemplateData.dataScrollListNode.restoreRenderDataTemplateId(this.bufferData);
62
+ return scrollListTemplateData.templates[templateId].calculateHeight(this.bufferData);
63
+ }
64
+
65
+ createElement(scrollList, index) {
66
+ const templateId = scrollList.scrollListTemplateData.dataScrollListNode.restoreRenderDataTemplateId(this.bufferData);
67
+ const template = scrollList.scrollListTemplateData.templates[templateId];
68
+ let renderingData = scrollList.createdNodes.get(index);
69
+ if(!renderingData) {
70
+ const data = template.restore(this.bufferData);
71
+ renderingData = {
72
+ data: data,
73
+ element: scrollList.cache.get(data)
74
+ };
75
+ scrollList.createdNodes.set(index, renderingData);
76
+ if(!renderingData.element) {
77
+ renderingData.element = template.createElement(renderingData.data, this.bufferData);
78
+ }
79
+ renderingData.element.setAttribute('data-index', index);
80
+ template.setElementData(renderingData.data, renderingData.element);
81
+ const height = this.calculateHeight(scrollList.scrollListTemplateData);
82
+ if(height !== template.defaultHeight) {
83
+ renderingData.element.setAttribute('style', `height: ${height}px !important;`);
84
+ }
85
+ }
86
+ return renderingData.element;
87
+ }
88
+
89
+ removeElement(scrollList, index, force) {
90
+ const renderingData = scrollList.createdNodes.get(index);
91
+ scrollList.createdNodes.delete(index);
92
+ if(!force) {
93
+ scrollList.cache.set(renderingData.data, renderingData.element);
94
+ }
95
+ const templateId = scrollList.scrollListTemplateData.dataScrollListNode.restoreRenderDataTemplateId(this.bufferData);
96
+ const template = scrollList.scrollListTemplateData.templates[templateId];
97
+ template.removeElement(renderingData.data, renderingData.element);
98
+ renderingData.data.destroy();
99
+ }
100
+
101
+ getElement(scrollList, index) {
102
+ return scrollList.createdNodes.get(index).element;
103
+ }
104
+ }
105
+
106
+
107
+ module.exports = ScrollListNode;
@@ -0,0 +1,13 @@
1
+
2
+ 'use strict';
3
+
4
+
5
+ class ScrollListTemplateData {
6
+ constructor(templates, dataScrollListNode) {
7
+ this.templates = templates;
8
+ this.dataScrollListNode = dataScrollListNode;
9
+ }
10
+ }
11
+
12
+
13
+ module.exports = ScrollListTemplateData;
@@ -0,0 +1,40 @@
1
+
2
+ 'use strict';
3
+
4
+
5
+ class ScrollListZeroHeight {
6
+ constructor() {}
7
+
8
+ rendered(scrollList, index) {
9
+ return false;
10
+ }
11
+
12
+ visible() {
13
+ return false;
14
+ }
15
+
16
+ setInit(scrollListTemplateData) {}
17
+
18
+ getStartPos() {
19
+ return 0;
20
+ }
21
+
22
+ setStartPos(startPos) {
23
+ return 0;
24
+ }
25
+
26
+ getStopPos() {
27
+ return 0;
28
+ }
29
+
30
+ getTemplateId(scrollListTemplateData) {
31
+ return -1;
32
+ }
33
+
34
+ calculateHeight(scrollListTemplateData) {
35
+ return 0;
36
+ }
37
+ }
38
+
39
+
40
+ module.exports = new ScrollListZeroHeight();
@@ -0,0 +1,123 @@
1
+
2
+ 'use strict';
3
+
4
+ import ScrollListCache from './scroll-list-cache';
5
+ import ScrollListFrame from './scroll-list-frame';
6
+ import ScrollListZeroHeight from './scroll-list-zero-height';
7
+
8
+
9
+ class ScrollList {
10
+ constructor(name, scrollListTemplateData, cbAutoScroll, funcRenderRealtime, cbScrollLeft, cache) {
11
+ this.name = name;
12
+ this.scrollListTemplateData = scrollListTemplateData;
13
+ this.cbAutoScroll = cbAutoScroll;
14
+ this.funcRenderRealtime = funcRenderRealtime;
15
+ this.autoScroll = true;
16
+ this.zoom = 1.0;
17
+ this.scrollListFrame = new ScrollListFrame(this, cbScrollLeft);
18
+ this.allNodes = [ScrollListZeroHeight];
19
+ this.createdNodes = new Map();
20
+ this.isActive = false;
21
+ this.sizeTransform = 0.0;
22
+ this.cache = cache;
23
+ }
24
+
25
+ print() {
26
+ this.allNodes.forEach((n) => {
27
+ n.print();
28
+ });
29
+ }
30
+
31
+ init(scrollDiv, autoScroll, zoom) {
32
+ scrollDiv.appendChild(this.scrollListFrame.listDivFrame);
33
+ this.autoScroll = autoScroll;
34
+ this.zoom = zoom;
35
+ this._clear();
36
+ }
37
+
38
+ update(autoScroll, zoom, recalculate) {
39
+ const renderRealtime = this.autoScroll !== autoScroll || this.zoom !== zoom;
40
+ this.autoScroll = autoScroll;
41
+ if(this.zoom !== zoom) {
42
+ this.scrollListFrame.setZoom(zoom);
43
+ this.zoom = zoom;
44
+ }
45
+ if(recalculate) {
46
+ this.recalculate();
47
+ this.funcRenderRealtime([false, true]);
48
+ }
49
+ else if(renderRealtime) {
50
+ this.funcRenderRealtime([false, true]);
51
+ }
52
+ }
53
+
54
+ active(isActive) {
55
+ this.isActive = isActive;
56
+ }
57
+
58
+ exit() {
59
+ this.scrollListFrame.exit();
60
+ }
61
+
62
+ _clear() {
63
+ this.scrollListFrame.clear();
64
+ this.allNodes = [ScrollListZeroHeight];
65
+ ScrollListCache.clear();
66
+ this.funcRenderRealtime([true, false], () => {
67
+ this.scrollListFrame.realtimeFrameCalculate(0);
68
+ this.scrollListFrame.realtimeFrameRender(0);
69
+ });
70
+ }
71
+
72
+ add(node, templateId) {
73
+ if(node) {
74
+ const allNodes = this.allNodes;
75
+ const previous = allNodes[allNodes.length - 1];
76
+ node.setInit(this.scrollListTemplateData, previous.getStopPos(this.scrollListTemplateData), templateId);
77
+ allNodes.push(node);
78
+ }
79
+ }
80
+
81
+ recalculate() {
82
+ const allNodes = this.allNodes;
83
+ let prev = allNodes[0];
84
+ allNodes.forEach((e, i, b) => {
85
+ const templateId = b[i].getTemplateId(this.scrollListTemplateData);
86
+ b[i].setInit(this.scrollListTemplateData, prev.getStopPos(this.scrollListTemplateData), templateId);
87
+ prev = b[i];
88
+ });
89
+ }
90
+
91
+ refresh() {
92
+ this.funcRenderRealtime([false, true]);
93
+ }
94
+
95
+ setAutoScroll(autoScroll) {
96
+ if(autoScroll !== this.autoScroll) {
97
+ this.autoScroll = autoScroll;
98
+ setTimeout(this.cbAutoScroll, 0, autoScroll);
99
+ }
100
+ }
101
+
102
+ requestRealtimeFrame(clear, force) {
103
+ this.funcRenderRealtime([clear, force]);
104
+ }
105
+
106
+ renderRealtimeFrame(timestamp, clear, force) {
107
+ if(!clear) {
108
+ if(this.isActive) {
109
+ const allNodes = this.allNodes;
110
+ const lastNode = allNodes[allNodes.length - 1];
111
+ this.scrollListFrame.realtimeFrameCalculate(lastNode.getStopPos(this.scrollListTemplateData));
112
+ const pos = this.autoScroll ? this.scrollListFrame.contentScrollHeight : this.scrollListFrame.contentScrollPos;
113
+ this.scrollListFrame.realtimeFrameRender(pos, force);
114
+ }
115
+ }
116
+ else {
117
+ this._clear();
118
+ }
119
+ }
120
+ }
121
+
122
+
123
+ module.exports = ScrollList;
@@ -0,0 +1,30 @@
1
+
2
+ 'use strict';
3
+
4
+ import ReactComponentBase from 'z-abs-corelayer-client/client/react-component/react-component-base';
5
+ import GuidGenerator from 'z-abs-corelayer-cs/clientServer/guid-generator';
6
+ import React from 'react';
7
+
8
+
9
+ class Tab extends ReactComponentBase {
10
+ constructor(props) {
11
+ super(props);
12
+ this.id = props.id ? props.id : GuidGenerator.create();
13
+ }
14
+
15
+ shouldUpdate(nextProps, nextState) {
16
+ return !this.shallowCompare(this.props.children, nextProps.children)
17
+ || !this.shallowCompare(this.props.overflowScroll, nextProps.overflowScroll);
18
+ }
19
+
20
+ render() {
21
+ return (
22
+ <React.Fragment key={this.id}>
23
+ {this.props.children}
24
+ </React.Fragment>
25
+ );
26
+ }
27
+ }
28
+
29
+
30
+ module.exports = Tab;