@operato/gantt 2.0.0-beta.14 → 2.0.0-beta.17
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/CHANGELOG.md +28 -0
- package/dist/src/gantt-chart-controller.d.ts +32 -0
- package/dist/src/gantt-chart-controller.js +393 -0
- package/dist/src/gantt-chart-controller.js.map +1 -0
- package/dist/src/locales.d.ts +52 -0
- package/dist/src/locales.js +79 -0
- package/dist/src/locales.js.map +1 -0
- package/dist/src/ox-gantt-chart.d.ts +10 -17
- package/dist/src/ox-gantt-chart.js +134 -440
- package/dist/src/ox-gantt-chart.js.map +1 -1
- package/dist/src/ox-gantt-resize-splitter.d.ts +2 -3
- package/dist/src/ox-gantt-resize-splitter.js +15 -22
- package/dist/src/ox-gantt-resize-splitter.js.map +1 -1
- package/dist/src/ox-gantt.d.ts +13 -1
- package/dist/src/ox-gantt.js +154 -27
- package/dist/src/ox-gantt.js.map +1 -1
- package/dist/src/ox-task-tooltip.d.ts +12 -0
- package/dist/src/ox-task-tooltip.js +132 -0
- package/dist/src/ox-task-tooltip.js.map +1 -0
- package/dist/src/types.d.ts +10 -3
- package/dist/src/types.js.map +1 -1
- package/dist/stories/ox-gantt.stories.js +91 -85
- package/dist/stories/ox-gantt.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/gantt-chart-controller.ts +470 -0
- package/src/locales.ts +78 -0
- package/src/ox-gantt-chart.ts +141 -487
- package/src/ox-gantt-resize-splitter.ts +18 -25
- package/src/ox-gantt.ts +163 -29
- package/src/ox-task-tooltip.ts +120 -0
- package/src/types.ts +11 -3
- package/stories/ox-gantt.stories.ts +93 -85
- package/translations/en.json +11 -1
- package/translations/ja.json +11 -1
- package/translations/ko.json +11 -1
- package/translations/ms.json +11 -1
- package/translations/zh.json +11 -1
- package/dist/src/locale.d.ts +0 -1
- package/dist/src/locale.js +0 -49
- package/dist/src/locale.js.map +0 -1
- package/src/locale.ts +0 -51
|
@@ -100,10 +100,18 @@ const Template: Story<ArgTypes> = ({ theme = 'light', tasks, fromDate, toDate, e
|
|
|
100
100
|
</ox-gantt>
|
|
101
101
|
`
|
|
102
102
|
|
|
103
|
-
const
|
|
103
|
+
const developmentSection: Section = {
|
|
104
104
|
name: 'Development'
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
const testSection: Section = {
|
|
108
|
+
name: 'Test'
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const releaseSection: Section = {
|
|
112
|
+
name: 'Release'
|
|
113
|
+
}
|
|
114
|
+
|
|
107
115
|
export const Regular = Template.bind({})
|
|
108
116
|
Regular.args = {
|
|
109
117
|
fromDate: '2022-12-27',
|
|
@@ -113,11 +121,11 @@ Regular.args = {
|
|
|
113
121
|
id: '1',
|
|
114
122
|
title: 'Design',
|
|
115
123
|
type: 'task',
|
|
116
|
-
section:
|
|
117
|
-
|
|
118
|
-
|
|
124
|
+
section: developmentSection,
|
|
125
|
+
startDate: new Date('2023-01-01'),
|
|
126
|
+
endDate: new Date('2023-01-05'),
|
|
119
127
|
progress: 60,
|
|
120
|
-
|
|
128
|
+
dependsOn: '',
|
|
121
129
|
length: '5d',
|
|
122
130
|
tags: ['active'],
|
|
123
131
|
children: []
|
|
@@ -126,11 +134,11 @@ Regular.args = {
|
|
|
126
134
|
id: '2',
|
|
127
135
|
title: 'Development',
|
|
128
136
|
type: 'milestone',
|
|
129
|
-
section:
|
|
130
|
-
|
|
131
|
-
|
|
137
|
+
section: developmentSection,
|
|
138
|
+
startDate: new Date('2023-01-06'),
|
|
139
|
+
endDate: new Date('2023-01-06'),
|
|
132
140
|
progress: 30,
|
|
133
|
-
|
|
141
|
+
dependsOn: '1',
|
|
134
142
|
length: '1d',
|
|
135
143
|
tags: ['milestone'],
|
|
136
144
|
children: []
|
|
@@ -139,11 +147,11 @@ Regular.args = {
|
|
|
139
147
|
id: '3',
|
|
140
148
|
title: 'Coding',
|
|
141
149
|
type: 'phase',
|
|
142
|
-
section:
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
section: developmentSection,
|
|
151
|
+
startDate: new Date('2023-01-07'),
|
|
152
|
+
endDate: new Date('2023-01-15'),
|
|
145
153
|
progress: 10,
|
|
146
|
-
|
|
154
|
+
dependsOn: '2',
|
|
147
155
|
length: '9d',
|
|
148
156
|
tags: ['critical'],
|
|
149
157
|
children: [
|
|
@@ -151,11 +159,11 @@ Regular.args = {
|
|
|
151
159
|
id: '3-1',
|
|
152
160
|
title: 'Coding-A',
|
|
153
161
|
type: 'task',
|
|
154
|
-
section:
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
section: developmentSection,
|
|
163
|
+
startDate: new Date('2023-01-07'),
|
|
164
|
+
endDate: new Date('2023-01-10'),
|
|
157
165
|
progress: 60,
|
|
158
|
-
|
|
166
|
+
dependsOn: '',
|
|
159
167
|
length: '4d',
|
|
160
168
|
tags: ['done'],
|
|
161
169
|
children: []
|
|
@@ -164,10 +172,10 @@ Regular.args = {
|
|
|
164
172
|
id: '3-2',
|
|
165
173
|
title: 'Coding-B',
|
|
166
174
|
type: 'task',
|
|
167
|
-
section:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
175
|
+
section: developmentSection,
|
|
176
|
+
startDate: new Date('2023-01-11'),
|
|
177
|
+
endDate: new Date('2023-01-15'),
|
|
178
|
+
dependsOn: '3-1',
|
|
171
179
|
length: '5d',
|
|
172
180
|
tags: ['active'],
|
|
173
181
|
children: []
|
|
@@ -178,11 +186,11 @@ Regular.args = {
|
|
|
178
186
|
id: '4',
|
|
179
187
|
title: 'Test',
|
|
180
188
|
type: 'milestone',
|
|
181
|
-
section:
|
|
182
|
-
|
|
183
|
-
|
|
189
|
+
section: developmentSection,
|
|
190
|
+
startDate: new Date('2023-01-07'),
|
|
191
|
+
endDate: new Date('2023-01-10'),
|
|
184
192
|
progress: 100,
|
|
185
|
-
|
|
193
|
+
dependsOn: '1',
|
|
186
194
|
length: '1d',
|
|
187
195
|
tags: ['done'],
|
|
188
196
|
children: []
|
|
@@ -191,10 +199,10 @@ Regular.args = {
|
|
|
191
199
|
id: '5',
|
|
192
200
|
title: 'Deploy',
|
|
193
201
|
type: 'milestone',
|
|
194
|
-
section:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
202
|
+
section: developmentSection,
|
|
203
|
+
startDate: new Date('2023-01-15'),
|
|
204
|
+
endDate: new Date('2023-01-21'),
|
|
205
|
+
dependsOn: '4',
|
|
198
206
|
length: '1d',
|
|
199
207
|
tags: ['milestone'],
|
|
200
208
|
children: []
|
|
@@ -203,10 +211,10 @@ Regular.args = {
|
|
|
203
211
|
id: '6',
|
|
204
212
|
title: 'Publishing',
|
|
205
213
|
type: 'milestone',
|
|
206
|
-
section:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
214
|
+
section: developmentSection,
|
|
215
|
+
startDate: new Date('2023-01-11'),
|
|
216
|
+
endDate: new Date('2023-01-15'),
|
|
217
|
+
dependsOn: '5',
|
|
210
218
|
length: '1d',
|
|
211
219
|
tags: ['milestone'],
|
|
212
220
|
children: []
|
|
@@ -215,10 +223,10 @@ Regular.args = {
|
|
|
215
223
|
id: '7',
|
|
216
224
|
title: 'Provisioning',
|
|
217
225
|
type: 'milestone',
|
|
218
|
-
section:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
226
|
+
section: developmentSection,
|
|
227
|
+
startDate: new Date('2023-01-12'),
|
|
228
|
+
endDate: new Date('2023-01-15'),
|
|
229
|
+
dependsOn: '6',
|
|
222
230
|
length: '1d',
|
|
223
231
|
tags: ['milestone'],
|
|
224
232
|
children: []
|
|
@@ -227,10 +235,10 @@ Regular.args = {
|
|
|
227
235
|
id: '8',
|
|
228
236
|
title: 'Alpha Test',
|
|
229
237
|
type: 'milestone',
|
|
230
|
-
section:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
section: testSection,
|
|
239
|
+
startDate: new Date('2023-01-15'),
|
|
240
|
+
endDate: new Date('2023-01-17'),
|
|
241
|
+
dependsOn: '7',
|
|
234
242
|
length: '1d',
|
|
235
243
|
tags: ['critical'],
|
|
236
244
|
children: []
|
|
@@ -239,10 +247,10 @@ Regular.args = {
|
|
|
239
247
|
id: '9',
|
|
240
248
|
title: 'Beta Task',
|
|
241
249
|
type: 'milestone',
|
|
242
|
-
section:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
250
|
+
section: testSection,
|
|
251
|
+
startDate: new Date('2023-01-15'),
|
|
252
|
+
endDate: new Date('2023-01-18'),
|
|
253
|
+
dependsOn: '8',
|
|
246
254
|
length: '1d',
|
|
247
255
|
tags: ['active'],
|
|
248
256
|
children: []
|
|
@@ -251,10 +259,10 @@ Regular.args = {
|
|
|
251
259
|
id: '10',
|
|
252
260
|
title: 'Gamma Test',
|
|
253
261
|
type: 'milestone',
|
|
254
|
-
section:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
262
|
+
section: testSection,
|
|
263
|
+
startDate: new Date('2023-01-18'),
|
|
264
|
+
endDate: new Date('2023-01-19'),
|
|
265
|
+
dependsOn: '9',
|
|
258
266
|
length: '1d',
|
|
259
267
|
tags: ['critical'],
|
|
260
268
|
children: []
|
|
@@ -263,10 +271,10 @@ Regular.args = {
|
|
|
263
271
|
id: '11',
|
|
264
272
|
title: 'Zeta Test',
|
|
265
273
|
type: 'milestone',
|
|
266
|
-
section:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
274
|
+
section: testSection,
|
|
275
|
+
startDate: new Date('2023-01-18'),
|
|
276
|
+
endDate: new Date('2023-01-22'),
|
|
277
|
+
dependsOn: '9',
|
|
270
278
|
length: '1d',
|
|
271
279
|
tags: ['milestone'],
|
|
272
280
|
children: []
|
|
@@ -275,10 +283,10 @@ Regular.args = {
|
|
|
275
283
|
id: '12',
|
|
276
284
|
title: 'Release',
|
|
277
285
|
type: 'milestone',
|
|
278
|
-
section:
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
286
|
+
section: releaseSection,
|
|
287
|
+
startDate: new Date('2023-01-18'),
|
|
288
|
+
endDate: new Date('2023-01-23'),
|
|
289
|
+
dependsOn: '9',
|
|
282
290
|
length: '1d',
|
|
283
291
|
tags: ['milestone'],
|
|
284
292
|
children: []
|
|
@@ -287,10 +295,10 @@ Regular.args = {
|
|
|
287
295
|
id: '13',
|
|
288
296
|
title: 'Release',
|
|
289
297
|
type: 'milestone',
|
|
290
|
-
section:
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
298
|
+
section: releaseSection,
|
|
299
|
+
startDate: new Date('2023-01-22'),
|
|
300
|
+
endDate: new Date('2023-01-27'),
|
|
301
|
+
dependsOn: '12',
|
|
294
302
|
length: '1d',
|
|
295
303
|
tags: ['done'],
|
|
296
304
|
children: []
|
|
@@ -299,10 +307,10 @@ Regular.args = {
|
|
|
299
307
|
id: '14',
|
|
300
308
|
title: 'Release',
|
|
301
309
|
type: 'milestone',
|
|
302
|
-
section:
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
310
|
+
section: releaseSection,
|
|
311
|
+
startDate: new Date('2023-01-27'),
|
|
312
|
+
endDate: new Date('2023-01-30'),
|
|
313
|
+
dependsOn: '13',
|
|
306
314
|
length: '1d',
|
|
307
315
|
tags: ['milestone'],
|
|
308
316
|
children: []
|
|
@@ -311,10 +319,10 @@ Regular.args = {
|
|
|
311
319
|
id: '15',
|
|
312
320
|
title: 'Release',
|
|
313
321
|
type: 'milestone',
|
|
314
|
-
section:
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
322
|
+
section: releaseSection,
|
|
323
|
+
startDate: new Date('2023-01-30'),
|
|
324
|
+
endDate: new Date('2023-01-31'),
|
|
325
|
+
dependsOn: '14',
|
|
318
326
|
length: '1d',
|
|
319
327
|
tags: ['milestone'],
|
|
320
328
|
children: []
|
|
@@ -323,10 +331,10 @@ Regular.args = {
|
|
|
323
331
|
id: '16',
|
|
324
332
|
title: 'Release',
|
|
325
333
|
type: 'milestone',
|
|
326
|
-
section:
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
334
|
+
section: releaseSection,
|
|
335
|
+
startDate: new Date('2023-01-31'),
|
|
336
|
+
endDate: new Date('2023-02-05'),
|
|
337
|
+
dependsOn: '15',
|
|
330
338
|
length: '1d',
|
|
331
339
|
tags: ['active'],
|
|
332
340
|
children: []
|
|
@@ -335,10 +343,10 @@ Regular.args = {
|
|
|
335
343
|
id: '17',
|
|
336
344
|
title: 'Release',
|
|
337
345
|
type: 'milestone',
|
|
338
|
-
section:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
346
|
+
section: releaseSection,
|
|
347
|
+
startDate: new Date('2023-02-06'),
|
|
348
|
+
endDate: new Date('2023-02-07'),
|
|
349
|
+
dependsOn: '16',
|
|
342
350
|
length: '1d',
|
|
343
351
|
tags: ['milestone'],
|
|
344
352
|
children: []
|
|
@@ -347,10 +355,10 @@ Regular.args = {
|
|
|
347
355
|
id: '18',
|
|
348
356
|
title: 'Release',
|
|
349
357
|
type: 'milestone',
|
|
350
|
-
section:
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
358
|
+
section: releaseSection,
|
|
359
|
+
startDate: new Date('2023-02-08'),
|
|
360
|
+
endDate: new Date('2023-02-09'),
|
|
361
|
+
dependsOn: '17',
|
|
354
362
|
length: '1d',
|
|
355
363
|
tags: ['critical'],
|
|
356
364
|
children: []
|
|
@@ -359,10 +367,10 @@ Regular.args = {
|
|
|
359
367
|
id: '19',
|
|
360
368
|
title: 'Release',
|
|
361
369
|
type: 'milestone',
|
|
362
|
-
section:
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
370
|
+
section: releaseSection,
|
|
371
|
+
startDate: new Date('2023-02-10'),
|
|
372
|
+
endDate: new Date('2023-02-25'),
|
|
373
|
+
dependsOn: '18',
|
|
366
374
|
length: '1d',
|
|
367
375
|
tags: ['milestone'],
|
|
368
376
|
children: []
|
package/translations/en.json
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"label.gantt-task-id": "ID",
|
|
3
|
+
"label.gantt-task-section": "section",
|
|
4
|
+
"label.gantt-task-title": "title",
|
|
5
|
+
"label.gantt-task-type": "type",
|
|
6
|
+
"label.gantt-task-start-date": "start date",
|
|
7
|
+
"label.gantt-task-end-date": "end date",
|
|
8
|
+
"label.gantt-task-tags": "tags",
|
|
9
|
+
"label.gantt-task-progress": "progress",
|
|
10
|
+
"label.gantt-task-previous": "previous"
|
|
11
|
+
}
|
package/translations/ja.json
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"label.gantt-task-id": "ID",
|
|
3
|
+
"label.gantt-task-section": "セクション",
|
|
4
|
+
"label.gantt-task-title": "タイトル",
|
|
5
|
+
"label.gantt-task-type": "タイプ",
|
|
6
|
+
"label.gantt-task-start-date": "開始日",
|
|
7
|
+
"label.gantt-task-end-date": "終了日",
|
|
8
|
+
"label.gantt-task-tags": "タグ",
|
|
9
|
+
"label.gantt-task-progress": "進捗",
|
|
10
|
+
"label.gantt-task-previous": "前"
|
|
11
|
+
}
|
package/translations/ko.json
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"label.gantt-task-id": "아이디",
|
|
3
|
+
"label.gantt-task-section": "섹션",
|
|
4
|
+
"label.gantt-task-title": "제목",
|
|
5
|
+
"label.gantt-task-type": "유형",
|
|
6
|
+
"label.gantt-task-start-date": "시작 날짜",
|
|
7
|
+
"label.gantt-task-end-date": "종료 날짜",
|
|
8
|
+
"label.gantt-task-tags": "태그",
|
|
9
|
+
"label.gantt-task-progress": "진행 상황",
|
|
10
|
+
"label.gantt-task-previous": "이전"
|
|
11
|
+
}
|
package/translations/ms.json
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"label.gantt-task-id": "id",
|
|
3
|
+
"label.gantt-task-section": "seksyen",
|
|
4
|
+
"label.gantt-task-title": "tajuk",
|
|
5
|
+
"label.gantt-task-type": "jenis",
|
|
6
|
+
"label.gantt-task-start-date": "tarikh mula",
|
|
7
|
+
"label.gantt-task-end-date": "tarikh tamat",
|
|
8
|
+
"label.gantt-task-tags": "tag",
|
|
9
|
+
"label.gantt-task-progress": "kemajuan",
|
|
10
|
+
"label.gantt-task-previous": "sebelumnya"
|
|
11
|
+
}
|
package/translations/zh.json
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"label.gantt-task-id": "ID",
|
|
3
|
+
"label.gantt-task-section": "部分",
|
|
4
|
+
"label.gantt-task-title": "标题",
|
|
5
|
+
"label.gantt-task-type": "类型",
|
|
6
|
+
"label.gantt-task-start-date": "开始日期",
|
|
7
|
+
"label.gantt-task-end-date": "结束日期",
|
|
8
|
+
"label.gantt-task-tags": "标签",
|
|
9
|
+
"label.gantt-task-progress": "进度",
|
|
10
|
+
"label.gantt-task-previous": "以前"
|
|
11
|
+
}
|
package/dist/src/locale.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function setLocale(locale: string): void;
|
package/dist/src/locale.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { timeFormatDefaultLocale } from 'd3-time-format';
|
|
2
|
-
// 한국어 로케일 정의
|
|
3
|
-
const koKR = {
|
|
4
|
-
dateTime: '%Y-%m-%d %a %X',
|
|
5
|
-
date: '%Y-%m-%d',
|
|
6
|
-
time: '%H:%M:%S',
|
|
7
|
-
periods: ['AM', 'PM'],
|
|
8
|
-
days: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
|
|
9
|
-
shortDays: ['일', '월', '화', '수', '목', '금', '토'],
|
|
10
|
-
months: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
|
11
|
-
shortMonths: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
|
|
12
|
-
};
|
|
13
|
-
// 영어 로케일 정의
|
|
14
|
-
const enUS = {
|
|
15
|
-
dateTime: '%x, %X',
|
|
16
|
-
date: '%-m/%-d/%Y',
|
|
17
|
-
time: '%-I:%M:%S %p',
|
|
18
|
-
periods: ['AM', 'PM'],
|
|
19
|
-
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
20
|
-
shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
21
|
-
months: [
|
|
22
|
-
'January',
|
|
23
|
-
'February',
|
|
24
|
-
'March',
|
|
25
|
-
'April',
|
|
26
|
-
'May',
|
|
27
|
-
'June',
|
|
28
|
-
'July',
|
|
29
|
-
'August',
|
|
30
|
-
'September',
|
|
31
|
-
'October',
|
|
32
|
-
'November',
|
|
33
|
-
'December'
|
|
34
|
-
],
|
|
35
|
-
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
|
36
|
-
};
|
|
37
|
-
// 로케일 설정 함수
|
|
38
|
-
export function setLocale(locale) {
|
|
39
|
-
if (locale === 'ko') {
|
|
40
|
-
timeFormatDefaultLocale(koKR);
|
|
41
|
-
}
|
|
42
|
-
else if (locale === 'en') {
|
|
43
|
-
timeFormatDefaultLocale(enUS);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
// 예제 언어 선택
|
|
47
|
-
const selectedLocale = 'ko';
|
|
48
|
-
setLocale(selectedLocale);
|
|
49
|
-
//# sourceMappingURL=locale.js.map
|
package/dist/src/locale.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/locale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAExD,aAAa;AACb,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE,gBAAgB;IAC1B,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACvD,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC9C,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACnF,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;CAC9D,CAAA;AAE5B,YAAY;AACZ,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACrB,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;IACpF,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAC5D,MAAM,EAAE;QACN,SAAS;QACT,UAAU;QACV,OAAO;QACP,OAAO;QACP,KAAK;QACL,MAAM;QACN,MAAM;QACN,QAAQ;QACR,WAAW;QACX,SAAS;QACT,UAAU;QACV,UAAU;KACX;IACD,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;CACvE,CAAA;AAE5B,YAAY;AACZ,MAAM,UAAU,SAAS,CAAC,MAAc;IACtC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,uBAAuB,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC;SAAM,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QAC3B,uBAAuB,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC;AACH,CAAC;AAED,WAAW;AACX,MAAM,cAAc,GAAG,IAAI,CAAA;AAC3B,SAAS,CAAC,cAAc,CAAC,CAAA","sourcesContent":["import { timeFormatDefaultLocale } from 'd3-time-format'\n\n// 한국어 로케일 정의\nconst koKR = {\n dateTime: '%Y-%m-%d %a %X',\n date: '%Y-%m-%d',\n time: '%H:%M:%S',\n periods: ['AM', 'PM'],\n days: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],\n shortDays: ['일', '월', '화', '수', '목', '금', '토'],\n months: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],\n shortMonths: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']\n} as d3.TimeLocaleDefinition\n\n// 영어 로케일 정의\nconst enUS = {\n dateTime: '%x, %X',\n date: '%-m/%-d/%Y',\n time: '%-I:%M:%S %p',\n periods: ['AM', 'PM'],\n days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n ],\n shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\n} as d3.TimeLocaleDefinition\n\n// 로케일 설정 함수\nexport function setLocale(locale: string) {\n if (locale === 'ko') {\n timeFormatDefaultLocale(koKR)\n } else if (locale === 'en') {\n timeFormatDefaultLocale(enUS)\n }\n}\n\n// 예제 언어 선택\nconst selectedLocale = 'ko'\nsetLocale(selectedLocale)\n"]}
|
package/src/locale.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { timeFormatDefaultLocale } from 'd3-time-format'
|
|
2
|
-
|
|
3
|
-
// 한국어 로케일 정의
|
|
4
|
-
const koKR = {
|
|
5
|
-
dateTime: '%Y-%m-%d %a %X',
|
|
6
|
-
date: '%Y-%m-%d',
|
|
7
|
-
time: '%H:%M:%S',
|
|
8
|
-
periods: ['AM', 'PM'],
|
|
9
|
-
days: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
|
|
10
|
-
shortDays: ['일', '월', '화', '수', '목', '금', '토'],
|
|
11
|
-
months: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
|
12
|
-
shortMonths: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
|
|
13
|
-
} as d3.TimeLocaleDefinition
|
|
14
|
-
|
|
15
|
-
// 영어 로케일 정의
|
|
16
|
-
const enUS = {
|
|
17
|
-
dateTime: '%x, %X',
|
|
18
|
-
date: '%-m/%-d/%Y',
|
|
19
|
-
time: '%-I:%M:%S %p',
|
|
20
|
-
periods: ['AM', 'PM'],
|
|
21
|
-
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
|
22
|
-
shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
23
|
-
months: [
|
|
24
|
-
'January',
|
|
25
|
-
'February',
|
|
26
|
-
'March',
|
|
27
|
-
'April',
|
|
28
|
-
'May',
|
|
29
|
-
'June',
|
|
30
|
-
'July',
|
|
31
|
-
'August',
|
|
32
|
-
'September',
|
|
33
|
-
'October',
|
|
34
|
-
'November',
|
|
35
|
-
'December'
|
|
36
|
-
],
|
|
37
|
-
shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
|
38
|
-
} as d3.TimeLocaleDefinition
|
|
39
|
-
|
|
40
|
-
// 로케일 설정 함수
|
|
41
|
-
export function setLocale(locale: string) {
|
|
42
|
-
if (locale === 'ko') {
|
|
43
|
-
timeFormatDefaultLocale(koKR)
|
|
44
|
-
} else if (locale === 'en') {
|
|
45
|
-
timeFormatDefaultLocale(enUS)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// 예제 언어 선택
|
|
50
|
-
const selectedLocale = 'ko'
|
|
51
|
-
setLocale(selectedLocale)
|