@ai-table/grid 0.0.6 → 0.0.7
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.map +1 -1
- package/components/cell-editors/cell-editor.scss +22 -2
- package/components/cell-editors/select/select-editor.component.d.ts +7 -8
- package/components/cell-editors/select/select-editor.component.d.ts.map +1 -1
- package/components/cell-views/select/option.component.d.ts +11 -0
- package/components/cell-views/select/option.component.d.ts.map +1 -0
- package/components/field-property-editor/field-property-editor.component.d.ts +13 -4
- package/components/field-property-editor/field-property-editor.component.d.ts.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.d.ts.map +1 -1
- package/constants/field.d.ts.map +1 -1
- package/core/action/field.d.ts +3 -3
- package/core/action/field.d.ts.map +1 -1
- package/core/action/general.d.ts +1 -1
- package/core/action/general.d.ts.map +1 -1
- package/core/action/index.d.ts +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 +22 -4
- package/core/constants/field.d.ts.map +1 -1
- package/core/types/action.d.ts +10 -8
- package/core/types/action.d.ts.map +1 -1
- package/core/types/core.d.ts +30 -18
- package/core/types/core.d.ts.map +1 -1
- package/core/utils/field.d.ts +1 -1
- package/core/utils/id-creator.d.ts +1 -1
- package/core/utils/id-creator.d.ts.map +1 -1
- package/core/utils/queries.d.ts +5 -4
- package/core/utils/queries.d.ts.map +1 -1
- package/esm2022/components/cell-editors/abstract-cell-editor.component.mjs +6 -8
- package/esm2022/components/cell-editors/date-time/date-time-editor.component.mjs +3 -3
- package/esm2022/components/cell-editors/link/number-editor.component.mjs +3 -3
- package/esm2022/components/cell-editors/number/number-editor.component.mjs +3 -3
- package/esm2022/components/cell-editors/progress/progress-editor.component.mjs +3 -3
- package/esm2022/components/cell-editors/rating/rating-editor.component.mjs +3 -3
- package/esm2022/components/cell-editors/select/select-editor.component.mjs +37 -27
- package/esm2022/components/cell-editors/text/text-editor.component.mjs +3 -3
- package/esm2022/components/cell-views/select/option.component.mjs +27 -0
- package/esm2022/components/field-menu/field-menu.component.mjs +3 -3
- package/esm2022/components/field-property-editor/field-property-editor.component.mjs +17 -13
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/constants/field.mjs +3 -4
- package/esm2022/core/action/field.mjs +12 -9
- package/esm2022/core/action/general.mjs +45 -32
- package/esm2022/core/action/record.mjs +1 -1
- package/esm2022/core/constants/field.mjs +10 -2
- package/esm2022/core/types/action.mjs +1 -1
- package/esm2022/core/types/core.mjs +8 -1
- package/esm2022/core/utils/field.mjs +3 -3
- package/esm2022/core/utils/id-creator.mjs +4 -10
- package/esm2022/core/utils/queries.mjs +12 -12
- package/esm2022/grid.component.mjs +19 -13
- package/esm2022/pipes/grid.pipe.mjs +67 -7
- package/esm2022/services/event.service.mjs +8 -5
- package/esm2022/services/field.service.mjs +6 -6
- package/esm2022/services/selection.service.mjs +3 -3
- package/esm2022/types/field.mjs +1 -1
- package/esm2022/types/grid.mjs +1 -1
- package/esm2022/utils/build.mjs +4 -27
- package/fesm2022/ai-table-grid.mjs +275 -177
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid.component.d.ts +2 -1
- package/grid.component.d.ts.map +1 -1
- package/package.json +3 -3
- package/pipes/grid.pipe.d.ts +22 -2
- package/pipes/grid.pipe.d.ts.map +1 -1
- package/services/event.service.d.ts +1 -0
- package/services/event.service.d.ts.map +1 -1
- package/services/field.service.d.ts +1 -1
- package/services/field.service.d.ts.map +1 -1
- package/styles/styles.scss +2 -3
- package/types/field.d.ts +4 -1
- package/types/field.d.ts.map +1 -1
- package/types/grid.d.ts +2 -1
- package/types/grid.d.ts.map +1 -1
- package/utils/build.d.ts +2 -3
- package/utils/build.d.ts.map +1 -1
@@ -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,EAAsE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3G,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,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,EAAW,OAAO,EAAE,YAAY,EAAkB,aAAa,EAAE,MAAM,YAAY,CAAC;;AAE3F,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;IAMhB,gBAAgB;IAIhB,YAAY;yCArBM,sBAAsB;2CAAtB,sBAAsB;CAwB3C"}
|
@@ -1,3 +1,6 @@
|
|
1
|
+
@use 'ngx-tethys/styles/variables.scss';
|
2
|
+
@use './progress/progress-editor.component.scss';
|
3
|
+
|
1
4
|
.date-time-cell-editor {
|
2
5
|
.thy-calendar-picker {
|
3
6
|
height: 100%;
|
@@ -16,10 +19,27 @@
|
|
16
19
|
}
|
17
20
|
|
18
21
|
.number-cell-editor {
|
19
|
-
.thy-input-number{
|
22
|
+
.thy-input-number {
|
20
23
|
.input-number-input {
|
21
24
|
border-width: 2px;
|
22
25
|
}
|
23
26
|
}
|
24
|
-
|
27
|
+
}
|
28
|
+
|
29
|
+
.select-cell-editor {
|
30
|
+
&:not(.tag) {
|
31
|
+
.select-control-multiple {
|
32
|
+
.choice-remove-link {
|
33
|
+
.thy-icon-close {
|
34
|
+
color: variables.$gray-700;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
.grid-cell-editor {
|
42
|
+
.select-cell-editor .form-control {
|
43
|
+
height: auto;
|
44
|
+
}
|
25
45
|
}
|
@@ -1,15 +1,14 @@
|
|
1
|
+
import { AITableSelectField } from '../../../types';
|
1
2
|
import { AbstractEditCellEditor } from '../abstract-cell-editor.component';
|
2
|
-
import {
|
3
|
+
import { AITableSelectOptionStyle } from '../../../core';
|
3
4
|
import * as i0 from "@angular/core";
|
4
|
-
export
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
isMultiple: boolean;
|
9
|
-
selectOptions: import("@angular/core").Signal<AITableSelectOption[]>;
|
5
|
+
export declare class SelectCellEditorComponent extends AbstractEditCellEditor<string, AITableSelectField> {
|
6
|
+
selectOptions: import("@angular/core").Signal<import("../../../core").AITableSelectOption[]>;
|
7
|
+
optionStyle: import("@angular/core").Signal<AITableSelectOptionStyle>;
|
8
|
+
AITableSelectOptionStyle: typeof AITableSelectOptionStyle;
|
10
9
|
constructor();
|
11
10
|
updateValue(value: boolean): void;
|
12
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectCellEditorComponent, never>;
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectCellEditorComponent, "
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectCellEditorComponent, "select-cell-editor", never, {}, {}, never, never, true, never>;
|
14
13
|
}
|
15
14
|
//# sourceMappingURL=select-editor.component.d.ts.map
|
@@ -1 +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":"
|
1
|
+
{"version":3,"file":"select-editor.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-editors/select/select-editor.component.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;;AAEzD,qBAuBa,yBAA0B,SAAQ,sBAAsB,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAC7F,aAAa,gFAEV;IAEH,WAAW,2DAER;IAEH,wBAAwB,kCAA4B;;IAMpD,WAAW,CAAC,KAAK,EAAE,OAAO;yCAfjB,yBAAyB;2CAAzB,yBAAyB;CAqBrC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { AITableField, AITableSelectOption, AITableSelectOptionStyle } from '../../../core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class SelectOptionComponent {
|
4
|
+
field: import("@angular/core").InputSignal<AITableField>;
|
5
|
+
displayOption: import("@angular/core").InputSignal<AITableSelectOption>;
|
6
|
+
optionStyle: import("@angular/core").Signal<AITableSelectOptionStyle>;
|
7
|
+
AITableSelectOptionStyle: typeof AITableSelectOptionStyle;
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectOptionComponent, never>;
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectOptionComponent, "select-option", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "displayOption": { "alias": "displayOption"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=option.component.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"option.component.d.ts","sourceRoot":"","sources":["../../../../../packages/grid/src/components/cell-views/select/option.component.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;;AAE5F,qBAUa,qBAAqB;IAC9B,KAAK,oDAAkC;IAEvC,aAAa,2DAAyC;IAEtD,WAAW,2DAER;IAEH,wBAAwB,kCAA4B;yCAT3C,qBAAqB;2CAArB,qBAAqB;CAUjC"}
|
@@ -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
|
-
|
7
|
+
aiEditField: import("@angular/core").ModelSignal<AITableField>;
|
8
8
|
aiTable: AITable;
|
9
9
|
aiExternalTemplate: TemplateRef<any> | null;
|
10
10
|
isUpdate: boolean;
|
@@ -13,18 +13,27 @@ export declare class AITableFieldPropertyEditor {
|
|
13
13
|
name: string;
|
14
14
|
icon: string;
|
15
15
|
width: number;
|
16
|
+
settings?: undefined;
|
17
|
+
} | {
|
18
|
+
type: AITableFieldType;
|
19
|
+
name: string;
|
20
|
+
icon: string;
|
21
|
+
width: number;
|
22
|
+
settings: {
|
23
|
+
is_multiple: boolean;
|
24
|
+
};
|
16
25
|
}>;
|
17
26
|
fieldMaxLength: number;
|
18
27
|
validatorConfig: ThyFormValidatorConfig;
|
19
|
-
selectableFields:
|
28
|
+
selectableFields: Partial<AITableField>[];
|
20
29
|
protected thyPopoverRef: ThyPopoverRef<any, any, any>;
|
21
30
|
constructor();
|
22
31
|
checkUniqueName: (fieldName: string) => import("rxjs").Observable<boolean>;
|
23
|
-
selectFieldType(
|
32
|
+
selectFieldType(field: Partial<AITableField>): void;
|
24
33
|
editFieldProperty(): void;
|
25
34
|
cancel(): void;
|
26
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<AITableFieldPropertyEditor, never>;
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AITableFieldPropertyEditor, "ai-table-field-property-editor", never, { "
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AITableFieldPropertyEditor, "ai-table-field-property-editor", never, { "aiEditField": { "alias": "aiEditField"; "required": true; "isSignal": true; }; "aiTable": { "alias": "aiTable"; "required": true; }; "aiExternalTemplate": { "alias": "aiExternalTemplate"; "required": false; }; "isUpdate": { "alias": "isUpdate"; "required": false; }; }, { "aiEditField": "aiEditFieldChange"; }, never, never, true, never>;
|
28
37
|
static ngAcceptInputType_isUpdate: unknown;
|
29
38
|
}
|
30
39
|
//# 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,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,
|
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,WAAW,oDAAkC;IAElB,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,0BAAU;IAE1B,SAAS,CAAC,aAAa,+BAAqD;;IAI5E,eAAe,cAAe,MAAM,wCAGlC;IAEF,eAAe,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC;IAS5C,iBAAiB;IASjB,MAAM;yCArDG,0BAA0B;2CAA1B,0BAA0B;uCAyDqn/B,OAAQ;CADnq/B"}
|
package/components/index.d.ts
CHANGED
@@ -4,5 +4,6 @@ export * from './cell-editors/number/number-editor.component';
|
|
4
4
|
export * from './cell-editors/progress/progress-editor.component';
|
5
5
|
export * from './cell-editors/rating/rating-editor.component';
|
6
6
|
export * from './cell-editors/text/text-editor.component';
|
7
|
+
export * from './cell-views/select/option.component';
|
7
8
|
export * from './field-property-editor/field-property-editor.component';
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC;AACpE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yDAAyD,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qDAAqD,CAAC;AACpE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,yDAAyD,CAAC"}
|
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,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;
|
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;CAGvD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,oBAAoB,EAA6C,CAAC"}
|
package/core/action/field.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { AIFieldPath, AITable, AITableField } from '../types';
|
1
|
+
import { AIFieldIdPath, AIFieldPath, AITable, AITableField } from '../types';
|
2
2
|
export declare function addField(aiTable: AITable, field: AITableField, path: AIFieldPath): void;
|
3
3
|
export declare function moveField(aiTable: AITable, path: AIFieldPath, newPath: AIFieldPath): void;
|
4
|
-
export declare function removeField(aiTable: AITable, path:
|
5
|
-
export declare function setField(aiTable: AITable, value: Partial<AITableField>, path:
|
4
|
+
export declare function removeField(aiTable: AITable, path: AIFieldIdPath): void;
|
5
|
+
export declare function setField(aiTable: AITable, value: Partial<AITableField>, path: AIFieldIdPath): void;
|
6
6
|
export declare const FieldActions: {
|
7
7
|
addField: typeof addField;
|
8
8
|
moveField: typeof moveField;
|
@@ -1 +1 @@
|
|
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,
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/field.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,aAAa,EACb,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,aAAa,QAMhE;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,aAAa,QA0B3F;AAED,eAAO,MAAM,YAAY;;;;;CAKxB,CAAC"}
|
package/core/action/general.d.ts
CHANGED
@@ -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,
|
1
|
+
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/action/general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,OAAO,EAAE,aAAa,EAA+C,MAAM,UAAU,CAAC;AA2G3G,eAAO,MAAM,cAAc;uBACJ,OAAO,UAAU,aAAa,GAAG,IAAI;CAW3D,CAAC"}
|
package/core/action/index.d.ts
CHANGED
@@ -7,6 +7,6 @@ export declare const Actions: {
|
|
7
7
|
updateFieldValue: typeof import("./record").updateFieldValue;
|
8
8
|
moveRecord: typeof import("./record").moveRecord;
|
9
9
|
removeRecord: typeof import("./record").removeRecord;
|
10
|
-
transform(aiTable: import("@ai-table/grid").AITable,
|
10
|
+
transform(aiTable: import("@ai-table/grid").AITable, action: import("@ai-table/grid").AITableAction): void;
|
11
11
|
};
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/core/action/record.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { AIRecordPath, AITable, AITableRecord,
|
2
|
-
export declare function updateFieldValue(aiTable: AITable, value: any, path:
|
1
|
+
import { AIRecordPath, AITable, AITableRecord, AIFieldValueIdPath, AIRecordIdPath } from '../types';
|
2
|
+
export declare function updateFieldValue(aiTable: AITable, value: any, path: AIFieldValueIdPath): void;
|
3
3
|
export declare function addRecord(aiTable: AITable, record: AITableRecord, path: AIRecordPath): void;
|
4
4
|
export declare function moveRecord(aiTable: AITable, path: AIRecordPath, newPath: AIRecordPath): void;
|
5
|
-
export declare function removeRecord(aiTable: AITable, path:
|
5
|
+
export declare function removeRecord(aiTable: AITable, path: AIRecordIdPath): void;
|
6
6
|
export declare const RecordActions: {
|
7
7
|
addRecord: typeof addRecord;
|
8
8
|
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,EAGH,YAAY,EAEZ,OAAO,EACP,aAAa,EACb,
|
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,kBAAkB,EAGlB,cAAc,EACjB,MAAM,UAAU,CAAC;AAGlB,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,kBAAkB,QAWtF;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,cAAc,QAMlE;AAED,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC"}
|
@@ -1,17 +1,35 @@
|
|
1
|
-
import {
|
2
|
-
export declare const BasicFields: {
|
1
|
+
import { AITableField, AITableFieldType } from '../types';
|
2
|
+
export declare const BasicFields: ({
|
3
3
|
type: AITableFieldType;
|
4
4
|
name: string;
|
5
5
|
icon: string;
|
6
6
|
width: number;
|
7
|
-
|
8
|
-
|
7
|
+
settings?: undefined;
|
8
|
+
} | {
|
9
|
+
type: AITableFieldType;
|
10
|
+
name: string;
|
11
|
+
icon: string;
|
12
|
+
width: number;
|
13
|
+
settings: {
|
14
|
+
is_multiple: boolean;
|
15
|
+
};
|
16
|
+
})[];
|
17
|
+
export declare const Fields: Partial<AITableField>[];
|
9
18
|
export declare const FieldsMap: {
|
10
19
|
[key: string]: {
|
11
20
|
type: AITableFieldType;
|
12
21
|
name: string;
|
13
22
|
icon: string;
|
14
23
|
width: number;
|
24
|
+
settings?: undefined;
|
25
|
+
} | {
|
26
|
+
type: AITableFieldType;
|
27
|
+
name: string;
|
28
|
+
icon: string;
|
29
|
+
width: number;
|
30
|
+
settings: {
|
31
|
+
is_multiple: boolean;
|
32
|
+
};
|
15
33
|
};
|
16
34
|
};
|
17
35
|
//# 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":"AACA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/constants/field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE1D,eAAO,MAAM,WAAW;;;;;;;;;;;;;;IAqFvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,EAAqB,CAAC;AAEhE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;CAA0C,CAAC"}
|
package/core/types/action.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
import { AITableField, AITableRecord } from './core';
|
2
2
|
export type AIRecordPath = [number];
|
3
|
+
export type AIRecordIdPath = [string];
|
3
4
|
export type AIFieldPath = [number];
|
4
|
-
export type
|
5
|
-
export type
|
5
|
+
export type AIFieldIdPath = [string];
|
6
|
+
export type AIFieldValueIdPath = [string, string];
|
7
|
+
export type Path = AIRecordPath | AIFieldPath | AIFieldIdPath | AIRecordIdPath | AIFieldValueIdPath;
|
6
8
|
export declare enum ActionName {
|
7
9
|
UpdateFieldValue = "update_field_value",
|
8
10
|
AddRecord = "add_record",
|
@@ -20,7 +22,7 @@ export declare enum ExecuteType {
|
|
20
22
|
}
|
21
23
|
export type UpdateFieldValueAction = {
|
22
24
|
type: ActionName.UpdateFieldValue;
|
23
|
-
path:
|
25
|
+
path: AIFieldValueIdPath;
|
24
26
|
fieldValue: any;
|
25
27
|
newFieldValue: any;
|
26
28
|
};
|
@@ -46,17 +48,17 @@ export type MoveRecordAction = {
|
|
46
48
|
};
|
47
49
|
export type RemoveFieldAction = {
|
48
50
|
type: ActionName.RemoveField;
|
49
|
-
path:
|
51
|
+
path: AIFieldIdPath;
|
50
52
|
};
|
51
53
|
export type RemoveRecordAction = {
|
52
54
|
type: ActionName.RemoveRecord;
|
53
|
-
path:
|
55
|
+
path: AIRecordIdPath;
|
54
56
|
};
|
55
57
|
export type SetFieldAction = {
|
56
58
|
type: ActionName.SetField;
|
57
|
-
path:
|
58
|
-
|
59
|
-
|
59
|
+
path: AIFieldIdPath;
|
60
|
+
properties: Partial<AITableField>;
|
61
|
+
newProperties: Partial<AITableField>;
|
60
62
|
};
|
61
63
|
export type AITableAction = UpdateFieldValueAction | AddRecordAction | AddFieldAction | RemoveRecordAction | RemoveFieldAction | SetFieldAction | MoveFieldAction | MoveRecordAction;
|
62
64
|
//# 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,
|
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,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC;AAEtC,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,CAAC,CAAC;AAEnC,MAA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B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7B,IAAI,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,IAAI,EAAE,UAAU,CAAC,YAAY,CAAC;IAC9B,IAAI,EAAE,cAAc,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAClC,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC,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
@@ -37,14 +37,7 @@ export declare enum AITableStatType {
|
|
37
37
|
PercentChecked = 16,
|
38
38
|
PercentUnChecked = 17
|
39
39
|
}
|
40
|
-
export interface
|
41
|
-
_id: string;
|
42
|
-
text: string;
|
43
|
-
color?: string;
|
44
|
-
bg_color?: string;
|
45
|
-
[key: string]: any;
|
46
|
-
}
|
47
|
-
export interface AITableField<T = unknown> {
|
40
|
+
export interface AITableField {
|
48
41
|
_id: string;
|
49
42
|
name: string;
|
50
43
|
type: AITableFieldType;
|
@@ -52,10 +45,35 @@ export interface AITableField<T = unknown> {
|
|
52
45
|
width?: number;
|
53
46
|
hidden?: boolean;
|
54
47
|
frozen?: boolean;
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
48
|
+
stat_type?: AITableStatType;
|
49
|
+
settings?: AITableFieldSettings;
|
50
|
+
}
|
51
|
+
export type AITableFieldSettings = TextSettings | RichTextSettings | SelectSettings | MemberSettings;
|
52
|
+
export interface TextSettings {
|
53
|
+
}
|
54
|
+
export interface RichTextSettings {
|
55
|
+
}
|
56
|
+
export interface SelectSettings extends IsMultiple {
|
57
|
+
option_style?: AITableSelectOptionStyle;
|
58
|
+
options: AITableSelectOption[];
|
59
|
+
}
|
60
|
+
export interface MemberSettings extends IsMultiple {
|
61
|
+
}
|
62
|
+
export interface IsMultiple {
|
63
|
+
is_multiple?: boolean;
|
64
|
+
}
|
65
|
+
export interface AITableSelectOption {
|
66
|
+
_id: string;
|
67
|
+
text: string;
|
68
|
+
icon?: string;
|
69
|
+
color?: string;
|
70
|
+
bg_color?: string;
|
71
|
+
}
|
72
|
+
export declare enum AITableSelectOptionStyle {
|
73
|
+
text = "text",
|
74
|
+
tag = "tag",
|
75
|
+
dot = "dot",
|
76
|
+
piece = "piece"
|
59
77
|
}
|
60
78
|
export type TextFieldValue = string;
|
61
79
|
export type SelectFieldValue = Id[];
|
@@ -90,11 +108,5 @@ export interface AITableChangeOptions {
|
|
90
108
|
fields: AITableField[];
|
91
109
|
actions: AITableAction[];
|
92
110
|
}
|
93
|
-
export interface AITableFieldInfo {
|
94
|
-
type: AITableFieldType;
|
95
|
-
name: string;
|
96
|
-
icon: string;
|
97
|
-
width: number;
|
98
|
-
}
|
99
111
|
export type AIPlugin = (aiTable: AITable) => AITable;
|
100
112
|
//# 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,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,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;IACb,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;CAC3B;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,
|
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,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,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;IACb,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;CAC3B;AAED,oBAAY,eAAe;IACvB,IAAI,IAA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AC;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,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC"}
|
package/core/utils/field.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { AITable, AITableField, AITableFieldType } from '../types';
|
2
|
-
export declare function getDefaultFieldValue(field: AITableField):
|
2
|
+
export declare function getDefaultFieldValue(field: AITableField): never[] | "";
|
3
3
|
export declare function createDefaultFieldName(aiTable: AITable, type?: AITableFieldType): string;
|
4
4
|
export declare function createDefaultField(aiTable: AITable, type?: AITableFieldType): {
|
5
5
|
_id: string;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function idCreator(
|
1
|
+
export declare function idCreator(): string;
|
2
2
|
//# sourceMappingURL=id-creator.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"id-creator.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/utils/id-creator.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"id-creator.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/utils/id-creator.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,WAExB"}
|
package/core/utils/queries.d.ts
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { AITable, AITableField, AITableRecord, AIFieldValueIdPath, AIRecordPath, AIFieldPath, AIFieldIdPath } from '../types';
|
2
2
|
export declare const AITableQueries: {
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
findRecordPath(aiTable: AITable, record: AITableRecord): AIRecordPath;
|
4
|
+
findFieldPath(aiTable: AITable, field: AITableField): AIFieldPath;
|
5
|
+
getFieldValue(aiTable: AITable, path: AIFieldValueIdPath): any;
|
6
|
+
getField(aiTable: AITable, path: AIFieldIdPath): AITableField | undefined;
|
6
7
|
getRecord(aiTable: AITable, path: AIRecordPath): AITableRecord;
|
7
8
|
};
|
8
9
|
//# 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,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9H,eAAO,MAAM,cAAc;4BACC,OAAO,UAAU,aAAa;2BAO/B,OAAO,SAAS,YAAY;2BAO5B,OAAO,6BAA6B,GAAG;sBAoB5C,OAAO,wBAAwB,YAAY,GAAG,SAAS;uBAUtD,OAAO,uBAAuB,aAAa;CASjE,CAAC"}
|
@@ -10,21 +10,19 @@ export class AbstractEditCellEditor {
|
|
10
10
|
}
|
11
11
|
ngOnInit() {
|
12
12
|
this.modelValue = computed(() => {
|
13
|
-
|
14
|
-
return AITableQueries.getFieldValue(this.aiTable, path);
|
13
|
+
return AITableQueries.getFieldValue(this.aiTable, [this.record()._id, this.field()._id]);
|
15
14
|
})();
|
16
15
|
}
|
17
16
|
updateFieldValue() {
|
18
|
-
|
19
|
-
Actions.updateFieldValue(this.aiTable, this.modelValue, path);
|
17
|
+
Actions.updateFieldValue(this.aiTable, this.modelValue, [this.record()._id, this.field()._id]);
|
20
18
|
}
|
21
19
|
closePopover() {
|
22
20
|
this.thyPopoverRef?.close();
|
23
21
|
}
|
24
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
25
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: AbstractEditCellEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.4", 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 }); }
|
26
24
|
}
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: AbstractEditCellEditor, decorators: [{
|
28
26
|
type: Component,
|
29
27
|
args: [{
|
30
28
|
selector: 'abstract-edit-cell',
|
@@ -36,4 +34,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
36
34
|
type: Input,
|
37
35
|
args: [{ required: true }]
|
38
36
|
}] } });
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3QtY2VsbC1lZGl0b3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZ3JpZC9zcmMvY29tcG9uZW50cy9jZWxsLWVkaXRvcnMvYWJzdHJhY3QtY2VsbC1lZGl0b3IuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1Qk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HMgT25Jbml0IHtcbiAgICBmaWVsZCA9IGlucHV0LnJlcXVpcmVkPFRGaWVsZFR5cGU+KCk7XG5cbiAgICByZWNvcmQgPSBpbnB1dC5yZXF1aXJlZDxBSVRhYmxlUmVjb3JkPigpO1xuXG4gICAgQElucHV0KHsgcmVxdWlyZWQ6IHRydWUgfSkgYWlUYWJsZSE6IEFJVGFibGU7XG5cbiAgICBtb2RlbFZhbHVlITogVFZhbHVlO1xuXG4gICAgcHJvdGVjdGVkIHRoeVBvcG92ZXJSZWYgPSBpbmplY3QoVGh5UG9wb3ZlclJlZjxBYnN0cmFjdEVkaXRDZWxsRWRpdG9yPFRWYWx1ZT4+KTtcblxuICAgIG5nT25Jbml0KCk6IHZvaWQge1xuICAgICAgICB0aGlzLm1vZGVsVmFsdWUgPSBjb21wdXRlZCgoKSA9PiB7XG4gICAgICAgICAgICByZXR1cm4gQUlUYWJsZVF1ZXJpZXMuZ2V0RmllbGRWYWx1ZSh0aGlzLmFpVGFibGUsIFt0aGlzLnJlY29yZCgpLl9pZCwgdGhpcy5maWVsZCgpLl9pZF0pO1xuICAgICAgICB9KSgpO1xuICAgIH1cblxuICAgIHVwZGF0ZUZpZWxkVmFsdWUoKSB7XG4gICAgICAgIEFjdGlvbnMudXBkYXRlRmllbGRWYWx1ZSh0aGlzLmFpVGFibGUsIHRoaXMubW9kZWxWYWx1ZSwgW3RoaXMucmVjb3JkKCkuX2lkLCB0aGlzLmZpZWxkKCkuX2lkXSk7XG4gICAgfVxuXG4gICAgY2xvc2VQb3BvdmVyKCkge1xuICAgICAgICB0aGlzLnRoeVBvcG92ZXJSZWY/LmNsb3NlKCk7XG4gICAgfVxufVxuIl19
|
@@ -31,8 +31,8 @@ export class DateTimeCellEditorComponent extends AbstractEditCellEditor {
|
|
31
31
|
this.closePopover();
|
32
32
|
}
|
33
33
|
}
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: DateTimeCellEditorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.4", type: DateTimeCellEditorComponent, isStandalone: true, selector: "date-time-cell-editor", inputs: { dateShowTime: { classPropertyName: "dateShowTime", publicName: "dateShowTime", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "date-time-cell-editor" }, usesInheritance: true, ngImport: i0, template: `
|
36
36
|
<thy-date-picker
|
37
37
|
class="h-100"
|
38
38
|
thyTimestampPrecision="milliseconds"
|
@@ -50,7 +50,7 @@ export class DateTimeCellEditorComponent extends AbstractEditCellEditor {
|
|
50
50
|
</thy-date-picker>
|
51
51
|
`, 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: "component", type: ThyDatePicker, selector: "thy-date-picker", exportAs: ["thyDatePicker"] }, { kind: "ngmodule", type: ThyTimePickerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
52
52
|
}
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: DateTimeCellEditorComponent, decorators: [{
|
54
54
|
type: Component,
|
55
55
|
args: [{
|
56
56
|
selector: 'date-time-cell-editor',
|
@@ -9,10 +9,10 @@ export class LinkCellEditorComponent extends AbstractEditCellEditor {
|
|
9
9
|
this.updateFieldValue();
|
10
10
|
this.closePopover();
|
11
11
|
}
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: LinkCellEditorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
13
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: LinkCellEditorComponent, isStandalone: true, selector: "link-cell-editor", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
14
14
|
}
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: LinkCellEditorComponent, decorators: [{
|
16
16
|
type: Component,
|
17
17
|
args: [{
|
18
18
|
selector: 'link-cell-editor',
|
@@ -10,8 +10,8 @@ export class NumberCellEditorComponent extends AbstractEditCellEditor {
|
|
10
10
|
this.updateFieldValue();
|
11
11
|
this.closePopover();
|
12
12
|
}
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
14
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: NumberCellEditorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
14
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: NumberCellEditorComponent, isStandalone: true, selector: "number-cell-editor", host: { classAttribute: "number-cell-editor" }, usesInheritance: true, ngImport: i0, template: `<thy-input-number
|
15
15
|
class="h-100"
|
16
16
|
[thyAutoFocus]="true"
|
17
17
|
[(ngModel)]="modelValue"
|
@@ -19,7 +19,7 @@ export class NumberCellEditorComponent extends AbstractEditCellEditor {
|
|
19
19
|
(thyBlur)="updateValue()"
|
20
20
|
/> `, 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", "thyStepChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
21
21
|
}
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: NumberCellEditorComponent, decorators: [{
|
23
23
|
type: Component,
|
24
24
|
args: [{
|
25
25
|
selector: 'number-cell-editor',
|
@@ -26,8 +26,8 @@ export class ProgressEditorComponent extends AbstractEditCellEditor {
|
|
26
26
|
updateValue(value) {
|
27
27
|
this.updateFieldValue();
|
28
28
|
}
|
29
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.
|
30
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ProgressEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: ProgressEditorComponent, isStandalone: true, selector: "progress-editor", host: { listeners: { "mousedown": "mousedownHandler($event)" }, properties: { "attr.type": "field().type", "attr.fieldId": "field()._id", "attr.recordId": "record()._id" }, classAttribute: "grid-cell progress-editor" }, usesInheritance: true, ngImport: i0, template: `
|
31
31
|
<thy-slider
|
32
32
|
[(ngModel)]="modelValue"
|
33
33
|
[thyMax]="config?.max || 100"
|
@@ -41,7 +41,7 @@ export class ProgressEditorComponent extends AbstractEditCellEditor {
|
|
41
41
|
<span class="progress-text">{{ modelValue }}{{ config?.suffix || '%' }}</span>
|
42
42
|
`, 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: "component", type: ThySlider, selector: "thy-slider", inputs: ["thyVertical", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyType", "thyColor", "thySize"], outputs: ["thyAfterChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
43
43
|
}
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ProgressEditorComponent, decorators: [{
|
45
45
|
type: Component,
|
46
46
|
args: [{
|
47
47
|
selector: 'progress-editor',
|