fui-material 2.8.11 → 2.8.13

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.
@@ -713,39 +713,39 @@ const FPaper = ({
713
713
  );
714
714
  };
715
715
  const TableControlsContext = createContext({ query: "", sort: null });
716
- const left$1 = "_left_18u6h_77";
717
- const center = "_center_18u6h_80";
718
- const right = "_right_18u6h_83";
719
- const justify = "_justify_18u6h_86";
720
- const more = "_more_18u6h_194";
716
+ const left$1 = "_left_nsv5n_81";
717
+ const center = "_center_nsv5n_84";
718
+ const right = "_right_nsv5n_87";
719
+ const justify = "_justify_nsv5n_90";
720
+ const more = "_more_nsv5n_198";
721
721
  const styles$u = {
722
- "f-table-component": "_f-table-component_18u6h_1",
723
- "f-table-component__table": "_f-table-component__table_18u6h_14",
724
- "f-table-component__table_header": "_f-table-component__table_header_18u6h_22",
725
- "is-sticky": "_is-sticky_18u6h_26",
726
- "f-table-component__table_header-cell": "_f-table-component__table_header-cell_18u6h_32",
727
- "f-table-component__table_body-cell": "_f-table-component__table_body-cell_18u6h_32",
728
- "f-table-component__table_body": "_f-table-component__table_body_18u6h_32",
729
- "f-table-component__table_row": "_f-table-component__table_row_18u6h_60",
730
- "f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_18u6h_60",
731
- "f-table-component__table_footer": "_f-table-component__table_footer_18u6h_66",
722
+ "f-table-component": "_f-table-component_nsv5n_1",
723
+ "f-table-component__table": "_f-table-component__table_nsv5n_14",
724
+ "f-table-component__table_header": "_f-table-component__table_header_nsv5n_22",
725
+ "is-sticky": "_is-sticky_nsv5n_26",
726
+ "f-table-component__table_body": "_f-table-component__table_body_nsv5n_32",
727
+ "f-table-component__table_header-cell": "_f-table-component__table_header-cell_nsv5n_35",
728
+ "f-table-component__table_body-cell": "_f-table-component__table_body-cell_nsv5n_35",
729
+ "f-table-component__table_row": "_f-table-component__table_row_nsv5n_64",
730
+ "f-table-component__table_row_no-hover": "_f-table-component__table_row_no-hover_nsv5n_64",
731
+ "f-table-component__table_footer": "_f-table-component__table_footer_nsv5n_71",
732
732
  left: left$1,
733
733
  center,
734
734
  right,
735
735
  justify,
736
- "cell-text": "_cell-text_18u6h_90",
737
- "cell-preview-text": "_cell-preview-text_18u6h_111",
738
- "cell-preview": "_cell-preview_18u6h_111",
739
- "cell-reveal": "_cell-reveal_18u6h_168",
736
+ "cell-text": "_cell-text_nsv5n_94",
737
+ "cell-preview-text": "_cell-preview-text_nsv5n_115",
738
+ "cell-preview": "_cell-preview_nsv5n_115",
739
+ "cell-reveal": "_cell-reveal_nsv5n_172",
740
740
  more,
741
- "row-menu": "_row-menu_18u6h_225",
742
- "table-tools": "_table-tools_18u6h_317",
743
- "table-search": "_table-search_18u6h_323",
744
- "table-sort": "_table-sort_18u6h_358",
745
- "table-empty": "_table-empty_18u6h_386",
746
- "cell-tooltip-anchor": "_cell-tooltip-anchor_18u6h_393",
747
- "cell-tooltip": "_cell-tooltip_18u6h_393",
748
- "cell-tooltip-in": "_cell-tooltip-in_18u6h_1"
741
+ "row-menu": "_row-menu_nsv5n_229",
742
+ "table-tools": "_table-tools_nsv5n_322",
743
+ "table-search": "_table-search_nsv5n_328",
744
+ "table-sort": "_table-sort_nsv5n_363",
745
+ "table-empty": "_table-empty_nsv5n_391",
746
+ "cell-tooltip-anchor": "_cell-tooltip-anchor_nsv5n_398",
747
+ "cell-tooltip": "_cell-tooltip_nsv5n_398",
748
+ "cell-tooltip-in": "_cell-tooltip-in_nsv5n_1"
749
749
  };
