@acorex/platform 19.1.2 → 19.1.4
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/index.d.ts +2 -0
- package/common/lib/app/application.types.d.ts +12 -10
- package/common/lib/configs/app.config.d.ts +0 -1
- package/common/lib/file-storage/file-storage.service.d.ts +13 -0
- package/common/lib/file-storage/file-storage.types.d.ts +143 -0
- package/common/lib/file-storage/index.d.ts +2 -0
- package/common/lib/filters/filters.service.d.ts +8 -0
- package/common/lib/filters/filters.types.d.ts +19 -0
- package/common/lib/filters/index.d.ts +2 -0
- package/common/lib/settings/setting-definition.provider.d.ts +13 -4
- package/common/lib/settings/setting.builder.d.ts +7 -8
- package/common/lib/settings/settings.provider.d.ts +2 -7
- package/common/lib/settings/settings.service.d.ts +19 -7
- package/common/lib/settings/settings.types.d.ts +15 -2
- package/core/utils/highlighter.d.ts +1 -1
- package/fesm2022/acorex-platform-auth.mjs +5 -4
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +264 -87
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +2 -2
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +286 -440
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +18 -18
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +335 -232
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-filters.mjs +124 -0
- package/fesm2022/acorex-platform-layout-filters.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-setting.mjs +219 -132
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/acorex-platform-layouts.mjs +4 -5
- package/fesm2022/acorex-platform-layouts.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-K9B_-q_K.mjs +108 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-K9B_-q_K.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DAmHq1bt.mjs +369 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DAmHq1bt.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Cd2gxLZt.mjs +87 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Cd2gxLZt.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-6sZdw013.mjs +130 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-6sZdw013.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs +74 -0
- package/fesm2022/acorex-platform-themes-default-setting-page.component-BYpCgHZb.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs +73 -0
- package/fesm2022/acorex-platform-themes-default-setting-view.component-CdmIphX1.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +40 -114
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +465 -157
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-column.component-05nKV-UV.mjs → acorex-platform-widgets-checkbox-widget-column.component-jeZBOEhl.mjs} +18 -14
- package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-jeZBOEhl.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-juhKoygA.mjs → acorex-platform-widgets-checkbox-widget-designer.component-RCi5IJOR.mjs} +5 -5
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-RCi5IJOR.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-DU1niJES.mjs +64 -0
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-DU1niJES.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-B2g0ct24.mjs → acorex-platform-widgets-color-box-widget-designer.component-CWhbgmDV.mjs} +4 -4
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CWhbgmDV.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +1396 -286
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +9 -3
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/lib/builder/builder.module.d.ts +6 -7
- package/layout/builder/lib/builder/builder.service.d.ts +9 -10
- package/layout/builder/lib/builder/context-store.service.d.ts +33 -0
- package/layout/builder/lib/builder/index.d.ts +4 -2
- package/layout/builder/lib/builder/widget-catalog.d.ts +1 -1
- package/layout/builder/lib/builder/widget-container.component.d.ts +34 -9
- package/layout/builder/lib/builder/widget-groups.d.ts +1 -0
- package/layout/builder/lib/builder/widget-map.d.ts +43 -0
- package/layout/builder/lib/builder/{widget-renderer.component.directive.d.ts → widget-renderer.directive.d.ts} +29 -4
- package/layout/builder/lib/builder/widget-status.types.d.ts +14 -0
- package/layout/builder/lib/builder/widget.types.d.ts +51 -59
- package/layout/designer/lib/preview/preview-viewer.component.d.ts +2 -2
- package/layout/designer/lib/property-viewer/widget-property-viewer.component.d.ts +2 -2
- package/layout/entity/lib/entity-master-list.viewmodel.d.ts +8 -2
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +0 -1
- package/layout/entity/lib/workflows/modify-entity.workflow.d.ts +14 -0
- package/layout/filters/README.md +3 -0
- package/layout/filters/index.d.ts +1 -0
- package/layout/filters/lib/filters.viewmodel.d.ts +30 -0
- package/layout/setting/lib/convert-setting-data.d.ts +0 -20
- package/layout/setting/lib/setting.viewmodel.d.ts +85 -22
- package/layouts/lib/admin/entity-layout/entity-details-view/entity-details-view.component.d.ts +15 -5
- package/package.json +13 -9
- package/themes/default/index.d.ts +0 -1
- package/themes/default/lib/layouts/base/simple-page/simple-page.layout.d.ts +20 -10
- package/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.d.ts +15 -5
- package/themes/default/lib/layouts/entity-layouts/entity-master-create-view/entity-master-create-view.component.d.ts +2 -1
- package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +17 -6
- package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-filters/list-view-option-filters.component.d.ts +14 -0
- package/themes/default/lib/layouts/entity-layouts/entity-master-modify-view/entity-master-modify-view.component.d.ts +2 -1
- package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +15 -5
- package/themes/default/lib/layouts/filters-layout/simple-filter-builder/filters-view.component.d.ts +13 -0
- package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +15 -5
- package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +15 -5
- package/themes/default/lib/layouts/setting-layout/setting-page/setting-page.component.d.ts +2 -4
- package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +57 -0
- package/themes/shared/index.d.ts +3 -1
- package/themes/shared/lib/components/layout-elements/index.d.ts +5 -3
- package/themes/shared/lib/components/layout-elements/{layout-page-actions.component.d.ts → layout-actions.component.d.ts} +5 -5
- package/themes/shared/lib/components/layout-elements/layout-blocks.component.d.ts +1 -1
- package/themes/shared/lib/components/layout-elements/layout-header.component.d.ts +12 -0
- package/themes/shared/lib/components/layout-elements/layout-list-component.d.ts +13 -0
- package/themes/shared/lib/components/layout-elements/layout-section.component.d.ts +9 -0
- package/themes/shared/lib/components/layout-elements/layout-side.component.d.ts +9 -0
- package/themes/shared/lib/components/theme-slot.component.d.ts +23 -13
- package/themes/shared/lib/palette.provider.d.ts +9 -0
- package/themes/shared/lib/setting.keys.d.ts +7 -2
- package/themes/shared/lib/setting.provider.d.ts +1 -0
- package/themes/shared/lib/shared.module.d.ts +5 -2
- package/themes/shared/lib/{services/theme.service.d.ts → theme.service.d.ts} +16 -24
- package/themes/shared/lib/theme.types.d.ts +25 -0
- package/themes/shared/lib/widgets/theme-color-selection/index.d.ts +2 -0
- package/themes/shared/lib/widgets/theme-color-selection/theme-color-selection-widget-edit.component.d.ts +6 -0
- package/themes/shared/lib/widgets/theme-color-selection/theme-color-selection-widget.config.d.ts +7 -0
- package/widgets/lib/properties/editors.props.d.ts +2 -0
- package/widgets/lib/properties/layout.props.d.ts +1 -0
- package/widgets/lib/widgets/advance/avatar/avatar-widget-column.component.d.ts +6 -0
- package/widgets/lib/widgets/advance/avatar/avatar-widget-designer.component.d.ts +6 -0
- package/widgets/lib/widgets/advance/avatar/avatar-widget-edit.component.d.ts +18 -0
- package/widgets/lib/widgets/advance/avatar/avatar-widget-print.component.d.ts +6 -0
- package/widgets/lib/widgets/advance/avatar/avatar-widget-view.component.d.ts +6 -0
- package/widgets/lib/widgets/advance/avatar/avatar-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/advance/avatar/index.d.ts +6 -0
- package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +9 -5
- package/widgets/lib/widgets/advance/map/map-box-widget-view.component.d.ts +6 -4
- package/widgets/lib/widgets/editors/number/number-box-widget-edit.component.d.ts +1 -7
- package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +1 -0
- package/widgets/lib/widgets/editors/toggle/toggle-widget-edit.component.d.ts +0 -2
- package/widgets/lib/widgets/filters/operations/operations.component.d.ts +9 -0
- package/widgets/lib/widgets/filters/string-filter/index.d.ts +2 -0
- package/widgets/lib/widgets/filters/string-filter/string-filter-widget-edit.component.d.ts +11 -0
- package/widgets/lib/widgets/filters/string-filter/string-filter-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/index.d.ts +5 -1
- package/widgets/lib/widgets/property-editors/border/border-widget-editor.component.d.ts +29 -6
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +31 -0
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.config.d.ts +7 -0
- package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget.type.d.ts +15 -0
- package/widgets/lib/widgets/property-editors/flex-options/index.d.ts +3 -0
- package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +72 -0
- package/widgets/lib/widgets/property-editors/property-editor.type.d.ts +35 -0
- package/widgets/lib/widgets/property-editors/spacing/index.d.ts +0 -1
- package/widgets/lib/widgets/property-editors/spacing/spacing-widget-editor.component.d.ts +20 -7
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-B13KvLX4.mjs +0 -108
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-B13KvLX4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-B6MXHPWi.mjs +0 -305
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-B6MXHPWi.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-tKCGSRQT.mjs +0 -87
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-tKCGSRQT.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-CHvC0IAV.mjs +0 -130
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-CHvC0IAV.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-05nKV-UV.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-juhKoygA.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-BkWcZ4K9.mjs +0 -72
- package/fesm2022/acorex-platform-widgets-checkbox-widget-view.component-BkWcZ4K9.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-B2g0ct24.mjs.map +0 -1
- package/layout/builder/lib/builder/widget-renderer.component.d.ts +0 -48
- package/themes/default/lib/layouts/setting-layout/index.d.ts +0 -1
- package/themes/shared/lib/components/layout-elements/layout-page-header.component.d.ts +0 -11
- package/themes/shared/lib/components/layout-elements/layout-page-side.component.d.ts +0 -5
- package/widgets/lib/widgets/property-editors/border/border-widget-type.d.ts +0 -18
- package/widgets/lib/widgets/property-editors/spacing/spacing-widget-type.d.ts +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-layout-setting.mjs","sources":["../../../../libs/platform/layout/setting/src/lib/convert-setting-data.ts","../../../../libs/platform/layout/setting/src/lib/setting.viewmodel.ts","../../../../libs/platform/layout/setting/src/acorex-platform-layout-setting.ts"],"sourcesContent":["import { AXTreeViewSchema } from '@acorex/components/tree-view/lib/tree-view.class';\nimport { AXPSettingDefinitionGroup, AXPSettingDefinitionSection } from '@acorex/platform/common';\n\n/**\n * Converts a list of AXPSettingDefinitionGroup into a tree structure of AXTreeViewSchema.\n * This function processes groups and their nested sub-groups, recursively creating a tree.\n *\n * @param groups - Array of top-level setting groups to be converted into tree view schema.\n * @param parentId - The parent ID for nested groups, passed down recursively. (Optional, default is undefined)\n *\n * @returns An array of AXTreeViewSchema representing the hierarchical structure of groups.\n */\nexport function convertToTreeViewSchema(\n groups: AXPSettingDefinitionGroup[],\n parentId?: string | number\n): AXTreeViewSchema[] {\n // Helper function to traverse and convert a single group (and its sub-groups)\n const traverseGroups = (group: AXPSettingDefinitionGroup, parent?: string | number): AXTreeViewSchema => {\n const currentId = group.name;\n\n // Schema for the current group\n const schema: AXTreeViewSchema = {\n id: currentId, // Unique identifier for the group (using group name)\n parentId: parent, // Parent group ID, passed down recursively\n text: group.title, // Display title of the group\n //tooltip: group.description, // Optional description as tooltip\n hasChild: group.groups.length > 0, // Whether the group has child groups\n isExpanded: false, // Default state for expansion (optional)\n icon: group.icon,\n childrens: group.groups.length > 0 ? [] : undefined, // Child groups array (undefined if no children)\n };\n\n // Recursively process nested groups (sub-groups inside the current group)\n group.groups.forEach((subGroup) => {\n const childSchema = traverseGroups(subGroup, currentId); // Create schema for sub-group\n schema.childrens?.push(childSchema); // Add the child schema to the parent group's children\n });\n\n return schema; // Return the group schema with its children (if any)\n };\n\n // Initialize an array to hold the top-level groups' schemas\n const treeViewSchemas: AXTreeViewSchema[] = [];\n\n // Process each top-level group and convert it into tree view schema\n groups.forEach((group) => {\n treeViewSchemas.push(traverseGroups(group, parentId)); // Add the schema for each group\n });\n\n // Return the resulting hierarchical structure\n return treeViewSchemas;\n}\n\n/**\n * Recursively searches for a specific `id` in a tree structure and updates its `active` property to `true`.\n * Additionally, ensures all other nodes have their `active` property set to `false`.\n *\n * @param tree - The tree structure to search, represented as an array of AXTreeViewSchema nodes.\n * @param targetId - The `id` of the node to activate.\n * @returns The updated tree structure with the target node activated and others deactivated.\n */\nexport function setActiveByValueField(tree: AXTreeViewSchema[], targetId: string | number): AXTreeViewSchema[] {\n return tree.map((node) => {\n // Set active property for the target node\n node.active = node.id === targetId;\n\n // Recursively process children if they exist\n if (node.childrens && node.childrens.length > 0) {\n node.childrens = setActiveByValueField(node.childrens, targetId);\n }\n\n return node;\n });\n}\nexport function searchSettings(groups: AXPSettingDefinitionGroup[], search: string): AXPSettingDefinitionGroup[] {\n const sectionMatchResult: AXPSettingDefinitionGroup[] = [];\n const settingMatchResult: AXPSettingDefinitionGroup[] = [];\n const processedGroups = new Set<string>();\n\n const createGroupIdentifier = (group: AXPSettingDefinitionGroup): string => `${group.name}-${group.title}`;\n\n const addGroupToResult = (\n group: AXPSettingDefinitionGroup,\n sections: AXPSettingDefinitionSection[],\n resultArray: AXPSettingDefinitionGroup[]\n ) => {\n const groupId = createGroupIdentifier(group);\n if (!processedGroups.has(groupId)) {\n resultArray.push({\n ...group,\n sections,\n groups: [], // Exclude nested groups\n });\n processedGroups.add(groupId);\n }\n };\n\n const processSections = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => boolean\n ) => {\n const matchedSections = group.sections.filter(filterFn);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, sectionMatchResult);\n }\n };\n\n const processSettings = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => AXPSettingDefinitionSection | null\n ) => {\n const matchedSections = group.sections\n .map(filterFn)\n .filter((section): section is AXPSettingDefinitionSection => section !== null);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, settingMatchResult);\n }\n };\n\n const sectionMatches = (section: AXPSettingDefinitionSection): boolean =>\n section.name.toLowerCase().includes(search.toLowerCase()) ||\n section.title.toLowerCase().includes(search.toLowerCase());\n\n const filterSettings = (section: AXPSettingDefinitionSection): AXPSettingDefinitionSection | null => {\n const matchedSettings = section.settings.filter(\n (setting) =>\n setting.name.toLowerCase().includes(search.toLowerCase()) ||\n setting.title.toLowerCase().includes(search.toLowerCase())\n );\n return matchedSettings.length > 0 ? { ...section, settings: matchedSettings } : null;\n };\n\n const processGroupRecursively = (group: AXPSettingDefinitionGroup) => {\n processSections(group, sectionMatches); // Match sections with all settings\n processSettings(group, filterSettings); // Match settings within sections\n group.groups.forEach(processGroupRecursively); // Recurse into nested groups\n };\n\n groups.forEach(processGroupRecursively);\n\n return [...sectionMatchResult, ...settingMatchResult];\n}\n","import { AXToastService } from '@acorex/components/toast';\nimport { AXTreeItemClickBaseEvent, AXTreeViewSchema } from '@acorex/components/tree-view/lib/tree-view.class';\nimport { AXPlatform } from '@acorex/core/platform';\nimport {\n AXPGroupSearchResult,\n AXPSettingDefinitionGroup,\n AXPSettingDefinitionProviderService,\n AXPSettingValueProviderService,\n} from '@acorex/platform/common';\nimport { AXHighlightService } from '@acorex/platform/core';\nimport { computed, effect, inject, Injectable, signal } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\nimport { filter, take } from 'rxjs';\nimport { convertToTreeViewSchema, searchSettings, setActiveByValueField } from './convert-setting-data';\nimport { isEmpty, isEqual } from 'lodash-es';\nimport { AXPLayoutContextEvent } from '@acorex/platform/layout/builder';\n\n\n\n@Injectable({ providedIn: 'root' })\nexport class AXPSettingsViewModel {\n\n private readonly router = inject(Router);\n private readonly settingDefinitionService = inject(AXPSettingDefinitionProviderService);\n private readonly settingValueService = inject(AXPSettingValueProviderService);\n private readonly platform = inject(AXPlatform);\n private readonly toastService = inject(AXToastService);\n private readonly highlightService = inject(AXHighlightService);\n\n private activatedRoute: ActivatedRoute;\n\n isMobile = signal(this.platform.is('MD'));\n fullRoute = this.router.url.split('/settings')[0] + '/settings/';\n\n search = signal('');\n searchResult = signal<AXPSettingDefinitionGroup[] | undefined>(undefined);\n\n\n public activatedGroup = signal<string | undefined>(undefined);\n\n private loadedItems = signal<AXPSettingDefinitionGroup[] | null>(null);\n\n formattedData = signal<AXTreeViewSchema[]>([]);\n\n\n groups = computed<AXPGroupSearchResult | null>(() => {\n if (this.activatedGroup()) {\n return this.settingDefinitionService.findGroup(this.activatedGroup()!);\n } else {\n return null\n };\n });\n\n #effect2 = effect(\n () => {\n if (this.search()) {\n this.searchResult.set(searchSettings(this.loadedItems()!, this.search()));\n }\n setTimeout(() => {\n this.highlightService.highlight('#ax-settings', this.search());\n });\n }\n );\n\n\n /**\n * @ignore\n */\n constructor() {\n this.settingValueService.onChanged.subscribe(async () => {\n const currentContext = await this.settingValueService.all();\n this.context.update((ctx) => ({ ...ctx, ...currentContext }));\n });\n }\n\n async initializeService(activatedRoute: ActivatedRoute) {\n // Initial setup\n await this.load();\n\n this.activatedRoute = activatedRoute;\n //\n this.router.events.pipe(\n filter((event) => event instanceof NavigationEnd)\n ).subscribe(() => {\n this.updateGroupParam();\n });\n //\n this.updateGroupParam();\n }\n\n // Fetch settings data\n private async load(): Promise<void> {\n const items = await this.settingDefinitionService.items();\n this.loadedItems.set(items);\n const formattedData = convertToTreeViewSchema(this.loadedItems()!);\n this.formattedData.set(formattedData);\n const currentContext = await this.settingValueService.all();\n const defaults = this.settingDefinitionService.defaultValues();\n this.context.set({ ...defaults, ...currentContext });\n this.previousContext.set(this.context());\n }\n\n\n // Update group param logic\n private updateGroupParam(): void {\n // If no child routes exist, set groupParam to null\n if (this.activatedRoute.children.length === 0) {\n this.activatedGroup.set(undefined);\n return;\n }\n // Traverse child routes to check for the group parameter\n this.activatedRoute.children.forEach((childRoute) => {\n childRoute.paramMap.pipe(take(1)).subscribe(async (params) => {\n const group = params.get('group');\n this.activatedGroup.update(() => group || undefined);\n if (group) {\n this.formattedData.set(setActiveByValueField(this.formattedData(), group));\n }\n });\n });\n }\n\n public handleSelectGroup(item: AXTreeItemClickBaseEvent) {\n const value = item.data?.['id'];\n this.router.navigate([`${value}`], { relativeTo: this.activatedRoute });\n this.search.set('');\n }\n\n context = signal<Record<any, any>>({});\n private previousContext = signal<Record<any, any>>({});\n\n handleContextChanged(e: AXPLayoutContextEvent) {\n if (e.init) {\n this.previousContext.set(e.data);\n }\n else {\n this.context.set(e.data);\n }\n }\n\n isSaving = signal(false);\n\n canCancel = computed(() => isEmpty(this.context()));\n canSave = computed(\n () =>\n !this.isSaving() &&\n !isEmpty(this.context()) &&\n !isEqual(this.context(), this.previousContext())\n );\n\n // Save settings logic\n public async apply(): Promise<void> {\n try {\n // Update the previous context and set the saving state\n this.previousContext.set(this.context());\n this.isSaving.set(true);\n\n // Save the settings\n await this.settingValueService.set(this.context());\n\n // Show success notification\n this.toastService.show({\n color: 'success',\n title: 'Settings Saved',\n content: 'Your changes have been saved successfully.',\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n } catch (error: any) {\n // Handle and show errors\n console.error('Error saving settings:', error);\n this.toastService.show({\n color: 'danger',\n title: 'Save Failed',\n content: error?.['message'] || 'An error occurred while saving your settings. Please try again.',\n location: 'bottom-center',\n closeButton: true,\n timeOut: 5000,\n timeOutProgress: true,\n });\n } finally {\n // Reset the saving state\n this.isSaving.set(false);\n }\n }\n\n\n // Cancel settings logic\n public reset(): void {\n this.context.set(this.previousContext());\n }\n\n // Cancel settings logic\n public resetToDefault(): void {\n const defaults = this.settingDefinitionService.defaultValues();\n this.context.set(defaults);\n }\n\n\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;;;;;;;;AAQG;AACa,SAAA,uBAAuB,CACrC,MAAmC,EACnC,QAA0B,EAAA;;AAG1B,IAAA,MAAM,cAAc,GAAG,CAAC,KAAgC,EAAE,MAAwB,KAAsB;AACtG,QAAA,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI;;AAG5B,QAAA,MAAM,MAAM,GAAqB;YAC/B,EAAE,EAAE,SAAS;YACb,QAAQ,EAAE,MAAM;AAChB,YAAA,IAAI,EAAE,KAAK,CAAC,KAAK;;YAEjB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YACjC,UAAU,EAAE,KAAK;YACjB,IAAI,EAAE,KAAK,CAAC,IAAI;AAChB,YAAA,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,SAAS;SACpD;;QAGD,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAI;YAChC,MAAM,WAAW,GAAG,cAAc,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;YACxD,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AACtC,SAAC,CAAC;QAEF,OAAO,MAAM,CAAC;AAChB,KAAC;;IAGD,MAAM,eAAe,GAAuB,EAAE;;AAG9C,IAAA,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AACvB,QAAA,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AACxD,KAAC,CAAC;;AAGF,IAAA,OAAO,eAAe;AACxB;AAEA;;;;;;;AAOG;AACa,SAAA,qBAAqB,CAAC,IAAwB,EAAE,QAAyB,EAAA;AACvF,IAAA,OAAO,IAAI,CAAC,GAA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A,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA;;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACnBlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-setting.mjs","sources":["../../../../libs/platform/layout/setting/src/lib/convert-setting-data.ts","../../../../libs/platform/layout/setting/src/lib/setting.viewmodel.ts","../../../../libs/platform/layout/setting/src/acorex-platform-layout-setting.ts"],"sourcesContent":["import { AXPSettingDefinitionGroup, AXPSettingDefinitionSection } from '@acorex/platform/common';\n\n\nexport function searchSettings(groups: AXPSettingDefinitionGroup[], search: string): AXPSettingDefinitionGroup[] {\n const sectionMatchResult: AXPSettingDefinitionGroup[] = [];\n const settingMatchResult: AXPSettingDefinitionGroup[] = [];\n const processedGroups = new Set<string>();\n\n const createGroupIdentifier = (group: AXPSettingDefinitionGroup): string => `${group.name}-${group.title}`;\n\n const addGroupToResult = (\n group: AXPSettingDefinitionGroup,\n sections: AXPSettingDefinitionSection[],\n resultArray: AXPSettingDefinitionGroup[]\n ) => {\n const groupId = createGroupIdentifier(group);\n if (!processedGroups.has(groupId)) {\n resultArray.push({\n ...group,\n sections,\n groups: [], // Exclude nested groups\n });\n processedGroups.add(groupId);\n }\n };\n\n const processSections = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => boolean\n ) => {\n const matchedSections = group.sections.filter(filterFn);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, sectionMatchResult);\n }\n };\n\n const processSettings = (\n group: AXPSettingDefinitionGroup,\n filterFn: (section: AXPSettingDefinitionSection) => AXPSettingDefinitionSection | null\n ) => {\n const matchedSections = group.sections\n .map(filterFn)\n .filter((section): section is AXPSettingDefinitionSection => section !== null);\n if (matchedSections.length > 0) {\n addGroupToResult(group, matchedSections, settingMatchResult);\n }\n };\n\n const sectionMatches = (section: AXPSettingDefinitionSection): boolean =>\n section.name.toLowerCase().includes(search.toLowerCase()) ||\n section.title.toLowerCase().includes(search.toLowerCase());\n\n const filterSettings = (section: AXPSettingDefinitionSection): AXPSettingDefinitionSection | null => {\n const matchedSettings = section.settings.filter(\n (setting) =>\n setting.name.toLowerCase().includes(search.toLowerCase()) ||\n setting.title.toLowerCase().includes(search.toLowerCase())\n );\n return matchedSettings.length > 0 ? { ...section, settings: matchedSettings } : null;\n };\n\n const processGroupRecursively = (group: AXPSettingDefinitionGroup) => {\n processSections(group, sectionMatches); // Match sections with all settings\n processSettings(group, filterSettings); // Match settings within sections\n group.groups.forEach(processGroupRecursively); // Recurse into nested groups\n };\n\n groups.forEach(processGroupRecursively);\n\n return [...sectionMatchResult, ...settingMatchResult];\n}\n","import { AXToastService } from '@acorex/components/toast';\nimport {\n AXPGroupSearchResult,\n AXPSettingDefinitionGroup,\n AXPSettingDefinitionProviderService,\n AXPSettingDefinitionSection,\n AXPSettingScope,\n AXPSettingScopeKey,\n AXPSettingValueProviderService,\n} from '@acorex/platform/common';\nimport { AXHighlightService } from '@acorex/platform/core';\nimport { computed, effect, inject, Injectable, input, signal } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\nimport { filter, take } from 'rxjs';\nimport { searchSettings } from './convert-setting-data';\nimport { get, isEmpty, isEqual, isNil, } from 'lodash-es';\nimport { AXPLayoutBuilderService, AXPLayoutContextChangeEvent, AXPPageStatus } from '@acorex/platform/layout/builder';\nimport { AXPLayoutThemeService } from '@acorex/platform/themes/shared';\nimport { AXFormComponent } from '@acorex/components/form';\nimport { AXDialogService } from '@acorex/components/dialog';\n\n\n@Injectable()\nexport class AXPSettingsViewModel {\n\n private readonly router = inject(Router);\n private readonly settingDefinitionService = inject(AXPSettingDefinitionProviderService);\n private readonly settingValueService = inject(AXPSettingValueProviderService);\n private readonly toastService = inject(AXToastService);\n private readonly dialogService = inject(AXDialogService);\n private readonly highlightService = inject(AXHighlightService);\n public readonly layout = inject(AXPLayoutThemeService);\n private activatedRoute = inject(ActivatedRoute);\n\n public form: AXFormComponent;\n public builder: AXPLayoutBuilderService;\n\n\n public searchExpression = signal('');\n private isValidQuery = (expression: string) => !isNil(expression) && !isEmpty(expression);\n public isSearching = computed(() => this.isValidQuery(this.searchExpression()));\n\n public searchResult = signal<AXPSettingDefinitionGroup[]>([]);\n public isSaving = signal(false);\n\n public isBusy = signal(false);\n\n public activateGroup = signal<string | undefined>(undefined);\n private activeScope = signal<AXPSettingScopeKey>('U');\n\n public loadedItems = signal<AXPSettingDefinitionGroup[] | null>(null);\n\n private scopeName = () => {\n return this.activatedRoute?.snapshot?.paramMap?.get('scope')?.trim().toLowerCase() ?? 'user';\n };\n\n private resolveScopeKey(name: string): AXPSettingScopeKey {\n const scopeMap: Record<string, AXPSettingScopeKey> = {\n environment: AXPSettingScope.Environment,\n global: AXPSettingScope.Global,\n tenant: AXPSettingScope.Tenant,\n user: AXPSettingScope.User,\n };\n return scopeMap[name.toLowerCase()] ?? AXPSettingScope.User;\n }\n\n private resolveScope(): AXPSettingScope {\n return this.resolveScopeKey(this.scopeName()) as AXPSettingScope;\n }\n\n public title = computed(() => {\n // fake change detect simulate\n this.activeScope();\n //\n return `settings.${this.scopeName()}.title`;\n });\n\n\n groups = computed<AXPGroupSearchResult | null>(() => {\n if (this.activateGroup()) {\n return this.settingDefinitionService.findGroup(this.activeScope(), this.activateGroup()!);\n } else {\n return null\n };\n });\n\n public hasGroup = computed(() => this.activateGroup() != null);\n public showSide = computed(() => this.layout.isLarge() && this.hasGroup());\n\n #effect2 = effect(\n () => {\n if (this.searchExpression()) {\n this.searchResult.set(searchSettings(this.loadedItems()!, this.searchExpression()));\n }\n }\n );\n\n\n /**\n * @ignore\n */\n constructor() {\n this.settingValueService.onChanged.pipe(filter(c => c.scope == this.resolveScope())).subscribe((e) => {\n e.keys.forEach(k => {\n const currentValue = e.values[k];\n const contextValue = get(this.context(), k);\n const previousValue = get(this.previousContext(), k);\n // Update only if there are actual changes\n if (!isEqual(previousValue, currentValue) || !isEqual(currentValue, contextValue)) {\n this.previousContext.update(prev => ({\n ...prev,\n [k]: currentValue, // Use backend-provided value\n }));\n this.context.update(ctx => ({\n ...ctx,\n [k]: currentValue,\n }));\n }\n });\n });\n this.load();\n //\n this.router.events.pipe(\n filter((event) => event instanceof NavigationEnd)\n ).subscribe(async () => {\n await this.updateGroupParam();\n });\n }\n\n async load() {\n //\n this.activeScope.set(this.resolveScope());\n //\n const items = await this.settingDefinitionService.getListAsync(this.activeScope());\n this.loadedItems.set(items);\n const currentContext = await this.settingValueService.scope(this.resolveScope()).all();\n const defaults = await this.settingValueService.scope(this.resolveScope()).defaultValues();\n this.context.set({ ...defaults, ...currentContext });\n this.previousContext.set(this.context());\n //\n await this.updateGroupParam();\n if (!this.activateGroup() && this.layout.isLarge() && !this.isSearching()) {\n await this.redirectToFirstGroup();\n }\n }\n\n\n\n\n private async updateGroupParam(): Promise<void> {\n const query = this.activatedRoute.snapshot.queryParams[\"q\"];\n const scope = this.resolveScope();\n const group = this.activatedRoute.snapshot.paramMap.get(\"group\");\n\n if ((this.activeScope() && this.activeScope() != scope) || (this.activateGroup() != group)) {\n this.activateGroup.set(undefined);\n await this.load();\n return;\n }\n\n if (this.isValidQuery(query)) {\n this.searchExpression.set(query);\n }\n if (this.isSearching()) {\n setTimeout(() => {\n this.highlightService.highlight('#ax-settings', this.searchExpression());\n }, 100);\n }\n else {\n this.highlightService.clear();\n }\n\n // If no child routes exist, set activateGroup to undefined\n if (this.activatedRoute.children.length === 0) {\n this.activateGroup.set(undefined);\n return;\n }\n // Traverse child routes to check for the group parameter\n for (const childRoute of this.activatedRoute.children) {\n const params = await childRoute.paramMap.pipe(take(1)).toPromise();\n const group = params?.get('group');\n if (group) {\n this.activateGroup.set(group);\n }\n }\n }\n\n public async redirectToFirstGroup(): Promise<void> {\n const firstGroup = this.determineFirstGroup();\n if (firstGroup) {\n const app = this.activatedRoute.snapshot.params['app'];\n const scope = this.activatedRoute.snapshot.params['scope'];\n await this.router.navigate([app, 'settings', scope, firstGroup], { replaceUrl: true });\n }\n }\n\n public async navigateUpLevel(): Promise<void> {\n const func = async () => {\n const app = this.activatedRoute.snapshot.params['app'];\n const scope = this.activatedRoute.snapshot.params['scope'];\n await this.router.navigate([app, 'settings', scope]);\n }\n\n if (this.isDirty()) {\n const dialogResult = await this.dialogService.confirm('Unsaved Changes', 'You have unsaved changes. Are you sure you want to go back without saving?', 'warning');\n if (dialogResult.result) {\n await func();\n }\n }\n else {\n await func();\n }\n }\n\n private determineFirstGroup(): string | null {\n const groups = this.loadedItems();\n return groups && groups.length > 0 ? groups[0].name : null;\n }\n\n public handleSelectGroup(item: AXPSettingDefinitionGroup) {\n this.router.navigate([`${item.name}`], { relativeTo: this.activatedRoute });\n this.searchExpression.set('');\n }\n\n context = signal<Record<any, any>>({});\n private previousContext = signal<Record<any, any>>({});\n\n async handleContextChanged(e: AXPLayoutContextChangeEvent) {\n if (e.state == 'initiated') {\n this.previousContext.set(e.data);\n }\n else {\n this.context.set(e.data);\n }\n }\n\n\n isDirty(section?: AXPSettingDefinitionSection): boolean {\n if (section) {\n // Check for changes in the specific section\n return section.settings.some(c =>\n !isEqual(get(this.context(), c.name), get(this.previousContext(), c.name))\n );\n } else {\n // Check for changes globally based on loadedItems keys\n return this.loadedItems()?.some(group =>\n group.sections.some(sec =>\n sec.settings.some(setting => {\n const currentValue = get(this.context(), setting.name);\n const previousValue = get(this.previousContext(), setting.name);\n return !isEqual(currentValue, previousValue);\n })\n )\n ) || false;\n }\n }\n\n // Save settings logic\n public async apply(section?: AXPSettingDefinitionSection): Promise<void> {\n try {\n this.isSaving.set(true);\n this.builder.setStatus(AXPPageStatus.Submitting);\n\n const formResult = await this.form.validate();\n if (!formResult.result) {\n this.toastService.show({\n color: 'danger',\n title: 'Review Needed',\n content: 'Invalid configuration detected. Please review your inputs.',\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n this.isSaving.set(false);\n this.builder.setStatus(AXPPageStatus.Error);\n return;\n }\n\n if (section) {\n // Apply changes for the specific section\n const changes: Record<string, any> = {}\n section.settings.forEach(c => {\n changes[c.name] = get(this.context(), c.name);\n });\n if (!isEmpty(changes)) {\n await this.settingValueService.scope(this.resolveScope()).set(changes);\n }\n } else {\n // Save the settings\n await this.settingValueService.scope(this.resolveScope()).set(this.context());\n }\n this.builder.setStatus(AXPPageStatus.Submitted);\n // Show success notification\n this.toastService.show({\n color: 'success',\n title: 'Settings Saved',\n content: 'Your changes have been saved successfully.',\n location: 'bottom-center',\n closeButton: true,\n timeOut: 3000,\n timeOutProgress: true,\n });\n } catch (error: any) {\n // Handle and show errors\n this.builder.setStatus(AXPPageStatus.Error);\n console.error('Error saving settings:', error);\n this.toastService.show({\n color: 'danger',\n title: 'Save Failed',\n content: error?.['message'] || 'An error occurred while saving your settings. Please try again.',\n location: 'bottom-center',\n closeButton: true,\n timeOut: 5000,\n timeOutProgress: true,\n });\n } finally {\n this.isSaving.set(false);\n }\n }\n\n // discard settings logic\n public async discard(section?: AXPSettingDefinitionSection): Promise<void> {\n this.form.resetErrors();\n if (section) {\n // Discard changes for the specific section\n section.settings.forEach(c => {\n const previousValue = get(this.previousContext(), c.name);\n this.context.update(ctx => ({\n ...ctx,\n [c.name]: previousValue\n }));\n });\n } else {\n // Discard changes for all sections\n this.context.set(this.previousContext());\n }\n }\n\n // Cancel settings logic\n public async resetToDefault(): Promise<void> {\n const defaults = await this.settingValueService.scope(this.resolveScope()).defaultValues();\n // Update the context with the defaults\n this.context.set(defaults);\n //\n await this.apply();\n }\n\n\n public async search(expression: string) {\n this.searchExpression.set(expression);\n const app = this.activatedRoute.snapshot.params['app'];\n const scope = this.activatedRoute.snapshot.params['scope'];\n //\n if (this.isValidQuery(expression)) {\n await this.router.navigate([app, 'settings', scope, this.activateGroup() ?? ''], { queryParams: { q: expression } });\n }\n else {\n await this.router.navigate([app, 'settings', scope, this.activateGroup() ?? '']);\n }\n }\n\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGgB,SAAA,cAAc,CAAC,MAAmC,EAAE,MAAc,EAAA;IAChF,MAAM,kBAAkB,GAAgC,EAAE;IAC1D,MAAM,kBAAkB,GAAgC,EAAE;AAC1D,IAAA,MAAM,eAAe,GAAG,IAAI,GAAG,EAAU;AAEzC,IAAA,MAAM,qBAAqB,GAAG,CAAC,KAAgC,KAAa,CAAA,EAAG,KAAK,CAAC,IAAI,CAAI,CAAA,EAAA,KAAK,CAAC,KAAK,EAAE;IAE1G,MAAM,gBAAgB,GAAG,CACvB,KAAgC,EAChC,QAAuC,EACvC,WAAwC,KACtC;AACF,QAAA,MAAM,OAAO,GAAG,qBAAqB,CAAC,KAAK,CAAC;QAC5C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACjC,WAAW,CAAC,IAAI,CAAC;AACf,gBAAA,GAAG,KAAK;gBACR,QAAQ;gBACR,MAAM,EAAE,EAAE;AACX,aAAA,CAAC;AACF,YAAA,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC;;AAEhC,KAAC;AAED,IAAA,MAAM,eAAe,GAAG,CACtB,KAAgC,EAChC,QAA2D,KACzD;QACF,MAAM,eAAe,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC;AACvD,QAAA,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;AAC9B,YAAA,gBAAgB,CAAC,KAAK,EAAE,eAAe,EAAE,kBAAkB,CAAC;;AAEhE,KAAC;AAED,IAAA,MAAM,eAAe,GAAG,CACtB,KAAgC,EAChC,QAAsF,KACpF;AACF,QAAA,MAAM,eAAe,GAAG,KAAK,CAAC;aAC3B,GAAG,CAAC,QAAQ;aACZ,MAAM,CAAC,CAAC,OAAO,KAA6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W,EAAE,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,CAAC;;aAEjH;YACH,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;;;8GA/UzE,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAApB,oBAAoB,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC;;;ACtBD;;AAEG;;;;"}
|
|
@@ -347,7 +347,6 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
|
347
347
|
setTimeout(() => {
|
|
348
348
|
dialog.close();
|
|
349
349
|
}, 300);
|
|
350
|
-
;
|
|
351
350
|
// Handle different scenarios for alerts
|
|
352
351
|
if (successfulPromises > 0 && failedPromises === 0) {
|
|
353
352
|
// All items deleted successfully
|
|
@@ -367,7 +366,7 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
|
367
366
|
}
|
|
368
367
|
else {
|
|
369
368
|
// No items to delete (no successful or failed promises)
|
|
370
|
-
await this.dialogService.alert('No Deletion Needed', 'No items were available to delete.', '
|
|
369
|
+
await this.dialogService.alert('No Deletion Needed', 'No items were available to delete.', 'primary');
|
|
371
370
|
}
|
|
372
371
|
}
|
|
373
372
|
else {
|
|
@@ -1085,7 +1084,7 @@ class AXPEntityCreateCustomViewComponent extends AXBasePageComponent {
|
|
|
1085
1084
|
{
|
|
1086
1085
|
provide: AXUnsubscriber,
|
|
1087
1086
|
},
|
|
1088
|
-
], usesInheritance: true, ngImport: i0, template: "<ax-header class=\"ax-p-4 ax-flex ax-justify-between ax-border-b\">\n <div class=\"ax-flex ax-items-center\">\n @if (showNameInput() && mode==='create') {\n <div class=\"ax-w-60\">\n <ax-text-box class=\"ax-sm\" [(ngModel)]=\"selectedView.title\">\n @if(showNameInput()){\n <ax-suffix>\n <ax-button (onClick)=\"changeViewNameToggle()\" look=\"default\">\n <ax-icon class=\"fa-sodild fas fa-check ax-text-sm\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n }\n </ax-text-box>\n </div>\n }@else {\n <span class=\"ax-text-lg ax-font-semibold\">{{ selectedView.title }}</span>\n } @if (mode===\"create\") {\n <ax-button class=\"ax-xs\" (onClick)=\"changeViewNameToggle()\" color=\"default\">\n @if(!showNameInput() ){\n <ax-icon class=\"fa-regular fa-pen ax-text-sm ax-text-neutral-600\"> </ax-icon>\n }\n </ax-button>\n }\n </div>\n <ax-close-button></ax-close-button>\n</ax-header>\n<div class=\"ax-p-4\">\n <ax-tabs [content]=\"contents\" look=\"with-line\">\n <ax-tab-item [text]=\"('entity.columns' | translate | async) ?? 'Columns'\">\n <ax-suffix>\n <ax-badge [text]=\"visibleColumns().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div class=\"ax-flex ax-flex-col ax-gap-4 ax-p-4 ax-select-none ax-h-[400px]\" cdkDropList (cdkDropListDropped)=\"drop('columns', $event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-overflow-auto ax-pe-2\">\n <ng-container *ngFor=\"let item of columns()\">\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title }}</p>\n </div>\n <ax-switch class=\"ax-sm\" [(ngModel)]=\"item.visible\" (onValueChanged)=\"updateColumnItem($event, item.name)\"></ax-switch>\n </div>\n </ng-container>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n <ax-tab-item text=\"Conditions\">\n <ax-suffix>\n <ax-badge [text]=\"conditions().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div\n class=\"ax-flex ax-flex-col ax-justify-start ax-gap-4 ax-py-4 ax-select-none ax-h-[400px]\"\n [class.ax-justify-center]=\"!conditions().length\"\n >\n @if(!conditions().length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">No Filters Selected</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">Please select field(s) that you want to filter</span>\n </div>\n } @else {\n <div class=\"ax-sorted-list ax-px-4 ax-py-1 ax-overflow-auto\">\n <div cdkDropList (cdkDropListDropped)=\"drop('conditions', $event)\" class=\"ax-flex ax-flex-col ax-gap-2\">\n @for(item of conditions(); track item.name ){\n <div cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-ms-4 ax-flex ax-items-start ax-gap-2\">\n <ax-label>{{ loader.getProp(item.name)?.title }}</ax-label>\n @if(getOperatorTitle(item.name,item.operator)){\n <ax-badge class=\"ax-text-xs\" color=\"primary\" [look]=\"'twotone'\" [text]=\"getOperatorTitle(item.name, item.operator)\"></ax-badge>\n }\n </div>\n <div class=\"ax-flex ax-group ax-items-center ax-gap-2\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <div class=\"ax-w-full\">\n <axp-widget-filter-renderer\n [schema]=\"getSchema(item.name)\"\n [prop]=\"loader.getProp(item.name)\"\n [(value)]=\"item.value\"\n [(operator)]=\"item.operator\"\n >\n </axp-widget-filter-renderer>\n </div>\n <ax-button look=\"blank\" color=\"danger\" class=\"ax-sm\" (onClick)=\"removeCondition(item)\">\n <ax-icon class=\"fa-solid fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if(conditions().length){\n <ax-button color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"blank\" class=\"ax-sm\"></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"outline\" class=\"ax-md ax-w-56\"></ax-button>\n </div>\n }\n <ax-popover\n #conditionsPopover\n [target]=\"addField\"\n [placement]=\"conditions().length ? 'bottom-start' : 'bottom'\"\n [offsetY]=\"8\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"resetSelectedFieldNames()\"\n >\n <div class=\"ax-bg-surface ax-border ax-border-default ax-rounded-md ax-shadow-md ax-w-full ax-min-w-[250px]\">\n <div class=\"ax-border-b-[1px] ax-pb-2 ax-mb-2 ax-p-3\">\n <ax-title class=\"ax-font-bold\">Fields</ax-title>\n </div>\n <div class=\"ax-max-h-48 ax-overflow-auto\">\n <ax-selection-list\n [valueField]=\"'name'\"\n [textField]=\"'title'\"\n [(ngModel)]=\"selectedConditionNames\"\n [direction]=\"'vertical'\"\n [items]=\"props()\"\n [multiple]=\"true\"\n ></ax-selection-list>\n </div>\n <div class=\"ax-flex ax-justify-end ax-border-t-[1px] ax-p-3\">\n <ax-button (onClick)=\"addCondition(); conditionsPopover.close()\" class=\"ax-sm\" text=\"Confirm\" color=\"primary\"> </ax-button>\n </div>\n </div>\n </ax-popover>\n </div>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n <ax-tab-item text=\"Sorting\">\n <ax-suffix>\n <ax-badge [text]=\"sorts().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div\n class=\"ax-flex ax-p-4 ax-flex-col ax-justify-start ax-gap-4 ax-select-none ax-overflow-auto ax-h-[400px]\"\n [class.ax-justify-center]=\"!sorts().length\"\n >\n @if(!sorts().length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">{{ 'entity.no-sort' | translate | async }}</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">{{ 'entity.ask-sort' | translate | async }}</span>\n </div>\n }@else {\n <div\n cdkDropList\n (cdkDropListDropped)=\"drop('sorts', $event)\"\n class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-py-1 ax-overflow-auto\"\n >\n <ng-container *ngFor=\"let item of sorts()\">\n <div class=\"ax-flex ax-gap-2 ax-items-center\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <ax-select-box [dataSource]=\"props()\" valueField=\"name\" textField=\"title\" [(ngModel)]=\"item.name\"> </ax-select-box>\n <ax-button [color]=\"'default'\" class=\"ax-sm\" (click)=\"updateSortItem(item)\">\n <ax-icon [class.ax-text-primary]=\"item.dir == 'asc'\" class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"></ax-icon>\n <ax-icon [class.ax-text-primary]=\"item.dir == 'desc'\" class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"></ax-icon>\n </ax-button>\n\n <ax-button look=\"blank\" (onClick)=\"removeSortItem(item)\">\n <ax-icon class=\"fa-solid fa-trash-can ax-text-danger-500\"></ax-icon>\n </ax-button>\n </div>\n </ng-container>\n </div>\n }\n\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if(sorts().length){\n <ax-button\n (onClick)=\"addSortItem()\"\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"blank\"\n class=\"ax-sm\"\n ></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button\n (onClick)=\"addSortItem()\"\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"outline\"\n class=\"ax-md ax-w-56\"\n ></ax-button>\n </div>\n }\n </div>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n </ax-tabs>\n <ng-template [axTabContent] #contents=\"axTabContent\"> </ng-template>\n</div>\n<ax-footer class=\"!ax-justify-end\">\n @if (mode===\"edit\") {\n <ax-dropdown-button [text]=\"'discard' | translate | async\" (onClick)=\"handleDiscardClick()\">\n <ax-button-item-list>\n <ax-button-item [text]=\"('reset' | translate | async) ?? ' '\" (onClick)=\"handleResetClick()\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-rotate-left fa-flip-horizontal\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-button-item class=\"ax-text-danger\" text=\"Delete\" (onClick)=\"handleDeleteClick()\">\n <ax-prefix> <ax-icon icon=\"fas fa-trash fa-flip-horizontal\"></ax-icon> </ax-prefix\n ></ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n } @else {\n <ax-button [text]=\"'cancel' | translate | async\" look=\"outline\" (onClick)=\"handleCancelClick()\"></ax-button>\n }\n <ax-button [text]=\"mode === 'create' ? ('save' | translate | async) : ('save-changes' | translate | async)\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i5.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "component", type: i6$1.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i7.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "component", type: i8$1.AXSwitchComponent, selector: "ax-switch", inputs: ["disabled", "readonly", "color", "tabIndex", "value", "name", "isLoading"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i9.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i9.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "directive", type: i9.AXTabContentDirective, selector: "[axTabContent]", inputs: ["axTabContent"], exportAs: ["axTabContent"] }, { kind: "component", type: i10$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i11$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: "component", type: i7$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "component", type: i13.AXSelectionListComponent, selector: "ax-selection-list", inputs: ["id", "name", "disabled", "readonly", "tabIndex", "size", "value", "valueField", "textField", "disabledField", "readonlyField", "multiple", "direction", "customTemplate", "showControl", "items", "look"], outputs: ["onValueChanged", "onBlur", "onFocus"] }, { kind: "component", type: i14.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "directive", type: i15.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i15.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i15.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i10.AXPWidgetFilterRendererComponent, selector: "axp-widget-filter-renderer", inputs: ["value", "operator", "prop", "schema"], outputs: ["valueChange", "operatorChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1087
|
+
], usesInheritance: true, ngImport: i0, template: "<ax-header class=\"ax-p-4 ax-flex ax-justify-between ax-border-b\">\n <div class=\"ax-flex ax-items-center\">\n @if (showNameInput() && mode==='create') {\n <div class=\"ax-w-60\">\n <ax-text-box class=\"ax-sm\" [(ngModel)]=\"selectedView.title\">\n @if(showNameInput()){\n <ax-suffix>\n <ax-button (onClick)=\"changeViewNameToggle()\" look=\"default\">\n <ax-icon class=\"fa-sodild fas fa-check ax-text-sm\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n }\n </ax-text-box>\n </div>\n }@else {\n <span class=\"ax-text-lg ax-font-semibold\">{{ selectedView.title }}</span>\n } @if (mode===\"create\") {\n <ax-button class=\"ax-xs\" (onClick)=\"changeViewNameToggle()\" color=\"default\">\n @if(!showNameInput() ){\n <ax-icon class=\"fa-regular fa-pen ax-text-sm ax-text-neutral-600\"> </ax-icon>\n }\n </ax-button>\n }\n </div>\n <ax-close-button></ax-close-button>\n</ax-header>\n<div class=\"ax-p-4\">\n <ax-tabs [content]=\"contents\" look=\"with-line\">\n <ax-tab-item [text]=\"('entity.columns' | translate | async) ?? 'Columns'\">\n <ax-suffix>\n <ax-badge [text]=\"visibleColumns().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div class=\"ax-flex ax-flex-col ax-gap-4 ax-p-4 ax-select-none ax-h-[400px]\" cdkDropList (cdkDropListDropped)=\"drop('columns', $event)\">\n <div class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-overflow-auto ax-pe-2\">\n <ng-container *ngFor=\"let item of columns()\">\n <div class=\"ax-flex ax-py-1 ax-items-center ax-justify-between\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-flex ax-items-center ax-gap-3\" cdkDragHandle>\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\"></ax-icon>\n <p class=\"ax-font-medium ax-text-sm\">{{ item.title }}</p>\n </div>\n <ax-switch class=\"ax-sm\" [(ngModel)]=\"item.visible\" (onValueChanged)=\"updateColumnItem($event, item.name)\"></ax-switch>\n </div>\n </ng-container>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n <ax-tab-item text=\"Conditions\">\n <ax-suffix>\n <ax-badge [text]=\"conditions().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div\n class=\"ax-flex ax-flex-col ax-justify-start ax-gap-4 ax-py-4 ax-select-none ax-h-[400px]\"\n [class.ax-justify-center]=\"!conditions().length\"\n >\n @if(!conditions().length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">No Filters Selected</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">Please select field(s) that you want to filter</span>\n </div>\n } @else {\n <div class=\"ax-sorted-list ax-px-4 ax-py-1 ax-overflow-auto\">\n <div cdkDropList (cdkDropListDropped)=\"drop('conditions', $event)\" class=\"ax-flex ax-flex-col ax-gap-2\">\n @for(item of conditions(); track item.name ){\n <div cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <div class=\"ax-ms-4 ax-flex ax-items-start ax-gap-2\">\n <ax-label>{{ loader.getProp(item.name)?.title }}</ax-label>\n @if(getOperatorTitle(item.name,item.operator)){\n <ax-badge class=\"ax-text-xs\" color=\"primary\" [look]=\"'twotone'\" [text]=\"getOperatorTitle(item.name, item.operator)\"></ax-badge>\n }\n </div>\n <div class=\"ax-flex ax-group ax-items-center ax-gap-2\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <div class=\"ax-w-full\">\n <axp-widget-filter-renderer\n [schema]=\"getSchema(item.name)\"\n [prop]=\"loader.getProp(item.name)\"\n [(value)]=\"item.value\"\n [(operator)]=\"item.operator\"\n >\n </axp-widget-filter-renderer>\n </div>\n <ax-button look=\"blank\" color=\"danger\" class=\"ax-sm\" (onClick)=\"removeCondition(item)\">\n <ax-icon class=\"fa-solid fa-trash-can\"></ax-icon>\n </ax-button>\n </div>\n </div>\n }\n </div>\n </div>\n }\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if(conditions().length){\n <ax-button color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"blank\" class=\"ax-sm\"></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button color=\"primary\" [text]=\"'entity.add-field' | translate | async\" look=\"outline\" class=\"ax-md ax-w-56\"></ax-button>\n </div>\n }\n <ax-popover\n #conditionsPopover\n [target]=\"addField\"\n [placement]=\"conditions().length ? 'bottom-start' : 'bottom'\"\n [offsetY]=\"8\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\"\n (onOpened)=\"resetSelectedFieldNames()\"\n >\n <div class=\"ax-bg-surface ax-border ax-border-default ax-rounded-md ax-shadow-md ax-w-full ax-min-w-[250px]\">\n <div class=\"ax-border-b-[1px] ax-pb-2 ax-mb-2 ax-p-3\">\n <ax-title class=\"ax-font-bold\">Fields</ax-title>\n </div>\n <div class=\"ax-max-h-48 ax-overflow-auto\">\n <ax-selection-list\n [valueField]=\"'name'\"\n [textField]=\"'title'\"\n [(ngModel)]=\"selectedConditionNames\"\n [direction]=\"'vertical'\"\n [items]=\"props()\"\n [multiple]=\"true\"\n ></ax-selection-list>\n </div>\n <div class=\"ax-flex ax-justify-end ax-border-t-[1px] ax-p-3\">\n <ax-button (onClick)=\"addCondition(); conditionsPopover.close()\" class=\"ax-sm\" text=\"Confirm\" color=\"primary\"> </ax-button>\n </div>\n </div>\n </ax-popover>\n </div>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n <ax-tab-item text=\"Sorting\">\n <ax-suffix>\n <ax-badge [text]=\"sorts().length.toString()\" color=\"primary\"> </ax-badge>\n </ax-suffix>\n <ax-content>\n <div\n class=\"ax-flex ax-p-4 ax-flex-col ax-justify-start ax-gap-4 ax-select-none ax-overflow-auto ax-h-[400px]\"\n [class.ax-justify-center]=\"!sorts().length\"\n >\n @if(!sorts().length){\n <div class=\"ax-flex ax-flex-col ax-items-center ax-justify-center\">\n <ax-image src=\"assets/documents.svg\"></ax-image>\n <p class=\"ax-mt-6 ax-mb-1 ax-font-bold\">{{ 'entity.no-sort' | translate | async }}</p>\n <span class=\"ax-text-neutral-400 ax-text-sm md:ax-text-md\">{{ 'entity.ask-sort' | translate | async }}</span>\n </div>\n }@else {\n <div\n cdkDropList\n (cdkDropListDropped)=\"drop('sorts', $event)\"\n class=\"ax-flex ax-flex-col ax-gap-3 ax-w-full ax-sorted-list ax-py-1 ax-overflow-auto\"\n >\n <ng-container *ngFor=\"let item of sorts()\">\n <div class=\"ax-flex ax-gap-2 ax-items-center\" cdkDrag cdkDragBoundary=\".ax-sorted-list\">\n <ax-icon class=\"fa-solid fa-grip-dots-vertical ax-cursor-move\" cdkDragHandle></ax-icon>\n <ax-select-box [dataSource]=\"props()\" valueField=\"name\" textField=\"title\" [(ngModel)]=\"item.name\"> </ax-select-box>\n <ax-button [color]=\"'default'\" class=\"ax-sm\" (click)=\"updateSortItem(item)\">\n <ax-icon [class.ax-text-primary]=\"item.dir == 'asc'\" class=\"fa-solid fa-arrow-up-long ax-text-neutral-400\"></ax-icon>\n <ax-icon [class.ax-text-primary]=\"item.dir == 'desc'\" class=\"fa-solid fa-arrow-down-long ax-text-neutral-400\"></ax-icon>\n </ax-button>\n\n <ax-button look=\"blank\" (onClick)=\"removeSortItem(item)\">\n <ax-icon class=\"fa-solid fa-trash-can ax-text-danger-500\"></ax-icon>\n </ax-button>\n </div>\n </ng-container>\n </div>\n }\n\n <div class=\"ax-flex ax-gap-2\">\n <div class=\"ax-w-full\" #addField>\n @if(sorts().length){\n <ax-button\n (onClick)=\"addSortItem()\"\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"blank\"\n class=\"ax-sm\"\n ></ax-button>\n }@else {\n <div class=\"ax-flex ax-justify-center ax-w-full\">\n <ax-button\n (onClick)=\"addSortItem()\"\n color=\"primary\"\n [text]=\"'entity.add-field' | translate | async\"\n look=\"outline\"\n class=\"ax-md ax-w-56\"\n ></ax-button>\n </div>\n }\n </div>\n </div>\n </div>\n </ax-content>\n </ax-tab-item>\n </ax-tabs>\n <ng-template [axTabContent] #contents=\"axTabContent\"> </ng-template>\n</div>\n<ax-footer class=\"!ax-justify-end\">\n @if (mode===\"edit\") {\n <ax-dropdown-button [text]=\"'discard' | translate | async\" (onClick)=\"handleDiscardClick()\">\n <ax-button-item-list>\n <ax-button-item [text]=\"('reset' | translate | async) ?? ' '\" (onClick)=\"handleResetClick()\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-rotate-left fa-flip-horizontal\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n <ax-button-item class=\"ax-text-danger\" text=\"Delete\" (onClick)=\"handleDeleteClick()\">\n <ax-prefix> <ax-icon icon=\"fas fa-trash fa-flip-horizontal\"></ax-icon> </ax-prefix\n ></ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n } @else {\n <ax-button [text]=\"'cancel' | translate | async\" look=\"outline\" (onClick)=\"handleCancelClick()\"></ax-button>\n }\n <ax-button [text]=\"mode === 'create' ? ('save' | translate | async) : ('save-changes' | translate | async)\" color=\"primary\" (onClick)=\"handleApplyClick()\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i5.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "component", type: i6$1.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i7.AXImageComponent, selector: "ax-image", inputs: ["overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "component", type: i8$1.AXSwitchComponent, selector: "ax-switch", inputs: ["disabled", "readonly", "color", "tabIndex", "value", "name", "isLoading"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i9.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i9.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "directive", type: i9.AXTabContentDirective, selector: "[axTabContent]", inputs: ["axTabContent"], exportAs: ["axTabContent"] }, { kind: "component", type: i10$1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "textTemplate", "dataSource", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }, { kind: "component", type: i11$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: "component", type: i7$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "component", type: i13.AXSelectionListComponent, selector: "ax-selection-list", inputs: ["id", "name", "disabled", "readonly", "tabIndex", "size", "value", "valueField", "textField", "disabledField", "readonlyField", "multiple", "direction", "customTemplate", "showControl", "items", "look"], outputs: ["onValueChanged", "onBlur", "onFocus"] }, { kind: "component", type: i14.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }, { kind: "directive", type: i15.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i15.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i15.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i10.AXPWidgetFilterRendererComponent, selector: "axp-widget-filter-renderer", inputs: ["value", "operator", "prop", "schema"], outputs: ["valueChange", "operatorChange"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1089
1088
|
}
|
|
1090
1089
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateCustomViewComponent, decorators: [{
|
|
1091
1090
|
type: Component,
|
|
@@ -1667,11 +1666,11 @@ class AXPEntityListViewComponent {
|
|
|
1667
1666
|
this.dataSource.reset();
|
|
1668
1667
|
}
|
|
1669
1668
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityListViewComponent, deps: [{ token: i1$3.AXActionSheetService }, { token: i2.AXUnsubscriber }, { token: i3.AXPlatform }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1670
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityListViewComponent, isStandalone: false, selector: "ng-component", providers: [AXUnsubscriber], viewQueries: [{ propertyName: "viewsTemplate", first: true, predicate: ["viewsTemplate"], descendants: true }, { propertyName: "grid", first: true, predicate: ["grid"], descendants: true }, { propertyName: "entityViewDrawer", first: true, predicate: ["entityViewDrawer"], descendants: true }], ngImport: i0, template: "<ax-drawer-container>\n <!-- <ax-drawer #drawer location=\"start\" [collapsed]=\"true\" [mode]=\"platform.is('SM') ? 'overlay' : 'push'\">\n <ax-content class=\"ax-w-64 ax-border-e\">\n <div class=\"ax-p-6 ax-py-4 ax-gap-6 ax-flex ax-flex-col\">\n <p class=\"ax-text-2xl ax-font-bold\">Folders</p>\n <ax-side-menu>\n <ng-container *ngFor=\"let node of menuItems\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #sideMenu let-item>\n <ax-side-menu-item [text]=\"item.text\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-warning-500\"></ax-icon>\n </ax-prefix>\n <ng-container *ngIf=\"item.children\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n </ax-content>\n </ax-drawer> -->\n <ax-content class=\"ax-flex ax-flex-col ax-overflow-hidden\">\n <div\n class=\"ax-flex ax-flex-col ax-gap-0 md:ax-gap-4 ax-px-4 ax-py-3 md:ax-py-4 md:ax-px-6 ax-bg-surface ax-border-b md:ax-border-0 md:ax-bg-default\">\n @if(platform.is('MD') && this.grid){\n <div class=\"ax-flex ax-justify-between ax-mb-4\">\n @if(this.grid.selectedRows.length===0){\n <div class=\"ax-text-xl ax-font-bold\">{{ title }}</div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canCreate) {\n <ax-button color=\"primary\" class=\"ax-sm\" (onClick)=\"handleCreateClick()\">\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canDelete) {\n <ax-button color=\"danger\" class=\"ax-sm\" (onClick)=\"handleCommandClick('delete')\">\n <ax-icon class=\"fa-solid fa-trash\"> </ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n </ax-button>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" [text]=\"(view$ | async)?.title\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-eye ax-text-neutral-400\"> </ax-icon>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list class=\"ax-bg-surface\">\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{ 'entity.public-view' | translate | async }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item *ngFor=\"let v of customViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item (onClick)=\"addCustomViewPopup()\" text=\"Add Custom View\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <div class=\"ax-flex ax-gap-2\">\n @if(searchBoxTitle){\n <ax-button (onClick)=\"toggleSearchBox()\" [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-search ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n }\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"columnsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-sliders ax-text-neutral-400\"> </ax-icon>\n @if ((conditionsCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars-sort ax-text-neutral-400\"> </ax-icon>\n @if ((sortCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n </div>\n </div>\n <div [class.collapsed-search-box]=\"searchBoxCollapsed\" class=\"ax-transition-all ax-mt-4\">\n <ax-search-box [title]=\"searchBoxTitle\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-3\">\n <div class=\"ax-text-xl md:ax-text-2xl ax-font-bold ax-mb-2\">{{ title }}</div>\n @if(this.grid.selectedRows.length==0){\n <div class=\"ax-flex ax-gap-3\">\n @if(canCreate) {\n <ax-button [text]=\"'create-new' | translate | async\" color=\"primary\" (onClick)=\"handleCreateClick()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @let redirectAction = getSingleAction('redirect'); @if(redirectAction) {\n <ax-button [text]=\"redirectAction.title | translate | async\" color=\"primary\"\n (onClick)=\"redirectAction.execute()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @if(canImport){\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleImportClick()\" text=\"Import\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-import\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <!-- <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item> -->\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n }@else {\n <div class=\"ax-flex ax-gap-3\">\n @if(canDelete) {\n <ax-button text=\"Delete Items\" color=\"danger\" (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix>\n <i class=\"fa-solid fa-trash\"></i>\n </ax-prefix>\n </ax-button>\n }\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <!----------------------- View Mode --------------------->\n @if(this.grid.selectedRows.length==0) {\n <div class=\"ax-flex ax-w-full ax-justify-between ax-gap-3\">\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"(view$ | async)?.title\" #views color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-eye\"></i>\n </ax-prefix>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list class=\"ax-bg-surface\">\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{\n 'entity.public-view' | translate | async\n }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item class=\"ax-pe-4 ax-flex ax-justify-between\" *ngFor=\"let v of customViews$ | async\"\n [text]=\"v.title\" [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\">\n <ax-suffix>\n <ax-button (onClick)=\"updateViewPopup($event, v)\" class=\"ax-xs\" look=\"none\">\n <ax-icon class=\"far fa-edit\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n </ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item text=\"Add Custom View\" (onClick)=\"addCustomViewPopup()\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n @if(searchBoxTitle){\n <div class=\"ax-w-72\">\n <ax-search-box [title]=\"searchBoxTitle\" [(ngModel)]=\"searchValue\"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"'entity.columns' | translate | async\" color=\"ghost\" #columns\n (onClick)=\"columnsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ columnsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button text=\"Filters\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\" #conditions>\n <ax-prefix>\n <i class=\"fa-solid fa-sliders\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ conditionsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button [text]=\"'entity.sort' | translate | async\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars-sort\"></i>\n </ax-prefix>\n <ax-suffix *ngIf=\"(sortCount$ | async)! > 0\">\n <ax-badge text=\"{{ sortCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n\n } @else{\n <!----------------------- Selection Mode --------------------->\n <div>\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"ax-flex-1 ax-px-6 ax-py-4 ax-flex ax-overflow-auto\">\n <ax-data-table #grid [showFooter]=\"false\" class=\"ax-flex-1\" [dataSource]=\"dataSource\" [paging]=\"true\"\n [fetchDataMode]=\"'manual'\" (onRowDbClick)=\"handleRowDbClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\">\n <!-- <ax-index-column *ngIf=\"!platform.is('SM')\" [width]=\"'85px'\"></ax-index-column> -->\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n @for(col of (columns$ | async);track col.name) {\n <axp-widget-column-renderer *ngIf=\"col.visible\" [schema]=\"col.schema\" [dataField]=\"col.name\"\n [caption]=\"col.title\" [options]=\"col.options\" [displayFormat]=\"col.displayFormat\" [width]=\"'180px'\"\n [allowSorting]=\"false\">\n </axp-widget-column-renderer>\n }\n <ax-dropdown-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n <ax-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getInlineRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n </ax-data-table>\n </div>\n </ax-content>\n <ax-drawer (collapsedChange)=\"closeDrawer('columns', $event)\" #columnsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-columns [loader]=\"loader\" (onClosed)=\"columnsDrawer.close()\"></axp-list-view-option-columns>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('conditions', $event)\" #conditionsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[25vw] ax-border-e\">\n <axp-list-view-option-conditions [loader]=\"loader\"\n (onClosed)=\"conditionsDrawer.close()\"></axp-list-view-option-conditions>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('sorts', $event)\" #sortsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-sorting (onClosed)=\"sortsDrawer.close()\" [loader]=\"loader\"></axp-list-view-option-sorting>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$2.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"] }, { kind: "component", type: i6$2.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "component", type: i6$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i6$2.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i5.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "component", type: i6.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i11.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "closeOthers", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i11.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "component", type: i12.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "delayTime"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: i10.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["width", "caption", "headerTemplate", "allowSorting", "fixed", "footerTemplate", "cellTemplate", "options", "dataField", "displayFormat", "schema"] }, { kind: "directive", type: i14$1.AXPFeatureDirective, selector: "[feature]", inputs: ["feature", "featureElse"] }, { kind: "component", type: AXPListViewOptionsColumnsComponent, selector: "axp-list-view-option-columns", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "component", type: AXPListViewOptionConditionsComponent, selector: "axp-list-view-option-conditions", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "component", type: AXPListViewOptionSortingComponent, selector: "axp-list-view-option-sorting", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1669
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXPEntityListViewComponent, isStandalone: false, selector: "ng-component", providers: [AXUnsubscriber], viewQueries: [{ propertyName: "viewsTemplate", first: true, predicate: ["viewsTemplate"], descendants: true }, { propertyName: "grid", first: true, predicate: ["grid"], descendants: true }, { propertyName: "entityViewDrawer", first: true, predicate: ["entityViewDrawer"], descendants: true }], ngImport: i0, template: "<ax-drawer-container>\n <!-- <ax-drawer #drawer location=\"start\" [collapsed]=\"true\" [mode]=\"platform.is('SM') ? 'overlay' : 'push'\">\n <ax-content class=\"ax-w-64 ax-border-e\">\n <div class=\"ax-p-6 ax-py-4 ax-gap-6 ax-flex ax-flex-col\">\n <p class=\"ax-text-2xl ax-font-bold\">Folders</p>\n <ax-side-menu>\n <ng-container *ngFor=\"let node of menuItems\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #sideMenu let-item>\n <ax-side-menu-item [text]=\"item.text\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-warning-500\"></ax-icon>\n </ax-prefix>\n <ng-container *ngIf=\"item.children\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n </ax-content>\n </ax-drawer> -->\n <ax-content class=\"ax-flex ax-flex-col ax-overflow-hidden\">\n <div\n class=\"ax-flex ax-flex-col ax-gap-0 md:ax-gap-4 ax-px-4 ax-py-3 md:ax-py-4 md:ax-px-6 ax-bg-surface ax-border-b md:ax-border-0 md:ax-bg-default\">\n @if(platform.is('MD') && this.grid){\n <div class=\"ax-flex ax-justify-between ax-mb-4\">\n @if(this.grid.selectedRows.length===0){\n <div class=\"ax-text-xl ax-font-bold\">{{ title }}</div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canCreate) {\n <ax-button color=\"primary\" class=\"ax-sm\" (onClick)=\"handleCreateClick()\">\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canDelete) {\n <ax-button color=\"danger\" class=\"ax-sm\" (onClick)=\"handleCommandClick('delete')\">\n <ax-icon class=\"fa-solid fa-trash\"> </ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n </ax-button>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" [text]=\"(view$ | async)?.title\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-eye ax-text-neutral-400\"> </ax-icon>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{ 'entity.public-view' | translate | async }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\" [selected]=\"(view$ | async) == v\"\n (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item *ngFor=\"let v of customViews$ | async\" [text]=\"v.title\" [selected]=\"(view$ | async) == v\"\n (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item (onClick)=\"addCustomViewPopup()\" text=\"Add Custom View\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <div class=\"ax-flex ax-gap-2\">\n @if(searchBoxTitle){\n <ax-button (onClick)=\"toggleSearchBox()\" [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-search ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n }\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"columnsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-sliders ax-text-neutral-400\"> </ax-icon>\n @if ((conditionsCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars-sort ax-text-neutral-400\"> </ax-icon>\n @if ((sortCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n </div>\n </div>\n <div [class.collapsed-search-box]=\"searchBoxCollapsed\" class=\"ax-transition-all ax-mt-4\">\n <ax-search-box [title]=\"searchBoxTitle\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-3\">\n <div class=\"ax-text-xl md:ax-text-2xl ax-font-bold ax-mb-2\">{{ title }}</div>\n @if(this.grid.selectedRows.length==0){\n <div class=\"ax-flex ax-gap-3\">\n @if(canCreate) {\n <ax-button [text]=\"'create-new' | translate | async\" color=\"primary\" (onClick)=\"handleCreateClick()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @let redirectAction = getSingleAction('redirect'); @if(redirectAction) {\n <ax-button [text]=\"redirectAction.title | translate | async\" color=\"primary\"\n (onClick)=\"redirectAction.execute()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @if(canImport){\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleImportClick()\" text=\"Import\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-import\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <!-- <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item> -->\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n }@else {\n <div class=\"ax-flex ax-gap-3\">\n @if(canDelete) {\n <ax-button text=\"Delete Items\" color=\"danger\" (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix>\n <i class=\"fa-solid fa-trash\"></i>\n </ax-prefix>\n </ax-button>\n }\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <!----------------------- View Mode --------------------->\n @if(this.grid.selectedRows.length==0) {\n <div class=\"ax-flex ax-w-full ax-justify-between ax-gap-3\">\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"(view$ | async)?.title\" #views color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-eye\"></i>\n </ax-prefix>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list class=\"ax-bg-surface\">\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{\n 'entity.public-view' | translate | async\n }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item class=\"ax-pe-4 ax-flex ax-justify-between\" *ngFor=\"let v of customViews$ | async\"\n [text]=\"v.title\" [selected]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\">\n <ax-suffix>\n <ax-button (onClick)=\"updateViewPopup($event, v)\" class=\"ax-xs\" look=\"none\">\n <ax-icon class=\"far fa-edit\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n </ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item text=\"Add Custom View\" (onClick)=\"addCustomViewPopup()\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n @if(searchBoxTitle){\n <div class=\"ax-w-72\">\n <ax-search-box [title]=\"searchBoxTitle\" [(ngModel)]=\"searchValue\"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"'entity.columns' | translate | async\" color=\"ghost\" #columns\n (onClick)=\"columnsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ columnsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button text=\"Filters\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\" #conditions>\n <ax-prefix>\n <i class=\"fa-solid fa-sliders\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ conditionsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button [text]=\"'entity.sort' | translate | async\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars-sort\"></i>\n </ax-prefix>\n <ax-suffix *ngIf=\"(sortCount$ | async)! > 0\">\n <ax-badge text=\"{{ sortCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n\n } @else{\n <!----------------------- Selection Mode --------------------->\n <div>\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"ax-flex-1 ax-px-6 ax-py-4 ax-flex ax-overflow-auto\">\n <ax-data-table #grid [showFooter]=\"false\" class=\"ax-flex-1\" [dataSource]=\"dataSource\" [paging]=\"true\"\n [fetchDataMode]=\"'manual'\" (onRowDbClick)=\"handleRowDbClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\">\n <!-- <ax-index-column *ngIf=\"!platform.is('SM')\" [width]=\"'85px'\"></ax-index-column> -->\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n @for(col of (columns$ | async);track col.name) {\n <axp-widget-column-renderer *ngIf=\"col.visible\" [schema]=\"col.schema\" [dataField]=\"col.name\"\n [caption]=\"col.title\" [options]=\"col.options\" [displayFormat]=\"col.displayFormat\" [width]=\"'180px'\"\n [allowSorting]=\"false\">\n </axp-widget-column-renderer>\n }\n <ax-dropdown-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n <ax-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getInlineRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n </ax-data-table>\n </div>\n </ax-content>\n <ax-drawer (collapsedChange)=\"closeDrawer('columns', $event)\" #columnsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-columns [loader]=\"loader\" (onClosed)=\"columnsDrawer.close()\"></axp-list-view-option-columns>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('conditions', $event)\" #conditionsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[25vw] ax-border-e\">\n <axp-list-view-option-conditions [loader]=\"loader\"\n (onClosed)=\"conditionsDrawer.close()\"></axp-list-view-option-conditions>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('sorts', $event)\" #sortsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-sorting (onClosed)=\"sortsDrawer.close()\" [loader]=\"loader\"></axp-list-view-option-sorting>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$2.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"] }, { kind: "component", type: i6$2.AXRowSelectColumnComponent, selector: "ax-select-column", inputs: ["width", "caption", "fixed"] }, { kind: "component", type: i6$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i6$2.AXRowDropdownCommandColumnComponent, selector: "ax-dropdown-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i4.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i4.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "component", type: i4$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i4$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "component", type: i5.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "component", type: i6.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i11.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "closeOthers", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i11.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "component", type: i12.AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "delayTime"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: i10.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["width", "caption", "headerTemplate", "allowSorting", "fixed", "footerTemplate", "cellTemplate", "options", "dataField", "displayFormat", "schema"] }, { kind: "directive", type: i14$1.AXPFeatureDirective, selector: "[feature]", inputs: ["feature", "featureElse"] }, { kind: "component", type: AXPListViewOptionsColumnsComponent, selector: "axp-list-view-option-columns", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "component", type: AXPListViewOptionConditionsComponent, selector: "axp-list-view-option-conditions", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "component", type: AXPListViewOptionSortingComponent, selector: "axp-list-view-option-sorting", inputs: ["loader"], outputs: ["onClosed"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1671
1670
|
}
|
|
1672
1671
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityListViewComponent, decorators: [{
|
|
1673
1672
|
type: Component,
|
|
1674
|
-
args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [AXUnsubscriber], standalone: false, template: "<ax-drawer-container>\n <!-- <ax-drawer #drawer location=\"start\" [collapsed]=\"true\" [mode]=\"platform.is('SM') ? 'overlay' : 'push'\">\n <ax-content class=\"ax-w-64 ax-border-e\">\n <div class=\"ax-p-6 ax-py-4 ax-gap-6 ax-flex ax-flex-col\">\n <p class=\"ax-text-2xl ax-font-bold\">Folders</p>\n <ax-side-menu>\n <ng-container *ngFor=\"let node of menuItems\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #sideMenu let-item>\n <ax-side-menu-item [text]=\"item.text\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-warning-500\"></ax-icon>\n </ax-prefix>\n <ng-container *ngIf=\"item.children\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n </ax-content>\n </ax-drawer> -->\n <ax-content class=\"ax-flex ax-flex-col ax-overflow-hidden\">\n <div\n class=\"ax-flex ax-flex-col ax-gap-0 md:ax-gap-4 ax-px-4 ax-py-3 md:ax-py-4 md:ax-px-6 ax-bg-surface ax-border-b md:ax-border-0 md:ax-bg-default\">\n @if(platform.is('MD') && this.grid){\n <div class=\"ax-flex ax-justify-between ax-mb-4\">\n @if(this.grid.selectedRows.length===0){\n <div class=\"ax-text-xl ax-font-bold\">{{ title }}</div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canCreate) {\n <ax-button color=\"primary\" class=\"ax-sm\" (onClick)=\"handleCreateClick()\">\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canDelete) {\n <ax-button color=\"danger\" class=\"ax-sm\" (onClick)=\"handleCommandClick('delete')\">\n <ax-icon class=\"fa-solid fa-trash\"> </ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n </ax-button>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" [text]=\"(view$ | async)?.title\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-eye ax-text-neutral-400\"> </ax-icon>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list class=\"ax-bg-surface\">\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{ 'entity.public-view' | translate | async }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item *ngFor=\"let v of customViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item (onClick)=\"addCustomViewPopup()\" text=\"Add Custom View\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <div class=\"ax-flex ax-gap-2\">\n @if(searchBoxTitle){\n <ax-button (onClick)=\"toggleSearchBox()\" [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-search ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n }\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"columnsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-sliders ax-text-neutral-400\"> </ax-icon>\n @if ((conditionsCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars-sort ax-text-neutral-400\"> </ax-icon>\n @if ((sortCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n </div>\n </div>\n <div [class.collapsed-search-box]=\"searchBoxCollapsed\" class=\"ax-transition-all ax-mt-4\">\n <ax-search-box [title]=\"searchBoxTitle\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-3\">\n <div class=\"ax-text-xl md:ax-text-2xl ax-font-bold ax-mb-2\">{{ title }}</div>\n @if(this.grid.selectedRows.length==0){\n <div class=\"ax-flex ax-gap-3\">\n @if(canCreate) {\n <ax-button [text]=\"'create-new' | translate | async\" color=\"primary\" (onClick)=\"handleCreateClick()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @let redirectAction = getSingleAction('redirect'); @if(redirectAction) {\n <ax-button [text]=\"redirectAction.title | translate | async\" color=\"primary\"\n (onClick)=\"redirectAction.execute()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @if(canImport){\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleImportClick()\" text=\"Import\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-import\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <!-- <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item> -->\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n }@else {\n <div class=\"ax-flex ax-gap-3\">\n @if(canDelete) {\n <ax-button text=\"Delete Items\" color=\"danger\" (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix>\n <i class=\"fa-solid fa-trash\"></i>\n </ax-prefix>\n </ax-button>\n }\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <!----------------------- View Mode --------------------->\n @if(this.grid.selectedRows.length==0) {\n <div class=\"ax-flex ax-w-full ax-justify-between ax-gap-3\">\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"(view$ | async)?.title\" #views color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-eye\"></i>\n </ax-prefix>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list class=\"ax-bg-surface\">\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{\n 'entity.public-view' | translate | async\n }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item class=\"ax-pe-4 ax-flex ax-justify-between\" *ngFor=\"let v of customViews$ | async\"\n [text]=\"v.title\" [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\">\n <ax-suffix>\n <ax-button (onClick)=\"updateViewPopup($event, v)\" class=\"ax-xs\" look=\"none\">\n <ax-icon class=\"far fa-edit\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n </ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item text=\"Add Custom View\" (onClick)=\"addCustomViewPopup()\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n @if(searchBoxTitle){\n <div class=\"ax-w-72\">\n <ax-search-box [title]=\"searchBoxTitle\" [(ngModel)]=\"searchValue\"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"'entity.columns' | translate | async\" color=\"ghost\" #columns\n (onClick)=\"columnsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ columnsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button text=\"Filters\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\" #conditions>\n <ax-prefix>\n <i class=\"fa-solid fa-sliders\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ conditionsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button [text]=\"'entity.sort' | translate | async\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars-sort\"></i>\n </ax-prefix>\n <ax-suffix *ngIf=\"(sortCount$ | async)! > 0\">\n <ax-badge text=\"{{ sortCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n\n } @else{\n <!----------------------- Selection Mode --------------------->\n <div>\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"ax-flex-1 ax-px-6 ax-py-4 ax-flex ax-overflow-auto\">\n <ax-data-table #grid [showFooter]=\"false\" class=\"ax-flex-1\" [dataSource]=\"dataSource\" [paging]=\"true\"\n [fetchDataMode]=\"'manual'\" (onRowDbClick)=\"handleRowDbClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\">\n <!-- <ax-index-column *ngIf=\"!platform.is('SM')\" [width]=\"'85px'\"></ax-index-column> -->\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n @for(col of (columns$ | async);track col.name) {\n <axp-widget-column-renderer *ngIf=\"col.visible\" [schema]=\"col.schema\" [dataField]=\"col.name\"\n [caption]=\"col.title\" [options]=\"col.options\" [displayFormat]=\"col.displayFormat\" [width]=\"'180px'\"\n [allowSorting]=\"false\">\n </axp-widget-column-renderer>\n }\n <ax-dropdown-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n <ax-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getInlineRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n </ax-data-table>\n </div>\n </ax-content>\n <ax-drawer (collapsedChange)=\"closeDrawer('columns', $event)\" #columnsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-columns [loader]=\"loader\" (onClosed)=\"columnsDrawer.close()\"></axp-list-view-option-columns>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('conditions', $event)\" #conditionsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[25vw] ax-border-e\">\n <axp-list-view-option-conditions [loader]=\"loader\"\n (onClosed)=\"conditionsDrawer.close()\"></axp-list-view-option-conditions>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('sorts', $event)\" #sortsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-sorting (onClosed)=\"sortsDrawer.close()\" [loader]=\"loader\"></axp-list-view-option-sorting>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}\n"] }]
|
|
1673
|
+
args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [AXUnsubscriber], standalone: false, template: "<ax-drawer-container>\n <!-- <ax-drawer #drawer location=\"start\" [collapsed]=\"true\" [mode]=\"platform.is('SM') ? 'overlay' : 'push'\">\n <ax-content class=\"ax-w-64 ax-border-e\">\n <div class=\"ax-p-6 ax-py-4 ax-gap-6 ax-flex ax-flex-col\">\n <p class=\"ax-text-2xl ax-font-bold\">Folders</p>\n <ax-side-menu>\n <ng-container *ngFor=\"let node of menuItems\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: node }\">\n </ng-container>\n </ax-side-menu>\n <ng-template #sideMenu let-item>\n <ax-side-menu-item [text]=\"item.text\">\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-folder ax-text-warning-500\"></ax-icon>\n </ax-prefix>\n <ng-container *ngIf=\"item.children\">\n <ng-container *ngFor=\"let child of item.children\" [ngTemplateOutlet]=\"sideMenu\"\n [ngTemplateOutletContext]=\"{ $implicit: child }\">\n </ng-container>\n </ng-container>\n </ax-side-menu-item>\n </ng-template>\n </div>\n </ax-content>\n </ax-drawer> -->\n <ax-content class=\"ax-flex ax-flex-col ax-overflow-hidden\">\n <div\n class=\"ax-flex ax-flex-col ax-gap-0 md:ax-gap-4 ax-px-4 ax-py-3 md:ax-py-4 md:ax-px-6 ax-bg-surface ax-border-b md:ax-border-0 md:ax-bg-default\">\n @if(platform.is('MD') && this.grid){\n <div class=\"ax-flex ax-justify-between ax-mb-4\">\n @if(this.grid.selectedRows.length===0){\n <div class=\"ax-text-xl ax-font-bold\">{{ title }}</div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canCreate) {\n <ax-button color=\"primary\" class=\"ax-sm\" (onClick)=\"handleCreateClick()\">\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n </div>\n }@else {\n <div class=\"ax-flex ax-items-center ax-gap-3\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if(canDelete) {\n <ax-button color=\"danger\" class=\"ax-sm\" (onClick)=\"handleCommandClick('delete')\">\n <ax-icon class=\"fa-solid fa-trash\"> </ax-icon>\n </ax-button>\n }\n <ax-button color=\"ghost\" class=\"ax-sm\" #more>\n <ax-icon class=\"fa-solid fa-ellipsis-vertical\"> </ax-icon>\n </ax-button>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" [text]=\"(view$ | async)?.title\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-eye ax-text-neutral-400\"> </ax-icon>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{ 'entity.public-view' | translate | async }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\" [selected]=\"(view$ | async) == v\"\n (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item *ngFor=\"let v of customViews$ | async\" [text]=\"v.title\" [selected]=\"(view$ | async) == v\"\n (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item (onClick)=\"addCustomViewPopup()\" text=\"Add Custom View\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n <div class=\"ax-flex ax-gap-2\">\n @if(searchBoxTitle){\n <ax-button (onClick)=\"toggleSearchBox()\" [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\">\n <ax-icon class=\"fa-solid fa-search ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n }\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"columnsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars ax-text-neutral-400\"> </ax-icon>\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-sliders ax-text-neutral-400\"> </ax-icon>\n @if ((conditionsCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n <ax-button [disabled]=\"this.grid.selectedRows.length != 0\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-icon class=\"fa-solid fa-bars-sort ax-text-neutral-400\"> </ax-icon>\n @if ((sortCount$ | async)) {\n <ax-suffix>\n <ax-badge [color]=\"'primary'\"></ax-badge>\n </ax-suffix>\n }\n </ax-button>\n </div>\n </div>\n <div [class.collapsed-search-box]=\"searchBoxCollapsed\" class=\"ax-transition-all ax-mt-4\">\n <ax-search-box [title]=\"searchBoxTitle\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n } @else {\n <div class=\"ax-flex ax-items-center ax-justify-between ax-gap-3\">\n <div class=\"ax-text-xl md:ax-text-2xl ax-font-bold ax-mb-2\">{{ title }}</div>\n @if(this.grid.selectedRows.length==0){\n <div class=\"ax-flex ax-gap-3\">\n @if(canCreate) {\n <ax-button [text]=\"'create-new' | translate | async\" color=\"primary\" (onClick)=\"handleCreateClick()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @let redirectAction = getSingleAction('redirect'); @if(redirectAction) {\n <ax-button [text]=\"redirectAction.title | translate | async\" color=\"primary\"\n (onClick)=\"redirectAction.execute()\">\n <ax-prefix>\n <i class=\"fa-solid fa-add\"></i>\n </ax-prefix>\n </ax-button>\n } @if(canImport){\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list>\n <ax-button-item (onClick)=\"handleImportClick()\" text=\"Import\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-import\"> </ax-icon>\n </ax-prefix>\n </ax-button-item>\n <!-- <ax-button-item text=\"Export\" class=\"ax-font-semibold\">\n <ax-prefix>\n <ax-icon icon=\"fa-solid fa-file-export\"> </ax-icon>\n </ax-prefix>\n </ax-button-item> -->\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n </div>\n }@else {\n <div class=\"ax-flex ax-gap-3\">\n @if(canDelete) {\n <ax-button text=\"Delete Items\" color=\"danger\" (onClick)=\"handleCommandClick('delete')\">\n <ax-prefix>\n <i class=\"fa-solid fa-trash\"></i>\n </ax-prefix>\n </ax-button>\n }\n <ax-button [text]=\"'entity.actions' | translate | async\" color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-ellipsis-vertical\"></i>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <div class=\"ax-flex ax-items-center ax-justify-between\">\n <!----------------------- View Mode --------------------->\n @if(this.grid.selectedRows.length==0) {\n <div class=\"ax-flex ax-w-full ax-justify-between ax-gap-3\">\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"(view$ | async)?.title\" #views color=\"ghost\">\n <ax-prefix>\n <i class=\"fa-solid fa-eye\"></i>\n </ax-prefix>\n <ax-suffix>\n <i class=\"fa-solid fa-caret-down\"></i>\n </ax-suffix>\n <ax-dropdown-panel [adaptivityEnabled]=\"true\">\n <ax-button-item-list class=\"ax-bg-surface\">\n <ax-title class=\"ax-font-bold ax-opacity-100\">{{\n 'entity.public-view' | translate | async\n }}</ax-title>\n <ax-button-item *ngFor=\"let v of publicViews$ | async\" [text]=\"v.title\"\n [class.ax-bg-on-surface]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\"></ax-button-item>\n <ax-title class=\"ax-font-bold ax-opacity-100\" *ngIf=\"hasCustomViews$ | async\">Created by me</ax-title>\n <ax-button-item class=\"ax-pe-4 ax-flex ax-justify-between\" *ngFor=\"let v of customViews$ | async\"\n [text]=\"v.title\" [selected]=\"(view$ | async) == v\" (onClick)=\"loader.setView(v.name)\">\n <ax-suffix>\n <ax-button (onClick)=\"updateViewPopup($event, v)\" class=\"ax-xs\" look=\"none\">\n <ax-icon class=\"far fa-edit\"> </ax-icon>\n </ax-button>\n </ax-suffix>\n </ax-button-item>\n <ng-container *feature=\"'axp-entity-list-custom-view'\">\n <ax-divider></ax-divider>\n <ax-button-item text=\"Add Custom View\" (onClick)=\"addCustomViewPopup()\"\n class=\"ax-font-semibold ax-text-primary\"></ax-button-item>\n </ng-container>\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n @if(searchBoxTitle){\n <div class=\"ax-w-72\">\n <ax-search-box [title]=\"searchBoxTitle\" [(ngModel)]=\"searchValue\"\n (onValueChanged)=\"handleChangeSearchValue($event)\"\n [placeholder]=\"('widget.lookup.search' | translate | async) + searchBoxPlaceholder\"><ax-clear-button></ax-clear-button></ax-search-box>\n </div>\n }\n </div>\n\n <div class=\"ax-flex ax-gap-3\">\n <ax-button [text]=\"'entity.columns' | translate | async\" color=\"ghost\" #columns\n (onClick)=\"columnsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ columnsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button text=\"Filters\" color=\"ghost\" (onClick)=\"conditionsDrawer.open()\" #conditions>\n <ax-prefix>\n <i class=\"fa-solid fa-sliders\"></i>\n </ax-prefix>\n <ax-suffix>\n <ax-badge text=\"{{ conditionsCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n <ax-button [text]=\"'entity.sort' | translate | async\" color=\"ghost\" (onClick)=\"sortsDrawer.open()\">\n <ax-prefix>\n <i class=\"fa-solid fa-bars-sort\"></i>\n </ax-prefix>\n <ax-suffix *ngIf=\"(sortCount$ | async)! > 0\">\n <ax-badge text=\"{{ sortCount$ | async }}\" color=\"primary\"></ax-badge>\n </ax-suffix>\n </ax-button>\n </div>\n </div>\n\n } @else{\n <!----------------------- Selection Mode --------------------->\n <div>\n <div class=\"ax-flex ax-gap-3 ax-items-center ax-h-10\">\n <span class=\"ax-text-xl ax-font-bold\"> {{ this.grid.selectedRows.length }} Items Selected </span>\n <span (click)=\"clearSelectedItems()\"\n class=\"ax-text-sm ax-text-primary dark:ax-text-primary-300 ax-underline ax-cursor-pointer\">Clear\n Items</span>\n </div>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"ax-flex-1 ax-px-6 ax-py-4 ax-flex ax-overflow-auto\">\n <ax-data-table #grid [showFooter]=\"false\" class=\"ax-flex-1\" [dataSource]=\"dataSource\" [paging]=\"true\"\n [fetchDataMode]=\"'manual'\" (onRowDbClick)=\"handleRowDbClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\">\n <!-- <ax-index-column *ngIf=\"!platform.is('SM')\" [width]=\"'85px'\"></ax-index-column> -->\n <ax-select-column fixed=\"start\" [width]=\"'50px'\"></ax-select-column>\n @for(col of (columns$ | async);track col.name) {\n <axp-widget-column-renderer *ngIf=\"col.visible\" [schema]=\"col.schema\" [dataField]=\"col.name\"\n [caption]=\"col.title\" [options]=\"col.options\" [displayFormat]=\"col.displayFormat\" [width]=\"'180px'\"\n [allowSorting]=\"false\">\n </axp-widget-column-renderer>\n }\n <ax-dropdown-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getDropdownRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-dropdown-command-column>\n <ax-command-column fixed=\"end\" [width]=\"'60px'\" [items]=\"getInlineRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"></ax-command-column>\n </ax-data-table>\n </div>\n </ax-content>\n <ax-drawer (collapsedChange)=\"closeDrawer('columns', $event)\" #columnsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-columns [loader]=\"loader\" (onClosed)=\"columnsDrawer.close()\"></axp-list-view-option-columns>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('conditions', $event)\" #conditionsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[25vw] ax-border-e\">\n <axp-list-view-option-conditions [loader]=\"loader\"\n (onClosed)=\"conditionsDrawer.close()\"></axp-list-view-option-conditions>\n </ax-content>\n </ax-drawer>\n <ax-drawer (collapsedChange)=\"closeDrawer('sorts', $event)\" #sortsDrawer location=\"end\" [mode]=\"'overlay'\">\n <ax-content class=\"ax-w-[85vw] md:ax-w-[45vw] lg:ax-w-[35vw] 2xl:ax-w-[20vw] ax-border-e\">\n <axp-list-view-option-sorting (onClosed)=\"sortsDrawer.close()\" [loader]=\"loader\"></axp-list-view-option-sorting>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: [".cdk-drag-preview{border-radius:.375rem;border-width:1px;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);background:rgba(var(--ax-color-on-surface));padding:.5rem;height:max-content!important}.collapsed-search-box{margin-top:0;height:0px;opacity:0}\n"] }]
|
|
1675
1674
|
}], ctorParameters: () => [{ type: i1$3.AXActionSheetService }, { type: i2.AXUnsubscriber }, { type: i3.AXPlatform }, { type: i0.ChangeDetectorRef }], propDecorators: { viewsTemplate: [{
|
|
1676
1675
|
type: ViewChild,
|
|
1677
1676
|
args: ['viewsTemplate']
|