gantt-source_management 3.37.9 → 3.39.1

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.
package/README.md CHANGED
@@ -1,129 +1 @@
1
- <h1 align="center">gantt-schedule-timeline-calendar</h1>
2
-
3
- <h2 align="center">Gantt, schedule, timeline and calendar components all in one!</h2>
4
-
5
- <p align="center">
6
- <img src="https://neuronet.io/screenshots/mainapp.jpg" alt="gantt-schedule-timeline-calendar">
7
- </p>
8
-
9
- <h3>gantt-schedule-timeline-calendar is all-in-one component that you can use in different scenarios.</h3>
10
- Keywords: [ gantt, javascript gantt, typescript gantt, project manager, js gantt, js scheduler, js timeline, javascript timeline, javascript schedule, js scheduler, javascript calendar ]
11
- <br/><br/><br/>
12
- <p align="center">
13
- <img src="https://img.shields.io/npm/v/gantt-schedule-timeline-calendar.svg">
14
- <img src="https://snyk.io/test/github/neuronetio/gantt-schedule-timeline-calendar/badge.svg">
15
- <img src="https://app.codacy.com/project/badge/Grade/732e0ef156344594b48584af97ba1e4a">
16
- <img src="https://neuronet.io/screenshots/typescript.svg">
17
- <img src="https://neuronet.io/screenshots/eslint.svg">
18
- <img src="https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/qdqmtw/master&style=flat&logo=cypress">
19
- <img src="https://api.travis-ci.com/neuronetio/gantt-schedule-timeline-calendar.svg?branch=master">
20
- <img src="https://img.shields.io/npm/dm/gantt-schedule-timeline-calendar.svg">
21
- <!--<img src="https://img.badgesize.io/neuronetio/gantt-schedule-timeline-calendar/master/dist/gstc.esm.min.js?compression=gzip">-->
22
- </p>
23
- <br>
24
- <br />
25
- <h3 align="center">And always remember, to leave a <a href="https://github.com/neuronetio/gantt-schedule-timeline-calendar">star :star:</a></h3>
26
- <br />
27
-
28
- <h2 align="center">FEATURES</h2>
29
-
30
- - elastic - you can change almost everything from DOM tree to logic (without any compilation, without modifying original code - with config, state or plugin)
31
- - super fast! even with large dataset
32
- - multiple items in one row - suitable for various applications like booking, reservation, resource manager, multimedia editor etc.
33
- - tree like structures - collapsible / expandable groups
34
- - moveable / resizable items with ability to configure which items can move at the moment and how
35
- - secure html templates
36
- - snap to specified time when resizing / moving
37
- - templates & slots support to easily change html content of each component
38
- - background grid on which you can place your html content
39
- - selectable cells and items with a choice of what can be selected at the moment
40
- - gradual time zoom up to seconds
41
- - resizable list columns (in realtime)
42
- - sortable and searchable list columns
43
- - BEM based CSS rules (easy to change appearance)
44
- - you can easily add third party libraries
45
- - highly configurable
46
- - mobile ready
47
- - Daylight saving time (DST) support
48
- - plugins support
49
- - attractive visually
50
- - written in typescript
51
- - offline license key (after purchase)
52
-
53
- <p>
54
- You can use it in <strong>react</strong>, <strong>vue</strong>, <strong>angular</strong>, <strong>svelte</strong> or any other projects.
55
- </p>
56
-
57
- <p>
58
- You can use it as <strong>schedule</strong> for reservation system. You can use it for organizing <strong>events</strong>. You can use it as <strong>gantt chart</strong>. You can use it as <strong>calendar</strong> for different purposes.
59
- You can even use it as a <strong>multimedia timeline editor</strong>!
60
- </p>
61
-
62
- <p>
63
- <strong>gantt-schedule-timeline-calendar</strong> is very extensible and elastic. You can make your own plugins or modify configuration in couple of ways to achieve your goals.
64
- You can control almost everything. You can change html structure, stylize every html element and even override original components without any compilation stage!
65
- </p>
66
-
67
- <h2 align="center">EXAMPLES</h2>
68
-
69
- <a href="https://gantt-schedule-timeline-calendar.neuronet.io/examples" target="_blank">Online examples</a>
70
-
71
- You can checkout [examples folder](https://github.com/neuronetio/gantt-schedule-timeline-calendar/tree/master/examples) too.
72
- To run examples locally, clone this repository and run `npm run examples` in the root folder.
73
- ```bash
74
- git clone https://github.com/neuronetio/gantt-schedule-timeline-calendar.git
75
- cd gantt-schedule-timeline-calendar
76
- npm i
77
- npm run examples
78
- ```
79
-
80
- <h2 align="center">REACT, NEXTJS, ANGULAR, SVELTE AND VUE EXAMPLES</h2>
81
-
82
- - [react gantt-schedule-timeline-calendar usage example](https://github.com/neuronetio/react-gantt-schedule-timeline-calendar-example)
83
- - [nextjs/react gantt-schedule-timeline-calendar usage example](https://github.com/neuronetio/nextjs-gantt-schedule-timeline-calendar-example)
84
- - [angular gantt-schedule-timeline-calendar usage example](https://github.com/neuronetio/angular-gantt-schedule-timeline-calendar-example)
85
- - [vue gantt-schedule-timeline-calendar usage example](https://github.com/neuronetio/vue-gantt-schedule-timeline-calendar-example)
86
- - [vue3 composition api with vite gantt-schedule-timeline-calendar example](https://github.com/neuronetio/vue3-vite-gantt-schedule-timeline-calendar-example)
87
- - [svelte gantt-schedule-timeline-calendar usage example](https://github.com/neuronetio/svelte-gantt-schedule-timeline-calendar-example)
88
-
89
- <h2 align="center">SCREENSHOTS</h2>
90
-
91
- <p align="center">
92
- <img src="https://neuronet.io/screenshots/item-types.png" alt="gantt-schedule-timeline-calendar item types">
93
- <br />
94
- <img src="https://neuronet.io/screenshots/item-types-selected.png" alt="gantt-schedule-timeline-calendar item types">
95
- <br />
96
- <img src="https://neuronet.io/screenshots/item-types-selected-2.png" alt="gantt-schedule-timeline-calendar item types">
97
- <br />
98
- <img src="https://neuronet.io/screenshots/select-cells.gif" alt="gantt-schedule-timeline-calendar select cells">
99
- <br />
100
- <img src="https://neuronet.io/screenshots/linked-items-2.gif" alt="gantt-schedule-timeline-calendar linked items">
101
- <br />
102
- <img src="https://neuronet.io/screenshots/select-items.gif" alt="gantt-schedule-timeline-calendar select items">
103
- <br />
104
- <img src="https://neuronet.io/screenshots/linked-items.gif" alt="gantt-schedule-timeline-calendar linked-items 2">
105
- </p>
106
- <hr />
107
-
108
- <h2 align="center">INSTALL</h2>
109
-
110
- `npm i gantt-schedule-timeline-calendar`
111
-
112
- or
113
-
114
- `<script src="https://cdn.jsdelivr.net/npm/gantt-schedule-timeline-calendar/dist/gstc.wasm.umd.min.js"></script>`
115
-
116
- <h2 align="center">DOCUMENTATION</h2>
117
-
118
- [Documentation can be found here](https://gantt-schedule-timeline-calendar.neuronet.io)
119
-
120
- <h2 align="center">NEED HELP?</h2>
121
-
122
- Let us know neuronet.io@gmail.com
123
-
124
- <h2 align="center">LICENSE</h2>
125
-
126
- [NEURONET Free / Trial License Terms](https://github.com/neuronetio/gantt-schedule-timeline-calendar/blob/master/LICENSE)
127
-
128
- You can generate [free or trial license key here](https://gstc.neuronet.io/free-key).
129
- If you need a full commercial license, please visit [pricing page](https://gantt-schedule-timeline-calendar.neuronet.io/pricing).
1
+ <h1 align="center">gantt-resource-management</h1>
@@ -539,87 +539,73 @@ class a {
539
539
  }
540
540
  }
541
541
  selectItemsIndividually(i) {
542
- if (
543
- ((this.data.isSelecting = !1),
544
- (this.data.selectionAreaLocal = this.getSelectionAreaLocal(i)),
545
- (this.data.currentPosition = i.currentPosition),
546
- (this.data.initialPosition = i.initialPosition),
547
- !this.data.items || i.type !== 'down'
548
- )
549
- )
550
- return;
542
+ this.data.isSelecting = false;
543
+ this.data.selectionAreaLocal = this.getSelectionAreaLocal(i);
544
+ this.data.currentPosition = i.currentPosition;
545
+ this.data.initialPosition = i.initialPosition;
546
+
547
+ if (!this.data.items) return;
551
548
  if (!this.canSelect()) return;
552
549
  if (!i.targetData) return;
553
- const s = this.merge({}, i.targetData),
554
- a = this.api.getItemData(s.id);
555
- if (!a)
556
- throw (
557
- (console.error(
558
- '"config.chart.items"',
559
- this.state.get("config.chart.items"),
560
- ),
561
- console.error(
562
- '"$data.chart.items"',
563
- this.state.get("$data.chart.items"),
564
- ),
565
- new Error(
566
- `Item with id"${s.id}"does not exists in"$data.chart.items".TIP:For performance reasons,state is mutable,so try not to modify items from the"state.get"method before you copy them(with"gstc.api.clone(items)"for example).`,
567
- ))
568
- );
569
- if (this.data.selected[e].includes(s.id)){
570
550
 
551
+ const s = this.merge({}, i.targetData);
552
+ const a = this.api.getItemData(s.id);
553
+ if (!a) {
554
+ console.error('"config.chart.items"', this.state.get("config.chart.items"));
555
+ console.error('"$data.chart.items"', this.state.get("$data.chart.items"));
556
+ throw new Error(`Item with id "${s.id}" does not exists in "$data.chart.items". TIP:For performance reasons, state is mutable, so try not to modify items from the "state.get" method before you copy them.`);
557
+ }
558
+
559
+ if (this.data.selected[e].includes(s.id)) {
560
+ if (i.type !== 'up') {
561
+ return;
562
+ }
563
+ if (i.isMoving) {
564
+ return;
565
+ }
571
566
  if (this.isMulti()) {
572
- // 多选模式下,从已选择列表中移除该项目
573
567
  this.data.selected[e] = this.data.selected[e].filter((itemId) => itemId !== s.id);
574
568
  this.data.automaticallySelected[e] = this.data.automaticallySelected[e].filter((itemId) => itemId !== s.id);
575
569
  } else {
576
- // 单选模式下,清空已选择列表
577
570
  this.data.selected[e] = [];
578
571
  this.data.selected[t] = [];
579
572
  this.data.automaticallySelected[e] = [];
580
573
  }
581
- // 记录最后一次选择的状态
582
- this.data.lastSelecting = {
583
- [e]: [...this.data.selected[e]],
584
- [t]: [...this.data.selected[t]],
585
- };
586
574
 
575
+ this.data.lastSelecting = {
576
+ [e]: [...this.data.selected[e]],
577
+ [t]: [...this.data.selected[t]]
578
+ };
587
579
 
588
- // 更新状态
589
580
  let c = this.state.multi(true);
590
581
  c = this.updateCells(c);
591
582
  c = this.updateItems(c);
592
583
  c.done();
593
-
584
+ this.updateData();
594
585
  return;
595
586
  }
587
+
596
588
  let { selected: l, automaticallySelected: n } = this.getSelectedItem(s);
597
- l.length > 1 && !this.data.multipleSelection && ((l = [s.id]), (n = [])),
598
- this.isMulti()
599
- ? a.selected
600
- ? (this.data.selected[e] = l.filter(
601
- (t) => t !== s.id && !n.includes(t),
602
- ))
603
- : (this.data.selected[e] = l)
604
- : ((this.data.selected[e] = l), (this.data.selected[t].length = 0)),
605
- (this.data.automaticallySelected[e] = n),
606
- (this.data.lastSelecting = {
607
- [e]: [],
608
- [t]: [],
609
- }),
610
- (this.data.selected = this.onSelected(
611
- this.api.mergeDeep({}, this.data.selected),
612
- this.api.mergeDeep({}, this.data.lastSelected),
613
- )
589
+ l.length > 1 && !this.data.multipleSelection && ((l = [s.id]), (n = []));
590
+ this.isMulti()
591
+ ? a.selected
592
+ ? (this.data.selected[e] = l.filter((t) => t !== s.id && !n.includes(t)))
593
+ : (this.data.selected[e] = l)
594
+ : ((this.data.selected[e] = l), (this.data.selected[t].length = 0));
595
+ this.data.automaticallySelected[e] = n;
596
+ this.data.lastSelecting = {
597
+ [e]: [],
598
+ [t]: [],
599
+ };
600
+ this.data.selected = this.onSelected(
601
+ this.api.mergeDeep({}, this.data.selected),
602
+ this.api.mergeDeep({}, this.data.lastSelected),
614
603
  );
615
- //
616
- this.data.selected[e] = [];
617
- this.data.selected[t] = [];
618
- this.data.automaticallySelected[e] = [];
619
- ////////
604
+
620
605
  let c = this.state.multi(!0);
621
606
  (c = this.updateCells(c)), (c = this.updateItems(c)), c.done();
622
607
  }
608
+
623
609
  removeMultiUnselected(t) {
624
610
  const e = this.data.selected[t].filter((e) =>
625
611
  this.data.selecting[t].includes(e),
package/dist/style.css CHANGED
@@ -462,7 +462,7 @@ body.gstc-scrolling * {
462
462
  vertical-align: middle;
463
463
  overflow: hidden;
464
464
  border-right: 1px solid rgba(237,241,242,0.75);
465
- border-bottom: 1px solid rgba(237,241,242,0.75);
465
+ border-bottom: 1px solid rgba(0, 0, 0, 0.5);
466
466
  touch-action: none;
467
467
  height: 100%;
468
468
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-source_management",
3
- "version": "3.37.9",
3
+ "version": "3.39.1",
4
4
  "description": "Gantt, Schedule, ",
5
5
  "main": "dist/gstc.wasm.esm.min.js",
6
6
  "module": "dist/gstc.wasm.esm.min.js",