@procore/saved-views 5.0.0-alpha.4 → 5.0.0-alpha.5

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.
@@ -11421,12 +11421,13 @@ var normalizeForComparison = (config) => {
11421
11421
  if (!(config == null ? void 0 : config.columnState))
11422
11422
  return config;
11423
11423
  return {
11424
- ...config,
11424
+ ...import_lodash.default.omit(config, ["enableRowGrouping", "enableColumnGrouping"]),
11425
11425
  columnState: config.columnState.map((col) => {
11426
+ const res = import_lodash.default.omit(col, ["aggFunc"]);
11426
11427
  if (col.flex) {
11427
- return import_lodash.default.omit(col, ["width", "flex"]);
11428
+ return import_lodash.default.omit(res, ["width", "flex"]);
11428
11429
  }
11429
- return col;
11430
+ return res;
11430
11431
  })
11431
11432
  };
11432
11433
  };
@@ -11439,10 +11440,14 @@ var isEqual = (viewTableConfig, tableConfig, defaultViewConfig, provider) => {
11439
11440
  );
11440
11441
  const normalizedViewConfig = normalizeForComparison(syncedViewTableConfig);
11441
11442
  const normalizedCurrentConfig = normalizeForComparison(tableConfig);
11442
- return import_lodash.default.isEqual(
11443
- cleanObject(normalizedViewConfig, provider),
11444
- cleanObject(normalizedCurrentConfig, provider)
11445
- );
11443
+ const cleanedViewConfig = cleanObject(normalizedViewConfig, provider);
11444
+ const cleanedCurrentConfig = cleanObject(normalizedCurrentConfig, provider);
11445
+ console.log("xx:Difference between view config and current config:", {
11446
+ viewConfig: cleanedViewConfig,
11447
+ currentConfig: cleanedCurrentConfig,
11448
+ areEqual: import_lodash.default.isEqual(cleanedViewConfig, cleanedCurrentConfig)
11449
+ });
11450
+ return import_lodash.default.isEqual(cleanedViewConfig, cleanedCurrentConfig);
11446
11451
  };
