@pepperi-addons/ngx-lib 0.2.51-beta.10 → 0.2.51-beta.11

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.
@@ -1544,6 +1544,7 @@
1544
1544
  }
1545
1545
  this.valueChange.emit({
1546
1546
  id: this.data.UID.toString(),
1547
+ uiObjectKey: this.data.Key,
1547
1548
  key: event.key,
1548
1549
  value: event.value,
1549
1550
  controlType: event.controlType,
@@ -1581,6 +1582,7 @@
1581
1582
  else {
1582
1583
  this.fieldClick.emit({
1583
1584
  id: this.data.UID.toString(),
1585
+ uiObjectKey: this.data.Key,
1584
1586
  key: fieldClickEvent.key,
1585
1587
  idType: idType,
1586
1588
  which: fieldClickEvent.eventWhich,
@@ -1595,6 +1597,7 @@
1595
1597
  // For other api names (like enter children etc).
1596
1598
  this.fieldClick.emit({
1597
1599
  id: this.data.UID.toString(),
1600
+ uiObjectKey: this.data.Key,
1598
1601
  key: fieldClickEvent.key,
1599
1602
  idType: idType,
1600
1603
  which: fieldClickEvent.eventWhich,
@@ -3044,7 +3047,7 @@
3044
3047
  this.httpService = httpService;
3045
3048
  this.parentId = '0';
3046
3049
  this.additionalApiName = '';
3047
- this.transactionUrl = 'Service1.svc/v1/OrderCenter/Transaction/';
3050
+ this.eventUrl = 'Service1.svc/v1/EmitEvent';
3048
3051
  }
3049
3052
  PepInternalCaruselService.prototype.initCarusel = function (objectId, searchCode, callbackFunc) {
3050
3053
  if (!objectId) {
@@ -3053,7 +3056,7 @@
3053
3056
  this.objectId = objectId;
3054
3057
  this.searchCode = searchCode;
3055
3058
  this.httpService
3056
- .getWapiApiCall("" + this.transactionUrl + this.objectId + "/CaruselItems")
3059
+ .getWapiApiCall("" + this.eventUrl + this.objectId + "/CaruselItems")
3057
3060
  .subscribe(function (res) {
3058
3061
  callbackFunc(res);
3059
3062
  }
@@ -3061,6 +3064,23 @@
3061
3064
  // () => {}
3062
3065
  );
3063
3066
  };
3067
+ PepInternalCaruselService.prototype.emitEvent = function (uiObjectKey, fieldKey, fieldValue, eventName, callbackFunc) {
3068
+ var body = {
3069
+ 'EventKey': eventName,
3070
+ 'EventData': JSON.stringify({
3071
+ UIObjectKey: uiObjectKey,
3072
+ FieldID: fieldKey,
3073
+ Value: fieldValue
3074
+ })
3075
+ };
3076
+ this.httpService.postWapiApiCall("" + this.eventUrl, body).subscribe(function (res) {
3077
+ console.log(res);
3078
+ callbackFunc(res);
3079
+ }
3080
+ // (error) => {},
3081
+ // () => {}
3082
+ );
3083
+ };
3064
3084
  return PepInternalCaruselService;
3065
3085
  }());
3066
3086
  PepInternalCaruselService.decorators = [
@@ -3119,10 +3139,16 @@
3119
3139
  });
3120
3140
  };
3121
3141
  PepInternalCaruselComponent.prototype.onCustomizeObjectChanged = function (customizeObjectChangedData) {
3142
+ this.internalCaruselService.emitEvent(customizeObjectChangedData.uiObjectKey, customizeObjectChangedData.key, customizeObjectChangedData.value, 'SetFieldValue', function () {
3143
+ // TODO:
3144
+ });
3122
3145
  // this.formValueChange.emit(customizeObjectChangedData);
3123
3146
  };
3124
3147
  PepInternalCaruselComponent.prototype.onCustomizeFieldClick = function (fieldClickEvent) {
3125
3148
  // this.formFieldClick.emit(fieldClickEvent);
3149
+ this.internalCaruselService.emitEvent(fieldClickEvent.uiObjectKey, fieldClickEvent.key, fieldClickEvent.value, 'SetFieldValue', function () {
3150
+ // TODO:
3151
+ });
3126
3152
  };
3127
3153
  PepInternalCaruselComponent.prototype.moveLeft = function () {
3128
3154
  var indexToMove = Math.max(this.carousel.currIndex - this.itemsToMove, 0);