@ai-table/grid 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/components/cell-editors/select/select-editor.component.d.ts +15 -0
- package/components/cell-editors/select/select-editor.component.d.ts.map +1 -0
- package/components/field-menu/field-menu.component.d.ts +6 -6
- package/components/field-menu/field-menu.component.d.ts.map +1 -1
- package/components/field-property-editor/field-property-editor.component.d.ts +2 -1
- package/components/field-property-editor/field-property-editor.component.d.ts.map +1 -1
- package/constants/editor.d.ts +1 -1
- package/constants/editor.d.ts.map +1 -1
- package/constants/field.d.ts +10 -4
- package/constants/field.d.ts.map +1 -1
- package/core/action/field.d.ts +6 -0
- package/core/action/field.d.ts.map +1 -1
- package/core/action/general.d.ts.map +1 -1
- package/core/action/index.d.ts +5 -0
- package/core/action/index.d.ts.map +1 -1
- package/core/action/record.d.ts +4 -0
- package/core/action/record.d.ts.map +1 -1
- package/core/constants/field.d.ts +2 -0
- package/core/constants/field.d.ts.map +1 -1
- package/core/types/action.d.ts +31 -2
- package/core/types/action.d.ts.map +1 -1
- package/core/types/core.d.ts +31 -10
- package/core/types/core.d.ts.map +1 -1
- package/core/utils/common.d.ts +2 -1
- package/core/utils/common.d.ts.map +1 -1
- package/core/utils/queries.d.ts +3 -1
- package/core/utils/queries.d.ts.map +1 -1
- package/esm2022/components/cell-editors/select/select-editor.component.mjs +46 -0
- package/esm2022/components/field-menu/field-menu.component.mjs +6 -5
- package/esm2022/components/field-property-editor/field-property-editor.component.mjs +8 -5
- package/esm2022/constants/editor.mjs +8 -8
- package/esm2022/constants/field.mjs +15 -3
- package/esm2022/constants/grid.mjs +5 -5
- package/esm2022/core/action/field.mjs +43 -2
- package/esm2022/core/action/general.mjs +68 -14
- package/esm2022/core/action/record.mjs +22 -5
- package/esm2022/core/constants/field.mjs +19 -13
- package/esm2022/core/types/action.mjs +6 -1
- package/esm2022/core/types/core.mjs +11 -14
- package/esm2022/core/types/index.mjs +1 -1
- package/esm2022/core/utils/common.mjs +10 -1
- package/esm2022/core/utils/field.mjs +3 -3
- package/esm2022/core/utils/queries.mjs +36 -6
- package/esm2022/core/utils/record.mjs +3 -3
- package/esm2022/grid.component.mjs +40 -11
- package/esm2022/pipes/grid.mjs +1 -2
- package/esm2022/services/event.service.mjs +10 -3
- package/esm2022/services/selection.servive.mjs +64 -0
- package/esm2022/types/field.mjs +1 -1
- package/esm2022/types/grid.mjs +1 -1
- package/esm2022/utils/build.mjs +13 -5
- package/fesm2022/ai-table-grid.mjs +454 -182
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid.component.d.ts +13 -6
- package/grid.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/pipes/grid.d.ts.map +1 -1
- package/services/event.service.d.ts +2 -0
- package/services/event.service.d.ts.map +1 -1
- package/services/selection.servive.d.ts +16 -0
- package/services/selection.servive.d.ts.map +1 -0
- package/styles/styles.scss +70 -3
- package/types/field.d.ts +3 -3
- package/types/field.d.ts.map +1 -1
- package/types/grid.d.ts +7 -2
- package/types/grid.d.ts.map +1 -1
- package/utils/build.d.ts +2 -2
- package/utils/build.d.ts.map +1 -1
- package/components/cell-editors/single-select/single-select-editor.component.d.ts +0 -14
- package/components/cell-editors/single-select/single-select-editor.component.d.ts.map +0 -1
- package/esm2022/components/cell-editors/single-select/single-select-editor.component.mjs +0 -44
@@ -0,0 +1,15 @@
|
|
1
|
+
import { AbstractEditCellEditor } from '../abstract-cell-editor.component';
|
2
|
+
import { AITableSelectOption, AITableField } from '../../../core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export interface AITableSingleSelectField extends AITableField<AITableSelectOption> {
|
5
|
+
options: AITableSelectOption[];
|
6
|
+
}
|
7
|
+
export declare class SelectCellEditorComponent extends AbstractEditCellEditor<string, AITableSingleSelectField> {
|
8
|
+
isMultiple: boolean;
|
9
|
+
selectOptions: import("@angular/core").Signal<AITableSelectOption[]>;
|
10
|
+
constructor();
|
11
|
+
updateValue(value: boolean): void;
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectCellEditorComponent, never>;
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectCellEditorComponent, "single-select-cell-editor", never, { "isMultiple": { "alias": "isMultiple"; "required": false; }; }, {}, never, never, true, never>;
|
14
|
+
}
|
15
|
+
//# sourceMappingURL=select-editor.component.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"select-editor.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-editors/select/select-editor.component.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAI3E,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;AAElE,MAAM,WAAW,wBAAyB,SAAQ,YAAY,CAAC,mBAAmB,CAAC;IAC/E,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAClC;AAED,qBAYa,yBAA0B,SAAQ,sBAAsB,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1F,UAAU,EAAG,OAAO,CAAC;IAE9B,aAAa,wDAEV;;IAMH,WAAW,CAAC,KAAK,EAAE,OAAO;yCAXjB,yBAAyB;2CAAzB,yBAAyB;CAiBrC"}
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { ElementRef } from '@angular/core';
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { AITableFieldMenuItem } from '../../types/field';
|
3
|
+
import { AITable } from '../../core';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
export declare class FieldMenu {
|
6
|
-
|
6
|
+
fieldId: string;
|
7
7
|
aiTable: AITable;
|
8
|
-
fieldMenus:
|
8
|
+
fieldMenus: AITableFieldMenuItem[];
|
9
9
|
origin: HTMLElement | ElementRef<any>;
|
10
|
-
execute(menu:
|
10
|
+
execute(menu: AITableFieldMenuItem): void;
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldMenu, never>;
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FieldMenu, "field-menu", never, { "
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldMenu, "field-menu", never, { "fieldId": { "alias": "fieldId"; "required": true; }; "aiTable": { "alias": "aiTable"; "required": true; }; "fieldMenus": { "alias": "fieldMenus"; "required": true; }; "origin": { "alias": "origin"; "required": false; }; }, {}, never, never, true, never>;
|
13
13
|
}
|
14
14
|
//# sourceMappingURL=field-menu.component.d.ts.map
|
@@ -1 +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,
|
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,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAgB,MAAM,YAAY,CAAC;;AAWnD,qBAca,SAAS;IACS,OAAO,EAAG,MAAM,CAAC;IAEjB,OAAO,EAAG,OAAO,CAAC;IAElB,UAAU,EAAG,oBAAoB,EAAE,CAAC;IAEtD,MAAM,EAAG,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAEhD,OAAO,CAAC,IAAI,EAAE,oBAAoB;yCATzB,SAAS;2CAAT,SAAS;CAarB"}
|
@@ -4,7 +4,7 @@ import { AITable, AITableField, AITableFieldType } from '../../core';
|
|
4
4
|
import { ThyPopoverRef } from 'ngx-tethys/popover';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export declare class AITableFieldPropertyEditor {
|
7
|
-
aiField: import("@angular/core").ModelSignal<AITableField
|
7
|
+
aiField: import("@angular/core").ModelSignal<AITableField<unknown>>;
|
8
8
|
aiTable: AITable;
|
9
9
|
aiExternalTemplate: TemplateRef<any> | null;
|
10
10
|
isUpdate: boolean;
|
@@ -12,6 +12,7 @@ export declare class AITableFieldPropertyEditor {
|
|
12
12
|
type: AITableFieldType;
|
13
13
|
name: string;
|
14
14
|
icon: string;
|
15
|
+
width: number;
|
15
16
|
}>;
|
16
17
|
fieldMaxLength: number;
|
17
18
|
validatorConfig: ThyFormValidatorConfig;
|
@@ -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,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;;
|
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;;AAKnD,qBAsCa,0BAA0B;IACnC,OAAO,6DAAkC;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;IAUjB,MAAM;yCAjDG,0BAA0B;2CAA1B,0BAA0B;uCAqDyhxB,OAAQ;CADvkxB"}
|
package/constants/editor.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAQ3C,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,gBAAgB,EAAE,GAAG,
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAQ3C,eAAO,MAAM,oBAAoB,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAOvE,CAAC"}
|
package/constants/field.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AITable, AITableField } from '../core';
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { ElementRef, Signal } from '@angular/core';
|
3
|
+
import { AITableFieldMenuItem } from '../types';
|
4
4
|
export declare const DividerMenuItem: {
|
5
5
|
id: string;
|
6
6
|
};
|
@@ -8,7 +8,13 @@ export declare const EditFieldPropertyItem: {
|
|
8
8
|
id: string;
|
9
9
|
name: string;
|
10
10
|
icon: string;
|
11
|
-
exec: (aiTable: AITable, field:
|
11
|
+
exec: (aiTable: AITable, field: Signal<AITableField>, origin?: HTMLElement | ElementRef<any>) => void;
|
12
12
|
};
|
13
|
-
export declare const
|
13
|
+
export declare const RemoveFieldItem: {
|
14
|
+
id: string;
|
15
|
+
name: string;
|
16
|
+
icon: string;
|
17
|
+
exec: (aiTable: AITable, field: Signal<AITableField>) => void;
|
18
|
+
};
|
19
|
+
export declare const DefaultFieldMenus: AITableFieldMenuItem[];
|
14
20
|
//# sourceMappingURL=field.d.ts.map
|
package/constants/field.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/field.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,OAAO,EAAE,YAAY,EAAkB,MAAM,SAAS,CAAC;AAEtF,OAAO,EAAE,UAAU,EAAU,MAAM,EAAkB,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,eAAe;;CAE3B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;oBAId,OAAO,SAAS,OAAO,YAAY,CAAC,WAAW,WAAW,GAAG,WAAW,GAAG,CAAC;CAK/F,CAAC;AAEF,eAAO,MAAM,eAAe;;;;oBAIR,OAAO,SAAS,OAAO,YAAY,CAAC;CAIvD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,oBAAoB,EAA6C,CAAC"}
|
package/core/action/field.d.ts
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
import { AIFieldPath, AITable, AITableField } from '../types';
|
2
2
|
export declare function addField(aiTable: AITable, field: AITableField, path: AIFieldPath): void;
|
3
|
+
export declare function moveField(aiTable: AITable, path: AIFieldPath, newPath: AIFieldPath): void;
|
4
|
+
export declare function removeField(aiTable: AITable, path: AIFieldPath): void;
|
5
|
+
export declare function setField(aiTable: AITable, value: Partial<AITableField>, path: AIFieldPath): void;
|
3
6
|
export declare const FieldActions: {
|
4
7
|
addField: typeof addField;
|
8
|
+
moveField: typeof moveField;
|
9
|
+
removeField: typeof removeField;
|
10
|
+
setField: typeof setField;
|
5
11
|
};
|
6
12
|
//# sourceMappingURL=field.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/field.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,WAAW,EACX,OAAO,EACP,YAAY,EAIf,MAAM,UAAU,CAAC;AAGlB,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,QAOhF;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,QAOlF;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,QAM9D;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,QAuBzF;AAED,eAAO,MAAM,YAAY;;;;;CAKxB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,aAAa,EAAiC,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,aAAa,EAAiC,MAAM,UAAU,CAAC;AA8F7F,eAAO,MAAM,cAAc;uBACJ,OAAO,MAAM,aAAa,GAAG,IAAI;CAWvD,CAAC"}
|
package/core/action/index.d.ts
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
export declare const Actions: {
|
2
2
|
addField: typeof import("./field").addField;
|
3
|
+
moveField: typeof import("./field").moveField;
|
4
|
+
removeField: typeof import("./field").removeField;
|
5
|
+
setField: typeof import("./field").setField;
|
3
6
|
addRecord: typeof import("./record").addRecord;
|
4
7
|
updateFieldValue: typeof import("./record").updateFieldValue;
|
8
|
+
moveRecord: typeof import("./record").moveRecord;
|
9
|
+
removeRecord: typeof import("./record").removeRecord;
|
5
10
|
transform(aiTable: import("@ai-table/grid").AITable, op: import("@ai-table/grid").AITableAction): void;
|
6
11
|
};
|
7
12
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO;;;;;;;;;;CAInB,CAAC"}
|
package/core/action/record.d.ts
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
import { AIRecordPath, AITable, AITableRecord, AIFieldValuePath } from '../types';
|
2
2
|
export declare function updateFieldValue(aiTable: AITable, value: any, path: AIFieldValuePath): void;
|
3
3
|
export declare function addRecord(aiTable: AITable, record: AITableRecord, path: AIRecordPath): void;
|
4
|
+
export declare function moveRecord(aiTable: AITable, path: AIRecordPath, newPath: AIRecordPath): void;
|
5
|
+
export declare function removeRecord(aiTable: AITable, path: AIRecordPath): void;
|
4
6
|
export declare const RecordActions: {
|
5
7
|
addRecord: typeof addRecord;
|
6
8
|
updateFieldValue: typeof updateFieldValue;
|
9
|
+
moveRecord: typeof moveRecord;
|
10
|
+
removeRecord: typeof removeRecord;
|
7
11
|
};
|
8
12
|
//# sourceMappingURL=record.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/record.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/record.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAEZ,OAAO,EACP,aAAa,EACb,gBAAgB,EAGnB,MAAM,UAAU,CAAC;AAGlB,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,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,QAOrF;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,QAMhE;AAED,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC"}
|
@@ -3,6 +3,7 @@ export declare const BasicFields: {
|
|
3
3
|
type: AITableFieldType;
|
4
4
|
name: string;
|
5
5
|
icon: string;
|
6
|
+
width: number;
|
6
7
|
}[];
|
7
8
|
export declare const Fields: AITableFieldInfo[];
|
8
9
|
export declare const FieldsMap: {
|
@@ -10,6 +11,7 @@ export declare const FieldsMap: {
|
|
10
11
|
type: AITableFieldType;
|
11
12
|
name: string;
|
12
13
|
icon: string;
|
14
|
+
width: number;
|
13
15
|
};
|
14
16
|
};
|
15
17
|
//# sourceMappingURL=field.d.ts.map
|
@@ -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,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG9D,eAAO,MAAM,WAAW
|
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;;;;;GAqCvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,gBAAgB,EAAqB,CAAC;AAE3D,eAAO,MAAM,SAAS;;;;;;;CAA0C,CAAC"}
|
package/core/types/action.d.ts
CHANGED
@@ -6,7 +6,12 @@ export type Path = AIRecordPath | AIFieldPath | AIFieldValuePath;
|
|
6
6
|
export declare enum ActionName {
|
7
7
|
UpdateFieldValue = "update_field_value",
|
8
8
|
AddRecord = "add_record",
|
9
|
-
AddField = "add_field"
|
9
|
+
AddField = "add_field",
|
10
|
+
MoveField = "move_field",
|
11
|
+
MoveRecord = "move_record",
|
12
|
+
RemoveField = "remove_field",
|
13
|
+
RemoveRecord = "remove_record",
|
14
|
+
SetField = "set_field"
|
10
15
|
}
|
11
16
|
export declare enum ExecuteType {
|
12
17
|
Execute = 0,
|
@@ -29,5 +34,29 @@ export type AddFieldAction = {
|
|
29
34
|
path: AIFieldPath;
|
30
35
|
field: AITableField;
|
31
36
|
};
|
32
|
-
export type
|
37
|
+
export type MoveFieldAction = {
|
38
|
+
type: ActionName.MoveField;
|
39
|
+
path: AIFieldPath;
|
40
|
+
newPath: AIFieldPath;
|
41
|
+
};
|
42
|
+
export type MoveRecordAction = {
|
43
|
+
type: ActionName.MoveRecord;
|
44
|
+
path: AIRecordPath;
|
45
|
+
newPath: AIRecordPath;
|
46
|
+
};
|
47
|
+
export type RemoveFieldAction = {
|
48
|
+
type: ActionName.RemoveField;
|
49
|
+
path: AIFieldPath;
|
50
|
+
};
|
51
|
+
export type RemoveRecordAction = {
|
52
|
+
type: ActionName.RemoveRecord;
|
53
|
+
path: AIRecordPath;
|
54
|
+
};
|
55
|
+
export type SetFieldAction = {
|
56
|
+
type: ActionName.SetField;
|
57
|
+
path: AIFieldPath;
|
58
|
+
field: Partial<AITableField>;
|
59
|
+
newField: Partial<AITableField>;
|
60
|
+
};
|
61
|
+
export type AITableAction = UpdateFieldValueAction | AddRecordAction | AddFieldAction | RemoveRecordAction | RemoveFieldAction | SetFieldAction | MoveFieldAction | MoveRecordAction;
|
33
62
|
//# sourceMappingURL=action.d.ts.map
|
@@ -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,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,
|
1
|
+
{"version":3,"file":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AAE,WAAW,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7B,IAAI,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC;IAC9B,IAAI,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,aAAa,GACnB,sBAAsB,GACtB,eAAe,GACf,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,cAAc,GACd,eAAe,GACf,gBAAgB,CAAC"}
|
package/core/types/core.d.ts
CHANGED
@@ -1,12 +1,17 @@
|
|
1
1
|
import { WritableSignal } from '@angular/core';
|
2
2
|
import { AITableAction } from './action';
|
3
|
+
import { AITableSelection } from '../../types';
|
4
|
+
import { Id } from 'ngx-tethys/types';
|
3
5
|
export declare enum AITableFieldType {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
text = "text",// 包含多行文本
|
7
|
+
richText = "rich_text",// 包含多行文本
|
8
|
+
select = "select",// 包含单选和多选
|
9
|
+
number = "number",
|
10
|
+
date = "date",
|
11
|
+
member = "member",// 包含单个和多个
|
12
|
+
progress = "progress",
|
13
|
+
rate = "rate",
|
14
|
+
link = "link"
|
10
15
|
}
|
11
16
|
export declare enum AITableStatType {
|
12
17
|
None = 0,
|
@@ -33,19 +38,32 @@ export interface AITableSelectOption {
|
|
33
38
|
name: string;
|
34
39
|
color?: string;
|
35
40
|
}
|
36
|
-
export interface AITableField {
|
41
|
+
export interface AITableField<T = unknown> {
|
37
42
|
id: string;
|
38
43
|
name: string;
|
39
44
|
type: AITableFieldType;
|
40
|
-
|
45
|
+
icon?: string;
|
46
|
+
width?: number;
|
41
47
|
hidden?: boolean;
|
42
48
|
frozen?: boolean;
|
43
49
|
statType?: AITableStatType;
|
44
|
-
|
50
|
+
isMultiple?: boolean;
|
51
|
+
[key: string]: T | any;
|
45
52
|
}
|
53
|
+
export type TextFieldValue = string;
|
54
|
+
export type SelectFieldValue = Id[];
|
55
|
+
export type NumberFieldValue = number;
|
56
|
+
export type DateFieldValue = {
|
57
|
+
timestamp: number;
|
58
|
+
};
|
59
|
+
export type MemberFieldValue = Id[];
|
60
|
+
export type ProgressFieldValue = number;
|
61
|
+
export type RateFieldValue = 1 | 2 | 3 | 4 | 5;
|
62
|
+
export type FieldValue = TextFieldValue | SelectFieldValue | NumberFieldValue | DateFieldValue | MemberFieldValue | ProgressFieldValue | RateFieldValue | any;
|
46
63
|
export interface AITableRecord {
|
47
64
|
id: string;
|
48
|
-
|
65
|
+
checked?: boolean;
|
66
|
+
values: Record<string, FieldValue>;
|
49
67
|
}
|
50
68
|
export type AITableRecords = AITableRecord[];
|
51
69
|
export type AITableFields = AITableField[];
|
@@ -57,6 +75,7 @@ export interface AITable {
|
|
57
75
|
records: WritableSignal<AITableRecords>;
|
58
76
|
fields: WritableSignal<AITableFields>;
|
59
77
|
actions: AITableAction[];
|
78
|
+
selection: WritableSignal<AITableSelection>;
|
60
79
|
onChange: () => void;
|
61
80
|
apply: (action: AITableAction) => void;
|
62
81
|
}
|
@@ -69,5 +88,7 @@ export interface AITableFieldInfo {
|
|
69
88
|
type: AITableFieldType;
|
70
89
|
name: string;
|
71
90
|
icon: string;
|
91
|
+
width: number;
|
72
92
|
}
|
93
|
+
export type AIPlugin = (aiTable: AITable) => AITable;
|
73
94
|
//# sourceMappingURL=core.d.ts.map
|
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;
|
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;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,oBAAY,gBAAgB;IACxB,IAAI,SAAS,CAAE,SAAS;IACxB,QAAQ,cAAc,CAAE,SAAS;IACjC,MAAM,WAAW,CAAE,UAAU;IAC7B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW,CAAE,UAAU;IAE7B,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;CAChB;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,MA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AAC;AAE7C,MAAM,MAAM,aAAa,GAAG,YAAY,EAAE,CAAC;AAE3C,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IACxC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACtC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC5C,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;IACb,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC"}
|
package/core/utils/common.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import { AITable, AITableFields, AITableRecords } from '../types';
|
1
|
+
import { AITable, AITableFields, AITableRecords, Path } from '../types';
|
2
2
|
import { WritableSignal } from '@angular/core';
|
3
3
|
export declare function createAITable(records: WritableSignal<AITableRecords>, fields: WritableSignal<AITableFields>): AITable;
|
4
|
+
export declare function isPathEqual(path: Path, another: Path): boolean;
|
4
5
|
//# sourceMappingURL=common.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/utils/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAiB,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/utils/common.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAiB,aAAa,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEvF,OAAO,EAAE,cAAc,EAAU,MAAM,eAAe,CAAC;AAEvD,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,GAAG,OAAO,CA0BrH;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CAE9D"}
|
package/core/utils/queries.d.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
import { Path, AITable, AITableField, AITableRecord } from '../types';
|
1
|
+
import { Path, AITable, AITableField, AITableRecord, AIRecordPath, AIFieldPath } from '../types';
|
2
2
|
export declare const AITableQueries: {
|
3
3
|
findPath(aiTable: AITable, field?: AITableField, record?: AITableRecord): Path;
|
4
4
|
getFieldValue(aiTable: AITable, path: [number, number]): any;
|
5
|
+
getField(aiTable: AITable, path: AIFieldPath): AITableField;
|
6
|
+
getRecord(aiTable: AITable, path: AIRecordPath): AITableRecord;
|
5
7
|
};
|
6
8
|
//# 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,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,
|
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,EAAoB,YAAY,EAAE,WAAW,EAAE,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;sBAqB1C,OAAO,sBAAsB,YAAY;uBAUxC,OAAO,uBAAuB,aAAa;CASjE,CAAC"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { NgForOf, NgIf } from '@angular/common';
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, Input } from '@angular/core';
|
3
|
+
import { FormsModule } from '@angular/forms';
|
4
|
+
import { ThySelect } from 'ngx-tethys/select';
|
5
|
+
import { AbstractEditCellEditor } from '../abstract-cell-editor.component';
|
6
|
+
import { ThyTag } from 'ngx-tethys/tag';
|
7
|
+
import { ThyIcon } from 'ngx-tethys/icon';
|
8
|
+
import { ThyOption } from 'ngx-tethys/shared';
|
9
|
+
import * as i0 from "@angular/core";
|
10
|
+
import * as i1 from "@angular/forms";
|
11
|
+
export class SelectCellEditorComponent extends AbstractEditCellEditor {
|
12
|
+
constructor() {
|
13
|
+
super();
|
14
|
+
this.selectOptions = computed(() => {
|
15
|
+
return this.field().options;
|
16
|
+
});
|
17
|
+
}
|
18
|
+
updateValue(value) {
|
19
|
+
if (!value) {
|
20
|
+
this.updateFieldValue();
|
21
|
+
this.closePopover();
|
22
|
+
}
|
23
|
+
}
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SelectCellEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.2", type: SelectCellEditorComponent, isStandalone: true, selector: "single-select-cell-editor", inputs: { isMultiple: "isMultiple" }, host: { classAttribute: "d-block h-100" }, usesInheritance: true, ngImport: i0, template: `<thy-select [(ngModel)]="modelValue" [thyAutoExpand]="true" (thyOnExpandStatusChange)="updateValue($event)">
|
26
|
+
<thy-option *ngFor="let option of selectOptions()" [thyValue]="option.id" [thyLabelText]="option.name"> </thy-option>
|
27
|
+
</thy-select> `, isInline: true, dependencies: [{ kind: "directive", type: NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { 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: "component", type: ThySelect, selector: "thy-select,thy-custom-select", inputs: ["thyDropdownWidthMode", "thyShowSearch", "thyPlaceHolder", "thyServerSearch", "thyLoadState", "thyAutoActiveFirstItem", "thyMode", "thySize", "thyEmptyStateText", "thyEmptySearchMessageText", "thyEnableScrollLoad", "thyAllowClear", "thyDisabled", "thySortComparator", "thyFooterTemplate", "thyPlacement", "thyOrigin", "thyFooterClass", "thyAutoExpand", "thyHasBackdrop", "thyMaxTagCount", "thyBorderless", "thyOptions", "thyPreset"], outputs: ["thyOnSearch", "thyOnScrollToBottom", "thyOnExpandStatusChange"], exportAs: ["thySelect"] }, { kind: "component", type: ThyOption, selector: "thy-option", inputs: ["thyValue", "thyRawValue", "thyLabelText", "thyShowOptionCustom", "thySearchKey", "thyDisabled"], outputs: ["selectionChange", "visibleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
28
|
+
}
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: SelectCellEditorComponent, decorators: [{
|
30
|
+
type: Component,
|
31
|
+
args: [{
|
32
|
+
selector: 'single-select-cell-editor',
|
33
|
+
template: `<thy-select [(ngModel)]="modelValue" [thyAutoExpand]="true" (thyOnExpandStatusChange)="updateValue($event)">
|
34
|
+
<thy-option *ngFor="let option of selectOptions()" [thyValue]="option.id" [thyLabelText]="option.name"> </thy-option>
|
35
|
+
</thy-select> `,
|
36
|
+
standalone: true,
|
37
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
38
|
+
host: {
|
39
|
+
class: 'd-block h-100'
|
40
|
+
},
|
41
|
+
imports: [NgIf, NgForOf, FormsModule, ThySelect, ThyOption, ThyTag, ThyIcon]
|
42
|
+
}]
|
43
|
+
}], ctorParameters: () => [], propDecorators: { isMultiple: [{
|
44
|
+
type: Input
|
45
|
+
}] } });
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LWVkaXRvci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9ncmlkL3NyYy9jb21wb25lbnRzL2NlbGwtZWRpdG9ycy9zZWxlY3Qvc2VsZWN0LWVkaXRvci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNoRCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDcEYsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUM5QyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUMzRSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDeEMsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGlCQ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gIH1cbiAgICB9XG59XG4iXX0=
|
@@ -1,15 +1,16 @@
|
|
1
|
-
import { Component, ChangeDetectionStrategy, Input
|
1
|
+
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
2
2
|
import { ThyDropdownMenuItemDirective, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuComponent } from 'ngx-tethys/dropdown';
|
3
3
|
import { ThyIcon } from 'ngx-tethys/icon';
|
4
4
|
import { ThyDivider } from 'ngx-tethys/divider';
|
5
|
+
import { getRecordOrField } from '../../utils';
|
5
6
|
import * as i0 from "@angular/core";
|
6
7
|
export class FieldMenu {
|
7
8
|
execute(menu) {
|
8
|
-
const field =
|
9
|
+
const field = getRecordOrField(this.aiTable.fields, this.fieldId);
|
9
10
|
menu.exec && menu.exec(this.aiTable, field, this.origin);
|
10
11
|
}
|
11
12
|
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: {
|
13
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.2", type: FieldMenu, isStandalone: true, selector: "field-menu", inputs: { fieldId: "fieldId", 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
|
}
|
14
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: FieldMenu, decorators: [{
|
15
16
|
type: Component,
|
@@ -21,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
21
22
|
ThyDropdownMenuItemNameDirective,
|
22
23
|
ThyDropdownMenuItemIconDirective
|
23
24
|
], 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: {
|
25
|
+
}], propDecorators: { fieldId: [{
|
25
26
|
type: Input,
|
26
27
|
args: [{ required: true }]
|
27
28
|
}], aiTable: [{
|
@@ -33,4 +34,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
33
34
|
}], origin: [{
|
34
35
|
type: Input
|
35
36
|
}] } });
|
36
|
-
//# sourceMappingURL=data:application/json;base64,
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmllbGQtbWVudS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9nc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