11447
11452
  var hasPermissionForViewLevel = (viewLevel, permissions) => {
11448
11453
  switch (viewLevel) {
@@ -11425,12 +11425,13 @@ var normalizeForComparison = (config) => {
11425
11425
  if (!(config == null ? void 0 : config.columnState))
11426
11426
  return config;
11427
11427
  return {
11428
- ...config,
11428
+ ...import_lodash.default.omit(config, ["enableRowGrouping", "enableColumnGrouping"]),
11429
11429
  columnState: config.columnState.map((col) => {
11430
+ const res = import_lodash.default.omit(col, ["aggFunc"]);
11430
11431
  if (col.flex) {
11431
- return import_lodash.default.omit(col, ["width", "flex"]);
11432
+ return import_lodash.default.omit(res, ["width", "flex"]);
11432
11433
  }
11433
- return col;
11434
+ return res;
11434
11435
  })
11435
11436
  };
11436
11437
  };
@@ -11443,10 +11444,14 @@ var isEqual = (viewTableConfig, tableConfig, defaultViewConfig, provider) => {
11443
11444
  );
11444
11445
  const normalizedViewConfig = normalizeForComparison(syncedViewTableConfig);
11445
11446
  const normalizedCurrentConfig = normalizeForComparison(tableConfig);
11446
- return import_lodash.default.isEqual(
11447
- cleanObject(normalizedViewConfig, provider),
11448
- cleanObject(normalizedCurrentConfig, provider)
11449
- );
11447
+ const cleanedViewConfig = cleanObject(normalizedViewConfig, provider);
11448
+ const cleanedCurrentConfig = cleanObject(normalizedCurrentConfig, provider);
11449
+ console.log("xx:Difference between view config and current config:", {
11450
+ viewConfig: cleanedViewConfig,
11451
+ currentConfig: cleanedCurrentConfig,
11452
+ areEqual: import_lodash.default.isEqual(cleanedViewConfig, cleanedCurrentConfig)
11453
+ });
11454
+ return import_lodash.default.isEqual(cleanedViewConfig, cleanedCurrentConfig);
11450
11455
  };
11451
11456
  var hasPermissionForViewLevel = (viewLevel, permissions) => {
11452
11457
  switch (viewLevel) {
@@ -11419,12 +11419,13 @@ var normalizeForComparison = (config) => {
11419
11419
  if (!config?.columnState)
11420
11420
  return config;
11421
11421
  return {
11422
- ...config,
11422
+ ...import_lodash.default.omit(config, ["enableRowGrouping", "enableColumnGrouping"]),
11423
11423
  columnState: config.columnState.map((col) => {
11424
+ const res = import_lodash.default.omit(col, ["aggFunc"]);
11424
11425
  if (col.flex) {
11425
- return import_lodash.default.omit(col, ["width", "flex"]);
11426
+ return import_lodash.default.omit(res, ["width", "flex"]);
11426
11427
  }
11427
- return col;
11428
+ return res;
11428
11429
  })
11429
11430
  };
11430
11431
  };
@@ -11437,10 +11438,14 @@ var isEqual = (viewTableConfig, tableConfig, defaultViewConfig, provider) => {
11437
11438
  );
11438
11439
  const normalizedViewConfig = normalizeForComparison(syncedViewTableConfig);
11439
11440
  const normalizedCurrentConfig = normalizeForComparison(tableConfig);
11440
- return import_lodash.default.isEqual(
11441
- cleanObject(normalizedViewConfig, provider),
11442
- cleanObject(normalizedCurrentConfig, provider)
11443
- );
11441
+ const cleanedViewConfig = cleanObject(normalizedViewConfig, provider);
11442
+ const cleanedCurrentConfig = cleanObject(normalizedCurrentConfig, provider);
11443
+ console.log("xx:Difference between view config and current config:", {
11444
+ viewConfig: cleanedViewConfig,
11445
+ currentConfig: cleanedCurrentConfig,
11446
+ areEqual: import_lodash.default.isEqual(cleanedViewConfig, cleanedCurrentConfig)
11447
+ });
11448
+ return import_lodash.default.isEqual(cleanedViewConfig, cleanedCurrentConfig);
11444
11449
  };
11445
11450
  var hasPermissionForViewLevel = (viewLevel, permissions) => {
11446
11451
  switch (viewLevel) {
@@ -11423,12 +11423,13 @@ var normalizeForComparison = (config) => {
11423
11423
  if (!config?.columnState)
11424
11424
  return config;
11425
11425
  return {
11426
- ...config,
11426
+ ...import_lodash.default.omit(config, ["enableRowGrouping", "enableColumnGrouping"]),
11427
11427
  columnState: config.columnState.map((col) => {
11428
+ const res = import_lodash.default.omit(col, ["aggFunc"]);
11428
11429
  if (col.flex) {
11429
- return import_lodash.default.omit(col, ["width", "flex"]);
11430
+ return import_lodash.default.omit(res, ["width", "flex"]);
11430
11431
  }
11431
- return col;
11432
+ return res;
11432
11433
  })
11433
11434
  };
11434
11435
  };
@@ -11441,10 +11442,14 @@ var isEqual = (viewTableConfig, tableConfig, defaultViewConfig, provider) => {
11441
11442
  );
11442
11443
  const normalizedViewConfig = normalizeForComparison(syncedViewTableConfig);
11443
11444
  const normalizedCurrentConfig = normalizeForComparison(tableConfig);
11444
- return import_lodash.default.isEqual(
11445
- cleanObject(normalizedViewConfig, provider),
11446
- cleanObject(normalizedCurrentConfig, provider)
11447
- );
11445
+ const cleanedViewConfig = cleanObject(normalizedViewConfig, provider);
11446
+ const cleanedCurrentConfig = cleanObject(normalizedCurrentConfig, provider);
11447
+ console.log("xx:Difference between view config and current config:", {
11448
+ viewConfig: cleanedViewConfig,
11449
+ currentConfig: cleanedCurrentConfig,
11450
+ areEqual: import_lodash.default.isEqual(cleanedViewConfig, cleanedCurrentConfig)
11451
+ });
11452
+ return import_lodash.default.isEqual(cleanedViewConfig, cleanedCurrentConfig);
11448
11453
  };
11449
11454
  var hasPermissionForViewLevel = (viewLevel, permissions) => {
11450
11455
  switch (viewLevel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/saved-views",
3
- "version": "5.0.0-alpha.4",
3
+ "version": "5.0.0-alpha.5",
4
4
  "description": "Saved Views Component for Data Table",
5
5
  "author": "Procore Technologies, Inc",
6
6
  "repository": {