@acorex/platform 19.2.12 → 19.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auth/lib/session.service.d.ts +8 -2
- package/common/index.d.ts +0 -1
- package/common/lib/app/application.types.d.ts +2 -2
- package/common/lib/common.module.d.ts +1 -2
- package/common/lib/data/index.d.ts +0 -4
- package/common/lib/file-type/file-type.provider.d.ts +3 -3
- package/common/lib/file-type/file-type.types.d.ts +12 -0
- package/common/lib/layout/menu/menu.types.d.ts +3 -2
- package/common/lib/layout/theme/components/slots/navbar-slot.component.d.ts +2 -4
- package/common/lib/search/search.types.d.ts +3 -5
- package/common/lib/settings/settings.service.d.ts +1 -1
- package/common/lib/utils/index.d.ts +0 -1
- package/common/lib/utils/regional-util.service.d.ts +2 -2
- package/core/index.d.ts +1 -5
- package/core/lib/data/data-generator.d.ts +26 -0
- package/core/lib/data/index.d.ts +1 -0
- package/core/lib/directives/element-data.directive.d.ts +20 -0
- package/core/lib/directives/index.d.ts +1 -0
- package/core/lib/event-service/event.service.d.ts +43 -0
- package/core/lib/event-service/index.d.ts +1 -0
- package/{common/lib/utils → core/lib/expression-evaluator}/expression-evaluator.service.d.ts +1 -1
- package/core/lib/expression-evaluator/index.d.ts +1 -0
- package/core/lib/index.d.ts +6 -0
- package/core/lib/types.d.ts +17 -0
- package/core/lib/utils/data-conditioner.d.ts +5 -0
- package/core/lib/utils/index.d.ts +4 -0
- package/fesm2022/acorex-platform-auth.mjs +53 -17
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +606 -869
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +364 -12
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +14 -3
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +99 -52
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +673 -34
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-search.mjs +4 -3
- package/fesm2022/acorex-platform-layout-search.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs +4 -3
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DrHsaotw.mjs → acorex-platform-themes-default-entity-master-list-view.component-ewOei4ta.mjs} +11 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-ewOei4ta.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BGUrwL2P.mjs → acorex-platform-themes-default-entity-master-single-view.component-DcSk0ia4.mjs} +2 -2
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BGUrwL2P.mjs.map → acorex-platform-themes-default-entity-master-single-view.component-DcSk0ia4.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-search-popup.component-Ccouaqp4.mjs → acorex-platform-themes-default-search-popup.component-DfeNmpS9.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-search-popup.component-Ccouaqp4.mjs.map → acorex-platform-themes-default-search-popup.component-DfeNmpS9.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-setting-page.component-CJoBVXTl.mjs → acorex-platform-themes-default-setting-page.component-DtJmPSFo.mjs} +5 -4
- package/fesm2022/acorex-platform-themes-default-setting-page.component-DtJmPSFo.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-setting-view.component-CsCug3Vu.mjs → acorex-platform-themes-default-setting-view.component-fuHM7W6Y.mjs} +2 -2
- package/fesm2022/{acorex-platform-themes-default-setting-view.component-CsCug3Vu.mjs.map → acorex-platform-themes-default-setting-view.component-fuHM7W6Y.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-theme-palette-preview.page-D-yzbISw.mjs → acorex-platform-themes-default-theme-palette-preview.page-DkjAgWLn.mjs} +2 -2
- package/fesm2022/{acorex-platform-themes-default-theme-palette-preview.page-D-yzbISw.mjs.map → acorex-platform-themes-default-theme-palette-preview.page-DkjAgWLn.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +36 -24
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +27 -4
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-Ba_DdBAl.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-Emh145xN.mjs} +3 -3
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-Ba_DdBAl.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-Emh145xN.mjs.map} +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +1083 -98
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +17 -8
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/lib/builder/datasource-provider.service.d.ts +2 -2
- package/layout/builder/lib/builder/metadata/metadata.types.d.ts +2 -1
- package/layout/builder/lib/builder/widget-map.d.ts +5 -0
- package/layout/builder/lib/builder/widget.types.d.ts +1 -1
- package/layout/designer/lib/designer/designer.component.d.ts +2 -1
- package/layout/designer/lib/designer/shared/designer.service.d.ts +8 -4
- package/layout/designer/lib/designer/shared/designer.types.d.ts +24 -0
- package/layout/designer/lib/preview/preview-viewer.component.d.ts +5 -1
- package/layout/designer/lib/preview/preview.component.d.ts +2 -1
- package/layout/entity/lib/entity-master-create.viewmodel.d.ts +1 -0
- package/{common/lib/data → layout/entity/lib}/entity-storage-service.d.ts +1 -0
- package/layout/entity/lib/index.d.ts +4 -0
- package/layout/entity/lib/widgets/tagable-box/index.d.ts +6 -0
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-column.component.d.ts +11 -0
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-edit.component.d.ts +19 -0
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-filter.component.d.ts +6 -0
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-print.component.d.ts +11 -0
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget-view.component.d.ts +11 -0
- package/layout/entity/lib/widgets/tagable-box/tagable-box-widget.config.d.ts +7 -0
- package/package.json +1 -1
- package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +2 -0
- package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +5 -0
- package/themes/shared/lib/components/layout-elements/index.d.ts +1 -0
- package/themes/shared/lib/components/layout-elements/layout-blocks.component.d.ts +1 -1
- package/themes/shared/lib/components/layout-elements/layout-tool-bar.component.d.ts +5 -0
- package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +2 -1
- package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +4 -2
- package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget-edit.component.d.ts +8 -0
- package/widgets/lib/widgets/editors/meta-data/index.d.ts +6 -0
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-column.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-edit.component.d.ts +13 -0
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-filter.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-print.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget-view.component.d.ts +8 -0
- package/widgets/lib/widgets/editors/meta-data/meta-data-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/editors/number-unit/index.d.ts +6 -0
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-column.component.d.ts +9 -0
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-edit.component.d.ts +24 -0
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-filter.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-print.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget-view.component.d.ts +12 -0
- package/widgets/lib/widgets/editors/number-unit/number-unit-box-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/single-file-box/index.d.ts +6 -0
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-column.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-edit.component.d.ts +19 -0
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-filter.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-print.component.d.ts +6 -0
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-view.component.d.ts +8 -0
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/index.d.ts +1 -0
- package/workflow/lib/actions/decide.action.d.ts +7 -0
- package/workflow/lib/workflow.service.d.ts +0 -1
- package/common/lib/store/common.actions.d.ts +0 -2
- package/common/lib/store/index.d.ts +0 -1
- package/core/utils/data-conditioner.d.ts +0 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DrHsaotw.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-setting-page.component-CJoBVXTl.mjs.map +0 -1
- /package/core/{utils → lib/utils}/countdown-timer.d.ts +0 -0
- /package/core/{utils → lib/utils}/highlighter.d.ts +0 -0
- /package/core/{utils → lib/utils}/html-utils.d.ts +0 -0
- /package/{common/lib/data → layout/entity/lib}/data.types.d.ts +0 -0
- /package/{common/lib/data → layout/entity/lib}/dexie-storage.service.d.ts +0 -0
- /package/{common/lib/data → layout/entity/lib}/entity-data-seeder.d.ts +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { applySortArray, applyFilterArray, AXPExpressionEvaluatorService } from '@acorex/platform/core';
|
|
2
|
+
import Dexie from 'dexie';
|
|
3
|
+
import * as i1$4 from '@acorex/platform/common';
|
|
4
|
+
import { AXPDataGenerator, resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingService, AXPRefreshEvent, AXPSettingScope, AXPWorkflowNavigateAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPToastAction } from '@acorex/platform/common';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { InjectionToken, inject, Injectable, computed, signal, Injector, effect, Component, ChangeDetectionStrategy, HostBinding, DestroyRef, ViewChild, NgModule } from '@angular/core';
|
|
7
|
+
import * as i2 from '@acorex/components/common';
|
|
2
8
|
import { AXDataSource, AXCommonModule } from '@acorex/components/common';
|
|
3
9
|
import { AXFormatService } from '@acorex/core/format';
|
|
4
|
-
import * as
|
|
5
|
-
import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPExpressionEvaluatorService, AXPEntityCommandScope, getEntityInfo, AXPSettingService, AXPRefreshEvent, AXPSettingScope, AXPWorkflowNavigateAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPToastAction } from '@acorex/platform/common';
|
|
6
|
-
import * as i2$3 from '@acorex/platform/workflow';
|
|
10
|
+
import * as i2$2 from '@acorex/platform/workflow';
|
|
7
11
|
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
8
|
-
import * as i0 from '@angular/core';
|
|
9
|
-
import { InjectionToken, inject, Injectable, computed, signal, Injector, effect, Component, ChangeDetectionStrategy, HostBinding, DestroyRef, ViewChild, NgModule } from '@angular/core';
|
|
10
12
|
import { get, cloneDeep, set, merge, isNil, sortBy } from 'lodash-es';
|
|
11
13
|
import * as i7 from '@acorex/platform/layout/builder';
|
|
12
14
|
import { AXPPageStatus, AXPWidgetRegistryService, AXPWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXP_WIDGETS_EDITOR_GROUP, AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
|
|
@@ -22,9 +24,9 @@ import { AXPlatform } from '@acorex/core/platform';
|
|
|
22
24
|
import { RouterModule, ROUTES } from '@angular/router';
|
|
23
25
|
import * as i1 from '@acorex/components/loading';
|
|
24
26
|
import { AXLoadingModule } from '@acorex/components/loading';
|
|
25
|
-
import * as i1$
|
|
27
|
+
import * as i1$2 from '@angular/common';
|
|
26
28
|
import { CommonModule } from '@angular/common';
|
|
27
|
-
import * as
|
|
29
|
+
import * as i1$1 from '@acorex/components/badge';
|
|
28
30
|
import { AXBadgeModule } from '@acorex/components/badge';
|
|
29
31
|
import * as i3 from '@acorex/components/button';
|
|
30
32
|
import { AXButtonModule } from '@acorex/components/button';
|
|
@@ -32,11 +34,12 @@ import * as i4 from '@acorex/components/decorators';
|
|
|
32
34
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
33
35
|
import * as i6$1 from '@acorex/components/form';
|
|
34
36
|
import { AXFormModule } from '@acorex/components/form';
|
|
37
|
+
import * as i5$1 from '@acorex/components/select-box';
|
|
35
38
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
36
|
-
import * as i2$
|
|
39
|
+
import * as i2$1 from '@acorex/components/text-box';
|
|
37
40
|
import { AXTextBoxComponent, AXTextBoxModule } from '@acorex/components/text-box';
|
|
38
41
|
import { AXValidationModule } from '@acorex/core/validation';
|
|
39
|
-
import * as i1$
|
|
42
|
+
import * as i1$3 from '@angular/forms';
|
|
40
43
|
import { FormsModule } from '@angular/forms';
|
|
41
44
|
import * as i5 from '@acorex/components/data-table';
|
|
42
45
|
import { AXDataTableModule } from '@acorex/components/data-table';
|
|
@@ -47,6 +50,157 @@ import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
|
47
50
|
import { AXP_DISABLED_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_NAME_PROPERTY } from '@acorex/platform/widgets';
|
|
48
51
|
import { AXPWidgetPropertyViewerComponent } from '@acorex/platform/layout/designer';
|
|
49
52
|
|
|
53
|
+
class AXPDexieEntityStorageService extends Dexie {
|
|
54
|
+
constructor() {
|
|
55
|
+
super('ACoreXPlatform');
|
|
56
|
+
this.version(1).stores({
|
|
57
|
+
'entity-store': '++id, entityName, [entityName+id]',
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
get dbName() {
|
|
61
|
+
return 'ACoreXPlatform';
|
|
62
|
+
}
|
|
63
|
+
async initial(entityName, collection) {
|
|
64
|
+
const exists = await this.table('entity-store').where({ entityName }).count();
|
|
65
|
+
if (exists === 0) {
|
|
66
|
+
await this.table('entity-store').bulkAdd(collection.map((item) => ({ ...item, entityName })));
|
|
67
|
+
}
|
|
68
|
+
return collection;
|
|
69
|
+
}
|
|
70
|
+
async getOne(entityName, id) {
|
|
71
|
+
return await this.table('entity-store').where({ entityName, id: id }).first();
|
|
72
|
+
}
|
|
73
|
+
async updateOne(entityName, id, keyValue) {
|
|
74
|
+
await this.table('entity-store').where({ entityName, id: id }).modify(keyValue);
|
|
75
|
+
return await this.getOne(entityName, id);
|
|
76
|
+
}
|
|
77
|
+
async deleteOne(entityName, id) {
|
|
78
|
+
await this.table('entity-store').where({ entityName, id: id }).delete();
|
|
79
|
+
}
|
|
80
|
+
async insertOne(entityName, entity) {
|
|
81
|
+
const uuid = AXPDataGenerator.uuid();
|
|
82
|
+
await this.table('entity-store').add({ ...entity, id: uuid, entityName });
|
|
83
|
+
return uuid;
|
|
84
|
+
}
|
|
85
|
+
async getAll(entityName) {
|
|
86
|
+
return await this.table('entity-store').where({ entityName }).toArray();
|
|
87
|
+
}
|
|
88
|
+
async query(entityName, request) {
|
|
89
|
+
let result = await this.table('entity-store').where({ entityName }).toArray();
|
|
90
|
+
if (request.sort && request.sort.length) {
|
|
91
|
+
result = applySortArray(result, request.sort);
|
|
92
|
+
}
|
|
93
|
+
result = applyFilterArray(result, request.filter ? [request.filter] : []);
|
|
94
|
+
return Promise.resolve({
|
|
95
|
+
total: result.length,
|
|
96
|
+
items: result.slice(request.skip, (request.skip ?? 0) + (request.take ?? 0)),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// export class AXPDexieTableStorageService extends Dexie implements AXPEntityStorageService {
|
|
101
|
+
// private schemaUpdateLock: Promise<void> = Promise.resolve();
|
|
102
|
+
// constructor() {
|
|
103
|
+
// super('ACoreXPlatform');
|
|
104
|
+
// // Initial empty version
|
|
105
|
+
// //this.version(1).stores({});
|
|
106
|
+
// }
|
|
107
|
+
// // Function to change the schema dynamically
|
|
108
|
+
// private async changeSchema(schemaChanges: { [tableName: string]: string | null }): Promise<void> {
|
|
109
|
+
// // Acquire schema update lock to ensure no other operations are performed while schema is changing
|
|
110
|
+
// this.schemaUpdateLock = this.schemaUpdateLock.then(async () => {
|
|
111
|
+
// console.log('Attempting schema change with:', schemaChanges);
|
|
112
|
+
// try {
|
|
113
|
+
// this.close();
|
|
114
|
+
// const newDb = new Dexie(this.name);
|
|
115
|
+
// // Extract current schema in Dexie format
|
|
116
|
+
// const currentSchema = this.tables.reduce((result, { name, schema }) => {
|
|
117
|
+
// result[name] = [schema.primKey.src, ...schema.indexes.map((idx) => idx.src)].join(',');
|
|
118
|
+
// return result;
|
|
119
|
+
// }, {} as { [tableName: string]: string });
|
|
120
|
+
// console.log('Current Schema:', currentSchema);
|
|
121
|
+
// // Define current schema version
|
|
122
|
+
// newDb.version(this.verno + 10).stores(currentSchema);
|
|
123
|
+
// // Define new schema version with schema changes
|
|
124
|
+
// const nextVersion = this.verno + 1;
|
|
125
|
+
// newDb.version(nextVersion).stores(schemaChanges);
|
|
126
|
+
// await newDb.open();
|
|
127
|
+
// // Reassign updated db instance
|
|
128
|
+
// Object.assign(this, newDb);
|
|
129
|
+
// console.log(`Schema updated. Current version: ${this.verno}`);
|
|
130
|
+
// } catch (error) {
|
|
131
|
+
// console.error('Error during schema change:', error);
|
|
132
|
+
// throw error;
|
|
133
|
+
// }
|
|
134
|
+
// });
|
|
135
|
+
// // Wait for schema change lock to complete
|
|
136
|
+
// await this.schemaUpdateLock;
|
|
137
|
+
// }
|
|
138
|
+
// private async ensureInitialized(entityName: string): Promise<void> {
|
|
139
|
+
// if (this.tables.findIndex((table) => table.name === entityName) == -1) {
|
|
140
|
+
// const schemaChanges: { [tableName: string]: string } = {};
|
|
141
|
+
// schemaChanges[entityName] = '++id';
|
|
142
|
+
// await this.changeSchema(schemaChanges);
|
|
143
|
+
// }
|
|
144
|
+
// }
|
|
145
|
+
// get dbName(): string {
|
|
146
|
+
// return 'ACoreXPlatform';
|
|
147
|
+
// }
|
|
148
|
+
// private async getTable<T>(entityName: string) {
|
|
149
|
+
// await this.ensureInitialized(entityName);
|
|
150
|
+
// return this.table<T, number>(entityName);
|
|
151
|
+
// }
|
|
152
|
+
// async initial<T = any>(entityName: string, collection: T[]): Promise<void> {
|
|
153
|
+
// const table = await this.getTable<T>(entityName);
|
|
154
|
+
// const exists = await table.count();
|
|
155
|
+
// if (exists === 0) {
|
|
156
|
+
// await table.bulkAdd(collection);
|
|
157
|
+
// }
|
|
158
|
+
// }
|
|
159
|
+
// async getOne<T = any>(entityName: string, id: string): Promise<T> {
|
|
160
|
+
// const table = await this.getTable<T>(entityName);
|
|
161
|
+
// return (await table.where({ id: parseInt(id) }).first()) as T;
|
|
162
|
+
// }
|
|
163
|
+
// async updateOne(entityName: string, id: string, keyValue: { [key: string]: any }): Promise<void> {
|
|
164
|
+
// const table = await this.getTable(entityName);
|
|
165
|
+
// await table.update(parseInt(id), keyValue);
|
|
166
|
+
// }
|
|
167
|
+
// async deleteOne(entityName: string, id: string): Promise<void> {
|
|
168
|
+
// const table = await this.getTable(entityName);
|
|
169
|
+
// await table.delete(parseInt(id));
|
|
170
|
+
// }
|
|
171
|
+
// async insertOne<T = any>(entityName: string, entity: T): Promise<void> {
|
|
172
|
+
// const table = await this.getTable<T>(entityName);
|
|
173
|
+
// await table.add(entity);
|
|
174
|
+
// }
|
|
175
|
+
// async getAll<T = any>(entityName: string): Promise<T[]> {
|
|
176
|
+
// const table = await this.getTable<T>(entityName);
|
|
177
|
+
// return await table.toArray();
|
|
178
|
+
// }
|
|
179
|
+
// }
|
|
180
|
+
|
|
181
|
+
const AXP_DATA_SEEDER_TOKEN = new InjectionToken('AXP_DATA_SEEDER_TOKEN');
|
|
182
|
+
class AXPDataSeederService {
|
|
183
|
+
constructor() {
|
|
184
|
+
this.loader = inject(AXP_DATA_SEEDER_TOKEN, { optional: true });
|
|
185
|
+
}
|
|
186
|
+
async seed() {
|
|
187
|
+
if (Array.isArray(this.loader)) {
|
|
188
|
+
for (const loader of this.loader) {
|
|
189
|
+
await loader.seed();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
await this.loader?.seed();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataSeederService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
197
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataSeederService, providedIn: 'root' }); }
|
|
198
|
+
}
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPDataSeederService, decorators: [{
|
|
200
|
+
type: Injectable,
|
|
201
|
+
args: [{ providedIn: 'root' }]
|
|
202
|
+
}] });
|
|
203
|
+
|
|
50
204
|
const AXP_ENTITY_CONFIG_TOKEN = new InjectionToken('AXP_ENTITY_CONFIG_TOKEN');
|
|
51
205
|
const AXP_ENTITY_DEFINITION_LOADER = new InjectionToken('AXP_ENTITY_DEFINITION_PROVIDER');
|
|
52
206
|
class AXPEntityResolver {
|
|
@@ -156,7 +310,7 @@ class AXPEntityDetailListViewModel {
|
|
|
156
310
|
},
|
|
157
311
|
},
|
|
158
312
|
};
|
|
159
|
-
return await this.expressionEvaluator.
|
|
313
|
+
return await this.expressionEvaluator.evaluate(this.detailEntityConfig.hidden, scope);
|
|
160
314
|
}
|
|
161
315
|
else {
|
|
162
316
|
return this.detailEntityConfig.hidden ?? false;
|
|
@@ -228,7 +382,7 @@ class AXPEntityDetailListViewModel {
|
|
|
228
382
|
},
|
|
229
383
|
},
|
|
230
384
|
};
|
|
231
|
-
return await this.expressionEvaluator.
|
|
385
|
+
return await this.expressionEvaluator.evaluate(actionData, scope);
|
|
232
386
|
};
|
|
233
387
|
this.initialize();
|
|
234
388
|
}
|
|
@@ -510,6 +664,7 @@ class AXPEntityMasterCreateViewModel {
|
|
|
510
664
|
this.commandOptions = commandOptions;
|
|
511
665
|
this.entityDef = cloneDeep(this.config);
|
|
512
666
|
this.workflow = this.injector.get(AXPWorkflowService);
|
|
667
|
+
this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
|
|
513
668
|
this.context = signal(this.initialData ?? {});
|
|
514
669
|
this.options = signal(this.commandOptions ?? {});
|
|
515
670
|
this.isInProgress = signal(false);
|
|
@@ -524,17 +679,33 @@ class AXPEntityMasterCreateViewModel {
|
|
|
524
679
|
});
|
|
525
680
|
if (!initialData)
|
|
526
681
|
initialData = {};
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
682
|
+
const scope = {
|
|
683
|
+
context: {
|
|
684
|
+
eval: (path) => {
|
|
685
|
+
return new Promise((resolve) => {
|
|
686
|
+
setTimeout(() => {
|
|
687
|
+
resolve(get(initialData, path));
|
|
688
|
+
});
|
|
689
|
+
});
|
|
690
|
+
},
|
|
691
|
+
},
|
|
692
|
+
};
|
|
693
|
+
const processDefault = async (value) => {
|
|
694
|
+
if (typeof value == 'function') {
|
|
695
|
+
return value();
|
|
533
696
|
}
|
|
534
|
-
else {
|
|
535
|
-
|
|
697
|
+
else if (typeof value == 'string' && value.startsWith("{{")) {
|
|
698
|
+
return await this.expressionEvaluator.evaluate(value, scope);
|
|
536
699
|
}
|
|
700
|
+
return value;
|
|
701
|
+
};
|
|
702
|
+
this.config.properties
|
|
703
|
+
.filter((c) => !isNil(c.schema.defaultValue))
|
|
704
|
+
.forEach(async (p) => {
|
|
705
|
+
const value = await processDefault(p.schema.defaultValue);
|
|
706
|
+
set(initialData, p.name, value);
|
|
537
707
|
});
|
|
708
|
+
//
|
|
538
709
|
this.context.set(initialData);
|
|
539
710
|
this.options.set(commandOptions);
|
|
540
711
|
//
|
|
@@ -785,8 +956,12 @@ class AXPEntityMasterListViewModel {
|
|
|
785
956
|
const listViewSetting = await this.settings.get(this.settingEntityKey);
|
|
786
957
|
if (listViewSetting) {
|
|
787
958
|
const columns = listViewSetting.list.views[this.view().name].columns;
|
|
959
|
+
const pageSize = listViewSetting.list.views[this.view().name].pageSize;
|
|
788
960
|
const columnVisibilityMap = new Map(columns.map((col) => [col.name, col.visible]));
|
|
789
961
|
const columnWidthsMap = new Map(columns.map((col) => [col.name, col.width]));
|
|
962
|
+
// if (pageSize) {
|
|
963
|
+
// this.dataSource.setPageSize(pageSize);
|
|
964
|
+
// }
|
|
790
965
|
this.columns.update((prev) => prev
|
|
791
966
|
.map((c) => {
|
|
792
967
|
return { ...c, width: columnWidthsMap.get(c.name), visible: columnVisibilityMap.get(c.name) ?? c.visible };
|
|
@@ -831,6 +1006,21 @@ class AXPEntityMasterListViewModel {
|
|
|
831
1006
|
},
|
|
832
1007
|
}));
|
|
833
1008
|
break;
|
|
1009
|
+
case 'pageSize':
|
|
1010
|
+
updateSettings((prev) => ({
|
|
1011
|
+
...prev,
|
|
1012
|
+
list: {
|
|
1013
|
+
...prev?.list,
|
|
1014
|
+
views: {
|
|
1015
|
+
...prev?.list?.views,
|
|
1016
|
+
[this.view().name]: {
|
|
1017
|
+
...prev?.list?.views?.[this.view().name],
|
|
1018
|
+
pageSize: data,
|
|
1019
|
+
},
|
|
1020
|
+
},
|
|
1021
|
+
},
|
|
1022
|
+
}));
|
|
1023
|
+
break;
|
|
834
1024
|
default:
|
|
835
1025
|
break;
|
|
836
1026
|
}
|
|
@@ -850,10 +1040,10 @@ class AXPEntityMasterListViewModel {
|
|
|
850
1040
|
const actions = await Promise.all(this.allActions()
|
|
851
1041
|
.filter((a) => a.scope === AXPEntityCommandScope.Individual && a.priority === 'secondary')
|
|
852
1042
|
.map(async (a) => {
|
|
853
|
-
const isHidden = await this.expressionEvaluator.
|
|
1043
|
+
const isHidden = await this.expressionEvaluator.evaluate(a.hidden, scope);
|
|
854
1044
|
if (isHidden)
|
|
855
1045
|
return null;
|
|
856
|
-
const disabled = await this.expressionEvaluator.
|
|
1046
|
+
const disabled = await this.expressionEvaluator.evaluate(a.disabled, scope);
|
|
857
1047
|
return { ...a, disabled };
|
|
858
1048
|
}));
|
|
859
1049
|
return actions.filter(Boolean);
|
|
@@ -1635,6 +1825,82 @@ const AXPEntityDetailViewModelResolver = (route, state, service = inject(AXPEnti
|
|
|
1635
1825
|
return service.create(moduleName, entityName, id);
|
|
1636
1826
|
};
|
|
1637
1827
|
|
|
1828
|
+
class AXPEntityStorageService {
|
|
1829
|
+
}
|
|
1830
|
+
class AXPEntityDataProvider {
|
|
1831
|
+
}
|
|
1832
|
+
class AXPEntityDataProviderImpl {
|
|
1833
|
+
constructor(storageService, entityName) {
|
|
1834
|
+
this.storageService = storageService;
|
|
1835
|
+
this.entityName = entityName;
|
|
1836
|
+
}
|
|
1837
|
+
async initial(collection) {
|
|
1838
|
+
await this.storageService.initial(this.entityName, collection);
|
|
1839
|
+
}
|
|
1840
|
+
getOne(id) {
|
|
1841
|
+
return this.storageService.getOne(this.entityName, id);
|
|
1842
|
+
}
|
|
1843
|
+
getAll() {
|
|
1844
|
+
return this.storageService.getAll(this.entityName);
|
|
1845
|
+
}
|
|
1846
|
+
query(request) {
|
|
1847
|
+
return this.storageService.query(this.entityName, request);
|
|
1848
|
+
}
|
|
1849
|
+
updateOne(id, keyValue) {
|
|
1850
|
+
return this.storageService.updateOne(this.entityName, id, keyValue);
|
|
1851
|
+
}
|
|
1852
|
+
deleteOne(id) {
|
|
1853
|
+
return this.storageService.deleteOne(this.entityName, id);
|
|
1854
|
+
}
|
|
1855
|
+
insertOne(entity) {
|
|
1856
|
+
return this.storageService.insertOne(this.entityName, entity);
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
class AXMEntityCrudService {
|
|
1860
|
+
}
|
|
1861
|
+
class AXMEntityCrudServiceImpl {
|
|
1862
|
+
constructor(entityName) {
|
|
1863
|
+
this.entityName = entityName;
|
|
1864
|
+
this._storageService = inject(AXPEntityStorageService);
|
|
1865
|
+
this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
|
|
1866
|
+
this._entityDataProvider = new AXPEntityDataProviderImpl(this._storageService, this.entityName);
|
|
1867
|
+
}
|
|
1868
|
+
async insertOne(request) {
|
|
1869
|
+
return this._entityDataProvider.insertOne(request);
|
|
1870
|
+
}
|
|
1871
|
+
async getOne(id) {
|
|
1872
|
+
return this._entityDataProvider.getOne(id);
|
|
1873
|
+
}
|
|
1874
|
+
async deleteOne(id) {
|
|
1875
|
+
return this._entityDataProvider.deleteOne(id);
|
|
1876
|
+
}
|
|
1877
|
+
async updateOne(id, values) {
|
|
1878
|
+
return this._entityDataProvider.updateOne(id, values);
|
|
1879
|
+
}
|
|
1880
|
+
async query(request = { skip: 0, take: 100 }) {
|
|
1881
|
+
const [moduleName, entityName] = this._entityDataProvider.entityName.split('.');
|
|
1882
|
+
const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
|
|
1883
|
+
if (entityRef.parentKey) {
|
|
1884
|
+
if (!request.filter?.filters?.length && request.filter?.field !== entityRef.parentKey) {
|
|
1885
|
+
request.filter = {
|
|
1886
|
+
value: true,
|
|
1887
|
+
field: entityRef.parentKey,
|
|
1888
|
+
operator: {
|
|
1889
|
+
type: 'isEmpty',
|
|
1890
|
+
},
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
return this._entityDataProvider.query(request);
|
|
1895
|
+
}
|
|
1896
|
+
// get entityDataProvider() {
|
|
1897
|
+
// return this._entityDataProvider;
|
|
1898
|
+
// }
|
|
1899
|
+
get storageService() {
|
|
1900
|
+
return this._storageService;
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1638
1904
|
class AXPEntityCommandSearchDefinitionProvider {
|
|
1639
1905
|
async provide(context) {
|
|
1640
1906
|
context.addDefinition('command', 'Commands', 'command', 'fa-solid fa-command', 1, {
|
|
@@ -1750,7 +2016,7 @@ class AXPLookupWidgetViewComponent extends AXPWidgetComponent {
|
|
|
1750
2016
|
<ax-badge [look]="'twotone'" [text]="item.text" color="primary"></ax-badge>
|
|
1751
2017
|
}
|
|
1752
2018
|
}
|
|
1753
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type:
|
|
2019
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1754
2020
|
}
|
|
1755
2021
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
|
|
1756
2022
|
type: Component,
|
|
@@ -1886,7 +2152,7 @@ class AXPLookupWidgetSelectorComponent extends AXBasePageComponent {
|
|
|
1886
2152
|
}
|
|
1887
2153
|
</ax-suffix>
|
|
1888
2154
|
</ax-footer>
|
|
1889
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$
|
|
2155
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXCommonModule }, { kind: "directive", type: i2.AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i5.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "parentField", "rowTemplate", "emptyTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: i7.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1890
2156
|
}
|
|
1891
2157
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetSelectorComponent, decorators: [{
|
|
1892
2158
|
type: Component,
|
|
@@ -2152,7 +2418,7 @@ class AXPLookupWidgetEditComponent extends AXPWidgetComponent {
|
|
|
2152
2418
|
this.isOpen.set(true);
|
|
2153
2419
|
this.popupService
|
|
2154
2420
|
.open(AXPLookupWidgetSelectorComponent, {
|
|
2155
|
-
title: `${this.translateService.translateSync('widget.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural)}`,
|
|
2421
|
+
title: `${this.translateService.translateSync('widget.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
|
|
2156
2422
|
size: (this.vm()?.columns().length ?? 0) > 3 ? 'lg' : 'md',
|
|
2157
2423
|
data: {
|
|
2158
2424
|
vm: new AXPLookupWidgetSelectorViewModel(this.injector, this.entityDef(), this.filter),
|
|
@@ -2269,7 +2535,7 @@ class AXPLookupWidgetEditComponent extends AXPWidgetComponent {
|
|
|
2269
2535
|
</ax-button>
|
|
2270
2536
|
</ax-suffix>
|
|
2271
2537
|
</ax-text-box>
|
|
2272
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$
|
|
2538
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2$1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2273
2539
|
}
|
|
2274
2540
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
2275
2541
|
type: Component,
|
|
@@ -2349,7 +2615,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
2349
2615
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2350
2616
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: `
|
|
2351
2617
|
<ax-badge [look]="'twotone'" [text]="rawValue" color="primary"></ax-badge>
|
|
2352
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type:
|
|
2618
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2353
2619
|
}
|
|
2354
2620
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
|
|
2355
2621
|
type: Component,
|
|
@@ -2448,6 +2714,371 @@ const AXPLookupWidget = {
|
|
|
2448
2714
|
},
|
|
2449
2715
|
};
|
|
2450
2716
|
|
|
2717
|
+
class AXPTagableBoxWidgetColumnComponent extends AXPWidgetComponent {
|
|
2718
|
+
constructor() {
|
|
2719
|
+
super(...arguments);
|
|
2720
|
+
this.internalValue = computed(() => (Array.isArray(this.getValue()) ? this.getValue() : [this.getValue()]));
|
|
2721
|
+
this.multiple = computed(() => this.options()['multiple']);
|
|
2722
|
+
// ویژگیهای مرتبط با SelectBox
|
|
2723
|
+
this.useSelectBox = computed(() => this.options()['useSelectBox']);
|
|
2724
|
+
this.textField = computed(() => this.options()['textField'] ?? 'title');
|
|
2725
|
+
// استخراج دادهها برای نمایش
|
|
2726
|
+
this.getData = computed(() => {
|
|
2727
|
+
if (!this.useSelectBox()) {
|
|
2728
|
+
return [];
|
|
2729
|
+
}
|
|
2730
|
+
const value = this.getValue();
|
|
2731
|
+
if (!value) {
|
|
2732
|
+
return [];
|
|
2733
|
+
}
|
|
2734
|
+
return Array.isArray(value) ? value : [value];
|
|
2735
|
+
});
|
|
2736
|
+
}
|
|
2737
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2738
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTagableBoxWidgetColumnComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
2739
|
+
<div class="ax-flex ax-gap-1 ax-flex-wrap">
|
|
2740
|
+
@if (useSelectBox() && getData().length > 0) { @for (item of getData(); track $index) {
|
|
2741
|
+
<ax-badge [look]="'twotone'" [text]="item[textField()]" color="primary"></ax-badge>
|
|
2742
|
+
} } @else { @if(multiple()) { @for (item of internalValue(); track $index) {
|
|
2743
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-inline-block">{{ item }}</span>
|
|
2744
|
+
} } @else {
|
|
2745
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-inline-block">{{ internalValue()[0] }}</span>
|
|
2746
|
+
} }
|
|
2747
|
+
</div>
|
|
2748
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2749
|
+
}
|
|
2750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetColumnComponent, decorators: [{
|
|
2751
|
+
type: Component,
|
|
2752
|
+
args: [{
|
|
2753
|
+
template: `
|
|
2754
|
+
<div class="ax-flex ax-gap-1 ax-flex-wrap">
|
|
2755
|
+
@if (useSelectBox() && getData().length > 0) { @for (item of getData(); track $index) {
|
|
2756
|
+
<ax-badge [look]="'twotone'" [text]="item[textField()]" color="primary"></ax-badge>
|
|
2757
|
+
} } @else { @if(multiple()) { @for (item of internalValue(); track $index) {
|
|
2758
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-inline-block">{{ item }}</span>
|
|
2759
|
+
} } @else {
|
|
2760
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-inline-block">{{ internalValue()[0] }}</span>
|
|
2761
|
+
} }
|
|
2762
|
+
</div>
|
|
2763
|
+
`,
|
|
2764
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2765
|
+
imports: [CommonModule, AXBadgeModule],
|
|
2766
|
+
inputs: [],
|
|
2767
|
+
}]
|
|
2768
|
+
}] });
|
|
2769
|
+
|
|
2770
|
+
var tagableBoxWidgetColumn_component = /*#__PURE__*/Object.freeze({
|
|
2771
|
+
__proto__: null,
|
|
2772
|
+
AXPTagableBoxWidgetColumnComponent: AXPTagableBoxWidgetColumnComponent
|
|
2773
|
+
});
|
|
2774
|
+
|
|
2775
|
+
class AXPTagableBoxWidgetEditComponent extends AXPWidgetComponent {
|
|
2776
|
+
constructor() {
|
|
2777
|
+
super(...arguments);
|
|
2778
|
+
this.entityResolver = inject(AXPEntityResolver);
|
|
2779
|
+
this.hasClearButton = computed(() => this.options()['hasClearButton']);
|
|
2780
|
+
this.disabled = computed(() => this.options()['disabled']);
|
|
2781
|
+
this.placeholder = computed(() => this.options()['placeholder']);
|
|
2782
|
+
// پارامترهای SelectBox
|
|
2783
|
+
this.moduleName = computed(() => this.options()['module']);
|
|
2784
|
+
this.entityName = computed(() => this.options()['entity']);
|
|
2785
|
+
this.allowSearch = computed(() => this.options()['allowSearch']);
|
|
2786
|
+
// منبع داده برای SelectBox
|
|
2787
|
+
this._dataSource = new AXDataSource({
|
|
2788
|
+
load: async (e) => {
|
|
2789
|
+
const entity = await this.entityResolver.get(this.moduleName(), this.entityName());
|
|
2790
|
+
const func = entity?.queries.list?.execute;
|
|
2791
|
+
const result = await func(e);
|
|
2792
|
+
console.log(result);
|
|
2793
|
+
return {
|
|
2794
|
+
items: result?.items || [],
|
|
2795
|
+
total: result?.total || 0,
|
|
2796
|
+
};
|
|
2797
|
+
},
|
|
2798
|
+
pageSize: 10,
|
|
2799
|
+
});
|
|
2800
|
+
}
|
|
2801
|
+
handleSelectValueChange(e) {
|
|
2802
|
+
if (e.isUserInteraction) {
|
|
2803
|
+
this.setValue(e.value);
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
addItem() { }
|
|
2807
|
+
get __class() {
|
|
2808
|
+
const cls = {};
|
|
2809
|
+
cls[`ax-block`] = true;
|
|
2810
|
+
cls[`ax-flex-1`] = true;
|
|
2811
|
+
return cls;
|
|
2812
|
+
}
|
|
2813
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2814
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTagableBoxWidgetEditComponent, isStandalone: true, selector: "axp-tagable-box-widget", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
|
|
2815
|
+
<div class="ax-grid ax-grid-cols-12 ax-gap-4">
|
|
2816
|
+
<!-- نمایش Select Box با دکمه اضافه کردن آیتم -->
|
|
2817
|
+
<ax-select-box
|
|
2818
|
+
class="ax-col-span-12"
|
|
2819
|
+
[placeholder]="placeholder()"
|
|
2820
|
+
[dataSource]="_dataSource"
|
|
2821
|
+
[ngModel]="getValue()"
|
|
2822
|
+
[valueField]="'name'"
|
|
2823
|
+
[textField]="'title'"
|
|
2824
|
+
[multiple]="true"
|
|
2825
|
+
(onValueChanged)="handleSelectValueChange($event)"
|
|
2826
|
+
>
|
|
2827
|
+
@if (allowSearch()) {
|
|
2828
|
+
<ax-search-box><ax-clear-button></ax-clear-button></ax-search-box>
|
|
2829
|
+
} @if (hasClearButton()) {
|
|
2830
|
+
<ax-clear-button></ax-clear-button>
|
|
2831
|
+
} @for (validation of validationRules(); track $index) {
|
|
2832
|
+
<ax-validation-rule
|
|
2833
|
+
[rule]="validation.rule"
|
|
2834
|
+
[message]="validation.options?.message"
|
|
2835
|
+
[options]="validation.options"
|
|
2836
|
+
></ax-validation-rule>
|
|
2837
|
+
}
|
|
2838
|
+
</ax-select-box>
|
|
2839
|
+
<ax-button
|
|
2840
|
+
[text]="'افزودن آیتم جدید'"
|
|
2841
|
+
look="twotone"
|
|
2842
|
+
[disabled]="disabled()"
|
|
2843
|
+
(onClick)="addItem()"
|
|
2844
|
+
class="ax-col-start-8 md:ax-col-start-9 2xl:ax-col-start-10 ax-col-end-13"
|
|
2845
|
+
>
|
|
2846
|
+
<ax-prefix>
|
|
2847
|
+
<ax-icon class="fa-solid fa-add"></ax-icon>
|
|
2848
|
+
</ax-prefix>
|
|
2849
|
+
</ax-button>
|
|
2850
|
+
</div>
|
|
2851
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i5$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i6.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2852
|
+
}
|
|
2853
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetEditComponent, decorators: [{
|
|
2854
|
+
type: Component,
|
|
2855
|
+
args: [{
|
|
2856
|
+
selector: 'axp-tagable-box-widget',
|
|
2857
|
+
template: `
|
|
2858
|
+
<div class="ax-grid ax-grid-cols-12 ax-gap-4">
|
|
2859
|
+
<!-- نمایش Select Box با دکمه اضافه کردن آیتم -->
|
|
2860
|
+
<ax-select-box
|
|
2861
|
+
class="ax-col-span-12"
|
|
2862
|
+
[placeholder]="placeholder()"
|
|
2863
|
+
[dataSource]="_dataSource"
|
|
2864
|
+
[ngModel]="getValue()"
|
|
2865
|
+
[valueField]="'name'"
|
|
2866
|
+
[textField]="'title'"
|
|
2867
|
+
[multiple]="true"
|
|
2868
|
+
(onValueChanged)="handleSelectValueChange($event)"
|
|
2869
|
+
>
|
|
2870
|
+
@if (allowSearch()) {
|
|
2871
|
+
<ax-search-box><ax-clear-button></ax-clear-button></ax-search-box>
|
|
2872
|
+
} @if (hasClearButton()) {
|
|
2873
|
+
<ax-clear-button></ax-clear-button>
|
|
2874
|
+
} @for (validation of validationRules(); track $index) {
|
|
2875
|
+
<ax-validation-rule
|
|
2876
|
+
[rule]="validation.rule"
|
|
2877
|
+
[message]="validation.options?.message"
|
|
2878
|
+
[options]="validation.options"
|
|
2879
|
+
></ax-validation-rule>
|
|
2880
|
+
}
|
|
2881
|
+
</ax-select-box>
|
|
2882
|
+
<ax-button
|
|
2883
|
+
[text]="'افزودن آیتم جدید'"
|
|
2884
|
+
look="twotone"
|
|
2885
|
+
[disabled]="disabled()"
|
|
2886
|
+
(onClick)="addItem()"
|
|
2887
|
+
class="ax-col-start-8 md:ax-col-start-9 2xl:ax-col-start-10 ax-col-end-13"
|
|
2888
|
+
>
|
|
2889
|
+
<ax-prefix>
|
|
2890
|
+
<ax-icon class="fa-solid fa-add"></ax-icon>
|
|
2891
|
+
</ax-prefix>
|
|
2892
|
+
</ax-button>
|
|
2893
|
+
</div>
|
|
2894
|
+
`,
|
|
2895
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2896
|
+
imports: [
|
|
2897
|
+
CommonModule,
|
|
2898
|
+
AXTextBoxModule,
|
|
2899
|
+
FormsModule,
|
|
2900
|
+
AXFormModule,
|
|
2901
|
+
AXDecoratorModule,
|
|
2902
|
+
AXValidationModule,
|
|
2903
|
+
AXButtonModule,
|
|
2904
|
+
AXSelectBoxModule,
|
|
2905
|
+
AXSearchBoxModule,
|
|
2906
|
+
],
|
|
2907
|
+
inputs: [],
|
|
2908
|
+
}]
|
|
2909
|
+
}], propDecorators: { __class: [{
|
|
2910
|
+
type: HostBinding,
|
|
2911
|
+
args: ['class']
|
|
2912
|
+
}] } });
|
|
2913
|
+
|
|
2914
|
+
var tagableBoxWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
2915
|
+
__proto__: null,
|
|
2916
|
+
AXPTagableBoxWidgetEditComponent: AXPTagableBoxWidgetEditComponent
|
|
2917
|
+
});
|
|
2918
|
+
|
|
2919
|
+
class AXPTagableBoxWidgetFilterComponent extends AXPWidgetComponent {
|
|
2920
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2921
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXPTagableBoxWidgetFilterComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2922
|
+
}
|
|
2923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetFilterComponent, decorators: [{
|
|
2924
|
+
type: Component,
|
|
2925
|
+
args: [{
|
|
2926
|
+
template: ``,
|
|
2927
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2928
|
+
imports: [CommonModule, FormsModule],
|
|
2929
|
+
inputs: [],
|
|
2930
|
+
}]
|
|
2931
|
+
}] });
|
|
2932
|
+
|
|
2933
|
+
var tagableBoxWidgetFilter_component = /*#__PURE__*/Object.freeze({
|
|
2934
|
+
__proto__: null,
|
|
2935
|
+
AXPTagableBoxWidgetFilterComponent: AXPTagableBoxWidgetFilterComponent
|
|
2936
|
+
});
|
|
2937
|
+
|
|
2938
|
+
class AXPTagableBoxWidgetPrintComponent extends AXPWidgetComponent {
|
|
2939
|
+
constructor() {
|
|
2940
|
+
super(...arguments);
|
|
2941
|
+
this.internalValue = computed(() => (Array.isArray(this.getValue()) ? this.getValue() : [this.getValue()]));
|
|
2942
|
+
this.multiple = computed(() => this.options()['multiple']);
|
|
2943
|
+
// ویژگیهای مرتبط با SelectBox
|
|
2944
|
+
this.useSelectBox = computed(() => this.options()['useSelectBox']);
|
|
2945
|
+
this.textField = computed(() => this.options()['textField'] ?? 'title');
|
|
2946
|
+
// استخراج دادهها برای نمایش
|
|
2947
|
+
this.getData = computed(() => {
|
|
2948
|
+
if (!this.useSelectBox()) {
|
|
2949
|
+
return [];
|
|
2950
|
+
}
|
|
2951
|
+
const value = this.getValue();
|
|
2952
|
+
if (!value) {
|
|
2953
|
+
return [];
|
|
2954
|
+
}
|
|
2955
|
+
return Array.isArray(value) ? value : [value];
|
|
2956
|
+
});
|
|
2957
|
+
}
|
|
2958
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2959
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTagableBoxWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
|
|
2960
|
+
<div>
|
|
2961
|
+
@if (useSelectBox() && getData().length > 0) { @for (item of getData(); track $index) {
|
|
2962
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-mr-2 ax-mb-2 ax-inline-block">{{
|
|
2963
|
+
item[textField()]
|
|
2964
|
+
}}</span>
|
|
2965
|
+
} } @else { @if(multiple()) { @for (item of internalValue(); track $index) {
|
|
2966
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-mr-2 ax-mb-2 ax-inline-block">{{ item }}</span>
|
|
2967
|
+
} } @else {
|
|
2968
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-mr-2 ax-mb-2 ax-inline-block">{{
|
|
2969
|
+
internalValue()[0]
|
|
2970
|
+
}}</span>
|
|
2971
|
+
} }
|
|
2972
|
+
</div>
|
|
2973
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2974
|
+
}
|
|
2975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetPrintComponent, decorators: [{
|
|
2976
|
+
type: Component,
|
|
2977
|
+
args: [{
|
|
2978
|
+
template: `
|
|
2979
|
+
<div>
|
|
2980
|
+
@if (useSelectBox() && getData().length > 0) { @for (item of getData(); track $index) {
|
|
2981
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-mr-2 ax-mb-2 ax-inline-block">{{
|
|
2982
|
+
item[textField()]
|
|
2983
|
+
}}</span>
|
|
2984
|
+
} } @else { @if(multiple()) { @for (item of internalValue(); track $index) {
|
|
2985
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-mr-2 ax-mb-2 ax-inline-block">{{ item }}</span>
|
|
2986
|
+
} } @else {
|
|
2987
|
+
<span class="ax-bg-slate-100 ax-px-2 ax-py-1 ax-rounded ax-mr-2 ax-mb-2 ax-inline-block">{{
|
|
2988
|
+
internalValue()[0]
|
|
2989
|
+
}}</span>
|
|
2990
|
+
} }
|
|
2991
|
+
</div>
|
|
2992
|
+
`,
|
|
2993
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2994
|
+
imports: [CommonModule],
|
|
2995
|
+
inputs: [],
|
|
2996
|
+
}]
|
|
2997
|
+
}] });
|
|
2998
|
+
|
|
2999
|
+
var tagableBoxWidgetPrint_component = /*#__PURE__*/Object.freeze({
|
|
3000
|
+
__proto__: null,
|
|
3001
|
+
AXPTagableBoxWidgetPrintComponent: AXPTagableBoxWidgetPrintComponent
|
|
3002
|
+
});
|
|
3003
|
+
|
|
3004
|
+
class AXPTagableBoxWidgetViewComponent extends AXPWidgetComponent {
|
|
3005
|
+
constructor() {
|
|
3006
|
+
super(...arguments);
|
|
3007
|
+
this.internalValue = computed(() => (Array.isArray(this.getValue()) ? this.getValue() : [this.getValue()]));
|
|
3008
|
+
this.multiple = computed(() => this.options()['multiple']);
|
|
3009
|
+
// ویژگیهای مرتبط با SelectBox
|
|
3010
|
+
this.useSelectBox = computed(() => this.options()['useSelectBox']);
|
|
3011
|
+
this.textField = computed(() => this.options()['textField'] ?? 'title');
|
|
3012
|
+
// استخراج دادهها برای نمایش
|
|
3013
|
+
this.getData = computed(() => {
|
|
3014
|
+
if (!this.useSelectBox()) {
|
|
3015
|
+
return [];
|
|
3016
|
+
}
|
|
3017
|
+
const value = this.getValue();
|
|
3018
|
+
if (!value) {
|
|
3019
|
+
return [];
|
|
3020
|
+
}
|
|
3021
|
+
return Array.isArray(value) ? value : [value];
|
|
3022
|
+
});
|
|
3023
|
+
}
|
|
3024
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3025
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPTagableBoxWidgetViewComponent, isStandalone: true, selector: "axp-tagable-box-widget", usesInheritance: true, ngImport: i0, template: `
|
|
3026
|
+
@for (item of internalValue(); track $index) {
|
|
3027
|
+
<ax-badge [look]="'twotone'" [text]="item" color="primary"></ax-badge>
|
|
3028
|
+
}
|
|
3029
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3030
|
+
}
|
|
3031
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPTagableBoxWidgetViewComponent, decorators: [{
|
|
3032
|
+
type: Component,
|
|
3033
|
+
args: [{
|
|
3034
|
+
selector: 'axp-tagable-box-widget',
|
|
3035
|
+
template: `
|
|
3036
|
+
@for (item of internalValue(); track $index) {
|
|
3037
|
+
<ax-badge [look]="'twotone'" [text]="item" color="primary"></ax-badge>
|
|
3038
|
+
}
|
|
3039
|
+
`,
|
|
3040
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3041
|
+
imports: [CommonModule, AXBadgeModule],
|
|
3042
|
+
inputs: [],
|
|
3043
|
+
}]
|
|
3044
|
+
}] });
|
|
3045
|
+
|
|
3046
|
+
var tagableBoxWidgetView_component = /*#__PURE__*/Object.freeze({
|
|
3047
|
+
__proto__: null,
|
|
3048
|
+
AXPTagableBoxWidgetViewComponent: AXPTagableBoxWidgetViewComponent
|
|
3049
|
+
});
|
|
3050
|
+
|
|
3051
|
+
const AXPTagableBoxWidget = {
|
|
3052
|
+
name: 'tagable-editor',
|
|
3053
|
+
title: 'Tagable Box',
|
|
3054
|
+
icon: 'fa-solid fa-tags',
|
|
3055
|
+
description: 'Inputs text with tags',
|
|
3056
|
+
group: AXP_WIDGETS_EDITOR_GROUP,
|
|
3057
|
+
type: 'editor',
|
|
3058
|
+
defaultFilterWidgetName: 'string-filter',
|
|
3059
|
+
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY],
|
|
3060
|
+
components: {
|
|
3061
|
+
view: {
|
|
3062
|
+
component: () => Promise.resolve().then(function () { return tagableBoxWidgetView_component; }).then((c) => c.AXPTagableBoxWidgetViewComponent),
|
|
3063
|
+
},
|
|
3064
|
+
edit: {
|
|
3065
|
+
component: () => Promise.resolve().then(function () { return tagableBoxWidgetEdit_component; }).then((c) => c.AXPTagableBoxWidgetEditComponent),
|
|
3066
|
+
},
|
|
3067
|
+
filter: {
|
|
3068
|
+
component: () => Promise.resolve().then(function () { return tagableBoxWidgetFilter_component; }).then((c) => c.AXPTagableBoxWidgetFilterComponent),
|
|
3069
|
+
},
|
|
3070
|
+
column: {
|
|
3071
|
+
component: () => Promise.resolve().then(function () { return tagableBoxWidgetColumn_component; }).then((c) => c.AXPTagableBoxWidgetColumnComponent),
|
|
3072
|
+
},
|
|
3073
|
+
print: {
|
|
3074
|
+
component: () => Promise.resolve().then(function () { return tagableBoxWidgetPrint_component; }).then((c) => c.AXPTagableBoxWidgetPrintComponent),
|
|
3075
|
+
},
|
|
3076
|
+
designer: {
|
|
3077
|
+
component: () => Promise.resolve().then(function () { return tagableBoxWidgetEdit_component; }).then((c) => c.AXPTagableBoxWidgetEditComponent),
|
|
3078
|
+
},
|
|
3079
|
+
},
|
|
3080
|
+
};
|
|
3081
|
+
|
|
2451
3082
|
class AXPWidgetSelectorWidgetEditComponent extends AXPWidgetComponent {
|
|
2452
3083
|
constructor() {
|
|
2453
3084
|
super(...arguments);
|
|
@@ -2512,7 +3143,7 @@ class AXPWidgetSelectorWidgetEditComponent extends AXPWidgetComponent {
|
|
|
2512
3143
|
<axp-widget-property-viewer [widget]="selectedWidgetNode()!" (onChanged)="handleChangeWidget($event)">
|
|
2513
3144
|
</axp-widget-property-viewer>
|
|
2514
3145
|
}
|
|
2515
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$
|
|
3146
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2$1.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i6$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message"] }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget"], outputs: ["onChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2516
3147
|
}
|
|
2517
3148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, decorators: [{
|
|
2518
3149
|
type: Component,
|
|
@@ -2897,6 +3528,7 @@ function routesFacory() {
|
|
|
2897
3528
|
class AXPEntityModule {
|
|
2898
3529
|
constructor(appInitService, injector) {
|
|
2899
3530
|
const service = injector.get(AXPEntityDefinitionRegistryService);
|
|
3531
|
+
const seederService = injector.get(AXPDataSeederService);
|
|
2900
3532
|
appInitService.registerTask({
|
|
2901
3533
|
name: 'layout-theme',
|
|
2902
3534
|
statusText: 'Preload entities ...',
|
|
@@ -2905,9 +3537,16 @@ class AXPEntityModule {
|
|
|
2905
3537
|
service.preload();
|
|
2906
3538
|
},
|
|
2907
3539
|
});
|
|
3540
|
+
appInitService.registerTask({
|
|
3541
|
+
name: 'Seeder',
|
|
3542
|
+
statusText: 'Seed Data ...',
|
|
3543
|
+
run: async () => {
|
|
3544
|
+
await seederService.seed();
|
|
3545
|
+
},
|
|
3546
|
+
});
|
|
2908
3547
|
}
|
|
2909
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$
|
|
2910
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$
|
|
3548
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$4.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3549
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$2.AXPWorkflowModule, i7.AXPLayoutBuilderModule] }); }
|
|
2911
3550
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, providers: [
|
|
2912
3551
|
{
|
|
2913
3552
|
provide: ROUTES,
|
|
@@ -2954,7 +3593,7 @@ class AXPEntityModule {
|
|
|
2954
3593
|
functions: {},
|
|
2955
3594
|
}),
|
|
2956
3595
|
AXPLayoutBuilderModule.forChild({
|
|
2957
|
-
widgets: [AXPLookupWidget, AXPWidgetSelectorWidget],
|
|
3596
|
+
widgets: [AXPLookupWidget, AXPWidgetSelectorWidget, AXPTagableBoxWidget],
|
|
2958
3597
|
})] }); }
|
|
2959
3598
|
}
|
|
2960
3599
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, decorators: [{
|
|
@@ -2987,7 +3626,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2987
3626
|
functions: {},
|
|
2988
3627
|
}),
|
|
2989
3628
|
AXPLayoutBuilderModule.forChild({
|
|
2990
|
-
widgets: [AXPLookupWidget, AXPWidgetSelectorWidget],
|
|
3629
|
+
widgets: [AXPLookupWidget, AXPWidgetSelectorWidget, AXPTagableBoxWidget],
|
|
2991
3630
|
}),
|
|
2992
3631
|
],
|
|
2993
3632
|
exports: [],
|
|
@@ -3014,7 +3653,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3014
3653
|
},
|
|
3015
3654
|
],
|
|
3016
3655
|
}]
|
|
3017
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3656
|
+
}], ctorParameters: () => [{ type: i1$4.AXPAppStartUpService }, { type: i0.Injector }] });
|
|
3018
3657
|
|
|
3019
3658
|
class AXPEntityService {
|
|
3020
3659
|
constructor() {
|
|
@@ -3035,5 +3674,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
3035
3674
|
* Generated bundle index. Do not edit.
|
|
3036
3675
|
*/
|
|
3037
3676
|
|
|
3038
|
-
export { AXPCreateEntityWorkflow, AXPDeleteEntityWorkflow, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityMiddlewareDefault, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPModifyEntitySectionWorkflow, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER };
|
|
3677
|
+
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPDexieEntityStorageService, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityMiddlewareDefault, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPModifyEntitySectionWorkflow, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER };
|
|
3039
3678
|
//# sourceMappingURL=acorex-platform-layout-entity.mjs.map
|