blixify-ui-web 0.4.83 → 0.4.84
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/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +114 -53
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/settingsModal.js +16 -2
- package/lib/components/data/dataTemplate/settingsModal.js.map +1 -1
- package/lib/components/input/address/index.d.ts.map +1 -1
- package/lib/components/input/address/index.js +1 -4
- package/lib/components/input/address/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAmEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAmEf,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAoB1B,eAAO,MAAM,YAAY,mFAilOvB,CAAC"}
|
|
@@ -4022,19 +4022,29 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4022
4022
|
} }))));
|
|
4023
4023
|
}
|
|
4024
4024
|
else if (type === "list") {
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4025
|
+
var listActionBtns = [];
|
|
4026
|
+
if (isActivityLog) {
|
|
4027
|
+
listActionBtns.push(react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(HeroIcons.ClockIcon, { className: "h-7 w-7 text-white" }), onClick: function () { return setActivityModal(true); }, background: "bg-primary-500 hover:bg-primary-600" }));
|
|
4028
|
+
}
|
|
4029
|
+
if (bareActionComponent) {
|
|
4030
|
+
listActionBtns.push(bareActionComponent);
|
|
4031
|
+
}
|
|
4032
|
+
else if (((_g = props.edit) === null || _g === void 0 ? void 0 : _g.allEditable) || ((_h = props.edit) === null || _h === void 0 ? void 0 : _h.createBtn)) {
|
|
4033
|
+
listActionBtns.push(react_1.default.createElement(react_1.default.Fragment, null,
|
|
4034
|
+
hasNavigation ? (react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
|
|
4035
|
+
var _a, _b;
|
|
4036
|
+
(_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "update", "new");
|
|
4037
|
+
}, className: isBottom ? "mt-5" : "" })) : (react_1.default.createElement(link_1.Link, { href: "".concat(props.localURLEndpoint, "?data=new&type=update&collection=").concat(props.collectionId), linkType: props.linkType, custom: props.custom },
|
|
4038
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.PlusIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", className: isBottom ? "mt-5" : "" }))),
|
|
4039
|
+
offlineDataLength > 0 && (react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(solid_1.CloudArrowUpIcon, { className: "h-7 w-7 text-white" }), background: "bg-primary-500 hover:bg-primary-600", onClick: function () {
|
|
4040
|
+
handlePopUpModal(true, "offline");
|
|
4041
|
+
}, className: isBottom ? "mt-5" : "" }))));
|
|
4042
|
+
}
|
|
4043
|
+
if (listActionBtns.length > 0) {
|
|
4044
|
+
return react_1.default.createElement(react_1.default.Fragment, null, listActionBtns);
|
|
4045
|
+
}
|
|
4046
|
+
else
|
|
4047
|
+
return null;
|
|
4038
4048
|
}
|
|
4039
4049
|
return null;
|
|
4040
4050
|
};
|
|
@@ -4151,7 +4161,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4151
4161
|
authList));
|
|
4152
4162
|
};
|
|
4153
4163
|
var renderContent = function () {
|
|
4154
|
-
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
|
|
4164
|
+
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;
|
|
4155
4165
|
var isBottom = ((_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareUpdateActionBottom) ? true : false;
|
|
4156
4166
|
var tabs = renderTabs();
|
|
4157
4167
|
var pages = [
|
|
@@ -4263,7 +4273,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4263
4273
|
react_1.default.createElement("div", { className: "mt-8" }, renderListObject(props.type)),
|
|
4264
4274
|
isBottom && renderActionButtons(props.type, true)));
|
|
4265
4275
|
case "list":
|
|
4266
|
-
var
|
|
4276
|
+
var filterComponent_1 = renderSearchContent();
|
|
4267
4277
|
var dataComponent = renderTabContent(tabs, props.type, viewType);
|
|
4268
4278
|
var actionComponent = renderActionButtons(props.type);
|
|
4269
4279
|
var listReadQueryHOC = (react_1.default.createElement(readQueryHoc_1.ReadQueryHoc, { ref: listRQueryHocRef, database: {
|
|
@@ -4279,8 +4289,91 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4279
4289
|
if ((_0 = props.renderSettings) === null || _0 === void 0 ? void 0 : _0.renderListUI) {
|
|
4280
4290
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4281
4291
|
listReadQueryHOC,
|
|
4282
|
-
props.renderSettings.renderListUI(actionComponent,
|
|
4292
|
+
props.renderSettings.renderListUI(actionComponent, filterComponent_1, dataComponent)));
|
|
4283
4293
|
}
|
|
4294
|
+
var renderListFilterElements = function () {
|
|
4295
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4296
|
+
var filterElementList = [];
|
|
4297
|
+
if (!((_a = props.organise) === null || _a === void 0 ? void 0 : _a.filterComponentNewRow)) {
|
|
4298
|
+
if ((_b = props.organise) === null || _b === void 0 ? void 0 : _b.showGroupByFeature) {
|
|
4299
|
+
filterElementList.push(react_1.default.createElement(select_1.Select, { label: "Group", options: (_h = (_e = (_d = (_c = props === null || props === void 0 ? void 0 : props.organise) === null || _c === void 0 ? void 0 : _c.renderGroupByOptions) === null || _d === void 0 ? void 0 : _d.call(_c)) !== null && _e !== void 0 ? _e : (_g = (_f = props === null || props === void 0 ? void 0 : props.organise) === null || _f === void 0 ? void 0 : _f.renderReferenceLabelOptions) === null || _g === void 0 ? void 0 : _g.call(_f, props.collectionId, true)) !== null && _h !== void 0 ? _h : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } }));
|
|
4300
|
+
}
|
|
4301
|
+
if (filterComponent_1 &&
|
|
4302
|
+
Array.isArray(filterComponent_1) &&
|
|
4303
|
+
filterComponent_1.length > 0) {
|
|
4304
|
+
filterElementList = filterElementList.concat(filterComponent_1);
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4307
|
+
if (filterElementList.length > 0) {
|
|
4308
|
+
return (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" }, filterElementList));
|
|
4309
|
+
}
|
|
4310
|
+
else
|
|
4311
|
+
return null;
|
|
4312
|
+
};
|
|
4313
|
+
var renderListActionElements = function () {
|
|
4314
|
+
var _a, _b;
|
|
4315
|
+
var actionElementList = [];
|
|
4316
|
+
if (schemaPresent) {
|
|
4317
|
+
actionElementList.push(react_1.default.createElement(react_1.default.Fragment, null,
|
|
4318
|
+
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 () {
|
|
4319
|
+
handlePopUpModal(true, "sort");
|
|
4320
|
+
} }),
|
|
4321
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4322
|
+
handlePopUpModal(true, "filter");
|
|
4323
|
+
}, bgColor: "bg-white" }),
|
|
4324
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.AdjustmentsHorizontalIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4325
|
+
handlePopUpModal(true, "overview");
|
|
4326
|
+
}, bgColor: "bg-white" }),
|
|
4327
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.ArrowPathIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4328
|
+
// INFO - When Refresh Don't Clear Filter
|
|
4329
|
+
handleRefresh();
|
|
4330
|
+
}, bgColor: "bg-white" })));
|
|
4331
|
+
}
|
|
4332
|
+
if (!isBottom) {
|
|
4333
|
+
var actionBtns = renderActionButtons(props.type);
|
|
4334
|
+
if (actionBtns)
|
|
4335
|
+
actionElementList.push(actionBtns);
|
|
4336
|
+
}
|
|
4337
|
+
if (schemaPresent || ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.showExport)) {
|
|
4338
|
+
actionElementList.push(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 (
|
|
4339
|
+
//TODO: Bug - Crash on Next Js
|
|
4340
|
+
// <Menu.Item>
|
|
4341
|
+
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)
|
|
4342
|
+
// </Menu.Item>
|
|
4343
|
+
); })), lib: {
|
|
4344
|
+
Transition: (_b = props === null || props === void 0 ? void 0 : props.lib) === null || _b === void 0 ? void 0 : _b.Transition,
|
|
4345
|
+
} }));
|
|
4346
|
+
}
|
|
4347
|
+
if (actionElementList.length > 0) {
|
|
4348
|
+
return (react_1.default.createElement("div", { className: "mb-0.5 flex flex-row items-center my-6 justify-content space-x-2 md:my-0" }, actionElementList));
|
|
4349
|
+
}
|
|
4350
|
+
else
|
|
4351
|
+
return null;
|
|
4352
|
+
};
|
|
4353
|
+
var renderListNewRowFilterElements = function () {
|
|
4354
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4355
|
+
var filterElementList = [];
|
|
4356
|
+
if ((_a = props.organise) === null || _a === void 0 ? void 0 : _a.filterComponentNewRow) {
|
|
4357
|
+
if (props.organise.showGroupByFeature) {
|
|
4358
|
+
filterElementList.push(react_1.default.createElement(select_1.Select, { label: "Group", options: (_g = (_d = (_c = (_b = props === null || props === void 0 ? void 0 : props.organise) === null || _b === void 0 ? void 0 : _b.renderGroupByOptions) === null || _c === void 0 ? void 0 : _c.call(_b)) !== null && _d !== void 0 ? _d : (_f = (_e = props === null || props === void 0 ? void 0 : props.organise) === null || _e === void 0 ? void 0 : _e.renderReferenceLabelOptions) === null || _f === void 0 ? void 0 : _f.call(_e, props.collectionId, true)) !== null && _g !== void 0 ? _g : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } }));
|
|
4359
|
+
}
|
|
4360
|
+
if (filterComponent_1 &&
|
|
4361
|
+
Array.isArray(filterComponent_1) &&
|
|
4362
|
+
filterComponent_1.length > 0) {
|
|
4363
|
+
filterComponent_1.forEach(function (item, index) {
|
|
4364
|
+
var filter = additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery[index];
|
|
4365
|
+
filterElementList.push(react_1.default.createElement("div", { key: index, className: (filter === null || filter === void 0 ? void 0 : filter.type) === "range"
|
|
4366
|
+
? "flex-grow sm:basis-full md:basis-1/2 lg:basis-1/3"
|
|
4367
|
+
: "flex-grow sm:flex-shrink-0 sm:basis-1/2 md:basis-1/4 lg:basis-1/6" }, item));
|
|
4368
|
+
});
|
|
4369
|
+
}
|
|
4370
|
+
}
|
|
4371
|
+
if (filterElementList.length > 0) {
|
|
4372
|
+
return (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-center my-6 gap-3" }, filterElementList));
|
|
4373
|
+
}
|
|
4374
|
+
else
|
|
4375
|
+
return null;
|
|
4376
|
+
};
|
|
4284
4377
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4285
4378
|
listReadQueryHOC,
|
|
4286
4379
|
react_1.default.createElement("div", { className: "flex flex-col py-2 md:items-end md:flex-row" },
|
|
@@ -4288,42 +4381,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
4288
4381
|
react_1.default.createElement("p", { className: "text-xl font-medium" }, props.title),
|
|
4289
4382
|
react_1.default.createElement("span", { className: "text-sm text-gray-500" }, props.description)),
|
|
4290
4383
|
react_1.default.createElement("div", { className: "grow" }),
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
schemaPresent && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
4296
|
-
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 () {
|
|
4297
|
-
handlePopUpModal(true, "sort");
|
|
4298
|
-
} }),
|
|
4299
|
-
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.FunnelIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4300
|
-
handlePopUpModal(true, "filter");
|
|
4301
|
-
}, bgColor: "bg-white" }),
|
|
4302
|
-
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.AdjustmentsHorizontalIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4303
|
-
handlePopUpModal(true, "overview");
|
|
4304
|
-
}, bgColor: "bg-white" }),
|
|
4305
|
-
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.ArrowPathIcon, { className: "h-7 w-7 text-primary-500" }), onClick: function () {
|
|
4306
|
-
// INFO - When Refresh Don't Clear Filter
|
|
4307
|
-
handleRefresh();
|
|
4308
|
-
}, bgColor: "bg-white" }))),
|
|
4309
|
-
!isBottom && renderActionButtons(props.type),
|
|
4310
|
-
(schemaPresent || ((_9 = props.organise) === null || _9 === void 0 ? void 0 : _9.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 (
|
|
4311
|
-
//TODO: Bug - Crash on Next Js
|
|
4312
|
-
// <Menu.Item>
|
|
4313
|
-
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)
|
|
4314
|
-
// </Menu.Item>
|
|
4315
|
-
); })), lib: {
|
|
4316
|
-
Transition: (_10 = props === null || props === void 0 ? void 0 : props.lib) === null || _10 === void 0 ? void 0 : _10.Transition,
|
|
4317
|
-
} })))),
|
|
4318
|
-
((_11 = props.organise) === null || _11 === void 0 ? void 0 : _11.filterComponentNewRow) && (react_1.default.createElement("div", { className: "flex flex-wrap items-center justify-center my-6 gap-3" },
|
|
4319
|
-
((_12 = props === null || props === void 0 ? void 0 : props.organise) === null || _12 === void 0 ? void 0 : _12.showGroupByFeature) && (react_1.default.createElement(select_1.Select, { label: "Group", options: (_18 = (_15 = (_14 = (_13 = props === null || props === void 0 ? void 0 : props.organise) === null || _13 === void 0 ? void 0 : _13.renderGroupByOptions) === null || _14 === void 0 ? void 0 : _14.call(_13)) !== null && _15 !== void 0 ? _15 : (_17 = (_16 = props === null || props === void 0 ? void 0 : props.organise) === null || _16 === void 0 ? void 0 : _16.renderReferenceLabelOptions) === null || _17 === void 0 ? void 0 : _17.call(_16, props.collectionId, true)) !== null && _18 !== void 0 ? _18 : [], value: groupId !== null && groupId !== void 0 ? groupId : "", onChange: function (value) { return setGroupId(value); } })),
|
|
4320
|
-
filterComponent.map(function (item, index) {
|
|
4321
|
-
var filter = additionalQuery === null || additionalQuery === void 0 ? void 0 : additionalQuery[index];
|
|
4322
|
-
return (react_1.default.createElement("div", { key: index, className: (filter === null || filter === void 0 ? void 0 : filter.type) === "range"
|
|
4323
|
-
? "flex-grow sm:basis-full md:basis-1/2 lg:basis-1/3"
|
|
4324
|
-
: "flex-grow sm:flex-shrink-0 sm:basis-1/2 md:basis-1/4 lg:basis-1/6" }, item));
|
|
4325
|
-
}))),
|
|
4326
|
-
schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_19 = props.organise) === null || _19 === void 0 ? void 0 : _19.darkMode })),
|
|
4384
|
+
renderListFilterElements(),
|
|
4385
|
+
renderListActionElements()),
|
|
4386
|
+
renderListNewRowFilterElements(),
|
|
4387
|
+
schemaPresent && (react_1.default.createElement(tabs_1.Tabs, { tabs: tabs, selectedId: viewType, linkType: props.linkType, custom: props.custom, onClick: function (id) { return handleSelectTab(id); }, darkMode: (_1 = props.organise) === null || _1 === void 0 ? void 0 : _1.darkMode })),
|
|
4327
4388
|
renderTabContent(tabs, props.type, viewType),
|
|
4328
4389
|
isBottom && renderActionButtons(props.type, true)));
|
|
4329
4390
|
default:
|
|
@@ -5322,7 +5383,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
5322
5383
|
} }));
|
|
5323
5384
|
}
|
|
5324
5385
|
else if (filterModal) {
|
|
5325
|
-
return (react_1.default.createElement(settingsModal_1.FilterModal, { server: props.devSettings.server, filter: additionalQuery, onChangeFilter: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.onChangeFilter, renderReferenceLabelOptions: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.renderReferenceSpaceOptions, setNotification: setNotification, onClose: function () {
|
|
5386
|
+
return (react_1.default.createElement(settingsModal_1.FilterModal, { server: props.devSettings.server, filter: additionalQuery, model: props.model, onChangeFilter: (_t = props.organise) === null || _t === void 0 ? void 0 : _t.onChangeFilter, renderReferenceLabelOptions: (_u = props.organise) === null || _u === void 0 ? void 0 : _u.renderReferenceLabelOptions, renderReferenceSpaceOptions: (_v = props.organise) === null || _v === void 0 ? void 0 : _v.renderReferenceSpaceOptions, setNotification: setNotification, onClose: function () {
|
|
5326
5387
|
handlePopUpModal(false);
|
|
5327
5388
|
} }));
|
|
5328
5389
|
}
|