@acorex/platform 19.2.8 → 19.2.10
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/common/lib/app/application.types.d.ts +10 -2
- package/common/lib/utils/expression-evaluator.service.d.ts +3 -1
- package/common/lib/utils/index.d.ts +2 -0
- package/common/lib/utils/regional-util.service.d.ts +15 -0
- package/common/lib/utils/regional.types.d.ts +55 -0
- package/fesm2022/acorex-platform-common.mjs +30 -14
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +35 -16
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +91 -24
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +48 -28
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +105 -78
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-Bl9f4Rtk.mjs → acorex-platform-themes-default-entity-master-create-view.component-Bvwr0PVk.mjs} +9 -5
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Bvwr0PVk.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-De61n012.mjs → acorex-platform-themes-default-entity-master-list-view.component-BzLgFr7D.mjs} +8 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BzLgFr7D.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-U8aBv1Ql.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BAU_s90_.mjs} +8 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BAU_s90_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-B4aBmc5H.mjs → acorex-platform-themes-default-entity-master-single-view.component-BGUrwL2P.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BGUrwL2P.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-setting-page.component-DYumYm5k.mjs +74 -0
- package/fesm2022/acorex-platform-themes-default-setting-page.component-DYumYm5k.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-setting-view.component-CsCug3Vu.mjs +71 -0
- package/fesm2022/acorex-platform-themes-default-setting-view.component-CsCug3Vu.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +25 -16
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +10 -1
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-B90if8wb.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-BiCinIok.mjs} +13 -11
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-BiCinIok.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +597 -534
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/datasource-provider.service.d.ts +3 -1
- package/layout/builder/lib/builder/widget-map.d.ts +1 -0
- package/layout/builder/lib/builder/widget.types.d.ts +15 -0
- package/layout/designer/lib/designer/components/drawers/data-sources/data-sources.component.d.ts +3 -0
- package/layout/designer/lib/property-viewer/widget-property-viewer.component.d.ts +2 -0
- package/layout/entity/lib/entity-detail-list.viewmodel.d.ts +3 -0
- package/layout/entity/lib/entity-master-create.viewmodel.d.ts +5 -2
- package/layout/entity/lib/entity-master-single.viewmodel.d.ts +1 -1
- package/layout/entity/lib/entity-master-update.viewmodel.d.ts +4 -3
- package/layout/entity/lib/entity.viewmodel.d.ts +2 -0
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +0 -2
- package/layout/entity/lib/widgets/widget-selector/widget-selector-widget-edit.component.d.ts +0 -2
- package/layout/setting/lib/setting.viewmodel.d.ts +3 -0
- package/package.json +9 -9
- package/themes/default/lib/layouts/base/simple-page/simple-page.layout.d.ts +3 -0
- package/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.d.ts +3 -0
- package/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.d.ts +2 -0
- package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +5 -1
- package/themes/default/lib/layouts/entity-layouts/entity-master-modify-view/entity-master-modify-view.component.d.ts +2 -0
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +3 -0
- package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +3 -0
- package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +5 -0
- package/themes/default/lib/layouts/root-layout/root-layout.module.d.ts +2 -1
- package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +3 -0
- package/themes/default/lib/pages/theme-palette-preview/theme-palette-preview.page.d.ts +3 -0
- package/themes/shared/lib/components/slots/theme-slot.component.d.ts +3 -0
- package/themes/shared/lib/setting.keys.d.ts +2 -1
- package/themes/shared/lib/theme.service.d.ts +3 -0
- package/widgets/lib/properties/data-source.props.d.ts +3 -0
- package/widgets/lib/properties/editors.props.d.ts +0 -1
- package/widgets/lib/properties/index.d.ts +1 -0
- package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +6 -4
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget-edit.component.d.ts +3 -8
- package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +1 -1
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget-edit.component.d.ts +14 -0
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +17 -0
- package/widgets/lib/widgets/charts/gauge-chart/index.d.ts +2 -0
- package/widgets/lib/widgets/editors/checkbox/checkbox-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/editors/color/color-box-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +0 -4
- package/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/editors/email/email-box-widget-edit.component.d.ts +0 -4
- package/widgets/lib/widgets/editors/large-text/large-text-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/editors/link/link-widget-edit.component.d.ts +0 -4
- package/widgets/lib/widgets/editors/number/number-box-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/editors/phone/phone-box-widget-edit.component.d.ts +0 -4
- package/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/editors/selection-list/selection-list-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.d.ts +0 -1
- package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/validations/base-validation/base-validation.d.ts +3 -2
- package/widgets/lib/widgets/validations/between-validation/between-validation-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/validations/required-validation/required-validation-widget-edit.component.d.ts +1 -7
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Bl9f4Rtk.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-De61n012.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-U8aBv1Ql.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B4aBmc5H.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-setting-page.component-BERYnJnp.mjs +0 -74
- package/fesm2022/acorex-platform-themes-default-setting-page.component-BERYnJnp.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-setting-view.component-BagAWM4W.mjs +0 -71
- package/fesm2022/acorex-platform-themes-default-setting-view.component-BagAWM4W.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-B90if8wb.mjs.map +0 -1
|
@@ -76,36 +76,46 @@ function applyCondition(item, condition) {
|
|
|
76
76
|
}
|
|
77
77
|
let result;
|
|
78
78
|
const valueToCompare = isNil(condition.field) || condition.field === '' ? conditionValue : itemValue;
|
|
79
|
-
|
|
79
|
+
const conditionType = condition?.operator?.type;
|
|
80
|
+
if (!conditionType) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
switch (conditionType) {
|
|
80
84
|
case 'equal':
|
|
81
85
|
result = isEqual(valueToCompare, conditionValue);
|
|
82
|
-
if (loggingEnabled)
|
|
86
|
+
if (loggingEnabled) {
|
|
83
87
|
console.log('Equal check result:', result);
|
|
88
|
+
}
|
|
84
89
|
break;
|
|
85
90
|
case 'notEqual':
|
|
86
91
|
result = !isEqual(valueToCompare, conditionValue);
|
|
87
|
-
if (loggingEnabled)
|
|
92
|
+
if (loggingEnabled) {
|
|
88
93
|
console.log('Not equal check result:', result);
|
|
94
|
+
}
|
|
89
95
|
break;
|
|
90
96
|
case 'greaterThan':
|
|
91
97
|
result = gt(valueToCompare, conditionValue);
|
|
92
|
-
if (loggingEnabled)
|
|
98
|
+
if (loggingEnabled) {
|
|
93
99
|
console.log('Greater than check result:', result);
|
|
100
|
+
}
|
|
94
101
|
break;
|
|
95
102
|
case 'lessThan':
|
|
96
103
|
result = lt(valueToCompare, conditionValue);
|
|
97
|
-
if (loggingEnabled)
|
|
104
|
+
if (loggingEnabled) {
|
|
98
105
|
console.log('Less than check result:', result);
|
|
106
|
+
}
|
|
99
107
|
break;
|
|
100
108
|
case 'greaterThanOrEqual':
|
|
101
109
|
result = gte(valueToCompare, conditionValue);
|
|
102
|
-
if (loggingEnabled)
|
|
110
|
+
if (loggingEnabled) {
|
|
103
111
|
console.log('Greater than or equal check result:', result);
|
|
112
|
+
}
|
|
104
113
|
break;
|
|
105
114
|
case 'lessThanOrEqual':
|
|
106
115
|
result = lte(valueToCompare, conditionValue);
|
|
107
|
-
if (loggingEnabled)
|
|
116
|
+
if (loggingEnabled) {
|
|
108
117
|
console.log('Less than or equal check result:', result);
|
|
118
|
+
}
|
|
109
119
|
break;
|
|
110
120
|
case 'contains':
|
|
111
121
|
if (typeof valueToCompare === 'string') {
|
|
@@ -117,8 +127,9 @@ function applyCondition(item, condition) {
|
|
|
117
127
|
else {
|
|
118
128
|
result = false;
|
|
119
129
|
}
|
|
120
|
-
if (loggingEnabled)
|
|
130
|
+
if (loggingEnabled) {
|
|
121
131
|
console.log('Contains check result:', result);
|
|
132
|
+
}
|
|
122
133
|
break;
|
|
123
134
|
case 'notContains':
|
|
124
135
|
if (typeof valueToCompare === 'string') {
|
|
@@ -130,43 +141,51 @@ function applyCondition(item, condition) {
|
|
|
130
141
|
else {
|
|
131
142
|
result = false;
|
|
132
143
|
}
|
|
133
|
-
if (loggingEnabled)
|
|
144
|
+
if (loggingEnabled) {
|
|
134
145
|
console.log('Not contains check result:', result);
|
|
146
|
+
}
|
|
135
147
|
break;
|
|
136
148
|
case 'startsWith':
|
|
137
149
|
result = typeof valueToCompare === 'string' && startsWith(valueToCompare, conditionValue);
|
|
138
|
-
if (loggingEnabled)
|
|
150
|
+
if (loggingEnabled) {
|
|
139
151
|
console.log('Starts with check result:', result);
|
|
152
|
+
}
|
|
140
153
|
break;
|
|
141
154
|
case 'endsWith':
|
|
142
155
|
result = typeof valueToCompare === 'string' && endsWith(valueToCompare, conditionValue);
|
|
143
|
-
if (loggingEnabled)
|
|
156
|
+
if (loggingEnabled) {
|
|
144
157
|
console.log('Ends with check result:', result);
|
|
158
|
+
}
|
|
145
159
|
break;
|
|
146
160
|
case 'isEmpty':
|
|
147
161
|
result = isEmpty(valueToCompare);
|
|
148
|
-
if (loggingEnabled)
|
|
162
|
+
if (loggingEnabled) {
|
|
149
163
|
console.log('Is empty check result:', result);
|
|
164
|
+
}
|
|
150
165
|
break;
|
|
151
166
|
case 'isNull':
|
|
152
167
|
result = isNil(valueToCompare);
|
|
153
|
-
if (loggingEnabled)
|
|
168
|
+
if (loggingEnabled) {
|
|
154
169
|
console.log('Is null check result:', result);
|
|
170
|
+
}
|
|
155
171
|
break;
|
|
156
172
|
case 'isNotEmpty':
|
|
157
173
|
result = !isEmpty(valueToCompare);
|
|
158
|
-
if (loggingEnabled)
|
|
174
|
+
if (loggingEnabled) {
|
|
159
175
|
console.log('Is not empty check result:', result);
|
|
176
|
+
}
|
|
160
177
|
break;
|
|
161
178
|
case 'between':
|
|
162
179
|
result = !isNil(valueToCompare) && valueToCompare >= condition.value.from && valueToCompare <= condition.value.to;
|
|
163
|
-
if (loggingEnabled)
|
|
180
|
+
if (loggingEnabled) {
|
|
164
181
|
console.log('Between check result:', result);
|
|
182
|
+
}
|
|
165
183
|
break;
|
|
166
184
|
default:
|
|
167
185
|
result = true;
|
|
168
|
-
if (loggingEnabled)
|
|
186
|
+
if (loggingEnabled) {
|
|
169
187
|
console.log('Default case, returning true');
|
|
188
|
+
}
|
|
170
189
|
}
|
|
171
190
|
return result;
|
|
172
191
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-core.mjs","sources":["../../../../libs/platform/core/src/lib/types.ts","../../../../libs/platform/core/src/utils/countdown-timer.ts","../../../../libs/platform/core/src/utils/data-conditioner.ts","../../../../libs/platform/core/src/utils/html-utils.ts","../../../../libs/platform/core/src/utils/highlighter.ts","../../../../libs/platform/core/src/acorex-platform-core.ts"],"sourcesContent":["import { Type } from '@angular/core';\nimport { NavigationExtras } from '@angular/router';\n\nexport type AXPPartialNested<T> = {\n [K in keyof T]?: T[K] extends object ? AXPPartialNested<T[K]> : T[K];\n};\n\nexport type AXPMetaData = Record<string, any>;\n\nexport type AXPOptionsData = Record<string, any>;\n\nexport type AXPValidationRule = {\n rule: string;\n message?: string;\n options?: any;\n disabled?: boolean;\n};\n\nexport type AXPValidationRules = AXPValidationRule[];\n\nexport function getNestedKeys(obj: any, prefix: string = ''): string[] {\n let keys: string[] = [];\n for (const key in obj) {\n if (typeof obj[key] === 'object' && obj[key] !== null && !Array.isArray(obj[key])) {\n keys = [...keys, ...getNestedKeys(obj[key], prefix + key + '.')];\n } else {\n keys.push(prefix + key);\n }\n }\n return keys;\n}\n\nexport type AXPNavigateActionOptions = {\n router: {\n path: string;\n extras?: NavigationExtras & { target?: string };\n };\n modal: {\n component: Type<any>;\n title: string;\n options?: any;\n };\n};\n\nexport interface AXPNavigateActionCommand<T extends keyof AXPNavigateActionOptions> {\n type: T;\n options: AXPNavigateActionOptions[T];\n}\n","import { AXCalendarService } from '@acorex/core/date-time';\nimport { inject, Pipe, PipeTransform, signal } from '@angular/core';\nimport { interval, Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\n\n@Pipe({\n name: 'countdown',\n pure: false,\n standalone: true,\n})\nexport class AXPCountdownPipe implements PipeTransform {\n private calendarService = inject(AXCalendarService);\n\n private countdownSignal = signal(this.setupTimer());\n\n private targetDate: number = 0;\n private prevValue = 0;\n\n transform(value: number): Observable<string> {\n if (this.prevValue != value) {\n this.prevValue = value;\n const expireTime = this.calendarService.calendar.add(new Date(), 'second', value).date;\n this.updateTargetDate(expireTime.toISOString());\n }\n return this.countdownSignal();\n }\n\n private setupTimer() {\n return interval(1000).pipe(\n startWith(0),\n map(() => {\n const diff = this.targetDate - new Date().getTime();\n if (diff < 0) {\n return \"Time's up!\";\n }\n\n const times = [86400, 3600, 60, 1].map((seconds) => Math.floor((diff / 1000 / seconds) % (seconds === 1 ? 60 : 24)));\n const labels = ['d', 'h', 'm', 's'];\n return times\n .map((t, i) => (t > 0 || i === 3 ? `${t}${labels[i]}` : ''))\n .join(' ')\n .trim();\n })\n );\n }\n\n private updateTargetDate(value: string) {\n this.targetDate = new Date(value).getTime();\n }\n}\n","import { AXDataSourceFilterOption, AXDataSourceSortOption } from '@acorex/components/common';\nimport { endsWith, get, gt, gte, includes, isEmpty, isEqual, isNil, lt, lte, orderBy, startsWith } from 'lodash-es';\n\nconst loggingEnabled = false; // Set to true to enable logging, false to disable\n\nfunction applyCondition(item: any, condition: any) {\n const rawValue = condition.field ? get(item, condition.field) : null;\n const itemValue = typeof rawValue === 'string' ? rawValue.toLowerCase() : rawValue;\n const conditionValue = typeof condition.value === 'string' ? condition.value.toLowerCase() : condition.value;\n\n // Conditional Logging for debugging\n if (loggingEnabled) {\n console.log('Condition:', condition);\n console.log('Item Value:', itemValue);\n console.log('Condition Value:', conditionValue);\n }\n\n let result: boolean;\n const valueToCompare = isNil(condition.field) || condition.field === '' ? conditionValue : itemValue;\n\n switch (condition.operator.type) {\n case 'equal':\n result = isEqual(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Equal check result:', result);\n break;\n case 'notEqual':\n result = !isEqual(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Not equal check result:', result);\n break;\n case 'greaterThan':\n result = gt(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Greater than check result:', result);\n break;\n case 'lessThan':\n result = lt(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Less than check result:', result);\n break;\n case 'greaterThanOrEqual':\n result = gte(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Greater than or equal check result:', result);\n break;\n case 'lessThanOrEqual':\n result = lte(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Less than or equal check result:', result);\n break;\n case 'contains':\n if (typeof valueToCompare === 'string') {\n result = includes(valueToCompare, conditionValue);\n } else if (Array.isArray(valueToCompare)) {\n result = includes(\n valueToCompare.map((val) => val.toString().toLowerCase()),\n conditionValue\n );\n } else {\n result = false;\n }\n if (loggingEnabled) console.log('Contains check result:', result);\n break;\n case 'notContains':\n if (typeof valueToCompare === 'string') {\n result = !includes(valueToCompare, conditionValue);\n } else if (Array.isArray(valueToCompare)) {\n result = !includes(\n valueToCompare.map((val) => val.toString().toLowerCase()),\n conditionValue\n );\n } else {\n result = false;\n }\n if (loggingEnabled) console.log('Not contains check result:', result);\n break;\n case 'startsWith':\n result = typeof valueToCompare === 'string' && startsWith(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Starts with check result:', result);\n break;\n case 'endsWith':\n result = typeof valueToCompare === 'string' && endsWith(valueToCompare, conditionValue);\n if (loggingEnabled) console.log('Ends with check result:', result);\n break;\n case 'isEmpty':\n result = isEmpty(valueToCompare);\n if (loggingEnabled) console.log('Is empty check result:', result);\n break;\n case 'isNull':\n result = isNil(valueToCompare);\n if (loggingEnabled) console.log('Is null check result:', result);\n break;\n case 'isNotEmpty':\n result = !isEmpty(valueToCompare);\n if (loggingEnabled) console.log('Is not empty check result:', result);\n break;\n case 'between':\n result = !isNil(valueToCompare) && valueToCompare >= condition.value.from && valueToCompare <= condition.value.to;\n if (loggingEnabled) console.log('Between check result:', result);\n break;\n default:\n result = true;\n if (loggingEnabled) console.log('Default case, returning true');\n }\n\n return result;\n}\n\nexport function applyFilterArray(\n dataArray: any[],\n filters?: AXDataSourceFilterOption[],\n logic: 'and' | 'or' = 'and'\n): any[] {\n if (filters && filters.length) {\n return dataArray.filter((item) => {\n if (logic === 'and') {\n return filters.every((f) => {\n return f.filters ? applyFilterArray([item], f.filters, f.logic).length > 0 : applyCondition(item, f);\n });\n } else {\n // logic === 'or'\n return filters.some((f) => {\n return f.filters ? applyFilterArray([item], f.filters, f.logic).length > 0 : applyCondition(item, f);\n });\n }\n });\n } else {\n return dataArray;\n }\n}\n\nexport function applySortArray(dataArray: any, sorts: AXDataSourceSortOption[]) {\n if (sorts && sorts.length > 0) {\n const sortFields = sorts.map((s) => s.field);\n const sortOrders = sorts.map((s) => s.dir);\n return orderBy(dataArray, sortFields, sortOrders);\n } else return dataArray;\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPHtmlUtils {\n private sanitizer = inject(DomSanitizer);\n getTextFromHTML(html: string | undefined | null): string {\n if (!html) return '';\n const tempElement = document.createElement('div');\n tempElement.innerHTML = html;\n return tempElement.innerText || tempElement.textContent || '';\n }\n getSafeHTMLfromHTML(html: string | undefined | null): SafeHtml | null {\n if (!html) return null;\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Service for applying and resetting text highlighting within specified HTML elements.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AXHighlightService {\n private querySelector: string | null;\n private searchValue: string | null;\n\n constructor() { }\n\n /**\n * Highlights all occurrences of a search value within the elements matching the provided query selector.\n *\n * @param querySelector - CSS selector to identify target elements.\n * @param searchValue - Text to search and highlight.\n */\n highlight(querySelector: string, searchValue: string): void {\n this.clear();\n if (!querySelector || !searchValue) {\n return;\n }\n this.querySelector = querySelector;\n this.searchValue = searchValue;\n const elements = document.querySelectorAll(querySelector);\n elements.forEach((element) => {\n this.applyHighlight(element as HTMLElement);\n });\n }\n\n /**\n * Resets all highlighted text within the elements matching the previously used query selector.\n */\n public clear(): void {\n const elements = document.querySelectorAll(`${this.querySelector} .ax-highlight-text`);\n elements.forEach((element) => {\n let combinedText = '';\n element.querySelectorAll('span').forEach((span) => {\n combinedText += span.textContent;\n });\n\n const mergedSpan = document.createElement('span');\n mergedSpan.textContent = combinedText;\n\n element?.parentNode?.replaceChild(mergedSpan, element);\n });\n }\n\n /**\n * Applies highlighting to a specific element by matching text against the search value.\n *\n * @param element - The HTML element to apply highlights to.\n */\n private applyHighlight(element: HTMLElement): void {\n const searchRegex = new RegExp(`(${this.searchValue})`, 'gi');\n this.recursivelyHighlight(element, searchRegex);\n }\n\n /**\n * Recursively applies highlighting to text nodes within an element.\n *\n * @param element - The current node being processed.\n * @param searchRegex - Regular expression for matching text to highlight.\n */\n private recursivelyHighlight(element: Node, searchRegex: RegExp): void {\n const childNodes = Array.from(element.childNodes);\n\n childNodes.forEach((node) => {\n if (node.nodeType === Node.TEXT_NODE) {\n const textContent = node.textContent || '';\n if (textContent.match(searchRegex)) {\n const highlightedHTML = this.createHighlightedHTML(textContent, searchRegex);\n const tempContainer = document.createElement('div');\n tempContainer.innerHTML = highlightedHTML;\n\n const fragment = document.createDocumentFragment();\n Array.from(tempContainer.childNodes).forEach((child) => fragment.appendChild(child));\n\n node.replaceWith(fragment);\n }\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n this.recursivelyHighlight(node, searchRegex);\n }\n });\n }\n\n /**\n * Generates the HTML structure for highlighted text.\n *\n * @param textContent - The original text content to process.\n * @param searchRegex - Regular expression for matching text to highlight.\n * @returns A string of HTML with highlighted portions wrapped in span elements.\n */\n private createHighlightedHTML(textContent: string, searchRegex: RegExp): string {\n let parts: string[] = [];\n let match;\n let lastIndex = 0;\n let resultHTML = '<span class=\"ax-highlight-text\">';\n\n while ((match = searchRegex.exec(textContent)) !== null) {\n if (match.index > lastIndex) {\n resultHTML += `<span>${textContent.slice(lastIndex, match.index)}</span>`;\n }\n resultHTML += `<span class=\"ax-highlight\">${match[0]}</span>`;\n lastIndex = searchRegex.lastIndex;\n }\n\n if (lastIndex < textContent.length) {\n resultHTML += `<span>${textContent.slice(lastIndex)}</span>`;\n }\n\n resultHTML += '</span>';\n\n return resultHTML;\n }\n}\n","/**\n * Generated bundle index. Do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U;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-core.mjs","sources":["../../../../libs/platform/core/src/lib/types.ts","../../../../libs/platform/core/src/utils/countdown-timer.ts","../../../../libs/platform/core/src/utils/data-conditioner.ts","../../../../libs/platform/core/src/utils/html-utils.ts","../../../../libs/platform/core/src/utils/highlighter.ts","../../../../libs/platform/core/src/acorex-platform-core.ts"],"sourcesContent":["import { Type } from '@angular/core';\nimport { NavigationExtras } from '@angular/router';\n\nexport type AXPPartialNested<T> = {\n [K in keyof T]?: T[K] extends object ? AXPPartialNested<T[K]> : T[K];\n};\n\nexport type AXPMetaData = Record<string, any>;\n\nexport type AXPOptionsData = Record<string, any>;\n\nexport type AXPValidationRule = {\n rule: string;\n message?: string;\n options?: any;\n disabled?: boolean;\n};\n\nexport type AXPValidationRules = AXPValidationRule[];\n\nexport function getNestedKeys(obj: any, prefix: string = ''): string[] {\n let keys: string[] = [];\n for (const key in obj) {\n if (typeof obj[key] === 'object' && obj[key] !== null && !Array.isArray(obj[key])) {\n keys = [...keys, ...getNestedKeys(obj[key], prefix + key + '.')];\n } else {\n keys.push(prefix + key);\n }\n }\n return keys;\n}\n\nexport type AXPNavigateActionOptions = {\n router: {\n path: string;\n extras?: NavigationExtras & { target?: string };\n };\n modal: {\n component: Type<any>;\n title: string;\n options?: any;\n };\n};\n\nexport interface AXPNavigateActionCommand<T extends keyof AXPNavigateActionOptions> {\n type: T;\n options: AXPNavigateActionOptions[T];\n}\n","import { AXCalendarService } from '@acorex/core/date-time';\nimport { inject, Pipe, PipeTransform, signal } from '@angular/core';\nimport { interval, Observable } from 'rxjs';\nimport { map, startWith } from 'rxjs/operators';\n\n@Pipe({\n name: 'countdown',\n pure: false,\n standalone: true,\n})\nexport class AXPCountdownPipe implements PipeTransform {\n private calendarService = inject(AXCalendarService);\n\n private countdownSignal = signal(this.setupTimer());\n\n private targetDate: number = 0;\n private prevValue = 0;\n\n transform(value: number): Observable<string> {\n if (this.prevValue != value) {\n this.prevValue = value;\n const expireTime = this.calendarService.calendar.add(new Date(), 'second', value).date;\n this.updateTargetDate(expireTime.toISOString());\n }\n return this.countdownSignal();\n }\n\n private setupTimer() {\n return interval(1000).pipe(\n startWith(0),\n map(() => {\n const diff = this.targetDate - new Date().getTime();\n if (diff < 0) {\n return \"Time's up!\";\n }\n\n const times = [86400, 3600, 60, 1].map((seconds) => Math.floor((diff / 1000 / seconds) % (seconds === 1 ? 60 : 24)));\n const labels = ['d', 'h', 'm', 's'];\n return times\n .map((t, i) => (t > 0 || i === 3 ? `${t}${labels[i]}` : ''))\n .join(' ')\n .trim();\n })\n );\n }\n\n private updateTargetDate(value: string) {\n this.targetDate = new Date(value).getTime();\n }\n}\n","import { AXDataSourceFilterOption, AXDataSourceSortOption } from '@acorex/components/common';\nimport { endsWith, get, gt, gte, includes, isEmpty, isEqual, isNil, lt, lte, orderBy, startsWith } from 'lodash-es';\n\nconst loggingEnabled = false; // Set to true to enable logging, false to disable\n\nfunction applyCondition(item: any, condition: any) {\n const rawValue = condition.field ? get(item, condition.field) : null;\n const itemValue = typeof rawValue === 'string' ? rawValue.toLowerCase() : rawValue;\n const conditionValue = typeof condition.value === 'string' ? condition.value.toLowerCase() : condition.value;\n\n // Conditional Logging for debugging\n if (loggingEnabled) {\n console.log('Condition:', condition);\n console.log('Item Value:', itemValue);\n console.log('Condition Value:', conditionValue);\n }\n\n let result: boolean;\n const valueToCompare = isNil(condition.field) || condition.field === '' ? conditionValue : itemValue;\n const conditionType = condition?.operator?.type;\n if (!conditionType) {\n return true;\n }\n\n switch (conditionType) {\n case 'equal':\n result = isEqual(valueToCompare, conditionValue);\n if (loggingEnabled) {\n console.log('Equal check result:', result);\n }\n break;\n case 'notEqual':\n result = !isEqual(valueToCompare, conditionValue);\n if (loggingEnabled) {\n console.log('Not equal check result:', result);\n }\n break;\n case 'greaterThan':\n result = gt(valueToCompare, conditionValue);\n if (loggingEnabled) {\n console.log('Greater than check result:', result);\n }\n break;\n case 'lessThan':\n result = lt(valueToCompare, conditionValue);\n if (loggingEnabled) {\n console.log('Less than check result:', result);\n }\n break;\n case 'greaterThanOrEqual':\n result = gte(valueToCompare, conditionValue);\n if (loggingEnabled) {\n console.log('Greater than or equal check result:', result);\n }\n break;\n case 'lessThanOrEqual':\n result = lte(valueToCompare, conditionValue);\n if (loggingEnabled) {\n console.log('Less than or equal check result:', result);\n }\n break;\n case 'contains':\n if (typeof valueToCompare === 'string') {\n result = includes(valueToCompare, conditionValue);\n } else if (Array.isArray(valueToCompare)) {\n result = includes(\n valueToCompare.map((val) => val.toString().toLowerCase()),\n conditionValue\n );\n } else {\n result = false;\n }\n if (loggingEnabled) {\n console.log('Contains check result:', result);\n }\n break;\n case 'notContains':\n if (typeof valueToCompare === 'string') {\n result = !includes(valueToCompare, conditionValue);\n } else if (Array.isArray(valueToCompare)) {\n result = !includes(\n valueToCompare.map((val) => val.toString().toLowerCase()),\n conditionValue\n );\n } else {\n result = false;\n }\n if (loggingEnabled) {\n console.log('Not contains check result:', result);\n }\n break;\n case 'startsWith':\n result = typeof valueToCompare === 'string' && startsWith(valueToCompare, conditionValue);\n if (loggingEnabled) {\n console.log('Starts with check result:', result);\n }\n break;\n case 'endsWith':\n result = typeof valueToCompare === 'string' && endsWith(valueToCompare, conditionValue);\n if (loggingEnabled) {\n console.log('Ends with check result:', result);\n }\n break;\n case 'isEmpty':\n result = isEmpty(valueToCompare);\n if (loggingEnabled) {\n console.log('Is empty check result:', result);\n }\n break;\n case 'isNull':\n result = isNil(valueToCompare);\n if (loggingEnabled) {\n console.log('Is null check result:', result);\n }\n break;\n case 'isNotEmpty':\n result = !isEmpty(valueToCompare);\n if (loggingEnabled) {\n console.log('Is not empty check result:', result);\n }\n break;\n case 'between':\n result = !isNil(valueToCompare) && valueToCompare >= condition.value.from && valueToCompare <= condition.value.to;\n if (loggingEnabled) {\n console.log('Between check result:', result);\n }\n break;\n default:\n result = true;\n if (loggingEnabled) {\n console.log('Default case, returning true');\n }\n }\n\n return result;\n}\n\nexport function applyFilterArray(\n dataArray: any[],\n filters?: AXDataSourceFilterOption[],\n logic: 'and' | 'or' = 'and'\n): any[] {\n if (filters && filters.length) {\n return dataArray.filter((item) => {\n if (logic === 'and') {\n return filters.every((f) => {\n return f.filters ? applyFilterArray([item], f.filters, f.logic).length > 0 : applyCondition(item, f);\n });\n } else {\n // logic === 'or'\n return filters.some((f) => {\n return f.filters ? applyFilterArray([item], f.filters, f.logic).length > 0 : applyCondition(item, f);\n });\n }\n });\n } else {\n return dataArray;\n }\n}\n\nexport function applySortArray(dataArray: any, sorts: AXDataSourceSortOption[]) {\n if (sorts && sorts.length > 0) {\n const sortFields = sorts.map((s) => s.field);\n const sortOrders = sorts.map((s) => s.dir);\n return orderBy(dataArray, sortFields, sortOrders);\n } else return dataArray;\n}\n","import { inject, Injectable } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Injectable({ providedIn: 'root' })\nexport class AXPHtmlUtils {\n private sanitizer = inject(DomSanitizer);\n getTextFromHTML(html: string | undefined | null): string {\n if (!html) return '';\n const tempElement = document.createElement('div');\n tempElement.innerHTML = html;\n return tempElement.innerText || tempElement.textContent || '';\n }\n getSafeHTMLfromHTML(html: string | undefined | null): SafeHtml | null {\n if (!html) return null;\n return this.sanitizer.bypassSecurityTrustHtml(html);\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * Service for applying and resetting text highlighting within specified HTML elements.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AXHighlightService {\n private querySelector: string | null;\n private searchValue: string | null;\n\n constructor() { }\n\n /**\n * Highlights all occurrences of a search value within the elements matching the provided query selector.\n *\n * @param querySelector - CSS selector to identify target elements.\n * @param searchValue - Text to search and highlight.\n */\n highlight(querySelector: string, searchValue: string): void {\n this.clear();\n if (!querySelector || !searchValue) {\n return;\n }\n this.querySelector = querySelector;\n this.searchValue = searchValue;\n const elements = document.querySelectorAll(querySelector);\n elements.forEach((element) => {\n this.applyHighlight(element as HTMLElement);\n });\n }\n\n /**\n * Resets all highlighted text within the elements matching the previously used query selector.\n */\n public clear(): void {\n const elements = document.querySelectorAll(`${this.querySelector} .ax-highlight-text`);\n elements.forEach((element) => {\n let combinedText = '';\n element.querySelectorAll('span').forEach((span) => {\n combinedText += span.textContent;\n });\n\n const mergedSpan = document.createElement('span');\n mergedSpan.textContent = combinedText;\n\n element?.parentNode?.replaceChild(mergedSpan, element);\n });\n }\n\n /**\n * Applies highlighting to a specific element by matching text against the search value.\n *\n * @param element - The HTML element to apply highlights to.\n */\n private applyHighlight(element: HTMLElement): void {\n const searchRegex = new RegExp(`(${this.searchValue})`, 'gi');\n this.recursivelyHighlight(element, searchRegex);\n }\n\n /**\n * Recursively applies highlighting to text nodes within an element.\n *\n * @param element - The current node being processed.\n * @param searchRegex - Regular expression for matching text to highlight.\n */\n private recursivelyHighlight(element: Node, searchRegex: RegExp): void {\n const childNodes = Array.from(element.childNodes);\n\n childNodes.forEach((node) => {\n if (node.nodeType === Node.TEXT_NODE) {\n const textContent = node.textContent || '';\n if (textContent.match(searchRegex)) {\n const highlightedHTML = this.createHighlightedHTML(textContent, searchRegex);\n const tempContainer = document.createElement('div');\n tempContainer.innerHTML = highlightedHTML;\n\n const fragment = document.createDocumentFragment();\n Array.from(tempContainer.childNodes).forEach((child) => fragment.appendChild(child));\n\n node.replaceWith(fragment);\n }\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n this.recursivelyHighlight(node, searchRegex);\n }\n });\n }\n\n /**\n * Generates the HTML structure for highlighted text.\n *\n * @param textContent - The original text content to process.\n * @param searchRegex - Regular expression for matching text to highlight.\n * @returns A string of HTML with highlighted portions wrapped in span elements.\n */\n private createHighlightedHTML(textContent: string, searchRegex: RegExp): string {\n let parts: string[] = [];\n let match;\n let lastIndex = 0;\n let resultHTML = '<span class=\"ax-highlight-text\">';\n\n while ((match = searchRegex.exec(textContent)) !== null) {\n if (match.index > lastIndex) {\n resultHTML += `<span>${textContent.slice(lastIndex, match.index)}</span>`;\n }\n resultHTML += `<span class=\"ax-highlight\">${match[0]}</span>`;\n lastIndex = searchRegex.lastIndex;\n }\n\n if (lastIndex < textContent.length) {\n resultHTML += `<span>${textContent.slice(lastIndex)}</span>`;\n }\n\n resultHTML += '</span>';\n\n return resultHTML;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;SAoBgB,aAAa,CAAC,GAAQ,EAAE,SAAiB,EAAE,EAAA;IACzD,IAAI,IAAI,GAAa,EAAE;AACvB,IAAA,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;QACrB,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;YACjF,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;;aAC3D;AACL,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;;;AAG3B,IAAA,OAAO,IAAI;AACb;;MCpBa,gBAAgB,CAAA;AAL7B,IAAA,WAAA,GAAA;AAMU,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAE3C,IAAe,CAAA,eAAA,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QAE3C,IAAU,CAAA,UAAA,GAAW,CAAC;QACtB,IAAS,CAAA,SAAA,GAAG,CAAC;AAiCtB;AA/BC,IAAA,SAAS,CAAC,KAAa,EAAA;AACrB,QAAA,IAAI,IAAI,CAAC,SAAS,IAAI,KAAK,EAAE;AAC3B,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AU,IAAI,SAAS;AAEvB,QAAA,OAAO,UAAU;;8GA5GR,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -339,6 +339,7 @@ const AXPWidgetsCatalog = {
|
|
|
339
339
|
callbackValidation: 'callback-validation',
|
|
340
340
|
donutChart: 'donut-chart',
|
|
341
341
|
barChart: 'bar-chart',
|
|
342
|
+
gaugeChart: 'gauge-chart',
|
|
342
343
|
};
|
|
343
344
|
|
|
344
345
|
function objectKeyValueTransforms(keyName) {
|
|
@@ -375,6 +376,24 @@ function createStringProperty(ctor) {
|
|
|
375
376
|
visible: !isNil(ctor.visible) ? ctor.visible : true,
|
|
376
377
|
};
|
|
377
378
|
}
|
|
379
|
+
function createNumberProperty(ctor) {
|
|
380
|
+
return {
|
|
381
|
+
name: ctor.name,
|
|
382
|
+
title: ctor.title,
|
|
383
|
+
group: ctor.group,
|
|
384
|
+
schema: {
|
|
385
|
+
dataType: 'number',
|
|
386
|
+
defaultValue: ctor.defaultValue,
|
|
387
|
+
interface: {
|
|
388
|
+
name: ctor.name,
|
|
389
|
+
path: ctor.path ?? ctor.name,
|
|
390
|
+
type: AXPWidgetsCatalog.number,
|
|
391
|
+
options: ctor.options
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
visible: !isNil(ctor.visible) ? ctor.visible : true,
|
|
395
|
+
};
|
|
396
|
+
}
|
|
378
397
|
function createBooleanProperty(ctor) {
|
|
379
398
|
return {
|
|
380
399
|
name: ctor.name,
|
|
@@ -447,6 +466,18 @@ class AXPWidgetComponent extends AXPLayoutElement {
|
|
|
447
466
|
this.getValue = computed(() => {
|
|
448
467
|
return this.fullPath() ? this.extractValue(this.fullPath()) : null;
|
|
449
468
|
});
|
|
469
|
+
this.validationRules = computed(() => {
|
|
470
|
+
const validationsRaw = this.options()['validations'];
|
|
471
|
+
if (validationsRaw == null) {
|
|
472
|
+
return [];
|
|
473
|
+
}
|
|
474
|
+
;
|
|
475
|
+
return Object.values(this.options()['validations']).filter(c => c != null).map((c) => ({
|
|
476
|
+
rule: c.rule,
|
|
477
|
+
message: c.message,
|
|
478
|
+
options: c.options
|
|
479
|
+
}));
|
|
480
|
+
});
|
|
450
481
|
}
|
|
451
482
|
get id() {
|
|
452
483
|
return this._id;
|
|
@@ -569,38 +600,56 @@ class AXPDataListWidgetComponent extends AXPWidgetComponent {
|
|
|
569
600
|
this.textField = computed(() => this.options()['textField'] ?? 'title');
|
|
570
601
|
this.valueField = computed(() => this.options()['valueField'] ?? 'id');
|
|
571
602
|
this.selectedItems = signal([]);
|
|
572
|
-
this.rf = effect(() => {
|
|
603
|
+
this.rf = effect(async () => {
|
|
573
604
|
const rawValue = this.options()['dataSource'];
|
|
574
605
|
// static datasource class
|
|
575
606
|
if (rawValue instanceof AXDataSource) {
|
|
576
607
|
this.dataSource.set(rawValue);
|
|
577
|
-
}
|
|
608
|
+
}
|
|
609
|
+
// static array datasource
|
|
578
610
|
else if (Array.isArray(rawValue)) {
|
|
579
|
-
|
|
611
|
+
const ds = new AXDataSource({
|
|
580
612
|
key: this.valueField(),
|
|
581
|
-
pageSize:
|
|
582
|
-
|
|
583
|
-
|
|
613
|
+
pageSize: 10,
|
|
614
|
+
load: async (e) => {
|
|
615
|
+
const raw = this.options()['dataSource'];
|
|
616
|
+
return {
|
|
617
|
+
items: raw,
|
|
618
|
+
total: raw.length,
|
|
619
|
+
};
|
|
620
|
+
},
|
|
621
|
+
byKey: (key) => {
|
|
622
|
+
const raw = this.options()['dataSource'];
|
|
623
|
+
const item = raw.filter((c) => c[this.valueField()] == key);
|
|
624
|
+
return Promise.resolve(item[0]);
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
this.dataSource.set(ds);
|
|
628
|
+
}
|
|
629
|
+
// resolve data source by name
|
|
584
630
|
else if (rawValue && (typeof rawValue == 'string' || typeof rawValue == 'object')) {
|
|
585
|
-
const
|
|
586
|
-
this.dataService.get(
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
631
|
+
const id = typeof rawValue == 'object' ? rawValue['id'] : rawValue;
|
|
632
|
+
const c = await this.dataService.get(id);
|
|
633
|
+
if (this.mode == 'designer' && c?.samples?.length) {
|
|
634
|
+
this.dataSource.set(convertArrayToDataSource(c.samples, {
|
|
635
|
+
key: this.valueField(),
|
|
636
|
+
pageSize: 500,
|
|
637
|
+
}));
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
const ds = c?.source();
|
|
641
|
+
if (ds && ds instanceof Promise) {
|
|
642
|
+
const d = await ds;
|
|
643
|
+
this.dataSource.set(d);
|
|
644
|
+
}
|
|
645
|
+
else if (ds) {
|
|
646
|
+
this.dataSource.set(ds);
|
|
592
647
|
}
|
|
648
|
+
// empty datasource
|
|
593
649
|
else {
|
|
594
|
-
|
|
595
|
-
if (ds) {
|
|
596
|
-
this.dataSource.set(ds);
|
|
597
|
-
}
|
|
598
|
-
// empty datasource
|
|
599
|
-
else {
|
|
600
|
-
this.dataSource.set(convertArrayToDataSource([]));
|
|
601
|
-
}
|
|
650
|
+
this.dataSource.set(convertArrayToDataSource([]));
|
|
602
651
|
}
|
|
603
|
-
}
|
|
652
|
+
}
|
|
604
653
|
}
|
|
605
654
|
// empty datasource
|
|
606
655
|
else {
|
|
@@ -1100,7 +1149,22 @@ class AXPWidgetRendererDirective {
|
|
|
1100
1149
|
}
|
|
1101
1150
|
getEventScope() {
|
|
1102
1151
|
const scope = {};
|
|
1103
|
-
set(scope, 'context', (path) =>
|
|
1152
|
+
set(scope, 'context', (path) => {
|
|
1153
|
+
return this.onContextChanged.pipe(filter((c) => {
|
|
1154
|
+
if (path == null) {
|
|
1155
|
+
return true;
|
|
1156
|
+
}
|
|
1157
|
+
if (path.endsWith('*')) {
|
|
1158
|
+
return c.path.startsWith(path.substring(0, path.length - 1));
|
|
1159
|
+
}
|
|
1160
|
+
else if (path.startsWith('*')) {
|
|
1161
|
+
return c.path.startsWith(path.substring(1, path.length));
|
|
1162
|
+
}
|
|
1163
|
+
else {
|
|
1164
|
+
return path == c.path;
|
|
1165
|
+
}
|
|
1166
|
+
}));
|
|
1167
|
+
});
|
|
1104
1168
|
set(scope, 'from', (event) => get(this.instance.api(), event));
|
|
1105
1169
|
return scope;
|
|
1106
1170
|
}
|
|
@@ -1289,16 +1353,19 @@ const AXP_WIDGETS_FILTER_GROUP = {
|
|
|
1289
1353
|
name: 'filter',
|
|
1290
1354
|
order: 5,
|
|
1291
1355
|
title: 'Filters',
|
|
1356
|
+
hidden: true
|
|
1292
1357
|
};
|
|
1293
1358
|
const AXP_WIDGETS_CHART_GROUP = {
|
|
1294
1359
|
name: 'chart',
|
|
1295
1360
|
order: 6,
|
|
1296
1361
|
title: 'charts',
|
|
1362
|
+
hidden: true
|
|
1297
1363
|
};
|
|
1298
1364
|
const AXP_WIDGETS_VALIDATION_GROUP = {
|
|
1299
1365
|
name: 'validation',
|
|
1300
1366
|
order: 7,
|
|
1301
1367
|
title: 'validations',
|
|
1368
|
+
hidden: true,
|
|
1302
1369
|
};
|
|
1303
1370
|
const AXP_WIDGETS_GROUPS = [
|
|
1304
1371
|
AXP_WIDGETS_LAYOUT_GROUP,
|
|
@@ -1314,5 +1381,5 @@ const AXP_WIDGETS_GROUPS = [
|
|
|
1314
1381
|
* Generated bundle index. Do not edit.
|
|
1315
1382
|
*/
|
|
1316
1383
|
|
|
1317
|
-
export { AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPLayoutBuilderContextStore, AXPLayoutBuilderModule, AXPLayoutBuilderService, AXPLayoutContextChangeEvent, AXPLayoutElement, AXPPageStatus, AXPWidgetColumnRendererComponent, AXPWidgetComponent, AXPWidgetContainerComponent, AXPWidgetDataSourceProviderService, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_GROUP, AXP_WIDGETS_ADVANCE_GROUP, AXP_WIDGETS_CHART_GROUP, AXP_WIDGETS_EDITOR_GROUP, AXP_WIDGETS_FILTER_GROUP, AXP_WIDGETS_GROUPS, AXP_WIDGETS_LAYOUT_GROUP, AXP_WIDGETS_VALIDATION_GROUP, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DATASOURCE_PROVIDER, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createSelectProperty, createStringProperty, objectKeyValueTransforms };
|
|
1384
|
+
export { AXPColumnWidgetComponent, AXPDataListWidgetComponent, AXPLayoutBuilderContextStore, AXPLayoutBuilderModule, AXPLayoutBuilderService, AXPLayoutContextChangeEvent, AXPLayoutElement, AXPPageStatus, AXPWidgetColumnRendererComponent, AXPWidgetComponent, AXPWidgetContainerComponent, AXPWidgetDataSourceProviderService, AXPWidgetRegistryService, AXPWidgetRendererDirective, AXPWidgetStatus, AXPWidgetsCatalog, AXP_WIDGETS_ACTION_GROUP, AXP_WIDGETS_ADVANCE_GROUP, AXP_WIDGETS_CHART_GROUP, AXP_WIDGETS_EDITOR_GROUP, AXP_WIDGETS_FILTER_GROUP, AXP_WIDGETS_GROUPS, AXP_WIDGETS_LAYOUT_GROUP, AXP_WIDGETS_VALIDATION_GROUP, AXP_WIDGET_COLUMN_TOKEN, AXP_WIDGET_DATASOURCE_PROVIDER, AXP_WIDGET_TOKEN, cloneProperty, createBooleanProperty, createNumberProperty, createSelectProperty, createStringProperty, objectKeyValueTransforms };
|
|
1318
1385
|
//# sourceMappingURL=acorex-platform-layout-builder.mjs.map
|