750
750
  const FTableHead = ({
751
751
  st,
@@ -1099,8 +1099,11 @@ const FTableRow = ({
1099
1099
  return /* @__PURE__ */ jsx(
1100
1100
  "tr",
1101
1101
  {
1102
- style: st,
1103
1102
  ...props,
1103
+ style: {
1104
+ ...props.style,
1105
+ ...st
1106
+ },
1104
1107
  className: rowClasses.join(" ").trim(),
1105
1108
  children
1106
1109
  }
@@ -8863,6 +8866,61 @@ function fConvertDate(input, options) {
8863
8866
  return "";
8864
8867
  }
8865
8868
  }
8869
+ const LONG_ERROR_FIELD_LIMIT = 2048;
8870
+ const SHORT_ERROR_FIELD_LIMIT = 256;
8871
+ const ERROR_FIELDS = [
8872
+ "message",
8873
+ "error",
8874
+ "code",
8875
+ "title",
8876
+ "type",
8877
+ "detail",
8878
+ "traceId",
8879
+ "requestId",
8880
+ "timestamp"
8881
+ ];
8882
+ function isScalar(value) {
8883
+ return typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value);
8884
+ }
8885
+ function isUnsupportedResponseData(data) {
8886
+ return Array.isArray(data) || typeof Blob !== "undefined" && data instanceof Blob || typeof ArrayBuffer !== "undefined" && (data instanceof ArrayBuffer || ArrayBuffer.isView(data));
8887
+ }
8888
+ function normalizeRequestErrorResponse(data) {
8889
+ try {
8890
+ if (typeof data === "string") {
8891
+ return data.length > 0 ? { message: data.slice(0, LONG_ERROR_FIELD_LIMIT) } : void 0;
8892
+ }
8893
+ if (!data || typeof data !== "object" || isUnsupportedResponseData(data)) {
8894
+ return void 0;
8895
+ }
8896
+ const result = {};
8897
+ for (const field of ERROR_FIELDS) {
8898
+ const value = data[field];
8899
+ if (!isScalar(value)) continue;
8900
+ const text = String(value);
8901
+ result[field] = text.slice(
8902
+ 0,
8903
+ field === "message" || field === "detail" ? LONG_ERROR_FIELD_LIMIT : SHORT_ERROR_FIELD_LIMIT
8904
+ );
8905
+ }
8906
+ return Object.keys(result).length > 0 ? result : void 0;
8907
+ } catch {
8908
+ return void 0;
8909
+ }
8910
+ }
8911
+ function getErrorResponseData(error2) {
8912
+ if (!error2 || typeof error2 !== "object") return void 0;
8913
+ try {
8914
+ const response = error2.response;
8915
+ if (!response || typeof response !== "object") return void 0;
8916
+ return response.data;
8917
+ } catch {
8918
+ return void 0;
8919
+ }
8920
+ }
8921
+ function getRequestErrorResponse(error2) {
8922
+ return normalizeRequestErrorResponse(getErrorResponseData(error2));
8923
+ }
8866
8924
  const getRequestNow = () => {
8867
8925
  if (typeof performance !== "undefined" && typeof performance.now === "function") {
8868
8926
  return performance.now();
@@ -8943,13 +9001,15 @@ async function observeRequest(observer, requestFn, method, url) {
8943
9001
  } catch (error2) {
8944
9002
  const durationMs = calcDurationMs(startTime);
8945
9003
  const { outcome, errorCategory, status } = classifyRequestError(error2);
9004
+ const errorResponse = outcome === "failure" ? getRequestErrorResponse(error2) : void 0;
8946
9005
  notifyRequestObserver(observer, {
8947
9006
  method: normalizedMethod,
8948
9007
  url,
8949
9008
  status,
8950
9009
  durationMs,
8951
9010
  outcome,
8952
- errorCategory
9011
+ errorCategory,
9012
+ ...errorResponse ? { errorResponse } : {}
8953
9013
  });
8954
9014
  throw error2;
8955
9015
  }
@@ -9042,13 +9102,15 @@ const useFApi = ({
9042
9102
  } catch (error22) {
9043
9103
  if (effectiveObserver) {
9044
9104
  const { outcome, errorCategory, status } = classifyRequestError(error22);
9105
+ const errorResponse = outcome === "failure" ? getRequestErrorResponse(error22) : void 0;
9045
9106
  notifyRequestObserver(effectiveObserver, {
9046
9107
  method,
9047
9108
  url,
9048
9109
  status,
9049
9110
  durationMs: calcDurationMs(startTime),
9050
9111
  outcome,
9051
- errorCategory
9112
+ errorCategory,
9113
+ ...errorResponse ? { errorResponse } : {}
9052
9114
  });
9053
9115
  }
9054
9116
  const err = error22;