@ai-table/grid 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/components/cell-editors/abstract-cell-editor.component.d.ts +2 -2
- package/components/cell-editors/abstract-cell-editor.component.d.ts.map +1 -1
- package/components/field-menu/field-menu.component.d.ts +14 -0
- package/components/field-menu/field-menu.component.d.ts.map +1 -0
- package/components/field-property-editor/field-property-editor.component.d.ts +12 -15
- package/components/field-property-editor/field-property-editor.component.d.ts.map +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.map +1 -0
- package/constants/field.d.ts +14 -0
- package/constants/field.d.ts.map +1 -0
- package/constants/grid.d.ts.map +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/index.d.ts.map +1 -1
- package/core/action/field.d.ts +2 -2
- package/core/action/field.d.ts.map +1 -1
- package/core/action/record.d.ts +3 -3
- package/core/action/record.d.ts.map +1 -1
- package/core/constants/field.d.ts +4 -8
- package/core/constants/field.d.ts.map +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.d.ts.map +1 -1
- package/core/types/action.d.ts +7 -6
- package/core/types/action.d.ts.map +1 -1
- package/core/types/core.d.ts +5 -0
- package/core/types/core.d.ts.map +1 -1
- package/core/utils/field.d.ts +7 -1
- package/core/utils/field.d.ts.map +1 -1
- package/core/utils/queries.d.ts +2 -2
- package/core/utils/queries.d.ts.map +1 -1
- package/esm2022/components/cell-editors/abstract-cell-editor.component.mjs +11 -9
- package/esm2022/components/cell-editors/number/number-editor.component.mjs +1 -1
- package/esm2022/components/field-menu/field-menu.component.mjs +36 -0
- package/esm2022/components/field-property-editor/field-property-editor.component.mjs +32 -24
- package/esm2022/components/index.mjs +2 -0
- package/esm2022/constants/field.mjs +15 -0
- package/esm2022/constants/grid.mjs +1 -1
- package/esm2022/constants/index.mjs +2 -1
- package/esm2022/core/action/field.mjs +1 -1
- package/esm2022/core/action/record.mjs +1 -1
- package/esm2022/core/constants/field.mjs +4 -4
- package/esm2022/core/index.mjs +2 -1
- package/esm2022/core/types/action.mjs +1 -1
- package/esm2022/core/types/core.mjs +1 -1
- package/esm2022/core/utils/field.mjs +12 -1
- package/esm2022/core/utils/queries.mjs +1 -1
- package/esm2022/grid.component.mjs +41 -30
- package/esm2022/public-api.mjs +2 -1
- package/esm2022/services/event.service.mjs +4 -4
- package/esm2022/services/field.service.mjs +32 -0
- package/esm2022/types/field.mjs +2 -0
- package/esm2022/types/grid.mjs +1 -1
- package/esm2022/types/index.mjs +2 -1
- package/fesm2022/ai-table-grid.mjs +237 -137
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid.component.d.ts +13 -9
- package/grid.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -1
- package/services/field.service.d.ts +16 -0
- package/services/field.service.d.ts.map +1 -0
- package/{styles.scss → styles/styles.scss} +1 -1
- package/types/field.d.ts +11 -0
- package/types/field.d.ts.map +1 -0
- package/types/grid.d.ts +8 -3
- package/types/grid.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
@@ -5,13 +5,13 @@ import * as i0 from "@angular/core";
|
|
5
5
|
export declare abstract class AbstractEditCellEditor<TValue, TFieldType extends AITableField = AITableField> implements OnInit {
|
6
6
|
field: import("@angular/core").InputSignal<TFieldType>;
|
7
7
|
record: import("@angular/core").InputSignal<AITableRecord>;
|
8
|
-
aiTable:
|
8
|
+
aiTable: AITable;
|
9
9
|
modelValue: TValue;
|
10
10
|
protected thyPopoverRef: ThyPopoverRef<any, any, any>;
|
11
11
|
ngOnInit(): void;
|
12
12
|
updateFieldValue(): void;
|
13
13
|
closePopover(): void;
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractEditCellEditor<any, any>, never>;
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AbstractEditCellEditor<any, any>, "abstract-edit-cell", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "record": { "alias": "record"; "required": true; "isSignal": true; }; "aiTable": { "alias": "aiTable"; "required": true;
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AbstractEditCellEditor<any, any>, "abstract-edit-cell", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "record": { "alias": "record"; "required": true; "isSignal": true; }; "aiTable": { "alias": "aiTable"; "required": true; }; }, {}, never, never, true, never>;
|
16
16
|
}
|
17
17
|
//# sourceMappingURL=abstract-cell-editor.component.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"abstract-cell-editor.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/cell-editors/abstract-cell-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"abstract-cell-editor.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/cell-editors/abstract-cell-editor.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAA6B,OAAO,EAAE,YAAY,EAAkB,aAAa,EAAE,MAAM,YAAY,CAAC;;AAE7G,8BAMsB,sBAAsB,CAAC,MAAM,EAAE,UAAU,SAAS,YAAY,GAAG,YAAY,CAAE,YAAW,MAAM;IAClH,KAAK,kDAAgC;IAErC,MAAM,qDAAmC;IAEd,OAAO,EAAG,OAAO,CAAC;IAE7C,UAAU,EAAG,MAAM,CAAC;IAEpB,SAAS,CAAC,aAAa,+BAAyD;IAEhF,QAAQ,IAAI,IAAI;IAOhB,gBAAgB;IAKhB,YAAY;yCAvBM,sBAAsB;2CAAtB,sBAAsB;CA0B3C"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
2
|
+
import { AITableFieldMenu } from '../../types/field';
|
3
|
+
import { AITableField, AITable } from '../../core';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class FieldMenu {
|
6
|
+
field: AITableField;
|
7
|
+
aiTable: AITable;
|
8
|
+
fieldMenus: AITableFieldMenu[];
|
9
|
+
origin: HTMLElement | ElementRef<any>;
|
10
|
+
execute(menu: AITableFieldMenu): void;
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldMenu, never>;
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldMenu, "field-menu", never, { "field": { "alias": "field"; "required": true; }; "aiTable": { "alias": "aiTable"; "required": true; }; "fieldMenus": { "alias": "fieldMenus"; "required": true; }; "origin": { "alias": "origin"; "required": false; }; }, {}, never, never, true, never>;
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=field-menu.component.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"field-menu.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/field-menu/field-menu.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,UAAU,EAAU,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;;AAUnD,qBAca,SAAS;IACS,KAAK,EAAG,YAAY,CAAC;IAErB,OAAO,EAAG,OAAO,CAAC;IAElB,UAAU,EAAG,gBAAgB,EAAE,CAAC;IAElD,MAAM,EAAG,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAEhD,OAAO,CAAC,IAAI,EAAE,gBAAgB;yCATrB,SAAS;2CAAT,SAAS;CAarB"}
|
@@ -1,12 +1,13 @@
|
|
1
|
-
import {
|
1
|
+
import { TemplateRef } from '@angular/core';
|
2
2
|
import { ThyFormValidatorConfig } from 'ngx-tethys/form';
|
3
|
-
import { AITableField, AITableFieldType
|
3
|
+
import { AITable, AITableField, AITableFieldType } from '../../core';
|
4
4
|
import { ThyPopoverRef } from 'ngx-tethys/popover';
|
5
5
|
import * as i0 from "@angular/core";
|
6
|
-
export declare class
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
export declare class AITableFieldPropertyEditor {
|
7
|
+
aiField: import("@angular/core").ModelSignal<AITableField>;
|
8
|
+
aiTable: AITable;
|
9
|
+
aiExternalTemplate: TemplateRef<any> | null;
|
10
|
+
isUpdate: boolean;
|
10
11
|
fieldType: import("@angular/core").Signal<{
|
11
12
|
type: AITableFieldType;
|
12
13
|
name: string;
|
@@ -14,19 +15,15 @@ export declare class FieldPropertyEditorComponent implements OnInit {
|
|
14
15
|
}>;
|
15
16
|
fieldMaxLength: number;
|
16
17
|
validatorConfig: ThyFormValidatorConfig;
|
17
|
-
selectableFields:
|
18
|
-
type: AITableFieldType;
|
19
|
-
name: string;
|
20
|
-
icon: string;
|
21
|
-
}[];
|
18
|
+
selectableFields: import("../../core").AITableFieldInfo[];
|
22
19
|
protected thyPopoverRef: ThyPopoverRef<any, any, any>;
|
23
20
|
constructor();
|
24
|
-
ngOnInit(): void;
|
25
21
|
checkUniqueName: (fieldName: string) => import("rxjs").Observable<boolean>;
|
26
22
|
selectFieldType(fieldType: AITableFieldType): void;
|
27
|
-
|
23
|
+
editFieldProperty(): void;
|
28
24
|
cancel(): void;
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AITableFieldPropertyEditor, never>;
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AITableFieldPropertyEditor, "ai-table-field-property-editor", never, { "aiField": { "alias": "aiField"; "required": true; "isSignal": true; }; "aiTable": { "alias": "aiTable"; "required": true; }; "aiExternalTemplate": { "alias": "aiExternalTemplate"; "required": false; }; "isUpdate": { "alias": "isUpdate"; "required": false; }; }, { "aiField": "aiFieldChange"; }, never, never, true, never>;
|
27
|
+
static ngAcceptInputType_isUpdate: unknown;
|
31
28
|
}
|
32
29
|
//# sourceMappingURL=field-property-editor.component.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"field-property-editor.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/field-property-editor/field-property-editor.component.ts"],"names":[],"mappings":"AACA,OAAO,EAA6C,
|
1
|
+
{"version":3,"file":"field-property-editor.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/field-property-editor/field-property-editor.component.ts"],"names":[],"mappings":"AACA,OAAO,EAA6C,WAAW,EAA6C,MAAM,eAAe,CAAC;AAGlI,OAAO,EAAyD,sBAAsB,EAAiB,MAAM,iBAAiB,CAAC;AAS/H,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAsD,MAAM,YAAY,CAAC;AAEzH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;;AAInD,qBAqCa,0BAA0B;IACnC,OAAO,oDAAkC;IAEd,OAAO,EAAG,OAAO,CAAC;IAEpC,kBAAkB,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAEpB,QAAQ,EAAG,OAAO,CAAC;IAE3D,SAAS;;;;OAEN;IAEH,cAAc,SAAM;IAEpB,eAAe,EAAE,sBAAsB,CAOrC;IAEF,gBAAgB,0CAAU;IAE1B,SAAS,CAAC,aAAa,+BAAqD;;IAI5E,eAAe,cAAe,MAAM,wCAGlC;IAEF,eAAe,CAAC,SAAS,EAAE,gBAAgB;IAI3C,iBAAiB;IASjB,MAAM;yCAhDG,0BAA0B;2CAA1B,0BAA0B;uCAoD0vxB,OAAQ;CADxyxB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,yDAAyD,CAAA"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { AITable, AITableField } from '../core';
|
2
|
+
import { AITableFieldMenu } from '../types/field';
|
3
|
+
import { ElementRef, WritableSignal } from '@angular/core';
|
4
|
+
export declare const DividerMenuItem: {
|
5
|
+
id: string;
|
6
|
+
};
|
7
|
+
export declare const EditFieldPropertyItem: {
|
8
|
+
id: string;
|
9
|
+
name: string;
|
10
|
+
icon: string;
|
11
|
+
exec: (aiTable: AITable, field: WritableSignal<AITableField>, origin?: HTMLElement | ElementRef<any>) => void;
|
12
|
+
};
|
13
|
+
export declare const DefaultFieldMenus: AITableFieldMenu[];
|
14
|
+
//# sourceMappingURL=field.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE3D,eAAO,MAAM,eAAe;;CAE3B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;oBAId,OAAO,SAAS,eAAe,YAAY,CAAC,WAAW,WAAW,GAAG,WAAW,GAAG,CAAC;CAIvG,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EAA4B,CAAC"}
|
package/constants/grid.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/grid.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,eAAO,MAAM,mBAAmB,oBAK/B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC"}
|
package/constants/index.d.ts
CHANGED
package/constants/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
package/core/action/field.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
export declare function addField(aiTable: AITable, field: AITableField, path:
|
1
|
+
import { AIFieldPath, AITable, AITableField } from '../types';
|
2
|
+
export declare function addField(aiTable: AITable, field: AITableField, path: AIFieldPath): void;
|
3
3
|
export declare const FieldActions: {
|
4
4
|
addField: typeof addField;
|
5
5
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE1F,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,QAOhF;AAED,eAAO,MAAM,YAAY;;CAExB,CAAC"}
|
package/core/action/record.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
export declare function updateFieldValue(aiTable: AITable, value: any, path:
|
3
|
-
export declare function addRecord(aiTable: AITable, record: AITableRecord, path:
|
1
|
+
import { AIRecordPath, AITable, AITableRecord, AIFieldValuePath } from '../types';
|
2
|
+
export declare function updateFieldValue(aiTable: AITable, value: any, path: AIFieldValuePath): void;
|
3
|
+
export declare function addRecord(aiTable: AITable, record: AITableRecord, path: AIRecordPath): void;
|
4
4
|
export declare const RecordActions: {
|
5
5
|
addRecord: typeof addRecord;
|
6
6
|
updateFieldValue: typeof updateFieldValue;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/record.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/record.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,YAAY,EAA0B,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGvI,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,gBAAgB,QAWpF;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,QAOpF;AAED,eAAO,MAAM,aAAa;;;CAGzB,CAAC"}
|
@@ -1,15 +1,11 @@
|
|
1
|
-
import { AITableFieldType } from '../types';
|
2
|
-
export declare const
|
1
|
+
import { AITableFieldInfo, AITableFieldType } from '../types';
|
2
|
+
export declare const BasicFields: {
|
3
3
|
type: AITableFieldType;
|
4
4
|
name: string;
|
5
5
|
icon: string;
|
6
6
|
}[];
|
7
|
-
export declare const
|
8
|
-
|
9
|
-
name: string;
|
10
|
-
icon: string;
|
11
|
-
}[];
|
12
|
-
export declare const FieldTypesMap: {
|
7
|
+
export declare const Fields: AITableFieldInfo[];
|
8
|
+
export declare const FieldsMap: {
|
13
9
|
[key: string]: {
|
14
10
|
type: AITableFieldType;
|
15
11
|
name: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/constants/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/constants/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG9D,eAAO,MAAM,WAAW;;;;GA+BvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,gBAAgB,EAAqB,CAAC;AAE3D,eAAO,MAAM,SAAS;;;;;;CAA0C,CAAC"}
|
package/core/index.d.ts
CHANGED
package/core/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC"}
|
package/core/types/action.d.ts
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { AITableField, AITableRecord } from './core';
|
2
|
-
export type
|
3
|
-
export type
|
4
|
-
export type
|
2
|
+
export type AIRecordPath = [number];
|
3
|
+
export type AIFieldPath = [number];
|
4
|
+
export type AIFieldValuePath = [number, number];
|
5
|
+
export type Path = AIRecordPath | AIFieldPath | AIFieldValuePath;
|
5
6
|
export declare enum ActionName {
|
6
7
|
UpdateFieldValue = "update_field_value",
|
7
8
|
AddRecord = "add_record",
|
@@ -14,18 +15,18 @@ export declare enum ExecuteType {
|
|
14
15
|
}
|
15
16
|
export type UpdateFieldValueAction = {
|
16
17
|
type: ActionName.UpdateFieldValue;
|
17
|
-
path:
|
18
|
+
path: AIFieldValuePath;
|
18
19
|
fieldValue: any;
|
19
20
|
newFieldValue: any;
|
20
21
|
};
|
21
22
|
export type AddRecordAction = {
|
22
23
|
type: ActionName.AddRecord;
|
23
|
-
path:
|
24
|
+
path: AIRecordPath;
|
24
25
|
record: AITableRecord;
|
25
26
|
};
|
26
27
|
export type AddFieldAction = {
|
27
28
|
type: ActionName.AddField;
|
28
|
-
path:
|
29
|
+
path: AIFieldPath;
|
29
30
|
field: AITableField;
|
30
31
|
};
|
31
32
|
export type AITableAction = UpdateFieldValueAction | AddRecordAction | AddFieldAction;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/types/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAErD,MAAM,MAAM,
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/types/action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,CAAC;AAEpC,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,CAAC;AAEnC,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhD,MAAM,MAAM,IAAI,GAAG,YAAY,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAEjE,oBAAY,UAAU;IAClB,gBAAgB,uBAAuB;IACvC,SAAS,eAAe;IACxB,QAAQ,cAAc;CACzB;AAED,oBAAY,WAAW;IACnB,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,IAAI,IAAA;CACP;AAED,MAAM,MAAM,sBAAsB,GAAG;IACjC,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAClC,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,GAAG,CAAC;IAChB,aAAa,EAAE,GAAG,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,sBAAsB,GAAG,eAAe,GAAG,cAAc,CAAC"}
|
package/core/types/core.d.ts
CHANGED
package/core/types/core.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/types/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,oBAAY,gBAAgB;IAExB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,YAAY,IAAI;IAEhB,QAAQ,IAAI;IAEZ,IAAI,IAAI;IAIR,MAAM,KAAK;CAEd;AAED,oBAAY,eAAe;IACvB,IAAI,IAAI;IACR,QAAQ,IAAI;IACZ,KAAK,IAAI;IACT,MAAM,IAAI;IACV,MAAM,IAAI;IACV,YAAY,IAAI;IAChB,aAAa,IAAI;IACjB,aAAa,IAAI;IACjB,GAAG,IAAI;IACP,OAAO,IAAI;IACX,GAAG,KAAK;IACR,GAAG,KAAK;IACR,eAAe,KAAK;IACpB,iBAAiB,KAAK;IACtB,OAAO,KAAK;IACZ,SAAS,KAAK;IACd,cAAc,KAAK;IACnB,gBAAgB,KAAK;CACxB;AAED,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,EAAE,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O;IACpB,OAAO,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IACxC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACtC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,OAAO,EAAE,aAAa,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB"}
|
package/core/utils/field.d.ts
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
-
import { AITableFieldType } from '../types';
|
1
|
+
import { AITable, AITableFieldType } from '../types';
|
2
2
|
export declare function getDefaultFieldValue(type: AITableFieldType): string;
|
3
|
+
export declare function createDefaultFieldName(aiTable: AITable, type?: AITableFieldType): string;
|
4
|
+
export declare function createDefaultField(aiTable: AITable, type?: AITableFieldType): {
|
5
|
+
id: string;
|
6
|
+
type: AITableFieldType;
|
7
|
+
name: string;
|
8
|
+
};
|
3
9
|
//# sourceMappingURL=field.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/utils/field.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/utils/field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGrD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,UAE1D;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAE,gBAAwC,UAItG;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,GAAE,gBAAwC;;;;EAElG"}
|
package/core/utils/queries.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { Path, AITable, AITableField, AITableRecord } from '../types';
|
2
2
|
export declare const AITableQueries: {
|
3
3
|
findPath(aiTable: AITable, field?: AITableField, record?: AITableRecord): Path;
|
4
|
-
getFieldValue(aiTable: AITable, path: [
|
4
|
+
getFieldValue(aiTable: AITable, path: [number, number]): any;
|
5
5
|
};
|
6
6
|
//# sourceMappingURL=queries.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/utils/queries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/utils/queries.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAA+C,MAAM,UAAU,CAAC;AAEnH,eAAO,MAAM,cAAc;sBACL,OAAO,UAAU,YAAY,WAAW,aAAa,GAAG,IAAI;2BAcvD,OAAO,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,GAAG;CAO/D,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';
|
1
|
+
import { ChangeDetectionStrategy, Component, computed, inject, Input, input } from '@angular/core';
|
2
2
|
import { ThyPopoverRef } from 'ngx-tethys/popover';
|
3
3
|
import { Actions, AITableQueries } from '../../core';
|
4
4
|
import * as i0 from "@angular/core";
|
@@ -6,24 +6,23 @@ export class AbstractEditCellEditor {
|
|
6
6
|
constructor() {
|
7
7
|
this.field = input.required();
|
8
8
|
this.record = input.required();
|
9
|
-
this.aiTable = input.required();
|
10
9
|
this.thyPopoverRef = inject((ThyPopoverRef));
|
11
10
|
}
|
12
11
|
ngOnInit() {
|
13
12
|
this.modelValue = computed(() => {
|
14
|
-
const path = AITableQueries.findPath(this.aiTable
|
15
|
-
return AITableQueries.getFieldValue(this.aiTable
|
13
|
+
const path = AITableQueries.findPath(this.aiTable, this.field(), this.record());
|
14
|
+
return AITableQueries.getFieldValue(this.aiTable, path);
|
16
15
|
})();
|
17
16
|
}
|
18
17
|
updateFieldValue() {
|
19
|
-
const path = AITableQueries.findPath(this.aiTable
|
20
|
-
Actions.updateFieldValue(this.aiTable
|
18
|
+
const path = AITableQueries.findPath(this.aiTable, this.field(), this.record());
|
19
|
+
Actions.updateFieldValue(this.aiTable, this.modelValue, path);
|
21
20
|
}
|
22
21
|
closePopover() {
|
23
22
|
this.thyPopoverRef.close();
|
24
23
|
}
|
25
24
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AbstractEditCellEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
26
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.2", type: AbstractEditCellEditor, isStandalone: true, selector: "abstract-edit-cell", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, record: { classPropertyName: "record", publicName: "record", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal:
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.0.2", type: AbstractEditCellEditor, isStandalone: true, selector: "abstract-edit-cell", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, record: { classPropertyName: "record", publicName: "record", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: false, isRequired: true, transformFunction: null } }, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
27
26
|
}
|
28
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AbstractEditCellEditor, decorators: [{
|
29
28
|
type: Component,
|
@@ -33,5 +32,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
33
32
|
standalone: true,
|
34
33
|
changeDetection: ChangeDetectionStrategy.OnPush
|
35
34
|
}]
|
36
|
-
}]
|
37
|
-
|
35
|
+
}], propDecorators: { aiTable: [{
|
36
|
+
type: Input,
|
37
|
+
args: [{ required: true }]
|
38
|
+
}] } });
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3QtY2VsbC1lZGl0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZ3JpZC9zcmMvY29tcG9uZW50cy9jZWxsLWVkaXRvcnMvYWJzdHJhY3QtY2VsbC1lZGl0b3IuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBQzNHLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNuRCxPQUFPLEVBQUUsT0FBTyxFQUEyQyxjQUFjLEVBQWlCLE1BQU0sWUFBWSxDQUFDOztBQVE3RyxNQUFNLE9BQWdCLHNCQUFzQjtJQU41QztRQU9JLFVBQUssR0FBRyxLQUFLLENBQUMsUUFBUSxFQUFjLENBQUM7UUFFckMsV0FBTSxHQUFHLEtBQUssQ0FBQyxRQUFRLEVBQWlCLENBQUM7UUF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sVmFsdWUhOiBUVmFsdWU7XG5cbiAgICBwcm90ZWN0ZWQgdGh5UG9wb3ZlclJlZiA9IGluamVjdChUaHlQb3BvdmVyUmVmPEFic3RyYWN0RWRpdENlbGxFZGl0b3I8VFZhbHVlPj4pO1xuXG4gICAgbmdPbkluaXQoKTogdm9pZCB7XG4gICAgICAgIHRoaXMubW9kZWxWYWx1ZSA9IGNvbXB1dGVkKCgpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHBhdGggPSBBSVRhYmxlUXVlcmllcy5maW5kUGF0aCh0aGlzLmFpVGFibGUsIHRoaXMuZmllbGQoKSwgdGhpcy5yZWNvcmQoKSkgYXMgQUlGaWVsZFZhbHVlUGF0aDtcbiAgICAgICAgICAgIHJldHVybiBBSVRhYmxlUXVlcmllcy5nZXRGaWVsZFZhbHVlKHRoaXMuYWlUYWJsZSwgcGF0aCk7XG4gICAgICAgIH0pKCk7XG4gICAgfVxuXG4gICAgdXBkYXRlRmllbGRWYWx1ZSgpIHtcbiAgICAgICAgY29uc3QgcGF0aCA9IEFJVGFibGVRdWVyaWVzLmZpbmRQYXRoKHRoaXMuYWlUYWJsZSwgdGhpcy5maWVsZCgpLCB0aGlzLnJlY29yZCgpKSBhcyBBSUZpZWxkVmFsdWVQYXRoO1xuICAgICAgICBBY3Rpb25zLnVwZGF0ZUZpZWxkVmFsdWUodGhpcy5haVRhYmxlLCB0aGlzLm1vZGVsVmFsdWUsIHBhdGgpO1xuICAgIH1cblxuICAgIGNsb3NlUG9wb3ZlcigpIHtcbiAgICAgICAgdGhpcy50aHlQb3BvdmVyUmVmLmNsb3NlKCk7XG4gICAgfVxufVxuIl19
|
@@ -18,7 +18,7 @@ export class NumberCellEditorComponent extends AbstractEditCellEditor {
|
|
18
18
|
(thyEnter)="updateValue()"
|
19
19
|
(thyBlur)="updateValue()"
|
20
20
|
placeholder=""
|
21
|
-
/> `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus"
|
21
|
+
/> `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
22
22
|
}
|
23
23
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: NumberCellEditorComponent, decorators: [{
|
24
24
|
type: Component,
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { Component, ChangeDetectionStrategy, Input, signal } from '@angular/core';
|
2
|
+
import { ThyDropdownMenuItemDirective, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuComponent } from 'ngx-tethys/dropdown';
|
3
|
+
import { ThyIcon } from 'ngx-tethys/icon';
|
4
|
+
import { ThyDivider } from 'ngx-tethys/divider';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export class FieldMenu {
|
7
|
+
execute(menu) {
|
8
|
+
const field = signal({ ...this.field });
|
9
|
+
menu.exec && menu.exec(this.aiTable, field, this.origin);
|
10
|
+
}
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FieldMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
12
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: FieldMenu, isStandalone: true, selector: "field-menu", inputs: { field: "field", aiTable: "aiTable", fieldMenus: "fieldMenus", origin: "origin" }, ngImport: i0, template: "@for (menu of fieldMenus; track index; let index = $index) {\n @if (menu.id === 'divider') {\n <thy-divider [thyStyle]=\"'solid'\"></thy-divider>\n } @else {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"execute(menu)\">\n <thy-icon [thyIconName]=\"menu.icon!\"></thy-icon>\n <span>{{ menu.name! }}</span>\n </a>\n }\n}\n", dependencies: [{ kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
13
|
+
}
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FieldMenu, decorators: [{
|
15
|
+
type: Component,
|
16
|
+
args: [{ selector: 'field-menu', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
17
|
+
ThyIcon,
|
18
|
+
ThyDivider,
|
19
|
+
ThyDropdownMenuComponent,
|
20
|
+
ThyDropdownMenuItemDirective,
|
21
|
+
ThyDropdownMenuItemNameDirective,
|
22
|
+
ThyDropdownMenuItemIconDirective
|
23
|
+
], template: "@for (menu of fieldMenus; track index; let index = $index) {\n @if (menu.id === 'divider') {\n <thy-divider [thyStyle]=\"'solid'\"></thy-divider>\n } @else {\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"execute(menu)\">\n <thy-icon [thyIconName]=\"menu.icon!\"></thy-icon>\n <span>{{ menu.name! }}</span>\n </a>\n }\n}\n" }]
|
24
|
+
}], propDecorators: { field: [{
|
25
|
+
type: Input,
|
26
|
+
args: [{ required: true }]
|
27
|
+
}], aiTable: [{
|
28
|
+
type: Input,
|
29
|
+
args: [{ required: true }]
|
30
|
+
}], fieldMenus: [{
|
31
|
+
type: Input,
|
32
|
+
args: [{ required: true }]
|
33
|
+
}], origin: [{
|
34
|
+
type: Input
|
35
|
+
}] } });
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmllbGQtbWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9ncmlkL3NyYy9jb21wb25lbnRzL2ZpZWxkLW1lbnUvZmllbGQtbWVudS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9ncmlkL3NyYy9jb21wb25lbnRzL2ZpZWxkLW1lbnUvZmllbGQtbWVudS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLHVCQUF1QixFQUFFLEtBQUssRUFBYyxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFHOUYsT0FBTyxFQUNILDRCQUE0QixFQUM1QixnQ0FBZ0MsRUFDaEMsZ0NBQWdDLEVBQ2hDLHdCQUF3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