@acorex/platform 21.0.0-next.91 → 21.0.0-next.93
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/fesm2022/acorex-platform-auth.mjs +0 -1
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +9 -4
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-contracts.mjs +12 -1
- package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +2 -16
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain-contracts.mjs +0 -1
- package/fesm2022/acorex-platform-domain-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +4 -4
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +4 -3
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +4 -3
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-attachments-page.component-CwG6n_Yb.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-file-list-popup.component--IeMZLIr.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +24 -4
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +5 -4
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core-contracts.mjs +141 -0
- package/fesm2022/acorex-platform-layout-widget-core-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs +5 -132
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-BvFykMTH.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DIDziLAT.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DIDziLAT.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +13 -440
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime-contracts.mjs +166 -0
- package/fesm2022/acorex-platform-runtime-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-runtime.mjs +1 -163
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BP2dVnBQ.mjs} +3 -2
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BP2dVnBQ.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DrUwqKKA.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +4 -3
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/package.json +14 -6
- package/types/acorex-platform-common.d.ts +15 -5
- package/types/acorex-platform-contracts.d.ts +106 -4
- package/types/acorex-platform-core.d.ts +4 -101
- package/types/acorex-platform-layout-builder.d.ts +3 -3
- package/types/acorex-platform-layout-components.d.ts +4 -3
- package/types/acorex-platform-layout-designer.d.ts +2 -1
- package/types/acorex-platform-layout-entity-contracts.d.ts +2 -3
- package/types/acorex-platform-layout-entity.d.ts +12 -10
- package/types/acorex-platform-layout-views.d.ts +10 -9
- package/types/acorex-platform-layout-widget-core-contracts.d.ts +299 -0
- package/types/acorex-platform-layout-widget-core.d.ts +9 -301
- package/types/acorex-platform-layout-widgets.d.ts +55 -80
- package/types/acorex-platform-runtime-contracts.d.ts +275 -0
- package/types/acorex-platform-runtime.d.ts +4 -274
- package/types/acorex-platform-themes-default.d.ts +3 -3
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-BvFykMTH.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-C7cT82K2.mjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AXPDataGenerator } from '@acorex/platform/contracts';
|
|
1
2
|
import * as i1 from '@acorex/components/button';
|
|
2
3
|
import { AXButtonModule } from '@acorex/components/button';
|
|
3
4
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
@@ -10,7 +11,6 @@ import { AXFormModule } from '@acorex/components/form';
|
|
|
10
11
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
11
12
|
import * as i6 from '@acorex/core/translation';
|
|
12
13
|
import { AXTranslationModule } from '@acorex/core/translation';
|
|
13
|
-
import { AXPDataGenerator } from '@acorex/platform/contracts';
|
|
14
14
|
import * as i1$1 from '@acorex/platform/layout/widget-core';
|
|
15
15
|
import { AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';
|
|
16
16
|
import * as i1$3 from '@angular/common';
|
|
@@ -271,4 +271,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
271
271
|
}], propDecorators: { grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
|
|
272
272
|
|
|
273
273
|
export { AXPTabularDataPopupComponent };
|
|
274
|
-
//# sourceMappingURL=acorex-platform-layout-widgets-tabular-data-edit-popup.component-
|
|
274
|
+
//# sourceMappingURL=acorex-platform-layout-widgets-tabular-data-edit-popup.component-DIDziLAT.mjs.map
|
package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DIDziLAT.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-widgets-tabular-data-edit-popup.component-DIDziLAT.mjs","sources":["../../../../libs/platform/layout/widgets/src/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.ts"],"sourcesContent":["import { AXPContextChangeEvent, AXPDataGenerator } from '@acorex/platform/contracts';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDataSource } from '@acorex/cdk/common';\nimport {\n AXDataTableComponent,\n AXDataTableModule,\n AXRowCommandItem,\n AXRowCommandItemClickEvent,\n} from '@acorex/components/data-table';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule } from '@acorex/core/translation';\n\nimport { AXPWidgetCoreModule } from '@acorex/platform/layout/widget-core';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, viewChild } from '@angular/core';\nimport { cloneDeep } from 'lodash-es';\nimport { AXPTabularDataColumn } from './tabular-widget.types';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <axp-widgets-container [context]=\"context\" (onContextChanged)=\"handleContextChange($event)\">\n <ax-form #form>\n <div class=\"ax-p-4\">\n <ax-data-table\n #grid\n [paging]=\"false\"\n [allowReordering]=\"true\"\n (selectedRowsChange)=\"handleSelectionChange($event)\"\n [dataSource]=\"dataSource\"\n class=\"ax-h-96 ax-overflow-auto\"\n >\n @for (column of columns; track $index) {\n <ax-text-column\n width=\"200px\"\n [caption]=\"column.title\"\n [dataField]=\"column.name\"\n [cellTemplate]=\"cell\"\n [allowResizing]=\"true\"\n ></ax-text-column>\n <ng-template #cell let-item>\n <ng-container\n axp-widget-renderer\n [node]=\"{\n path: item.rowIndex + '.' + column.name,\n type: column.type,\n options: column.options ?? {},\n }\"\n [mode]=\"'edit'\"\n >\n </ng-container>\n </ng-template>\n }\n <ax-command-column\n fixed=\"end\"\n [width]=\"getCommandRowItems.length * 60 + 'px'\"\n [items]=\"getCommandRowItems\"\n (onItemClick)=\"handleRowCommandClick($event)\"\n ></ax-command-column>\n </ax-data-table>\n @if (!disabled) {\n <div class=\"ax-flex ax-justify-end ax-py-4\">\n <ax-button\n [text]=\"(this.context ?? []).length ? 'Start Adding Items' : 'Add Your First Item'\"\n look=\"twotone\"\n [disabled]=\"disabled\"\n (onClick)=\"addRecord()\"\n class=\"ax-col-start-10 ax-col-end-13\"\n >\n <ax-prefix>\n <ax-icon class=\"fa-solid fa-add\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n </div>\n <ax-footer>\n <ax-suffix>\n <ax-button [text]=\"'@general:actions.discard.title' | translate | async\" (onClick)=\"onCloseDiscard()\"></ax-button>\n <ax-button\n color=\"primary\"\n [text]=\"'@general:actions.ok.title' | translate | async\"\n (onClick)=\"handleSaveClick(form)\"\n ></ax-button>\n </ax-suffix>\n </ax-footer>\n </ax-form>\n </axp-widgets-container>\n `,\n imports: [\n CommonModule,\n AXDecoratorModule,\n AXButtonModule,\n AXPWidgetCoreModule,\n AXDataTableModule,\n AXTranslationModule,\n AXFormModule,\n ],\n})\nexport class AXPTabularDataPopupComponent extends AXBasePageComponent {\n context: any;\n columns: AXPTabularDataColumn[];\n disabled: boolean = false;\n defaultRowCount: number = 0;\n contextDiscard: any;\n\n getCommandRowItems: AXRowCommandItem[] = [\n {\n name: 'delete',\n text: \"@general:actions.delete.title\",\n icon: 'fa-light fa-trash ax-text-danger',\n //divided: boolean,\n //disabled: boolean,\n color: 'danger',\n },\n ];\n\n protected override ngOnInit(): void {\n this.columns = this.columns.filter((col) => col.name != null && col.name != '' && col.type != null);\n\n this.columns = this.columns.map((col) => {\n return {\n ...col,\n options: {\n ...(col.options ?? {}),\n validationRules: [\n {\n rule: 'required',\n },\n ],\n },\n };\n });\n this.contextDiscard = cloneDeep(this.context);\n if (this.context == null || this.context?.length == 0) {\n for (let i = 0; i < this.defaultRowCount; i++) {\n this.addRecord();\n }\n }\n }\n\n protected dataSource = new AXDataSource({\n load: async () => {\n this.context = (this.context ?? []).map((x: any) => {\n return {\n ...x,\n id: AXPDataGenerator.uuid(),\n options: {},\n };\n });\n const items = this.context;\n console.log(this.context);\n\n return {\n items: items ?? [],\n total: (items ?? []).length,\n };\n },\n pageSize: 1,\n key: 'gridItem',\n });\n\n protected grid = viewChild<AXDataTableComponent>('grid');\n\n handleContextChange(e: AXPContextChangeEvent) {\n this.context = e.data;\n }\n\n onCloseDiscard() {\n this.close({\n context: this.contextDiscard,\n });\n }\n\n addRecord() {\n console.log(this.columns);\n\n const value = this.context ?? [];\n const newRecord = this.columns?.reduce((acc: { [key: string]: any }, column) => {\n acc[column.name] = ''; // or any default value\n return acc;\n }, {});\n console.log(value);\n this.context = [...value, newRecord];\n this.grid()?.refresh();\n }\n\n handleSelectionChange(e: any) {\n console.log(e);\n }\n\n protected async handleRowCommandClick(e: AXRowCommandItemClickEvent) {\n if (e.name == 'delete') {\n this.context = this.context.filter((item: any) => item.id !== e.data.id);\n this.grid()?.refresh();\n }\n }\n\n protected async handleSaveClick(form: AXFormComponent) {\n const formResult = await form.validate();\n console.log(formResult.rules);\n\n if (formResult.result) {\n this.close({\n context: this.context,\n });\n }\n }\n}\n"],"names":["i1","i2","i3","i4","i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqGM,MAAO,4BAA6B,SAAQ,mBAAmB,CAAA;AAjFrE,IAAA,WAAA,GAAA;;QAoFE,IAAA,CAAA,QAAQ,GAAY,KAAK;QACzB,IAAA,CAAA,eAAe,GAAW,CAAC;AAG3B,QAAA,IAAA,CAAA,kBAAkB,GAAuB;AACvC,YAAA;AACE,gBAAA,IAAI,EAAE,QAAQ;AACd,gBAAA,IAAI,EAAE,+BAA+B;AACrC,gBAAA,IAAI,EAAE,kCAAkC;;;AAGxC,gBAAA,KAAK,EAAE,QAAQ;AAChB,aAAA;SACF;QA0BS,IAAA,CAAA,UAAU,GAAG,IAAI,YAAY,CAAC;YACtC,IAAI,EAAE,YAAW;AACf,gBAAA,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,GA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AAA,EAAA,IAAA,EAAAC,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,UAAA,EAAA,WAAA,EAAA,MAAA,EAAA,cAAA,EAAA,UAAA,EAAA,yBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGH,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAjFxC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoET,EAAA,CAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,cAAc;wBACd,mBAAmB;wBACnB,iBAAiB;wBACjB,mBAAmB;wBACnB,YAAY;AACb,qBAAA;AACF,iBAAA;kEAgEkD,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i1 from '@acorex/platform/layout/widget-core';
|
|
2
|
-
import { AXPWidgetCoreModule, AXPDataListWidgetComponent, AXPColumnWidgetComponent, AXPLayoutBaseWidgetComponent, AXP_NAME_PROPERTY, AXP_DISABLED_PROPERTY, AXP_STYLE_COLOR_PROPERTY, AXP_STYLE_LOOK_PROPERTY, AXP_ICON_PROPERTY, AXP_IS_LOADING_PROPERTY,
|
|
2
|
+
import { AXPWidgetCoreModule, AXPDataListWidgetComponent, AXPColumnWidgetComponent, AXPLayoutBaseWidgetComponent, AXP_NAME_PROPERTY, AXP_DISABLED_PROPERTY, AXP_STYLE_COLOR_PROPERTY, AXP_STYLE_LOOK_PROPERTY, AXP_ICON_PROPERTY, AXP_IS_LOADING_PROPERTY, AXP_TEXT_PROPERTY, AXP_WIDGETS_ACTION_SUB_CONTROLS, AXP_WIDGETS_ACTION_CATEGORY, AXP_DATA_PATH_PROPERTY, AXP_WIDGETS_EDITOR_CATEGORY, AXPValueWidgetComponent, AXP_LABEL_PROPERTY, AXP_READONLY_PROPERTY, AXP_TRIGGERS_PROPERTY, booleanDefaultProperty, AXP_WIDGETS_EDITOR_SUB_CHOICE, AXP_PLACEHOLDER_PROPERTY, AXP_HAS_CLEAR_BUTTON_PROPERTY, AXP_WIDGETS_EDITOR_SUB_VISUAL, AXP_DATA_PROPERTY_GROUP, AXP_HAS_LABEL_PROPERTY, AXP_HAS_ICON_PROPERTY, AXP_BEHAVIOR_PROPERTY_GROUP, AXP_WIDGETS_EDITOR_SUB_COMPOSITE, AXP_DATE_FORMAT_PROPERTY, AXP_DATE_DEPTH_PROPERTY, AXP_DATE_RANGE_LIMIT_PROPERTY, AXP_REQUIRED_VALIDATION_PROPERTY, AXP_LESS_THAN_VALIDATION_PROPERTY, AXP_GREATER_THAN_VALIDATION_PROPERTY, AXP_TABLE_COLUMN_WIDTH_PROPERTY, AXP_WIDGETS_EDITOR_SUB_DATETIME, AXP_WIDGETS_EDITOR_SUB_RICH, AXP_MULTI_LANGUAGE_PROPERTY, AXP_MIN_LENGTH_VALIDATION_PROPERTY, AXP_REGULAR_EXPRESSION_VALIDATION_PROPERTY, AXP_MAX_LENGTH_VALIDATION_PROPERTY, largeTextDefaultProperty, AXP_WIDGETS_EDITOR_SUB_TEXT_INPUTS, AXP_ALLOW_MULTIPLE_PROPERTY, AXP_SPIN_BUTTON_PROPERTY, AXP_NUMBER_SEPARATOR_PROPERTY, numberDefaultProperty, numberMinValueProperty, numberMaxValueProperty, AXP_WIDGETS_EDITOR_SUB_NUMERIC, AXP_HAS_COPY_ICON_PROPERTY, AXP_HAS_EYE_ICON_PROPERTY, AXP_SHOW_PASSWORD_PROPERTY, AXP_MIN_LINE_COUNT_PROPERTY, AXP_MAX_LINE_COUNT_PROPERTY, AXP_FIT_LINE_COUNT_PROPERTY, richTextDefaultProperty, AXP_DATA_SOURCE_OPTIONS_PROPERTY, AXP_ALLOW_SEARCH_PROPERTY, selectEditorDefaultValueProperty, AXP_DIRECTION_PROPERTY, selectionListEditorDefaultValueProperty, plainTextDefaultProperty, AXP_FALSY_TEXT_PROPERTY, AXP_TRULY_TEXT_PROPERTY, AXP_WIDGETS_ADVANCE_SUB_MEDIA, AXP_WIDGETS_ADVANCE_CATEGORY, AXP_WIDGETS_ADVANCE_SUB_INPUT, AXP_WIDGETS_LAYOUT_SUB_LISTS, AXP_WIDGETS_LAYOUT_CATEGORY, AXP_STYLING_PROPERTY_GROUP, AXP_WIDGETS_ADVANCE_SUB_TOOLS, AXP_WIDGETS_ADVANCE_SUB_DATA, AXP_COLOR_PROPERTY, AXP_CONTENT_PROPERTY, AXP_WIDGETS_EDITOR_SUB_CONFIG, AXPWidgetRegistryService, AXPPropertyEditorHelper, AXP_WIDGETS_LAYOUT_SUB_GRID, AXPBlockBaseLayoutWidgetComponent, AXP_LAYOUT_SPACING_PROPERTY, AXP_LAYOUT_BORDER_PROPERTY, AXP_LAYOUT_DIRECTION_PROPERTY, AXP_TITLE_PROPERTY, AXP_LAYOUT_SHOW_HEADER_PROPERTY, AXP_LAYOUT_COLUMNS_PROPERTY, AXP_WIDGETS_LAYOUT_SUB_SURFACES, AXPFlexBaseLayoutWidgetComponent, AXP_LAYOUT_FLEX_PROPERTY, AXPFlexItemBaseLayoutWidgetComponent, AXP_LAYOUT_FLEX_ITEM_PROPERTY, AXP_THEME_PROPERTY, AXP_FONT_SIZE_PROPERTY, AXP_BG_COLOR_PROPERTY, AXP_WIDGETS_LAYOUT_SUB_SHELL, AXPTableBaseLayoutWidgetComponent, AXP_TABLE_COLUMNS_PROPERTY, AXP_LAYOUT_TABLE_PROPERTY_GROUP, AXPTableItemBaseLayoutWidgetComponent, AXP_TABLE_ITEM_COLSPAN_PROPERTY, AXP_TABLE_ITEM_ROWSPAN_PROPERTY, findNonEmptyBreakpoints, AXP_DEFAULT_ROW_COUNT_PROPERTY, AXP_APPEARANCE_PROPERTY_GROUP, AXP_WIDGETS_LAYOUT_SUB_UTILITY, AXPGridItemBaseLayoutWidgetComponent, AXPGridBaseLayoutWidgetComponent, AXP_LAYOUT_GRID_PROPERTY, AXP_LAYOUT_GRID_ITEM_PROPERTY, AXP_WIDGETS_LAYOUT_SUB_TABS, AXP_WIDGET_DEFINITION_PROVIDER } from '@acorex/platform/layout/widget-core';
|
|
3
3
|
export * from '@acorex/platform/layout/widget-core';
|
|
4
4
|
import { AXActionSheetService } from '@acorex/components/action-sheet';
|
|
5
5
|
import * as i1$3 from '@acorex/components/badge';
|
|
@@ -21,7 +21,7 @@ import * as i1$6 from '@acorex/components/text-box';
|
|
|
21
21
|
import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
22
22
|
import * as i6 from '@acorex/core/translation';
|
|
23
23
|
import { AXTranslationModule, AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';
|
|
24
|
-
import { AXP_LOCALE_MANAGEMENT_PORT, AXPFilterOperatorMiddlewareService, AXPCleanNestedFilters, AXPClipBoardService, AXPSettingsService, ALL_DEFAULT_OPERATORS, DATE_OPERATORS, BOOLEAN_OPERATORS, NUMBER_OPERATORS, STRING_OPERATORS, resolveDateFilterPresets, findManualPresetIdByOperation, applyDateFilterPreset, AXPFileStorageService, AXPFileActionsService,
|
|
24
|
+
import { AXP_LOCALE_MANAGEMENT_PORT, AXPFilterOperatorMiddlewareService, AXPCleanNestedFilters, AXPClipBoardService, AXPSettingsService, ALL_DEFAULT_OPERATORS, DATE_OPERATORS, BOOLEAN_OPERATORS, NUMBER_OPERATORS, STRING_OPERATORS, resolveDateFilterPresets, findManualPresetIdByOperation, applyDateFilterPreset, AXPFileStorageService, AXPFileActionsService, normalizePositiveNumberOption, resolveEntityRowDisplayText, resolveEntityRowDisplayTitle, downloadGraphicFromElement, printGraphicFromElement, AXPStatusDefinitionProviderService, AXPRefreshEvent, AXPCommonSettings } from '@acorex/platform/common';
|
|
25
25
|
import { AXPDeviceService, setupPopupFooterKeyboardShortcuts, AXPColorPaletteService, AXPDebugService, FORM_DIRTY_TRACE_NS, AXPTagService, AXPExpressionEvaluatorService, AXPHookService, AXPDataSourceDefinitionProviderService, applyQueryArray, chordToKbdItemKeys, objectKeyValueTransforms } from '@acorex/platform/core';
|
|
26
26
|
import * as i1$4 from '@angular/common';
|
|
27
27
|
import { CommonModule, AsyncPipe } from '@angular/common';
|
|
@@ -36,6 +36,7 @@ import { set, get, castArray, isNil, isNull, isEmpty, first, isNumber, defaultTo
|
|
|
36
36
|
import * as i2$2 from '@acorex/components/loading';
|
|
37
37
|
import { AXLoadingModule } from '@acorex/components/loading';
|
|
38
38
|
import { AXPCommandService, AXPQueryService, provideQuerySetups } from '@acorex/platform/runtime';
|
|
39
|
+
import { cloneProperty, AXPWidgetGroupEnum, createSelectProperty, createStringProperty, createBooleanProperty, createNumberProperty, AXPWidgetStatus } from '@acorex/platform/layout/widget-core-contracts';
|
|
39
40
|
import { AXPConditionBuilderComponent, AXPColorPalettePickerComponent, AXPDragDropListComponent, AXPColumnItemListComponent, AXPImageEditorService, AXPStateMessageComponent, AXPOutcomeResultsViewerComponent, AXPSignatureEditorService, AXPStopwatchComponent, AXPWidgetFieldConfiguratorComponent, AXPItemConfiguratorComponent, AXPRepeaterRowsLayoutComponent, AXPQueryFiltersComponent, AXPQuerySortsComponent, AXPQueryColumnsComponent } from '@acorex/platform/layout/components';
|
|
40
41
|
import { AXValidationModule, AXValidationService } from '@acorex/core/validation';
|
|
41
42
|
import { AXColorUtil } from '@acorex/core/utils';
|
|
@@ -94,7 +95,6 @@ import * as i1$d from '@acorex/components/media-viewer';
|
|
|
94
95
|
import { AXMediaViewerModule } from '@acorex/components/media-viewer';
|
|
95
96
|
import * as i1$e from '@acorex/components/image';
|
|
96
97
|
import { AXImageModule } from '@acorex/components/image';
|
|
97
|
-
import { AXPSessionService } from '@acorex/platform/auth';
|
|
98
98
|
import * as i1$f from '@acorex/components/json-viewer';
|
|
99
99
|
import { AXJsonViewerModule } from '@acorex/components/json-viewer';
|
|
100
100
|
import * as i1$g from '@acorex/components/map';
|
|
@@ -11999,336 +11999,8 @@ const AXPIntegrationConnectionsPanelWidget = {
|
|
|
11999
11999
|
|
|
12000
12000
|
//#region ---- Imports ----
|
|
12001
12001
|
//#endregion
|
|
12002
|
-
//#region ----
|
|
12003
|
-
|
|
12004
|
-
constructor() {
|
|
12005
|
-
super(...arguments);
|
|
12006
|
-
this.methods = [];
|
|
12007
|
-
}
|
|
12008
|
-
selectMethod(authMethodType) {
|
|
12009
|
-
this.close({ authMethodType });
|
|
12010
|
-
}
|
|
12011
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIntegrationConnectionAuthMethodPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
12012
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPIntegrationConnectionAuthMethodPopupComponent, isStandalone: true, selector: "axp-integration-connection-auth-method-popup", usesInheritance: true, ngImport: i0, template: `
|
|
12013
|
-
<div class="ax-flex ax-flex-col ax-gap-2 ax-p-4">
|
|
12014
|
-
@for (method of methods; track method.type) {
|
|
12015
|
-
<ax-button
|
|
12016
|
-
look="outline"
|
|
12017
|
-
color="default"
|
|
12018
|
-
class="ax-w-full"
|
|
12019
|
-
[text]="method.label"
|
|
12020
|
-
(onClick)="selectMethod(method.type)"
|
|
12021
|
-
></ax-button>
|
|
12022
|
-
}
|
|
12023
|
-
</div>
|
|
12024
|
-
<ax-footer>
|
|
12025
|
-
<ax-suffix>
|
|
12026
|
-
<ax-button
|
|
12027
|
-
look="outline"
|
|
12028
|
-
[text]="'@general:actions.cancel.title' | translate | async"
|
|
12029
|
-
(onClick)="close()"
|
|
12030
|
-
></ax-button>
|
|
12031
|
-
</ax-suffix>
|
|
12032
|
-
</ax-footer>
|
|
12033
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12034
|
-
}
|
|
12035
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIntegrationConnectionAuthMethodPopupComponent, decorators: [{
|
|
12036
|
-
type: Component,
|
|
12037
|
-
args: [{
|
|
12038
|
-
selector: 'axp-integration-connection-auth-method-popup',
|
|
12039
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12040
|
-
imports: [AsyncPipe, AXButtonModule, AXDecoratorModule, AXTranslationModule],
|
|
12041
|
-
template: `
|
|
12042
|
-
<div class="ax-flex ax-flex-col ax-gap-2 ax-p-4">
|
|
12043
|
-
@for (method of methods; track method.type) {
|
|
12044
|
-
<ax-button
|
|
12045
|
-
look="outline"
|
|
12046
|
-
color="default"
|
|
12047
|
-
class="ax-w-full"
|
|
12048
|
-
[text]="method.label"
|
|
12049
|
-
(onClick)="selectMethod(method.type)"
|
|
12050
|
-
></ax-button>
|
|
12051
|
-
}
|
|
12052
|
-
</div>
|
|
12053
|
-
<ax-footer>
|
|
12054
|
-
<ax-suffix>
|
|
12055
|
-
<ax-button
|
|
12056
|
-
look="outline"
|
|
12057
|
-
[text]="'@general:actions.cancel.title' | translate | async"
|
|
12058
|
-
(onClick)="close()"
|
|
12059
|
-
></ax-button>
|
|
12060
|
-
</ax-suffix>
|
|
12061
|
-
</ax-footer>
|
|
12062
|
-
`,
|
|
12063
|
-
}]
|
|
12064
|
-
}] });
|
|
12065
|
-
|
|
12066
|
-
//#endregion
|
|
12067
|
-
//#region ---- Component ----
|
|
12068
|
-
class AXPIntegrationConnectionConnectPopupComponent extends AXBasePageComponent {
|
|
12069
|
-
constructor() {
|
|
12070
|
-
super(...arguments);
|
|
12071
|
-
this.displayName = signal('', ...(ngDevMode ? [{ debugName: "displayName" }] : /* istanbul ignore next */ []));
|
|
12072
|
-
this.instanceUrl = signal('', ...(ngDevMode ? [{ debugName: "instanceUrl" }] : /* istanbul ignore next */ []));
|
|
12073
|
-
this.credentialPrimary = signal('', ...(ngDevMode ? [{ debugName: "credentialPrimary" }] : /* istanbul ignore next */ []));
|
|
12074
|
-
this.credentialSecondary = signal('', ...(ngDevMode ? [{ debugName: "credentialSecondary" }] : /* istanbul ignore next */ []));
|
|
12075
|
-
}
|
|
12076
|
-
isOAuth() {
|
|
12077
|
-
return this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.OAuth2;
|
|
12078
|
-
}
|
|
12079
|
-
showSecondaryCredential() {
|
|
12080
|
-
return (this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.Basic ||
|
|
12081
|
-
this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken);
|
|
12082
|
-
}
|
|
12083
|
-
primaryCredentialLabelKey() {
|
|
12084
|
-
if (this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.Basic) {
|
|
12085
|
-
return `${this.i18nPrefix}.fields.username`;
|
|
12086
|
-
}
|
|
12087
|
-
if (this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken) {
|
|
12088
|
-
return `${this.i18nPrefix}.fields.email`;
|
|
12089
|
-
}
|
|
12090
|
-
return `${this.i18nPrefix}.fields.token`;
|
|
12091
|
-
}
|
|
12092
|
-
primaryCredentialPlaceholderKey() {
|
|
12093
|
-
if (this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.Basic) {
|
|
12094
|
-
return `${this.i18nPrefix}.placeholders.username`;
|
|
12095
|
-
}
|
|
12096
|
-
if (this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken) {
|
|
12097
|
-
return `${this.i18nPrefix}.placeholders.email`;
|
|
12098
|
-
}
|
|
12099
|
-
return `${this.i18nPrefix}.placeholders.token`;
|
|
12100
|
-
}
|
|
12101
|
-
secondaryCredentialLabelKey() {
|
|
12102
|
-
if (this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken) {
|
|
12103
|
-
return `${this.i18nPrefix}.fields.api-token`;
|
|
12104
|
-
}
|
|
12105
|
-
return `${this.i18nPrefix}.fields.password`;
|
|
12106
|
-
}
|
|
12107
|
-
secondaryCredentialPlaceholderKey() {
|
|
12108
|
-
if (this.authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken) {
|
|
12109
|
-
return `${this.i18nPrefix}.placeholders.api-token`;
|
|
12110
|
-
}
|
|
12111
|
-
return `${this.i18nPrefix}.placeholders.password`;
|
|
12112
|
-
}
|
|
12113
|
-
handleDisplayNameChange(event) {
|
|
12114
|
-
if (!event.isUserInteraction) {
|
|
12115
|
-
return;
|
|
12116
|
-
}
|
|
12117
|
-
this.displayName.set(event.value ?? '');
|
|
12118
|
-
}
|
|
12119
|
-
handleInstanceUrlChange(event) {
|
|
12120
|
-
if (!event.isUserInteraction) {
|
|
12121
|
-
return;
|
|
12122
|
-
}
|
|
12123
|
-
this.instanceUrl.set(event.value ?? '');
|
|
12124
|
-
}
|
|
12125
|
-
handleCredentialPrimaryChange(event) {
|
|
12126
|
-
if (!event.isUserInteraction) {
|
|
12127
|
-
return;
|
|
12128
|
-
}
|
|
12129
|
-
this.credentialPrimary.set(event.value ?? '');
|
|
12130
|
-
}
|
|
12131
|
-
handleCredentialSecondaryChange(event) {
|
|
12132
|
-
if (!event.isUserInteraction) {
|
|
12133
|
-
return;
|
|
12134
|
-
}
|
|
12135
|
-
this.credentialSecondary.set(event.value ?? '');
|
|
12136
|
-
}
|
|
12137
|
-
confirmOAuth() {
|
|
12138
|
-
this.close({ confirmed: true });
|
|
12139
|
-
}
|
|
12140
|
-
saveCredentials() {
|
|
12141
|
-
this.close({
|
|
12142
|
-
displayName: this.displayName(),
|
|
12143
|
-
instanceUrl: this.instanceUrl(),
|
|
12144
|
-
credentialPrimary: this.credentialPrimary(),
|
|
12145
|
-
credentialSecondary: this.credentialSecondary(),
|
|
12146
|
-
});
|
|
12147
|
-
}
|
|
12148
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIntegrationConnectionConnectPopupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
12149
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPIntegrationConnectionConnectPopupComponent, isStandalone: true, selector: "axp-integration-connection-connect-popup", usesInheritance: true, ngImport: i0, template: `
|
|
12150
|
-
@if (isOAuth()) {
|
|
12151
|
-
<div class="ax-p-4 ax-text-sm ax-opacity-80">
|
|
12152
|
-
{{ i18nPrefix + '.dialogs.oauth.description' | translate | async }}
|
|
12153
|
-
</div>
|
|
12154
|
-
<ax-footer>
|
|
12155
|
-
<ax-suffix>
|
|
12156
|
-
<ax-button
|
|
12157
|
-
look="outline"
|
|
12158
|
-
[text]="'@general:actions.cancel.title' | translate | async"
|
|
12159
|
-
(onClick)="close()"
|
|
12160
|
-
></ax-button>
|
|
12161
|
-
<ax-button
|
|
12162
|
-
color="primary"
|
|
12163
|
-
[text]="i18nPrefix + '.actions.connect' | translate | async"
|
|
12164
|
-
(onClick)="confirmOAuth()"
|
|
12165
|
-
>
|
|
12166
|
-
<ax-suffix>
|
|
12167
|
-
<ax-icon>
|
|
12168
|
-
<i class="fa-light fa-arrow-up-right-from-square"></i>
|
|
12169
|
-
</ax-icon>
|
|
12170
|
-
</ax-suffix>
|
|
12171
|
-
</ax-button>
|
|
12172
|
-
</ax-suffix>
|
|
12173
|
-
</ax-footer>
|
|
12174
|
-
} @else {
|
|
12175
|
-
<div class="ax-flex ax-flex-col ax-gap-3 ax-p-4">
|
|
12176
|
-
<ax-form-field>
|
|
12177
|
-
<ax-label>{{ i18nPrefix + '.fields.display-name' | translate | async }}</ax-label>
|
|
12178
|
-
<ax-text-box
|
|
12179
|
-
[ngModel]="displayName()"
|
|
12180
|
-
[placeholder]="(i18nPrefix + '.placeholders.display-name' | translate | async) ?? ''"
|
|
12181
|
-
(onValueChanged)="handleDisplayNameChange($event)"
|
|
12182
|
-
></ax-text-box>
|
|
12183
|
-
</ax-form-field>
|
|
12184
|
-
|
|
12185
|
-
<ax-form-field>
|
|
12186
|
-
<ax-label>{{ i18nPrefix + '.fields.instance-url' | translate | async }}</ax-label>
|
|
12187
|
-
<ax-text-box
|
|
12188
|
-
[ngModel]="instanceUrl()"
|
|
12189
|
-
[placeholder]="(i18nPrefix + '.placeholders.instance-url' | translate | async) ?? ''"
|
|
12190
|
-
(onValueChanged)="handleInstanceUrlChange($event)"
|
|
12191
|
-
></ax-text-box>
|
|
12192
|
-
</ax-form-field>
|
|
12193
|
-
|
|
12194
|
-
<ax-form-field>
|
|
12195
|
-
<ax-label>{{ primaryCredentialLabelKey() | translate | async }}</ax-label>
|
|
12196
|
-
<ax-text-box
|
|
12197
|
-
[ngModel]="credentialPrimary()"
|
|
12198
|
-
[placeholder]="primaryCredentialPlaceholderKey() | translate | async"
|
|
12199
|
-
(onValueChanged)="handleCredentialPrimaryChange($event)"
|
|
12200
|
-
></ax-text-box>
|
|
12201
|
-
</ax-form-field>
|
|
12202
|
-
|
|
12203
|
-
@if (showSecondaryCredential()) {
|
|
12204
|
-
<ax-form-field>
|
|
12205
|
-
<ax-label>{{ secondaryCredentialLabelKey() | translate | async }}</ax-label>
|
|
12206
|
-
<ax-password-box
|
|
12207
|
-
[ngModel]="credentialSecondary()"
|
|
12208
|
-
[placeholder]="secondaryCredentialPlaceholderKey() | translate | async"
|
|
12209
|
-
(onValueChanged)="handleCredentialSecondaryChange($event)"
|
|
12210
|
-
></ax-password-box>
|
|
12211
|
-
</ax-form-field>
|
|
12212
|
-
}
|
|
12213
|
-
</div>
|
|
12214
|
-
<ax-footer>
|
|
12215
|
-
<ax-suffix>
|
|
12216
|
-
<ax-button
|
|
12217
|
-
look="outline"
|
|
12218
|
-
[text]="'@general:actions.cancel.title' | translate | async"
|
|
12219
|
-
(onClick)="close()"
|
|
12220
|
-
></ax-button>
|
|
12221
|
-
<ax-button
|
|
12222
|
-
color="primary"
|
|
12223
|
-
[text]="i18nPrefix + '.actions.save-connection' | translate | async"
|
|
12224
|
-
(onClick)="saveCredentials()"
|
|
12225
|
-
></ax-button>
|
|
12226
|
-
</ax-suffix>
|
|
12227
|
-
</ax-footer>
|
|
12228
|
-
}
|
|
12229
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i2.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXPasswordBoxModule }, { kind: "component", type: i3$3.AXPasswordBoxComponent, selector: "ax-password-box", inputs: ["readonly", "disabled", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "autoComplete", "showToggleButton", "class"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i1$6.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12230
|
-
}
|
|
12231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIntegrationConnectionConnectPopupComponent, decorators: [{
|
|
12232
|
-
type: Component,
|
|
12233
|
-
args: [{
|
|
12234
|
-
selector: 'axp-integration-connection-connect-popup',
|
|
12235
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12236
|
-
imports: [
|
|
12237
|
-
AsyncPipe,
|
|
12238
|
-
FormsModule,
|
|
12239
|
-
AXButtonModule,
|
|
12240
|
-
AXDecoratorModule,
|
|
12241
|
-
AXFormModule,
|
|
12242
|
-
AXLabelModule,
|
|
12243
|
-
AXPasswordBoxModule,
|
|
12244
|
-
AXTextBoxModule,
|
|
12245
|
-
AXTranslationModule,
|
|
12246
|
-
],
|
|
12247
|
-
template: `
|
|
12248
|
-
@if (isOAuth()) {
|
|
12249
|
-
<div class="ax-p-4 ax-text-sm ax-opacity-80">
|
|
12250
|
-
{{ i18nPrefix + '.dialogs.oauth.description' | translate | async }}
|
|
12251
|
-
</div>
|
|
12252
|
-
<ax-footer>
|
|
12253
|
-
<ax-suffix>
|
|
12254
|
-
<ax-button
|
|
12255
|
-
look="outline"
|
|
12256
|
-
[text]="'@general:actions.cancel.title' | translate | async"
|
|
12257
|
-
(onClick)="close()"
|
|
12258
|
-
></ax-button>
|
|
12259
|
-
<ax-button
|
|
12260
|
-
color="primary"
|
|
12261
|
-
[text]="i18nPrefix + '.actions.connect' | translate | async"
|
|
12262
|
-
(onClick)="confirmOAuth()"
|
|
12263
|
-
>
|
|
12264
|
-
<ax-suffix>
|
|
12265
|
-
<ax-icon>
|
|
12266
|
-
<i class="fa-light fa-arrow-up-right-from-square"></i>
|
|
12267
|
-
</ax-icon>
|
|
12268
|
-
</ax-suffix>
|
|
12269
|
-
</ax-button>
|
|
12270
|
-
</ax-suffix>
|
|
12271
|
-
</ax-footer>
|
|
12272
|
-
} @else {
|
|
12273
|
-
<div class="ax-flex ax-flex-col ax-gap-3 ax-p-4">
|
|
12274
|
-
<ax-form-field>
|
|
12275
|
-
<ax-label>{{ i18nPrefix + '.fields.display-name' | translate | async }}</ax-label>
|
|
12276
|
-
<ax-text-box
|
|
12277
|
-
[ngModel]="displayName()"
|
|
12278
|
-
[placeholder]="(i18nPrefix + '.placeholders.display-name' | translate | async) ?? ''"
|
|
12279
|
-
(onValueChanged)="handleDisplayNameChange($event)"
|
|
12280
|
-
></ax-text-box>
|
|
12281
|
-
</ax-form-field>
|
|
12282
|
-
|
|
12283
|
-
<ax-form-field>
|
|
12284
|
-
<ax-label>{{ i18nPrefix + '.fields.instance-url' | translate | async }}</ax-label>
|
|
12285
|
-
<ax-text-box
|
|
12286
|
-
[ngModel]="instanceUrl()"
|
|
12287
|
-
[placeholder]="(i18nPrefix + '.placeholders.instance-url' | translate | async) ?? ''"
|
|
12288
|
-
(onValueChanged)="handleInstanceUrlChange($event)"
|
|
12289
|
-
></ax-text-box>
|
|
12290
|
-
</ax-form-field>
|
|
12291
|
-
|
|
12292
|
-
<ax-form-field>
|
|
12293
|
-
<ax-label>{{ primaryCredentialLabelKey() | translate | async }}</ax-label>
|
|
12294
|
-
<ax-text-box
|
|
12295
|
-
[ngModel]="credentialPrimary()"
|
|
12296
|
-
[placeholder]="primaryCredentialPlaceholderKey() | translate | async"
|
|
12297
|
-
(onValueChanged)="handleCredentialPrimaryChange($event)"
|
|
12298
|
-
></ax-text-box>
|
|
12299
|
-
</ax-form-field>
|
|
12300
|
-
|
|
12301
|
-
@if (showSecondaryCredential()) {
|
|
12302
|
-
<ax-form-field>
|
|
12303
|
-
<ax-label>{{ secondaryCredentialLabelKey() | translate | async }}</ax-label>
|
|
12304
|
-
<ax-password-box
|
|
12305
|
-
[ngModel]="credentialSecondary()"
|
|
12306
|
-
[placeholder]="secondaryCredentialPlaceholderKey() | translate | async"
|
|
12307
|
-
(onValueChanged)="handleCredentialSecondaryChange($event)"
|
|
12308
|
-
></ax-password-box>
|
|
12309
|
-
</ax-form-field>
|
|
12310
|
-
}
|
|
12311
|
-
</div>
|
|
12312
|
-
<ax-footer>
|
|
12313
|
-
<ax-suffix>
|
|
12314
|
-
<ax-button
|
|
12315
|
-
look="outline"
|
|
12316
|
-
[text]="'@general:actions.cancel.title' | translate | async"
|
|
12317
|
-
(onClick)="close()"
|
|
12318
|
-
></ax-button>
|
|
12319
|
-
<ax-button
|
|
12320
|
-
color="primary"
|
|
12321
|
-
[text]="i18nPrefix + '.actions.save-connection' | translate | async"
|
|
12322
|
-
(onClick)="saveCredentials()"
|
|
12323
|
-
></ax-button>
|
|
12324
|
-
</ax-suffix>
|
|
12325
|
-
</ax-footer>
|
|
12326
|
-
}
|
|
12327
|
-
`,
|
|
12328
|
-
}]
|
|
12329
|
-
}] });
|
|
12330
|
-
|
|
12331
|
-
//#region ---- Imports ----
|
|
12002
|
+
//#region ---- Constants ----
|
|
12003
|
+
const DEFAULT_CONNECT_COMMAND = 'IntegrationManagement.Connection:Connect';
|
|
12332
12004
|
//#endregion
|
|
12333
12005
|
//#region ---- Component ----
|
|
12334
12006
|
class AXPIntegrationConnectionsPanelWidgetEditComponent extends AXPValueWidgetComponent {
|
|
@@ -12342,10 +12014,6 @@ class AXPIntegrationConnectionsPanelWidgetEditComponent extends AXPValueWidgetCo
|
|
|
12342
12014
|
//#region ---- Services & Dependencies ----
|
|
12343
12015
|
this.queryService = inject(AXPQueryService);
|
|
12344
12016
|
this.commandService = inject(AXPCommandService);
|
|
12345
|
-
this.sessionService = inject(AXPSessionService);
|
|
12346
|
-
this.providerRegistry = inject(AXPIntegrationProviderRegistryService);
|
|
12347
|
-
this.translationService = inject(AXTranslationService);
|
|
12348
|
-
this.popupService = inject(AXPopupService);
|
|
12349
12017
|
//#endregion
|
|
12350
12018
|
//#region ---- Computed ----
|
|
12351
12019
|
this.providerIdFilter = computed(() => this.options()['providerId'], ...(ngDevMode ? [{ debugName: "providerIdFilter" }] : /* istanbul ignore next */ []));
|
|
@@ -12362,14 +12030,10 @@ class AXPIntegrationConnectionsPanelWidgetEditComponent extends AXPValueWidgetCo
|
|
|
12362
12030
|
this.loading = signal(true, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
12363
12031
|
this.providers = signal([], ...(ngDevMode ? [{ debugName: "providers" }] : /* istanbul ignore next */ []));
|
|
12364
12032
|
this.connections = signal([], ...(ngDevMode ? [{ debugName: "connections" }] : /* istanbul ignore next */ []));
|
|
12365
|
-
this.authMethodOptions = signal({}, ...(ngDevMode ? [{ debugName: "authMethodOptions" }] : /* istanbul ignore next */ []));
|
|
12366
12033
|
this.selectedAuthMethod = signal({}, ...(ngDevMode ? [{ debugName: "selectedAuthMethod" }] : /* istanbul ignore next */ []));
|
|
12367
12034
|
this.formDisplayName = signal({}, ...(ngDevMode ? [{ debugName: "formDisplayName" }] : /* istanbul ignore next */ []));
|
|
12368
12035
|
this.formInstanceUrl = signal({}, ...(ngDevMode ? [{ debugName: "formInstanceUrl" }] : /* istanbul ignore next */ []));
|
|
12369
12036
|
this.formCredentialPrimary = signal({}, ...(ngDevMode ? [{ debugName: "formCredentialPrimary" }] : /* istanbul ignore next */ []));
|
|
12370
|
-
this.translationService.langChanges$.subscribe(() => {
|
|
12371
|
-
void this.refreshAuthMethodOptions(this.providers());
|
|
12372
|
-
});
|
|
12373
12037
|
void this.load();
|
|
12374
12038
|
}
|
|
12375
12039
|
//#endregion
|
|
@@ -12388,14 +12052,6 @@ class AXPIntegrationConnectionsPanelWidgetEditComponent extends AXPValueWidgetCo
|
|
|
12388
12052
|
connectedSecretPreview(providerId) {
|
|
12389
12053
|
return defaultTo(this.getConnection(providerId)?.secretPreview, '');
|
|
12390
12054
|
}
|
|
12391
|
-
//#endregion
|
|
12392
|
-
//#region ---- Auth Method Helpers ----
|
|
12393
|
-
hasMultipleAuthMethods(provider) {
|
|
12394
|
-
return provider.authMethodTypes.length > 1;
|
|
12395
|
-
}
|
|
12396
|
-
isOAuth(providerId) {
|
|
12397
|
-
return this.selectedAuthMethod()[providerId] === AXP_INTEGRATION_AUTH_METHOD_TYPE.OAuth2;
|
|
12398
|
-
}
|
|
12399
12055
|
isBasic(providerId) {
|
|
12400
12056
|
return this.selectedAuthMethod()[providerId] === AXP_INTEGRATION_AUTH_METHOD_TYPE.Basic;
|
|
12401
12057
|
}
|
|
@@ -12423,86 +12079,18 @@ class AXPIntegrationConnectionsPanelWidgetEditComponent extends AXPValueWidgetCo
|
|
|
12423
12079
|
//#endregion
|
|
12424
12080
|
//#region ---- Connect Flow ----
|
|
12425
12081
|
async handleConnect(provider) {
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
if (!selected) {
|
|
12430
|
-
return;
|
|
12431
|
-
}
|
|
12432
|
-
authMethodType = selected;
|
|
12433
|
-
}
|
|
12434
|
-
this.setAuthMethod(provider.id, authMethodType);
|
|
12435
|
-
await this.openConnectPopup(provider, authMethodType);
|
|
12436
|
-
}
|
|
12437
|
-
async openAuthMethodPicker(provider) {
|
|
12438
|
-
const title = await this.translationService.translateAsync(`${this.I18N}.dialogs.select-auth-method.title`);
|
|
12439
|
-
const result = await this.popupService.open(AXPIntegrationConnectionAuthMethodPopupComponent, {
|
|
12440
|
-
title,
|
|
12441
|
-
size: 'sm',
|
|
12442
|
-
data: {
|
|
12443
|
-
methods: this.authMethodOptions()[provider.id] ?? [],
|
|
12444
|
-
},
|
|
12445
|
-
});
|
|
12446
|
-
return result?.data?.authMethodType ?? null;
|
|
12447
|
-
}
|
|
12448
|
-
async openConnectPopup(provider, authMethodType) {
|
|
12449
|
-
const isOAuth = authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.OAuth2;
|
|
12450
|
-
const titleKey = isOAuth
|
|
12451
|
-
? `${this.I18N}.dialogs.oauth.title`
|
|
12452
|
-
: `${this.I18N}.dialogs.credentials.title`;
|
|
12453
|
-
const title = await this.translationService.translateAsync(titleKey);
|
|
12454
|
-
const result = await this.popupService.open(AXPIntegrationConnectionConnectPopupComponent, {
|
|
12455
|
-
title,
|
|
12456
|
-
size: isOAuth ? 'sm' : 'md',
|
|
12457
|
-
data: {
|
|
12458
|
-
authMethodType,
|
|
12459
|
-
i18nPrefix: this.I18N,
|
|
12460
|
-
providerDisplayName: provider.displayName,
|
|
12461
|
-
},
|
|
12462
|
-
});
|
|
12463
|
-
if (!result?.data) {
|
|
12082
|
+
const commandKey = defaultTo(provider.connectCommandKey, DEFAULT_CONNECT_COMMAND);
|
|
12083
|
+
const result = await this.commandService.execute(commandKey, { providerId: provider.id });
|
|
12084
|
+
if (!result?.success) {
|
|
12464
12085
|
return;
|
|
12465
12086
|
}
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
}
|
|
12087
|
+
const data = result.data;
|
|
12088
|
+
if (data?.outcome === 'redirect' && data.redirectUrl) {
|
|
12089
|
+
window.location.assign(data.redirectUrl);
|
|
12470
12090
|
return;
|
|
12471
12091
|
}
|
|
12472
|
-
await this.connectWithCredentials(provider, authMethodType, result.data);
|
|
12473
|
-
}
|
|
12474
|
-
//#endregion
|
|
12475
|
-
//#region ---- Connection Actions ----
|
|
12476
|
-
async connectWithCredentials(provider, authMethodType, form) {
|
|
12477
|
-
const credentials = authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.Basic
|
|
12478
|
-
? { username: form.credentialPrimary, password: form.credentialSecondary }
|
|
12479
|
-
: authMethodType === AXP_INTEGRATION_AUTH_METHOD_TYPE.ApiToken
|
|
12480
|
-
? { email: form.credentialPrimary, apiToken: form.credentialSecondary }
|
|
12481
|
-
: { token: form.credentialPrimary };
|
|
12482
|
-
await this.commandService.execute('IntegrationManagement.Connection:ConnectWithCredentials', {
|
|
12483
|
-
providerId: provider.id,
|
|
12484
|
-
authMethodType,
|
|
12485
|
-
connectionScope: 'user',
|
|
12486
|
-
displayName: defaultTo(form.displayName, provider.id),
|
|
12487
|
-
instanceUrl: form.instanceUrl,
|
|
12488
|
-
credentials,
|
|
12489
|
-
});
|
|
12490
12092
|
await this.load();
|
|
12491
12093
|
}
|
|
12492
|
-
async startOAuth(provider) {
|
|
12493
|
-
const appName = this.sessionService.application?.name ?? 'demo';
|
|
12494
|
-
const redirectUri = `${window.location.origin}/${appName}/integrations/oauth/callback/${provider.id}`;
|
|
12495
|
-
const result = await this.commandService.execute('IntegrationManagement.Connection:StartOAuthAuthorization', {
|
|
12496
|
-
providerId: provider.id,
|
|
12497
|
-
connectionScope: 'user',
|
|
12498
|
-
displayName: provider.id,
|
|
12499
|
-
redirectUri,
|
|
12500
|
-
});
|
|
12501
|
-
const redirectUrl = get(result, 'data.redirectUrl');
|
|
12502
|
-
if (redirectUrl) {
|
|
12503
|
-
window.location.assign(redirectUrl);
|
|
12504
|
-
}
|
|
12505
|
-
}
|
|
12506
12094
|
async disconnect(providerId) {
|
|
12507
12095
|
const connection = this.getConnection(providerId);
|
|
12508
12096
|
if (!connection) {
|
|
@@ -12515,9 +12103,6 @@ class AXPIntegrationConnectionsPanelWidgetEditComponent extends AXPValueWidgetCo
|
|
|
12515
12103
|
}
|
|
12516
12104
|
//#endregion
|
|
12517
12105
|
//#region ---- Form State ----
|
|
12518
|
-
setAuthMethod(providerId, method) {
|
|
12519
|
-
this.selectedAuthMethod.update((state) => ({ ...state, [providerId]: method }));
|
|
12520
|
-
}
|
|
12521
12106
|
populateConnectionFormState(providers, connections) {
|
|
12522
12107
|
const authDefaults = {};
|
|
12523
12108
|
const displayNames = {};
|
|
@@ -12551,24 +12136,11 @@ class AXPIntegrationConnectionsPanelWidgetEditComponent extends AXPValueWidgetCo
|
|
|
12551
12136
|
this.providers.set(providers);
|
|
12552
12137
|
this.connections.set(connections);
|
|
12553
12138
|
this.populateConnectionFormState(providers, connections);
|
|
12554
|
-
await this.refreshAuthMethodOptions(providers);
|
|
12555
12139
|
}
|
|
12556
12140
|
finally {
|
|
12557
12141
|
this.loading.set(false);
|
|
12558
12142
|
}
|
|
12559
12143
|
}
|
|
12560
|
-
async refreshAuthMethodOptions(providers) {
|
|
12561
|
-
const options = {};
|
|
12562
|
-
for (const provider of providers) {
|
|
12563
|
-
const definition = await this.providerRegistry.get(provider.id);
|
|
12564
|
-
const methods = definition?.authMethods ?? [];
|
|
12565
|
-
options[provider.id] = await Promise.all(methods.map(async (method) => ({
|
|
12566
|
-
type: method.type,
|
|
12567
|
-
label: await this.translationService.translateAsync(method.label),
|
|
12568
|
-
})));
|
|
12569
|
-
}
|
|
12570
|
-
this.authMethodOptions.set(options);
|
|
12571
|
-
}
|
|
12572
12144
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPIntegrationConnectionsPanelWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12573
12145
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPIntegrationConnectionsPanelWidgetEditComponent, isStandalone: true, selector: "axp-integration-connections-panel-widget-edit", usesInheritance: true, ngImport: i0, template: `
|
|
12574
12146
|
<div class="ax-flex ax-w-full ax-flex-col ax-gap-4">
|
|
@@ -24909,7 +24481,7 @@ class AXPTabularDataWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
24909
24481
|
this.platform = inject(AXPlatform);
|
|
24910
24482
|
}
|
|
24911
24483
|
async openPopup() {
|
|
24912
|
-
const { AXPTabularDataPopupComponent } = await import('./acorex-platform-layout-widgets-tabular-data-edit-popup.component-
|
|
24484
|
+
const { AXPTabularDataPopupComponent } = await import('./acorex-platform-layout-widgets-tabular-data-edit-popup.component-DIDziLAT.mjs');
|
|
24913
24485
|
const popupData = await this.popupService.open(AXPTabularDataPopupComponent, {
|
|
24914
24486
|
size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : this.columns().length > 3 ? 'lg' : 'md',
|
|
24915
24487
|
header: true,
|
|
@@ -28629,6 +28201,7 @@ var triggerExpressionEditorPopup_component = /*#__PURE__*/Object.freeze({
|
|
|
28629
28201
|
AXPTriggerExpressionEditorPopupComponent: AXPTriggerExpressionEditorPopupComponent
|
|
28630
28202
|
});
|
|
28631
28203
|
|
|
28204
|
+
//#region ---- Imports ----
|
|
28632
28205
|
//#endregion
|
|
28633
28206
|
//#region ---- Widget Lists (single source of truth) ----
|
|
28634
28207
|
/**
|