blixify-ui-web 0.2.68 → 0.2.69

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAQN,MAAM,OAAO,CAAC;AAwDf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAO1B,eAAO,MAAM,YAAY,mFAwlKvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAQN,MAAM,OAAO,CAAC;AAwDf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAO1B,eAAO,MAAM,YAAY,mFAkmKvB,CAAC"}
@@ -3056,8 +3056,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3056
3056
  else
3057
3057
  return react_1.default.createElement(react_1.default.Fragment, null);
3058
3058
  };
3059
+ var renderBareReadComp = function () {
3060
+ var _a, _b, _c, _d;
3061
+ if ((_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareReadComponent) === null || _b === void 0 ? void 0 : _b.call(_a, selectedData)) {
3062
+ return (react_1.default.createElement("div", { className: "w-full" }, (_d = (_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareReadComponent) === null || _d === void 0 ? void 0 : _d.call(_c, selectedData)));
3063
+ }
3064
+ else
3065
+ return react_1.default.createElement(react_1.default.Fragment, null);
3066
+ };
3059
3067
  var renderContent = function () {
3060
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1;
3068
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
3061
3069
  var viewType = (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.viewId) !== null && _b !== void 0 ? _b : "general";
3062
3070
  var isBottom = ((_c = props.bareSettings) === null || _c === void 0 ? void 0 : _c.bareUpdateActionBottom) ? true : false;
3063
3071
  var tabs = [
@@ -3148,9 +3156,12 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3148
3156
  react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
3149
3157
  !isBottom && renderActionButtons(props.type))),
3150
3158
  schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id, tabs); }, darkMode: (_j = props.organise) === null || _j === void 0 ? void 0 : _j.darkMode })),
3151
- !((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareReadComponentHide) &&
3159
+ ((_k = props.bareSettings) === null || _k === void 0 ? void 0 : _k.bareReadComponentPos) === "top" &&
3160
+ renderBareReadComp(),
3161
+ !((_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareReadComponentHide) &&
3152
3162
  renderTabContent(tabs, props.type, viewType),
3153
- ((_m = (_l = props.bareSettings) === null || _l === void 0 ? void 0 : _l.bareReadComponent) === null || _m === void 0 ? void 0 : _m.call(_l, selectedData)) && (react_1.default.createElement("div", { className: "w-full" }, (_p = (_o = props.bareSettings) === null || _o === void 0 ? void 0 : _o.bareReadComponent) === null || _p === void 0 ? void 0 : _p.call(_o, selectedData))),
3163
+ ((_m = props.bareSettings) === null || _m === void 0 ? void 0 : _m.bareReadComponentPos) !== "top" &&
3164
+ renderBareReadComp(),
3154
3165
  isBottom && renderActionButtons(props.type, true)))));
3155
3166
  case "update":
3156
3167
  pages.push({
@@ -3159,7 +3170,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3159
3170
  current: true,
3160
3171
  });
3161
3172
  var filterModel_1 = [];
3162
- var disabledOnEnter_1 = (_r = (_q = props.organise) === null || _q === void 0 ? void 0 : _q.disabledOnEnter) !== null && _r !== void 0 ? _r : false;
3173
+ var disabledOnEnter_1 = (_p = (_o = props.organise) === null || _o === void 0 ? void 0 : _o.disabledOnEnter) !== null && _p !== void 0 ? _p : false;
3163
3174
  props.model.map(function (eachModel) {
3164
3175
  var _a;
3165
3176
  var present = false;
@@ -3192,7 +3203,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3192
3203
  }, cond: {
3193
3204
  type: "get",
3194
3205
  id: props.id,
3195
- }, offline: (_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
3206
+ }, offline: (_q = props.bareSettings) === null || _q === void 0 ? void 0 : _q.bareOffline, onChangeData: handleRetrieveSelectedData, onError: handleGetItemError })),
3196
3207
  renderBreadcrumb(pages),
3197
3208
  react_1.default.createElement("div", { className: "flex flex-col py-2 sm:items-center sm:flex-row" },
3198
3209
  react_1.default.createElement("div", { className: "flex flex-col w-full" },
@@ -3201,8 +3212,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3201
3212
  !isBottom && renderActionButtons(props.type)),
3202
3213
  react_1.default.createElement(form_1.Form, { className: "grid ".concat(formColumn, " gap-6 mt-6"), ref: formRef, refList: modalFormInputRefs, handleComplete: handleSubmit, disabledOnEnter: disabledOnEnter_1 },
3203
3214
  renderDataTemplateFormContent(selectedData, filterModel_1, modalFormInputRefs, false, false),
3204
- ((_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareUpdateComponent) &&
3205
- ((_u = props.bareSettings) === null || _u === void 0 ? void 0 : _u.bareUpdateComponent(selectedData))),
3215
+ ((_r = props.bareSettings) === null || _r === void 0 ? void 0 : _r.bareUpdateComponent) &&
3216
+ ((_s = props.bareSettings) === null || _s === void 0 ? void 0 : _s.bareUpdateComponent(selectedData))),
3206
3217
  react_1.default.createElement("div", { className: "mt-8" }, renderListAddress(props.type)),
3207
3218
  react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
3208
3219
  isBottom && renderActionButtons(props.type, true)));
