@acorex-platform/framework-client 0.0.14 → 0.0.18
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-framework-client-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-common.mjs +25 -211
- package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-core.mjs +8 -104
- package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-builder.mjs +57 -12
- package/fesm2022/acorex-platform-framework-client-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs +494 -561
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-designer.mjs +8 -8
- package/fesm2022/acorex-platform-framework-client-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1333 -1023
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs +51 -9
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +29 -9
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs +48 -15
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs +41 -26
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs +4 -4
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-workflow.mjs.map +1 -1
- package/package.json +7 -7
- package/types/acorex-platform-framework-client-auth.d.ts +2 -2
- package/types/acorex-platform-framework-client-common.d.ts +12 -125
- package/types/acorex-platform-framework-client-core.d.ts +5 -22
- package/types/acorex-platform-framework-client-layout-builder.d.ts +10 -0
- package/types/acorex-platform-framework-client-layout-components.d.ts +17 -68
- package/types/acorex-platform-framework-client-layout-entity.d.ts +80 -7
- package/types/acorex-platform-framework-client-layout-views.d.ts +11 -6
- package/types/acorex-platform-framework-client-layout-widgets.d.ts +1 -1
- package/types/acorex-platform-framework-client-workflow.d.ts +1 -2
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, inject, Injectable, Injector, signal, DestroyRef, makeEnvironmentProviders, NgModule, computed, input, output, ViewEncapsulation, ChangeDetectionStrategy, Component, viewChild, effect, untracked, ErrorHandler, EventEmitter, Input, Output, Directive, Inject, runInInjectionContext, model, linkedSignal, afterNextRender } from '@angular/core';
|
|
3
3
|
import { Router, NavigationEnd, NavigationStart, ROUTES, RedirectCommand, RouterModule } from '@angular/router';
|
|
4
4
|
import { AXPSessionService, AXPSessionStatus, AXPAuthGuard } from '@acorex-platform/framework-client/auth';
|
|
5
|
-
import { combineLatest, map, distinctUntilChanged, Subject, ReplaySubject, firstValueFrom, filter, take, merge as merge$1, first, switchMap, from
|
|
5
|
+
import { combineLatest, map, distinctUntilChanged, Subject, ReplaySubject, firstValueFrom, filter, take, merge as merge$1, first, switchMap, from } from 'rxjs';
|
|
6
6
|
import { unwrapValueProperty, coerceUnknownToDate, coerceUnknownToFiniteNumber, coerceUnknownToBoolean, coerceUnknownToTrimmedString, AXPPlatformScope, AXPRegionalSetting, AXPWidgetsCatalog, AXPKeyboardShortcutPriority, AXPSystemActionType, isLocaleStringMap } from '@acorex-platform/framework-shared/core';
|
|
7
7
|
import * as i3$1 from '@acorex-platform/framework-client/core';
|
|
8
8
|
import { AXPDebugService, AXPBroadcastEventService, AXP_SETTINGS_DEFINITION_DIALOG_OPENER, objectKeyValueTransforms, AXPDataGenerator, AXPKeyboardShortcutRegistry, normalizeKeyboardShortcuts, AXPDeviceService, chordToKbdItemKeys, hasForegroundOverlayLayer, AXPExpressionEvaluatorService, AXPContextEvalFactory, AXPModuleManifestModule, AXPComponentSlotModule, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_LOGO_IMAGE_SRC_RESOLVER, AXPHookService } from '@acorex-platform/framework-client/core';
|
|
@@ -630,9 +630,15 @@ class AXPSettingDefinitionProviderService {
|
|
|
630
630
|
groups.forEach((group) => {
|
|
631
631
|
group.sections.forEach((section) => {
|
|
632
632
|
section.settings.forEach((setting) => {
|
|
633
|
-
|
|
634
|
-
|
|
633
|
+
const value = setting.defaultValue;
|
|
634
|
+
// Never surface blank strings as defaults — they become persisted overrides.
|
|
635
|
+
if (value === undefined || value === null) {
|
|
636
|
+
return;
|
|
635
637
|
}
|
|
638
|
+
if (typeof value === 'string' && value.trim() === '') {
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
defaults[setting.name] = value;
|
|
636
642
|
});
|
|
637
643
|
});
|
|
638
644
|
collectDefaults(group.groups);
|
|
@@ -805,9 +811,15 @@ class AXPSettingDefaultValuesAggregatorService {
|
|
|
805
811
|
for (const provider of ordered) {
|
|
806
812
|
try {
|
|
807
813
|
const overrideMap = await provider.provide();
|
|
808
|
-
Object.
|
|
809
|
-
|
|
810
|
-
|
|
814
|
+
for (const [key, value] of Object.entries(overrideMap)) {
|
|
815
|
+
if (value === undefined || value === null) {
|
|
816
|
+
continue;
|
|
817
|
+
}
|
|
818
|
+
if (typeof value === 'string' && value.trim() === '') {
|
|
819
|
+
continue;
|
|
820
|
+
}
|
|
821
|
+
merged[key] = value;
|
|
822
|
+
if (provider.scope) {
|
|
811
823
|
seedScopeByKey[key] = provider.scope;
|
|
812
824
|
}
|
|
813
825
|
}
|
|
@@ -2102,6 +2114,8 @@ class AXPSettingsService {
|
|
|
2102
2114
|
if (!scope ||
|
|
2103
2115
|
!this.shouldLoadProvider(scope) ||
|
|
2104
2116
|
value === undefined ||
|
|
2117
|
+
value === null ||
|
|
2118
|
+
(typeof value === 'string' && value.trim() === '') ||
|
|
2105
2119
|
this.isCachedInScopeOrAncestors(key, scope) ||
|
|
2106
2120
|
(scope !== AXPPlatformScope.Platform && inheritedByKey[key])) {
|
|
2107
2121
|
continue;
|
|
@@ -3892,11 +3906,11 @@ class AXPBackgroundOperationItemComponent {
|
|
|
3892
3906
|
return this.pendingAction() === action;
|
|
3893
3907
|
}
|
|
3894
3908
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBackgroundOperationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3895
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPBackgroundOperationItemComponent, isStandalone: true, selector: "axp-background-operation-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionCompleted: "actionCompleted", itemClicked: "itemClicked" }, ngImport: i0, template: "<article\n class=\"operation-item\"\n [class]=\"statusClass()\"\n [class.--clickable]=\"isClickable()\"\n (click)=\"onItemClick()\"\n>\n <div class=\"operation-item__body\">\n <div class=\"operation-item__header\">\n <ax-icon class=\"operation-item__status-icon\" [class]=\"statusClass()\">\n <i [class]=\"statusIcon()\"></i>\n </ax-icon>\n\n <div class=\"operation-item__summary\">\n <h3 class=\"operation-item__title\">{{ data().title }}</h3>\n\n @if (showMetaRow()) {\n <div class=\"operation-item__meta\">\n <div class=\"operation-item__meta-content\">\n @if (data().statusText) {\n <p class=\"operation-item__status-text\">\n {{ data().statusText }}\n </p>\n }\n\n @if (data().currentStep) {\n <span class=\"operation-item__step\">\n {{\n '@general:background-operation.step' | translate | async\n }}\n {{ data().currentStep }}\n </span>\n }\n </div>\n\n @if (actions().length > 0) {\n <footer\n class=\"operation-item__actions\"\n (click)=\"$event.stopPropagation()\"\n >\n @for (action of actions(); track action) {\n <ax-button\n class=\"ax-sm\"\n [look]=\"actionButtonLook(action)\"\n [color]=\"actionButtonColor(action)\"\n [text]=\"(actionLabelKey(action) | translate | async) ?? ''\"\n [disabled]=\"\n isActionDisabled(action) || isActionLoading(action)\n \"\n (onClick)=\"onAction(action)\"\n ></ax-button>\n }\n </footer>\n }\n </div>\n }\n\n @if (showProgressBar()) {\n <ax-progress-bar\n [progress]=\"progressValue()\"\n [mode]=\"progressMode()\"\n [color]=\"progressColor()\"\n [style.height.px]=\"4\"\n ></ax-progress-bar>\n }\n\n @if (showError()) {\n <p class=\"operation-item__error\" role=\"alert\">\n {{ data().error!.message }}\n </p>\n }\n </div>\n </div>\n </div>\n</article>\n", styles: ["@layer properties;axp-background-operation-item{display:block}.operation-item{position:relative;overflow:hidden;border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:1px;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s;border-color:rgb(var(--ax-sys-color-border-lighter-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.operation-item.--clickable{cursor:pointer}@media(hover:hover){.operation-item.--clickable:hover{border-color:rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lighter-surface))}}.operation-item.--failed{border-color:rgb(var(--ax-sys-color-border-danger-surface))}.operation-item__body{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 3)}.operation-item__header{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 3)}.operation-item__status-icon{margin-top:calc(var(--spacing, .25rem) * .5);flex-shrink:0;font-size:var(--text-2xl, 1.5rem);line-height:var(--tw-leading, var(--text-2xl--line-height, calc(2 / 1.5)));color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item__status-icon.--running{color:rgb(var(--ax-sys-color-primary-500))}.operation-item__status-icon.--paused{color:rgb(var(--ax-sys-color-warning-500))}.operation-item__status-icon.--completed{color:rgb(var(--ax-sys-color-success-500))}.operation-item__status-icon.--failed{color:rgb(var(--ax-sys-color-danger-500))}.operation-item__summary{display:flex;min-width:0;flex:1;flex-direction:column;gap:var(--spacing, .25rem)}.operation-item__title{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-align:start;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgb(var(--ax-sys-color-on-surface))}.operation-item__meta{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.operation-item__meta-content{display:flex;min-width:0;flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}.operation-item__status-text{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-align:start;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item__step{display:inline-block;font-size:.6875rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item__error{margin:0;border-radius:var(--radius-md, .375rem);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);background:rgb(var(--ax-sys-color-danger-lighter-surface));color:rgb(var(--ax-sys-color-on-danger-lighter-surface))}.operation-item__actions{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--spacing, .25rem)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXProgressBarModule }, { kind: "component", type: i3.AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "mode", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3909
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPBackgroundOperationItemComponent, isStandalone: true, selector: "axp-background-operation-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionCompleted: "actionCompleted", itemClicked: "itemClicked" }, ngImport: i0, template: "<article\n class=\"operation-item\"\n [class]=\"statusClass()\"\n [class.--clickable]=\"isClickable()\"\n (click)=\"onItemClick()\"\n>\n <div class=\"operation-item__body\">\n <div class=\"operation-item__header\">\n <ax-icon class=\"operation-item__status-icon\" [class]=\"statusClass()\">\n <i [class]=\"statusIcon()\"></i>\n </ax-icon>\n\n <div class=\"operation-item__summary\">\n <h3 class=\"operation-item__title\">{{ data().title }}</h3>\n\n @if (showMetaRow()) {\n <div class=\"operation-item__meta\">\n <div class=\"operation-item__meta-content\">\n @if (data().statusText) {\n <p class=\"operation-item__status-text\">\n {{ data().statusText }}\n </p>\n }\n\n @if (data().currentStep) {\n <span class=\"operation-item__step\">\n {{\n '@general:background-operation.step' | translate | async\n }}\n {{ data().currentStep }}\n </span>\n }\n </div>\n\n @if (actions().length > 0) {\n <footer\n class=\"operation-item__actions\"\n (click)=\"$event.stopPropagation()\"\n >\n @for (action of actions(); track action) {\n <ax-button\n class=\"ax-sm\"\n [look]=\"actionButtonLook(action)\"\n [color]=\"actionButtonColor(action)\"\n [text]=\"(actionLabelKey(action) | translate | async) ?? ''\"\n [disabled]=\"\n isActionDisabled(action) || isActionLoading(action)\n \"\n (onClick)=\"onAction(action)\"\n ></ax-button>\n }\n </footer>\n }\n </div>\n }\n\n @if (showProgressBar()) {\n <ax-progress-bar\n [progress]=\"progressValue()\"\n [mode]=\"progressMode()\"\n [color]=\"progressColor()\"\n [style.height.px]=\"4\"\n ></ax-progress-bar>\n }\n\n @if (showError()) {\n <p class=\"operation-item__error\" role=\"alert\">\n {{ data().error!.message }}\n </p>\n }\n </div>\n </div>\n </div>\n</article>\n", styles: ["@layer properties;axp-background-operation-item{display:block}.operation-item{position:relative;overflow:hidden;border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:1px;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s;border-color:rgb(var(--ax-sys-color-border-lighter-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.operation-item.--clickable{cursor:pointer}@media(hover:hover){.operation-item.--clickable:hover{border-color:rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lighter-surface))}}.operation-item.--failed{border-color:rgb(var(--ax-sys-color-border-danger-surface))}.operation-item .operation-item__body{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 3)}.operation-item .operation-item__header{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 3)}.operation-item .operation-item__status-icon{margin-top:calc(var(--spacing, .25rem) * .5);flex-shrink:0;font-size:var(--text-2xl, 1.5rem);line-height:var(--tw-leading, var(--text-2xl--line-height, calc(2 / 1.5)));color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item .operation-item__status-icon.--running{color:rgb(var(--ax-sys-color-primary-500))}.operation-item .operation-item__status-icon.--paused{color:rgb(var(--ax-sys-color-warning-500))}.operation-item .operation-item__status-icon.--completed{color:rgb(var(--ax-sys-color-success-500))}.operation-item .operation-item__status-icon.--failed{color:rgb(var(--ax-sys-color-danger-500))}.operation-item .operation-item__summary{display:flex;min-width:0;flex:1;flex-direction:column;gap:var(--spacing, .25rem)}.operation-item .operation-item__title{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-align:start;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgb(var(--ax-sys-color-on-surface))}.operation-item .operation-item__meta{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.operation-item .operation-item__meta-content{display:flex;min-width:0;flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}.operation-item .operation-item__status-text{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-align:start;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item .operation-item__step{display:inline-block;font-size:.6875rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item .operation-item__error{margin:0;border-radius:var(--radius-md, .375rem);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);background:rgb(var(--ax-sys-color-danger-lighter-surface));color:rgb(var(--ax-sys-color-on-danger-lighter-surface))}.operation-item .operation-item__actions{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--spacing, .25rem)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXProgressBarModule }, { kind: "component", type: i3.AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "mode", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3896
3910
|
}
|
|
3897
3911
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPBackgroundOperationItemComponent, decorators: [{
|
|
3898
3912
|
type: Component,
|
|
3899
|
-
args: [{ selector: 'axp-background-operation-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXProgressBarModule, AXTranslationModule], template: "<article\n class=\"operation-item\"\n [class]=\"statusClass()\"\n [class.--clickable]=\"isClickable()\"\n (click)=\"onItemClick()\"\n>\n <div class=\"operation-item__body\">\n <div class=\"operation-item__header\">\n <ax-icon class=\"operation-item__status-icon\" [class]=\"statusClass()\">\n <i [class]=\"statusIcon()\"></i>\n </ax-icon>\n\n <div class=\"operation-item__summary\">\n <h3 class=\"operation-item__title\">{{ data().title }}</h3>\n\n @if (showMetaRow()) {\n <div class=\"operation-item__meta\">\n <div class=\"operation-item__meta-content\">\n @if (data().statusText) {\n <p class=\"operation-item__status-text\">\n {{ data().statusText }}\n </p>\n }\n\n @if (data().currentStep) {\n <span class=\"operation-item__step\">\n {{\n '@general:background-operation.step' | translate | async\n }}\n {{ data().currentStep }}\n </span>\n }\n </div>\n\n @if (actions().length > 0) {\n <footer\n class=\"operation-item__actions\"\n (click)=\"$event.stopPropagation()\"\n >\n @for (action of actions(); track action) {\n <ax-button\n class=\"ax-sm\"\n [look]=\"actionButtonLook(action)\"\n [color]=\"actionButtonColor(action)\"\n [text]=\"(actionLabelKey(action) | translate | async) ?? ''\"\n [disabled]=\"\n isActionDisabled(action) || isActionLoading(action)\n \"\n (onClick)=\"onAction(action)\"\n ></ax-button>\n }\n </footer>\n }\n </div>\n }\n\n @if (showProgressBar()) {\n <ax-progress-bar\n [progress]=\"progressValue()\"\n [mode]=\"progressMode()\"\n [color]=\"progressColor()\"\n [style.height.px]=\"4\"\n ></ax-progress-bar>\n }\n\n @if (showError()) {\n <p class=\"operation-item__error\" role=\"alert\">\n {{ data().error!.message }}\n </p>\n }\n </div>\n </div>\n </div>\n</article>\n", styles: ["@layer properties;axp-background-operation-item{display:block}.operation-item{position:relative;overflow:hidden;border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:1px;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s;border-color:rgb(var(--ax-sys-color-border-lighter-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.operation-item.--clickable{cursor:pointer}@media(hover:hover){.operation-item.--clickable:hover{border-color:rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lighter-surface))}}.operation-item.--failed{border-color:rgb(var(--ax-sys-color-border-danger-surface))}.operation-item__body{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 3)}.operation-item__header{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 3)}.operation-item__status-icon{margin-top:calc(var(--spacing, .25rem) * .5);flex-shrink:0;font-size:var(--text-2xl, 1.5rem);line-height:var(--tw-leading, var(--text-2xl--line-height, calc(2 / 1.5)));color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item__status-icon.--running{color:rgb(var(--ax-sys-color-primary-500))}.operation-item__status-icon.--paused{color:rgb(var(--ax-sys-color-warning-500))}.operation-item__status-icon.--completed{color:rgb(var(--ax-sys-color-success-500))}.operation-item__status-icon.--failed{color:rgb(var(--ax-sys-color-danger-500))}.operation-item__summary{display:flex;min-width:0;flex:1;flex-direction:column;gap:var(--spacing, .25rem)}.operation-item__title{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-align:start;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgb(var(--ax-sys-color-on-surface))}.operation-item__meta{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.operation-item__meta-content{display:flex;min-width:0;flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}.operation-item__status-text{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-align:start;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item__step{display:inline-block;font-size:.6875rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item__error{margin:0;border-radius:var(--radius-md, .375rem);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);background:rgb(var(--ax-sys-color-danger-lighter-surface));color:rgb(var(--ax-sys-color-on-danger-lighter-surface))}.operation-item__actions{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--spacing, .25rem)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
3913
|
+
args: [{ selector: 'axp-background-operation-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXProgressBarModule, AXTranslationModule], template: "<article\n class=\"operation-item\"\n [class]=\"statusClass()\"\n [class.--clickable]=\"isClickable()\"\n (click)=\"onItemClick()\"\n>\n <div class=\"operation-item__body\">\n <div class=\"operation-item__header\">\n <ax-icon class=\"operation-item__status-icon\" [class]=\"statusClass()\">\n <i [class]=\"statusIcon()\"></i>\n </ax-icon>\n\n <div class=\"operation-item__summary\">\n <h3 class=\"operation-item__title\">{{ data().title }}</h3>\n\n @if (showMetaRow()) {\n <div class=\"operation-item__meta\">\n <div class=\"operation-item__meta-content\">\n @if (data().statusText) {\n <p class=\"operation-item__status-text\">\n {{ data().statusText }}\n </p>\n }\n\n @if (data().currentStep) {\n <span class=\"operation-item__step\">\n {{\n '@general:background-operation.step' | translate | async\n }}\n {{ data().currentStep }}\n </span>\n }\n </div>\n\n @if (actions().length > 0) {\n <footer\n class=\"operation-item__actions\"\n (click)=\"$event.stopPropagation()\"\n >\n @for (action of actions(); track action) {\n <ax-button\n class=\"ax-sm\"\n [look]=\"actionButtonLook(action)\"\n [color]=\"actionButtonColor(action)\"\n [text]=\"(actionLabelKey(action) | translate | async) ?? ''\"\n [disabled]=\"\n isActionDisabled(action) || isActionLoading(action)\n \"\n (onClick)=\"onAction(action)\"\n ></ax-button>\n }\n </footer>\n }\n </div>\n }\n\n @if (showProgressBar()) {\n <ax-progress-bar\n [progress]=\"progressValue()\"\n [mode]=\"progressMode()\"\n [color]=\"progressColor()\"\n [style.height.px]=\"4\"\n ></ax-progress-bar>\n }\n\n @if (showError()) {\n <p class=\"operation-item__error\" role=\"alert\">\n {{ data().error!.message }}\n </p>\n }\n </div>\n </div>\n </div>\n</article>\n", styles: ["@layer properties;axp-background-operation-item{display:block}.operation-item{position:relative;overflow:hidden;border-radius:var(--radius-md, .375rem);border-style:var(--tw-border-style);border-width:1px;transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration, var(--default-transition-duration, .15s));--tw-duration: .2s;transition-duration:.2s;border-color:rgb(var(--ax-sys-color-border-lighter-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.operation-item.--clickable{cursor:pointer}@media(hover:hover){.operation-item.--clickable:hover{border-color:rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lighter-surface))}}.operation-item.--failed{border-color:rgb(var(--ax-sys-color-border-danger-surface))}.operation-item .operation-item__body{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 3)}.operation-item .operation-item__header{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * 3)}.operation-item .operation-item__status-icon{margin-top:calc(var(--spacing, .25rem) * .5);flex-shrink:0;font-size:var(--text-2xl, 1.5rem);line-height:var(--tw-leading, var(--text-2xl--line-height, calc(2 / 1.5)));color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item .operation-item__status-icon.--running{color:rgb(var(--ax-sys-color-primary-500))}.operation-item .operation-item__status-icon.--paused{color:rgb(var(--ax-sys-color-warning-500))}.operation-item .operation-item__status-icon.--completed{color:rgb(var(--ax-sys-color-success-500))}.operation-item .operation-item__status-icon.--failed{color:rgb(var(--ax-sys-color-danger-500))}.operation-item .operation-item__summary{display:flex;min-width:0;flex:1;flex-direction:column;gap:var(--spacing, .25rem)}.operation-item .operation-item__title{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;text-align:start;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);color:rgb(var(--ax-sys-color-on-surface))}.operation-item .operation-item__meta{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}.operation-item .operation-item__meta-content{display:flex;min-width:0;flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}.operation-item .operation-item__status-text{margin:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-align:start;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item .operation-item__step{display:inline-block;font-size:.6875rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.operation-item .operation-item__error{margin:0;border-radius:var(--radius-md, .375rem);padding-inline:calc(var(--spacing, .25rem) * 2);padding-block:var(--spacing, .25rem);font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));--tw-leading: var(--leading-relaxed, 1.625);line-height:var(--leading-relaxed, 1.625);background:rgb(var(--ax-sys-color-danger-lighter-surface));color:rgb(var(--ax-sys-color-on-danger-lighter-surface))}.operation-item .operation-item__actions{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--spacing, .25rem)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-duration{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-duration: initial;--tw-leading: initial;--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */\n"] }]
|
|
3900
3914
|
}], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], actionCompleted: [{ type: i0.Output, args: ["actionCompleted"] }], itemClicked: [{ type: i0.Output, args: ["itemClicked"] }] } });
|
|
3901
3915
|
|
|
3902
3916
|
//#region ---- Imports ----
|
|
@@ -9277,208 +9291,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
9277
9291
|
}]
|
|
9278
9292
|
}] });
|
|
9279
9293
|
|
|
9280
|
-
//#region ---- Shared in-app inbox types ----
|
|
9281
|
-
//#endregion
|
|
9282
|
-
|
|
9283
|
-
//#region ---- Shared in-app inbox helpers ----
|
|
9284
|
-
function isInAppInboxUnread(readAt) {
|
|
9285
|
-
return readAt == null;
|
|
9286
|
-
}
|
|
9287
|
-
function isInAppInboxUnseen(seenAt) {
|
|
9288
|
-
return seenAt == null;
|
|
9289
|
-
}
|
|
9290
|
-
function getInAppInboxPriorityClass(priority) {
|
|
9291
|
-
return priority ?? 'Notice';
|
|
9292
|
-
}
|
|
9293
|
-
function normalizeInAppInboxItem(item) {
|
|
9294
|
-
return {
|
|
9295
|
-
id: String(item.id),
|
|
9296
|
-
title: item.title ?? '',
|
|
9297
|
-
body: item.body ?? '',
|
|
9298
|
-
createdAt: item.createdAt ? new Date(item.createdAt) : new Date(),
|
|
9299
|
-
seenAt: item.seenAt ? new Date(item.seenAt) : item.seenAt ?? null,
|
|
9300
|
-
readAt: item.readAt ? new Date(item.readAt) : item.readAt ?? null,
|
|
9301
|
-
sender: item.sender,
|
|
9302
|
-
priority: item.priority ?? 'Notice',
|
|
9303
|
-
isPinned: item.isPinned ?? false,
|
|
9304
|
-
category: item.category,
|
|
9305
|
-
};
|
|
9306
|
-
}
|
|
9307
|
-
//#endregion
|
|
9308
|
-
|
|
9309
|
-
//#region ---- In-app inbox data port ----
|
|
9310
|
-
const AXP_IN_APP_INBOX_PORT = new InjectionToken('AXP_IN_APP_INBOX_PORT');
|
|
9311
|
-
//#endregion
|
|
9312
|
-
|
|
9313
|
-
//#region ---- In-app inbox configuration tokens ----
|
|
9314
|
-
const AXP_IN_APP_INBOX_CONFIG = new InjectionToken('AXP_IN_APP_INBOX_CONFIG');
|
|
9315
|
-
const AXP_IN_APP_INBOX_I18N = new InjectionToken('AXP_IN_APP_INBOX_I18N');
|
|
9316
|
-
//#endregion
|
|
9317
|
-
|
|
9318
|
-
//#region ---- In-app inbox realtime events ----
|
|
9319
|
-
class AXPInAppInboxRealtimeService {
|
|
9320
|
-
constructor() {
|
|
9321
|
-
this.changedSubject = new Subject();
|
|
9322
|
-
this.changed$ = this.changedSubject.asObservable();
|
|
9323
|
-
}
|
|
9324
|
-
notifyChanged(event) {
|
|
9325
|
-
this.changedSubject.next(event);
|
|
9326
|
-
}
|
|
9327
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInAppInboxRealtimeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9328
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInAppInboxRealtimeService, providedIn: 'root' }); }
|
|
9329
|
-
}
|
|
9330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInAppInboxRealtimeService, decorators: [{
|
|
9331
|
-
type: Injectable,
|
|
9332
|
-
args: [{
|
|
9333
|
-
providedIn: 'root',
|
|
9334
|
-
}]
|
|
9335
|
-
}] });
|
|
9336
|
-
|
|
9337
|
-
//#region ---- Shared in-app inbox connector ----
|
|
9338
|
-
class AXPInAppInboxConnectorService {
|
|
9339
|
-
constructor() {
|
|
9340
|
-
this.port = inject(AXP_IN_APP_INBOX_PORT);
|
|
9341
|
-
this.realtime = inject(AXPInAppInboxRealtimeService);
|
|
9342
|
-
this.destroyRef = inject(DestroyRef);
|
|
9343
|
-
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
9344
|
-
this.pageLoading = signal(false, ...(ngDevMode ? [{ debugName: "pageLoading" }] : /* istanbul ignore next */ []));
|
|
9345
|
-
this.error = signal(null, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
9346
|
-
this.items = signal([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
9347
|
-
this.totalCount = signal(0, ...(ngDevMode ? [{ debugName: "totalCount" }] : /* istanbul ignore next */ []));
|
|
9348
|
-
this.pageItems = signal([], ...(ngDevMode ? [{ debugName: "pageItems" }] : /* istanbul ignore next */ []));
|
|
9349
|
-
this.pageTotalCount = signal(0, ...(ngDevMode ? [{ debugName: "pageTotalCount" }] : /* istanbul ignore next */ []));
|
|
9350
|
-
this.capabilities = this.port.capabilities;
|
|
9351
|
-
this.loading = computed(() => this.isLoading(), ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
9352
|
-
this.pageLoadingState = computed(() => this.pageLoading(), ...(ngDevMode ? [{ debugName: "pageLoadingState" }] : /* istanbul ignore next */ []));
|
|
9353
|
-
this.errorMessage = computed(() => this.error(), ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
|
|
9354
|
-
this.inboxList = computed(() => this.items(), ...(ngDevMode ? [{ debugName: "inboxList" }] : /* istanbul ignore next */ []));
|
|
9355
|
-
this.total = computed(() => this.totalCount(), ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
9356
|
-
this.pagedInboxList = computed(() => this.pageItems(), ...(ngDevMode ? [{ debugName: "pagedInboxList" }] : /* istanbul ignore next */ []));
|
|
9357
|
-
this.pagedTotal = computed(() => this.pageTotalCount(), ...(ngDevMode ? [{ debugName: "pagedTotal" }] : /* istanbul ignore next */ []));
|
|
9358
|
-
this.unreadCount = computed(() => this.items().filter((item) => isInAppInboxUnread(item.readAt)).length, ...(ngDevMode ? [{ debugName: "unreadCount" }] : /* istanbul ignore next */ []));
|
|
9359
|
-
void this.refresh();
|
|
9360
|
-
this.realtime.changed$
|
|
9361
|
-
.pipe(filter((event) => event.type !== 'seen' && event.type !== 'read'), debounceTime(100), takeUntilDestroyed(this.destroyRef))
|
|
9362
|
-
.subscribe(() => {
|
|
9363
|
-
if (!this.isLoading()) {
|
|
9364
|
-
void this.refresh();
|
|
9365
|
-
}
|
|
9366
|
-
});
|
|
9367
|
-
this.realtime.changed$
|
|
9368
|
-
.pipe(filter((event) => event.type === 'seen' || event.type === 'read'), takeUntilDestroyed(this.destroyRef))
|
|
9369
|
-
.subscribe((event) => this.syncEngagement(event.ids, event.type));
|
|
9370
|
-
}
|
|
9371
|
-
async refresh() {
|
|
9372
|
-
try {
|
|
9373
|
-
this.isLoading.set(true);
|
|
9374
|
-
this.error.set(null);
|
|
9375
|
-
const response = await this.port.loadInbox({ skip: 0, take: 1000 });
|
|
9376
|
-
const items = response.items.map((item) => normalizeInAppInboxItem(item));
|
|
9377
|
-
this.items.set(items);
|
|
9378
|
-
this.totalCount.set(response.total);
|
|
9379
|
-
return { items, total: response.total };
|
|
9380
|
-
}
|
|
9381
|
-
catch (err) {
|
|
9382
|
-
this.error.set(err instanceof Error ? err.message : 'Failed to load inbox');
|
|
9383
|
-
this.items.set([]);
|
|
9384
|
-
this.totalCount.set(0);
|
|
9385
|
-
return { items: [], total: 0 };
|
|
9386
|
-
}
|
|
9387
|
-
finally {
|
|
9388
|
-
this.isLoading.set(false);
|
|
9389
|
-
}
|
|
9390
|
-
}
|
|
9391
|
-
async loadPage(skip, take) {
|
|
9392
|
-
try {
|
|
9393
|
-
this.pageLoading.set(true);
|
|
9394
|
-
this.error.set(null);
|
|
9395
|
-
const result = await this.port.loadInbox({ skip, take });
|
|
9396
|
-
const items = result.items.map((item) => normalizeInAppInboxItem(item));
|
|
9397
|
-
this.pageItems.set(items);
|
|
9398
|
-
this.pageTotalCount.set(result.total);
|
|
9399
|
-
return { items, total: result.total };
|
|
9400
|
-
}
|
|
9401
|
-
catch (err) {
|
|
9402
|
-
this.error.set(err instanceof Error ? err.message : 'Failed to load inbox page');
|
|
9403
|
-
this.pageItems.set([]);
|
|
9404
|
-
this.pageTotalCount.set(0);
|
|
9405
|
-
return { items: [], total: 0 };
|
|
9406
|
-
}
|
|
9407
|
-
finally {
|
|
9408
|
-
this.pageLoading.set(false);
|
|
9409
|
-
}
|
|
9410
|
-
}
|
|
9411
|
-
async markUnseenAsSeen() {
|
|
9412
|
-
if (!this.port.capabilities.seenTracking) {
|
|
9413
|
-
return;
|
|
9414
|
-
}
|
|
9415
|
-
const unseenIds = this.items()
|
|
9416
|
-
.filter((item) => isInAppInboxUnseen(item.seenAt))
|
|
9417
|
-
.map((item) => item.id);
|
|
9418
|
-
if (unseenIds.length === 0) {
|
|
9419
|
-
return;
|
|
9420
|
-
}
|
|
9421
|
-
await this.port.markSeen(unseenIds);
|
|
9422
|
-
this.realtime.notifyChanged({ type: 'seen', ids: unseenIds });
|
|
9423
|
-
}
|
|
9424
|
-
async markAsRead(ids) {
|
|
9425
|
-
if (ids.length === 0 || !this.port.capabilities.readTracking) {
|
|
9426
|
-
return;
|
|
9427
|
-
}
|
|
9428
|
-
await this.port.markRead(ids);
|
|
9429
|
-
this.realtime.notifyChanged({ type: 'read', ids });
|
|
9430
|
-
}
|
|
9431
|
-
async markAllAsRead() {
|
|
9432
|
-
if (!this.port.capabilities.readTracking) {
|
|
9433
|
-
return;
|
|
9434
|
-
}
|
|
9435
|
-
await this.port.markAllRead();
|
|
9436
|
-
const readAt = new Date();
|
|
9437
|
-
const patchAll = (list) => list.map((item) => isInAppInboxUnread(item.readAt)
|
|
9438
|
-
? { ...item, readAt, seenAt: item.seenAt ?? readAt }
|
|
9439
|
-
: item);
|
|
9440
|
-
this.items.update(patchAll);
|
|
9441
|
-
this.pageItems.update(patchAll);
|
|
9442
|
-
}
|
|
9443
|
-
async togglePin(id) {
|
|
9444
|
-
if (!this.port.capabilities.pinSupport || !this.port.togglePin) {
|
|
9445
|
-
return;
|
|
9446
|
-
}
|
|
9447
|
-
await this.port.togglePin(id);
|
|
9448
|
-
await this.refresh();
|
|
9449
|
-
}
|
|
9450
|
-
syncEngagement(ids, kind) {
|
|
9451
|
-
if (!ids?.length) {
|
|
9452
|
-
return;
|
|
9453
|
-
}
|
|
9454
|
-
const idSet = new Set(ids);
|
|
9455
|
-
const now = new Date();
|
|
9456
|
-
const patch = (list) => list.map((item) => {
|
|
9457
|
-
if (!idSet.has(item.id)) {
|
|
9458
|
-
return item;
|
|
9459
|
-
}
|
|
9460
|
-
if (kind === 'seen') {
|
|
9461
|
-
return item.seenAt ? item : { ...item, seenAt: now };
|
|
9462
|
-
}
|
|
9463
|
-
return {
|
|
9464
|
-
...item,
|
|
9465
|
-
seenAt: item.seenAt ?? now,
|
|
9466
|
-
readAt: item.readAt ?? now,
|
|
9467
|
-
};
|
|
9468
|
-
});
|
|
9469
|
-
this.items.update(patch);
|
|
9470
|
-
this.pageItems.update(patch);
|
|
9471
|
-
}
|
|
9472
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInAppInboxConnectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9473
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInAppInboxConnectorService, providedIn: 'root' }); }
|
|
9474
|
-
}
|
|
9475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPInAppInboxConnectorService, decorators: [{
|
|
9476
|
-
type: Injectable,
|
|
9477
|
-
args: [{
|
|
9478
|
-
providedIn: 'root',
|
|
9479
|
-
}]
|
|
9480
|
-
}], ctorParameters: () => [] });
|
|
9481
|
-
|
|
9482
9294
|
const AXP_INTEGRATION_PROVIDER = new InjectionToken('AXP_INTEGRATION_PROVIDER', {
|
|
9483
9295
|
providedIn: 'root',
|
|
9484
9296
|
factory: () => [],
|
|
@@ -10623,6 +10435,8 @@ const axpNavigateCommandDefinition = defineCommand({
|
|
|
10623
10435
|
|
|
10624
10436
|
const AXP_ENTITY_DELETED_EVENT_TYPE = '[Entity] Deleted';
|
|
10625
10437
|
|
|
10438
|
+
const AXP_ENTITY_MODIFIED_EVENT_TYPE = '[Entity] Modified';
|
|
10439
|
+
|
|
10626
10440
|
const AXPRedirectEvent = createWorkFlowEvent('Redirect Event Fired');
|
|
10627
10441
|
const AXPRefreshEvent = createWorkFlowEvent('Refresh Event Fired');
|
|
10628
10442
|
const AXPReloadEvent = createWorkFlowEvent('Reload Event Fired');
|
|
@@ -10631,5 +10445,5 @@ const AXPReloadEvent = createWorkFlowEvent('Reload Event Fired');
|
|
|
10631
10445
|
* Generated bundle index. Do not edit.
|
|
10632
10446
|
*/
|
|
10633
10447
|
|
|
10634
|
-
export { ALL_DEFAULT_OPERATORS, AXPAcorexFileTypeBridgeProvider, AXPAcorexFileTypeModule, AXPAppVersionService, AXPBackgroundOperationCompletionService, AXPBackgroundOperationEntityStoreService, AXPBackgroundOperationHandler, AXPBackgroundOperationNotificationService, AXPBackgroundOperationProvider, AXPBackgroundOperationRootConfig, AXPBackgroundOperationService, AXPBackgroundOperationSlotComponent, AXPBrowserTitleService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDefaultMultiLanguageConfigService, AXPErrorHandlerRegistryService, AXPExportService, AXPFileActionsService, AXPFileStorageEvaluatorScopeProvider, AXPFileStorageService, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPHomePageModule, AXPHomePageService,
|
|
10448
|
+
export { ALL_DEFAULT_OPERATORS, AXPAcorexFileTypeBridgeProvider, AXPAcorexFileTypeModule, AXPAppVersionService, AXPBackgroundOperationCompletionService, AXPBackgroundOperationEntityStoreService, AXPBackgroundOperationHandler, AXPBackgroundOperationNotificationService, AXPBackgroundOperationProvider, AXPBackgroundOperationRootConfig, AXPBackgroundOperationService, AXPBackgroundOperationSlotComponent, AXPBrowserTitleService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDefaultMultiLanguageConfigService, AXPErrorHandlerRegistryService, AXPExportService, AXPFileActionsService, AXPFileStorageEvaluatorScopeProvider, AXPFileStorageService, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPHomePageModule, AXPHomePageService, AXPIndexedDbSettingValueProvider, AXPIntegrationDomainProviderContext, AXPIntegrationDomainRegistryFacade, AXPIntegrationDomainRegistryService, AXPIntegrationOAuthService, AXPIntegrationProviderContext, AXPIntegrationProviderRegistryService, AXPIntegrationRuntimeService, AXPKeyboardShortcutsHelpComponent, AXPKeyboardShortcutsHelpService, AXPLockService, AXPLogoImageSrcResolverService, AXPMenuItemsDataSourceDefinition, AXPMenuKeyboardShortcutService, AXPMenuMiddlewareRegistry, AXPMenuProviderService, AXPMenuRouteAccessService, AXPMenuRouteGuard, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPMenuVisibilityService, AXPNavBarSlotComponent, AXPNavigateCommand, AXPNotFoundCatchAllRoute, AXPNotFoundError, AXPOutputContractTranscriptSegmentService, AXPPlatformCommonDataSourceKeys, AXPPlatformDefaultConfigs, AXPQueryParamsEvaluatorScopeProvider, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalCalendarService, AXPReloadEvent, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValuesAggregatorService, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingsBulkSyncService, AXPSettingsEvaluatorScopeProvider, AXPSettingsIndexedDb, AXPSettingsService, AXPStatusDefinitionProviderService, AXPStickyDirective, AXPTabNavigationService, AXPTabPreviewService, AXPTabRouteCacheRegistry, AXPTokenDefinitionService, AXPTokenEvaluatorScopeProvider, AXPTranslateFormatter, AXPUnsavedChangesConfirmService, AXPUnsavedChangesPopstateService, AXPVersioningService, AXP_AGENT_OUTPUT_CONTRACT_DEFAULT_STRUCTURED_RETRIES, AXP_APP_VERSION_PROVIDER, AXP_BACKGROUND_OPERATION_ENTITY_STORAGE, AXP_BACKGROUND_OPERATION_HANDLERS, AXP_BACKGROUND_OPERATION_PROVIDERS, AXP_DOCUMENT_FILE_TYPE_PURPOSES, AXP_ENTITY_DELETED_EVENT_TYPE, AXP_ENTITY_MODIFIED_EVENT_TYPE, AXP_EXPERIENCE_SETTINGS_GROUP, AXP_EXPERIENCE_SETTINGS_SECTIONS, AXP_FILE_ACTION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_HOME_TAB_KEY, AXP_INTEGRATION_CONNECTION_ESTABLISHED, AXP_INTEGRATION_DOMAIN_PROVIDER, AXP_INTEGRATION_OAUTH_SERVICE, AXP_INTEGRATION_PROVIDER, AXP_INTEGRATION_RUNTIME_PROVIDER, AXP_INTEGRATION_SECRET_STORE, AXP_IN_APP_NOTIFICATION_SERVICE, AXP_LOCALE_MANAGEMENT_PORT, AXP_MENU_MIDDLEWARE, AXP_MENU_PROVIDER, AXP_NOT_FOUND_CATCH_ALL_ROUTE, AXP_NOT_FOUND_ROUTE, AXP_OUTPUT_CONTRACT_TRANSCRIPT_SEGMENT_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_PROTECTED_ROUTE_GUARDS, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_LAZY_RESOLVER, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTINGS_CACHE_SYNC, AXP_SETTINGS_SYNC_DEBOUNCE_MS, AXP_SETTINGS_SYNC_KEYS, AXP_SETTINGS_SYNC_RETRY_BACKOFF_MS, AXP_SETTINGS_SYNC_TTL_MS, AXP_SETTING_DEFAULT_VALUES_PROVIDERS, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_SCOPE_DESCENDANTS, AXP_SETTING_VALUE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TAB_BREADCRUMB_JOIN_SEPARATOR, AXP_TAB_ROUTE_DATA_KEY, AXP_TOKEN_DEFINITION_PROVIDER, AXP_UNAUTHORIZED_ROUTE, AXVChangeType, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, DEFAULT_DATE_FILTER_PRESETS, DEFAULT_MULTILANGUAGE_FIELD_NAMES, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GALLERY_MEDIA_EXTENSIONS, GTE_OPER, GT_OPER, IN_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, MULTILANGUAGE_CAPABLE_WIDGET_TYPES, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, SETTINGS_TRACE_NS, SETTINGS_TRACE_TITLE, STARTS_WITH_OPER, STRING_OPERATORS, UploadFromComputerActionProvider, applyDateFilterPreset, axpBackgroundOperationCapabilities, axpBackgroundOperationDisplayTime, axpBackgroundOperationEntityName, axpBackgroundOperationEstimateEndDate, axpBackgroundOperationFailurePolicy, axpBackgroundOperationFromEntityModel, axpBackgroundOperationRemainingMs, axpBackgroundOperationToEntityModel, axpBuildBackgroundOperation, axpBuildTabKey, axpCoerceBackgroundOperationDate, axpCreateBackgroundOperationId, axpFallbackTabTitle, axpFindMenuItemByRoute, axpGetEntityListReturnUrl, axpGetLeafRouteSnapshot, axpHasTabScope, axpIsActiveBackgroundOperationStatus, axpIsCompletedBackgroundOperationStatus, axpIsEntityDetailsPath, axpIsEntityDetailsViewRoute, axpIsEntityListPath, axpIsEntityListRoute, axpIsEntityRecordNotFound, axpIsTabEligibleUrl, axpJoinTabTitleSegments, axpMenuPathsMatch, axpNavigateAppPath, axpNavigateCommandDefinition, axpParseAppPath, axpParseEntityDetailsRoute, axpParseEntityListRoute, axpPathFromSnapshot, axpRedirectToNotFound, axpRedirectToUnauthorized, axpReplaceEntityListRouteQueryParams, axpResolveNavigatePath, axpResolveTabKey, axpResolveTabKeyFromRouteConfig, axpResolveTabKeyFromSnapshot, axpResolveTabTitleParts, axpSaveEntityListReturnUrl, axpSettingsIndexedDb, backgroundOperationEntityFactory, buildScopedSettingsSnapshotId, chooseSystemFiles, coerceAXPSettingRawValue, coerceAXPSettingRawValueByKind, commandMessageTextForError, configPlatform, createBackgroundOperationStore, createDefaultSettingValueProviders, createEmptyScopedSettingsSnapshot, createEntityCommandOptions, createEntityRowExpressionScope, createEntitySearchCommand, createFileTypeOpenContext, createIndexedDbSettingValueProviders, createMenuContext, createMenuMiddleware, createUnsavedChangesCanDeactivateGuard, downloadGraphicFromElement, evaluateEntityDisplayTemplate, extractFileExtension, extractHttpRequestErrorInfo, findManualPresetIdByOperation, formatEntityRowDisplayTitle, formatRequestError, hasFileTypeOpenHandler, inferSettingCoercionKind, isGalleryMediaExtension, isSettingVisibleOnScope, isStoredImageFileId, normalizeDocumentFileTypePurposes, normalizeDocumentToFileListItem, normalizeOverridableAt, normalizePositiveNumberOption, normalizeRouterUrl, normalizeStoredImageRef, peelSettingValueKey, printGraphicFromElement, provideDynamicHomePage, provideMenuMiddleware, purgeNonUserScopedSettingsSnapshots, resolveDateFilterPresets, resolveEntityCreateListBehavior, resolveEntityModifyPopupTitle, resolveEntityRowDisplayText, resolveEntityRowDisplayTitle, resolveEntityRowDisplayTitleFromColumnContext, resolveEntitySearchTitleFallback, resolveExplorerFileDisplayName, resolveFileTypeDisplay, resolveGraphicElementSize, resolveGraphicPrintContent, resolveMediaViewerType, resolveQueryMatchingDisplayText, resolveSearchDisplayTemplate, resolveSearchableText, resolveStoredImageDisplayUrl, searchInRecordValues, searchInSearchableValue, serializeSvgElement, shouldApplyDefaultMultiLanguageToEntityProperty, shouldApplyDefaultMultiLanguageToWidgetNode, shouldApplyDefaultMultiLanguageToWidgetProperty, shouldPersistSettingsInIndexedDb, traceSettingsAppStartupLoadComplete, traceSettingsAppStartupLoadStarted, traceSettingsClientTool, traceSettingsFlush, traceSettingsLocalPersist, traceSettingsPageLoadComplete, traceSettingsPageLoadStarted, traceSettingsPageRouteLoad, traceSettingsRetryScheduled, traceSettingsRevalidateFailed, traceSettingsServerApiCall, traceSettingsServiceLoadComplete, traceSettingsServiceLoadFailed, traceSettingsServiceLoadStarted, traceSettingsServiceReload, traceSettingsSyncFailed, triggerBrowserDownload, tryOpenFileByCatalogType, withDefaultMultiLanguageOnWidgetNodeTree, withDefaultMultiLanguageOnWidgetProperty };
|
|
10635
10449
|
//# sourceMappingURL=acorex-platform-framework-client-common.mjs.map
|