@acorex/platform 21.0.0-next.37 → 21.0.0-next.40

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.
Files changed (64) hide show
  1. package/fesm2022/acorex-platform-common.mjs +25 -3
  2. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  3. package/fesm2022/acorex-platform-core.mjs +18 -172
  4. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-domain.mjs +3 -0
  6. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-layout-builder.mjs +29 -13
  8. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-layout-components.mjs +62 -40
  10. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-designer.mjs +209 -62
  12. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-entity.mjs +1072 -358
  14. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-views.mjs +171 -86
  16. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-widget-core.mjs +170 -63
  18. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  19. package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs → acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs} +5 -60
  20. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-layout-widgets.mjs +720 -415
  22. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-runtime.mjs +120 -9
  24. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  25. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs → acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs} +3 -3
  26. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs → acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs} +3 -3
  28. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs → acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs} +3 -3
  30. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-themes-default.mjs +26 -14
  32. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  33. package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs} +2 -2
  34. package/fesm2022/acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
  36. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
  37. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs} +38 -16
  38. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-themes-shared.mjs +183 -84
  40. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  41. package/fesm2022/acorex-platform-workflow.mjs +75 -15
  42. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  43. package/package.json +1 -1
  44. package/types/acorex-platform-common.d.ts +11 -6
  45. package/types/acorex-platform-core.d.ts +67 -101
  46. package/types/acorex-platform-domain.d.ts +28 -2
  47. package/types/acorex-platform-layout-builder.d.ts +41 -28
  48. package/types/acorex-platform-layout-components.d.ts +4 -3
  49. package/types/acorex-platform-layout-designer.d.ts +56 -16
  50. package/types/acorex-platform-layout-entity.d.ts +180 -40
  51. package/types/acorex-platform-layout-views.d.ts +31 -29
  52. package/types/acorex-platform-layout-widget-core.d.ts +81 -52
  53. package/types/acorex-platform-layout-widgets.d.ts +42 -16
  54. package/types/acorex-platform-runtime.d.ts +156 -61
  55. package/types/acorex-platform-themes-default.d.ts +1 -0
  56. package/types/acorex-platform-workflow.d.ts +64 -52
  57. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +0 -1
  58. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +0 -1
  59. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +0 -1
  60. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs.map +0 -1
  61. package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
  62. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs +0 -65
  63. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +0 -1
  64. package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +0 -1
