mftsccs-browser 1.1.32-beta → 1.1.33-beta
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/main.bundle.js
CHANGED
|
@@ -18145,6 +18145,56 @@ class BaseWidget extends _BaseObserver__WEBPACK_IMPORTED_MODULE_0__.BaseObserver
|
|
|
18145
18145
|
}
|
|
18146
18146
|
|
|
18147
18147
|
|
|
18148
|
+
/***/ }),
|
|
18149
|
+
|
|
18150
|
+
/***/ "./src/Widgets/BuilderSpeceficFunctions.ts":
|
|
18151
|
+
/*!*************************************************!*\
|
|
18152
|
+
!*** ./src/Widgets/BuilderSpeceficFunctions.ts ***!
|
|
18153
|
+
\*************************************************/
|
|
18154
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18155
|
+
|
|
18156
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18157
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18158
|
+
/* harmony export */ TypeEditor: () => (/* binding */ TypeEditor)
|
|
18159
|
+
/* harmony export */ });
|
|
18160
|
+
function TypeEditor(event, that) {
|
|
18161
|
+
if (event) {
|
|
18162
|
+
const inputVal = document.querySelector("#widget-properties .flex-column");
|
|
18163
|
+
console.log("This is the input val container", inputVal, that, event);
|
|
18164
|
+
const existedInputEl = inputVal === null || inputVal === void 0 ? void 0 : inputVal.querySelectorAll("input");
|
|
18165
|
+
existedInputEl === null || existedInputEl === void 0 ? void 0 : existedInputEl.forEach((inputItem) => {
|
|
18166
|
+
inputItem === null || inputItem === void 0 ? void 0 : inputItem.remove();
|
|
18167
|
+
});
|
|
18168
|
+
const inputEl = document.createElement("input");
|
|
18169
|
+
inputEl.setAttribute("type", "text");
|
|
18170
|
+
inputEl.setAttribute("name", "input-widgetTypeValue");
|
|
18171
|
+
inputEl.setAttribute("of", that.elementIdentifier.toString());
|
|
18172
|
+
inputEl.setAttribute("class", "form-control");
|
|
18173
|
+
inputEl.setAttribute("id", "widgetType");
|
|
18174
|
+
if (that.widgetType) {
|
|
18175
|
+
inputEl.value = that.widgetType;
|
|
18176
|
+
}
|
|
18177
|
+
else {
|
|
18178
|
+
inputEl.setAttribute("placeholder", "e.g. the_entity");
|
|
18179
|
+
}
|
|
18180
|
+
let newThat = that;
|
|
18181
|
+
inputEl.onchange = function (event) {
|
|
18182
|
+
var _a;
|
|
18183
|
+
event.preventDefault();
|
|
18184
|
+
event.stopPropagation();
|
|
18185
|
+
//console.log("THAT ->", that);
|
|
18186
|
+
const inputValue = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
|
|
18187
|
+
newThat.widgetType = inputValue;
|
|
18188
|
+
//console.log("inputValue", inputValue);
|
|
18189
|
+
//that.setProperty(inputValue);
|
|
18190
|
+
newThat.componentDidMount();
|
|
18191
|
+
newThat.mountChildWidgets();
|
|
18192
|
+
};
|
|
18193
|
+
inputVal === null || inputVal === void 0 ? void 0 : inputVal.appendChild(inputEl);
|
|
18194
|
+
}
|
|
18195
|
+
}
|
|
18196
|
+
|
|
18197
|
+
|
|
18148
18198
|
/***/ }),
|
|
18149
18199
|
|
|
18150
18200
|
/***/ "./src/Widgets/BuilderStatefulWidget.ts":
|
|
@@ -18160,6 +18210,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18160
18210
|
/* harmony import */ var _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StatefulWidget */ "./src/Widgets/StatefulWidget.ts");
|
|
18161
18211
|
/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../app */ "./src/app.ts");
|
|
18162
18212
|
/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Services/Common/ErrorPosting */ "./src/Services/Common/ErrorPosting.ts");
|
|
18213
|
+
/* harmony import */ var _BuilderSpeceficFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BuilderSpeceficFunctions */ "./src/Widgets/BuilderSpeceficFunctions.ts");
|
|
18163
18214
|
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18164
18215
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18165
18216
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -18173,6 +18224,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
|
18173
18224
|
|
|
18174
18225
|
|
|
18175
18226
|
|
|
18227
|
+
|
|
18176
18228
|
class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__.StatefulWidget {
|
|
18177
18229
|
constructor() {
|
|
18178
18230
|
super(...arguments);
|
|
@@ -18264,51 +18316,6 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
|
|
|
18264
18316
|
// Output: "the_element"
|
|
18265
18317
|
const nextMatch = typeName === null || typeName === void 0 ? void 0 : typeName.match(/^([a-z0-9]+).*_([a-z0-9]+)$/i);
|
|
18266
18318
|
const typevalueKey = nextMatch ? `${nextMatch[1]}_${nextMatch[2]}` : "";
|
|
18267
|
-
// Output: "the_name"
|
|
18268
|
-
// const profileData: any = await getLocalStorageProfileData();
|
|
18269
|
-
// const token = profileData?.token;
|
|
18270
|
-
// const userId = profileData?.userId;
|
|
18271
|
-
// const compositionSerach: tsccs.SearchStructure = {
|
|
18272
|
-
// type: "",
|
|
18273
|
-
// search: "",
|
|
18274
|
-
// // composition: "the_element",
|
|
18275
|
-
// composition: mainComposition,
|
|
18276
|
-
// internalComposition: "",
|
|
18277
|
-
// userId: userId,
|
|
18278
|
-
// inpage: 100,
|
|
18279
|
-
// page: 1,
|
|
18280
|
-
// auth: true,
|
|
18281
|
-
// };
|
|
18282
|
-
// let searchFirst = new tsccs.SearchQuery();
|
|
18283
|
-
// // searchFirst.type = "the_element_name";
|
|
18284
|
-
// // searchFirst.fullLinkers = ["the_element_name"];
|
|
18285
|
-
// searchFirst.type = typeName;
|
|
18286
|
-
// searchFirst.fullLinkers = [typeName];
|
|
18287
|
-
// searchFirst.inpage = 100;
|
|
18288
|
-
// const queryParams = [searchFirst];
|
|
18289
|
-
// tsccs
|
|
18290
|
-
// .GetLinkListListener(
|
|
18291
|
-
// compositionSerach,
|
|
18292
|
-
// queryParams,
|
|
18293
|
-
// token,
|
|
18294
|
-
// tsccs.NORMAL
|
|
18295
|
-
// )
|
|
18296
|
-
// .subscribe((output: any) => {
|
|
18297
|
-
// if (output?.length) {
|
|
18298
|
-
// const result = output?.map((item: any, index: number) => {
|
|
18299
|
-
// const itemName =
|
|
18300
|
-
// item[mainComposition][typeName]?.[0]?.[typevalueKey];
|
|
18301
|
-
// return {
|
|
18302
|
-
// id: index,
|
|
18303
|
-
// name: itemName,
|
|
18304
|
-
// text: itemName,
|
|
18305
|
-
// };
|
|
18306
|
-
// });
|
|
18307
|
-
// this.typeValueList = result;
|
|
18308
|
-
// resolve(this.typeValueList);
|
|
18309
|
-
// return result;
|
|
18310
|
-
// }
|
|
18311
|
-
// });
|
|
18312
18319
|
// NEW SEARCH WITH FILTER
|
|
18313
18320
|
// filters
|
|
18314
18321
|
let filters = [];
|
|
@@ -18374,14 +18381,6 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
|
|
|
18374
18381
|
}).call(this);
|
|
18375
18382
|
`).bind(this);
|
|
18376
18383
|
dynamicAsyncFunction(_app__WEBPACK_IMPORTED_MODULE_1__);
|
|
18377
|
-
// const AsyncFunction = Object.getPrototypeOf(
|
|
18378
|
-
// async function () {}
|
|
18379
|
-
// ).constructor;
|
|
18380
|
-
// const renderOnmount = AsyncFunction(
|
|
18381
|
-
// "tsccs",
|
|
18382
|
-
// this.mountChildWidgetsFunction
|
|
18383
|
-
// );
|
|
18384
|
-
// renderOnmount.call(this, tsccs);
|
|
18385
18384
|
});
|
|
18386
18385
|
}
|
|
18387
18386
|
setProperty(widgetTypeName) {
|
|
@@ -18397,48 +18396,7 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
|
|
|
18397
18396
|
});
|
|
18398
18397
|
}
|
|
18399
18398
|
createTypeEditor(event) {
|
|
18400
|
-
|
|
18401
|
-
const inputVal = document.querySelector("#widget-properties .flex-column");
|
|
18402
|
-
console.log("This is the input val container", inputVal);
|
|
18403
|
-
const existedInputEl = inputVal === null || inputVal === void 0 ? void 0 : inputVal.querySelectorAll("input");
|
|
18404
|
-
existedInputEl === null || existedInputEl === void 0 ? void 0 : existedInputEl.forEach((inputItem) => {
|
|
18405
|
-
inputItem === null || inputItem === void 0 ? void 0 : inputItem.remove();
|
|
18406
|
-
});
|
|
18407
|
-
// const elementParent = event.target?.closest(".added-widget-container");
|
|
18408
|
-
// const elementDivParent = event.target?.closest("div");
|
|
18409
|
-
let typeValue = this.widgetType;
|
|
18410
|
-
// if (elementParent) {
|
|
18411
|
-
// typeValue = elementParent?.getAttribute("data-type-value");
|
|
18412
|
-
// } else if (elementDivParent) {
|
|
18413
|
-
// typeValue = elementDivParent?.getAttribute("data-type-value");
|
|
18414
|
-
// }
|
|
18415
|
-
const inputEl = document.createElement("input");
|
|
18416
|
-
inputEl.setAttribute("type", "text");
|
|
18417
|
-
inputEl.setAttribute("name", "input-widgetTypeValue");
|
|
18418
|
-
inputEl.setAttribute("of", this.elementIdentifier.toString());
|
|
18419
|
-
inputEl.setAttribute("class", "form-control");
|
|
18420
|
-
inputEl.setAttribute("id", "widgetTypeValue");
|
|
18421
|
-
if (typeValue) {
|
|
18422
|
-
inputEl.value = this.widgetType;
|
|
18423
|
-
}
|
|
18424
|
-
else {
|
|
18425
|
-
inputEl.setAttribute("placeholder", "e.g. the_entity_type");
|
|
18426
|
-
}
|
|
18427
|
-
let that = this;
|
|
18428
|
-
inputEl.onchange = function (event) {
|
|
18429
|
-
var _a;
|
|
18430
|
-
event.preventDefault();
|
|
18431
|
-
event.stopPropagation();
|
|
18432
|
-
//console.log("THAT ->", that);
|
|
18433
|
-
const inputValue = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
|
|
18434
|
-
that.widgetType = inputValue;
|
|
18435
|
-
//console.log("inputValue", inputValue);
|
|
18436
|
-
//that.setProperty(inputValue);
|
|
18437
|
-
that.componentDidMount();
|
|
18438
|
-
that.mountChildWidgets();
|
|
18439
|
-
};
|
|
18440
|
-
inputVal === null || inputVal === void 0 ? void 0 : inputVal.appendChild(inputEl);
|
|
18441
|
-
}
|
|
18399
|
+
(0,_BuilderSpeceficFunctions__WEBPACK_IMPORTED_MODULE_3__.TypeEditor)(event, this);
|
|
18442
18400
|
}
|
|
18443
18401
|
/**
|
|
18444
18402
|
*
|
|
@@ -18456,7 +18414,7 @@ class BuilderStatefulWidget extends _StatefulWidget__WEBPACK_IMPORTED_MODULE_0__
|
|
|
18456
18414
|
that.createTypeEditor(event);
|
|
18457
18415
|
};
|
|
18458
18416
|
this.element.id = this.createWidgetWrapperIdentifier();
|
|
18459
|
-
this.element.className = "p-2";
|
|
18417
|
+
this.element.className = "p-2 mftsccs-marking-element";
|
|
18460
18418
|
this.element.innerHTML = this.getHtml();
|
|
18461
18419
|
parent.appendChild(this.element);
|
|
18462
18420
|
this.childWidgetElement = this.getElementByClassName("added-widget-container");
|