awing-library 2.1.2-dev.57 → 2.1.2-dev.58

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.
@@ -1,8 +1,7 @@
1
- import { EnumTypeConvert } from 'Features/types';
2
1
  import { NotificationFilter } from './types';
3
- interface NotificationFilterInput {
4
- [key: string]: string | number | undefined;
5
- }
6
2
  export declare const checkValid: (currentNotificationFilterInput: NotificationFilter) => boolean;
7
- export declare const getDifferentFieldsValue: (oldObjectFilter: NotificationFilter, newObjectFilter: NotificationFilterInput, objectTyeCodes: EnumTypeConvert[], objectConfigTypes: EnumTypeConvert[]) => NotificationFilterInput;
3
+ interface GenericObject {
4
+ [key: string]: string | number | boolean | null | undefined | object;
5
+ }
6
+ export declare const compareObjects: <T extends GenericObject>(original: T, changed: T) => Partial<T>;
8
7
  export {};
package/dist/esm/index.js CHANGED
@@ -182608,6 +182608,17 @@ const NotificationFilterContainer = () => {
182608
182608
  const checkValid$1 = currentNotificationFilterInput => {
182609
182609
  return Object.values(currentNotificationFilterInput).every(value => value !== undefined && "".concat(value).trim() !== '');
182610
182610
  };
182611
+ const compareObjects = (original, changed) => {
182612
+ const differences = {};
182613
+ // Lặp qua các key của object original
182614
+ Object.keys(original).forEach(key => {
182615
+ // So sánh giá trị của key trong cả hai object
182616
+ if (original[key] !== changed[key]) {
182617
+ differences[key] = changed[key];
182618
+ }
182619
+ });
182620
+ return differences;
182621
+ };
182611
182622
 
182612
182623
  const CreateOrEdit$5 = () => {
182613
182624
  var _a;
@@ -182698,17 +182709,6 @@ const CreateOrEdit$5 = () => {
182698
182709
  name: filter.name
182699
182710
  };
182700
182711
  };
182701
- const compareObjects = (original, changed) => {
182702
- const differences = {};
182703
- // Lặp qua các key của object original
182704
- Object.keys(original).forEach(key => {
182705
- // So sánh giá trị của key trong cả hai object
182706
- if (original[key] !== changed[key]) {
182707
- differences[key] = changed[key];
182708
- }
182709
- });
182710
- return differences;
182711
- };
182712
182712
  const handleSubmit = async () => {
182713
182713
  var _a;
182714
182714
  if (notificationFilterId) {
@@ -187175,7 +187175,7 @@ const convertWorkflow = (isCreate, workflow) => {
187175
187175
  } = workflow,
187176
187176
  rest = __rest$1(workflow, ["workflowMatrices", "workflowStates"]);
187177
187177
  let temp = Object.assign({}, rest);
187178
- temp = lodashExports.omit(temp, ['id']);
187178
+ temp = lodashExports.omit(temp, ['id', 'versionId']);
187179
187179
  temp.workflowStates = reconvertWorkflowStates(isCreate, workflowStates !== null && workflowStates !== void 0 ? workflowStates : []);
187180
187180
  return temp;
187181
187181
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.2-dev.57",
3
+ "version": "2.1.2-dev.58",
4
4
  "main": "dist/esm/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/index.d.ts",