@@ -45,7 +45,7 @@ class AXPThemeSettingProvider {
45
45
  defaultValue: 'default',
46
46
  valueTransforms: objectKeyValueTransforms('name'),
47
47
  widget: {
48
- type: AXPWidgetsCatalog.themePaletteChooser,
48
+ type: 'theme-palette-chooser',
49
49
  layout: {
50
50
  positions: {
51
51
  sm: {
@@ -165,4 +165,4 @@ class AXPThemeSettingProvider {
165
165
  }
166
166
 
167
167
  export { AXPThemeSettingProvider };
168
- //# sourceMappingURL=acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map
168
+ //# sourceMappingURL=acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs","sources":["../../../../libs/platform/themes/shared/src/lib/settings.provider.ts"],"sourcesContent":["import { AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex/platform/common';\nimport { AXPThemeLayoutSetting } from './settings.keys';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';\nimport { AXPThemeMode } from './theme.types';\nimport { Injector } from '@angular/core';\nimport { AXPPlatformScope, objectKeyValueTransforms } from '@acorex/platform/core';\nimport { AXTranslationService } from '@acorex/core/translation';\n\nexport class AXPThemeSettingProvider implements AXPSettingDefinitionProvider {\n\n private readonly translateService = this.injector.get(AXTranslationService);\n\n constructor(private injector: Injector) {\n\n }\n\n async provide(context: AXPSettingDefinitionProviderContext): Promise<void> {\n\n const trans = async (key: string) => await this.translateService.translateAsync(`@layout:settings.appearance.${key}`);\n\n // Define the 'Appearance Settings' group\n context.addGroup('appearance', await trans('title'), await trans('description'), 'fa-light fa-palette')\n\n // Add the 'Brightness & Color' section\n .addSection('color', await trans('items.color.title'), await trans('items.color.description'))\n\n // Add the 'Theme Mode' setting\n .addSetting({\n key: AXPThemeLayoutSetting.Mode,\n title: await trans('items.color.mode.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: AXPThemeMode.Light,\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.themeModeChooser,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('items.color.mode.description'),\n })\n\n .addSetting({\n key: AXPThemeLayoutSetting.Palette,\n title: await trans('items.color.palette.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'default',\n valueTransforms: objectKeyValueTransforms('name'),\n widget: {\n type: 'theme-palette-chooser',\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n xxl: {\n colSpan: 9,\n },\n },\n },\n },\n description: await trans('items.color.palette.description'),\n })\n\n // End the 'Brightness & Color' section\n .endSection()\n\n // Add the 'Root Menu' section\n .addSection('root-menu', await trans('items.root-menu.title'), await trans('items.root-menu.description'))\n\n // Add the 'Menu Orientation' setting\n .addSetting({\n key: AXPThemeLayoutSetting.MenuOrientation,\n title: await trans('items.root-menu.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'vertical',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.menuOrientationChooser,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('items.root-menu.description'),\n })\n\n // Add the 'Menu Badge Visibility' setting\n .addSetting({\n key: AXPThemeLayoutSetting.MenuBadgeVisible,\n title: await trans('items.root-menu.badge.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: true,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('items.root-menu.badge.description'),\n })\n .endSection()\n\n // Add the 'Scale & Layout' section\n .addSection('layout', await trans('items.layout.title'), await trans('items.layout.description'))\n\n // Add the 'Font Style' setting\n .addSetting({\n key: AXPThemeLayoutSetting.Font,\n title: await trans('items.layout.font.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'system-ui',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.fontStyleChooser,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('items.layout.font.description'),\n })\n\n // Add the 'Font Size' setting\n .addSetting({\n key: AXPThemeLayoutSetting.FontSize,\n title: await trans('items.layout.size.title'),\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'medium',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.fontSizeChooser,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: await trans('items.layout.size.description'),\n })\n\n // End the 'Scale & Layout' section\n .endSection()\n\n // End the 'Appearance Settings' group\n .endGroup();\n\n\n }\n}\n"],"names":[],"mappings":";;;;;MAQa,uBAAuB,CAAA;AAIlC,IAAA,WAAA,CAAoB,QAAkB,EAAA;QAAlB,IAAA,CAAA,QAAQ,GAAR,QAAQ;QAFX,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAI3E;IAEA,MAAM,OAAO,CAAC,OAA4C,EAAA;AAExD,QAAA,MAAM,KAAK,GAAG,OAAO,GAAW,KAAK,MAAM,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,+BAA+B,GAAG,CAAA,CAAE,CAAC;;AAGrH,QAAA,OAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,CAAC,aAAa,CAAC,EAAE,qBAAqB;;AAGnG,aAAA,UAAU,CAAC,OAAO,EAAE,MAAM,KAAK,CAAC,mBAAmB,CAAC,EAAE,MAAM,KAAK,CAAC,yBAAyB,CAAC;;AAG5F,aAAA,UAAU,CAAC;YACV,GAAG,EAAE,qBAAqB,CAAC,IAAI;AAC/B,YAAA,KAAK,EAAE,MAAM,KAAK,CAAC,wBAAwB,CAAC;YAC5C,KAAK,EAAE,gBAAgB,CAAC,IAAI;AAC5B,YAAA,WAAW,EAAE,IAAI;YACjB,YAAY,EAAE,YAAY,CAAC,KAAK;AAChC,YAAA,eAAe,EAAE,wBAAwB,CAAC,IAAI,CAAC;AAC/C,YAAA,MAAM,EAAE;gBACN,IAAI,E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ent } from '@acorex/platform/layout/widget-core';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
5
+
6
+ class AXPColorChooserWidgetColumnComponent extends AXPColumnWidgetComponent {
7
+ parsed() {
8
+ const value = this.rawValue;
9
+ if (!value) {
10
+ return null;
11
+ }
12
+ if (typeof value === 'string') {
13
+ const parts = value.trim().split(/\s+/);
14
+ if (parts.length === 3) {
15
+ const [color, background, border] = parts;
16
+ return { title: '', name: '', color, background, border };
17
+ }
18
+ return null;
19
+ }
20
+ return value;
21
+ }
22
+ title() {
23
+ return typeof this.rawValue === 'object' ? this.rawValue?.title || '' : '';
24
+ }
25
+ isHex() {
26
+ return this.parsed()?.background.startsWith('#') ?? false;
27
+ }
28
+ background() {
29
+ return this.parsed()?.background || '';
30
+ }
31
+ color() {
32
+ return this.parsed()?.color || '';
33
+ }
34
+ border() {
35
+ return this.parsed()?.border || '';
36
+ }
37
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
38
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPColorChooserWidgetColumnComponent, isStandalone: true, selector: "ax-color-chooser-column", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: `
39
+ <div class="ax-flex ax-items-center ax-gap-2">
40
+ @if (isHex()) {
41
+ <div
42
+ class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center ax-border ax-border-solid"
43
+ [style.background-color]="background()"
44
+ [style.border-color]="border()"
45
+ [style.color]="color()"
46
+ >
47
+ <span>Aa</span>
48
+ </div>
49
+ } @else {
50
+ <div
51
+ class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center"
52
+ [class]="[background(), border()]"
53
+ >
54
+ <span [class]="color()">Aa</span>
55
+ </div>
56
+ }
57
+ <span>{{ title() }}</span>
58
+ </div>
59
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetColumnComponent, decorators: [{
62
+ type: Component,
63
+ args: [{
64
+ selector: 'ax-color-chooser-column',
65
+ template: `
66
+ <div class="ax-flex ax-items-center ax-gap-2">
67
+ @if (isHex()) {
68
+ <div
69
+ class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center ax-border ax-border-solid"
70
+ [style.background-color]="background()"
71
+ [style.border-color]="border()"
72
+ [style.color]="color()"
73
+ >
74
+ <span>Aa</span>
75
+ </div>
76
+ } @else {
77
+ <div
78
+ class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center"
79
+ [class]="[background(), border()]"
80
+ >
81
+ <span [class]="color()">Aa</span>
82
+ </div>
83
+ }
84
+ <span>{{ title() }}</span>
85
+ </div>
86
+ `,
87
+ imports: [CommonModule],
88
+ inputs: ['rawValue'],
89
+ changeDetection: ChangeDetectionStrategy.OnPush,
90
+ }]
91
+ }] });
92
+
93
+ export { AXPColorChooserWidgetColumnComponent };
94
+ //# sourceMappingURL=acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs","sources":["../../../../libs/platform/themes/shared/src/lib/widgets/theme-color-chooser/theme-color-chooser-column.component.ts"],"sourcesContent":["import { AXPColumnWidgetComponent } from '@acorex/platform/layout/widget-core';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AXPColor } from './theme-color-chooser.service';\n\n@Component({\n selector: 'ax-color-chooser-column',\n template: `\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if (isHex()) {\n <div\n class=\"ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center ax-border ax-border-solid\"\n [style.background-color]=\"background()\"\n [style.border-color]=\"border()\"\n [style.color]=\"color()\"\n >\n <span>Aa</span>\n </div>\n } @else {\n <div\n class=\"ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center\"\n [class]=\"[background(), border()]\"\n >\n <span [class]=\"color()\">Aa</span>\n </div>\n }\n <span>{{ title() }}</span>\n </div>\n `,\n imports: [CommonModule],\n inputs: ['rawValue'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPColorChooserWidgetColumnComponent extends AXPColumnWidgetComponent<AXPColor | string | undefined> {\n private parsed(): AXPColor | null {\n const value = this.rawValue;\n if (!value) {\n return null;\n }\n if (typeof value === 'string') {\n const parts = value.trim().split(/\\s+/);\n if (parts.length === 3) {\n const [color, background, border] = parts;\n return { title: '', name: '', color, background, border };\n }\n return null;\n }\n return value as AXPColor;\n }\n\n title(): string {\n return typeof this.rawValue === 'object' ? (this.rawValue as AXPColor)?.title || '' : '';\n }\n\n isHex(): boolean {\n return this.parsed()?.background.startsWith('#') ?? false;\n }\n\n background(): string {\n return this.parsed()?.background || '';\n }\n\n color(): string {\n return this.parsed()?.color || '';\n }\n\n border(): string {\n return this.parsed()?.border || '';\n }\n}\n"],"names":[],"mappings":";;;;;AAiCM,MAAO,oCAAqC,SAAQ,wBAAuD,CAAA;IACvG,MAAM,GAAA;AACZ,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ;QAC3B,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,OAAO,IAAI;QACb;AACA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;AACvC,YAAA,IAAI,KAAK,CAAC,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EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACS,YAAY,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIX,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBA5BhD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;AAqBT,EAAA,CAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,MAAM,EAAE,CAAC,UAAU,CAAC;oBACpB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;;;"}
@@ -1,5 +1,4 @@
1
1
  import { AXPValueWidgetComponent } from '@acorex/platform/layout/widget-core';
2
- import * as i1 from '@angular/common';
3
2
  import { CommonModule } from '@angular/common';
4
3
  import * as i0 from '@angular/core';
5
4
  import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
@@ -23,22 +22,34 @@ class AXPColorChooserWidgetViewComponent extends AXPValueWidgetComponent {
23
22
  return value;
24
23
  }, ...(ngDevMode ? [{ debugName: "parsed" }] : /* istanbul ignore next */ []));
25
24
  this.title = computed(() => (typeof this.getValue() === 'object' ? this.getValue()?.title || '' : ''), ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
25
+ this.isHex = computed(() => this.parsed()?.background.startsWith('#') ?? false, ...(ngDevMode ? [{ debugName: "isHex" }] : /* istanbul ignore next */ []));
26
26
  this.background = computed(() => this.parsed()?.background || '', ...(ngDevMode ? [{ debugName: "background" }] : /* istanbul ignore next */ []));
27
27
  this.color = computed(() => this.parsed()?.color || '', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
28
28
  this.border = computed(() => this.parsed()?.border || '', ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
29
29
  }
30
30
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
31
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: AXPColorChooserWidgetViewComponent, isStandalone: true, selector: "ax-color-chooser-view", usesInheritance: true, ngImport: i0, template: `
31
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPColorChooserWidgetViewComponent, isStandalone: true, selector: "ax-color-chooser-view", usesInheritance: true, ngImport: i0, template: `
32
32
  <div class="ax-flex ax-items-center ax-gap-2">
33
- <div
34
- class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center"
35
- [ngClass]="[background(), border()]"
36
- >
37
- <span [ngClass]="color()">Aa</span>
38
- </div>
33
+ @if (isHex()) {
34
+ <div
35
+ class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center ax-border ax-border-solid"
36
+ [style.background-color]="background()"
37
+ [style.border-color]="border()"
38
+ [style.color]="color()"
39
+ >
40
+ <span>Aa</span>
41
+ </div>
42
+ } @else {
43
+ <div
44
+ class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center"
45
+ [class]="[background(), border()]"
46
+ >
47
+ <span [class]="color()">Aa</span>
48
+ </div>
49
+ }
39
50
  <span>{{ title() }}</span>
40
51
  </div>
41
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
52
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
42
53
  }
43
54
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPColorChooserWidgetViewComponent, decorators: [{
44
55
  type: Component,
@@ -46,12 +57,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
46
57
  selector: 'ax-color-chooser-view',
47
58
  template: `
48
59
  <div class="ax-flex ax-items-center ax-gap-2">
49
- <div
50
- class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center"
51
- [ngClass]="[background(), border()]"
52
- >
53
- <span [ngClass]="color()">Aa</span>
54
- </div>
60
+ @if (isHex()) {
61
+ <div
62
+ class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center ax-border ax-border-solid"
63
+ [style.background-color]="background()"
64
+ [style.border-color]="border()"
65
+ [style.color]="color()"
66
+ >
67
+ <span>Aa</span>
68
+ </div>
69
+ } @else {
70
+ <div
71
+ class="ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center"
72
+ [class]="[background(), border()]"
73
+ >
74
+ <span [class]="color()">Aa</span>
75
+ </div>
76
+ }
55
77
  <span>{{ title() }}</span>
56
78
  </div>
57
79
  `,
@@ -61,4 +83,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
61
83
  }] });
62
84
 
63
85
  export { AXPColorChooserWidgetViewComponent };
64
- //# sourceMappingURL=acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map
86
+ //# sourceMappingURL=acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs","sources":["../../../../libs/platform/themes/shared/src/lib/widgets/theme-color-chooser/theme-color-chooser-view.component.ts"],"sourcesContent":["import { AXPValueWidgetComponent } from '@acorex/platform/layout/widget-core';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed } from '@angular/core';\nimport { AXPColor } from './theme-color-chooser.service';\n\n@Component({\n selector: 'ax-color-chooser-view',\n template: `\n <div class=\"ax-flex ax-items-center ax-gap-2\">\n @if (isHex()) {\n <div\n class=\"ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center ax-border ax-border-solid\"\n [style.background-color]=\"background()\"\n [style.border-color]=\"border()\"\n [style.color]=\"color()\"\n >\n <span>Aa</span>\n </div>\n } @else {\n <div\n class=\"ax-w-6 ax-h-6 ax-rounded-md ax-flex ax-items-center ax-justify-center\"\n [class]=\"[background(), border()]\"\n >\n <span [class]=\"color()\">Aa</span>\n </div>\n }\n <span>{{ title() }}</span>\n </div>\n `,\n imports: [CommonModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AXPColorChooserWidgetViewComponent extends AXPValueWidgetComponent<AXPColor | string> {\n private parsed = computed(() => {\n const value = this.getValue();\n if (!value) {\n return null;\n }\n if (typeof value === 'string') {\n const parts = value.trim().split(/\\s+/);\n if (parts.length === 3) {\n const [color, background, border] = parts;\n return { title: '', name: '', color, background, border };\n }\n return null;\n }\n return value;\n });\n\n title = computed(() => (typeof this.getValue() === 'object' ? (this.getValue() as AXPColor)?.title || '' : ''));\n\n isHex = computed(() => this.parsed()?.background.startsWith('#') ?? false);\n\n background = computed(() => this.parsed()?.background || '');\n color = computed(() => this.parsed()?.color || '');\n border = computed(() => this.parsed()?.border || '');\n}\n"],"names":[],"mappings":";;;;;AAgCM,MAAO,kCAAmC,SAAQ,uBAA0C,CAAA;AA3BlG,IAAA,WAAA,GAAA;;AA4BU,QAAA,IAAA,CAAA,MAAM,GAAG,QAAQ,CAAC,MAAK;AAC7B,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;YAC7B,IAAI,CAAC,KAAK,EAAE;AACV,gBAAA,OAAO,IAAI;YACb;AACA,YAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBAC7B,MAAM,KAAK,GAAG,KAA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