blixify-ui-web 1.2.60 → 1.2.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/lib/components/action/radioList/index.d.ts +3 -0
- package/lib/components/action/radioList/index.d.ts.map +1 -1
- package/lib/components/action/radioList/index.js +25 -11
- package/lib/components/action/radioList/index.js.map +1 -1
- package/lib/components/advanced/popUp/index.d.ts +2 -0
- package/lib/components/advanced/popUp/index.d.ts.map +1 -1
- package/lib/components/advanced/popUp/index.js +1 -1
- package/lib/components/advanced/popUp/index.js.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +10 -0
- package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +698 -429
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/model.d.ts +5 -0
- package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/pagination.js +1 -1
- package/lib/components/data/dataTemplate/pagination.js.map +1 -1
- package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.js +3 -3
- package/lib/components/data/dataWrapper/index.js.map +1 -1
- package/lib/components/data/flexFilter/index.d.ts +6 -2
- package/lib/components/data/flexFilter/index.d.ts.map +1 -1
- package/lib/components/data/flexFilter/index.js +31 -27
- package/lib/components/data/flexFilter/index.js.map +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +7 -1
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/data/moduleUtils.d.ts +1 -0
- package/lib/components/data/moduleUtils.d.ts.map +1 -1
- package/lib/components/data/moduleUtils.js +144 -114
- package/lib/components/data/moduleUtils.js.map +1 -1
- package/lib/components/data/readModule.d.ts.map +1 -1
- package/lib/components/data/readModule.js +24 -6
- package/lib/components/data/readModule.js.map +1 -1
- package/lib/components/data/testSchema.js +1 -1
- package/lib/components/data/testSchema.js.map +1 -1
- package/lib/components/data/updateModule.d.ts +6 -0
- package/lib/components/data/updateModule.d.ts.map +1 -1
- package/lib/components/data/updateModule.js +79 -41
- package/lib/components/data/updateModule.js.map +1 -1
- package/lib/components/data/utils.d.ts +2 -0
- package/lib/components/data/utils.d.ts.map +1 -1
- package/lib/components/data/utils.js +42 -1
- package/lib/components/data/utils.js.map +1 -1
- package/lib/components/display/detailList/index.d.ts +1 -0
- package/lib/components/display/detailList/index.d.ts.map +1 -1
- package/lib/components/display/detailList/index.js +7 -3
- package/lib/components/display/detailList/index.js.map +1 -1
- package/lib/components/display/drawer/index.d.ts +2 -0
- package/lib/components/display/drawer/index.d.ts.map +1 -1
- package/lib/components/display/drawer/index.js +7 -2
- package/lib/components/display/drawer/index.js.map +1 -1
- package/lib/components/display/flexTable/index.d.ts +14 -0
- package/lib/components/display/flexTable/index.d.ts.map +1 -1
- package/lib/components/display/flexTable/index.js +97 -17
- package/lib/components/display/flexTable/index.js.map +1 -1
- package/lib/components/display/modal/index.d.ts +1 -0
- package/lib/components/display/modal/index.d.ts.map +1 -1
- package/lib/components/display/modal/index.js +6 -4
- package/lib/components/display/modal/index.js.map +1 -1
- package/lib/components/display/newCalendar/index.d.ts.map +1 -1
- package/lib/components/display/newCalendar/index.js +61 -27
- package/lib/components/display/newCalendar/index.js.map +1 -1
- package/lib/components/display/newFeeds/index.d.ts +2 -0
- package/lib/components/display/newFeeds/index.d.ts.map +1 -1
- package/lib/components/display/newFeeds/index.js +7 -7
- package/lib/components/display/newFeeds/index.js.map +1 -1
- package/lib/components/display/newKanban/index.d.ts.map +1 -1
- package/lib/components/display/newKanban/index.js +53 -17
- package/lib/components/display/newKanban/index.js.map +1 -1
- package/lib/components/display/newList/index.d.ts.map +1 -1
- package/lib/components/display/newList/index.js +11 -64
- package/lib/components/display/newList/index.js.map +1 -1
- package/lib/components/display/newPagination/index.d.ts +23 -0
- package/lib/components/display/newPagination/index.d.ts.map +1 -0
- package/lib/components/display/newPagination/index.js +69 -0
- package/lib/components/display/newPagination/index.js.map +1 -0
- package/lib/components/display/newTable/index.d.ts +8 -0
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +381 -204
- package/lib/components/display/newTable/index.js.map +1 -1
- package/lib/components/display/notification/index.d.ts +2 -0
- package/lib/components/display/notification/index.d.ts.map +1 -1
- package/lib/components/display/notification/index.js +2 -1
- package/lib/components/display/notification/index.js.map +1 -1
- package/lib/components/display/scrollShadow/index.d.ts +9 -0
- package/lib/components/display/scrollShadow/index.d.ts.map +1 -0
- package/lib/components/display/scrollShadow/index.js +66 -0
- package/lib/components/display/scrollShadow/index.js.map +1 -0
- package/lib/components/display/stepper/index.d.ts +3 -0
- package/lib/components/display/stepper/index.d.ts.map +1 -1
- package/lib/components/display/stepper/index.js +28 -11
- package/lib/components/display/stepper/index.js.map +1 -1
- package/lib/components/display/table/index.d.ts.map +1 -1
- package/lib/components/display/table/index.js +3 -2
- package/lib/components/display/table/index.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +4 -2
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/checkbox/index.d.ts.map +1 -1
- package/lib/components/input/checkbox/index.js.map +1 -1
- package/lib/components/input/datePicker/index.d.ts.map +1 -1
- package/lib/components/input/datePicker/index.js +9 -9
- package/lib/components/input/datePicker/index.js.map +1 -1
- package/lib/components/input/select/index.d.ts.map +1 -1
- package/lib/components/input/select/index.js +57 -22
- package/lib/components/input/select/index.js.map +1 -1
- package/lib/components/input/textArea/index.d.ts.map +1 -1
- package/lib/components/input/textArea/index.js +22 -4
- package/lib/components/input/textArea/index.js.map +1 -1
- package/lib/components/input/textInput/index.d.ts.map +1 -1
- package/lib/components/input/textInput/index.js +32 -12
- package/lib/components/input/textInput/index.js.map +1 -1
- package/lib/components/input/uploadInput/index.js +1 -1
- package/lib/components/input/uploadInput/index.js.map +1 -1
- package/lib/components/navigation/tabs/index.js +1 -1
- package/lib/components/navigation/tabs/index.js.map +1 -1
- package/lib/tail.css +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateModule.d.ts","sourceRoot":"","sources":["../../../src/components/data/updateModule.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA6B5C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAyD9E,eAAO,MAAM,uBAAuB,UAC3B,aAAa,SACb,GAAG,mCAEF,UAAU,UACV,OAAO,SA+PhB,CAAC;AAEF,eAAO,MAAM,yBAAyB,iBACtB,GAAG,SACV,aAAa,EAAE,UACd,UAAU,UACV,OAAO,eACF,OAAO,QAwBrB,CAAC;AAEF,eAAO,MAAM,8BAA8B,iBAC3B,GAAG,SACV,aAAa,EAAE,YACZ,GAAG,eACA,WAAW,wBACF,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,wBACtB,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,qBACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"updateModule.d.ts","sourceRoot":"","sources":["../../../src/components/data/updateModule.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AA6B5C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAyD9E,eAAO,MAAM,uBAAuB,UAC3B,aAAa,SACb,GAAG,mCAEF,UAAU,UACV,OAAO,SA+PhB,CAAC;AAEF,eAAO,MAAM,yBAAyB,iBACtB,GAAG,SACV,aAAa,EAAE,UACd,UAAU,UACV,OAAO,eACF,OAAO,QAwBrB,CAAC;AAEF,eAAO,MAAM,8BAA8B,iBAC3B,GAAG,SACV,aAAa,EAAE,YACZ,GAAG,eACA,WAAW,wBACF,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,wBACtB,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,qBACzB,OAAO,kBA6E3B,CAAC;AAEF,eAAO,MAAM,2BAA2B,iBACxB,GAAG,aACN,aAAa,WACf,MAAM,eACF,OAAO,yBACG,GAAG,QAqD3B,CAAC;AAEF,eAAO,MAAM,oCAAoC,cACpC,aAAa,qBACL,GAAG,oBACJ,GAAG,gBACP,GAAG,YACP,GAAG,gBACC,WAAW,WAChB,MAAM,eACF,OAAO,yBACG,GAAG,eACb,MAAM,qBAIA,OAAO,iBA4J3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBACpB,GAAG,SACV,aAAa,EAAE,QAgCvB,CAAC;AAoCF,eAAO,MAAM,mBAAmB,kBACf,aAAa,sBACR,GAAG,WACd,OAAO,YA4BjB,CAAC;AAEF,eAAO,MAAM,oBAAoB,SACzB,MAAM,mBACK,MAAM,SAChB,aAAa,EAAE,gBACR,GAAG,UACT,MAAM,YACJ,OAAO,UACT,OAAO,4BACW,OAAO,gBACnB,WAAW,+BACI,CAC3B,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,KACjB,IAAI,sBACW,EAAE,iCACS,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,qBAChC,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,oBACzB,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,iBACtB,GAAG,YACR;IACR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,sBAssBF,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,sBAAsB,SAC3B,GAAG,SACF,aAAa,EAAE,gBACR,GAAG,EAAE,iBACJ,GAAG,eACL,OAAO,cACR;IACV,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACpC,UACO;IACN,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAChD,iBAAiB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,mBACgB;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,EAAE,EAAE,CAAC;IACtB,iBAAiB,EAAE,EAAE,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,IAAI,CAAC;IAC1C,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,IAAI,CAAC;CAC3C,cACW;IACV,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD,gBACa;IACZ,gBAAgB,EAAE,MAAM,CAAC;IACzB,yBAAyB,EAAE,MAAM,CAAC;IAClC,UAAU,EAAE,GAAG,CAAC;IAChB,wBAAwB,EAAE,OAAO,CAAC;IAClC,4BAA4B,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,qBAAqB,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,IAAI,CAAC;IAC1C,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,0BAA0B,EAAE,CAC1B,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,KACjB,IAAI,CAAC;IACV,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;CACvB,mBACgB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,GAAG,CAAA;CAAE,WAC7C,OAAO,YACN,OAAO,eACJ,KAAK,GAAG,KAAK,GAAG,MAAM,kCACH,CAC9B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,GAAG,EACR,YAAY,EAAE,GAAG,EACjB,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,KACjC,YAAY,GAAG,IAAI,eACX,OAAO,sBAy0DrB,CAAC;AAEF,eAAO,MAAM,oBAAoB,aAAc,GAAG,eAAe,GAAG;;;;;CAoBnE,CAAC"}
|
|
@@ -463,7 +463,7 @@ var handleRetrieveReferenceOptions = function (selectedData, model, dbModule, de
|
|
|
463
463
|
_a.label = 2;
|
|
464
464
|
case 2: return [3 /*break*/, 5];
|
|
465
465
|
case 3:
|
|
466
|
-
if (!(
|
|
466
|
+
if (!(utils_1.OBJECT_DATA_TYPES.includes(eachModel.type) &&
|
|
467
467
|
eachModel.objectData)) return [3 /*break*/, 5];
|
|
468
468
|
return [4 /*yield*/, Promise.all(eachModel.objectData.map(function (eachObjectData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
469
469
|
var selectedDataValue, isReferenceMap, hasValue;
|
|
@@ -1176,7 +1176,7 @@ var renderEachListObject = function (type, selectedModelId, model, selectedData,
|
|
|
1176
1176
|
return (react_1.default.createElement("div", { id: selectedModelId, className: shouldHide ? "hidden" : "" },
|
|
1177
1177
|
react_1.default.createElement("div", { className: "flex justify-between mt-5" },
|
|
1178
1178
|
react_1.default.createElement("h3", { className: "font-medium leading-6 text-gray-900 text-md sm:text-lg" }, selectedModel.name)),
|
|
1179
|
-
react_1.default.createElement(flexTable_1.FlexTable, { ref: flexTableRef, id: selectedModelId, data: [], columns: selectedModel.objectData || [], categoryList: selectedModel.listFlexCategories, disabled: selectedModel.disabled, className: "w-full", showTotal: selectedModel.listFlexSubTotal, showGrandTotal: selectedModel.listFlexGrandTotal, flexMathQueries: selectedModel.listFlexMathQueries, maxRows: selectedModel.listFlexMaxRows, defaultTitleTemplate: selectedModel.listFlexDefaultCategory, hideEmptyState: selectedModel.listFlexHideEmptyState, mobileView: selectedModel.listFlexMobileView, categoryColumnLabel: selectedModel.listFlexCategoryColumnLabel, optional: selectedModel.listFlexOptional, imageEndpoint: devSettings === null || devSettings === void 0 ? void 0 : devSettings.imageEndpoint, resolveImageUrl: resolveFlexImageUrl, onChangeData: function (newData) {
|
|
1179
|
+
react_1.default.createElement(flexTable_1.FlexTable, { darkMode: tabInfo === null || tabInfo === void 0 ? void 0 : tabInfo.darkMode, ref: flexTableRef, id: selectedModelId, data: [], columns: selectedModel.objectData || [], pinColumns: { left: ["category"] }, categoryList: selectedModel.listFlexCategories, disabled: selectedModel.disabled, className: "w-full", showTotal: selectedModel.listFlexSubTotal, showGrandTotal: selectedModel.listFlexGrandTotal, flexMathQueries: selectedModel.listFlexMathQueries, maxRows: selectedModel.listFlexMaxRows, defaultTitleTemplate: selectedModel.listFlexDefaultCategory, hideEmptyState: selectedModel.listFlexHideEmptyState, mobileView: selectedModel.listFlexMobileView, categoryColumnLabel: selectedModel.listFlexCategoryColumnLabel, optional: selectedModel.listFlexOptional, imageEndpoint: devSettings === null || devSettings === void 0 ? void 0 : devSettings.imageEndpoint, resolveImageUrl: resolveFlexImageUrl, onChangeData: function (newData) {
|
|
1180
1180
|
if (type === "update") {
|
|
1181
1181
|
var updatedData = newData.map(function (item) {
|
|
1182
1182
|
var id = item.id, title = item.title, category = item.category, rest = __rest(item, ["id", "title", "category"]);
|
|
@@ -1205,20 +1205,20 @@ var renderEachListObject = function (type, selectedModelId, model, selectedData,
|
|
|
1205
1205
|
} },
|
|
1206
1206
|
react_1.default.createElement("svg", { className: "w-12 h-12 mx-auto text-gray-400", stroke: "currentColor", fill: "none", viewBox: "0 0 48 48", "aria-hidden": "true" },
|
|
1207
1207
|
react_1.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 14v20c0 4.418 7.163 8 16 8 1.381 0 2.721-.087 4-.252M8 14c0 4.418 7.163 8 16 8s16-3.582 16-8M8 14c0-4.418 7.163-8 16-8s16 3.582 16 8m0 0v14m0-4c0 4.418-7.163 8-16 8S8 28.418 8 24m32 10v6m0 0v6m0-6h6m-6 0h-6" })),
|
|
1208
|
-
react_1.default.createElement("span", { className: "block mt-2 text-sm font-medium text-gray-900" },
|
|
1208
|
+
react_1.default.createElement("span", { className: "block mt-2 text-sm font-medium ".concat((tabInfo === null || tabInfo === void 0 ? void 0 : tabInfo.darkMode) ? "text-gray-300" : "text-gray-900") },
|
|
1209
1209
|
"Create a new ", "".concat(selectedModel.name.toLocaleLowerCase())))));
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
1212
|
else {
|
|
1213
1213
|
if (list[selectedModelId]) {
|
|
1214
1214
|
return (react_1.default.createElement("div", { id: selectedModelId, className: shouldHide ? "hidden" : "" },
|
|
1215
|
-
react_1.default.createElement("div", { className: "flex justify-between mt-5" },
|
|
1215
|
+
react_1.default.createElement("div", { className: "flex justify-between ".concat(type === "read" ? "pt-4" : "mt-5") },
|
|
1216
1216
|
react_1.default.createElement("h3", { className: "font-medium leading-6 text-gray-900 text-md sm:text-lg" }, selectedModel.name),
|
|
1217
1217
|
type === "update" && !selectedModel.listFlexTable && (react_1.default.createElement(iconButton_1.IconButton, { className: "sm", icon: react_1.default.createElement(outline_1.PlusCircleIcon, { className: "w-6 h-6 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
|
|
1218
1218
|
setSelectedObjectStructureId === null || setSelectedObjectStructureId === void 0 ? void 0 : setSelectedObjectStructureId(selectedModelId);
|
|
1219
1219
|
handlePopUpModal === null || handlePopUpModal === void 0 ? void 0 : handlePopUpModal(true);
|
|
1220
1220
|
} }))),
|
|
1221
|
-
react_1.default.createElement("div", { className: "flex flex-col space-y-2 mt-2" }, selectedModel.listFlexTable ? (react_1.default.createElement(flexTable_1.FlexTable, { ref: flexTableRef, id: selectedModelId,
|
|
1221
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-2 mt-2" }, selectedModel.listFlexTable ? (react_1.default.createElement(flexTable_1.FlexTable, { darkMode: tabInfo === null || tabInfo === void 0 ? void 0 : tabInfo.darkMode, ref: flexTableRef, id: selectedModelId,
|
|
1222
1222
|
// INFO: imageEndpoint is fallback; resolveImageUrl builds nested
|
|
1223
1223
|
// storage paths matching listObject (collection/record/field/row/column/file)
|
|
1224
1224
|
imageEndpoint: devSettings === null || devSettings === void 0 ? void 0 : devSettings.imageEndpoint, resolveImageUrl: resolveFlexImageUrl, data: ((_e = clonedSelectedData[selectedModelId]) === null || _e === void 0 ? void 0 : _e.map(function (item) {
|
|
@@ -1252,7 +1252,7 @@ var renderEachListObject = function (type, selectedModelId, model, selectedData,
|
|
|
1252
1252
|
}
|
|
1253
1253
|
return acc;
|
|
1254
1254
|
}, {}));
|
|
1255
|
-
})) || [], columns: selectedModel.objectData || [], categoryList: selectedModel.listFlexCategories, disabled: type === "read" || selectedModel.disabled, className: "w-full", showTotal: selectedModel.listFlexSubTotal, showGrandTotal: selectedModel.listFlexGrandTotal, flexMathQueries: selectedModel.listFlexMathQueries, maxRows: selectedModel.listFlexMaxRows, defaultTitleTemplate: selectedModel.listFlexDefaultCategory, hideEmptyState: selectedModel.listFlexHideEmptyState, mobileView: selectedModel.listFlexMobileView, categoryColumnLabel: selectedModel.listFlexCategoryColumnLabel, optional: selectedModel.listFlexOptional, onChangeData: function (newData) {
|
|
1255
|
+
})) || [], columns: selectedModel.objectData || [], pinColumns: { left: ["category"] }, categoryList: selectedModel.listFlexCategories, disabled: type === "read" || selectedModel.disabled, className: "w-full", showTotal: selectedModel.listFlexSubTotal, showGrandTotal: selectedModel.listFlexGrandTotal, flexMathQueries: selectedModel.listFlexMathQueries, maxRows: selectedModel.listFlexMaxRows, defaultTitleTemplate: selectedModel.listFlexDefaultCategory, hideEmptyState: selectedModel.listFlexHideEmptyState, mobileView: selectedModel.listFlexMobileView, categoryColumnLabel: selectedModel.listFlexCategoryColumnLabel, optional: selectedModel.listFlexOptional, onChangeData: function (newData) {
|
|
1256
1256
|
if (type === "update") {
|
|
1257
1257
|
var updatedData = newData.map(function (item) {
|
|
1258
1258
|
var id = item.id, title = item.title, category = item.category, rest = __rest(item, ["id", "title", "category"]);
|
|
@@ -1294,7 +1294,7 @@ exports.renderEachListObject = renderEachListObject;
|
|
|
1294
1294
|
* @returns
|
|
1295
1295
|
*/
|
|
1296
1296
|
var renderDataTemplateForm = function (data, model, formInputRef, updateMethod, modalInput, cellInput, props, referenceProps, fileProps, objectProps, signatureProps, isForm, offline, columnType, bareUpdateIndividualComponent, mobileView) {
|
|
1297
|
-
var _a, _b, _c, _d;
|
|
1297
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1298
1298
|
var inputList = {};
|
|
1299
1299
|
var formInputRefList = {};
|
|
1300
1300
|
var staticList = {};
|
|
@@ -1410,7 +1410,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1410
1410
|
return null;
|
|
1411
1411
|
});
|
|
1412
1412
|
}
|
|
1413
|
-
inputList[groupId].push(react_1.default.createElement(select_1.Select, { ref: isOptional
|
|
1413
|
+
inputList[groupId].push(react_1.default.createElement(select_1.Select, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
|
|
1414
1414
|
? null
|
|
1415
1415
|
: formInputRef[(_e = eachAttribute.refIndex) !== null && _e !== void 0 ? _e : index], id: eachAttribute.id, optional: isOptional, value: clonedSelectedData[eachAttribute.id]
|
|
1416
1416
|
? (_f = clonedSelectedData[eachAttribute.id]) === null || _f === void 0 ? void 0 : _f[(_g = eachAttribute.targetFieldsAttributeOption) !== null && _g !== void 0 ? _g : ""]
|
|
@@ -1462,11 +1462,13 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1462
1462
|
case "object":
|
|
1463
1463
|
var objectValue = Object.values((_k = clonedSelectedData[eachAttribute.id]) !== null && _k !== void 0 ? _k : {});
|
|
1464
1464
|
inputList[groupId].push(react_1.default.createElement(react_1.default.Fragment, null,
|
|
1465
|
-
react_1.default.createElement("label", { className: "block text-sm font-medium text-gray-700" },
|
|
1465
|
+
react_1.default.createElement("label", { className: "block text-sm font-medium ".concat((props === null || props === void 0 ? void 0 : props.darkMode) ? "text-white" : "text-gray-700") },
|
|
1466
1466
|
label,
|
|
1467
1467
|
" ",
|
|
1468
1468
|
labelExtra),
|
|
1469
|
-
react_1.default.createElement("div", { className: "block w-full px-5 py-3 mt-1 text-base text-left
|
|
1469
|
+
react_1.default.createElement("div", { className: "block w-full px-5 py-3 mt-1 text-base text-left rounded-md cursor-pointer focus:border-primary-500 focus:outline-none ".concat((props === null || props === void 0 ? void 0 : props.darkMode)
|
|
1470
|
+
? "text-gray-400 bg-gray-800 border border-gray-700"
|
|
1471
|
+
: "text-gray-300 bg-white border border-gray-300"), onClick: function () {
|
|
1470
1472
|
var _a;
|
|
1471
1473
|
objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedObjectStructureId(eachAttribute.id);
|
|
1472
1474
|
objectProps === null || objectProps === void 0 ? void 0 : objectProps.setSelectedObjectData((_a = clonedSelectedData[eachAttribute.id]) !== null && _a !== void 0 ? _a : {});
|
|
@@ -1504,11 +1506,18 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1504
1506
|
}
|
|
1505
1507
|
});
|
|
1506
1508
|
}
|
|
1507
|
-
inputList[groupId].push(react_1.default.createElement(select_1.Select, { ref: isOptional
|
|
1509
|
+
inputList[groupId].push(react_1.default.createElement(select_1.Select, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
|
|
1508
1510
|
? null
|
|
1509
1511
|
: formInputRef[(_o = eachAttribute.refIndex) !== null && _o !== void 0 ? _o : index], id: eachAttribute.id, optional: isOptional, value: (_p = clonedSelectedData[eachAttribute.id]) !== null && _p !== void 0 ? _p : (eachAttribute.type === "list" ? "" : []), placeholder: placeholder !== eachAttribute.name
|
|
1510
1512
|
? placeholder
|
|
1511
|
-
: "Select An Option", label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, newValue: eachAttribute.listNewValue, newValueLabel: eachAttribute.listNewValueLabel, showTag: eachAttribute.showTagSelections,
|
|
1513
|
+
: "Select An Option", label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, newValue: eachAttribute.listNewValue, newValueLabel: eachAttribute.listNewValueLabel, showTag: eachAttribute.showTagSelections,
|
|
1514
|
+
// INFO: a coloured cell is tap-only — typing only filtered a handful of
|
|
1515
|
+
// fixed options and popped the phone keyboard over them; columns that
|
|
1516
|
+
// accept new values keep the search box
|
|
1517
|
+
disableKeyboard: eachAttribute.disabledKeyboardSearch ||
|
|
1518
|
+
(!!(cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) &&
|
|
1519
|
+
!!eachAttribute.showTagSelections &&
|
|
1520
|
+
!eachAttribute.listNewValue), type: (_q = eachAttribute.listView) !== null && _q !== void 0 ? _q : undefined, options: optionList_2, onChange: function (value) {
|
|
1512
1521
|
updateMethod.handleOnChangeSelect(eachAttribute.id, value);
|
|
1513
1522
|
}, disabled: disabled, cellInput: {
|
|
1514
1523
|
active: cellInput === null || cellInput === void 0 ? void 0 : cellInput.active,
|
|
@@ -1525,7 +1534,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1525
1534
|
var organisationMembers = [];
|
|
1526
1535
|
if (personDevSettings)
|
|
1527
1536
|
organisationMembers = (_r = personDevSettings.organisationMembers) !== null && _r !== void 0 ? _r : [];
|
|
1528
|
-
inputList[groupId].push(react_1.default.createElement(select_1.Select, { ref: isOptional
|
|
1537
|
+
inputList[groupId].push(react_1.default.createElement(select_1.Select, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
|
|
1529
1538
|
? null
|
|
1530
1539
|
: formInputRef[(_s = eachAttribute.refIndex) !== null && _s !== void 0 ? _s : index], id: eachAttribute.id, optional: isOptional, value: personValue, placeholder: placeholder !== eachAttribute.name
|
|
1531
1540
|
? placeholder
|
|
@@ -1544,7 +1553,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1544
1553
|
var roleOptions = [];
|
|
1545
1554
|
if (rolesDevSettings)
|
|
1546
1555
|
roleOptions = (_t = rolesDevSettings.roleOptions) !== null && _t !== void 0 ? _t : [];
|
|
1547
|
-
inputList[groupId].push(react_1.default.createElement(select_1.Select, { ref: isOptional
|
|
1556
|
+
inputList[groupId].push(react_1.default.createElement(select_1.Select, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
|
|
1548
1557
|
? null
|
|
1549
1558
|
: formInputRef[(_u = eachAttribute.refIndex) !== null && _u !== void 0 ? _u : index], id: eachAttribute.id, optional: isOptional, value: rolesValue, placeholder: placeholder !== eachAttribute.name
|
|
1550
1559
|
? placeholder
|
|
@@ -1559,8 +1568,11 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1559
1568
|
if (eachAttribute === null || eachAttribute === void 0 ? void 0 : eachAttribute.enableCheckbox) {
|
|
1560
1569
|
var value = (_v = clonedSelectedData[eachAttribute.id]) !== null && _v !== void 0 ? _v : false;
|
|
1561
1570
|
// Use shared Checkbox component so validation can run via handleSubmit
|
|
1562
|
-
inputList[groupId].push(
|
|
1563
|
-
|
|
1571
|
+
inputList[groupId].push(
|
|
1572
|
+
// INFO: flush with the card padding like every other input — the
|
|
1573
|
+
// row used to be centred with its own inset
|
|
1574
|
+
react_1.default.createElement("div", { className: "flex flex-row items-center gap-x-3" },
|
|
1575
|
+
react_1.default.createElement(checkbox_1.Checkbox, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
|
|
1564
1576
|
? null
|
|
1565
1577
|
: formInputRef[(_w = eachAttribute.refIndex) !== null && _w !== void 0 ? _w : index], id: eachAttribute.id, itemList: [
|
|
1566
1578
|
{
|
|
@@ -1574,7 +1586,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1574
1586
|
if ((cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) && cellInput.onBlur) {
|
|
1575
1587
|
cellInput.onBlur(__assign(__assign({}, clonedSelectedData), (_a = {}, _a[eachAttribute.id] = checkedValue, _a)));
|
|
1576
1588
|
}
|
|
1577
|
-
}
|
|
1589
|
+
} }),
|
|
1578
1590
|
selectInputCustomElement && (react_1.default.createElement("div", { className: "self-center" }, selectInputCustomElement))));
|
|
1579
1591
|
}
|
|
1580
1592
|
else if (eachAttribute.enableRadioButtons && !(cellInput === null || cellInput === void 0 ? void 0 : cellInput.active)) {
|
|
@@ -1586,7 +1598,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1586
1598
|
" ",
|
|
1587
1599
|
labelExtra),
|
|
1588
1600
|
selectInputCustomElement && (react_1.default.createElement("div", { className: "self-center" }, selectInputCustomElement)))),
|
|
1589
|
-
react_1.default.createElement(radioList_1.RadioList, { key: "".concat(eachAttribute.id, "-radioList"), id: eachAttribute.id, list: [
|
|
1601
|
+
react_1.default.createElement(radioList_1.RadioList, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, key: "".concat(eachAttribute.id, "-radioList"), id: eachAttribute.id, list: [
|
|
1590
1602
|
{
|
|
1591
1603
|
id: "true",
|
|
1592
1604
|
label: "Yes",
|
|
@@ -1595,7 +1607,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1595
1607
|
id: "false",
|
|
1596
1608
|
label: "No",
|
|
1597
1609
|
},
|
|
1598
|
-
], optional: isOptional, value: value, onSelect: function (value) {
|
|
1610
|
+
], optional: isOptional, pill: true, value: value, onSelect: function (value) {
|
|
1599
1611
|
var _a;
|
|
1600
1612
|
updateMethod.handleOnChangeSelect(eachAttribute.id, value);
|
|
1601
1613
|
// INFO: radios commit on select like the checkbox branch —
|
|
@@ -1608,7 +1620,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1608
1620
|
}
|
|
1609
1621
|
else {
|
|
1610
1622
|
var value = (_y = clonedSelectedData[eachAttribute.id]) === null || _y === void 0 ? void 0 : _y.toString();
|
|
1611
|
-
inputList[groupId].push(react_1.default.createElement(select_1.Select, { ref: isOptional
|
|
1623
|
+
inputList[groupId].push(react_1.default.createElement(select_1.Select, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
|
|
1612
1624
|
? null
|
|
1613
1625
|
: formInputRef[(_z = eachAttribute.refIndex) !== null && _z !== void 0 ? _z : index], id: eachAttribute.id, value: value, label: label, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, labelExtra: labelExtra, placeholder: placeholder !== eachAttribute.name
|
|
1614
1626
|
? placeholder
|
|
@@ -1647,7 +1659,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1647
1659
|
? ".png,.jpg,.jpeg,.heic,.heif,.tiff"
|
|
1648
1660
|
: ".pdf");
|
|
1649
1661
|
var fileDescription = (_1 = eachAttribute.fileDescription) !== null && _1 !== void 0 ? _1 : (eachAttribute.type === "image" ? undefined : "PDF up to 30MB");
|
|
1650
|
-
inputList[groupId].push(react_1.default.createElement(uploadInput_1.UploadInput, { lib: { axios: (_2 = props === null || props === void 0 ? void 0 : props.lib) === null || _2 === void 0 ? void 0 : _2.axios }, ref: isOptional
|
|
1662
|
+
inputList[groupId].push(react_1.default.createElement(uploadInput_1.UploadInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, lib: { axios: (_2 = props === null || props === void 0 ? void 0 : props.lib) === null || _2 === void 0 ? void 0 : _2.axios }, ref: isOptional
|
|
1651
1663
|
? null
|
|
1652
1664
|
: formInputRef[(_3 = eachAttribute.refIndex) !== null && _3 !== void 0 ? _3 : index], id: eachAttribute.id, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, file: (_4 = url !== null && url !== void 0 ? url : clonedSelectedData[eachAttribute.id]) !== null && _4 !== void 0 ? _4 : "", accept: accept, capture: eachAttribute.imageInputCapture, fileDescription: fileDescription, maxFileSize: fileProps === null || fileProps === void 0 ? void 0 : fileProps.maxFileSize, onChange: updateMethod.handleOnChangeFile, showModal: eachAttribute.showCameraGalleryOptionModal, disabled: disabled, handleCustomDownloadFile: fileProps === null || fileProps === void 0 ? void 0 : fileProps.handleCustomDownloadFile, compress: eachAttribute.maxFileSize && eachAttribute.compressfileQuality
|
|
1653
1665
|
? {
|
|
@@ -1681,7 +1693,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1681
1693
|
var multiFileDescription = (_7 = eachAttribute.fileDescription) !== null && _7 !== void 0 ? _7 : (eachAttribute.type === "multipleImage"
|
|
1682
1694
|
? undefined
|
|
1683
1695
|
: "PDF up to 30MB");
|
|
1684
|
-
inputList[groupId].push(react_1.default.createElement(uploadInput_1.UploadInput, { type: "multi", files: __assign(__assign({}, (!react_1.default.isValidElement(clonedSelectedData[eachAttribute.id])
|
|
1696
|
+
inputList[groupId].push(react_1.default.createElement(uploadInput_1.UploadInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, type: "multi", files: __assign(__assign({}, (!react_1.default.isValidElement(clonedSelectedData[eachAttribute.id])
|
|
1685
1697
|
? clonedSelectedData[eachAttribute.id]
|
|
1686
1698
|
: { upload: [], remove: [] })), { data: multipleDataUrl }), optional: isOptional, ref: isOptional
|
|
1687
1699
|
? null
|
|
@@ -1696,7 +1708,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1696
1708
|
: undefined, customElement: eachAttribute.customElement, mobileView: mobileView, imageTagEdit: eachAttribute.imageTagEdit, imageTagOptions: eachAttribute.imageTagOptions, imageTagNewOption: eachAttribute.imageTagNewOption, imageDefaultTag: eachAttribute.imageDefaultTag, imageTagToggleMode: eachAttribute.imageTagToggleMode }));
|
|
1697
1709
|
break;
|
|
1698
1710
|
case "number":
|
|
1699
|
-
inputList[groupId].push(react_1.default.createElement(textInput_1.TextInput, { id: eachAttribute.id, ref: isOptional
|
|
1711
|
+
inputList[groupId].push(react_1.default.createElement(textInput_1.TextInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: isOptional
|
|
1700
1712
|
? null
|
|
1701
1713
|
: formInputRef[(_10 = eachAttribute.refIndex) !== null && _10 !== void 0 ? _10 : index], type: "number", value: (_11 = clonedSelectedData[eachAttribute.id]) !== null && _11 !== void 0 ? _11 : "", placeholder: placeholder, label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, onChange: updateMethod.handleOnChangeText, disabled: disabled, minNumber: eachAttribute.minNumber, maxNumber: eachAttribute.maxNumber, cellInput: {
|
|
1702
1714
|
active: cellInput === null || cellInput === void 0 ? void 0 : cellInput.active,
|
|
@@ -1784,7 +1796,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1784
1796
|
}
|
|
1785
1797
|
}
|
|
1786
1798
|
inputList[groupId].push(react_1.default.createElement("div", { id: eachAttribute.id, className: "flex flex-col gap-y-2" },
|
|
1787
|
-
react_1.default.createElement(textInput_1.TextInput, { value: displayValue, label: eachAttribute.name, type: "text", placeholder: eachAttribute.name, disabled: true }),
|
|
1799
|
+
react_1.default.createElement(textInput_1.TextInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, value: displayValue, label: eachAttribute.name, type: "text", placeholder: eachAttribute.name, disabled: true }),
|
|
1788
1800
|
react_1.default.createElement("div", { className: "h-80 w-full" },
|
|
1789
1801
|
react_1.default.createElement(mapView_1.MapView, { polygonList: polygonList_1, autoFitToMarkers: true, handleSelectPolygon: function (selectedIds) {
|
|
1790
1802
|
if (selectedIds && selectedIds.length > 0 && !disabled) {
|
|
@@ -1794,7 +1806,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1794
1806
|
}
|
|
1795
1807
|
else {
|
|
1796
1808
|
inputList[groupId].push(react_1.default.createElement(react_1.default.Fragment, null,
|
|
1797
|
-
react_1.default.createElement(select_1.Select, { ref: isOptional
|
|
1809
|
+
react_1.default.createElement(select_1.Select, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
|
|
1798
1810
|
? null
|
|
1799
1811
|
: formInputRef[(_18 = eachAttribute.refIndex) !== null && _18 !== void 0 ? _18 : index], id: eachAttribute.id, value: (_19 = clonedSelectedData[eachAttribute.id]) !== null && _19 !== void 0 ? _19 : (eachAttribute.type === "reference" ? "" : []), label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, placeholder: placeholder !== eachAttribute.name
|
|
1800
1812
|
? placeholder
|
|
@@ -1884,7 +1896,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1884
1896
|
else if (eachAttribute.type === "password") {
|
|
1885
1897
|
textType = "password";
|
|
1886
1898
|
}
|
|
1887
|
-
inputList[groupId].push(react_1.default.createElement(textInput_1.TextInput, { id: eachAttribute.id, ref: isOptional
|
|
1899
|
+
inputList[groupId].push(react_1.default.createElement(textInput_1.TextInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: isOptional
|
|
1888
1900
|
? null
|
|
1889
1901
|
: formInputRef[(_20 = eachAttribute.refIndex) !== null && _20 !== void 0 ? _20 : index], type: textType, value: (_21 = clonedSelectedData[eachAttribute.id]) !== null && _21 !== void 0 ? _21 : "", placeholder: placeholder, label: label, labelExtra: labelExtra, subLabel: subLabel, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, optional: isOptional, onChange: updateMethod.handleOnChangeText, disabled: disabled, cellInput: {
|
|
1890
1902
|
active: cellInput === null || cellInput === void 0 ? void 0 : cellInput.active,
|
|
@@ -1912,7 +1924,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1912
1924
|
dateValue = undefined;
|
|
1913
1925
|
var showTime = eachAttribute.hideShowTime ? false : true;
|
|
1914
1926
|
var hideDate = eachAttribute.hideShowDate ? true : false;
|
|
1915
|
-
inputList[groupId].push(react_1.default.createElement(datePicker_1.InputDatePicker, { title: label, labelExtra: labelExtra, subLabel: subLabel, id: eachAttribute.id, optional: isOptional, ref: isOptional
|
|
1927
|
+
inputList[groupId].push(react_1.default.createElement(datePicker_1.InputDatePicker, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, title: label, labelExtra: labelExtra, subLabel: subLabel, id: eachAttribute.id, optional: isOptional, ref: isOptional
|
|
1916
1928
|
? null
|
|
1917
1929
|
: formInputRef[(_25 = eachAttribute.refIndex) !== null && _25 !== void 0 ? _25 : index], onChange: updateMethod.handleOnChangeDate, value: dateValue, disabled: disabled, cellInput: {
|
|
1918
1930
|
active: cellInput === null || cellInput === void 0 ? void 0 : cellInput.active,
|
|
@@ -1928,7 +1940,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1928
1940
|
break;
|
|
1929
1941
|
}
|
|
1930
1942
|
var markdownRef = formInputRef[(_27 = eachAttribute.refIndex) !== null && _27 !== void 0 ? _27 : index];
|
|
1931
|
-
inputList[groupId].push(react_1.default.createElement(markdown_1.MarkdownInput, { id: eachAttribute.id, ref: markdownRef, label: label, labelExtra: labelExtra, subLabel: subLabel, value: (_28 = clonedSelectedData[eachAttribute.id]) !== null && _28 !== void 0 ? _28 : "", placeholder: placeholder, optional: isOptional, onChange: updateMethod.handleOnChangeMarkdown, disabled: disabled, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, lib: ((_29 = props === null || props === void 0 ? void 0 : props.lib) === null || _29 === void 0 ? void 0 : _29.axios) ? { axios: props.lib.axios } : undefined, uploadEndpoint: ((_30 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.devSettings) === null || _30 === void 0 ? void 0 : _30.uploadEndpoint) ||
|
|
1943
|
+
inputList[groupId].push(react_1.default.createElement(markdown_1.MarkdownInput, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: markdownRef, label: label, labelExtra: labelExtra, subLabel: subLabel, value: (_28 = clonedSelectedData[eachAttribute.id]) !== null && _28 !== void 0 ? _28 : "", placeholder: placeholder, optional: isOptional, onChange: updateMethod.handleOnChangeMarkdown, disabled: disabled, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, lib: ((_29 = props === null || props === void 0 ? void 0 : props.lib) === null || _29 === void 0 ? void 0 : _29.axios) ? { axios: props.lib.axios } : undefined, uploadEndpoint: ((_30 = referenceProps === null || referenceProps === void 0 ? void 0 : referenceProps.devSettings) === null || _30 === void 0 ? void 0 : _30.uploadEndpoint) ||
|
|
1932
1944
|
eachAttribute.uploadEndpoint, enableImageUpload: eachAttribute.enableImageUpload, enableVideoUpload: eachAttribute.enableVideoUpload, compress: eachAttribute.maxFileSize && eachAttribute.compressfileQuality
|
|
1933
1945
|
? {
|
|
1934
1946
|
maxFileSize: eachAttribute.maxFileSize,
|
|
@@ -1937,7 +1949,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1937
1949
|
: undefined, customElement: selectInputCustomElement }));
|
|
1938
1950
|
break;
|
|
1939
1951
|
case "textArea":
|
|
1940
|
-
inputList[groupId].push(react_1.default.createElement(textArea_1.TextArea, { id: eachAttribute.id, ref: isOptional
|
|
1952
|
+
inputList[groupId].push(react_1.default.createElement(textArea_1.TextArea, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: isOptional
|
|
1941
1953
|
? null
|
|
1942
1954
|
: formInputRef[(_31 = eachAttribute.refIndex) !== null && _31 !== void 0 ? _31 : index], label: label, labelExtra: labelExtra, subLabel: subLabel, placeholder: placeholder, value: (_32 = clonedSelectedData[eachAttribute.id]) !== null && _32 !== void 0 ? _32 : "", rows: 4, optional: isOptional, onChange: updateMethod.handleOnChangeText, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, disabled: disabled, customElement: selectInputCustomElement, cellInput: {
|
|
1943
1955
|
active: cellInput === null || cellInput === void 0 ? void 0 : cellInput.active,
|
|
@@ -1952,7 +1964,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1952
1964
|
signatureUrl = (0, blobModule_1.renderImageUrlFromPath)(fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageEndpoint, eachAttribute.imageCollectionName, props === null || props === void 0 ? void 0 : props.id, eachAttribute.imageFileName, clonedSelectedData[eachAttribute.id], fileProps === null || fileProps === void 0 ? void 0 : fileProps.imageBucketName);
|
|
1953
1965
|
}
|
|
1954
1966
|
inputList[groupId].push(react_1.default.createElement("div", { className: eachAttribute.description ? "w-full min-h-72" : "w-full h-72" },
|
|
1955
|
-
react_1.default.createElement(signature_1.Signature, { id: eachAttribute.id, ref: formInputRef[(_33 = eachAttribute.refIndex) !== null && _33 !== void 0 ? _33 : index], label: label, labelExtra: labelExtra, description: eachAttribute.description, subLabel: undefined, dataURL: signatureUrl, optional: isOptional, signing: signatureProps === null || signatureProps === void 0 ? void 0 : signatureProps.signing, onChange: signatureProps === null || signatureProps === void 0 ? void 0 : signatureProps.setSigning, onSubmit: function (_, dataURL) {
|
|
1967
|
+
react_1.default.createElement(signature_1.Signature, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, id: eachAttribute.id, ref: formInputRef[(_33 = eachAttribute.refIndex) !== null && _33 !== void 0 ? _33 : index], label: label, labelExtra: labelExtra, description: eachAttribute.description, subLabel: undefined, dataURL: signatureUrl, optional: isOptional, signing: signatureProps === null || signatureProps === void 0 ? void 0 : signatureProps.signing, onChange: signatureProps === null || signatureProps === void 0 ? void 0 : signatureProps.setSigning, onSubmit: function (_, dataURL) {
|
|
1956
1968
|
return updateMethod.handleSignatureComplete(dataURL, eachAttribute.id);
|
|
1957
1969
|
}, signatureClear: true, canvasContainerClassName: "shadow-none", infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement })));
|
|
1958
1970
|
break;
|
|
@@ -1994,7 +2006,7 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
1994
2006
|
: ((_38 = canvasData === null || canvasData === void 0 ? void 0 : canvasData.texts) !== null && _38 !== void 0 ? _38 : []);
|
|
1995
2007
|
normalizedDrawings = [];
|
|
1996
2008
|
}
|
|
1997
|
-
inputList[groupId].push(react_1.default.createElement(canvas_1.Canvas, { ref: isOptional
|
|
2009
|
+
inputList[groupId].push(react_1.default.createElement(canvas_1.Canvas, { darkMode: props === null || props === void 0 ? void 0 : props.darkMode, ref: isOptional
|
|
1998
2010
|
? null
|
|
1999
2011
|
: formInputRef[(_39 = eachAttribute.refIndex) !== null && _39 !== void 0 ? _39 : index], id: eachAttribute.id, label: label, labelExtra: labelExtra, infoElement: (cellInput === null || cellInput === void 0 ? void 0 : cellInput.active) ? undefined : infoElement, customElement: selectInputCustomElement, optional: isOptional, enableDraw: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableDraw : false, enableImageUpload: (props === null || props === void 0 ? void 0 : props.type) === "update" ? eachAttribute.enableImageUpload : false, readOnly: (props === null || props === void 0 ? void 0 : props.type) !== "update", texts: normalizedTexts, drawings: normalizedDrawings, backgroundImageUrl: eachAttribute.enableImageUpload &&
|
|
2000
2012
|
canvasData &&
|
|
@@ -2246,24 +2258,50 @@ var renderDataTemplateForm = function (data, model, formInputRef, updateMethod,
|
|
|
2246
2258
|
return (react_1.default.createElement("div", { className: "col-span-12 mt-4" },
|
|
2247
2259
|
react_1.default.createElement(detailList_1.DetailList, { title: "", list: items, size: "compact", className: "border rounded-lg" })));
|
|
2248
2260
|
};
|
|
2261
|
+
// INFO: every section is a white card on whatever background the host paints
|
|
2262
|
+
// (Space paints grey) — title, optional description, then the fields in the
|
|
2263
|
+
// same 12-column grid the form uses, so column spans behave identically inside
|
|
2264
|
+
// a card and at the top level. Colour is reserved for the active step, the
|
|
2265
|
+
// primary action and status; sections themselves stay neutral.
|
|
2266
|
+
var sectionCardClassName = "col-span-12 rounded-lg border shadow-sm ".concat((props === null || props === void 0 ? void 0 : props.darkMode)
|
|
2267
|
+
? "border-gray-700 ".concat((_e = props === null || props === void 0 ? void 0 : props.darkModeBg) !== null && _e !== void 0 ? _e : "bg-gray-900")
|
|
2268
|
+
: "border-gray-200 bg-white", " ").concat(mobileView ? "p-4" : "p-5");
|
|
2269
|
+
var sectionGridClassName = "grid grid-cols-12 ".concat(mobileView ? "gap-x-6 gap-y-2 md:gap-6" : "gap-6");
|
|
2270
|
+
var hasSections = sortedInputListEntries.some(function (_a) {
|
|
2271
|
+
var key = _a[0];
|
|
2272
|
+
return key !== "default";
|
|
2273
|
+
});
|
|
2274
|
+
var renderSectionHeading = function (key) {
|
|
2275
|
+
var _a;
|
|
2276
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
2277
|
+
react_1.default.createElement("div", { className: "".concat(sectionClassName, " font-bold ").concat((props === null || props === void 0 ? void 0 : props.darkMode) ? "text-white" : "text-gray-900") }, key),
|
|
2278
|
+
((_a = props === null || props === void 0 ? void 0 : props.groupDescriptions) === null || _a === void 0 ? void 0 : _a[key]) && (react_1.default.createElement("p", { className: "col-span-12 text-sm text-gray-500 mt-0.5" }, props.groupDescriptions[key]))));
|
|
2279
|
+
};
|
|
2249
2280
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
2250
|
-
sortedInputListEntries.map(function (_a
|
|
2251
|
-
var _b, _c, _d;
|
|
2281
|
+
sortedInputListEntries.map(function (_a) {
|
|
2282
|
+
var _b, _c, _d, _e;
|
|
2252
2283
|
var key = _a[0], inputs = _a[1];
|
|
2253
2284
|
if (key === "default")
|
|
2254
2285
|
return null;
|
|
2255
2286
|
return Object.keys((_b = props === null || props === void 0 ? void 0 : props.groupIdCollapsible) !== null && _b !== void 0 ? _b : {}).length > 0 ? (react_1.default.createElement(collapse_1.Collapse, { key: key, defaultValue: ((_c = props === null || props === void 0 ? void 0 : props.groupIdCollapsible) === null || _c === void 0 ? void 0 : _c[key])
|
|
2256
2287
|
? !((_d = props === null || props === void 0 ? void 0 : props.groupIdCollapsible) === null || _d === void 0 ? void 0 : _d[key])
|
|
2257
|
-
: true, titleClassName: "!font-bold", containerClassName: "".concat(sectionClassName), notCollapseContainerCss: "bg-
|
|
2288
|
+
: true, titleClassName: "!font-bold ".concat((props === null || props === void 0 ? void 0 : props.darkMode) ? "text-white" : "text-gray-900"), containerClassName: "".concat(sectionClassName), notCollapseContainerCss: "rounded-lg border shadow-sm ".concat((props === null || props === void 0 ? void 0 : props.darkMode) ? "bg-white/5 border-gray-700" : "bg-white border-gray-200"), collapseContainerCss: "rounded-lg border shadow-sm ".concat((props === null || props === void 0 ? void 0 : props.darkMode) ? "bg-white/5 border-gray-700" : "bg-white border-gray-200"), title: key, desc: (_e = props === null || props === void 0 ? void 0 : props.groupDescriptions) === null || _e === void 0 ? void 0 : _e[key], icon: react_1.default.createElement(react_1.default.Fragment, null), content: react_1.default.createElement("div", { className: "".concat(sectionGridClassName, " mt-6") },
|
|
2289
|
+
renderInputs(key, inputs),
|
|
2290
|
+
renderStaticDetailList(key)), formInputRefList: formInputRefList === null || formInputRefList === void 0 ? void 0 : formInputRefList[key] })) : (react_1.default.createElement("div", { key: key, className: sectionCardClassName },
|
|
2291
|
+
renderSectionHeading(key),
|
|
2292
|
+
react_1.default.createElement("div", { className: "".concat(sectionGridClassName, " mt-4") },
|
|
2258
2293
|
renderInputs(key, inputs),
|
|
2259
|
-
renderStaticDetailList(key))
|
|
2260
|
-
react_1.default.createElement("div", { className: "".concat(index !== 0 ? "border-t pt-4 mt-5" : "", " ").concat(sectionClassName, " font-bold ") }, key),
|
|
2261
|
-
renderInputs(key, inputs),
|
|
2262
|
-
renderStaticDetailList(key)));
|
|
2294
|
+
renderStaticDetailList(key))));
|
|
2263
2295
|
}),
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2296
|
+
hasSections && ((_f = inputList["default"]) === null || _f === void 0 ? void 0 : _f.length) > 0 ? (
|
|
2297
|
+
// INFO: fields without a section sit in their own untitled card so they
|
|
2298
|
+
// line up with the sections instead of floating on the page background
|
|
2299
|
+
react_1.default.createElement("div", { className: sectionCardClassName },
|
|
2300
|
+
react_1.default.createElement("div", { className: sectionGridClassName },
|
|
2301
|
+
renderDefaultInputs(),
|
|
2302
|
+
renderStaticDetailList("default")))) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
2303
|
+
renderDefaultInputs(),
|
|
2304
|
+
renderStaticDetailList("default")))));
|
|
2267
2305
|
};
|
|
2268
2306
|
exports.renderDataTemplateForm = renderDataTemplateForm;
|
|
2269
2307
|
var compareUpdatedFields = function (prevData, currentData) {
|