@provoly/hypervisor 0.0.62 → 0.0.64
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/esm2022/src/lib/general/procedure-actions/procedure-actions.component.mjs +3 -3
- package/esm2022/src/lib/procedure/model-detail/procedure-model-detail.component.mjs +13 -7
- package/esm2022/src/lib/store/event/event.service.mjs +6 -3
- package/esm2022/src/lib/store/procedure/procedure.actions.mjs +5 -2
- package/esm2022/src/lib/store/procedure/procedure.effects.mjs +2 -1
- package/esm2022/src/lib/store/procedure/procedure.reducer.mjs +12 -1
- package/esm2022/src/lib/store/procedure/procedure.service.mjs +9 -1
- package/fesm2022/provoly-hypervisor.mjs +43 -11
- package/fesm2022/provoly-hypervisor.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/procedure/model-detail/procedure-model-detail.component.d.ts +3 -2
- package/src/lib/store/procedure/procedure.actions.d.ts +15 -0
- package/src/lib/store/procedure/procedure.effects.d.ts +5 -0
- package/src/lib/store/procedure/procedure.service.d.ts +1 -0
|
@@ -290,11 +290,11 @@ class ProcedureActionsComponent extends SubscriptionnerDirective {
|
|
|
290
290
|
this.tmpActions[idx][prop] = $event;
|
|
291
291
|
}
|
|
292
292
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureActionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
293
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: { actions: "actions" }, outputs: { modified: "modified" }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event)\"\n [disabled]=\"action.status === 'DONE'\"\n ></pry-checkbox>\n <div [class.-done]=\"action.status === 'DONE'\">{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n }
|
|
293
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: { actions: "actions" }, outputs: { modified: "modified" }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event)\"\n [disabled]=\"action.status === 'DONE'\"\n ></pry-checkbox>\n <div [class.-done]=\"action.status === 'DONE'\">{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n }\n @for (action of tmpActions; track action.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__procedure__actions__action-tmp\">\n <pry-select\n [ngModel]=\"action.type\"\n [items]=\"ACTIONS_TYPES\"\n (ngModelChange)=\"updateNew(idx, 'type', $event)\"\n i18nPrefix=\"@hvy.procedure.action.\"\n ></pry-select>\n </div>\n }\n @if (tmpActions.length === 0 && actions.length === 0) {\n <div>{{ '@hvy.event.log.procedure.noAction' | i18n }}</div>\n }\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\" (click)=\"add()\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.procedure.action.add' | i18n }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: i4.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
294
294
|
}
|
|
295
295
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureActionsComponent, decorators: [{
|
|
296
296
|
type: Component,
|
|
297
|
-
args: [{ selector: 'hvy-procedure-actions', template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event)\"\n [disabled]=\"action.status === 'DONE'\"\n ></pry-checkbox>\n <div [class.-done]=\"action.status === 'DONE'\">{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n }
|
|
297
|
+
args: [{ selector: 'hvy-procedure-actions', template: "<div\n class=\"o-hvy-events-detail__procedure__actions\"\n (drag)=\"move($event)\"\n (drop)=\"drop($event)\"\n (dragover)=\"allowDrop($event)\"\n>\n @for (action of actions; track action.id; let idx = $index) {\n <div\n class=\"o-hvy-events-detail__procedure__actions__action\"\n [draggable]=\"true\"\n (dragstart)=\"dragStart($event, action, idx)\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <pry-icon iconSvg=\"six_dot\" #handle></pry-icon>\n <pry-checkbox\n [ngModel]=\"action.status !== 'NEW'\"\n (click)=\"toggleActionStatus(idx, $event)\"\n [disabled]=\"action.status === 'DONE'\"\n ></pry-checkbox>\n <div [class.-done]=\"action.status === 'DONE'\">{{ action.name }}</div>\n <pry-icon iconSvg=\"more_horiz\"></pry-icon>\n </div>\n }\n @for (action of tmpActions; track action.id; let idx = $index) {\n <div class=\"o-hvy-events-detail__procedure__actions__action-tmp\">\n <pry-select\n [ngModel]=\"action.type\"\n [items]=\"ACTIONS_TYPES\"\n (ngModelChange)=\"updateNew(idx, 'type', $event)\"\n i18nPrefix=\"@hvy.procedure.action.\"\n ></pry-select>\n </div>\n }\n @if (tmpActions.length === 0 && actions.length === 0) {\n <div>{{ '@hvy.event.log.procedure.noAction' | i18n }}</div>\n }\n <div class=\"o-hvy-events-detail__procedure__button\">\n <button class=\"a-btn a-btn--primary\" (click)=\"add()\">\n <pry-icon iconSvg=\"add\"></pry-icon>\n {{ '@hvy.procedure.action.add' | i18n }}\n </button>\n </div>\n</div>\n" }]
|
|
298
298
|
}], propDecorators: { actions: [{
|
|
299
299
|
type: Input
|
|
300
300
|
}], modified: [{
|
|
@@ -1132,7 +1132,10 @@ const ProcedureActions = {
|
|
|
1132
1132
|
setCategory: createAction('[Procedure] Set Category Value', props()),
|
|
1133
1133
|
model: createAction('[Procedure] Get Procedure Model', props()),
|
|
1134
1134
|
modelSuccess: createAction('[Procedure] Get Procedure Model Success', props()),
|
|
1135
|
-
modelFailure: createAction('[Procedure] Get Procedure Model Failure', props())
|
|
1135
|
+
modelFailure: createAction('[Procedure] Get Procedure Model Failure', props()),
|
|
1136
|
+
save: createAction('[Procedure] Save Procedure Model', props()),
|
|
1137
|
+
saveSuccess: createAction('[Procedure] Save Procedure Model Success', props()),
|
|
1138
|
+
saveFailure: createAction('[Procedure] Save Procedure Model Failure', props())
|
|
1136
1139
|
};
|
|
1137
1140
|
|
|
1138
1141
|
const procedureFeatureKey = '@hvy/procedure';
|
|
@@ -1174,6 +1177,17 @@ const internalReducer$1 = createReducer(procedureInitialState, on(ProcedureActio
|
|
|
1174
1177
|
model: undefined,
|
|
1175
1178
|
loading: false,
|
|
1176
1179
|
error: action.error
|
|
1180
|
+
})), on(ProcedureActions.save, (state) => ({
|
|
1181
|
+
...state,
|
|
1182
|
+
loading: true
|
|
1183
|
+
})), on(ProcedureActions.saveSuccess, (state, action) => ({
|
|
1184
|
+
...state,
|
|
1185
|
+
model: action.model,
|
|
1186
|
+
loading: false
|
|
1187
|
+
})), on(ProcedureActions.saveFailure, (state, action) => ({
|
|
1188
|
+
...state,
|
|
1189
|
+
loading: false,
|
|
1190
|
+
error: action.error
|
|
1177
1191
|
})));
|
|
1178
1192
|
function procedureReducer(state, action) {
|
|
1179
1193
|
return internalReducer$1(state, action);
|
|
@@ -1234,6 +1248,14 @@ class ProcedureService {
|
|
|
1234
1248
|
return this.httpClient.get(encodeURI(`${url}/procedures/model/id/${id}`));
|
|
1235
1249
|
}));
|
|
1236
1250
|
}
|
|
1251
|
+
save(model) {
|
|
1252
|
+
return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
|
|
1253
|
+
if (!!model.id) {
|
|
1254
|
+
return this.httpClient.post(encodeURI(`${url}/procedures/model`), model);
|
|
1255
|
+
}
|
|
1256
|
+
return this.httpClient.put(encodeURI(`${url}/procedures/model`), model);
|
|
1257
|
+
}));
|
|
1258
|
+
}
|
|
1237
1259
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureService, deps: [{ token: i1.HttpClient }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1238
1260
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureService, providedIn: 'root' }); }
|
|
1239
1261
|
}
|
|
@@ -1388,12 +1410,15 @@ class EventService {
|
|
|
1388
1410
|
delete toSend.id;
|
|
1389
1411
|
}
|
|
1390
1412
|
return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
|
|
1391
|
-
|
|
1413
|
+
if (!!toSend.id) {
|
|
1414
|
+
return this.httpClient.put(encodeURI(`${url}/events/id/${toSend.id}`), eventForWriteAPI(event));
|
|
1415
|
+
}
|
|
1416
|
+
return this.httpClient.post(encodeURI(`${url}/events`), eventForWriteAPI(event));
|
|
1392
1417
|
}));
|
|
1393
1418
|
}
|
|
1394
1419
|
saveProcedure(procedure) {
|
|
1395
1420
|
return this.store.select(HypSelectors.url).pipe(mergeMap((url) => {
|
|
1396
|
-
return this.httpClient.post(encodeURI(`${url}/procedures`), procedureForWriteAPI(procedure));
|
|
1421
|
+
return this.httpClient.post(encodeURI(`${url}/procedures/id/${procedure.id}`), procedureForWriteAPI(procedure));
|
|
1397
1422
|
}));
|
|
1398
1423
|
}
|
|
1399
1424
|
status(event, status, comment) {
|
|
@@ -1581,6 +1606,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1581
1606
|
}] } });
|
|
1582
1607
|
|
|
1583
1608
|
class ProcedureModelDetailComponent extends SubscriptionnerDirective {
|
|
1609
|
+
set cancelModifications(evt) {
|
|
1610
|
+
this.modifications = {};
|
|
1611
|
+
this._outputModifications();
|
|
1612
|
+
}
|
|
1613
|
+
get modifiedModel() {
|
|
1614
|
+
return { ...this.model, ...(this.modifications ?? {}) };
|
|
1615
|
+
}
|
|
1584
1616
|
constructor(store) {
|
|
1585
1617
|
super();
|
|
1586
1618
|
this.store = store;
|
|
@@ -1625,12 +1657,9 @@ class ProcedureModelDetailComponent extends SubscriptionnerDirective {
|
|
|
1625
1657
|
}
|
|
1626
1658
|
}
|
|
1627
1659
|
_outputModifications() {
|
|
1628
|
-
this.validate(this.
|
|
1660
|
+
this.validate(this.modifiedModel);
|
|
1629
1661
|
this.modified.next([this.modifications, this.modifiedModel]);
|
|
1630
1662
|
}
|
|
1631
|
-
get modifiedModel() {
|
|
1632
|
-
return { ...this.model, ...(this.modifications ?? {}) };
|
|
1633
|
-
}
|
|
1634
1663
|
updateActions($event) {
|
|
1635
1664
|
if (equal($event, this.model?.actions)) {
|
|
1636
1665
|
delete this.modifications.actions;
|
|
@@ -1641,11 +1670,11 @@ class ProcedureModelDetailComponent extends SubscriptionnerDirective {
|
|
|
1641
1670
|
this._outputModifications();
|
|
1642
1671
|
}
|
|
1643
1672
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureModelDetailComponent, deps: [{ token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1644
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureModelDetailComponent, selector: "hvy-procedure-model-detail", inputs: { model: "model", username: "username", title: "title" }, outputs: { eventErrors: "eventErrors", modified: "modified" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.procedure.title' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('title')\"\n [value]=\"model.title\"\n (change)=\"modify('title', $event)\"\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"model.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"modify('description', $event)\"\n ></textarea>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"model.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain')\"\n (ngModelChange)=\"modify('domain', $event)\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.creator' | i18n }} :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"model.creator\" readonly />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"o-hvy-procedure-detail__actions\">\n <h3>{{ '@hvy.procedure.actions' | i18n }}</h3>\n <hvy-procedure-actions [actions]=\"model.actions\" (modified)=\"updateActions($event)\"></hvy-procedure-actions>\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: ["actions"], outputs: ["modified"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1673
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.4", type: ProcedureModelDetailComponent, selector: "hvy-procedure-model-detail", inputs: { model: "model", username: "username", title: "title", cancelModifications: "cancelModifications" }, outputs: { eventErrors: "eventErrors", modified: "modified" }, usesInheritance: true, ngImport: i0, template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (modifiedModel; as model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.procedure.title' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('title')\"\n [value]=\"model.title\"\n (change)=\"modify('title', $event)\"\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"model.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"modify('description', $event)\"\n ></textarea>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"model.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain')\"\n (ngModelChange)=\"modify('domain', $event)\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.creator' | i18n }} :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"model.creator\" readonly />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"o-hvy-procedure-detail__actions\">\n <h3>{{ '@hvy.procedure.actions' | i18n }}</h3>\n <hvy-procedure-actions [actions]=\"model.actions\" (modified)=\"updateActions($event)\"></hvy-procedure-actions>\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: ProcedureActionsComponent, selector: "hvy-procedure-actions", inputs: ["actions"], outputs: ["modified"] }, { kind: "pipe", type: i3.I18nPipe, name: "i18n" }] }); }
|
|
1645
1674
|
}
|
|
1646
1675
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureModelDetailComponent, decorators: [{
|
|
1647
1676
|
type: Component,
|
|
1648
|
-
args: [{ selector: 'hvy-procedure-model-detail', template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.procedure.title' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('title')\"\n [value]=\"model.title\"\n (change)=\"modify('title', $event)\"\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"model.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"modify('description', $event)\"\n ></textarea>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"model.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain')\"\n (ngModelChange)=\"modify('domain', $event)\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.creator' | i18n }} :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"model.creator\" readonly />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"o-hvy-procedure-detail__actions\">\n <h3>{{ '@hvy.procedure.actions' | i18n }}</h3>\n <hvy-procedure-actions [actions]=\"model.actions\" (modified)=\"updateActions($event)\"></hvy-procedure-actions>\n </div>\n }\n </div>\n </div>\n</div>\n" }]
|
|
1677
|
+
args: [{ selector: 'hvy-procedure-model-detail', template: "<div class=\"o-hvy-procedure-detail\">\n <h1>{{ title ?? '@hvy.procedure.detail' | i18n }}</h1>\n <div class=\"o-hvy-procedure-detail__container\">\n <div class=\"o-hvy-procedure-detail__container__scrollable\">\n @if (modifiedModel; as model) {\n <div class=\"o-hvy-procedure-detail__form\">\n <table>\n <tbody>\n <tr>\n <td>{{ '@hvy.procedure.title' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <input\n type=\"text\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('title')\"\n [value]=\"model.title\"\n (change)=\"modify('title', $event)\"\n />\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.description' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <textarea\n [ngModel]=\"model.description\"\n class=\"a-form-field\"\n [class.-error]=\"hasError('description')\"\n (ngModelChange)=\"modify('description', $event)\"\n ></textarea>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.event.domain.name' | i18n }}<span class=\"required\">*</span> :</td>\n <td>\n <pry-select\n [items]=\"DOMAINS\"\n [ngModel]=\"model.domain\"\n i18nPrefix=\"@hvy.event.domain.\"\n [class.-error]=\"hasError('domain')\"\n (ngModelChange)=\"modify('domain', $event)\"\n ></pry-select>\n </td>\n </tr>\n <tr>\n <td>{{ '@hvy.procedure.creator' | i18n }} :</td>\n <td>\n <input type=\"text\" class=\"a-form-field\" [value]=\"model.creator\" readonly />\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div class=\"o-hvy-procedure-detail__actions\">\n <h3>{{ '@hvy.procedure.actions' | i18n }}</h3>\n <hvy-procedure-actions [actions]=\"model.actions\" (modified)=\"updateActions($event)\"></hvy-procedure-actions>\n </div>\n }\n </div>\n </div>\n</div>\n" }]
|
|
1649
1678
|
}], ctorParameters: () => [{ type: i1$1.Store }], propDecorators: { model: [{
|
|
1650
1679
|
type: Input
|
|
1651
1680
|
}], username: [{
|
|
@@ -1656,6 +1685,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1656
1685
|
type: Output
|
|
1657
1686
|
}], modified: [{
|
|
1658
1687
|
type: Output
|
|
1688
|
+
}], cancelModifications: [{
|
|
1689
|
+
type: Input
|
|
1659
1690
|
}] } });
|
|
1660
1691
|
|
|
1661
1692
|
const HYP_BASE_CONFIG = new InjectionToken('base config');
|
|
@@ -2095,6 +2126,7 @@ class ProcedureEffects {
|
|
|
2095
2126
|
this.loadProcedures$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.load), debounceTime(200), withLatestFrom(this.store.select(ProcedureSelectors.procedures), this.store.select(ProcedureSelectors.noMoreProcedures)), filter(([action, stateProcedures, noMore]) => !noMore), mergeMap$1(([action, stateProcedures]) => this.procedureService.list(action.next ? stateProcedures.length : 0).pipe(map((procedures) => ProcedureActions.loadSuccess({ procedures, startingFrom: action.next ? stateProcedures.length : 0 })), catchError$1((error) => [ProcedureActions.loadFailure({ error: error })])))));
|
|
2096
2127
|
this.sort$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.sort), debounceTime(200), map(() => ProcedureActions.load({}))));
|
|
2097
2128
|
this.model$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.model), debounceTime(200), mergeMap$1((action) => this.procedureService.get(action.id).pipe(map((model) => ProcedureActions.modelSuccess({ model })), catchError$1((error) => [ProcedureActions.modelFailure({ error: error })])))));
|
|
2129
|
+
this.save$ = createEffect(() => this.actions$.pipe(ofType(ProcedureActions.save), debounceTime(200), mergeMap$1((action) => this.procedureService.save(action.model).pipe(map((model) => ProcedureActions.saveSuccess({ model })), catchError$1((error) => [ProcedureActions.saveFailure({ error: error })])))));
|
|
2098
2130
|
}
|
|
2099
2131
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureEffects, deps: [{ token: i1$3.Actions }, { token: ProcedureService }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2100
2132
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ProcedureEffects }); }
|