blixify-ui-web 0.4.76 → 0.4.78

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.
Files changed (26) hide show
  1. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  2. package/lib/components/data/dataTemplate/index.js +50 -23
  3. package/lib/components/data/dataTemplate/index.js.map +1 -1
  4. package/lib/components/data/dataTemplate/spaceModel.d.ts +3 -0
  5. package/lib/components/data/dataTemplate/spaceModel.d.ts.map +1 -1
  6. package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
  7. package/lib/components/data/dataWrapper/index.js +4 -2
  8. package/lib/components/data/dataWrapper/index.js.map +1 -1
  9. package/lib/components/data/listModule.d.ts.map +1 -1
  10. package/lib/components/data/listModule.js +3 -2
  11. package/lib/components/data/listModule.js.map +1 -1
  12. package/lib/components/display/calendar/calendarPlugin.d.ts.map +1 -1
  13. package/lib/components/display/calendar/calendarPlugin.js +4 -0
  14. package/lib/components/display/calendar/calendarPlugin.js.map +1 -1
  15. package/lib/components/display/calendar/index.d.ts +14 -2
  16. package/lib/components/display/calendar/index.d.ts.map +1 -1
  17. package/lib/components/display/calendar/index.js +135 -42
  18. package/lib/components/display/calendar/index.js.map +1 -1
  19. package/lib/components/input/address/index.d.ts +1 -0
  20. package/lib/components/input/address/index.d.ts.map +1 -1
  21. package/lib/components/input/address/index.js +16 -3
  22. package/lib/components/input/address/index.js.map +1 -1
  23. package/lib/components/input/select/index.d.ts.map +1 -1
  24. package/lib/components/input/select/index.js +10 -3
  25. package/lib/components/input/select/index.js.map +1 -1
  26. 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,mFA02NvB,CAAC"}
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,mFA04NvB,CAAC"}
@@ -516,21 +516,24 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
516
516
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
517
517
  var handleInitTab = function () { return __awaiter(void 0, void 0, void 0, function () {
518
518
  var currentTab, kanbanSettings, kanbanTitle_1, kanbanRefRQ_1, kanbanRefOption_1, kanbanRefLabel_1, kanbanRefQuery;
519
- var _a, _b, _c, _d, _e, _f;
520
- return __generator(this, function (_g) {
521
- switch (_g.label) {
519
+ var _a, _b, _c, _d, _e, _f, _g;
520
+ return __generator(this, function (_h) {
521
+ switch (_h.label) {
522
522
  case 0:
523
523
  currentTab = (0, listModule_1.renderSelectedRefreshTab)(props.localURLEndpoint, props.type, props.collectionId, props.id, (_a = props.organise) === null || _a === void 0 ? void 0 : _a.extendedTabs, (_b = props.organise) === null || _b === void 0 ? void 0 : _b.viewId);
524
524
  if (!(props.type === "list")) return [3 /*break*/, 5];
525
525
  setSelectedTab(currentTab);
526
526
  if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "calendar")) return [3 /*break*/, 1];
527
+ if ((_c = currentTab === null || currentTab === void 0 ? void 0 : currentTab.calendarSettings) === null || _c === void 0 ? void 0 : _c.defaultStartDate) {
528
+ setCalendarTabMonth((0, moment_1.default)(currentTab.calendarSettings.defaultStartDate).toDate());
529
+ }
527
530
  setFilterSearch({});
528
531
  setFilterSearchParams({});
529
532
  return [3 /*break*/, 5];
530
533
  case 1:
531
534
  if (!((currentTab === null || currentTab === void 0 ? void 0 : currentTab.viewType) === "kanban")) return [3 /*break*/, 4];
532
535
  kanbanSettings = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings;
533
- kanbanTitle_1 = (_c = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _c !== void 0 ? _c : "";
536
+ kanbanTitle_1 = (_d = kanbanSettings === null || kanbanSettings === void 0 ? void 0 : kanbanSettings.title) !== null && _d !== void 0 ? _d : "";
534
537
  kanbanRefRQ_1 = null;
535
538
  kanbanRefOption_1 = [];
536
539
  kanbanRefLabel_1 = "";
@@ -555,10 +558,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
555
558
  return [4 /*yield*/, kanbanRefRQ_1.call({
556
559
  type: "list",
557
560
  limit: limit,
558
- query: ((_d = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings) === null || _d === void 0 ? void 0 : _d.query) || undefined,
561
+ query: ((_e = currentTab === null || currentTab === void 0 ? void 0 : currentTab.kanbanSettings) === null || _e === void 0 ? void 0 : _e.query) || undefined,
559
562
  })];
560
563
  case 2:
561
- kanbanRefQuery = _g.sent();
564
+ kanbanRefQuery = _h.sent();
562
565
  if (kanbanRefQuery.data) {
563
566
  kanbanRefQuery.data.map(function (eachData) {
564
567
  kanbanRefOption_1.push({
@@ -568,7 +571,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
568
571
  return null;
569
572
  });
570
573
  }
571
- _g.label = 3;
574
+ _h.label = 3;
572
575
  case 3:
573
576
  setKanbanOptions(kanbanRefOption_1);
574
577
  return [3 /*break*/, 5];
@@ -581,14 +584,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
581
584
  setFilterSearch({});
582
585
  setFilterSearchParams({});
583
586
  if (currentTab.structure)
584
- setStructure((_e = currentTab.structure) !== null && _e !== void 0 ? _e : []);
587
+ setStructure((_f = currentTab.structure) !== null && _f !== void 0 ? _f : []);
585
588
  if (currentTab.additionalQuery)
586
- setAdditionalQuery((_f = currentTab.additionalQuery) !== null && _f !== void 0 ? _f : []);
589
+ setAdditionalQuery((_g = currentTab.additionalQuery) !== null && _g !== void 0 ? _g : []);
587
590
  if (currentTab.groupBy)
588
591
  setGroupId(currentTab.groupBy);
589
592
  setExportPDFTitle(currentTab === null || currentTab === void 0 ? void 0 : currentTab.name);
590
593
  }
591
- _g.label = 5;
594
+ _h.label = 5;
592
595
  case 5: return [2 /*return*/];
593
596
  }
594
597
  });
@@ -700,15 +703,19 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
700
703
  return sort;
701
704
  };
702
705
  var handleReadQueryHocCond = function () {
703
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
706
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
704
707
  var query = (_a = renderImpSearchFilterConditions()) !== null && _a !== void 0 ? _a : [];
705
708
  var calendarSettings = false;
706
709
  if (selectedTab && selectedTab.viewType === "calendar") {
707
710
  var startDate = (0, moment_1.default)(calendarTabMonth).toDate();
708
711
  var endDate = (0, moment_1.default)(calendarTabMonth).toDate();
709
712
  var customCalendarView = calendarView;
710
- if ((_b = selectedTab.calendarSettings) === null || _b === void 0 ? void 0 : _b.customPlugin)
711
- customCalendarView = "timeGridWeek";
713
+ if ((_b = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings) === null || _b === void 0 ? void 0 : _b.customPlugin) {
714
+ if ((_c = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings) === null || _c === void 0 ? void 0 : _c.defaultView)
715
+ customCalendarView = selectedTab.calendarSettings.defaultView;
716
+ else
717
+ customCalendarView = "timeGridWeek";
718
+ }
712
719
  if (customCalendarView === "timeGridDay") {
713
720
  startDate = (0, moment_1.default)(calendarTabMonth).startOf("day").toDate();
714
721
  endDate = (0, moment_1.default)(calendarTabMonth).endOf("day").toDate();
@@ -716,23 +723,39 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
716
723
  else if (customCalendarView === "timeGridWeek") {
717
724
  startDate = (0, moment_1.default)(calendarTabMonth).startOf("isoWeek").toDate();
718
725
  endDate = (0, moment_1.default)(calendarTabMonth).endOf("isoWeek").toDate();
726
+ if ((_d = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings) === null || _d === void 0 ? void 0 : _d.customView) {
727
+ var _q = (_e = selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.calendarSettings) === null || _e === void 0 ? void 0 : _e.customView, view = _q.view, duration = _q.duration;
728
+ if (view &&
729
+ duration &&
730
+ view === "week" &&
731
+ duration > 0 &&
732
+ duration < 5) {
733
+ startDate = (0, moment_1.default)(calendarTabMonth).startOf("isoWeek").toDate();
734
+ endDate = (0, moment_1.default)(startDate)
735
+ .clone()
736
+ .add(duration, "weeks")
737
+ .subtract(1, "days")
738
+ .endOf("day")
739
+ .toDate();
740
+ }
741
+ }
719
742
  }
720
743
  else {
721
744
  startDate = (0, moment_1.default)(calendarTabMonth).startOf("month").toDate();
722
745
  endDate = (0, moment_1.default)(calendarTabMonth).endOf("month").toDate();
723
746
  }
724
- if ((_c = selectedTab.calendarSettings) === null || _c === void 0 ? void 0 : _c.endDate) {
747
+ if ((_f = selectedTab.calendarSettings) === null || _f === void 0 ? void 0 : _f.endDate) {
725
748
  //INFO 1 : Check my date is in range of calendar
726
749
  query.push({
727
750
  type: ">",
728
- queryId: (_d = selectedTab.calendarSettings) === null || _d === void 0 ? void 0 : _d.startDate,
751
+ queryId: (_g = selectedTab.calendarSettings) === null || _g === void 0 ? void 0 : _g.startDate,
729
752
  value: (0, moment_1.default)(startDate).toISOString(),
730
753
  orQuery: true,
731
754
  orQueryGroupId: "1",
732
755
  });
733
756
  query.push({
734
757
  type: "<",
735
- queryId: (_e = selectedTab.calendarSettings) === null || _e === void 0 ? void 0 : _e.endDate,
758
+ queryId: (_h = selectedTab.calendarSettings) === null || _h === void 0 ? void 0 : _h.endDate,
736
759
  value: (0, moment_1.default)(endDate).toISOString(),
737
760
  orQuery: true,
738
761
  orQueryGroupId: "1",
@@ -740,14 +763,14 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
740
763
  //INFO 2 : Check start date before and my end date is after the range of calendar
741
764
  query.push({
742
765
  type: "<",
743
- queryId: (_f = selectedTab.calendarSettings) === null || _f === void 0 ? void 0 : _f.startDate,
766
+ queryId: (_j = selectedTab.calendarSettings) === null || _j === void 0 ? void 0 : _j.startDate,
744
767
  value: (0, moment_1.default)(startDate).toISOString(),
745
768
  orQuery: true,
746
769
  orQueryGroupId: "2",
747
770
  });
748
771
  query.push({
749
772
  type: ">",
750
- queryId: (_g = selectedTab.calendarSettings) === null || _g === void 0 ? void 0 : _g.endDate,
773
+ queryId: (_k = selectedTab.calendarSettings) === null || _k === void 0 ? void 0 : _k.endDate,
751
774
  value: (0, moment_1.default)(endDate).toISOString(),
752
775
  orQuery: true,
753
776
  orQueryGroupId: "2",
@@ -755,21 +778,21 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
755
778
  //INFO 3 : Check whether my start date and my end date is between the range of calendar
756
779
  query.push({
757
780
  type: "<",
758
- queryId: (_h = selectedTab.calendarSettings) === null || _h === void 0 ? void 0 : _h.startDate,
781
+ queryId: (_l = selectedTab.calendarSettings) === null || _l === void 0 ? void 0 : _l.startDate,
759
782
  value: (0, moment_1.default)(endDate).toISOString(),
760
783
  orQuery: true,
761
784
  orQueryGroupId: "3",
762
785
  });
763
786
  query.push({
764
787
  type: ">",
765
- queryId: (_j = selectedTab.calendarSettings) === null || _j === void 0 ? void 0 : _j.endDate,
788
+ queryId: (_m = selectedTab.calendarSettings) === null || _m === void 0 ? void 0 : _m.endDate,
766
789
  value: (0, moment_1.default)(startDate).toISOString(),
767
790
  orQuery: true,
768
791
  orQueryGroupId: "3",
769
792
  });
770
793
  query.push({
771
794
  type: "=",
772
- queryId: (_k = selectedTab.calendarSettings) === null || _k === void 0 ? void 0 : _k.endDate,
795
+ queryId: (_o = selectedTab.calendarSettings) === null || _o === void 0 ? void 0 : _o.endDate,
773
796
  value: null,
774
797
  orQuery: true,
775
798
  orQueryGroupId: "4",
@@ -778,7 +801,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
778
801
  else {
779
802
  query.push({
780
803
  type: "><",
781
- queryId: (_l = selectedTab.calendarSettings) === null || _l === void 0 ? void 0 : _l.startDate,
804
+ queryId: (_p = selectedTab.calendarSettings) === null || _p === void 0 ? void 0 : _p.startDate,
782
805
  value: [
783
806
  (0, moment_1.default)(startDate).toISOString(),
784
807
  (0, moment_1.default)(endDate).toISOString(),
@@ -3616,6 +3639,10 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
3616
3639
  key: "name",
3617
3640
  title: "Name",
3618
3641
  },
3642
+ {
3643
+ key: "poi",
3644
+ title: "Point of Interest",
3645
+ },
3619
3646
  {
3620
3647
  key: "lat",
3621
3648
  title: "Latitude",
@@ -4877,7 +4904,7 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
4877
4904
  (_b = (_a = props.organise) === null || _a === void 0 ? void 0 : _a.handleNavigate) === null || _b === void 0 ? void 0 : _b.call(_a, "read", id, "general");
4878
4905
  }, height: "95vh", dayCellMinHeight: 120, lib: { moment: moment_1.default }, customPlugin: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customPlugin, headerToolbar: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.headerToolbar, footerToolbar: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.footerToolbar, customButtons: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customButtons, customHeaderFn: (calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customHeader)
4879
4906
  ? function () { return calendarSettings_1.customHeader || ""; }
4880
- : undefined, handleCalendarResize: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.handleCalendarResize }))));
4907
+ : undefined, customView: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.customView, handleCalendarResize: calendarSettings_1 === null || calendarSettings_1 === void 0 ? void 0 : calendarSettings_1.handleCalendarResize }))));
4881
4908
  }
4882
4909
  else if (selectedTabData.viewType === "feeds") {
4883
4910
  var contentList_1 = [];