@vmscloud/moz-ui-gantt-core 0.2.0 → 0.3.0
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/dist/Interactions.d.ts +48 -3
- package/dist/MozGantt.d.ts +162 -9
- package/dist/gantt/GanttCanvasRenderer.d.ts +140 -8
- package/dist/gantt/GanttColorRules.d.ts +98 -0
- package/dist/gantt/GanttEditor.d.ts +63 -3
- package/dist/gantt/GanttLegend.d.ts +48 -0
- package/dist/gantt/GanttMetrics.d.ts +110 -0
- package/dist/gantt/GanttRowHeaders.d.ts +25 -0
- package/dist/gantt/GanttSelection.d.ts +43 -0
- package/dist/gantt/GanttTimeMarkers.d.ts +48 -0
- package/dist/gantt/TextBitmapCache.d.ts +32 -14
- package/dist/gantt/autoLevel.d.ts +54 -0
- package/dist/gantt/barFields.d.ts +67 -0
- package/dist/gantt/features.d.ts +23 -1
- package/dist/index.cjs +3780 -388
- package/dist/index.js +3781 -389
- package/dist/locale.d.ts +47 -2
- package/dist/pivotor/ColumnAxis.d.ts +3 -0
- package/dist/pivotor/HeaderRenderer.d.ts +20 -3
- package/dist/pivotor/Pivotor.d.ts +32 -2
- package/dist/pivotor/RowAxis.d.ts +19 -1
- package/dist/pivotor/TimeAxisBuilder.d.ts +9 -0
- package/dist/pivotor/internal/workingCalendar.d.ts +7 -0
- package/dist/pivotor/types.d.ts +65 -1
- package/dist/style.css +700 -9
- package/dist/theme.d.ts +3 -3
- package/dist/types.d.ts +317 -16
- package/dist/validate.d.ts +20 -4
- package/dist/viewState.d.ts +52 -0
- package/package.json +2 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Row } from '../pivotor/types';
|
|
2
|
+
/**
|
|
3
|
+
* 막대 안에 표시할 한 필드. 값은 현재 행의 자기 속성에서 읽는다.
|
|
4
|
+
* format이 없으면 값을 문자열로 바꾸며 0·false는 표시하고 누락·null·undefined·빈 문자열은 생략한다.
|
|
5
|
+
*/
|
|
6
|
+
export interface GanttBarField {
|
|
7
|
+
/** 행 데이터의 필드 이름. */
|
|
8
|
+
field: string;
|
|
9
|
+
/**
|
|
10
|
+
* 표시 문자열을 만드는 순수 함수. 현재 필드 값과 정규화된 행을 받는다.
|
|
11
|
+
* null·undefined·빈 문자열을 반환하면 이 필드를 생략하고, 예외·문자열이 아닌 반환도 이 필드만 생략한다.
|
|
12
|
+
* 결과는 plain text로만 그린다. 외부 문맥(언어·단위)이 바뀌면 새 함수를 담은 barFields를 전달한다.
|
|
13
|
+
*/
|
|
14
|
+
format?: (value: unknown, row: Row) => string | null | undefined;
|
|
15
|
+
}
|
|
16
|
+
/** 필드 이름 문자열은 `{ field }`와 같다. */
|
|
17
|
+
export type GanttBarFieldInput = string | GanttBarField;
|
|
18
|
+
/** 같은 줄의 필드 사이 구분자와 넘친 내용의 말줄임표. 언어와 무관한 기호만 쓴다. */
|
|
19
|
+
export declare const BAR_FIELD_SEPARATOR = " \u00B7 ";
|
|
20
|
+
export declare const BAR_FIELD_ELLIPSIS = "\u2026";
|
|
21
|
+
/** 배치 결과 항목 번호. 0 이상은 필드 순번이다. */
|
|
22
|
+
export declare const BAR_FIELD_SEPARATOR_ITEM = -1;
|
|
23
|
+
export declare const BAR_FIELD_ELLIPSIS_ITEM = -2;
|
|
24
|
+
/** 생성·update 전에 구조만 검사한다. 값과 format 결과는 그릴 때 필드별로 격리한다. name은 같은 형식을 쓰는 옵션 이름이다. */
|
|
25
|
+
export declare function validateBarFields(value: unknown, name?: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* 표시할 필드 문자열을 지정 순서대로 out에 채운다. 빈 결과는 넣지 않으며 다른 라벨로 대체하지 않는다.
|
|
28
|
+
* 렌더러는 재사용 배열을, 접근성 설명은 새 배열을 넘긴다.
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatBarFields(fields: readonly GanttBarFieldInput[], row: Row, out: string[]): string[];
|
|
31
|
+
/** 필드 비트맵의 글자 경계. ends[g]는 글자 g의 오른쪽 끝(비트맵 CSS x), spaces[g]는 공백 여부다. */
|
|
32
|
+
export interface BarFieldGlyphs {
|
|
33
|
+
readonly ends: Float32Array;
|
|
34
|
+
readonly spaces: Uint8Array;
|
|
35
|
+
}
|
|
36
|
+
/** 배치에 필요한 측정값. 폭은 비트맵 CSS 폭(좌우 여백 포함)이며 글자 경계는 잘라야 할 때만 요청한다. */
|
|
37
|
+
export interface BarFieldSource {
|
|
38
|
+
readonly count: number;
|
|
39
|
+
width(index: number): number;
|
|
40
|
+
glyphs(index: number): BarFieldGlyphs;
|
|
41
|
+
readonly separator: number;
|
|
42
|
+
readonly ellipsis: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* 필드 순서를 유지해 가용 폭에 최대 maxLines 줄로 배치한다. 결과는 out에 `[줄, 항목, 원본 x, 원본 폭, 줄 안 x]` 5개씩 쓴다.
|
|
46
|
+
* 한 줄에 모두 맞으면 줄 수와 무관하게 한 줄이다. 두 줄이면 첫 줄은 통째로 맞는 필드까지 두고, 한 필드가 한 줄보다 길면
|
|
47
|
+
* 단어(없으면 글자) 경계에서 나눠 다음 줄로 잇는다. 마지막 줄이 넘치면 말줄임표 자리를 남겨 자르고 뒤 필드를 생략한다.
|
|
48
|
+
* 말줄임표조차 들어가지 않으면 아무것도 그리지 않는다. 원본 비트맵의 일부만 쓰므로 폭마다 새 비트맵을 만들지 않는다.
|
|
49
|
+
*/
|
|
50
|
+
export declare class BarFieldLayout {
|
|
51
|
+
readonly out: number[];
|
|
52
|
+
private endX;
|
|
53
|
+
private nextGlyph;
|
|
54
|
+
private nextX;
|
|
55
|
+
/** 사용한 줄 수. 0이면 그리지 않는다. */
|
|
56
|
+
run(src: BarFieldSource, avail: number, maxLines: number): number;
|
|
57
|
+
/** 마지막 줄: 남은 내용이 맞으면 모두, 넘치면 말줄임표 앞까지 자른다. */
|
|
58
|
+
private last;
|
|
59
|
+
/** field의 남은 부분(sx부터)과 그 뒤 필드를 한 줄에 그대로 둔다. */
|
|
60
|
+
private place;
|
|
61
|
+
/**
|
|
62
|
+
* glyph부터 max 폭 안의 마지막 글자 경계를 찾는다. 줄을 이을 때(wrap)는 단어 경계를 우선하고 다음 줄은 공백 뒤에서 시작한다.
|
|
63
|
+
* 끝의 공백은 잘라 낸다. 한 글자도 들어가지 않으면 false.
|
|
64
|
+
*/
|
|
65
|
+
private split;
|
|
66
|
+
private push;
|
|
67
|
+
}
|
package/dist/gantt/features.d.ts
CHANGED
|
@@ -29,6 +29,28 @@ export interface GanttTheme {
|
|
|
29
29
|
selection: string;
|
|
30
30
|
milestone: string;
|
|
31
31
|
dependency: string;
|
|
32
|
+
/** `calendar.display: 'shade'`의 비업무 시간 배경. 기존 완전한 테마 객체와 호환되도록 선택 항목이다. */
|
|
33
|
+
calendarShade?: string;
|
|
32
34
|
font: string;
|
|
35
|
+
/** 현재 시각선과 라벨 배경. 기존 전체 테마 객체와 호환되도록 선택 항목이며 내부에서 기본값을 채운다. */
|
|
36
|
+
nowLine?: string;
|
|
37
|
+
/** 현재 시각 라벨 글자색. */
|
|
38
|
+
nowLineText?: string;
|
|
39
|
+
/** 포인터 시각선. */
|
|
40
|
+
cursorLine?: string;
|
|
41
|
+
/** 포인터 시각 플래그 배경. */
|
|
42
|
+
cursorFlag?: string;
|
|
43
|
+
/** 포인터 시각 플래그 글자색. */
|
|
44
|
+
cursorFlagText?: string;
|
|
45
|
+
/** 앱 강조(highlight) 기본 외곽선 색. 기존 전체 테마 객체와 호환되도록 선택 항목이다. */
|
|
46
|
+
highlight?: string;
|
|
47
|
+
/** 헤더 지표 막대 기본색. 아래 지표 색은 기존 전체 테마 객체와 호환되도록 모두 선택 항목이다. */
|
|
48
|
+
metricBar?: string;
|
|
49
|
+
/** 헤더 지표 선 기본색. */
|
|
50
|
+
metricLine?: string;
|
|
51
|
+
/** 지표 값·이름 글자색. */
|
|
52
|
+
metricText?: string;
|
|
53
|
+
/** 계산 불가 구간 표시색. 글자 표지(!)와 함께 쓰여 색만으로 구분하지 않는다. */
|
|
54
|
+
metricError?: string;
|
|
33
55
|
}
|
|
34
|
-
export declare const DEFAULT_GANTT_THEME: Readonly<GanttTheme
|
|
56
|
+
export declare const DEFAULT_GANTT_THEME: Readonly<Required<GanttTheme>>;
|