@things-factory/operato-ecs 7.0.35 → 7.0.37
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-client/route.js +0 -3
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/things-factory.config.js +1 -2
- package/assets/javascript/wellstek-gantt.js +0 -19709
- package/dist-client/pages/resource-gantt/EQUIPMENT_MST_202407102224.d.ts +0 -730
- package/dist-client/pages/resource-gantt/EQUIPMENT_MST_202407102224.js +0 -3857
- package/dist-client/pages/resource-gantt/EQUIPMENT_MST_202407102224.js.map +0 -1
- package/dist-client/pages/resource-gantt/LINE_MST_202407102228.d.ts +0 -361
- package/dist-client/pages/resource-gantt/LINE_MST_202407102228.js +0 -1002
- package/dist-client/pages/resource-gantt/LINE_MST_202407102228.js.map +0 -1
- package/dist-client/pages/resource-gantt/OPERATION_MST_202407102227.d.ts +0 -651
- package/dist-client/pages/resource-gantt/OPERATION_MST_202407102227.js +0 -1941
- package/dist-client/pages/resource-gantt/OPERATION_MST_202407102227.js.map +0 -1
- package/dist-client/pages/resource-gantt/PRODUCT_MST_202407102234.d.ts +0 -157
- package/dist-client/pages/resource-gantt/PRODUCT_MST_202407102234.js +0 -35237
- package/dist-client/pages/resource-gantt/PRODUCT_MST_202407102234.js.map +0 -1
- package/dist-client/pages/resource-gantt/SIM_PRODUCTION_ORDERS_202407102236.d.ts +0 -127
- package/dist-client/pages/resource-gantt/SIM_PRODUCTION_ORDERS_202407102236.js +0 -8603
- package/dist-client/pages/resource-gantt/SIM_PRODUCTION_ORDERS_202407102236.js.map +0 -1
- package/dist-client/pages/resource-gantt/SIM_SCHEDULE_RESULT_202407102236.d.ts +0 -14
- package/dist-client/pages/resource-gantt/SIM_SCHEDULE_RESULT_202407102236.js +0 -3923
- package/dist-client/pages/resource-gantt/SIM_SCHEDULE_RESULT_202407102236.js.map +0 -1
- package/dist-client/pages/resource-gantt/data.d.ts +0 -2477
- package/dist-client/pages/resource-gantt/data.js +0 -207030
- package/dist-client/pages/resource-gantt/data.js.map +0 -1
- package/dist-client/pages/resource-gantt/resource-gantt.d.ts +0 -29
- package/dist-client/pages/resource-gantt/resource-gantt.js +0 -204
- package/dist-client/pages/resource-gantt/resource-gantt.js.map +0 -1
@@ -1,29 +0,0 @@
|
|
1
|
-
import { PropertyValues } from 'lit';
|
2
|
-
import { PageView } from '@operato/shell';
|
3
|
-
declare const ResourceGantt_base: (new (...args: any[]) => {
|
4
|
-
_storeUnsubscribe: import("redux").Unsubscribe;
|
5
|
-
connectedCallback(): void;
|
6
|
-
disconnectedCallback(): void;
|
7
|
-
stateChanged(_state: unknown): void;
|
8
|
-
readonly isConnected: boolean;
|
9
|
-
}) & typeof PageView;
|
10
|
-
export declare class ResourceGantt extends ResourceGantt_base {
|
11
|
-
static styles: import("lit").CSSResult[];
|
12
|
-
itemId?: string;
|
13
|
-
params: any;
|
14
|
-
container: HTMLDivElement;
|
15
|
-
get context(): {
|
16
|
-
title: string;
|
17
|
-
help: string;
|
18
|
-
};
|
19
|
-
render(): import("lit-html").TemplateResult<1>;
|
20
|
-
updated(changes: PropertyValues<this>): void;
|
21
|
-
stateChanged(state: any): void;
|
22
|
-
pageInitialized(lifecycle: any): void;
|
23
|
-
loadScript(src: string): Promise<void>;
|
24
|
-
initializeGantt(): void;
|
25
|
-
pageUpdated(changes: any, lifecycle: any, before: any): void;
|
26
|
-
pageDisposed(lifecycle: any): void;
|
27
|
-
save(): void;
|
28
|
-
}
|
29
|
-
export {};
|
@@ -1,204 +0,0 @@
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
2
|
-
import { html, css } from 'lit';
|
3
|
-
import { customElement, property, query } from 'lit/decorators.js';
|
4
|
-
import { connect } from 'pwa-helpers/connect-mixin.js';
|
5
|
-
import { store, PageView } from '@operato/shell';
|
6
|
-
import { i18next } from '@operato/i18n';
|
7
|
-
import { ScrollbarStyles } from '@operato/styles';
|
8
|
-
import { OxPrompt } from '@operato/popup/ox-prompt.js';
|
9
|
-
import { scheduleData } from './SIM_SCHEDULE_RESULT_202407102236';
|
10
|
-
import { productionData } from './SIM_PRODUCTION_ORDERS_202407102236';
|
11
|
-
import { equipData } from './EQUIPMENT_MST_202407102224';
|
12
|
-
import { lineData } from './LINE_MST_202407102228';
|
13
|
-
import { operationData } from './OPERATION_MST_202407102227';
|
14
|
-
import { productData } from './PRODUCT_MST_202407102234';
|
15
|
-
const wellstekGantt = new URL('/assets/javascript/wellstek-gantt.js', import.meta.url).href;
|
16
|
-
let ResourceGantt = class ResourceGantt extends connect(store)(PageView) {
|
17
|
-
get context() {
|
18
|
-
return {
|
19
|
-
title: i18next.t('title.resource-gantt'),
|
20
|
-
help: 'operato-ecs/resource-gantt'
|
21
|
-
// actions: [
|
22
|
-
// {
|
23
|
-
// title: i18next.t('button.back'),
|
24
|
-
// action: () => {
|
25
|
-
// history.back()
|
26
|
-
// },
|
27
|
-
// ...CommonButtonStyles.back
|
28
|
-
// }
|
29
|
-
// ]
|
30
|
-
};
|
31
|
-
}
|
32
|
-
render() {
|
33
|
-
return html ` <div id="gantt"></div> `;
|
34
|
-
}
|
35
|
-
updated(changes) {
|
36
|
-
/*
|
37
|
-
* If this page properties are changed, this callback will be invoked.
|
38
|
-
* This callback will be called back only when this page is activated.
|
39
|
-
*/
|
40
|
-
if (changes.has('itemId') || changes.has('params')) {
|
41
|
-
/* do something */
|
42
|
-
}
|
43
|
-
}
|
44
|
-
stateChanged(state) {
|
45
|
-
/*
|
46
|
-
* application wide state changed
|
47
|
-
*
|
48
|
-
*/
|
49
|
-
}
|
50
|
-
/*
|
51
|
-
* page lifecycle
|
52
|
-
*
|
53
|
-
* - pageInitialized(lifecycle)
|
54
|
-
* - pageUpdated(changes, lifecycle, changedBefore)
|
55
|
-
* - pageDisposed(lifecycle)
|
56
|
-
*
|
57
|
-
* lifecycle value has
|
58
|
-
* - active : this page is activated
|
59
|
-
* - page : first path of href
|
60
|
-
* - resourceId : second path of href
|
61
|
-
* - params : search params object of href
|
62
|
-
* - initialized : initialized state of this page
|
63
|
-
*
|
64
|
-
* you can update lifecycle values, or add custom values
|
65
|
-
* by calling this.pageUpdate({ ...values }, force)
|
66
|
-
* If lifecycle values changed by this.pageUpdate(...),
|
67
|
-
* this.pageUpdated(...) will be called back right after.
|
68
|
-
* If you want to invoke this.pageUpdated(...) callback,
|
69
|
-
* set force argument to true.
|
70
|
-
*
|
71
|
-
* you can re-initialize this page
|
72
|
-
* by calling this.pageReset().
|
73
|
-
* this.pageInitialized(...) followed by this.pageDisposed(...) will be invoked
|
74
|
-
* by calling this.pageReset().
|
75
|
-
*
|
76
|
-
* you can invoke this.pageDisposed()
|
77
|
-
* by calling this.pageDispose()
|
78
|
-
*/
|
79
|
-
pageInitialized(lifecycle) {
|
80
|
-
this.loadScript(wellstekGantt).then(() => {
|
81
|
-
this.initializeGantt();
|
82
|
-
// this.loadScript('./colors.js').then(() => {})
|
83
|
-
});
|
84
|
-
/*
|
85
|
-
* This page is initialized.
|
86
|
-
* It's right time to configure of this page.
|
87
|
-
*
|
88
|
-
* - called before when this page activated first
|
89
|
-
* - called when i18next resource is updated (loaded, changed, ..)
|
90
|
-
* - called right after this.pageReset()
|
91
|
-
*/
|
92
|
-
}
|
93
|
-
loadScript(src) {
|
94
|
-
return new Promise((resolve, reject) => {
|
95
|
-
const script = document.createElement('script');
|
96
|
-
script.src = src;
|
97
|
-
script.onload = () => resolve();
|
98
|
-
script.onerror = () => reject(new Error(`Script load error for ${src}`));
|
99
|
-
this.renderRoot.appendChild(script);
|
100
|
-
});
|
101
|
-
}
|
102
|
-
initializeGantt() {
|
103
|
-
const options = {
|
104
|
-
//dateAdapter: new MomentWellstekGanttDateAdapter(moment),
|
105
|
-
data: {
|
106
|
-
scheduleData,
|
107
|
-
productionData,
|
108
|
-
equipData,
|
109
|
-
lineData,
|
110
|
-
operationData,
|
111
|
-
productData
|
112
|
-
},
|
113
|
-
//rows: data.rows,
|
114
|
-
//tasks: data.tasks,
|
115
|
-
//from: data.fromDate,
|
116
|
-
//to: data.toDate,
|
117
|
-
//ganttTableModules: [WellstekGanttTable],
|
118
|
-
//ganttBodyModules: [WellstekGanttDependencies],
|
119
|
-
magnetOffset: 15,
|
120
|
-
rowHeight: 35,
|
121
|
-
rowPadding: 5,
|
122
|
-
headers: [
|
123
|
-
{ unit: 'day', format: 'MM-DD' },
|
124
|
-
{ unit: 'hour', format: 'HH:mm', offset: 12 }
|
125
|
-
],
|
126
|
-
fitWidth: false,
|
127
|
-
minWidth: 1500,
|
128
|
-
tableHeader: {
|
129
|
-
title: '필터',
|
130
|
-
property: 'label',
|
131
|
-
type: 'tree',
|
132
|
-
isFilter: true
|
133
|
-
},
|
134
|
-
tableWidth: 140,
|
135
|
-
columnUnit: 'hour',
|
136
|
-
columnOffset: 12
|
137
|
-
};
|
138
|
-
window.gantt = new window.WellstekGantt({
|
139
|
-
target: this.container,
|
140
|
-
props: options
|
141
|
-
});
|
142
|
-
}
|
143
|
-
pageUpdated(changes, lifecycle, before) {
|
144
|
-
if (this.active) {
|
145
|
-
/*
|
146
|
-
* this page is activated
|
147
|
-
*/
|
148
|
-
this.itemId = lifecycle.resourceId;
|
149
|
-
this.params = lifecycle.params;
|
150
|
-
}
|
151
|
-
else {
|
152
|
-
/* this page is deactivated */
|
153
|
-
}
|
154
|
-
}
|
155
|
-
pageDisposed(lifecycle) {
|
156
|
-
/*
|
157
|
-
* This page is disposed.
|
158
|
-
* It's right time to release system resources.
|
159
|
-
*
|
160
|
-
* - called just before (re)pageInitialized
|
161
|
-
* - called right after when i18next resource updated (loaded, changed, ..)
|
162
|
-
* - called right after this.pageReset()
|
163
|
-
* - called right after this.pageDispose()
|
164
|
-
*/
|
165
|
-
}
|
166
|
-
save() {
|
167
|
-
OxPrompt.open({
|
168
|
-
type: 'success',
|
169
|
-
title: i18next.t('text.completed'),
|
170
|
-
text: i18next.t('text.data_saved_successfully'),
|
171
|
-
confirmButton: { text: i18next.t('button.confirm') }
|
172
|
-
});
|
173
|
-
}
|
174
|
-
};
|
175
|
-
ResourceGantt.styles = [
|
176
|
-
ScrollbarStyles,
|
177
|
-
css `
|
178
|
-
:host {
|
179
|
-
display: block;
|
180
|
-
}
|
181
|
-
|
182
|
-
#gantt {
|
183
|
-
border: 1px solid #eee;
|
184
|
-
height: 100%;
|
185
|
-
}
|
186
|
-
`
|
187
|
-
];
|
188
|
-
__decorate([
|
189
|
-
property({ type: String }),
|
190
|
-
__metadata("design:type", String)
|
191
|
-
], ResourceGantt.prototype, "itemId", void 0);
|
192
|
-
__decorate([
|
193
|
-
property({ type: Object }),
|
194
|
-
__metadata("design:type", Object)
|
195
|
-
], ResourceGantt.prototype, "params", void 0);
|
196
|
-
__decorate([
|
197
|
-
query('#gantt'),
|
198
|
-
__metadata("design:type", HTMLDivElement)
|
199
|
-
], ResourceGantt.prototype, "container", void 0);
|
200
|
-
ResourceGantt = __decorate([
|
201
|
-
customElement('resource-gantt')
|
202
|
-
], ResourceGantt);
|
203
|
-
export { ResourceGantt };
|
204
|
-
//# sourceMappingURL=resource-gantt.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"resource-gantt.js","sourceRoot":"","sources":["../../../client/pages/resource-gantt/resource-gantt.ts"],"names":[],"mappings":";AAAA,OAAO,EAAkB,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAS,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAEtD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAY,MAAM,eAAe,CAAA;AACjD,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,QAAQ,EA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;YACf,UAAU,EAAE,MAAM;YAClB,YAAY,EAAE,EAAE;SACjB,CAEA;QAAC,MAAc,CAAC,KAAK,GAAG,IAAK,MAAc,CAAC,aAAa,CAAC;YACzD,MAAM,EAAE,IAAI,CAAC,SAAS;YACtB,KAAK,EAAE,OAAO;SACf,CAAC,CAAA;IACJ,CAAC;IAED,WAAW,CAAC,OAAY,EAAE,SAAc,EAAE,MAAW;QACnD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB;;eAEG;YACH,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,UAAU,CAAA;YAClC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;QAChC,CAAC;aAAM,CAAC;YACN,8BAA8B;QAChC,CAAC;IACH,CAAC;IAED,YAAY,CAAC,SAAc;QACzB;;;;;;;;WAQG;IACL,CAAC;IAED,IAAI;QACF,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC;YAClC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC;YAC/C,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE;SACrD,CAAC,CAAA;IACJ,CAAC;;AA3LM,oBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;KASF;CACF,AAZY,CAYZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CAAgB;AACf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;6CAAY;AAEtB;IAAhB,KAAK,CAAC,QAAQ,CAAC;8BAAa,cAAc;gDAAA;AAlBhC,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CA6LzB","sourcesContent":["import { PropertyValues, html, css } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\n\nimport { store, PageView } from '@operato/shell'\nimport { i18next, localize } from '@operato/i18n'\nimport { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\n\nimport { scheduleData } from './SIM_SCHEDULE_RESULT_202407102236'\nimport { productionData } from './SIM_PRODUCTION_ORDERS_202407102236'\nimport { equipData } from './EQUIPMENT_MST_202407102224'\nimport { lineData } from './LINE_MST_202407102228'\nimport { operationData } from './OPERATION_MST_202407102227'\nimport { productData } from './PRODUCT_MST_202407102234'\n\nconst wellstekGantt = new URL('/assets/javascript/wellstek-gantt.js', import.meta.url).href\n\n@customElement('resource-gantt')\nexport class ResourceGantt extends connect(store)(PageView) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: block;\n }\n\n #gantt {\n border: 1px solid #eee;\n height: 100%;\n }\n `\n ]\n\n @property({ type: String }) itemId?: string\n @property({ type: Object }) params: any\n\n @query('#gantt') container!: HTMLDivElement\n\n get context() {\n return {\n title: i18next.t('title.resource-gantt'),\n help: 'operato-ecs/resource-gantt'\n // actions: [\n // {\n // title: i18next.t('button.back'),\n // action: () => {\n // history.back()\n // },\n // ...CommonButtonStyles.back\n // }\n // ]\n }\n }\n\n render() {\n return html` <div id=\"gantt\"></div> `\n }\n\n updated(changes: PropertyValues<this>) {\n /*\n * If this page properties are changed, this callback will be invoked.\n * This callback will be called back only when this page is activated.\n */\n if (changes.has('itemId') || changes.has('params')) {\n /* do something */\n }\n }\n\n stateChanged(state: any) {\n /*\n * application wide state changed\n *\n */\n }\n\n /*\n * page lifecycle\n *\n * - pageInitialized(lifecycle)\n * - pageUpdated(changes, lifecycle, changedBefore)\n * - pageDisposed(lifecycle)\n *\n * lifecycle value has\n * - active : this page is activated\n * - page : first path of href\n * - resourceId : second path of href\n * - params : search params object of href\n * - initialized : initialized state of this page\n *\n * you can update lifecycle values, or add custom values\n * by calling this.pageUpdate({ ...values }, force)\n * If lifecycle values changed by this.pageUpdate(...),\n * this.pageUpdated(...) will be called back right after.\n * If you want to invoke this.pageUpdated(...) callback,\n * set force argument to true.\n *\n * you can re-initialize this page\n * by calling this.pageReset().\n * this.pageInitialized(...) followed by this.pageDisposed(...) will be invoked\n * by calling this.pageReset().\n *\n * you can invoke this.pageDisposed()\n * by calling this.pageDispose()\n */\n\n pageInitialized(lifecycle: any) {\n this.loadScript(wellstekGantt).then(() => {\n this.initializeGantt()\n\n // this.loadScript('./colors.js').then(() => {})\n })\n\n /*\n * This page is initialized.\n * It's right time to configure of this page.\n *\n * - called before when this page activated first\n * - called when i18next resource is updated (loaded, changed, ..)\n * - called right after this.pageReset()\n */\n }\n\n loadScript(src: string): Promise<void> {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script')\n script.src = src\n script.onload = () => resolve()\n script.onerror = () => reject(new Error(`Script load error for ${src}`))\n this.renderRoot.appendChild(script)\n })\n }\n\n initializeGantt() {\n const options = {\n //dateAdapter: new MomentWellstekGanttDateAdapter(moment),\n data: {\n scheduleData,\n productionData,\n equipData,\n lineData,\n operationData,\n productData\n },\n //rows: data.rows,\n //tasks: data.tasks,\n //from: data.fromDate,\n //to: data.toDate,\n //ganttTableModules: [WellstekGanttTable],\n //ganttBodyModules: [WellstekGanttDependencies],\n magnetOffset: 15,\n rowHeight: 35,\n rowPadding: 5,\n headers: [\n { unit: 'day', format: 'MM-DD' },\n { unit: 'hour', format: 'HH:mm', offset: 12 }\n ],\n fitWidth: false,\n minWidth: 1500,\n tableHeader: {\n title: '필터',\n property: 'label',\n type: 'tree',\n isFilter: true\n },\n tableWidth: 140,\n columnUnit: 'hour',\n columnOffset: 12\n }\n\n ;(window as any).gantt = new (window as any).WellstekGantt({\n target: this.container,\n props: options\n })\n }\n\n pageUpdated(changes: any, lifecycle: any, before: any) {\n if (this.active) {\n /*\n * this page is activated\n */\n this.itemId = lifecycle.resourceId\n this.params = lifecycle.params\n } else {\n /* this page is deactivated */\n }\n }\n\n pageDisposed(lifecycle: any) {\n /*\n * This page is disposed.\n * It's right time to release system resources.\n *\n * - called just before (re)pageInitialized\n * - called right after when i18next resource updated (loaded, changed, ..)\n * - called right after this.pageReset()\n * - called right after this.pageDispose()\n */\n }\n\n save() {\n OxPrompt.open({\n type: 'success',\n title: i18next.t('text.completed'),\n text: i18next.t('text.data_saved_successfully'),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n }\n}\n"]}
|