@acorex/platform 20.0.12 → 20.0.20

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.
@@ -20,7 +20,7 @@ import { AXLabelModule } from '@acorex/components/label';
20
20
  import { AXValidationModule, AXValidationService } from '@acorex/core/validation';
21
21
  import * as i2$3 from '@angular/forms';
22
22
  import { FormsModule } from '@angular/forms';
23
- import { AXPClipBoardService, AXPRegionalService, AXPFilterOperatorMiddlewareService, AXPCleanNestedFilters, AXPFileStorageService, AXPFileTypeProviderService, ALL_DEFAULT_OPERATORS, DATE_OPERATORS, BOOLEAN_OPERATORS, NUMBER_OPERATORS, STRING_OPERATORS } from '@acorex/platform/common';
23
+ import { AXPClipBoardService, AXPSettingService, AXPRegionalService, AXPFilterOperatorMiddlewareService, AXPCleanNestedFilters, AXPFileStorageService, AXPFileTypeProviderService, ALL_DEFAULT_OPERATORS, DATE_OPERATORS, BOOLEAN_OPERATORS, NUMBER_OPERATORS, STRING_OPERATORS } from '@acorex/platform/common';
24
24
  import { AXPopupService } from '@acorex/components/popup';
25
25
  import * as i3 from '@acorex/components/select-box';
26
26
  import { AXSelectBoxModule, AXSelectBoxComponent } from '@acorex/components/select-box';
@@ -31,7 +31,7 @@ import { AXTranslationModule, AXTranslationService } from '@acorex/core/translat
31
31
  import * as i1$1 from '@angular/common';
32
32
  import { CommonModule } from '@angular/common';
33
33
  import { AXBasePageComponent } from '@acorex/components/page';
34
- import { AXDateTimeFormatter, AXTimeDurationFormatter, AXCalendarService } from '@acorex/core/date-time';
34
+ import { AXFormatService } from '@acorex/core/format';
35
35
  import * as i3$1 from '@acorex/components/datetime-box';
36
36
  import { AXDateTimeBoxModule } from '@acorex/components/datetime-box';
37
37
  import * as i5 from '@acorex/components/text-area';
@@ -39,7 +39,6 @@ import { AXTextAreaModule } from '@acorex/components/text-area';
39
39
  import { set, isNumber, castArray, cloneDeep, isEqual, sum, get } from 'lodash-es';
40
40
  import * as i4$1 from '@acorex/components/tabs';
41
41
  import { AXTabsModule } from '@acorex/components/tabs';
42
- import { AXFormatService } from '@acorex/core/format';
43
42
  import * as i1$4 from '@acorex/components/number-box';
44
43
  import { AXNumberBoxModule } from '@acorex/components/number-box';
45
44
  import * as i3$2 from '@acorex/components/password-box';
@@ -90,6 +89,7 @@ import { AXColorUtil } from '@acorex/core/utils';
90
89
  import * as i6$3 from '@acorex/components/dropdown-button';
91
90
  import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
92
91
  import { AXDataTableModule } from '@acorex/components/data-table';
92
+ import { AXTimeDurationFormatter, AXCalendarService } from '@acorex/core/date-time';
93
93
  import * as i2$a from '@acorex/components/time-duration';
94
94
  import { AXTimeDurationModule } from '@acorex/components/time-duration';
95
95
  import * as i1$c from '@acorex/components/collapse';
