blixify-ui-web 1.2.95 → 1.2.96

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 (28) hide show
  1. package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
  2. package/lib/components/data/dataTemplate/index.js +34 -0
  3. package/lib/components/data/dataTemplate/index.js.map +1 -1
  4. package/lib/components/data/dataTemplate/model.d.ts +2 -0
  5. package/lib/components/data/dataTemplate/model.d.ts.map +1 -1
  6. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts +1 -1
  7. package/lib/components/data/dataTemplate/viewStatePersistence.d.ts.map +1 -1
  8. package/lib/components/data/dataWrapper/index.d.ts +3 -0
  9. package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
  10. package/lib/components/data/dataWrapper/index.js +12 -0
  11. package/lib/components/data/dataWrapper/index.js.map +1 -1
  12. package/lib/components/data/flexFilter/index.d.ts +1 -7
  13. package/lib/components/data/flexFilter/index.d.ts.map +1 -1
  14. package/lib/components/data/flexFilter/index.js +3 -0
  15. package/lib/components/data/flexFilter/index.js.map +1 -1
  16. package/lib/components/data/flexFilter/model.d.ts +8 -0
  17. package/lib/components/data/flexFilter/model.d.ts.map +1 -0
  18. package/lib/components/data/flexFilter/model.js +6 -0
  19. package/lib/components/data/flexFilter/model.js.map +1 -0
  20. package/lib/components/display/detailList/index.d.ts +1 -0
  21. package/lib/components/display/detailList/index.d.ts.map +1 -1
  22. package/lib/components/display/detailList/index.js +9 -6
  23. package/lib/components/display/detailList/index.js.map +1 -1
  24. package/lib/components/index.d.ts +3 -2
  25. package/lib/components/index.d.ts.map +1 -1
  26. package/lib/components/index.js.map +1 -1
  27. package/lib/tail.css +1 -1
  28. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,KASN,MAAM,OAAO,CAAC;AA0Ff,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AAwD1B,eAAO,MAAM,YAAY,mFAwlZvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/data/dataTemplate/index.tsx"],"names":[],"mappings":"AAqCA,OAAO,KASN,MAAM,OAAO,CAAC;AA0Ff,OAAO,EACL,iBAAiB,EAKlB,MAAM,kBAAkB,CAAC;AA0D1B,eAAO,MAAM,YAAY,mFAkoZvB,CAAC"}
@@ -867,6 +867,31 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
867
867
  setFlexFiltersDebounced(updatedFilters);
868
868
  setPageIndex(0);
869
869
  };
870
+ // INFO: applies flex filters from a parent, merged by columnId (incoming
871
+ // replaces same-column rows so no contradictory AND; other columns kept).
872
+ var handleApplyFlexFilters = function (incoming) {
873
+ handleClearFlexFilterTypingTimeout();
874
+ var incomingColumnIds = new Set(incoming.map(function (f) { return f.columnId; }));
875
+ var retained = flexFilters.filter(function (f) { return f.columnId && !incomingColumnIds.has(f.columnId); });
876
+ var merged = __spreadArray(__spreadArray([], retained, true), incoming, true);
877
+ setFlexFilters(merged);
878
+ setFlexFiltersDebounced(merged);
879
+ setPageIndex(0);
880
+ };
881
+ // INFO: clears flex filters by columnId (other columns preserved), or all
882
+ // when called with no args. Falls back to a single empty row when none remain.
883
+ var handleClearFlexFilters = function (columnIds) {
884
+ handleClearFlexFilterTypingTimeout();
885
+ var remaining = columnIds && columnIds.length > 0
886
+ ? flexFilters.filter(function (f) { return f.columnId && !columnIds.includes(f.columnId); })
887
+ : [];
888
+ var updatedFilters = remaining.length > 0
889
+ ? remaining
890
+ : [{ id: (0, uuid_1.v4)(), columnId: "", operator: "=", value: undefined }];
891
+ setFlexFilters(updatedFilters);
892
+ setFlexFiltersDebounced(updatedFilters);
893
+ setPageIndex(0);
894
+ };
870
895
  var handleFlexFilterColumnChange = function (filterId, columnId) {
871
896
  var updatedFilters = flexFilters.map(function (f) {
872
897
  if (f.id !== filterId)
@@ -954,6 +979,8 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
954
979
  },
955
980
  handleFormSubmit: handleFormSubmit,
956
981
  handleFormCheck: handleFormCheck,
982
+ handleApplyFlexFilters: handleApplyFlexFilters,
983
+ handleClearFlexFilters: handleClearFlexFilters,
957
984
  handlePopUpModal: handlePopUpModal,
958
985
  handleDeleteModal: handleDeleteModal,
959
986
  handleUploadOfflineData: handleUploadOfflineData,
@@ -973,6 +1000,13 @@ exports.DataTemplate = (0, react_1.forwardRef)(function (props, ref) {
973
1000
  isLive: isLive,
974
1001
  isLiveOffline: isLiveOffline,
975
1002
  }); });
1003
+ // INFO: notify the consumer whenever the applied flex filters change, so a
1004
+ // parent can observe live filter state. Uses the debounced state so it fires
1005
+ // on committed changes, not every keystroke.
1006
+ (0, react_1.useEffect)(function () {
1007
+ var _a, _b;
1008
+ (_b = (_a = props.bareSettings) === null || _a === void 0 ? void 0 : _a.bareOnFlexFiltersChange) === null || _b === void 0 ? void 0 : _b.call(_a, flexFiltersDebounced);
1009
+ }, [flexFiltersDebounced]);
976
1010
  // INFO: Auto-save view state to storage whenever filters, sort, page index,
977
1011
  // or column visibility change. Active for both "persistent" and "session" modes.
978
1012
  var persistSaveInitialised = (0, react_1.useRef)(false);