sccoreui 6.4.96 → 6.4.98

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/dist/App.scss CHANGED
@@ -615,6 +615,11 @@ code {
615
615
  border-bottom-left-radius: 0 !important;
616
616
  overflow: auto;
617
617
  height: 44px;
618
+ .p-chips-token {
619
+ .p-chips-token-label {
620
+ white-space: nowrap;
621
+ }
622
+ }
618
623
 
619
624
  &:not(.p-disabled):hover {
620
625
  border-color: var(--gray-300);
@@ -865,7 +870,10 @@ div:has(ul.date_filter) .p-datepicker-footer {
865
870
  .PhoneInput {
866
871
  background: #ffffff;
867
872
  border: 1px solid var(--gray-300);
868
- transition: background-color 0.2s, color 0.2s, border-color 0.2s,
873
+ transition:
874
+ background-color 0.2s,
875
+ color 0.2s,
876
+ border-color 0.2s,
869
877
  box-shadow 0.2s;
870
878
  border-radius: var(--border-radius);
871
879
  box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
@@ -882,7 +890,8 @@ div:has(ul.date_filter) .p-datepicker-footer {
882
890
  &:focus-within {
883
891
  outline: 0 none;
884
892
  outline-offset: 0;
885
- box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05),
893
+ box-shadow:
894
+ 0px 1px 2px rgba(16, 24, 40, 0.05),
886
895
  0px 0px 0px 2px var(--primary-100);
887
896
  border-radius: var(--border-radius);
888
897
  border: 1px solid var(--primary-300);
@@ -991,7 +1000,8 @@ button#formatOLOptions-1.fr-active::before {
991
1000
  }
992
1001
 
993
1002
  button[data-cmd="fontFamily"]:focus {
994
- box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05),
1003
+ box-shadow:
1004
+ 0px 1px 2px rgba(16, 24, 40, 0.05),
995
1005
  0px 0px 0px 2px var(--primary-100);
996
1006
  border: 1px solid var(--primary-300) !important;
997
1007
  background: none !important;
@@ -1007,13 +1017,16 @@ button[data-cmd="fontFamily"]:focus {
1007
1017
  }
1008
1018
 
1009
1019
  .text-editor.focus-text-editor {
1010
- box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05),
1020
+ box-shadow:
1021
+ 0px 1px 2px rgba(16, 24, 40, 0.05),
1011
1022
  0px 0px 0px 4px var(--primary-100);
1012
1023
  border: 1px solid var(--primary-300) !important;
1013
1024
  }
1014
1025
 
1015
1026
  .text-editor.p-invalid.focus-text-editor {
1016
- box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px var(--red-100);
1027
+ box-shadow:
1028
+ 0px 1px 2px rgba(16, 24, 40, 0.05),
1029
+ 0px 0px 0px 4px var(--red-100);
1017
1030
  border: 1px solid var(--red-300) !important;
1018
1031
  }
1019
1032
 
@@ -2055,7 +2068,10 @@ div:has(ul.date_filter) .p-datepicker-footer {
2055
2068
  .PhoneInput {
2056
2069
  background: #ffffff;
2057
2070
  border: 1px solid var(--gray-300);
2058
- transition: background-color 0.2s, color 0.2s, border-color 0.2s,
2071
+ transition:
2072
+ background-color 0.2s,
2073
+ color 0.2s,
2074
+ border-color 0.2s,
2059
2075
  box-shadow 0.2s;
2060
2076
  border-radius: var(--border-radius);
2061
2077
  box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
@@ -2072,7 +2088,8 @@ div:has(ul.date_filter) .p-datepicker-footer {
2072
2088
  &:focus-within {
2073
2089
  outline: 0 none;
2074
2090
  outline-offset: 0;
2075
- box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05),
2091
+ box-shadow:
2092
+ 0px 1px 2px rgba(16, 24, 40, 0.05),
2076
2093
  0px 0px 0px 2px var(--primary-100);
2077
2094
  border-radius: var(--border-radius);
2078
2095
  border: 1px solid var(--primary-300);
@@ -2181,7 +2198,8 @@ button#formatOLOptions-1.fr-active::before {
2181
2198
  }
2182
2199
 
2183
2200
  button[data-cmd="fontFamily"]:focus {
2184
- box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05),
2201
+ box-shadow:
2202
+ 0px 1px 2px rgba(16, 24, 40, 0.05),
2185
2203
  0px 0px 0px 2px var(--primary-100);
2186
2204
  border: 1px solid var(--primary-300) !important;
2187
2205
  background: none !important;
@@ -2197,13 +2215,16 @@ button[data-cmd="fontFamily"]:focus {
2197
2215
  }
2198
2216
 
2199
2217
  .text-editor.focus-text-editor {
2200
- box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05),
2218
+ box-shadow:
2219
+ 0px 1px 2px rgba(16, 24, 40, 0.05),
2201
2220
  0px 0px 0px 4px var(--primary-100);
2202
2221
  border: 1px solid var(--primary-300) !important;
2203
2222
  }
2204
2223
 
2205
2224
  .text-editor.p-invalid.focus-text-editor {
2206
- box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05), 0px 0px 0px 4px var(--red-100);
2225
+ box-shadow:
2226
+ 0px 1px 2px rgba(16, 24, 40, 0.05),
2227
+ 0px 0px 0px 4px var(--red-100);
2207
2228
  border: 1px solid var(--red-300) !important;
2208
2229
  }
2209
2230
 
@@ -2810,8 +2831,9 @@ button[aria-expanded="true"] {
2810
2831
  width: 35px;
2811
2832
  aspect-ratio: 1;
2812
2833
  border-radius: 50%;
2813
- background: radial-gradient(farthest-side, var(--primary-500) 94%, #0000)
2814
- top/5px 5px no-repeat,
2834
+ background:
2835
+ radial-gradient(farthest-side, var(--primary-500) 94%, #0000) top/5px 5px
2836
+ no-repeat,
2815
2837
  conic-gradient(#0000 5%, var(--primary-500));
2816
2838
  -webkit-mask: radial-gradient(
2817
2839
  farthest-side,
@@ -8,10 +8,12 @@ const context_provider_1 = require("../context-provider");
8
8
  const svg_component_1 = tslib_1.__importDefault(require("../../../directives/svg-component"));
9
9
  const GridViewListView = () => {
10
10
  const { gridViewFun, gridView, isDataLoading } = (0, react_1.useContext)(context_provider_1.FeatureContext);
11
- const loadingStyle = isDataLoading ? { pointerEvents: "none" } : undefined;
11
+ const loadingStyle = isDataLoading
12
+ ? { pointerEvents: "none" }
13
+ : undefined;
12
14
  return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex border-1 border-gray-300 border-round-6" }, { children: [(0, jsx_runtime_1.jsx)(button_1.Button, { className: `border-round-sm border-noround-right sc_icon_hover ${!gridView
13
15
  ? "focus:shadow-none"
14
- : "bg-primary-50 focus:shadow-none border-right-1 border-gray-300"} `, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "grid-01", color: !gridView ? "text-gray-600" : "text-primary-400", size: 18 }), outlined: true, style: loadingStyle, onClick: () => gridViewFun(true), title: "List View" }), (0, jsx_runtime_1.jsx)(button_1.Button, { title: "Grid View", className: `sc_icon_hover border-round-sm border-noround-left border-left-none ${!gridView
16
+ : "bg-primary-50 focus:shadow-none border-right-1 border-gray-300"} `, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "grid-01", color: !gridView ? "text-gray-600" : "text-primary-400", size: 18 }), outlined: true, style: loadingStyle, onClick: () => gridViewFun(true), title: "Card View" }), (0, jsx_runtime_1.jsx)(button_1.Button, { title: "List View", className: `sc_icon_hover border-round-sm border-noround-left border-left-none ${!gridView
15
17
  ? "bg-primary-50 focus:shadow-none"
16
18
  : "focus:shadow-none border-left-1 border-gray-300"} `, icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "list", color: !gridView ? "text-primary-400" : "text-gray-600", size: 18 }), outlined: true, style: loadingStyle, onClick: () => gridViewFun(false) })] })));
17
19
  };
@@ -298,12 +298,7 @@ const TableFilter = () => {
298
298
  */
299
299
  const createViewFromFilters = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
300
300
  var _a;
301
- yield Promise.all((_a = [formRef]) === null || _a === void 0 ? void 0 : _a.map((form) => {
302
- var _a;
303
- (_a = form.current) === null || _a === void 0 ? void 0 : _a.submitForm();
304
- form.current.validateForm();
305
- }));
306
- const errors = formRef.current.errors;
301
+ const errors = yield ((_a = formRef.current) === null || _a === void 0 ? void 0 : _a.validateForm());
307
302
  if (errors && Object.keys(errors).length > 0) {
308
303
  return;
309
304
  }
@@ -9,7 +9,9 @@ const hooks_1 = require("primereact/hooks");
9
9
  const constants_1 = tslib_1.__importDefault(require("./constants"));
10
10
  exports.FeatureContext = (0, react_1.createContext)(null);
11
11
  function MyProvider({ children, value }) {
12
- const { featureDetails, setFeatureDetails, gridData, callGrid, totalRecords, initialFeature, defaultFilters, defaultSort, createView, enableViewCreate, filterModelText, sortModelText, recordDetailModelText, sidePanelText, sortOptions, filterConditions, clearFilters, setGridData, gridApi, updateColumnsForGrid, enableManageColumnsCallback, columnToRender, selectedGroup, setSelectedGroup, initialCheckBoxData, intialColumns, setIntialColumns, rowModelType, quickSearch, enableAdvancedFilter, conditionsToDisplay, gridViewFun, gridViewData, setGridViewData, gridView, serverSideSelectRow, defaultViewName, isDataLoading } = value;
12
+ const { featureDetails, setFeatureDetails, gridData, callGrid, totalRecords, initialFeature, defaultFilters, defaultSort, createView, enableViewCreate, filterModelText, sortModelText, recordDetailModelText, sidePanelText, sortOptions, filterConditions, clearFilters, setGridData, gridApi, updateColumnsForGrid, enableManageColumnsCallback, columnToRender, selectedGroup, setSelectedGroup, initialCheckBoxData, intialColumns, setIntialColumns, rowModelType, quickSearch, enableAdvancedFilter, conditionsToDisplay, gridViewFun, gridViewData, setGridViewData, gridView, serverSideSelectRow, defaultViewName, isDataLoading,
13
+ // dynamicText
14
+ } = value;
13
15
  // States for sort
14
16
  const [columnData] = (0, react_1.useState)(gridData === null || gridData === void 0 ? void 0 : gridData.columnData);
15
17
  const [inputValue, deboucedValue, setInputValue] = (0, hooks_1.useDebounce)("", 500);
@@ -28,7 +28,8 @@ const INITIAL_CHECKBOX_DATA = {
28
28
  };
29
29
  function ParentForGrid(props) {
30
30
  var _a, _b, _c, _d, _e, _f, _g, _h;
31
- const { gridProps = {}, gridViewTemplate, selectColumns = () => { }, enableCheckboxForGroupHeader = false, serverSideSelectRow } = props;
31
+ const { gridProps = {}, gridViewTemplate, selectColumns = () => { }, enableCheckboxForGroupHeader = false, serverSideSelectRow, blockSize } = props;
32
+ const effectiveBlockSize = blockSize || constants_1.BLOCK_SIZE;
32
33
  const [gridData, setGridData] = (0, react_1.useState)({
33
34
  rowData: (props === null || props === void 0 ? void 0 : props.rowData) || [],
34
35
  columnData: (0, helper_1.sortColumns)(props === null || props === void 0 ? void 0 : props.columnData),
@@ -78,6 +79,7 @@ function ParentForGrid(props) {
78
79
  isRemoveClicked: false,
79
80
  });
80
81
  // const [columnToRender,setColumnToRender] = useState<ColumnDef[]>([])
82
+ const isInitialLoadRef = (0, react_1.useRef)(true);
81
83
  const gridRef = (0, react_1.useRef)(null);
82
84
  const groupingColumns = (0, react_1.useMemo)(() => {
83
85
  var _a, _b;
@@ -220,12 +222,12 @@ function ParentForGrid(props) {
220
222
  setGridData(Object.assign(Object.assign({}, gridData), { rowData: response.rowData }));
221
223
  gridRef.current.api.hideOverlay();
222
224
  // supply rows for requested block to grid
223
- params && params.success({ rowData: response.rowData });
225
+ params && params.success({ rowData: response.rowData, rowCount: response.actualEndRow });
224
226
  return;
225
227
  }
226
228
  else {
227
229
  // params.fail();
228
- const gridRows = startRow >= constants_1.BLOCK_SIZE ? gridData.rowData : [];
230
+ const gridRows = startRow >= effectiveBlockSize ? gridData.rowData : [];
229
231
  if (!((_r = params === null || params === void 0 ? void 0 : params.parentNode) === null || _r === void 0 ? void 0 : _r.id))
230
232
  gridRef.current && gridRef.current.api.showNoRowsOverlay();
231
233
  params && params.success({ rowData: gridRows });
@@ -388,7 +390,7 @@ function ParentForGrid(props) {
388
390
  }
389
391
  }), autoGroupColumnDef: (props === null || props === void 0 ? void 0 : props.autoGroupColumnDef)
390
392
  ? props === null || props === void 0 ? void 0 : props.autoGroupColumnDef
391
- : manageColumnGrouping(), treeData: (props === null || props === void 0 ? void 0 : props.enableTree) ? props === null || props === void 0 ? void 0 : props.enableTree : false, getDataPath: (props === null || props === void 0 ? void 0 : props.enableTree) ? getDataPath : null, defaultColDef: defaultColDef, suppressMenuHide: false, suppressRowClickSelection: false, headerHeight: props === null || props === void 0 ? void 0 : props.columnHeaderHeight, rowHeight: constants_1.ROW_HEIGHT, rowModelType: props.rowModelType, pinnedTopRowData: props === null || props === void 0 ? void 0 : props.pinnedTopRowData }, (props.rowModelType === (constants_1.ROWMODELTYPE === null || constants_1.ROWMODELTYPE === void 0 ? void 0 : constants_1.ROWMODELTYPE.SERVER_SIDE) && { cacheBlockSize: constants_1.BLOCK_SIZE })), { maxBlocksInCache: constants_1.MAX_BLOCKS, blockLoadDebounceMillis: constants_1.DEBOUNCE_INTERVAL, noRowsOverlayComponent: props === null || props === void 0 ? void 0 : props.noRowsOverlayComponent, loadingOverlayComponent: loading_component_1.default, suppressCellFocus: true, suppressPropertyNamesCheck: true, suppressServerSideFullWidthLoadingRow: true, enableRangeSelection: (_e = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _e === void 0 ? void 0 : _e.enableFillHandle, enableFillHandle: (_f = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _f === void 0 ? void 0 : _f.enableFillHandle, onFillEnd: wrapperToFillOpertation, fillOperation: myOpertaion, serverSideInitialRowCount: (props === null || props === void 0 ? void 0 : props.serverSideInitialRowCount) || 10, getRowId: getRowId, enableAdvancedFilter: (props === null || props === void 0 ? void 0 : props.enableAdvancedFilter) || false, fillHandleDirection: "y" }), ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), (totalRecords <= constants_1.AUTO_HEIGHT_ROWS && ((_g = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _g === void 0 ? void 0 : _g.isGridAutoHeight)
393
+ : manageColumnGrouping(), treeData: (props === null || props === void 0 ? void 0 : props.enableTree) ? props === null || props === void 0 ? void 0 : props.enableTree : false, getDataPath: (props === null || props === void 0 ? void 0 : props.enableTree) ? getDataPath : null, defaultColDef: defaultColDef, suppressMenuHide: false, suppressRowClickSelection: false, headerHeight: props === null || props === void 0 ? void 0 : props.columnHeaderHeight, rowHeight: constants_1.ROW_HEIGHT, rowModelType: props.rowModelType, pinnedTopRowData: props === null || props === void 0 ? void 0 : props.pinnedTopRowData }, (props.rowModelType === (constants_1.ROWMODELTYPE === null || constants_1.ROWMODELTYPE === void 0 ? void 0 : constants_1.ROWMODELTYPE.SERVER_SIDE) && { cacheBlockSize: effectiveBlockSize })), { maxBlocksInCache: effectiveBlockSize, blockLoadDebounceMillis: constants_1.DEBOUNCE_INTERVAL, noRowsOverlayComponent: props === null || props === void 0 ? void 0 : props.noRowsOverlayComponent, loadingOverlayComponent: loading_component_1.default, suppressCellFocus: true, suppressPropertyNamesCheck: true, suppressServerSideFullWidthLoadingRow: true, enableRangeSelection: (_e = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _e === void 0 ? void 0 : _e.enableFillHandle, enableFillHandle: (_f = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _f === void 0 ? void 0 : _f.enableFillHandle, onFillEnd: wrapperToFillOpertation, fillOperation: myOpertaion, serverSideInitialRowCount: (props === null || props === void 0 ? void 0 : props.serverSideInitialRowCount) || 10, getRowId: getRowId, enableAdvancedFilter: (props === null || props === void 0 ? void 0 : props.enableAdvancedFilter) || false, fillHandleDirection: "y" }), ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), (totalRecords <= constants_1.AUTO_HEIGHT_ROWS && ((_g = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _g === void 0 ? void 0 : _g.isGridAutoHeight)
392
394
  ? { domLayout: "autoHeight" }
393
395
  : { domLayout: "normal" })), ((props === null || props === void 0 ? void 0 : props.dataTypeDefinitions) && {
394
396
  dataTypeDefinitions: props === null || props === void 0 ? void 0 : props.dataTypeDefinitions,
@@ -403,12 +405,18 @@ function ParentForGrid(props) {
403
405
  };
404
406
  // Call Grid if something is searched
405
407
  (0, react_1.useEffect)(() => {
408
+ if (isInitialLoadRef.current)
409
+ return;
406
410
  if (api && gridReadyEvent) {
407
411
  !props.rowData && callGrid(featureDetails);
408
412
  }
409
413
  }, [featureDetails.searchedText]);
410
414
  (0, react_1.useEffect)(() => {
411
415
  var _a;
416
+ if (isInitialLoadRef.current) {
417
+ isInitialLoadRef.current = false;
418
+ return;
419
+ }
412
420
  if (api && gridReadyEvent && (props === null || props === void 0 ? void 0 : props.shouldRefetch)) {
413
421
  let currentFeature = featureDetails;
414
422
  if ((_a = props === null || props === void 0 ? void 0 : props.defaultFilters) === null || _a === void 0 ? void 0 : _a.length) {
@@ -471,7 +479,7 @@ function ParentForGrid(props) {
471
479
  gridViewFun,
472
480
  gridViewData,
473
481
  setGridViewData,
474
- gridView, enableAdvancedFilter: props === null || props === void 0 ? void 0 : props.enableAdvancedFilter }, ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), { conditionsToDisplay: props === null || props === void 0 ? void 0 : props.conditionsToDisplay, serverSideSelectRow: props.serverSideSelectRow, defaultViewName: props === null || props === void 0 ? void 0 : props.defaultViewName, isDataLoading }));
482
+ gridView, enableAdvancedFilter: props === null || props === void 0 ? void 0 : props.enableAdvancedFilter }, ((props === null || props === void 0 ? void 0 : props.rowData) && { rowData: props === null || props === void 0 ? void 0 : props.rowData })), { conditionsToDisplay: props === null || props === void 0 ? void 0 : props.conditionsToDisplay, serverSideSelectRow: props.serverSideSelectRow, defaultViewName: props === null || props === void 0 ? void 0 : props.defaultViewName, isDataLoading, dynamicText: props === null || props === void 0 ? void 0 : props.dynamicText }));
475
483
  }, [
476
484
  props.rowModelType,
477
485
  props === null || props === void 0 ? void 0 : props.quickSearch,
@@ -115,6 +115,7 @@ export interface PropsFromProduct {
115
115
  bulkActionComponent?: React.FC;
116
116
  pinnedRowData?: any;
117
117
  rowModelType?: string;
118
+ blockSize?: number;
118
119
  getCheckedRows?: () => void;
119
120
  shouldRefetch?: boolean;
120
121
  defaultFilters?: any[];
@@ -41,6 +41,7 @@ interface MyProviderProps {
41
41
  serverSideSelectRow: (data: any, emptyFun: (oject: any) => void) => void;
42
42
  defaultViewName?: string;
43
43
  isDataLoading?: boolean;
44
+ dynamicText?: any;
44
45
  };
45
46
  }
46
47
  declare function MyProvider({ children, value }: MyProviderProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.4.96",
3
+ "version": "6.4.98",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",