@@ -1207,6 +1207,12 @@ class AXPContactWidgetColumnComponent extends AXPColumnWidgetComponent {
1207
1207
  constructor() {
1208
1208
  super(...arguments);
1209
1209
  this.clipboard = inject(AXPClipBoardService);
1210
+ this.hasValue = computed(() => {
1211
+ if (typeof this.rawValue === 'string')
1212
+ return this.rawValue.trim() !== '';
1213
+ else
1214
+ return this.rawValue?.length > 0;
1215
+ });
1210
1216
  this.itemToValue = (item) => {
1211
1217
  if (typeof item === 'object')
1212
1218
  return item?.value ?? '';
@@ -1223,24 +1229,34 @@ class AXPContactWidgetColumnComponent extends AXPColumnWidgetComponent {
1223
1229
  }
1224
1230
  }
1225
1231
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPContactWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1226
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.7", type: AXPContactWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: ` <div class="ax-flex ax-justify-start ax-items-center ax-gap-2 ax-group ax-w-fit">
1232
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXPContactWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `
1233
+ @if(hasValue()){
1234
+ <div class="ax-flex ax-justify-start ax-items-center ax-gap-2 ax-group ax-w-fit">
1227
1235
  <span class="ax-truncate" [title]="getText('line')">{{ getText('comma') }}</span>
1228
1236
  <i
1229
1237
  (click)="clipboard.copy('Contact', rawValue)"
1230
1238
  class="fa-solid fa-copy ax-text-neutral-400 dark:hover:ax-text-neutral-100 hover:ax-text-neutral-900 group-hover:ax-visible ax-invisible"
1231
1239
  ></i>
1232
- </div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1240
+ </div>
1241
+ } @else {
1242
+ <span class="ax-text-muted">---</span>
1243
+ }`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1233
1244
  }
1234
1245
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPContactWidgetColumnComponent, decorators: [{
1235
1246
  type: Component,
1236
1247
  args: [{
1237
- template: ` <div class="ax-flex ax-justify-start ax-items-center ax-gap-2 ax-group ax-w-fit">
1248
+ template: `
1249
+ @if(hasValue()){
1250
+ <div class="ax-flex ax-justify-start ax-items-center ax-gap-2 ax-group ax-w-fit">
1238
1251
  <span class="ax-truncate" [title]="getText('line')">{{ getText('comma') }}</span>
1239
1252
  <i
1240
1253
  (click)="clipboard.copy('Contact', rawValue)"
1241
1254
  class="fa-solid fa-copy ax-text-neutral-400 dark:hover:ax-text-neutral-100 hover:ax-text-neutral-900 group-hover:ax-visible ax-invisible"
1242
1255
  ></i>
1243
- </div>`,
1256
+ </div>
1257
+ } @else {
1258
+ <span class="ax-text-muted">---</span>
1259
+ }`,
1244
1260
  changeDetection: ChangeDetectionStrategy.OnPush,
1245
1261
  imports: [],
1246
1262
  inputs: ['rawValue', 'rowData'],
@@ -1259,7 +1275,7 @@ const DEFAULT_CONTACT_WIDGET_TYPES = [
1259
1275
  name: 'email',
1260
1276
  title: 'Email',
1261
1277
  icon: 'fa-solid fa-envelope',
1262
- validation: [{ rule: 'required' }, { rule: 'email' }],
1278
+ validation: { rule: 'email' },
1263
1279
  labels: [
1264
1280
  { id: 'work', name: 'Work' },
1265
1281
  { id: 'home', name: 'Home' },
@@ -1270,7 +1286,7 @@ const DEFAULT_CONTACT_WIDGET_TYPES = [
1270
1286
  name: 'phone',
1271
1287
  title: 'Phone',
1272
1288
  icon: 'fa-solid fa-phone',
1273
- validation: [{ rule: 'required' }],
1289
+ validation: { rule: 'regex', options: { pattern: '^\\+?\\d{3,15}$' }, message: 'Invalid phone number' },
1274
1290
  labels: [
1275
1291
  { id: 'mobile', name: 'Mobile' },
1276
1292
  { id: 'work', name: 'Work' },
@@ -1282,7 +1298,7 @@ const DEFAULT_CONTACT_WIDGET_TYPES = [
1282
1298
  name: 'url',
1283
1299
  title: 'Url',
1284
1300
  icon: 'fa-solid fa-link',
1285
- validation: [{ rule: 'required' }],
1301
+ validation: { rule: 'regex', options: { pattern: '^https?://(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)$' }, message: 'Invalid URL' },
1286
1302
  labels: [
1287
1303
  { id: 'website', name: 'Website' },
1288
1304
  { id: 'blog', name: 'Blog' },
@@ -1409,11 +1425,9 @@ class AXPContactWidgetEditComponent extends AXPValueWidgetComponent {
1409
1425
  super();
1410
1426
  this.contactService = inject(AXPContactWidgetService);
1411
1427
  this.popup = inject(AXPopupService);
1412
- this.validationService = inject(AXValidationService);
1413
- this.contactType = computed(() => this.options()['name'] || 'email');
1428
+ this.contactType = computed(() => this.options()['type'] || 'email');
1414
1429
  this.activeContactType = signal(undefined);
1415
1430
  this.placeholder = computed(() => this.options()['placeholder'] || this.activeContactType()?.placeholder || `Enter value...`);
1416
- this.validationRules = computed(() => this.options()['validation'] || this.activeContactType()?.validation || []);
1417
1431
  this.labels = computed(() => this.options()['labels'] || this.activeContactType()?.labels || []);
1418
1432
  this.icon = computed(() => this.options()['icon'] || this.activeContactType()?.icon);
1419
1433
  this.disabled = computed(() => this.options()['disabled']);
@@ -1519,7 +1533,7 @@ class AXPContactWidgetEditComponent extends AXPValueWidgetComponent {
1519
1533
  }
1520
1534
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPContactWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1521
1535
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXPContactWidgetEditComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
1522
- <div class="ax-grid ax-grid-cols-12 ax-gap-4 ax-auto-cols-max ax-p-4">
1536
+ <div class="ax-grid ax-grid-cols-12 ax-gap-4 ax-auto-cols-max">
1523
1537
  <ax-text-box
1524
1538
  [ngModel]="valueAsObject().value"
1525
1539
  (onValueChanged)="handleValueChange($event)"
@@ -1539,6 +1553,14 @@ class AXPContactWidgetEditComponent extends AXPValueWidgetComponent {
1539
1553
  [options]="validation.options"
1540
1554
  ></ax-validation-rule>
1541
1555
  }
1556
+
1557
+ @if(activeContactType()?.validation) {
1558
+ <ax-validation-rule
1559
+ [rule]="activeContactType()?.validation?.rule!"
1560
+ [message]="activeContactType()?.validation?.message!"
1561
+ [options]="activeContactType()?.validation?.options!"
1562
+ ></ax-validation-rule>
1563
+ }
1542
1564
  </ax-text-box>
1543
1565
  @if (hasLabel()) {
1544
1566
  <ax-select-box
@@ -1561,7 +1583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
1561
1583
  type: Component,
1562
1584
  args: [{
1563
1585
  template: `
1564
- <div class="ax-grid ax-grid-cols-12 ax-gap-4 ax-auto-cols-max ax-p-4">
1586
+ <div class="ax-grid ax-grid-cols-12 ax-gap-4 ax-auto-cols-max">
1565
1587
  <ax-text-box
1566
1588
  [ngModel]="valueAsObject().value"
1567
1589
  (onValueChanged)="handleValueChange($event)"
@@ -1581,6 +1603,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
1581
1603
  [options]="validation.options"
1582
1604
  ></ax-validation-rule>
1583
1605
  }
1606
+
1607
+ @if(activeContactType()?.validation) {
1608
+ <ax-validation-rule
1609
+ [rule]="activeContactType()?.validation?.rule!"
1610
+ [message]="activeContactType()?.validation?.message!"
1611
+ [options]="activeContactType()?.validation?.options!"
1612
+ ></ax-validation-rule>
1613
+ }
1584
1614
  </ax-text-box>
1585
1615
  @if (hasLabel()) {
1586
1616
  <ax-select-box
@@ -1624,7 +1654,7 @@ class AXPContactWidgetViewComponent extends AXPValueWidgetComponent {
1624
1654
  constructor() {
1625
1655
  super();
1626
1656
  this.contactService = inject(AXPContactWidgetService);
1627
- this.contactName = computed(() => this.options()['name'] || 'email');
1657
+ this.contactName = computed(() => this.options()['type'] || 'email');
1628
1658
  this.activeContactType = signal(undefined);
1629
1659
  this.icon = computed(() => this.options()['icon'] || this.activeContactType()?.icon);
1630
1660
  this.hasLabel = computed(() => this.options()['hasLabel'] ?? true);
@@ -1672,7 +1702,7 @@ class AXPContactWidgetViewComponent extends AXPValueWidgetComponent {
1672
1702
  : contactName() === 'phone'
1673
1703
  ? 'tel:' + internalValue().value
1674
1704
  : 'mailto:' + internalValue().value;
1675
- <div class="ax-flex ax-gap-2 ax-items-center ax-p-2">
1705
+ <div class="ax-flex ax-gap-2 ax-items-center">
1676
1706
  <div class="ax-flex ax-gap-2 ax-group ax-items-center ax-justify-center ax-truncate">
1677
1707
  @if (hasIcon()) {
1678
1708
  <ax-icon class="fa-solid ax-text-neutral-400" [class]="activeContactType()?.icon"> </ax-icon>
@@ -1708,7 +1738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
1708
1738
  : contactName() === 'phone'
1709
1739
  ? 'tel:' + internalValue().value
1710
1740
  : 'mailto:' + internalValue().value;
1711
- <div class="ax-flex ax-gap-2 ax-items-center ax-p-2">
1741
+ <div class="ax-flex ax-gap-2 ax-items-center">
1712
1742
  <div class="ax-flex ax-gap-2 ax-group ax-items-center ax-justify-center ax-truncate">
1713
1743
  @if (hasIcon()) {
1714
1744
  <ax-icon class="fa-solid ax-text-neutral-400" [class]="activeContactType()?.icon"> </ax-icon>
@@ -1804,9 +1834,10 @@ const AXPContactWidget = {
1804
1834
  class AXPDateTimeBoxWidgetViewComponent extends AXPValueWidgetComponent {
1805
1835
  constructor() {
1806
1836
  super(...arguments);
1807
- this.formatter = inject(AXDateTimeFormatter);
1808
- this.translationService = inject(AXTranslationService);
1837
+ this.formatter = inject(AXFormatService);
1838
+ this.settingService = inject(AXPSettingService);
1809
1839
  this.multiple = computed(() => this.options()['multiple']);
1840
+ this.convertedValue = signal(null);
1810
1841
  this.format = computed(() => {
1811
1842
  const rawValue = this.options()['format'];
1812
1843
  if (typeof rawValue == 'string')
@@ -1816,28 +1847,47 @@ class AXPDateTimeBoxWidgetViewComponent extends AXPValueWidgetComponent {
1816
1847
  else
1817
1848
  return 'date';
1818
1849
  });
1819
- this.internalValue = computed(() => Array.isArray(this.getValue())
1820
- ? this.getValue().map((v) => this.handleFormat(v))
1821
- : [this.handleFormat(this.getValue())]);
1850
+ this.#effect = effect(() => {
1851
+ this.updateValue();
1852
+ });
1853
+ this.updateValue = async () => {
1854
+ const rawValue = this.getValue();
1855
+ if (rawValue == null) {
1856
+ this.convertedValue.set(null);
1857
+ }
1858
+ if (this.isArray(rawValue)) {
1859
+ this.convertedValue.set(rawValue.map((item) => this.handleFormat(item)).join(', '));
1860
+ }
1861
+ else {
1862
+ this.convertedValue.set(await this.handleFormat(rawValue));
1863
+ }
1864
+ };
1822
1865
  }
1823
- handleFormat(value) {
1866
+ #effect;
1867
+ async handleFormat(value) {
1868
+ let mode = '';
1869
+ if (this.format() == 'date') {
1870
+ mode = await this.settingService.get('regional:short-date');
1871
+ }
1872
+ else if (this.format() == 'time') {
1873
+ mode = await this.settingService.get('regional:short-time');
1874
+ }
1875
+ else if (this.format() == 'datetime') {
1876
+ mode = `${await this.settingService.get('regional:short-date')} ${await this.settingService.get('regional:short-time')}`;
1877
+ }
1824
1878
  return value
1825
- ? this.formatter.format(new Date(value), {
1826
- format: this.format(),
1827
- locale: this.translationService.getActiveLang() === 'fa' ? 'fa' : undefined,
1879
+ ? this.formatter.format(new Date(value), this.format(), {
1880
+ format: mode,
1828
1881
  })
1829
1882
  : '---';
1830
1883
  }
1884
+ isArray(val) {
1885
+ return Array.isArray(val);
1886
+ }
1831
1887
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPDateTimeBoxWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1832
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXPDateTimeBoxWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1888
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.7", type: AXPDateTimeBoxWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `
1833
1889
  <div class="ax-text-muted">
1834
- @if(multiple()){
1835
- @for (item of internalValue(); track $index) {
1836
- <span dir="ltr" >{{ item }}</span>
1837
- }
1838
- } @else {
1839
- <span dir="ltr" >{{ internalValue()[0] }}</span>
1840
- }
1890
+ <span [dir]="'ltr'" [title]="convertedValue()">{{ convertedValue() }}</span>
1841
1891
  </div>
1842
1892
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1843
1893
  }
@@ -1846,18 +1896,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
1846
1896
  args: [{
1847
1897
  template: `
1848
1898
  <div class="ax-text-muted">
1849
- @if(multiple()){
1850
- @for (item of internalValue(); track $index) {
1851
- <span dir="ltr" >{{ item }}</span>
1852
- }
1853
- } @else {
1854
- <span dir="ltr" >{{ internalValue()[0] }}</span>
1855
- }
1899
+ <span [dir]="'ltr'" [title]="convertedValue()">{{ convertedValue() }}</span>
1856
1900
  </div>
1857
1901
  `,
1858
1902
  changeDetection: ChangeDetectionStrategy.OnPush,
1859
1903
  imports: [],
1860
- inputs: []
1904
+ inputs: [],
1861
1905
  }]
1862
1906
  }] });
1863
1907
 
@@ -2047,9 +2091,10 @@ var dateTimeBoxWidgetFilter_component = /*#__PURE__*/Object.freeze({
2047
2091
  class AXPDateTimeBoxWidgetColumnComponent extends AXPColumnWidgetComponent {
2048
2092
  constructor() {
2049
2093
  super(...arguments);
2050
- this.formatter = inject(AXDateTimeFormatter);
2051
- this.translationService = inject(AXTranslationService);
2052
- this.multiple = this.options['multiple'];
2094
+ this.formatter = inject(AXFormatService);
2095
+ this.settingService = inject(AXPSettingService);
2096
+ this.convertedValue = signal(this.rawValue);
2097
+ this.multiple = this.options['multiple'] || false;
2053
2098
  this.format = computed(() => {
2054
2099
  const rawValue = this.options['format'];
2055
2100
  if (typeof rawValue == 'string')
@@ -2059,28 +2104,53 @@ class AXPDateTimeBoxWidgetColumnComponent extends AXPColumnWidgetComponent {
2059
2104
  else
2060
2105
  return 'date';
2061
2106
  });
2062
- this.internalValue = () => Array.isArray(this.rawValue)
2063
- ? this.rawValue.map((v) => this.handleFormat(v))
2064
- : [this.handleFormat(this.rawValue)];
2107
+ this.#effect = effect(() => {
2108
+ this.updateValue();
2109
+ });
2110
+ this.updateValue = async () => {
2111
+ const rawValue = this.rawValue;
2112
+ if (rawValue == null) {
2113
+ this.convertedValue.set(null);
2114
+ }
2115
+ if (this.isArray(rawValue)) {
2116
+ this.convertedValue.set(rawValue.map((item) => this.handleFormat(item)).join(', '));
2117
+ }
2118
+ else {
2119
+ this.convertedValue.set(await this.handleFormat(rawValue));
2120
+ }
2121
+ };
2065
2122
  }
2066
- handleFormat(value) {
2123
+ #effect;
2124
+ async handleFormat(value) {
2125
+ let mode = '';
2126
+ if (this.format() == 'date') {
2127
+ mode = await this.settingService.get('regional:short-date');
2128
+ }
2129
+ else if (this.format() == 'time') {
2130
+ mode = await this.settingService.get('regional:short-time');
2131
+ }
2132
+ else if (this.format() == 'datetime') {
2133
+ mode = `${await this.settingService.get('regional:short-date')} ${await this.settingService.get('regional:short-time')}`;
2134
+ }
2067
2135
  return value
2068
- ? this.formatter.format(new Date(value), {
2069
- format: this.format(),
2070
- locale: this.translationService.getActiveLang() === 'fa' ? 'fa' : undefined,
2136
+ ? this.formatter.format(new Date(value), this.format(), {
2137
+ format: mode,
2071
2138
  })
2072
2139
  : '---';
2073
2140
  }
2141
+ isArray(val) {
2142
+ return Array.isArray(val);
2143
+ }
2074
2144
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPDateTimeBoxWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2075
2145
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.7", type: AXPDateTimeBoxWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `<div class="ax-flex">
2076
- <span [dir]="'ltr'" [title]="internalValue()">{{ internalValue() }}</span>
2146
+ <span [dir]="'ltr'" [title]="convertedValue()">{{ convertedValue() }}</span>
2077
2147
  </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2078
2148
  }
2079
2149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPDateTimeBoxWidgetColumnComponent, decorators: [{
2080
2150
  type: Component,
2081
2151
  args: [{
2082
2152
  template: `<div class="ax-flex">
2083
- <span [dir]="'ltr'" [title]="internalValue()">{{ internalValue() }}</span>
2153
+ <span [dir]="'ltr'" [title]="convertedValue()">{{ convertedValue() }}</span>
2084
2154
  </div>`,
2085
2155
  changeDetection: ChangeDetectionStrategy.OnPush,
2086
2156
  imports: [CommonModule],
@@ -5042,6 +5112,7 @@ class AXPSelectBoxWidgetColumnComponent extends AXPColumnWidgetComponent {
5042
5112
  super(...arguments);
5043
5113
  this.valueField = this.options['valueField'] ?? 'id';
5044
5114
  this.textField = this.options['textField'] ?? 'title';
5115
+ this.badgeClass = this.options['badgeClass'] ?? 'ax-accent1';
5045
5116
  this.internalValue = computed(() => castArray(this.rawValue).map((item) => this.extractItem(item)));
5046
5117
  }
5047
5118
  extractItem(item) {
@@ -5058,7 +5129,7 @@ class AXPSelectBoxWidgetColumnComponent extends AXPColumnWidgetComponent {
5058
5129
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPSelectBoxWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5059
5130
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXPSelectBoxWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: ` <div class="ax-flex ax-gap-2">
5060
5131
  @for (item of internalValue(); track $index) {
5061
- <ax-badge [text]="item[this.textField]" color="primary"></ax-badge>
5132
+ <ax-badge [text]="item[this.textField]" [class]="badgeClass"></ax-badge>
5062
5133
  }
5063
5134
  </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$2.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5064
5135
  }
@@ -5067,7 +5138,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
5067
5138
  args: [{
5068
5139
  template: ` <div class="ax-flex ax-gap-2">
5069
5140
  @for (item of internalValue(); track $index) {
5070
- <ax-badge [text]="item[this.textField]" color="primary"></ax-badge>
5141
+ <ax-badge [text]="item[this.textField]" [class]="badgeClass"></ax-badge>
5071
5142
  }
5072
5143
  </div>`,
5073
5144
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -5277,6 +5348,7 @@ class AXPSelectBoxWidgetViewComponent extends AXPValueWidgetComponent {
5277
5348
  this.multiple = computed(() => this.options()['multiple']);
5278
5349
  this.valueField = computed(() => this.options()['valueField'] ?? 'id');
5279
5350
  this.textField = computed(() => this.options()['textField'] ?? 'title');
5351
+ this.badgeClass = computed(() => this.options()['badgeClass'] ?? 'ax-accent1');
5280
5352
  this.internalValue = computed(() => Array.isArray(this.getValue())
5281
5353
  ? this.getValue().map((item) => this.extractItem(item))
5282
5354
  : [this.extractItem(this.getValue())]);
@@ -5302,7 +5374,7 @@ class AXPSelectBoxWidgetViewComponent extends AXPValueWidgetComponent {
5302
5374
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: AXPSelectBoxWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
5303
5375
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: AXPSelectBoxWidgetViewComponent, isStandalone: true, selector: "axp-select-box-widget-view", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
5304
5376
  @for (item of internalValue(); track $index) {
5305
- <ax-badge class="ax-p-0.5" [color]="'surface'" [text]="item.text" ></ax-badge>
5377
+ <ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="item.text" ></ax-badge>
5306
5378
  }
5307
5379
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$2.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5308
5380
  }
@@ -5312,7 +5384,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
5312
5384
  selector: 'axp-select-box-widget-view',
5313
5385
  template: `
5314
5386
  @for (item of internalValue(); track $index) {
5315
- <ax-badge class="ax-p-0.5" [color]="'surface'" [text]="item.text" ></ax-badge>
5387
+ <ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="item.text" ></ax-badge>
5316
5388
  }
5317
5389
  `,
5318
5390
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -6201,7 +6273,13 @@ class AXPTextBoxWidgetEditComponent extends AXPValueWidgetComponent {
6201
6273
  this.readonly = computed(() => this.options()['readonly']);
6202
6274
  this.placeholder = computed(() => this.options()['placeholder']);
6203
6275
  this.translatedValues = {};
6204
- this.internalValue = computed(() => Array.isArray(this.getValue()) ? this.getValue() : [this.getValue()]);
6276
+ this.internalValue = computed(() => {
6277
+ const value = this.getValue();
6278
+ if (Array.isArray(value)) {
6279
+ return value.length > 0 ? value : [undefined];
6280
+ }
6281
+ return [value];
6282
+ });
6205
6283
  }
6206
6284
  ngOnInit() {
6207
6285
  super.ngOnInit();
@@ -16858,6 +16936,7 @@ class AXPWidgetsModule {
16858
16936
  AXPRichTextWidget,
16859
16937
  AXPNumberBoxWidget,
16860
16938
  AXPSignatureWidget,
16939
+ AXPLinkWidget,
16861
16940
  AXPDateTimeBoxWidget,
16862
16941
  AXPContactWidget,
16863
16942
  AXPSelectionListWidget,
@@ -16936,6 +17015,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
16936
17015
  AXPRichTextWidget,
16937
17016
  AXPNumberBoxWidget,
16938
17017
  AXPSignatureWidget,
17018
+ AXPLinkWidget,
16939
17019
  AXPDateTimeBoxWidget,
16940
17020
  AXPContactWidget,
16941
17021
  AXPSelectionListWidget,