@@ -3233,8 +3244,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3233
3244
  dbEndpoint: devSettings.dbEndpoint,
3234
3245
  dbAPIToken: devSettings.dbAPIToken,
3235
3246
  dbUserToken: devSettings.dbUserToken,
3236
- }, cond: handleReadQueryHocCond(), offline: (_v = props.bareSettings) === null || _v === void 0 ? void 0 : _v.bareOffline, onChangeData: handleGetListData, onError: handleGetItemError }));
3237
- if ((_w = props.renderSettings) === null || _w === void 0 ? void 0 : _w.renderListUI) {
3247
+ }, cond: handleReadQueryHocCond(), offline: (_t = props.bareSettings) === null || _t === void 0 ? void 0 : _t.bareOffline, onChangeData: handleGetListData, onError: handleGetItemError }));
3248
+ if ((_u = props.renderSettings) === null || _u === void 0 ? void 0 : _u.renderListUI) {
3238
3249
  return (react_1.default.createElement(react_1.default.Fragment, null,
3239
3250
  rqHOCComp,
3240
3251
  props.renderSettings.renderListUI(actionComponent, filterComponent, dataComponent)));
@@ -3246,7 +3257,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3246
3257
  react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
3247
3258
  react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
3248
3259
  react_1.default.createElement("div", { className: "grow" }),
3249
- !((_x = props.organise) === null || _x === void 0 ? void 0 : _x.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center mt-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row md:mt-0 md:mx-3" }, filterComponent)),
3260
+ !((_v = props.organise) === null || _v === void 0 ? void 0 : _v.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center mt-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row md:mt-0 md:mx-3" }, filterComponent)),
3250
3261
  react_1.default.createElement("div", { className: "mb-0.5 flex flex-row items-center my-6 justify-content space-x-2 md:my-0" },
3251
3262
  schemaPresent && (react_1.default.createElement(react_1.default.Fragment, null,
3252
3263
  react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(solid_1.ArrowsUpDownIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white", onClick: function () {
@@ -3268,16 +3279,16 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3268
3279
  });
3269
3280
  }, bgColor: "bg-white" }))),
3270
3281
  !isBottom && renderActionButtons(props.type),
3271
- (schemaPresent || ((_y = props.organise) === null || _y === void 0 ? void 0 : _y.showExport)) && (react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
3282
+ (schemaPresent || ((_w = props.organise) === null || _w === void 0 ? void 0 : _w.showExport)) && (react_1.default.createElement(popUp_1.PopUp, { ctaComp: react_1.default.createElement(iconButton_1.IconButton, { className: "bg-primary-100", icon: react_1.default.createElement(solid_1.EllipsisVerticalIcon, { className: "h-7 w-7 text-primary-500" }), bgColor: "bg-white" }), renderComp: react_1.default.createElement("div", { className: "shadow-lg" }, moreButtonPopUp.map(function (eachPopup) { return (
3272
3283
  //TODO: Bug - Crash on Next Js
3273
3284
  // <Menu.Item>
3274
3285
  react_1.default.createElement("span", { className: "block w-40 py-3 text-sm text-center text-gray-700 cursor-pointer hover:bg-gray-100", onClick: eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.onClick }, eachPopup === null || eachPopup === void 0 ? void 0 : eachPopup.text)
3275
3286
  // </Menu.Item>
3276
3287
  ); })), lib: {
3277
- Transition: (_z = props === null || props === void 0 ? void 0 : props.lib) === null || _z === void 0 ? void 0 : _z.Transition,
3288
+ Transition: (_x = props === null || props === void 0 ? void 0 : props.lib) === null || _x === void 0 ? void 0 : _x.Transition,
3278
3289
  } })))),
3279
- ((_0 = props.organise) === null || _0 === void 0 ? void 0 : _0.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center my-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row" }, filterComponent)),
3280
- schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id, tabs); }, darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode })),
3290
+ ((_y = props.organise) === null || _y === void 0 ? void 0 : _y.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-col items-center justify-center my-6 space-y-3 md:space-x-3 md:space-y-0 md:flex-row" }, filterComponent)),
3291
+ schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id, tabs); }, darkMode: (_z = props.organise) === null || _z === void 0 ? void 0 : _z.darkMode })),
3281
3292
  renderTabContent(tabs, props.type, viewType),
3282
3293
  isBottom && renderActionButtons(props.type, true)));
3283
3294
  default: